apply_filters( 'schedule_event', object|false $event )
- Since
- 3.1.0
Modify an event before it is scheduled.
Compatibility
- WordPress
- since 3.1.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$eventobject|false- { An object containing an event's data, or boolean false to prevent the event from being scheduled.
@type string $hook Action hook to execute when the event is run.
@type int $timestamp Unix timestamp (UTC) for when to next run the event.
@type string|false $schedule How often the event should subsequently recur.
@type array $args Array containing each separate argument to pass to the hook's callback function.
@type int $interval Optional. The interval time in seconds for the schedule. Only present for recurring events.
}$hookstringAction hook to execute when the event is run.$timestampintUnix timestamp (UTC) for when to next run the event.$schedulestring|falseHow often the event should subsequently recur.$argsarrayArray containing each separate argument to pass to the hook's callback function.$intervalintOptional. The interval time in seconds for the schedule. Only present for recurring events.
Where this hook fires · 2
wp-includes/cron.php:179wp_schedule_single_event()wp-includes/cron.php:287wp_schedule_event()
Source code
<?php * @type int $timestamp Unix timestamp (UTC) for when to next run the event. * @type string|false $schedule How often the event should subsequently recur. * @type array $args Array containing each separate argument to pass to the hook's callback function. * @type int $interval Optional. The interval time in seconds for the schedule. Only present for recurring events. * } */ $event = apply_filters( 'schedule_event', $event ); // A plugin disallowed this event. if ( ! $event ) { if ( $wp_error ) { return new WP_Error( 'schedule_event_false',Changelog
Introduced in 3.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 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.