From 51a9a80da276349fcb4aaea36898b403ab53c932 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Mon, 3 Sep 2018 04:04:25 +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. Built from https://develop.svn.wordpress.org/trunk@43608 git-svn-id: http://core.svn.wordpress.org/trunk@43437 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/cron.php | 8 +++++++- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-includes/cron.php b/wp-includes/cron.php index 8ecb43347f..db3fc51601 100644 --- a/wp-includes/cron.php +++ b/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. diff --git a/wp-includes/version.php b/wp-includes/version.php index 18976f807a..c9ae950c04 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43606'; +$wp_version = '5.0-alpha-43608'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.