function example_remove_dashboard_widgets(){ global $wp_meia_boxes;//删除快速发布模块 unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); //删除引入链接模块 unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); //删除插件模块 unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); //删除近期评论模块 unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); //删除近期草稿模块 unset($wp_meta_boxes['dashboard']['side']['coer']['dashboard_recent_drafts']); //删除wordpress开发 unset($wp_meta_boxes['dashboard']['side']['coer']['dashboard_primary']); //删除其他wordpress新闻 unset($wp_meta_boxes['dashboard']['side']['coer']['dashboard_secondary']); //删除概况模块 unset($wp_meta_boxes['dashboard']['normal']['coer']['dashboard_right_now']); unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']); //去除活动 unset($wp_meta_boxes['dashboard']['normal']['high']['dashboard_browser_nag']); } add_action('wp_dashboard_setup','example_remove_dashboard_widgets'); add_filter('show_admin_bar','__return_false'); //删除工具栏 remove_action('wp_head','rsd_link'); //删除xmlrpc remove_action('wp_head','wlwmanifest_link'); //删除wlwmanifest remove_action('wp_head','wp_generator'); //删除wp版本 remove_action('wp_head','feed_links',2); //删除文章和评论feed remove_action('wp_head','feed_links_extra',3); //删除分类feed remove_action('wp_head','wp_shortlink_wp_head',10,0); //删除shortlink remove_action('wp_head','adjacent_posts_rel_link_wp_head',10,0); //删除prev next remove_action('wp_head', 'rel_canonical' ); //移除Canonical标记 add_action('wp_before_admin_bar_rendar','dreamlam_admin_bar'); //移除工具条默认菜单 add_action('wp_dashboard_setup','dreamlam_remove_dashboard_widgets'); //删除仪表盘不不要的模版 add_action('wp_dashboard_setup','dreamlam_add_dashboard_widgets'); //仪表盘添加自定义模版 add_action('widgets_init','dreamlam_remove_recent_commnts_style'); //删除最新评论的内联样式 add_action('admin_menu','dreamlam_remove_menus'); //删除不需要的菜单 add_action('admin_init','dreamlam_remove_submenu'); //删除不需要的子菜单 add_action('widgets_init','dreamlam_custom'); //添加自定义动作
function wpdaxue_admin_bar(){ global $wp_admin_bar; $wp_admin_bar->remove_menu('wp_logo'); //移除LOGO //$wp_admin_bar->remove_menu('my-account'); //移除个人中心 $wp_admin_bar->remove_menu('comments'); //移除评论 //$wp_admin_bar->remove_menu('my-sites'); //移除我的网站(多站点) //$wp_admin_bar->remove_menu('site-name'); //移除网站名称 //$wp_admin_bar->remove_menu('new-content'); //移除新建 //$wp_admin_bar->remove_menu('search'); //移除搜索 $wp_admin_bar->remove_menu('updates'); //移除升级通知 } add_action('wp_before_admin_bar_render','wpdaxue_admin_bar');
add_filter('contextual_help','wpse50723_remove_help',999,3); function wpse50723_remove_help($old_help,$screen_id,$screen){ $screen->remove_help_tabs(); return $old_help; }
remove_action( 'wp_head','index_rel_link' ); // Removes the index link remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // Removes the prev link remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // Removes the start link
add_filter( 'comment_text', 'capital_P_dangit', 31 );
add_filter( 'comment_text', 'wptexturize' );
add_filter( 'comment_text', 'convert_chars' );
add_filter( 'comment_text', 'make_clickable', 9 );
add_filter( 'comment_text', 'force_balance_tags', 25 );
add_filter( 'comment_text', 'convert_smilies', 20 );
和
标签
add_filter( 'comment_text', 'wpautop', 30 );