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 |
|---|---|
| 134 | * An object containing an event's data. |
| 135 | * |
| 136 | * @type string $hook Action hook to execute when the event is run. |
| 137 | * @type int $timestamp Unix timestamp (UTC) for when to next run the event. |
| 138 | * @type string|false $schedule How often the event should subsequently recur. |
| 139 | * @type array $args Array containing each separate argument to pass to the hook's callback function. |
| 140 | * @type int $interval The interval time in seconds for the schedule. Only present for recurring events. |
| 141 | * } |
| 142 | */ |
| 143 | $event = apply_filters( 'schedule_event', $event ); |
| 144 | |
| 145 | // A plugin disallowed this event |
| 146 | if ( ! $event ) { |
| 147 | return false; |
| 148 | } |
| 149 | |
| 150 | $crons[ $event->timestamp ][ $event->hook ][ $key ] = array( |
| 151 | 'schedule' => $event->schedule, |
| 152 | 'args' => $event->args, |
| Line | Code |
| 206 | ); |
| 207 | |
| 208 | /** This filter is documented in wp-includes/cron.php */ |
| 209 | $pre = apply_filters( 'pre_schedule_event', null, $event ); |
| 210 | if ( null !== $pre ) { |
| 211 | return $pre; |
| 212 | } |
| 213 | |
| 214 | /** This filter is documented in wp-includes/cron.php */ |
| 215 | $event = apply_filters( 'schedule_event', $event ); |
| 216 | |
| 217 | // A plugin disallowed this event |
| 218 | if ( ! $event ) { |
| 219 | return false; |
| 220 | } |
| 221 | |
| 222 | $key = md5( serialize( $event->args ) ); |
| 223 | |
| 224 | $crons = _get_cron_array(); |