wp_doing_ajax filter-hookWP 4.7.0

Filters whether the current request is a WordPress Ajax request.

Usage

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.

Changelog

Since 4.7.0 Introduced.

Where the hook is called

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

Where the hook is used in WordPress

Usage not found.