Posted By

shufflepath on 03/07/12


Tagged

php wordpress


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

OverTheRainbow


Replace “Howdy, admin” in WordPress admin bar


 / Published in: PHP
 

  1. function replace_howdy( $wp_admin_bar ) {
  2. $my_account=$wp_admin_bar->get_node('my-account');
  3. $newtitle = str_replace( 'Howdy,', 'Logged in as', $my_account->title );
  4. $wp_admin_bar->add_node( array(
  5. 'id' => 'my-account',
  6. 'title' => $newtitle,
  7. ) );
  8. }
  9. add_filter( 'admin_bar_menu', 'replace_howdy',25 );

Report this snippet  

You need to login to post a comment.