We don't need to do this if the user isn't logged in.
git-svn-id: https://develop.svn.wordpress.org/trunk@18688 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cc5c326c37
commit
44821916ca
@ -14,6 +14,7 @@ class WP_Admin_Bar {
|
|||||||
$this->user = new stdClass;
|
$this->user = new stdClass;
|
||||||
$this->menu = new stdClass;
|
$this->menu = new stdClass;
|
||||||
|
|
||||||
|
if ( is_user_logged_in() ) {
|
||||||
/* Populate settings we need for the menu based on the current user. */
|
/* Populate settings we need for the menu based on the current user. */
|
||||||
$this->user->blogs = get_blogs_of_user( get_current_user_id() );
|
$this->user->blogs = get_blogs_of_user( get_current_user_id() );
|
||||||
if ( is_multisite() ) {
|
if ( is_multisite() ) {
|
||||||
@ -26,6 +27,7 @@ class WP_Admin_Bar {
|
|||||||
$this->user->account_domain = $this->user->domain;
|
$this->user->account_domain = $this->user->domain;
|
||||||
}
|
}
|
||||||
$this->user->locale = get_locale();
|
$this->user->locale = get_locale();
|
||||||
|
}
|
||||||
|
|
||||||
add_action( 'wp_head', 'wp_admin_bar_header' );
|
add_action( 'wp_head', 'wp_admin_bar_header' );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user