WordPress at a glance

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 function:
Return

true/false. True if it's a WordPress cron request, false otherwise.

Usage

wp_doing_cron();

Code of wp_doing_cron: wp-includes/load.php VER 4.9.8

<?php
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)

More from tag: Conditional tags (all)

More from category: Cron API

No comments
    Hello, !     Log In . Register