Created
April 11, 2013 17:36
-
-
Save DerekMarcinyshyn/5365443 to your computer and use it in GitHub Desktop.
WordPress remove menu pages
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_init’, ‘my_remove_menu_pages’ ); | |
function my_remove_menu_pages() { | |
global $menu; | |
global $current_user; | |
get_currentuserinfo(); | |
if($current_user->user_login != ‘ADMINNAME’){ | |
remove_menu_page(‘edit.php’); | |
remove_submenu_page(‘users.php’,'role-management.php’); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment