I am trying to hide a certain amount of menus for a client. Right now I am using the following code and it is doing its job well, but it removes it for everyone as far as I can tell. As in all roles.
function remove_menus () {
global $menu;
$restricted = array(__('Dashboard'), __('Media'), __('Links'), __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Profile'),__('Plugins'));
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');
What is the line I would use to have this call out only an editor or an author etc?
Thanks much