apply_filters( 'pre_get_scheduled_event', null|false|object $pre, string $hook, array $args, int|null $timestamp )
- Since
- 5.1.0
Filter to override retrieving a scheduled event.
Description
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.
Compatibility
- WordPress
- since 5.1.0
- 6.7.10
- 6.8.11
- 6.9.10
- 7.0.7
- 7.1.3
Present in every tracked release (6.7.10 to 7.1.3).
Parameters
$prenull|false|object- Value to return instead. Default null to continue retrieving the event.
$hookstring- Action hook of the event.
$argsarray- 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. $timestampint|null- Unix timestamp (UTC) of the event. Null to retrieve next scheduled event.
Where this hook fires · 1
wp-includes/cron.php:770wp_get_scheduled_event()
Source code
<?php * @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. */ $pre = apply_filters( 'pre_get_scheduled_event', null, $hook, $args, $timestamp ); if ( null !== $pre ) { return $pre; } if ( null !== $timestamp && ! is_numeric( $timestamp ) ) {Changelog
Introduced in 5.1.0. Unchanged from 6.7.10 through 7.1.3.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.10 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.