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 |
---|---|
170 | * An object containing an event's data, or boolean false to prevent the event from being scheduled. |
171 | * |
172 | * @type string $hook Action hook to execute when the event is run. |
173 | * @type int $timestamp Unix timestamp (UTC) for when to next run the event. |
174 | * @type string|false $schedule How often the event should subsequently recur. |
175 | * @type array $args Array containing each separate argument to pass to the hook's callback function. |
176 | * @type int $interval Optional. The interval time in seconds for the schedule. Only present for recurring events. |
177 | * } |
178 | */ |
179 | $event = apply_filters( 'schedule_event', $event ); |
180 |
|
181 | // A plugin disallowed this event. |
182 | if ( ! $event ) { |
183 | if ( $wp_error ) { |
184 | return new WP_Error( |
185 | 'schedule_event_false', |
186 | __( 'A plugin disallowed this event.' ) |
187 | ); |
188 | } |
Line | Code |
278 |
|
279 | if ( ! $wp_error && is_wp_error( $pre ) ) { |
280 | return false; |
281 | } |
282 |
|
283 | return $pre; |
284 | } |
285 |
|
286 | /** This filter is documented in wp-includes/cron.php */ |
287 | $event = apply_filters( 'schedule_event', $event ); |
288 |
|
289 | // A plugin disallowed this event. |
290 | if ( ! $event ) { |
291 | if ( $wp_error ) { |
292 | return new WP_Error( |
293 | 'schedule_event_false', |
294 | __( 'A plugin disallowed this event.' ) |
295 | ); |
296 | } |