最后,我使用此解决方案更改子菜单中的“Widgets”标签(外观>…):
add_action( \'admin_menu\', \'adjust_the_wp_menu\', 999 );
function adjust_the_wp_menu() {
$page = remove_submenu_page( \'themes.php\', \'widgets.php\' );
}
add_action(\'admin_menu\', \'register_custom_menu_page\');
function register_custom_menu_page() {
add_submenu_page(\'themes.php\', \'custom menu title\', \'custom menu\', \'add_users\', \'widgets.php\');
}`