Summery Summery
Checks whether current request is an XML request, or is expecting an XML response.
Syntax Syntax
Return Return
(bool) True if Accepts or Content-Type headers contain text/xml or one of the related MIME types. False otherwise.
Source Source
File: wp-includes/load.php
return false;
}
/**
* Checks whether current request is a JSONP request, or is expecting a JSONP response.
*
* @since 5.2.0
*
* @return bool True if JSONP request, false otherwise.
*/
function wp_is_jsonp_request() {
if ( ! isset( $_GET['_jsonp'] ) ) {
return false;
}
if ( ! function_exists( 'wp_check_jsonp_callback' ) ) {
require_once ABSPATH . WPINC . '/functions.php';
}
$jsonp_callback = $_GET['_jsonp'];
if ( ! wp_check_jsonp_callback( $jsonp_callback ) ) {
return false;
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |