Skip to content

Instantly share code, notes, and snippets.

View rsharrer's full-sized avatar

Ryan Sharrer rsharrer

View GitHub Profile
@rsharrer
rsharrer / Replace “Howdy” in Admin Bar.php
Created September 26, 2013 14:00
Replace “Howdy” in Admin Bar
// 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 );