Make WordPress Core

Changeset 51744 for branches/5.5


Ignore:
Timestamp:
09/08/2021 05:22:43 PM (3 years ago)
Author:
SergeyBiryukov
Message:

General: Only use _jsonp_wp_die_handler() for JSONP REST API requests.

Props mdawaffe, peterwilsoncc.
Merges [51740] to the 5.5 branch.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

  • branches/5.5/src/wp-includes/functions.php

    r49453 r51744  
    33503350         */
    33513351        $function = apply_filters( 'wp_die_json_handler', '_json_wp_die_handler' );
    3352     } elseif ( wp_is_jsonp_request() ) {
     3352    } elseif ( defined( 'REST_REQUEST' ) && REST_REQUEST && wp_is_jsonp_request() ) {
    33533353        /**
    3354          * Filters the callback for killing WordPress execution for JSONP requests.
     3354         * Filters the callback for killing WordPress execution for JSONP REST requests.
    33553355         *
    33563356         * @since 5.2.0
Note: See TracChangeset for help on using the changeset viewer.