Contents
bp_get_user_meta( int $user_id, string $key, bool $single = false )
Get a piece of usermeta.
Description
This is a wrapper for get_user_meta() that allows for easy use of bp_get_user_meta_key(), thereby increasing compatibility with non-standard BP setups.
See also
- get_user_meta(): For complete details about parameters and return values.
Parameters
- $user_id
-
(Required) The ID of the user whose meta you're fetching.
- $key
-
(Required) The meta key to retrieve.
- $single
-
(Optional) Whether to return a single value.
Default value: false
Return
(mixed) Will be an array if $single is false. Will be value of meta data field if $single is true.
Source
File: bp-core/bp-core-functions.php
function bp_get_user_meta( $user_id, $key, $single = false ) { return get_user_meta( $user_id, bp_get_user_meta_key( $key ), $single ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.5.0 | Introduced. |
Related
Uses
Uses | Description |
---|---|
bp-core/bp-core-functions.php: bp_get_user_meta_key() |
Get the meta_key for a given piece of user metadata |
Used By | Description |
---|---|
bp-core/bp-core-functions.php: bp_xprofile_get_selected_options_user_progress() |
Function will return the user progress based on the settings you provided. |
bp-document/classes/class-bp-document-folder-template.php: BP_Document_Folder_Template::__construct() |
Constructor method. |
bp-document/classes/class-bp-document-template.php: BP_Document_Template::__construct() |
Constructor method. |
bp-settings/classes/class-bp-rest-account-settings-options-endpoint.php: BP_REST_Account_Settings_Options_Endpoint::get_notifications_fields() |
Get Fields for the Notifications “Email Preferences”. |
bp-settings/classes/class-bp-rest-account-settings-options-endpoint.php: BP_REST_Account_Settings_Options_Endpoint::bp_rest_settings_pending_email_notice() |
Add the ‘pending email change’ message to the settings page. |
bp-messages/bp-messages-functions.php: group_messages_notification_new_message() |
Email message recipients to alert them of a new unread group message. |
bp-core/admin/bp-core-admin-tools.php: bp_admin_update_activity_favourite() |
Check if BuddyPress activity favorites data needs upgrade & Update to BuddyBoss activity like data |
bp-activity/bp-activity-functions.php: bp_activity_remove_user_favorite_meta() |
Delete users liked activity meta. |
bp-settings/bp-settings-template.php: bp_settings_pending_email_notice() |
Add the ‘pending email change’ message to the settings page. |
bp-settings/actions/general.php: bp_settings_verify_email_change() |
Process email change verification or cancel requests. |
bp-media/classes/class-bp-media-template.php: BP_Media_Template::__construct() |
Constructor method. |
bp-media/classes/class-bp-media-album-template.php: BP_Media_Album_Template::__construct() |
Constructor method. |
bp-blogs/bp-blogs-functions.php: bp_blogs_add_user_to_blog() |
Record a user’s association with a blog. |
bp-xprofile/bp-xprofile-functions.php: bp_xprofile_get_fields_by_visibility_levels() |
Fetch an array of the xprofile fields that a given user has marked with certain visibility levels. |
bp-xprofile/bp-xprofile-functions.php: xprofile_set_field_visibility_level() |
Set the visibility level for this field. |
bp-xprofile/bp-xprofile-functions.php: xprofile_get_field_visibility_level() |
Get the visibility level for a field. |
bp-xprofile/bp-xprofile-template.php: bp_get_profile_last_updated() |
Return a formatted string displaying when a profile was last updated. |
bp-xprofile/classes/class-bp-xprofile-group.php: BP_XProfile_Group::fetch_visibility_level() |
Fetch the field visibility level for the fields returned by the query. |
bp-messages/bp-messages-template.php: bp_message_get_notices() |
Generate markup for currently active notices. |
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-notifications.php: messages_screen_notification_settings() |
Render the markup for the Messages section of Settings > Notifications. |
bp-groups/bp-groups-notifications.php: groups_screen_notification_settings() |
Render the group settings fields on the Notification Settings page. |
bp-groups/bp-groups-notifications.php: groups_notification_group_updated() |
Notify all group members when a group is updated. |
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_notification_membership_request_completed() |
Notify member about their group membership request. |
bp-groups/bp-groups-notifications.php: groups_notification_promoted_member() |
Notify group member they have been promoted. |
bp-groups/bp-groups-notifications.php: groups_notification_group_invites() |
Notify a member they have been invited to a group. |
bp-members/bp-members-functions.php: bp_core_map_user_registration() |
Map a user’s WP display name to the XProfile fullname field, if necessary. |
bp-members/bp-members-functions.php: bp_core_activate_signup() |
Activate a signup, as identified by an activation key. |
bp-members/classes/class-bp-signup.php: BP_Signup::delete() |
Delete a pending account. |
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 connection request. |
bp-friends/bp-friends-functions.php: friends_update_friend_totals() |
Update user friend counts. |
bp-friends/bp-friends-functions.php: friends_get_total_friend_count() |
Get the friend count of a given user. |
bp-friends/classes/class-bp-friends-friendship.php: BP_Friends_Friendship::total_friend_count() |
Get a total friend count for a given user. |
bp-friends/bp-friends-notifications.php: friends_screen_notification_settings() |
Add Connections-related settings to the Settings > Notifications page. |
bp-templates/bp-nouveau/includes/activity/functions.php: bp_nouveau_activity_scope_newest_class() |
Add class to newest activities by type. |
bp-templates/bp-nouveau/includes/messages/ajax.php: bp_nouveau_ajax_dismiss_sitewide_notice() |
AJAX dismiss sitewide notice. |
bp-templates/bp-nouveau/includes/messages/functions.php: bp_nouveau_push_sitewide_notices() |
Add active sitewide notices to the BP template_message global. |
bp-templates/bp-nouveau/includes/messages/functions.php: bp_nouveau_add_notice_notification_for_user() |
Add notice notification for member. |
bp-templates/bp-nouveau/includes/groups/template-tags.php: bp_nouveau_groups_get_group_invites_setting() |
Gets the displayed user group invites preferences |
bp-templates/bp-nouveau/includes/ajax.php: bp_nouveau_ajax_object_template_loader() |
Load the template loop for the current object. |
bp-core/deprecated/buddypress/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_dd_update_group_cover_images_url() |
Filter to update group cover images |
bp-core/bp-core-filters.php: bp_dd_check_avatar_folder_dir() |
Create dummy path for Group and User |
bp-core/bp-core-filters.php: bp_dd_fetch_dummy_avatar_url() |
Get dummy URL from DB for Group and User |
bp-core/gdpr/class-bp-settings-export.php: BP_Settings_Export::process_data() |
Export member profile settings. |
bp-activity/bp-activity-functions.php: bp_activity_new_comment_notification() |
Send email and BP notifications when an activity item receives a comment. |
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_delete() |
Delete activity item(s). |
bp-activity/bp-activity-functions.php: bp_activity_post_update() |
Post an activity update. |
bp-activity/bp-activity-functions.php: bp_activity_add_user_favorite() |
Add an activity feed item as a favorite for a user. |
bp-activity/bp-activity-functions.php: bp_activity_remove_user_favorite() |
Remove an activity feed item as a favorite for a user. |
bp-activity/bp-activity-functions.php: bp_activity_favorites_upgrade_data() |
Check if BuddyPress activity favorites data needs upgrade & Update to BuddyBoss activity like data |
bp-activity/bp-activity-functions.php: bp_activity_get_user_favorites() |
Get a users favorite activity feed items. |
bp-activity/bp-activity-functions.php: bp_activity_update_mention_count_for_user() |
Update the mention count for a given user. |
bp-activity/bp-activity-notifications.php: bp_activity_screen_notification_settings() |
Add activity notifications settings to the notifications settings page. |
bp-activity/classes/class-bp-activity-activity.php: BP_Activity_Activity::total_favorite_count() |
Get favorite count for a given user. |
bp-activity/classes/class-bp-activity-template.php: BP_Activity_Template::__construct() |
Constructor method. |
bp-activity/bp-activity-template.php: bp_get_total_mention_count_for_user() |
Return the total mention count for a specified user. |
bp-activity/bp-activity-template.php: bp_get_activity_latest_update() |
Return the activity latest update link. |
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.