WordPress.org

Make WordPress Core

Changeset 44608


Ignore:
Timestamp:
01/16/2019 02:53:15 AM (22 months ago)
Author:
pento
Message:

Admin Bar: Set the Admin Bar to not be showing on REST API requests.

Props ayeshrajans.
Fixes #45727.

File:
1 edited

Legend:

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

    r44586 r44608  
    11371137
    11381138    // For all these types of requests, we never want an admin bar.
    1139     if ( defined( 'XMLRPC_REQUEST' ) || defined( 'DOING_AJAX' ) || defined( 'IFRAME_REQUEST' ) ) {
     1139    if ( defined( 'XMLRPC_REQUEST' ) || defined( 'DOING_AJAX' ) || defined( 'IFRAME_REQUEST' ) || wp_is_json_request() ) {
    11401140        return false;
    11411141    }
Note: See TracChangeset for help on using the changeset viewer.