Make WordPress Core

Ticket #43801: 43801.patch

File 43801.patch, 1.7 KB (added by ovidiul, 4 years ago)

adding missing documentation text for wp_schedule_event and wp_next_scheduled functions

  • src/wp-includes/cron.php

    diff --git a/src/wp-includes/cron.php b/src/wp-includes/cron.php
    index e3bd917e25..38c3112336 100644
    a b function wp_schedule_single_event( $timestamp, $hook, $args = array() ) { 
    190190 *                           hook's callback function. Each value in the array is passed
    191191 *                           to the callback as an individual parameter. The array keys
    192192 *                           are ignored. Default: empty array.
     193 *                           Note: it's useful to remember here the array values type,
     194 *                           so when calling the `wp_next_scheduled` function for instance,
     195 *                           make sure the arguments values type match, so 1 !== '1'
    193196 * @return bool True if event successfully scheduled. False for failure.
    194197 */
    195198function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array() ) {
    function wp_get_scheduled_event( $hook, $args = array(), $timestamp = null ) { 
    621624 * @param array  $args Optional. Array containing each separate argument to pass to the hook's callback function.
    622625 *                     Although not passed to a callback, these arguments are used to uniquely identify the
    623626 *                     event, so they should be the same as those used when originally scheduling the event.
     627 *                     Note: not passing any $args while the original scheduled event has defined some, will always
     628 *                     return `false`, and that might not be the desired result.
    624629 * @return int|false The Unix timestamp of the next time the event will occur. False if the event doesn't exist.
    625630 */
    626631function wp_next_scheduled( $hook, $args = array() ) {