WordPress at Your Fingertips

wp_doing_cron() WP 1.0

Determines whether the current request is a WordPress cron request.

1 time — 0.000021 sec (very fast) | 50000 times — 0.12 sec (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 5.7.2

<?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 );
}

From tag: Conditional tags (page type and request)

More from tag: Conditional tags (all)

More from category: Cron API

No comments
    Log In