You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's probably never a legit reason for themes to use remove_menu_page().
There's probably a few reasons to allow for remove_submenu_page( 'themes.php' ), but that should check to make sure it's not a core sub-menu item (e.g. customize.php). Most likely, the only real use case here is removing a sub-menu item that a parent theme has added via a child theme.
It's rare that we have a theme attempting to remove pages though.
As described in #11, themes should use
add_theme_page()
and are not allowed to use the otheradd_.._page()
functions.In that same category of functions there are two functions which remove menu pages:
remove_menu_page()
andremove_submenu_page()
.Is it ok to use these in a theme or should these be forbidden as well ?
Ref: https://codex.wordpress.org/Administration_Menus
The text was updated successfully, but these errors were encountered: