apply_filters( 'wp_next_scheduled', int $timestamp, object $next_event, string $hook, array $args )
- Since
- 6.8.0
Filters the timestamp of the next scheduled event for the given hook.
Compatibility
- WordPress
- since 6.8.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in 4 of the 5 tracked releases, added in 6.8.0.
Parameters
$timestampint- Unix timestamp (UTC) for when to next run the event.
$next_eventobject- { An object containing an event's data.
@type string $hook Action hook of the event.
@type int $timestamp Unix timestamp (UTC) for when to next run the event.
@type string $schedule How often the event should subsequently recur.
@type array $args Array containing each separate argument to pass to the hook callback function.
@type int $interval Optional. The interval time in seconds for the schedule. Only present for recurring events.
}$hookstringAction hook of the event.$timestampintUnix timestamp (UTC) for when to next run the event.$schedulestringHow often the event should subsequently recur.$argsarrayArray containing each separate argument to pass to the hook callback function.$intervalintOptional. The interval time in seconds for the schedule. Only present for recurring events.
$hookstring- Action hook of the event.
$argsarray- Array containing each separate argument to pass to the hook callback function.
Where this hook fires · 1
wp-includes/cron.php:887wp_next_scheduled()
Source code
* present for recurring events. * } * @param string $hook Action hook of the event. * @param array $args Array containing each separate argument to pass to the hook * callback function. */ return apply_filters( 'wp_next_scheduled', $next_event->timestamp, $next_event, $hook, $args );} /** * Sends a request to run cron through HTTP request that doesn't halt page loading. * * @since 2.1.0Changelog
Introduced in 6.8.0. One change between 6.8.8 and 7.1.0.
Signature, return type and hooks compared across 4 parsed releases.
7.0.4
Parameter
$hook added.verified against source6.8.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 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.