如果你处理wp菜单,你应该使用admin\\u菜单过滤器。
add_filter(\'admin_menu\', \'admin_menu_filter\',500);
function admin_menu_filter(){
remove_submenu_page( \'themes.php\', \'widgets.php\' );//widget
remove_submenu_page( \'themes.php\', \'theme-editor.php\'); //editor
remove_submenu_page( \'themes.php\', \'theme_options\' ); //theme-option
}
add_action(\'admin_print_styles-themes.php\', \'hide_customize\');
function hide_customize(){
echo \'<style>#customize-current-theme-link{display:none;}</style>\';
}
您可以将其放置到插件或函数中。主题中的php。