Return to Snippet

Revision: 56066
at March 7, 2012 14:54 by shufflepath


Initial Code
function replace_howdy( $wp_admin_bar ) {
    $my_account=$wp_admin_bar->get_node('my-account');
    $newtitle = str_replace( 'Howdy,', 'Logged in as', $my_account->title );
    $wp_admin_bar->add_node( array(
        'id' => 'my-account',
        'title' => $newtitle,
    ) );
}
add_filter( 'admin_bar_menu', 'replace_howdy',25 );

Initial URL

                                

Initial Description

                                

Initial Title
Replace “Howdy, admin” in WordPress admin bar

Initial Tags
php, wordpress

Initial Language
PHP