get_schedule
Filters the schedule name for a hook.
Использование
add_filter( 'get_schedule', 'wp_kama_get_schedule_filter', 10, 3 ); /** * Function for `get_schedule` filter-hook. * * @param string|false $schedule Schedule for the hook. False if not found. * @param string $hook Action hook to execute when cron is run. * @param array $args Arguments to pass to the hook's callback function. * * @return string|false */ function wp_kama_get_schedule_filter( $schedule, $hook, $args ){ // filter... return $schedule; }
- $schedule(строка|false)
- Schedule for the hook. False if not found.
- $hook(строка)
- Action hook to execute when cron is run.
- $args(массив)
- Arguments to pass to the hook's callback function.
Список изменений
С версии 5.1.0 | Введена. |
Где вызывается хук
get_schedule
wp-includes/cron.php 1149
return apply_filters( 'get_schedule', $schedule, $hook, $args );