roles as $role ) { $alt_i++; $key = $role['name']; $setting_exists = !empty( $admin_bar_settings[$key] ); $alt_class = ( ( $alt_i%2 == 0 ) ? ' class="alternate"' : '' ); echo' '; } ?>
'.translate_user_role($key).'

ID != 0 ) { $my_account_main = $wp_admin_bar->get_node('my-account'); $new_title1 = str_replace($current_user->display_name, $current_user->user_email, $my_account_main->title); $wp_admin_bar->add_node(array('id' => 'my-account', 'title' => $new_title1)); $my_account_sub = $wp_admin_bar->get_node('user-info'); $wp_admin_bar->add_node(array('parent' => 'user-actions', 'id' => 'user-info', 'title' => get_avatar($current_user->ID, 64) . "{$current_user->user_email}", 'href' => get_edit_profile_url($current_user->ID), 'meta' => array('tabindex' => -1))); } } return $wp_admin_bar; } add_filter( 'admin_bar_menu', 'wppb_replace_username_on_admin_bar', 25 );