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