wp_doing_cron

函数


wp_doing_cron ( No parameters )
返回值
  • (bool) True if it’s a WordPress cron request, false otherwise.
定义位置
  • wp-includes/load.php
    , line 1567
引入
4.8.0
弃用

Determines whether the current request is a WordPress cron request.

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