Return to Snippet

Revision: 50905
at September 8, 2011 06:14 by jamiebrwr


Initial Code
// Remove Admin Menus
function remove_menu_items() {
	global $menu;
	$restricted = array(
		__('Links'),
		__('Comments'),
		__('Media'),
		__('Plugins'),
		__('Tools'),
		__('Users')
	);
	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_menu_items');

Initial URL

                                

Initial Description

                                

Initial Title
Hide/Remove WordPress Admin Menus

Initial Tags
links

Initial Language
PHP