小编des*_*eit的帖子

禁用AutoHideSplashScreen for Android无法正常工作

以下Phonegap项目(Phonegap Build)无效:

config.xml文件:

<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashScreenDelay" value="10000"/>
<gap:plugin name="org.apache.cordova.splashscreen" />
Run Code Online (Sandbox Code Playgroud)

指数:

<head>
<script type="text/javascript" charset="utf-8">

window.location = 'http://www.example.com/login';

 document.AddEventListener("deviceready", OnDeviceReady, false);

    function OnDeviceReady() {
        setTimeout(function() { 
            navigator.splashscreen.hide();
        }, 6000);
    };

   </script>
  </head>
Run Code Online (Sandbox Code Playgroud)

启动画面始终保持加载状态.重定向到主页不起作用.

我试过这个: PhoneGap Build iOS应用程序在启动画面后有空白屏幕

这个:http: //community.phonegap.com/nitobi/topics/splash_screen_autohidesplashscreen_false_not_working_iphone_ios7(插件版本0.2.3)

什么都行不通.任何的想法?

android cordova

9
推荐指数
1
解决办法
2423
查看次数

具有自定义分类法的 wp_insert_post

我使用以下代码注册了自定义分类法:

register_taxonomy( 'user_r_category', array( 'user_r' ), $args );
Run Code Online (Sandbox Code Playgroud)

现在,我尝试将帖子插入到类别 ID 7 和 post_type 'user_r' 内的 'user_r_c​​ategory' 分类法:

$new_post = array(
          //'ID' => '',
          'post_author' => $current_user->ID, 
          //'post_category' => array(7),
          'post_type'   => 'user_r',
          'post_content' => $r_textarea, 
          'post_title' => $r_title,
          'tax_input'    => array(
                            'user_r_category' => array( 7 )
                        ),
          'post_status' => 'publish'
        );

    $post_id = wp_insert_post($new_post);
Run Code Online (Sandbox Code Playgroud)

该帖子已创建,但不属于类别 7。这怎么行?

php wordpress

6
推荐指数
1
解决办法
2万
查看次数

将值添加到数组中的用户元字段

我想为用户元字段提供以下数据库条目:

meta_key => array ('value 1', 'value 2', 'value 3')
Run Code Online (Sandbox Code Playgroud)

我尝试通过第一次推送创建用户元字段:

update_user_meta(
$user->id,
    meta_key,
    array ($value1)
);
Run Code Online (Sandbox Code Playgroud)

现在我想向数组添加新值。但我不想失去第一个。这怎么可能?add_user_meta 不起作用,因为它一直在添加新的数据库条目。

php arrays wordpress

4
推荐指数
1
解决办法
4334
查看次数

如何添加 100% 宽度和位置的按钮:固定

我在 stackoverflow 上尝试了很多解决方案,但没有任何效果。

a.buttongc {
  border-radius: 5px;
  background: #f5b220;
  color: #fff;
  font-size: 17px;
  height: 44px;
  line-height: 42px;
  color: #fff;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  appearance: none;
  white-space: nowrap;
  margin: 10px;
  text-overflow: ellipsis;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  overflow: hidden;
  display: block;
}

.gc-button-center {
  position: fixed;
  left: 0;
  right: 0;
  display: block;
  width: 100%;
  bottom: 50px;
  z-index: 999999999;
}
Run Code Online (Sandbox Code Playgroud)
<div class="gc-button-center">
  <a href="#" class="buttongc startgc">test</a>
</div>
Run Code Online (Sandbox Code Playgroud)

截屏

我想要左右留有边距,但它仅在左侧起作用,并且按钮位于滚动条上方。有什么解决办法吗?

html css

3
推荐指数
1
解决办法
1242
查看次数

标签 统计

php ×2

wordpress ×2

android ×1

arrays ×1

cordova ×1

css ×1

html ×1