I used the following to remove certain menus for the "editor"
function remove_menus () {
global $menu;
if( (current_user_can('install_themes')) ) {
$restricted = array(); } // check if admin and hide nothing
else { // for all other users
// Remove Tools, Appearance, Links, Plugins, Comments,
if ($current_user->user_level < 10)
$restricted = array(__('Posts'), __('Links'), __('Appearance'), __('Tools'), __('Settings'), __('Comments'), __('Plugins')); // this removes a lot! Just delete the ones you want to keep showing
end ($menu);
while (prev($menu)){
$value = explode(' ',$menu[key($menu)][0]);
if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
}
}
}
add_action('admin_menu', 'remove_menus');
This works except now the client has asked to remove the following:
On the dashboard, remove the "Add New Page".
Under the "pages" tab, remove the "Add New Page":
Is this possible?
edit_pages
or something. Just hiding them on the menu like you're doing (as far as I'm aware at least) is merely security by obscurity.