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:
parent
d17f4409c3
commit
30ff37104d
|
@ -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 ) );
|
||||
|
|
|
@ -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'" : '' );
|
||||
|
|
Loading…
Reference in New Issue