WordPress自定义页面无法移除bug?

最近看了官方的一个函数:remove_submenu_page,移除仪表盘的一些子菜单,下面我测试了个例子:

function remove_menus(){
  remove_submenu_page( 'themes.php', 'customize.php' );
  remove_submenu_page( 'themes.php', 'nav-menus.php' );
}
add_action( 'admin_menu', 'remove_menus',999 );

结果是“外观-菜单”被移除了,但是“外观-自定义”无法移除,自定义页面始终无法移除,不知道是不是bug。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注