From 84f4dbd649ee834f6c8b5ce68ffb25912c824cfa Mon Sep 17 00:00:00 2001 From: Scot Rumery Date: Sat, 1 Feb 2020 10:43:36 -0500 Subject: [PATCH 1/2] add filter for reports page so it can be disabled --- lib/wpMandrill.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wpMandrill.class.php b/lib/wpMandrill.class.php index 5021952..3435f62 100644 --- a/lib/wpMandrill.class.php +++ b/lib/wpMandrill.class.php @@ -153,7 +153,7 @@ static function adminMenu() { array(__CLASS__,'showOptionsPage') ); - if( self::isConfigured() ) { + if( self::isConfigured() && apply_filters( 'wpmandrill_enable_reports', true ) ) { if (current_user_can('manage_options')) self::$report = add_dashboard_page( __('Mandrill Reports', 'wpmandrill'), __('Mandrill Reports', 'wpmandrill'), From d0841267dcb394d3ec178c81dd012e1409a99839 Mon Sep 17 00:00:00 2001 From: Scot Rumery Date: Sat, 1 Feb 2020 11:25:33 -0500 Subject: [PATCH 2/2] add filter so the dashboard widget can be disabled --- lib/wpMandrill.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wpMandrill.class.php b/lib/wpMandrill.class.php index 3435f62..40f7656 100644 --- a/lib/wpMandrill.class.php +++ b/lib/wpMandrill.class.php @@ -1030,7 +1030,7 @@ static function addDashboardWidgets() { if (!current_user_can('manage_options')) return; self::getConnected(); - if ( !self::isConnected() ) return; + if ( !self::isConnected() || !apply_filters( 'wpmandrill_enable_widgets', true ) ) return; $widget_id = 'mandrill_widget';