I don't know about you, but there's some parts of the Dashboard I
never use, meaning they're just left to bulk up the menu. This is
unnecessary, and can easily be fixed by removing them with a function.
It's a very common tweak that I use in almost most cases with my own
blogs.
In the example below, we've removed the Links item, but you simply have to add in another item to the array to remove another.
In the example below, we've removed the Links item, but you simply have to add in another item to the array to remove another.
function remove_menus () {global $menu; $restricted = array(__('Links')); 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'); for example to remove Links and media menu on damin dashboard $restricted = array(__('Links'), __('Media'));
No comments:
Post a Comment