Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Changing the 'How are you' text in WordPress 4.1

Featured Replies

EDIT: Solved! Helps if you actually change the string to be edited in the code.....

 

I hadn't noticed this before, but the admin bar text in the WordPress dashboard now says 'How are you', instead of 'Howdy'. When did this change?

 

Anyway, I have always had a custom welcome script setup to show a more personalised message;

/* Change howdy text */
add_filter('gettext', 'roothost_change_howdy', 10, 3);

function roothost_change_howdy($translated, $text, $domain) {
$blogtime = current_time( 'mysql' ); 
list( $today_year, $today_month, $today_day, $hour, $minute, $second ) = split( '([^0-9])', $blogtime );
if ($hour <= 11){
$greet = "Good Morning";
}
if ($hour >= 12 && $hour <= 16){
$greet = "Good Afternoon";
}
if ($hour >= 17){
$greet = "Good Evening";
}
 if (!is_admin() || 'default' != $domain)
        return $translated;
 if (false !== strpos($translated, 'Howdy'))
        return str_replace('Howdy', $greet, $translated);
return $translated;
}
/* End howdy text */

This has always worked as expected.

 

Fast forward to this week, and I'm rebuilding my framework for a few new sites coming up in the next couple of weeks and noticed this is no longer working.

 

I have stripped everything else out completely, and even tried the snippet on a fresh install of wordpress with the twentyfifteen theme. Still no joy!

 

Presumably the hook, or filter has changed in recent versions.

 

Anybody have a solution?

 

Cheers!!

Edited by roothost

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.