Replace WordPress Howdy with something else

jdunhin

New member
Joined
Feb 27, 2013
Messages
93
Points
0
Hi, hope this little code help someone. I did not test it on all Wordpress Versions but it works on the latest one.

PHP:
function goodbye_howdy ( $wp_admin_bar ) {
    $avatar = get_avatar( get_current_user_id(), 16 );
    if ( ! $wp_admin_bar->get_node( 'my-account' ) )
        return;
    $wp_admin_bar->add_node( array(
        'id' => 'my-account',
        'title' => sprintf( 'Your custom text here, %s', wp_get_current_user()->display_name ) . $avatar,
    ) );
}
add_action( 'admin_bar_menu', 'goodbye_howdy' );
 
Older threads
Replies
2
Views
3,503
Replies
6
Views
2,786
S
Replies
1
Views
3,262
Newer threads
Latest threads
Replies
0
Views
1
Replies
1
Views
2
Replies
2
Views
9
Replies
0
Views
15
Recommended threads
Replies
6
Views
3,368
Replies
2
Views
3,240
Replies
3
Views
1,555
Replies
15
Views
4,570
Replies
6
Views
2,345

Referral contests

Referral link for :

Sponsors

Latest Blog ArticlesMost Viewed Threads

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top