-
Home
-
Rundiz Downloads
- Tips
How to Hide Rundiz Downloads Admin Menus
function plt_hide_rundiz_downloads_menus() {
//Hide "Downloads".
remove_menu_page('rd-downloads');
//Hide "Downloads → Downloads".
remove_submenu_page('rd-downloads', 'rd-downloads');
//Hide "Downloads → Add New".
remove_submenu_page('rd-downloads', 'rd-downloads_add');
//Hide "Downloads → Logs".
remove_submenu_page('rd-downloads', 'rd-downloads_logs');
//Hide "Downloads → Settings".
remove_submenu_page('rd-downloads', 'rd-downloads_settings');
}
add_action('admin_menu', 'plt_hide_rundiz_downloads_menus', 11);
Where do I put this code?
How to Hide the "Download Statistics" Dashboard Widget
function plt_hide_rundiz_downloads_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Download Statistics" widget.
remove_meta_box('rddownloads_dashboard_widget_downloadstat', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_rundiz_downloads_dashboard_widgets', 20);