Pass $args
as an array, rather than a splat, to wp_clear_scheduled_hook()
. There are comments in the code describing the deprecated argument behavior.
See #25282. git-svn-id: https://develop.svn.wordpress.org/trunk@25368 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a3a7be77e3
commit
f97a98011b
@ -120,7 +120,7 @@ class Tests_Cron extends WP_UnitTestCase {
|
||||
|
||||
// clear the schedule for the args events and make sure they're gone too
|
||||
// note: wp_clear_scheduled_hook() expects args passed directly, rather than as an array
|
||||
wp_clear_scheduled_hook($hook, $args[0]);
|
||||
wp_clear_scheduled_hook($hook, $args);
|
||||
$this->assertFalse( wp_next_scheduled($hook, $args) );
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ class Tests_Cron extends WP_UnitTestCase {
|
||||
|
||||
// clear the schedule for the args events and make sure they're gone too
|
||||
// note: wp_clear_scheduled_hook() used to expect args passed directly, rather than as an array pre WP 3.0
|
||||
wp_clear_scheduled_hook($hook, $args[0], $args[1]);
|
||||
wp_clear_scheduled_hook($hook, $args);
|
||||
$this->assertFalse( wp_next_scheduled($hook, $args) );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user