Replace “Howdy” in WordPress 3.3+ Admin Bar
<?php
// replace WordPress Howdy in WordPress 3.3
function replace_howdy( $wp_admin_bar ) {
$my_account=$wp_admin_bar->get_node('my-account');
$newtitle = str_replace( 'Howdy,', 'Logged in as', $my_account->title );
$wp_admin_bar->add_node( array(
'id' => 'my-account',
'title' => $newtitle,
) );
}
add_filter( 'admin_bar_menu', 'replace_howdy',25 );
?>
Instructions:
As previous methods for replacing “Howdy” in the WordPress backend don’t work with the new admin bar in WordPress 3.3 any more, here’s a short snippet that does.
This needs to be dropped into your theme’s functions.php file.
Related links:
http://www.redbridgenet.com/wordpress/how-to-replace-or-remove-wordpress-howdy/http://wpdevel.wordpress.com/2011/12/07/admin-bar-api-changes-in-3-3/