add_action( 'admin_bar_menu', 'voodoo_welcome_swap', 11 );
function voodoo_welcome_swap( $wp_admin_bar ) {
$user_id = get_current_user_id();
$current_user = wp_get_current_user();
$profile_url = get_edit_profile_url( $user_id );
if ( 0 != $user_id ) {
$avatar = get_avatar( $user_id, 28 );
$howdy = sprintf( __('Hey Hoser, %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,
),
) );
}
}
This in functions.php or a functionality plugin should do it just fine..
Just swap ‘Hey Hoser’ to what you need!
I’ve had it in place for a bit on my test site, works fine on 3.4 front and back end.
–EDIT –I have no idea why you would run into trouble between the front/back ends … the admin toolbar is the exact same front or back. If it’s changed on one it should be on the other
A plugin may only be checking if they’re on the admin side.
Heh, I guess that makes sense eh! – I don’t think so well first thing Monday morning!
I have since REdownloaded my site in french who’s translation of howdy is Salutations. That works for me