mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Remove WP_SHOW_ADMIN_BAR and go off existing and new defines on page type. See #15315
git-svn-id: https://develop.svn.wordpress.org/trunk@16221 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -328,13 +328,17 @@ function wp_admin_body_style() {
|
||||
*/
|
||||
function is_admin_bar_showing() {
|
||||
global $show_admin_bar;
|
||||
|
||||
/* For all these types of request we never want an admin bar period */
|
||||
if ( defined('XMLRPC_REQUEST') || defined('APP_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') )
|
||||
return false;
|
||||
|
||||
if ( ! isset( $show_admin_bar ) || null === $show_admin_bar ) {
|
||||
$show_admin_bar = true;
|
||||
|
||||
if ( defined('WP_SHOW_ADMIN_BAR') )
|
||||
$show_admin_bar = (bool) WP_SHOW_ADMIN_BAR;
|
||||
else if ( ! is_user_logged_in() || ( is_admin() && ! is_multisite() ) )
|
||||
if ( ! is_user_logged_in() || ( is_admin() && ! is_multisite() ) ) {
|
||||
$show_admin_bar = false;
|
||||
} else {
|
||||
$show_admin_bar = true;
|
||||
}
|
||||
}
|
||||
|
||||
$show_admin_bar = apply_filters( 'show_admin_bar', $show_admin_bar );
|
||||
|
||||
Reference in New Issue
Block a user