mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-04 18:01:42 +01:00
If someone has defined WP_SHOW_ADMIN_BAR it wins period. Otherwise we break for things like XMLRPC which disable this always. See #14772.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
693c1f6f60
commit
e7ee7a2eaa
@ -241,17 +241,12 @@ function wp_admin_body_style() {
|
|||||||
*/
|
*/
|
||||||
function is_admin_bar_showing() {
|
function is_admin_bar_showing() {
|
||||||
global $show_admin_bar;
|
global $show_admin_bar;
|
||||||
|
|
||||||
if ( ! isset( $show_admin_bar ) || null === $show_admin_bar ) {
|
if ( ! isset( $show_admin_bar ) || null === $show_admin_bar ) {
|
||||||
$show_admin_bar = true;
|
$show_admin_bar = true;
|
||||||
|
|
||||||
if ( defined('WP_SHOW_ADMIN_BAR') )
|
if ( defined('WP_SHOW_ADMIN_BAR') )
|
||||||
$show_admin_bar = (bool) 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;
|
$show_admin_bar = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user