remove all submenus from plugin
Not without touching the global $submenu directly (which I wouldn’t recommend – using only purposefully exposed APIs provides, in general, better stability). However, if you wanted a function to remove all submenus: /** * Removes all submenus of given menu item * * @param string $menu_slug The slug of the parent menu to remove submenus … Read more