-
Home
-
Download Magnet
- Tips
How to Hide Download Magnet Admin Menus
function plt_hide_download_magnet_menus() {
//Hide "Download Magnet".
remove_menu_page('edit.php?post_type=psdmcontent');
//Hide "Download Magnet → Download Magnet".
remove_submenu_page('edit.php?post_type=psdmcontent', 'edit.php?post_type=psdmcontent');
//Hide "Download Magnet → Add New Download Magnet".
remove_submenu_page('edit.php?post_type=psdmcontent', 'post-new.php?post_type=psdmcontent');
//Hide "Download Magnet → Downloads".
remove_submenu_page('edit.php?post_type=psdmcontent', 'psdownload_downloaded_files');
//Hide "Download Magnet → Export".
remove_submenu_page('edit.php?post_type=psdmcontent', 'psdownload_export_list');
//Hide "Download Magnet → Settings".
remove_submenu_page('edit.php?post_type=psdmcontent', 'psdm_options');
//Hide "Download Magnet → Add-Ons".
remove_submenu_page('edit.php?post_type=psdmcontent', 'downloadmagnet-addons');
}
add_action('admin_menu', 'plt_hide_download_magnet_menus', 1000000000);
Where do I put this code?
How to Hide the "Download Magnet Entry" Meta Box
function plt_hide_download_magnet_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Download Magnet Entry" meta box.
remove_meta_box('ps_dm', $screen->id, 'advanced');
}
add_action('add_meta_boxes', 'plt_hide_download_magnet_metaboxes', 20);