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