wpseek.com
WordPress开发者和主题制作者的搜索引擎
wp_is_serving_rest_request › WordPress Function
Since6.5.0
已弃用n/a
› wp_is_serving_rest_request ( 没有参数 )
返回: |
|
定义在: |
|
文档: |
Determines whether WordPress is currently serving a REST API request.
The function relies on the 'REST_REQUEST' global. As such, it only returns true when an actual REST request is being made. It does not return true when a REST endpoint is hit as part of another request, e.g. for preloading a REST response. See {@see} for that purpose. This function should not be called until the {@see 'parse_request'} action, as the constant is only defined then, even for an actual REST request.Related Functions: wp_is_json_request, wp_safe_remote_request, wp_is_jsonp_request, wp_send_user_request, wp_get_user_request