-
Home
-
Media Cleaner: Clean your WordPress!
- Tips
How to Hide Media Cleaner Admin Menus
function plt_hide_media_cleaner_menus() {
//Hide "Media → Cleaner".
remove_submenu_page('upload.php', 'wpmc_dashboard');
//Hide "Meow Apps".
remove_menu_page('meowapps-main-menu');
//Hide "Meow Apps → Dashboard".
remove_submenu_page('meowapps-main-menu', 'meowapps-main-menu');
//Hide "Meow Apps → Media Cleaner".
remove_submenu_page('meowapps-main-menu', 'wpmc_settings');
}
add_action('admin_menu', 'plt_hide_media_cleaner_menus', 11);
Where do I put this code?
How to Hide the "Media Cleaner" Meta Box
function plt_hide_media_cleaner_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Media Cleaner" meta box.
remove_meta_box('mfrh_media_usage_box', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_media_cleaner_metaboxes', 20);