跳到主要内容

删除网站CMS后台管理界面右上角的“帮助”和“显示选项”

wordpress后台管理界面右上角,对应每个管理同都有一个“帮助”选项,对于已经熟悉wordpress使用的用户来说,并没有什么作用,为了界面清洁,可以通过代码把它移除掉。
移除“帮助”
把下面的代码放到主题的functions.php文件:

//移除WordPress后台管理界面右上角的“帮助”
add_action('in_admin_header', function(){ global $current_screen; $current_screen->remove_help_tabs(); });

移除帮助和显示选项

//删除 WordPress 后台“显示选项”和“帮助”选项卡
function remove_screen_options(){ return false;}
    add_filter('screen_options_show_screen', 'remove_screen_options');
    add_filter( 'contextual_help', 'mgsh_remove_help', 999, 3 );
    function mgsh_remove_help($old_help, $screen_id, $screen){
    $screen->remove_help_tabs();
    return $old_help;
}

移除显示选项觉得没有必要,毕竟显示选项还是能控制页面显示,把不用的内容隐藏掉还是很不错的,BTW,帮助选项也还行吧。

返回顶部