|
@@ -85,15 +85,13 @@ function uhp24_footer_filter ($default) {
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
-add_filter( 'admin_bar_menu', 'uhp24_replace_wordpress_howdy', 25 );
|
|
|
-function uhp24_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', 'uhp24_change_howdy', 10, 3);
|
|
|
+function uhp24_change_howdy($translated, $text, $domain) {
|
|
|
+ if (false !== strpos($translated, 'Howdy,'))
|
|
|
+ return str_replace('Howdy,', '', $translated);
|
|
|
+ return $translated;
|
|
|
}
|
|
|
+
|
|
|
/* for email */
|
|
|
add_filter( 'gettext', 'uhp24_change_howdy_text', 10, 2 );
|
|
|
function uhp24_change_howdy_text( $translation, $original ) {
|