Support » Plugin: Disable Blogging in WordPress » “Howdy,” greeting

  • Resolved Maël Conan

    (@maelconan)


    Hi,

    First, I would like to thank you for your helpful plugin.

    I just see that the “‘Howdy,’ greeting” not work with languages other than the default “en_US” (in French it’s “Salutations,” and in English (en_GB) it’s “How are you,”)..
    Before your plugin I usually use this piece of code to remove this greeting (It’s more bully than yours :))

    
    function remove_howdy_fn( $wp_admin_bar ) {
        $user_id = get_current_user_id();
        $current_user = wp_get_current_user();
        $profile_url = get_edit_profile_url( $user_id );
    
        if( 0 != $user_id ) {
            $avatar = get_avatar( $user_id, 28 );
            $class = empty( $avatar ) ? '' : 'with-avatar';
    
            $wp_admin_bar->add_menu( array(
                'id' => 'my-account',
                'parent' => 'top-secondary',
                'title' => $current_user->display_name . $avatar,
                'href' => $profile_url,
                'meta' => array(
                    'class' => $class,
                ),
            ) );
        }
    }
    add_filter( 'admin_bar_menu', 'remove_howdy_fn', 11 );
    

    (Note : This has not been tested on an interface other than the current)

    Make it what you want it was just to contribute 😉

Viewing 1 replies (of 1 total)
  • Plugin Author Fact Maven

    (@factmaven)

    Excellent work! This is very helpful on an international level. Thank you very much. This will definitely be incorporated in the next update with credits to you.

Viewing 1 replies (of 1 total)
  • The topic ‘“Howdy,” greeting’ is closed to new replies.