购买童装可电话联系:13783019327 同微信 巩义本地可去实体店选购。
前面更换域名的日志中提到我爱水煮鱼将引入更多的作者来给大家介绍 WordPress
和其他互联网开源技术,目前供稿的作者的权限都是投稿者(contributor),它们写好日志之后,状态是待审的,这样就产生了一个问题,有时候是不
会注意到有日志需要审核的,所以最好的办法就是在 WordPress 后台的首页(就是仪表盘)直接显示待审日志列表:
add_action('wp_dashboard_setup', 'wpjam_modify_dashboard_widgets' );function wpjam_modify_dashboard_widgets() { global $wp_meta_boxes; if(current_user_can('manage_options')){ //只有管理员才能看到 add_meta_box( 'pending_posts_dashboard_widget', '待审日志', 'pending_posts_dashboard_widget_function','dashboard', 'normal', 'core' ); }}function pending_posts_dashboard_widget_function() { global $wpdb; $pending_posts = $wpdb->get_results("SELECT * FROM {$wpdb->posts} WHERE post_status = 'pending' ORDER BY post_modified DESC"); echo '<ul>'; foreach ($pending_posts as $pending_post){ echo '<li><a href="'.admin_url().'post.php?post='.$pending_post->ID.'&action=edit">'.$pending_post->post_title.'</a></li>'; } echo '</ul>';}
评论前必须登录!
注册