wp_doing_cron() WordPress Function

The wp_doing_cron() function is used to schedule events in Wordpress. It allows for posts and comments to be published at a specified time, as well as for other tasks to be carried out automatically.

wp_doing_cron() #

Determines whether the current request is a WordPress cron request.


Return

(bool) True if it's a WordPress cron request, false otherwise.


Top ↑

Source

File: wp-includes/load.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 );
}


Top ↑

Changelog

Changelog
VersionDescription
4.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.