Skip to content

Commit ca4765c

Browse files
General: Only use _jsonp_wp_die_handler() for JSONP REST API requests.
Props mdawaffe, peterwilsoncc. git-svn-id: https://develop.svn.wordpress.org/trunk@51740 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 4f4c344 commit ca4765c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wp-includes/functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3557,9 +3557,9 @@ function wp_die( $message = '', $title = '', $args = array() ) {
35573557
* @param callable $function Callback function name.
35583558
*/
35593559
$function = apply_filters( 'wp_die_json_handler', '_json_wp_die_handler' );
3560-
} elseif ( wp_is_jsonp_request() ) {
3560+
} elseif ( defined( 'REST_REQUEST' ) && REST_REQUEST && wp_is_jsonp_request() ) {
35613561
/**
3562-
* Filters the callback for killing WordPress execution for JSONP requests.
3562+
* Filters the callback for killing WordPress execution for JSONP REST requests.
35633563
*
35643564
* @since 5.2.0
35653565
*

0 commit comments

Comments
 (0)