wppaste
WordPress

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.
}
  • $hookstring

    Action hook to execute when the event is run.
  • $timestampint

    Unix timestamp (UTC) for when to next run the event.
  • $schedulestring|false

    How often the event should subsequently recur.
  • $argsarray

    Array containing each separate argument to pass to the hook's callback function.
  • $intervalint

    Optional. The interval time in seconds for the schedule. Only present for recurring events.

Where this hook fires · 2

  • wp-includes/cron.php:188wp_schedule_single_event()
  • wp-includes/cron.php:305wp_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.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 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.