WordPress.org

Make WordPress Core

Ticket #51605: 51605.diff

File 51605.diff, 4.3 KB (added by peterwilsoncc, 8 months ago)
  • src/wp-includes/cron.php

    diff --git a/src/wp-includes/cron.php b/src/wp-includes/cron.php
    index 984e83a9f2..add1924548 100644
    a b  
    2828 *
    2929 * @param int    $timestamp  Unix timestamp (UTC) for when to next run the event.
    3030 * @param string $hook       Action hook to execute when the event is run.
    31  * @param array  $args       Optional. Array containing each separate argument to pass to the hook's callback function.
     31 * @param array  $args       Optional. Array containing arguments to pass to the
     32 *                           hook's callback function. Each value in the array is passed
     33 *                           to the callback as an individual parameter. The array keys
     34 *                           are ignored. Default value: array()
    3235 * @return bool True if event successfully scheduled. False for failure.
    3336 */
    3437function wp_schedule_single_event( $timestamp, $hook, $args = array() ) {
    function wp_schedule_single_event( $timestamp, $hook, $args = array() ) { 
    180183 * @link https://developer.wordpress.org/reference/functions/wp_schedule_event/
    181184 *
    182185 * @param int    $timestamp  Unix timestamp (UTC) for when to next run the event.
    183  * @param string $recurrence How often the event should subsequently recur. See wp_get_schedules() for accepted values.
     186 * @param string $recurrence How often the event should subsequently recur.
     187 *                           See wp_get_schedules() for accepted values.
    184188 * @param string $hook       Action hook to execute when the event is run.
    185  * @param array  $args       Optional. Array containing each separate argument to pass to the hook's callback function.
     189 * @param array  $args       Optional. Array containing arguments to pass to the
     190 *                           hook's callback function. Each value in the array is passed
     191 *                           to the callback as an individual parameter. The array keys
     192 *                           are ignored. Default value: array()
    186193 * @return bool True if event successfully scheduled. False for failure.
    187194 */
    188195function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array() ) {
    function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array() ) { 
    245252 *              {@see 'pre_reschedule_event'} filter added to short-circuit the function.
    246253 *
    247254 * @param int    $timestamp  Unix timestamp (UTC) for when the event was scheduled.
    248  * @param string $recurrence How often the event should subsequently recur. See wp_get_schedules() for accepted values.
     255 * @param string $recurrence How often the event should subsequently recur.
     256 *                           See wp_get_schedules() for accepted values.
    249257 * @param string $hook       Action hook to execute when the event is run.
    250  * @param array  $args       Optional. Array containing each separate argument to pass to the hook's callback function.
     258 * @param array  $args       Optional. Array containing arguments to pass to the
     259 *                           hook's callback function. Each value in the array is passed
     260 *                           to the callback as an individual parameter. The array keys
     261 *                           are ignored. Default value: array()
    251262 * @return bool True if event successfully rescheduled. False for failure.
    252263 */
    253264function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array() ) {
    function wp_unschedule_event( $timestamp, $hook, $args = array() ) { 
    392403 *              {@see 'pre_clear_scheduled_hook'} filter added to short-circuit the function.
    393404 *
    394405 * @param string $hook Action hook, the execution of which will be unscheduled.
    395  * @param array  $args Optional. Arguments that were to be passed to the hook's callback function.
     406 * @param array  $args Optional. Array containing each separate argument to pass to the hook's callback function.
     407 *                     Although not passed to a callback, these arguments are used to uniquely identify the
     408 *                     event, so they should be the same as those used when originally scheduling the event.
    396409 * @return int|false On success an integer indicating number of events unscheduled (0 indicates no
    397410 *                   events were registered with the hook and arguments combination), false if
    398411 *                   unscheduling one or more events fail.