angeljs

Replace the Wordpress “Howdy" greeting

Mar 27th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. //Replace 'Howdy' greeting from Wordpress header - By https://bizweb.biz
  2. function replace_howdy( $wp_admin_bar ) {
  3. $my_account=$wp_admin_bar->get_node('my-account');
  4. $newtitle = str_replace( 'Howdy,', 'Logged in as', $my_account->title );
  5. $wp_admin_bar->add_node( array(
  6. 'id' => 'my-account',
  7. 'title' => $newtitle,
  8. ) );
  9. }
  10. add_filter( 'admin_bar_menu', 'replace_howdy',25 );
  11. //End replace 'Howdy' greeting from Wordpress header - By https://bizweb.biz
Advertisement
Add Comment
Please, Sign In to add comment