wp_doing_cron
Filters whether the current request is a WordPress cron request.
Usage
add_filter( 'wp_doing_cron', 'wp_kama_doing_cron_filter' );
/**
* Function for `wp_doing_cron` filter-hook.
*
* @param bool $wp_doing_cron Whether the current request is a WordPress cron request.
*
* @return bool
*/
function wp_kama_doing_cron_filter( $wp_doing_cron ){
// filter...
return $wp_doing_cron;
}
- $wp_doing_cron(true|false)
- Whether the current request is a WordPress cron request.
Changelog
| Since 4.8.0 | Introduced. |
Where the hook is called
wp_doing_cron
wp-includes/load.php 1789
return apply_filters( 'wp_doing_cron', defined( 'DOING_CRON' ) && DOING_CRON );