WordPress.org

Make WordPress Core

Changeset 43608


Ignore:
Timestamp:
09/03/2018 04:03:10 AM (15 months ago)
Author:
peterwilsoncc
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/cron.php

    r43571 r43608  
    198198 * Reschedules a recurring event.
    199199 *
     200 * Mainly for internal use, this takes the time stamp of a previously run
     201 * recurring event and reschedules it for its next run.
     202 *
     203 * To change upcoming scheduled events, use {@see wp_schedule_event} to
     204 * change the recurrence frequency.
     205 *
    200206 * @since 2.1.0
    201207 * @since 5.0.0 Return value modified to boolean indicating success or failure,
    202208 *              {@see pre_reschedule_event} filter added to short-circuit the function.
    203209 *
    204  * @param int    $timestamp  Unix timestamp (UTC) for when to next run the event.
     210 * @param int    $timestamp  Unix timestamp (UTC) for when the event was scheduled.
    205211 * @param string $recurrence How often the event should subsequently recur. See wp_get_schedules() for accepted values.
    206212 * @param string $hook       Action hook to execute when the event is run.
Note: See TracChangeset for help on using the changeset viewer.