wp_doing_ajax

过滤钩子
apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' )
参数
  • (bool) $wp_doing_ajax Whether the current request is a WordPress Ajax request.
    Required:
定义位置
相关勾子
wp_doing_cronwp_admin_bar_classwp_loginwp_login_failedwp_admin_css
相关方法
wp_doing_ajaxwp_doing_cronwp_doc_link_parsewp_loginwp_login_urldoing_action
引入
4.7.0
弃用
-

过滤当前请求是否为WordPress Ajax请求。

return apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' ) && DOING_AJAX );