Last active
December 21, 2015 12:49
-
-
Save andyknapp/6308674 to your computer and use it in GitHub Desktop.
Remove menu items from WP dashboard for all user roles expect admin
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
function ak_remove_menu_pages() { | |
if( !current_user_can('administrator') ) { | |
remove_menu_page('link-manager.php'); | |
} | |
} | |
add_action( 'admin_menu', 'ak_remove_menu_pages' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment