在WordPress中隐藏Cusmin外观
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在WordPress中隐藏Cusmin外观相关的知识,希望对你有一定的参考价值。
Hide Cusmin plugin appearance from all other users, even administrators.Add this code to active themes's functions.php
// HIDE CUSMIN //Cusmin admin user ID const CUSMIN_ADMIN_USER_ID = 1; function hide_cusmin_from_plugins_list() { if(get_current_user_id() == CUSMIN_ADMIN_USER_ID){ return; } global $wp_list_table; $myplugins = $wp_list_table->items; foreach ($myplugins as $key => $val) { } } remove_submenu_page('options-general.php','cusmin'); } function remove_cusmin_options_page() { if(get_current_user_id() == CUSMIN_ADMIN_USER_ID){ return; } //Removes cusmin link from admin menu global $pagenow; remove_submenu_page('options-general.php','cusmin'); //Redirects from Cusmin options page to admin homepage wp_redirect( admin_url() ); exit; } } add_action( 'pre_current_active_plugins', 'hide_cusmin_from_plugins_list' ); add_action( 'admin_init', 'remove_cusmin_options_page', 999); // HIDE CUSMIN
以上是关于在WordPress中隐藏Cusmin外观的主要内容,如果未能解决你的问题,请参考以下文章
在 wordpress tinymce 编辑器中更改简码外观