wp_doing_cron() WP 1.0
Determines whether the current request is a WordPress cron request.
1 time = 0.000021s = very fast | 50000 times = 0.12s = very fast | PHP 7.1.2, WP 4.8
Hooks from the function
Return
true/false. True if it's a WordPress cron request, false otherwise.
Usage
wp_doing_cron();
Changelog
Since 4.8.0 | Introduced. |
Code of wp_doing_cron() wp doing cron WP 5.6
function wp_doing_cron() {
/**
* Filters whether the current request is a WordPress cron request.
*
* @since 4.8.0
*
* @param bool $wp_doing_cron Whether the current request is a WordPress cron request.
*/
return apply_filters( 'wp_doing_cron', defined( 'DOING_CRON' ) && DOING_CRON );
}Related Functions
From tag: Conditional tags (page type and request)
- is_404()
- is_admin()
- is_archive()
- is_attachment()
- is_author()
- is_blog_admin()
- is_category()
- is_comment_feed()
- is_customize_preview()
- is_date()
- is_day()
- is_embed()
More from tag: Conditional tags (all)
- cat_is_ancestor_of()
- comments_open()
- email_exists()
- has_category()
- has_custom_header()
- has_excerpt()
- has_nav_menu()
- has_post_thumbnail()
- has_shortcode()
- has_tag()
- has_term()
- have_comments()
- have_posts()
- in_category()
- in_the_loop()
- is_active_sidebar()