Created
March 15, 2012 14:12
-
-
Save hectorcarranza/2044384 to your computer and use it in GitHub Desktop.
WP - Functions.php - Hide secctions from WP-Admin
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
// FUNCTION THAT HIDES PAGES FROM THE WP-ADMIN | |
function quitar_paginas_de_administrador() | |
{ | |
remove_menu_page('update-core.php'); // Update WP | |
remove_menu_page('edit.php'); // Posts | |
remove_menu_page('edit.php?post_type=page'); // Pages | |
remove_menu_page('upload.php'); // Multimedia | |
remove_menu_page('link-manager.php'); // Links | |
remove_menu_page('edit-comments.php'); // Comments | |
remove_menu_page('plugins.php'); // Plugins | |
remove_menu_page('users.php'); // Users | |
remove_menu_page('options-general.php'); // Preferences | |
remove_menu_page('themes.php'); // Appearance | |
remove_menu_page('tools.php'); // Tools | |
} | |
// THE HOOK THAT CALLS THE ABOVE FUNCTION ON "ADMIN_INIT" | |
add_action( 'admin_init', 'quitar_paginas_de_administrador' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment