Merge if-clauses for cron job detection

This commit is contained in:
Stefan Kalscheuer 2018-10-27 17:44:13 +02:00
parent 4dcd52e137
commit 59ff52cdef

View File

@ -109,10 +109,9 @@ class StatifyBlacklist {
} }
// CronJob to clean up database. // CronJob to clean up database.
if ( defined( 'DOING_CRON' ) && DOING_CRON ) { if ( defined( 'DOING_CRON' ) && DOING_CRON &&
if ( 1 === self::$_options['referer']['cron'] || 1 === self::$_options['target']['cron'] ) { ( 1 === self::$_options['referer']['cron'] || 1 === self::$_options['target']['cron'] ) ) {
add_action( 'statify_cleanup', array( 'StatifyBlacklist_Admin', 'cleanup_database' ) ); add_action( 'statify_cleanup', array( 'StatifyBlacklist_Admin', 'cleanup_database' ) );
}
} }
} }