wp_next_scheduled
Filters the timestamp of the next scheduled event for the given hook.
Использование
add_filter( 'wp_next_scheduled', 'wp_kama_next_scheduled_filter', 10, 3 ); /** * Function for `wp_next_scheduled` filter-hook. * * @param int $timestamp Unix timestamp (UTC) for when to next run the event. * @param object $next_event An object containing an event's data. * @param $args * * @return int */ function wp_kama_next_scheduled_filter( $timestamp, $next_event, $args ){ // filter... return $timestamp; }
- $timestamp(int)
- Unix timestamp (UTC) for when to next run the event.
- $next_event(объект)
An object containing an event's data.
-
hook(строка)
Action hook of the event. -
timestamp(int)
Unix timestamp (UTC) for when to next run the event. -
schedule(строка)
How often the event should subsequently recur. -
args(массив)
Array containing each separate argument to pass to the hook callback function. - interval(int)
Optional. The interval time in seconds for the schedule. Only present for recurring events.
-
- $args
- -
Список изменений
С версии 6.8.0 | Введена. |
Где вызывается хук
wp_next_scheduled
wp-includes/cron.php 859
return apply_filters( 'wp_next_scheduled', $next_event->timestamp, $next_event, $hook, $args );