wp_doing_ajax

The timeline below displays how wordpress function wp_doing_ajax has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.7

/**
 * Determines whether the current request is a WordPress Ajax request.
 *
 * @since 4.7.0
 *
 * @return bool True if it's a WordPress Ajax request, false otherwise.
 */
function wp_doing_ajax()
{
    /**
     * Filters whether the current request is a WordPress Ajax request.
     *
     * @since 4.7.0
     *
     * @param bool $wp_doing_ajax Whether the current request is a WordPress Ajax request.
     */
    return apply_filters('wp_doing_ajax', defined('DOING_AJAX') && DOING_AJAX);
}