Skip to content

Commit

Permalink
Merge pull request #55 from rumspeed/disable-reports-filter
Browse files Browse the repository at this point in the history
Filters to Disable Reports and Dashboard Widgets
  • Loading branch information
kcarwilemiller authored Feb 18, 2020
2 parents b7629c5 + d084126 commit 61dbcfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/wpMandrill.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -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';

Expand Down

0 comments on commit 61dbcfd

Please sign in to comment.