bp_get_displayed_user_username()
Get the username of the displayed user.
Description
Return
(string)
Source
File: bp-members/bp-members-template.php
function bp_get_displayed_user_username() { $bp = buddypress(); if ( bp_displayed_user_id() ) { $username = bp_core_get_username( bp_displayed_user_id(), $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ); } else { $username = ''; } /** * Filters the username of the displayed user. * * @since BuddyPress 1.2.0 * * @param string $username Username of the displayed user. */ return apply_filters( 'bp_get_displayed_user_username', $username ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.2.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.