diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 2c14a9225..6f2d56b72 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -12,7 +12,7 @@ if ( ! defined( 'WP_ADMIN' ) ) // In case admin-header.php is included in a function. global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, $is_iphone, - $user_identity, $current_site, $update_title, $total_update_count, $parent_file; + $current_site, $update_title, $total_update_count, $parent_file; get_admin_page_title(); $title = esc_html( strip_tags( $title ) ); diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index f7f74f1d1..daa950188 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -134,16 +134,14 @@ function wp_admin_bar_wp_menu( $wp_admin_bar ) { * @since 3.1.0 */ function wp_admin_bar_my_account_menu( $wp_admin_bar ) { - global $user_identity; - $user_id = get_current_user_id(); $current_user = wp_get_current_user(); $profile_url = get_edit_profile_url( $user_id ); if ( 0 != $user_id ) { - /* Add the 'My Account' menu */ + /* Add the "My Account" menu */ $avatar = get_avatar( $user_id, 28 ); - $howdy = sprintf( __('Howdy, %1$s'), $user_identity ); + $howdy = sprintf( __('Howdy, %1$s'), $current_user->display_name ); $class = empty( $avatar ) ? '' : 'with-avatar'; $wp_admin_bar->add_menu( array( diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index f113122ef..25f73c3d9 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -1508,7 +1508,7 @@ function wp_list_comments($args = array(), $comments = null ) { * @return void */ function comment_form( $args = array(), $post_id = null ) { - global $user_identity, $id; + global $id; if ( null === $post_id ) $post_id = $id; @@ -1516,6 +1516,8 @@ function comment_form( $args = array(), $post_id = null ) { $id = $post_id; $commenter = wp_get_current_commenter(); + $user = wp_get_current_user(); + $user_identity = ! empty( $user->ID ) ? $user->display_name : ''; $req = get_option( 'require_name_email' ); $aria_req = ( $req ? " aria-required='true'" : '' );