wp_doing_ajax
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-includes/load.php 1724
return apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' ) && DOING_AJAX );