bp_nouveau_get_user_feedback( string $feedback_id = '' )
All user feedback messages are available here
Description
Parameters
- $feedback_id
-
(Optional) The ID of the message.
Default value: ''
Return
(string|false) The list of parameters for the message
Source
File: bp-templates/bp-nouveau/includes/functions.php
function bp_nouveau_get_user_feedback( $feedback_id = '' ) { /** * Filters the BuddyPress Nouveau feedback messages. * * Use this filter to add your custom feedback messages. * * @since BuddyPress 3.0.0 * * @param array $value The list of feedback messages. */ $feedback_messages = apply_filters( 'bp_nouveau_feedback_messages', array( 'registration-disabled' => array( 'type' => 'info', 'message' => __( 'Member registration is currently disabled.', 'buddyboss' ), 'before' => 'bp_before_registration_disabled', 'after' => 'bp_after_registration_disabled' ), 'completed-confirmation' => array( 'type' => 'info', 'message' => __( 'You have successfully created your account! Please log in using the email and password you have just created.', 'buddyboss' ), 'before' => 'bp_before_registration_confirmed', 'after' => 'bp_after_registration_confirmed', ), 'directory-activity-loading' => array( 'type' => 'loading', 'message' => __( 'Loading community updates. Please wait.', 'buddyboss' ), ), 'activity-comments-loading' => array( 'type' => 'loading', 'message' => __( 'Loading activity comments. Please wait.', 'buddyboss' ), ), 'single-activity-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the update. Please wait.', 'buddyboss' ), ), 'activity-loop-none' => array( 'type' => 'info', 'message' => __( 'Sorry, there was no activity found.', 'buddyboss' ), ), 'blogs-loop-none' => array( 'type' => 'info', 'message' => __( 'Sorry, there were no sites found.', 'buddyboss' ), ), 'blogs-no-signup' => array( 'type' => 'info', 'message' => __( 'Site registration is currently disabled.', 'buddyboss' ), ), 'directory-blogs-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the sites of the network. Please wait.', 'buddyboss' ), ), 'directory-groups-loading' => array( 'type' => 'loading', 'message' => __( 'Loading groups of the community. Please wait.', 'buddyboss' ), ), 'groups-loop-none' => array( 'type' => 'info', 'message' => __( 'Sorry, there were no groups found.', 'buddyboss' ), ), 'group-activity-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the group updates. Please wait.', 'buddyboss' ), ), 'group-members-loading' => array( 'type' => 'loading', 'message' => __( 'Requesting the group members. Please wait.', 'buddyboss' ), ), 'group-leaders-loading' => array( 'type' => 'loading', 'message' => __( 'Requesting the group leaders. Please wait.', 'buddyboss' ), ), 'group-media-loading' => array( 'type' => 'loading', 'message' => __( 'Requesting the group photos. Please wait.', 'buddyboss' ), ), 'group-members-none' => array( 'type' => 'info', 'message' => __( 'Sorry, no group members were found.', 'buddyboss' ), ), 'group-members-search-none' => array( 'type' => 'info', 'message' => __( 'Sorry, there was no member with that name found within this group.', 'buddyboss' ), ), 'group-manage-members-none' => array( 'type' => 'info', 'message' => __( 'This group has no members.', 'buddyboss' ), ), 'group-requests-none' => array( 'type' => 'info', 'message' => __( 'There are no pending membership requests.', 'buddyboss' ), ), 'group-requested-membership' => array( 'type' => 'info', 'message' => __( 'You have already requested to join this group.', 'buddyboss' ), ), 'group-requests-loading' => array( 'type' => 'loading', 'message' => __( 'Loading the members who requested to join the group. Please wait.', 'buddyboss' ), ), 'group-delete-warning' => array( 'type' => 'warning', 'message' => __( 'WARNING: Deleting this group will completely remove ALL content associated with it. There is no way back. Please be careful with this option.', 'buddyboss' ), ), 'group-avatar-delete-info' => array( 'type' => 'info', 'message' => __( 'To remove the existing group photo, please use the delete group profile photo button.', 'buddyboss' ), ), 'directory-members-loading' => array( 'type' => 'loading', 'message' => __( 'Loading members of the community. Please wait.', 'buddyboss' ), ), 'members-loop-none' => array( 'type' => 'info', 'message' => __( 'Sorry, no members were found.', 'buddyboss' ), ), 'member-requests-none' => array( 'type' => 'info', 'message' => __( 'You have no pending requests to connect.', 'buddyboss' ), ), 'member-mutual-friends-none' => array( 'type' => 'loading', 'message' => __( 'You have no mutual connections with this member.', 'buddyboss' ), ), 'member-invites-none' => array( 'type' => 'info', 'message' => __( 'You have no outstanding group invites.', 'buddyboss' ), ), 'member-notifications-none' => array( 'type' => 'info', 'message' => __( 'This member has no notifications.', 'buddyboss' ), ), 'member-wp-profile-none' => array( 'type' => 'info', 'message' => __( '%s did not save any profile information yet.', 'buddyboss' ), ), 'member-delete-account' => array( 'type' => 'warning', 'message' => __( 'Deleting this account will delete all of the content it has created. It will be completely unrecoverable.', 'buddyboss' ), ), 'member-activity-loading' => array( 'type' => 'loading', 'message' => __( 'Loading member\'s updates. Please wait.', 'buddyboss' ), ), 'member-blogs-loading' => array( 'type' => 'loading', 'message' => __( 'Loading member\'s blog. Please wait.', 'buddyboss' ), ), 'member-friends-loading' => array( 'type' => 'loading', 'message' => __( 'Loading member\'s friends. Please wait.', 'buddyboss' ), ), 'member-mutual-friends-loading' => array( 'type' => 'loading', 'message' => __( 'Loading member\'s mutual connections. Please wait.', 'buddyboss' ), ), 'member-groups-loading' => array( 'type' => 'loading', 'message' => __( 'Loading member\'s groups. Please wait.', 'buddyboss' ), ), 'member-notifications-loading' => array( 'type' => 'loading', 'message' => __( 'Loading notifications. Please wait.', 'buddyboss' ), ), 'member-group-invites-all' => array( 'type' => 'info', 'message' => __( 'Currently every member of the community can invite you to join their groups. Optionally, you may restrict group invites to your connections only.', 'buddyboss' ), ), 'member-group-invites-friends-only' => array( 'type' => 'info', 'message' => __( 'Currently only your connections may invite you to join a group. Uncheck this box to allow any member to send invites.', 'buddyboss' ), ), 'member-data-export' => array( 'type' => 'info', 'message' => __( 'You may download a copy of all data you have created on this platform. Click the button below to start a new request. An email will be sent to you to verify the request. Then the site admin will review your request and if approved, a zip file will be generated and emailed to you.', 'buddyboss' ), ), 'member-media-loading' => array( 'type' => 'loading', 'message' => __( 'Loading member\'s photos. Please wait.', 'buddyboss' ), ), 'media-loop-none' => array( 'type' => 'info', 'message' => __( 'Sorry, no photos were found.', 'buddyboss' ), ), 'member-media-none' => array( 'type' => 'info', 'message' => __( 'Sorry, no photos were found.', 'buddyboss' ), ), 'media-album-none' => array( 'type' => 'info', 'message' => __( 'Sorry, no albums were found.', 'buddyboss' ), ), 'album-media-loading' => array( 'type' => 'loading', 'message' => __( 'Loading photos from the album. Please wait.', 'buddyboss' ), ), 'directory-media-loading' => array( 'type' => 'loading', 'message' => __( 'Loading photos from the community. Please wait.', 'buddyboss' ), ), ) ); if ( ! isset( $feedback_messages[ $feedback_id ] ) ) { return false; } /* * Adjust some messages to the context. */ if ( 'completed-confirmation' === $feedback_id && bp_registration_needs_activation() ) { $feedback_messages['completed-confirmation']['message'] = __( 'Before you can login, you need to confirm your email address via the email we just sent to you.', 'buddyboss' ); } elseif ( 'member-notifications-none' === $feedback_id ) { $is_myprofile = bp_is_my_profile(); if ( bp_is_current_action( 'unread' ) ) { $feedback_messages['member-notifications-none']['message'] = __( 'This member has no unread notifications.', 'buddyboss' ); if ( $is_myprofile ) { $feedback_messages['member-notifications-none']['message'] = __( 'You have no unread notifications.', 'buddyboss' ); } } elseif ( $is_myprofile ) { $feedback_messages['member-notifications-none']['message'] = __( 'You have no notifications.', 'buddyboss' ); } } elseif ( 'member-wp-profile-none' === $feedback_id && bp_is_user_profile() ) { $feedback_messages['member-wp-profile-none']['message'] = sprintf( $feedback_messages['member-wp-profile-none']['message'], bp_get_displayed_user_fullname() ); } elseif ( 'member-delete-account' === $feedback_id && bp_is_my_profile() ) { $feedback_messages['member-delete-account']['message'] = __( 'Deleting your account will delete all of the content you have created. It will be completely irrecoverable.', 'buddyboss' ); } elseif ( 'member-activity-loading' === $feedback_id && bp_is_my_profile() ) { $feedback_messages['member-activity-loading']['message'] = __( 'Loading your updates. Please wait.', 'buddyboss' ); } elseif ( 'member-blogs-loading' === $feedback_id && bp_is_my_profile() ) { $feedback_messages['member-blogs-loading']['message'] = __( 'Loading your blogs. Please wait.', 'buddyboss' ); } elseif ( 'member-friends-loading' === $feedback_id && bp_is_my_profile() ) { $feedback_messages['member-friends-loading']['message'] = __( 'Loading your connections. Please wait.', 'buddyboss' ); } elseif ( 'member-groups-loading' === $feedback_id && bp_is_my_profile() ) { $feedback_messages['member-groups-loading']['message'] = __( 'Loading your groups. Please wait.', 'buddyboss' ); } /** * Filter here if you wish to edit the message just before being displayed * * @since BuddyPress 3.0.0 * * @param array $feedback_messages */ return apply_filters( 'bp_nouveau_get_user_feedback', $feedback_messages[ $feedback_id ] ); }
Changelog
Version | Description |
---|---|
BuddyPress 3.0.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.