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