Replace WordPress Howdy with something else

jdunhin

Active member
Registered
Joined
Feb 27, 2013
Messages
72
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,296
S
Replies
1
Views
3,218
Replies
0
Views
1,981
Newer Threads
Replies
4
Views
3,833
Replies
3
Views
3,632
Replies
3
Views
3,149
Replies
0
Views
3,095
Latest Threads
Replies
0
Views
50
Replies
0
Views
83
Replies
1
Views
98
Replies
1
Views
107
Recommended Threads
Replies
5
Views
2,830
Replies
1
Views
1,912
Replies
22
Views
8,918

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

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