cron_request WordPress Filter Hook

The cron_request hook is triggered when a WordPress cron job is requested. It allows you to modify the cron job request before it is processed.

apply_filters( 'cron_request', array $cron_request_array, string $doing_wp_cron ) #

Filters the cron request arguments.


Parameters

$cron_request_array

(array)An array of cron request URL arguments.

  • 'url'
    (string) The cron request URL.
  • 'key'
    (int) The 22 digit GMT microtime.
  • 'args'
    (array) An array of cron request arguments.
    • 'timeout'
      (int) The request timeout in seconds. Default .01 seconds.
    • 'blocking'
      (bool) Whether to set blocking for the request. Default false.
    • 'sslverify'
      (bool) Whether SSL should be verified for the request. Default false.

$doing_wp_cron

(string)The unix timestamp of the cron lock.


Top ↑

Source

File: wp-includes/cron.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.5.0The $doing_wp_cron parameter was added.
3.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.