gettext for ‘Howdy’ broken after update to 6.1
-
For a few sites, the clients like to change the ‘Howdy’ greeting on the admin toolbar to ‘Welcome’.
I have always done this like this:
function pioneervalley_replace_howdy( $text ) { $newtext = 'Welcome'; if ( is_user_logged_in() ) { $text = str_replace( 'Howdy', $newtext, $text ); } return $text; } add_filter( 'gettext', 'pioneervalley_replace_howdy' );
`
But, after updating to WP6.1, we experienced a major issue on a site when uses are logged in. Removing above resolves the problem.
The issue is a major impact of the server resources and finally an error:
Allowed memory size of 805306368 bytes exhausted (tried to allocate 262144 bytes) in /path/thesite.com/path/wp-includes/class-wp-hook.php on line 292
Line 292:
$this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
So, what should we now be using?
I have lots of files (debug logs, stack traces, etc.) from the server folks who ran some tests today to help isolate this issue and to better understand it.
Simple removing this function from the twentysixteen child theme resolves the matter fully, but, as noted, the clients want the ‘Howdy’ to be ‘Welcome’. I do not want to use a plugin for this.
- The topic ‘gettext for ‘Howdy’ broken after update to 6.1’ is closed to new replies.