Skip to content

Commit ff6d85b

Browse files
committed
VIP-Go: Add ruleset test for cron min interval
1 parent 4921974 commit ff6d85b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

WordPress-VIP-Go/ruleset-test.inc

+10
Original file line numberDiff line numberDiff line change
@@ -577,3 +577,13 @@ $_SERVER["REMOTE_ADDR"]; // Error.
577577

578578
// WordPress.CodeAnalysis.AssignmentInTernaryCondition
579579
$var = ($a = 123) ? $a : 0; // Warning.
580+
581+
// WordPress.WP.CronInterval
582+
function my_add_weekly( $schedules ) {
583+
$schedules['every_30_seconds'] = array(
584+
'interval' => 30,
585+
'display' => __( 'Once every 30 seconds' )
586+
);
587+
return $schedules;
588+
}
589+
add_filter( 'cron_schedules', 'my_add_weekly'); // Warning.

WordPress-VIP-Go/ruleset-test.php

+1
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@
232232
550 => 1,
233233
556 => 1,
234234
579 => 1,
235+
589 => 1,
235236
],
236237
'messages' => [
237238
7 => [

0 commit comments

Comments
 (0)