Created
July 6, 2015 06:57
-
-
Save generatepress/9d2db8be7f6597e48136 to your computer and use it in GitHub Desktop.
Remove the GP Hooks menu page for non Super Admins
This file contains 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
add_action( 'admin_menu', 'generate_remove_hooks_menu', 999 ); | |
function generate_remove_hooks_menu() { | |
// If we're the super admin, don't do anything | |
if ( is_super_admin() ) | |
return; | |
// Otherwise, remove the GP Hooks menu page | |
$page = remove_submenu_page( 'themes.php', 'gp_hooks_settings' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment