https://www.ludou.org/remove-admin-menu-in-wordpress.html
function remove_submenu() {
// 删除"设置"下面的子菜单"隐私"
remove_submenu_page( 'options-general.php', 'options-privacy.php' );
// 删除"外观"下面的子菜单"编辑"
remove_submenu_page( 'themes.php', 'theme-editor.php' );
}
if ( is_admin() ) {
add_action('admin_init','remove_submenu');
}