WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/03/2021 11:06:39 AM (10 months ago)
Author:
SergeyBiryukov
Message:

Docs: Consistently document the default value for $args parameter in various cron functions.

See #51800.

File:
1 edited

Legend:

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

    r50174 r50175  
    3131 * @param string $hook       Action hook to execute when the event is run.
    3232 * @param array  $args       Optional. Array containing arguments to pass to the
    33  *                           hook's callback function. Each value in the array is passed
    34  *                           to the callback as an individual parameter. The array keys
    35  *                           are ignored. Default: empty array.
     33 *                           hook's callback function. Each value in the array
     34 *                           is passed to the callback as an individual parameter.
     35 *                           The array keys are ignored. Default empty array.
    3636 * @param bool   $wp_error   Optional. Whether to return a WP_Error on failure. Default false.
    3737 * @return bool|WP_Error True if event successfully scheduled. False or WP_Error on failure.
     
    227227 * @param string $hook       Action hook to execute when the event is run.
    228228 * @param array  $args       Optional. Array containing arguments to pass to the
    229  *                           hook's callback function. Each value in the array is passed
    230  *                           to the callback as an individual parameter. The array keys
    231  *                           are ignored. Default: empty array.
     229 *                           hook's callback function. Each value in the array
     230 *                           is passed to the callback as an individual parameter.
     231 *                           The array keys are ignored. Default empty array.
    232232 * @param bool   $wp_error   Optional. Whether to return a WP_Error on failure. Default false.
    233233 * @return bool|WP_Error True if event successfully scheduled. False or WP_Error on failure.
     
    332332 * @param string $hook       Action hook to execute when the event is run.
    333333 * @param array  $args       Optional. Array containing arguments to pass to the
    334  *                           hook's callback function. Each value in the array is passed
    335  *                           to the callback as an individual parameter. The array keys
    336  *                           are ignored. Default: empty array.
     334 *                           hook's callback function. Each value in the array
     335 *                           is passed to the callback as an individual parameter.
     336 *                           The array keys are ignored. Default empty array.
    337337 * @param bool   $wp_error   Optional. Whether to return a WP_Error on failure. Default false.
    338338 * @return bool|WP_Error True if event successfully rescheduled. False or WP_Error on failure.
     
    455455 *                          Although not passed to a callback, these arguments are used to uniquely identify the
    456456 *                          event, so they should be the same as those used when originally scheduling the event.
     457 *                          Default empty array.
    457458 * @param bool   $wp_error  Optional. Whether to return a WP_Error on failure. Default false.
    458459 * @return bool|WP_Error True if event successfully unscheduled. False or WP_Error on failure.
     
    536537 *                         Although not passed to a callback, these arguments are used to uniquely identify the
    537538 *                         event, so they should be the same as those used when originally scheduling the event.
     539 *                         Default empty array.
    538540 * @param bool   $wp_error Optional. Whether to return a WP_Error on failure. Default false.
    539541 * @return int|false|WP_Error On success an integer indicating number of events unscheduled (0 indicates no
     
    720722 *                            Although not passed to a callback, these arguments are used to uniquely identify the
    721723 *                            event, so they should be the same as those used when originally scheduling the event.
    722  * @param int|null $timestamp Optional. Unix timestamp (UTC) of the event. If not specified, the next scheduled event is returned.
     724 *                            Default empty array.
     725 * @param int|null $timestamp Optional. Unix timestamp (UTC) of the event. If not specified, the next scheduled event
     726 *                            is returned. Default null.
    723727 * @return object|false The event object. False if the event does not exist.
    724728 */
     
    799803 *                     Although not passed to a callback, these arguments are used to uniquely identify the
    800804 *                     event, so they should be the same as those used when originally scheduling the event.
     805 *                     Default empty array.
    801806 * @return int|false The Unix timestamp of the next time the event will occur. False if the event doesn't exist.
    802807 */
     
    10701075 * @param string $hook Action hook to identify the event.
    10711076 * @param array  $args Optional. Arguments passed to the event's callback function.
     1077 *                     Default empty array.
    10721078 * @return string|false Schedule name on success, false if no schedule.
    10731079 */
     
    10871093     * @param string|false $schedule Schedule for the hook. False if not found.
    10881094     * @param string       $hook     Action hook to execute when cron is run.
    1089      * @param array        $args     Optional. Arguments to pass to the hook's callback function.
     1095     * @param array        $args     Arguments to pass to the hook's callback function.
    10901096     */
    10911097    return apply_filters( 'get_schedule', $schedule, $hook, $args );
Note: See TracChangeset for help on using the changeset viewer.