-
Home
-
NT Image WebP & AVIF Converter
- Tips
How to Hide NT Image WebP & AVIF Converter Admin Menus
function plt_hide_nt_image_webp_avif_converter_menus() {
//Hide "NT Image WebP & AVIF Converter".
remove_menu_page('nt-webp-dashboard');
//Hide "NT Image WebP & AVIF Converter → NT Image WebP & AVIF Converter".
remove_submenu_page('nt-webp-dashboard', 'nt-webp-dashboard');
//Hide "NT Image WebP & AVIF Converter → Selected".
remove_submenu_page('nt-webp-dashboard', 'nt-webp-selected');
//Hide "NT Image WebP & AVIF Converter → Bulk Convert".
remove_submenu_page('nt-webp-dashboard', 'nt-webp-bulk');
//Hide "NT Image WebP & AVIF Converter → Settings".
remove_submenu_page('nt-webp-dashboard', 'nt-webp-settings');
//Hide "NT Image WebP & AVIF Converter → Logs Alerts".
remove_submenu_page('nt-webp-dashboard', 'nt-webp-logs');
//Hide "NT Image WebP & AVIF Converter → Statistics".
remove_submenu_page('nt-webp-dashboard', 'nt-webp-stats');
//Hide "NT Image WebP & AVIF Converter → Premium Features".
remove_submenu_page('nt-webp-dashboard', 'nt-webp-pro');
//Hide "NT Image WebP & AVIF Converter → Help".
remove_submenu_page('nt-webp-dashboard', 'nt-webp-help');
//Hide "NT Image WebP & AVIF Converter → Tools".
remove_submenu_page('nt-webp-dashboard', 'nt-webp-tools');
}
add_action('admin_menu', 'plt_hide_nt_image_webp_avif_converter_menus', 11);
Where do I put this code?
How to Hide the "WebP Converter NT — Weekly" Dashboard Widget
function plt_hide_nt_image_webp_avif_converter_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "WebP Converter NT — Weekly" widget.
remove_meta_box('nt_webp_dash_weekly', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_nt_image_webp_avif_converter_dashboard_widgets', 20);