Make WordPress Core

Changeset 51740


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

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

Props mdawaffe, peterwilsoncc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r51693 r51740  
    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
Note: See TracChangeset for help on using the changeset viewer.