"howdy" hook

  1. prw


    please god give us a hook for the "howdy, <username>" on the top bar. Its easy enough to edit the core but that defeats the purpose of hooks.

    Posted: 9 years ago #
  2. Jeff Chandler

    Pretty sure there are a few different plugins that either remove or change hello dolly to something else.

    Posted: 9 years ago #
  3. Jen

    @jeffr0: He's talking about the Howdy before the username in the upper right, not the hello dolly plugin.

    Posted: 9 years ago #
  4. Stephanie Leary

    I believe this method can be used to change any of the built-in strings, including that one.

    Posted: 9 years ago #
  5. Andrea Rennick


    But as Ohz points out, he had to load up the whole jQuery library to hide it.

    Posted: 9 years ago #
  6. Aaron Jorbin

    The method that Stephanie points out is the best route. All you have to do is change the $text variable to match the string used. For example if you wanted to change Howdy to Hello, you would use:

    class PJW_Translation_Mangler {
     * Filter the translation string before it is displayed.
     * @param $translation The current translation
     * @param $text The text being translated
     * @param $context The context for the translation
     * @param $domain The domain for the translation
     * @return string The translated / filtered text.
     function filter_gettext($translation, $text, $domain) {
      $translations = &get_translations_for_domain( $domain );
      if ( $text == 'Howdy, <a href="%1$s" title="Edit your profile">%2$s</a>' ) {
       return $translations->translate( 'Hello, <a href="%1$s" title="Edit your profile">%2$s</a>' );
      return $translation;
    add_filter('gettext', array('PJW_Translation_Mangler', 'filter_gettext'), 10, 4);
    Posted: 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    6 Votes
  • Status

    This idea is under consideration