I have two plugins in the dashboard, SEO WordPress and Custom Content Type Manager, and for security reasons I want to hide these from dashboard. How to do that?
I tried to hide the SEO WordPress with this:
// Remove Admin Dashboard menus
function wp_admin_dashboard_remove_menus() {
global $menu;
$restricted = array(('Comments'), __('Users'), __('Updates'), __('wpseo_dashboard'));
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', 'wp_admin_dashboard_remove_menus');
Tried many combinations like:
__('wpseo')
__('wp-seo')
__('wp_seo')
But the SEO menu did not hide.
WordPress SEO
If you want to remove the admin menu:
you can do that with:
where it will be removed for all users.
WordPress SEO by Yoast
To hide the admin menu:
and the admin menu bar:
one can use:
where it will be hidden for all users.
Custom Content Type Manager
Here one can hide the admin menu:
from all users with:
Do you want to hide it for a specific kind of user like an author? If so, you can use the Advanced Access Manager plugin http://wordpress.org/extend/plugins/advanced-access-manager/
With this plugin you can decide what the user(group) has access to in the backend and also what permissions he/she has.
For removing plugin’s menu from multisite dashboard
For adding menu use
add_menu_page();