Skip to content

Instantly share code, notes, and snippets.

@chuckreynolds
Created May 28, 2013 03:58
Show Gist options
  • Save chuckreynolds/5660443 to your computer and use it in GitHub Desktop.
Save chuckreynolds/5660443 to your computer and use it in GitHub Desktop.
Replace "Howdy" text in WordPress admin bar
function _straps_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', '_straps_replace_howdy' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment