Welcome User Msg in Admin Nav Bar

function add_welcome() {
global $current_user;
get_currentuserinfo();
$author = $current_user->display_name;
if ( is_user_logged_in() ) {
echo "<li class="welcome">" . bp_author_avatar() . "Welcome <strong>" . $author . "</strong></li>";
} else {
echo "<li class="welcome">Welcome <strong>Guest</strong></li>";
}
}

add_action( 'bp_adminbar_menus', 'add_welcome', 15 );

0 Comments

You must be logged in to post a comment.