Don't use $user_identity global. props duck_. fixes #19146.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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'" : '' );
|
||||
|
||||
Reference in New Issue
Block a user