mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
We don't need to do this if the user isn't logged in.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a38314000b
commit
96b942e891
@ -14,6 +14,7 @@ class WP_Admin_Bar {
|
||||
$this->user = new stdClass;
|
||||
$this->menu = new stdClass;
|
||||
|
||||
if ( is_user_logged_in() ) {
|
||||
/* Populate settings we need for the menu based on the current user. */
|
||||
$this->user->blogs = get_blogs_of_user( get_current_user_id() );
|
||||
if ( is_multisite() ) {
|
||||
@ -26,6 +27,7 @@ class WP_Admin_Bar {
|
||||
$this->user->account_domain = $this->user->domain;
|
||||
}
|
||||
$this->user->locale = get_locale();
|
||||
}
|
||||
|
||||
add_action( 'wp_head', 'wp_admin_bar_header' );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user