diff --git a/lib/wpMandrill.class.php b/lib/wpMandrill.class.php index 2c773c3..b6d861f 100644 --- a/lib/wpMandrill.class.php +++ b/lib/wpMandrill.class.php @@ -152,7 +152,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'), @@ -1013,7 +1013,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';