Filter hook 'pre_get_scheduled_event'

in WP Core File wp-includes/cron.php at line 770

Description

Filter to override retrieving a scheduled event. Returning a non-null value will short-circuit the normal process, returning the filtered value instead. Return false if the event does not exist, otherwise an event object should be returned.

Occurrences

Filename Line Number
wp-includes/cron.php 770

Parameters

Type Name Description
null|false|object $pre Value to return instead. Default null to continue retrieving the event.
string $hook Action hook of the event.
array $args Array containing each separate argument to pass to the hook's callback function. Although not passed to a callback, these arguments are used to uniquely identify the event.
int|null $timestamp Unix timestamp (UTC) of the event. Null to retrieve next scheduled event.

PHP Doc

/**
	 * Filter to override retrieving a scheduled event.
	 *
	 * Returning a non-null value will short-circuit the normal process,
	 * returning the filtered value instead.
	 *
	 * Return false if the event does not exist, otherwise an event object
	 * should be returned.
	 *
	 * @since 5.1.0
	 *
	 * @param null|false|object $pre  Value to return instead. Default null to continue retrieving the event.
	 * @param string            $hook Action hook of the event.
	 * @param array             $args Array containing each separate argument to pass to the hook's callback function.
	 *                                Although not passed to a callback, these arguments are used to uniquely identify
	 *                                the event.
	 * @param int|null  $timestamp Unix timestamp (UTC) of the event. Null to retrieve next scheduled event.
	 */