Make WordPress Core

Changeset 49357


Ignore:
Timestamp:
10/28/2020 06:35:14 PM (4 years ago)
Author:
johnbillion
Message:

Cron API: Improve the inline documentation for the args passed to the cron event scheduling functions.

Props chadreitsma, peterwilsoncc

Fixes #51605

File:
1 edited

Legend:

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

    r48782 r49357  
    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: empty array.
    3235 * @return bool True if event successfully scheduled. False for failure.
    3336 */
     
    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: empty array.
    186193 * @return bool True if event successfully scheduled. False for failure.
    187194 */
     
    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: empty array.
    251262 * @return bool True if event successfully rescheduled. False for failure.
    252263 */
     
    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
Note: See TracChangeset for help on using the changeset viewer.