Make WordPress Core

Changeset 55170


Ignore:
Timestamp:
01/31/2023 05:48:45 PM (15 months ago)
Author:
johnbillion
Message:

Cron API: Improve the docs for some cron event and cron schedule related functions.

See #56792

File:
1 edited

Legend:

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

    r55038 r55170  
    438438
    439439/**
    440  * Unschedule a previously scheduled event.
    441  *
    442  * The $timestamp and $hook parameters are required so that the event can be
     440 * Unschedules a previously scheduled event.
     441 *
     442 * The `$timestamp` and `$hook` parameters are required so that the event can be
    443443 * identified.
    444444 *
     
    709709
    710710/**
    711  * Retrieve a scheduled event.
    712  *
    713  * Retrieve the full event object for a given event, if no timestamp is specified the next
     711 * Retrieves a scheduled event.
     712 *
     713 * Retrieves the full event object for a given event, if no timestamp is specified the next
    714714 * scheduled event is returned.
    715715 *
     
    793793
    794794/**
    795  * Retrieve the next timestamp for an event.
     795 * Retrieves the next timestamp for an event.
    796796 *
    797797 * @since 2.1.0
     
    925925
    926926/**
    927  * Register _wp_cron() to run on the {@see 'wp_loaded'} action.
     927 * Registers _wp_cron() to run on the {@see 'wp_loaded'} action.
    928928 *
    929929 * If the {@see 'wp_loaded'} action has already fired, this function calls
     
    952952
    953953/**
    954  * Run scheduled callbacks or spawn cron for all scheduled events.
     954 * Runs scheduled callbacks or spawns cron for all scheduled events.
    955955 *
    956956 * Warning: This function may return Boolean FALSE, but may also return a non-Boolean
     
    10041004
    10051005/**
    1006  * Retrieve supported event recurrence schedules.
     1006 * Retrieves supported event recurrence schedules.
    10071007 *
    10081008 * The default supported recurrences are 'hourly', 'twicedaily', 'daily', and 'weekly'.
     
    10311031 * @since 5.4.0 The 'weekly' schedule was added.
    10321032 *
    1033  * @return array[]
     1033 * @return array {
     1034 *     The array of cron schedules keyed by the schedule name.
     1035 *
     1036 *     @type array ...$0 {
     1037 *         Cron schedule information.
     1038 *
     1039 *         @type int    $interval The schedule interval in seconds.
     1040 *         @type string $display  The schedule display name.
     1041 *     }
     1042 * }
    10341043 */
    10351044function wp_get_schedules() {
     
    10581067     * @since 2.1.0
    10591068     *
    1060      * @param array[] $new_schedules An array of non-default cron schedule arrays. Default empty.
     1069     * @param array $new_schedules {
     1070     *     An array of non-default cron schedules keyed by the schedule name. Default empty array.
     1071     *
     1072     *     @type array ...$0 {
     1073     *         Cron schedule information.
     1074     *
     1075     *         @type int    $interval The schedule interval in seconds.
     1076     *         @type string $display  The schedule display name.
     1077     *     }
     1078     * }
    10611079     */
    10621080    return array_merge( apply_filters( 'cron_schedules', array() ), $schedules );
     
    10641082
    10651083/**
    1066  * Retrieve the recurrence schedule for an event.
     1084 * Retrieves the name of the recurrence schedule for an event.
    10671085 *
    10681086 * @see wp_get_schedules() for available schedules.
     
    10851103
    10861104    /**
    1087      * Filters the schedule for a hook.
     1105     * Filters the schedule name for a hook.
    10881106     *
    10891107     * @since 5.1.0
     
    10971115
    10981116/**
    1099  * Retrieve cron jobs ready to be run.
     1117 * Retrieves cron jobs ready to be run.
    11001118 *
    11011119 * Returns the results of _get_cron_array() limited to events ready to be run,
     
    11441162
    11451163/**
    1146  * Retrieve cron info array option.
     1164 * Retrieves cron info array option.
    11471165 *
    11481166 * @since 2.1.0
     
    11991217
    12001218/**
    1201  * Upgrade a cron info array.
     1219 * Upgrades a cron info array.
    12021220 *
    12031221 * This function upgrades the cron info array to version 2.
Note: See TracChangeset for help on using the changeset viewer.