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