Created
November 10, 2017 17:59
-
-
Save Sstobo/288ac5b82e27e1e3da5eb291ce52a7c4 to your computer and use it in GitHub Desktop.
[WP remove menus from build version] #build #wp #menu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What if we wanted to remove the Editor links from the Appearance/Plugins sub-menus so no internal end user can mess with code from inside WP? | |
// Remove "Editor" links from sub-menus | |
function inhabitent_remove_submenus() { | |
remove_submenu_page( 'themes.php', 'theme-editor.php' ); | |
remove_submenu_page( 'plugins.php', 'plugin-editor.php' ); | |
} | |
add_action( 'admin_menu', 'inhabitent_remove_submenus', 110 ); | |
The priority number is an optional integer value on a scale of 1 to 999 that determines the priority of order for functions tied to that specific hook. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment