From 0eda5645073316dfd27676e9da159740e849f79f Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Mon, 3 Sep 2018 04:03:10 +0000 Subject: [PATCH] Cron API: Clarify documentation for `wp_reschedule_event()`. Expands documentation to indicate `wp_schedule_event()` ought to be used for rescheduling an upcoming event, while `wp_reschedule_event()` is used for internally rescheduling a recurring event after it runs. Props Dharm1025, jrf. Fixes #35968. git-svn-id: https://develop.svn.wordpress.org/trunk@43608 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/cron.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/cron.php b/src/wp-includes/cron.php index 8ecb43347f..db3fc51601 100644 --- a/src/wp-includes/cron.php +++ b/src/wp-includes/cron.php @@ -197,11 +197,17 @@ function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array() ) { /** * Reschedules a recurring event. * + * Mainly for internal use, this takes the time stamp of a previously run + * recurring event and reschedules it for its next run. + * + * To change upcoming scheduled events, use {@see wp_schedule_event} to + * change the recurrence frequency. + * * @since 2.1.0 * @since 5.0.0 Return value modified to boolean indicating success or failure, * {@see pre_reschedule_event} filter added to short-circuit the function. * - * @param int $timestamp Unix timestamp (UTC) for when to next run the event. + * @param int $timestamp Unix timestamp (UTC) for when the event was scheduled. * @param string $recurrence How often the event should subsequently recur. See wp_get_schedules() for accepted values. * @param string $hook Action hook to execute when the event is run. * @param array $args Optional. Array containing each separate argument to pass to the hook's callback function.