Merge if-clauses for cron job detection
This commit is contained in:
parent
4dcd52e137
commit
59ff52cdef
@ -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' ) );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user