add a class to account avatar in admin bar
-
Hi,
could anyone tell me how I can add a class to the avatar shown in the adminbar? I found this code in adminbar.php:
$avatar = get_avatar( $user_id, 16 ); $howdy = sprintf( __('Howdy, %1$s'), $current_user->display_name ); $class = empty( $avatar ) ? '' : 'with-avatar'; $wp_admin_bar->add_menu( array( 'id' => 'my-account', 'parent' => 'top-secondary', 'title' => $howdy . $avatar, 'href' => $profile_url, 'meta' => array( 'class' => $class, 'title' => __('My Account'), ), ) );
Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘add a class to account avatar in admin bar’ is closed to new replies.