|
@@ -233,14 +233,11 @@ function gwp24_remove_adminbar( $wp_admin_bar ) {
|
|
|
$wp_admin_bar->remove_node( 'view-site' );
|
|
|
}
|
|
|
|
|
|
-add_filter( 'admin_bar_menu', 'gwp24_replace_wordpress_howdy', 25 );
|
|
|
-function gwp24_replace_wordpress_howdy( $wp_admin_bar ) {
|
|
|
- $account = $wp_admin_bar->get_node('my-account');
|
|
|
- $newtext = str_replace( 'Howdy,', '', $account->title );
|
|
|
- $wp_admin_bar->add_node( array(
|
|
|
- 'id' => 'my-account',
|
|
|
- 'title' => $newtext,
|
|
|
- ));
|
|
|
+add_filter( 'gettext', 'gwp24_change_howdy_text', 10, 2 );
|
|
|
+function gwp24_change_howdy_text( $translation, $original ) {
|
|
|
+ if( 'Howdy, %1$s' == $original )
|
|
|
+ $translation = '%1$s';
|
|
|
+ return $translation;
|
|
|
}
|
|
|
/* for email */
|
|
|
add_filter( 'gettext', 'gwp24_change_howdy_text', 10, 2 );
|