wp_doing_ajax хук-фильтрWP 4.7.0

Filters whether the current request is a WordPress Ajax request.

Использование

add_filter( 'wp_doing_ajax', 'wp_kama_doing_ajax_filter' );

/**
 * Function for `wp_doing_ajax` filter-hook.
 * 
 * @param bool $wp_doing_ajax Whether the current request is a WordPress Ajax request.
 *
 * @return bool
 */
function wp_kama_doing_ajax_filter( $wp_doing_ajax ){

	// filter...
	return $wp_doing_ajax;
}
$wp_doing_ajax(true|false)
Whether the current request is a WordPress Ajax request.

Список изменений

С версии 4.7.0 Введена.

Где вызывается хук

wp_doing_ajax()
wp_doing_ajax
wp-includes/load.php 1704
return apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' ) && DOING_AJAX );

Где используется хук в WordPress

Использование не найдено.