wp_is_json_request


wp_is_json_request ( No parameters )

Returns:
  • (bool) True if `Accepts` or `Content-Type` headers contain `application/json`. False otherwise.
Defined at:

Description

Checks whether current request is a JSON request, or is expecting a JSON response.

Related Functions

wp_is_jsonp_request, wp_is_xml_request, wp_favicon_request, wp_is_serving_rest_request, wp_get_user_request

Top Google Results

User discussions

wpseek mobile