WP-Mix

A fresh mix of code snippets and tutorials

Remove sub-menus

Quick snippet for removing or disabling WordPress sub-menus:

function remove_submenus() {
	global $menu;
	global $current_user;
	get_currentuserinfo();
	if($current_user->user_login == 'username') {
		global $submenu;
		unset($submenu['themes.php'][10]);
	}
}
add_action('admin_menu', 'remove_menus');

Learn more

Digging Into WordPressWordPress Themes In DepthWizard’s SQL Recipes for WordPress