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

Props ayeshrajans.
Fixes #45727.


Built from https://develop.svn.wordpress.org/trunk@44608


git-svn-id: http://core.svn.wordpress.org/trunk@44439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2019-01-16 02:54:50 +00:00
parent 4bb472ac32
commit f2d2126d0d
2 changed files with 2 additions and 2 deletions

View File

@ -1136,7 +1136,7 @@ function is_admin_bar_showing() {
global $show_admin_bar, $pagenow; global $show_admin_bar, $pagenow;
// For all these types of requests, we never want an admin bar. // For all these types of requests, we never want an admin bar.
if ( defined( 'XMLRPC_REQUEST' ) || defined( 'DOING_AJAX' ) || defined( 'IFRAME_REQUEST' ) ) { if ( defined( 'XMLRPC_REQUEST' ) || defined( 'DOING_AJAX' ) || defined( 'IFRAME_REQUEST' ) || wp_is_json_request() ) {
return false; return false;
} }

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.1-beta1-44607'; $wp_version = '5.1-beta1-44608';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.