bp_core_get_user_displayname( int|string|bool $user_id_or_username )
Fetch the display name for a user.
Parameters #Parameters
- $user_id_or_username
-
(int|string|bool) (Required) User ID or username.
Return #Return
(string|bool) The display name for the user in question, or false if user not found.
Source #Source
File: bp-members/bp-members-functions.php
function bp_core_get_user_displayname( $user_id_or_username ) { if ( empty( $user_id_or_username ) ) { return false; } if ( ! is_numeric( $user_id_or_username ) ) { $user_id = bp_core_get_userid( $user_id_or_username ); } else { $user_id = $user_id_or_username; } if ( empty( $user_id ) ) { return false; } /** * Filters the display name for the passed in user. * * @since 1.0.1 * * @param string $fullname Display name for the user. * @param int $user_id ID of the user to check. */ return apply_filters( 'bp_core_get_user_displayname', get_the_author_meta( 'display_name', $user_id ), $user_id ); }
Expand full source code Collapse full source code View on Trac
Related #Related
Uses #Uses
Uses | Description |
---|---|
bp-members/bp-members-functions.php: bp_core_get_user_displayname |
Filters the display name for the passed in user. |
bp-members/bp-members-functions.php: bp_core_get_userid() |
Return the user ID based on a user’s user_login. |
Used By #Used By
Used By | Description |
---|---|
bp-core/bp-core-avatars.php: bp_core_fetch_avatar() |
Get an avatar for a BuddyPress object. |
bp-core/classes/class-bp-email-recipient.php: BP_Email_Recipient::__construct() |
Constructor. |
bp-core/classes/class-bp-core-user.php: BP_Core_User::populate() |
Populate the instantiated class with data based on the User ID provided. |
bp-core/classes/class-bp-members-suggestions.php: BP_Members_Suggestions::get_suggestions() |
Find and return a list of username suggestions that match the query. |
bp-core/deprecated/1.5.php: groups_at_message_notification() |
Send an email and a BP notification on receipt of an @-mention in a group |
bp-core/bp-core-filters.php: bp_core_activation_signup_user_notification() |
Notify new users of a successful registration (without blog). |
bp-core/bp-core-template.php: bp_comment_author_avatar() |
Output a comment author’s avatar. |
bp-core/bp-core-template.php: bp_post_author_avatar() |
Output a post author’s avatar. |
bp-activity/classes/class-bp-activity-oembed-extension.php: BP_Activity_oEmbed_Extension::set_oembed_response_data() |
Sets the oEmbed response data for our activity item. |
bp-activity/classes/class-bp-activity-oembed-extension.php: BP_Activity_oEmbed_Extension::set_fallback_html() |
Sets a custom |
bp-activity/bp-activity-notifications.php: bp_activity_format_notifications() |
Format notifications related to activity. |
bp-activity/bp-activity-template.php: bp_get_mentioned_user_display_name() |
Returns the mentioned user display name. |
bp-activity/bp-activity-template.php: bp_get_activity_secondary_avatar() |
Return the avatar of the object that action was performed on. |
bp-activity/bp-activity-functions.php: bp_activity_at_message_notification() |
Send email and BP notifications when a user is mentioned in an update. |
bp-activity/bp-activity-functions.php: bp_activity_new_comment_notification() |
Send email and BP notifications when an activity item receives a comment. |
bp-blogs/bp-blogs-activity.php: bp_blogs_sync_add_from_activity_comment() |
Syncs activity comments and posts them back as blog comments. |
bp-settings/actions/general.php: bp_settings_action_general() |
Handles the changing and saving of user email addresses and passwords. |
bp-members/bp-members-blocks.php: bp_members_render_member_block() |
Callback function to render the BP Member Block. |
bp-members/bp-members-notifications.php: members_format_notifications() |
Notification formatting callback for bp-members notifications. |
bp-members/classes/class-bp-members-admin.php: BP_Members_Admin::user_admin_spammer_metabox() |
Render the fallback metabox in case a user has been marked as a spammer. |
bp-members/classes/class-bp-members-admin.php: BP_Members_Admin::user_admin_load() |
Set up the user’s profile admin page. |
bp-members/bp-members-filters.php: bp_members_invitations_get_registration_welcome_message() |
Provide a more-specific welcome message if the new user is accepting a network invitation. |
bp-members/bp-members-functions.php: bp_send_welcome_email() |
Send welcome email on successful user activation. |
bp-members/bp-members-functions.php: bp_core_get_userlink() |
Return a HTML formatted link for a user with the user’s full name as the link text. |
bp-members/bp-members-functions.php: bp_core_get_user_displaynames() |
Fetch the display name for a group of users. |
bp-templates/bp-nouveau/includes/messages/ajax.php: bp_nouveau_ajax_get_user_message_threads() | |
bp-messages/bp-messages-notifications.php: messages_format_notifications() |
Format notifications for the Messages component. |
bp-messages/bp-messages-functions.php: messages_notification_new_message() |
Email message recipients to alert them of a new unread private message. |
bp-messages/bp-messages-template.php: bp_get_the_thread_message_sender_name() |
Get the display name of the sender of the current message. |
bp-messages/bp-messages-template.php: bp_get_the_thread_message_sender_avatar_thumb() |
Get the avatar for the current message sender. |
bp-messages/bp-messages-template.php: bp_get_message_thread_avatar() |
Return the avatar for the last sender in the current message thread. |
bp-groups/bp-groups-notifications.php: groups_notification_new_membership_request() |
Notify group admin about new membership request. |
bp-groups/bp-groups-notifications.php: groups_format_notifications() |
Format notifications for the Groups component. |
bp-groups/classes/class-bp-groups-member-suggestions.php: BP_Groups_Member_Suggestions::get_suggestions() |
Find and return a list of username suggestions that match the query. |
bp-groups/bp-groups-template.php: bp_group_request_user_avatar_thumb() | |
bp-groups/bp-groups-template.php: bp_group_admin_memberlist() |
Since BuddyPress 1.0, this generated the group settings admin/member screen. |
bp-groups/bp-groups-template.php: bp_group_mod_memberlist() |
Generate the HTML for a list of group moderators. |
bp-groups/bp-groups-template.php: bp_get_group_creator_avatar() |
Return the avatar of the creator of the current group in the loop. |
bp-groups/bp-groups-template.php: bp_group_list_admins() |
Output markup listing group admins. |
bp-groups/bp-groups-template.php: bp_group_list_mods() |
Output markup listing group mod. |
bp-groups/bp-groups-template.php: bp_get_group_creator_username() |
Return the username of the creator of the current group in the loop. |
bp-xprofile/bp-xprofile-functions.php: xprofile_override_user_fullnames() |
Replace the displayed and logged-in users fullnames with the xprofile name, if required. |
bp-xprofile/classes/class-bp-xprofile-user-admin.php: BP_XProfile_User_Admin::user_admin_spammer_metabox() |
Render the fallback metabox in case a user has been marked as a spammer. |
bp-xprofile/bp-xprofile-activity.php: bp_xprofile_format_activity_action_updated_profile() |
Format ‘updated_profile’ activity actions. |
bp-themes/bp-default/_inc/ajax.php: bp_dtheme_ajax_messages_autocomplete_results() |
AJAX handler for autocomplete. Displays friends only, unless BP_MESSAGES_AUTOCOMPLETE_ALL is defined. |
bp-friends/bp-friends-functions.php: bp_friends_prime_mentions_results() |
Used by the Activity component’s @mentions to print a JSON list of the current user’s friends. |
bp-friends/bp-friends-functions.php: friends_notification_new_request() |
Send notifications related to a new friendship request. |
bp-friends/bp-friends-functions.php: friends_notification_accepted_request() |
Send notifications related to the acceptance of a friendship request. |
bp-friends/bp-friends-notifications.php: friends_format_notifications() |
Notification formatting callback for bp-friends notifications. |
Changelog #Changelog
Version | Description |
---|---|
1.0.1 | Introduced. |