Remove Comments menu from Admin Dashboard

// Remove Comments menu from Admin Dashboard
function remove_menus () {
global $menu;
	$restricted = array(__('Comments'));
	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');

Source: 10+ Useful WordPress Code Snippets

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.