I have the following script within my functions.php
file to avoid certain users from modifying things they shouldn't and would like to remove one more item, the Appearances > Themes submenu.
function remove_menus () {
global $menu;
$restricted = array(__('Dashboard'), __('Posts'), __('Pages'), __('Comments'), __('Plugins'), __('Users'), __('Tools'), __('Links'), __('Settings'));
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');
How would I be able to achieve this?