WordPress.org

Make WordPress Core

Changeset 19284


Ignore:
Timestamp:
11/14/11 21:35:44 (3 years ago)
Author:
nacin
Message:

Don't use $user_identity global. props duck_. fixes #19146.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r18982 r19284  
    1313// In case admin-header.php is included in a function. 
    1414global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, $is_iphone, 
    15     $user_identity, $current_site, $update_title, $total_update_count, $parent_file; 
     15    $current_site, $update_title, $total_update_count, $parent_file; 
    1616 
    1717get_admin_page_title(); 
  • trunk/wp-includes/admin-bar.php

    r19265 r19284  
    135135 */ 
    136136function wp_admin_bar_my_account_menu( $wp_admin_bar ) { 
    137     global $user_identity; 
    138  
    139137    $user_id      = get_current_user_id(); 
    140138    $current_user = wp_get_current_user(); 
     
    142140 
    143141    if ( 0 != $user_id ) { 
    144         /* Add the 'My Account' menu */ 
     142        /* Add the "My Account" menu */ 
    145143        $avatar = get_avatar( $user_id, 28 ); 
    146         $howdy  = sprintf( __('Howdy, %1$s'), $user_identity ); 
     144        $howdy  = sprintf( __('Howdy, %1$s'), $current_user->display_name ); 
    147145        $class  = empty( $avatar ) ? '' : 'with-avatar'; 
    148146 
  • trunk/wp-includes/comment-template.php

    r18633 r19284  
    15091509 */ 
    15101510function comment_form( $args = array(), $post_id = null ) { 
    1511     global $user_identity, $id; 
     1511    global $id; 
    15121512 
    15131513    if ( null === $post_id ) 
     
    15171517 
    15181518    $commenter = wp_get_current_commenter(); 
     1519    $user = wp_get_current_user(); 
     1520    $user_identity = ! empty( $user->ID ) ? $user->display_name : ''; 
    15191521 
    15201522    $req = get_option( 'require_name_email' ); 
Note: See TracChangeset for help on using the changeset viewer.