Created
December 19, 2018 16:37
-
-
Save landbryo/d4b6f7d15cdfecff2cd3f5f20de508e2 to your computer and use it in GitHub Desktop.
A function to change the "Howdy" in the WordPress dashboard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| ////////////////// | |
| // CHANGE HOWDY // | |
| ////////////////// | |
| function change_howdy( $wp_admin_bar ) { | |
| $my_account = $wp_admin_bar->get_node('my-account'); | |
| $newtext = str_replace( 'Howdy,', 'Hi,', $my_account->title ); | |
| $wp_admin_bar->add_node( array( | |
| 'id' => 'my-account', | |
| 'title' => $newtext, | |
| ) ); | |
| } | |
| add_filter( 'admin_bar_menu', 'change_howdy', 25 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment