|
@@ -118,14 +118,10 @@ function lps24_footer_filter ($default) {
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
-add_filter( 'admin_bar_menu', 'lps24_replace_wordpress_howdy', 25 );
|
|
|
-function lps24_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', 'lps24_replace_howdy', 10, 3);
|
|
|
+function lps24_replace_howdy($translated_text, $text, $domain) {
|
|
|
+ $new_message = str_replace('Howdy,', '', $text);
|
|
|
+ return $new_message;
|
|
|
}
|
|
|
|
|
|
add_filter( 'gettext', 'lps24_change_howdy_text', 10, 2 );
|