From f2d2126d0d8d4c329141bbdbbd3f24a0f44e7d5c Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Wed, 16 Jan 2019 02:54:50 +0000 Subject: [PATCH] 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 --- wp-includes/admin-bar.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index cbb2fd32fb..412d42f571 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -1136,7 +1136,7 @@ function is_admin_bar_showing() { global $show_admin_bar, $pagenow; // 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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index ec16d1f816..02ce327bbf 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @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.