mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
Admin Bar: Set the Admin Bar to not be showing on REST API requests.
Props ayeshrajans. Fixes #45727. git-svn-id: https://develop.svn.wordpress.org/trunk@44608 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
99bcf2719b
commit
c2862a404e
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user