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
This commit is contained in:
Peter Wilson 2018-09-03 04:04:25 +00:00
parent b8bf6de0ed
commit 51a9a80da2
2 changed files with 8 additions and 2 deletions

View File

@ -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.

View File

@ -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.