Created
May 30, 2016 18:43
-
-
Save douglascabral/2ed5ecaa9f73ff4c159c552847754c80 to your computer and use it in GitHub Desktop.
Remove menus admin WP
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
// | |
// Remove menus do admin | |
// | |
function remove_menus(){ | |
remove_menu_page( 'index.php' ); //Dashboard | |
//remove_menu_page( 'edit.php' ); //Posts | |
remove_menu_page( 'upload.php' ); //Media | |
//remove_menu_page( 'edit.php?post_type=page' ); //Pages | |
remove_menu_page( 'edit-comments.php' ); //Comments | |
remove_menu_page( 'link-manager.php' ); //Links | |
//remove_menu_page( 'themes.php' ); //Appearance | |
//remove_menu_page( 'plugins.php' ); //Plugins | |
//remove_menu_page( 'users.php' ); //Users | |
//remove_menu_page( 'tools.php' ); //Tools | |
//remove_menu_page( 'options-general.php' ); //Settings | |
} | |
add_action( 'admin_menu', 'remove_menus' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment