WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
71 | * An object containing an event's data. |
72 | * |
73 | * @type string $hook Action hook to execute when the event is run. |
74 | * @type int $timestamp Unix timestamp (UTC) for when to next run the event. |
75 | * @type string|false $schedule How often the event should subsequently recur. |
76 | * @type array $args Array containing each separate argument to pass to the hook's callback function. |
77 | * @type int $interval The interval time in seconds for the schedule. Only present for recurring events. |
78 | * } |
79 | */ |
80 | $pre = apply_filters( 'pre_schedule_event', null, $event ); |
81 | if ( null !== $pre ) { |
82 | return $pre; |
83 | } |
84 |
|
85 | /* |
86 | * Check for a duplicated event. |
87 | * |
88 | * Don't schedule an event if there's already an identical event |
89 | * within 10 minutes. |
Line | Code |
207 | $event = (object) array( |
208 | 'hook' => $hook, |
209 | 'timestamp' => $timestamp, |
210 | 'schedule' => $recurrence, |
211 | 'args' => $args, |
212 | 'interval' => $schedules[ $recurrence ]['interval'], |
213 | ); |
214 |
|
215 | /** This filter is documented in wp-includes/cron.php */ |
216 | $pre = apply_filters( 'pre_schedule_event', null, $event ); |
217 | if ( null !== $pre ) { |
218 | return $pre; |
219 | } |
220 |
|
221 | /** This filter is documented in wp-includes/cron.php */ |
222 | $event = apply_filters( 'schedule_event', $event ); |
223 |
|
224 | // A plugin disallowed this event. |
225 | if ( ! $event ) { |