-
Home
-
Burst Statistics – Privacy-Friendly Analytics for WordPress
- Tips
How to Hide Burst Statistics - Privacy-Friendly Analytics for WordPress Admin Menus
function plt_hide_burst_statistics_menus() {
//Hide "Statistics".
remove_menu_page('burst');
//Hide "Statistics → Statistics".
remove_submenu_page('burst', 'burst');
//Hide "Statistics → Statistics".
remove_submenu_page('burst', 'burst#statistics');
//Hide "Statistics → Settings".
remove_submenu_page('burst', 'burst#settings');
//Hide "Statistics → Upgrade to Pro".
remove_submenu_page('burst', 'https://burst-statistics.com//pricing/?burst_campaign=burst-free-1.7.3&burst_source=plugin-submenu-upgrade');
}
add_action('admin_menu', 'plt_hide_burst_statistics_menus', 11);
Where do I put this code?
How to Hide the "Burst Statistics" Dashboard Widget
function plt_hide_burst_statistics_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Burst Statistics" widget.
remove_meta_box('dashboard_widget_burst', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_burst_statistics_dashboard_widgets', 20);