Make WordPress Core

Changeset 26267


Ignore:
Timestamp:
11/19/2013 05:00:39 AM (11 years ago)
Author:
DrewAPicture
Message:

Inline documentation for hooks in wp-includes/cron.php.

Props tmtoy for the initial patch.
Fixes #25475.

File:
1 edited

Legend:

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

    r23591 r26267  
    2828    $crons = _get_cron_array();
    2929    $event = (object) array( 'hook' => $hook, 'timestamp' => $timestamp, 'schedule' => false, 'args' => $args );
    30     $event = apply_filters('schedule_event', $event);
     30    /**
     31     * Filter a single event before it is scheduled.
     32     *
     33     * @since 3.1.0
     34     *
     35     * @param object $event An object containing an event's data.
     36     */
     37    $event = apply_filters( 'schedule_event', $event );
    3138
    3239    // A plugin disallowed this event
     
    6976
    7077    $event = (object) array( 'hook' => $hook, 'timestamp' => $timestamp, 'schedule' => $recurrence, 'args' => $args, 'interval' => $schedules[$recurrence]['interval'] );
    71     $event = apply_filters('schedule_event', $event);
     78    /** This filter is documented in wp-includes/cron.php */
     79    $event = apply_filters( 'schedule_event', $event );
    7280
    7381    // A plugin disallowed this event
     
    245253    set_transient( 'doing_cron', $doing_wp_cron );
    246254
     255    /**
     256     * Filter the cron request arguments.
     257     *
     258     * @since 3.5.0
     259     *
     260     * @param array $cron_request_array {
     261     *     An array of cron request URL arguments.
     262     *
     263     *     @type string $url  The cron request URL.
     264     *     @type int    $key  The 22 digit GMT microtime.
     265     *     @type array  $args {
     266     *         An array of cron request arguments.
     267     *
     268     *         @type int  $timeout   The request timeout in seconds. Default .01 seconds.
     269     *         @type bool $blocking  Whether to set blocking for the request. Default false.
     270     *         @type bool $sslverify Whether to sslverify. Default true.
     271     *     }
     272     * }
     273     */
    247274    $cron_request = apply_filters( 'cron_request', array(
    248         'url' => site_url( 'wp-cron.php?doing_wp_cron=' . $doing_wp_cron ),
    249         'key' => $doing_wp_cron,
    250         'args' => array( 'timeout' => 0.01, 'blocking' => false, 'sslverify' => apply_filters( 'https_local_ssl_verify', true ) )
     275        'url'  => add_query_arg( array( 'doing_wp_cron', $doing_wp_cron ), site_url( 'wp-cron.php' ) ),
     276        'key'  => $doing_wp_cron,
     277        'args' => array(
     278            'timeout'   => 0.01,
     279            'blocking'  => false,
     280            /** This filter is documented in wp-includes/class-http.php */
     281            'sslverify' => apply_filters( 'https_local_ssl_verify', true )
     282        )
    251283    ) );
    252284
     
    323355        'daily'      => array( 'interval' => DAY_IN_SECONDS,       'display' => __( 'Once Daily' ) ),
    324356    );
     357    /**
     358     * Filter the non-default cron schedules.
     359     *
     360     * @since 2.1.0
     361     *
     362     * @param array $new_schedules An array of non-default cron schedules. Default empty.
     363     */
    325364    return array_merge( apply_filters( 'cron_schedules', array() ), $schedules );
    326365}
Note: See TracChangeset for help on using the changeset viewer.