bp_nouveau_get_user_feedback( string $feedback_id = '' )

All user feedback messages are available here


Description Description


Parameters Parameters

$feedback_id

(Optional) The ID of the message.

Default value: ''


Top ↑

Return Return

(string|false) The list of parameters for the message


Top ↑

Source 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 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 not allowed.', 'buddypress' ),
			'before'  => 'bp_before_registration_disabled',
			'after'   => 'bp_after_registration_disabled'
		),
		'request-details' => array(
			'type'    => 'info',
			'message' => __( 'Registering for this site is easy. Just fill in the fields below, and we\'ll get a new account set up for you in no time.', 'buddypress' ),
			'before'  => false,
			'after'   => false,
		),
		'completed-confirmation' => array(
			'type'    => 'info',
			'message' => __( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ),
			'before'  => 'bp_before_registration_confirmed',
			'after'   => 'bp_after_registration_confirmed',
		),
		'directory-activity-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Loading the community updates. Please wait.', 'buddypress' ),
		),
		'single-activity-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Loading the update. Please wait.', 'buddypress' ),
		),
		'activity-loop-none' => array(
			'type'    => 'info',
			'message' => __( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ),
		),
		'blogs-loop-none' => array(
			'type'    => 'info',
			'message' => __( 'Sorry, there were no sites found.', 'buddypress' ),
		),
		'blogs-no-signup' => array(
			'type'    => 'info',
			'message' => __( 'Site registration is currently disabled.', 'buddypress' ),
		),
		'directory-blogs-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Loading the sites of the network. Please wait.', 'buddypress' ),
		),
		'directory-groups-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Loading the groups of the community. Please wait.', 'buddypress' ),
		),
		'groups-loop-none' => array(
			'type'    => 'info',
			'message' => __( 'Sorry, there were no groups found.', 'buddypress' ),
		),
		'group-activity-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Loading the group updates. Please wait.', 'buddypress' ),
		),
		'group-members-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Requesting the group members. Please wait.', 'buddypress' ),
		),
		'group-members-none' => array(
			'type'    => 'info',
			'message' => __( 'Sorry, there were no group members found.', 'buddypress' ),
		),
		'group-members-search-none' => array(
			'type'    => 'info',
			'message' => __( 'Sorry, there was no member of that name found in this group.', 'buddypress' ),
		),
		'group-manage-members-none' => array(
			'type'    => 'info',
			'message' => __( 'This group has no members.', 'buddypress' ),
		),
		'group-requests-none' => array(
			'type'    => 'info',
			'message' => __( 'There are no pending membership requests.', 'buddypress' ),
		),
		'group-requests-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Loading the members who requested to join the group. Please wait.', 'buddypress' ),
		),
		'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.', 'buddypress' ),
		),
		'group-avatar-delete-info' => array(
			'type'    => 'info',
			'message' => __( 'If you\'d like to remove the existing group profile photo but not upload a new one, please use the delete group profile photo button.', 'buddypress' ),
		),
		'directory-members-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Loading the members of your community. Please wait.', 'buddypress' ),
		),
		'members-loop-none' => array(
			'type'    => 'info',
			'message' => __( 'Sorry, no members were found.', 'buddypress' ),
		),
		'member-requests-none' => array(
			'type'    => 'info',
			'message' => __( 'You have no pending friendship requests.', 'buddypress' ),
		),
		'member-invites-none' => array(
			'type'    => 'info',
			'message' => __( 'You have no outstanding group invites.', 'buddypress' ),
		),
		'member-notifications-none' => array(
			'type'    => 'info',
			'message' => __( 'This member has no notifications.', 'buddypress' ),
		),
		'member-wp-profile-none' => array(
			'type'    => 'info',
			'message' => __( '%s did not save any profile information yet.', 'buddypress' ),
		),
		'member-delete-account' => array(
			'type'    => 'warning',
			'message' => __( 'Deleting this account will delete all of the content it has created. It will be completely unrecoverable.', 'buddypress' ),
		),
		'member-activity-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Loading the member\'s updates. Please wait.', 'buddypress' ),
		),
		'member-blogs-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Loading the member\'s blogs. Please wait.', 'buddypress' ),
		),
		'member-friends-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Loading the member\'s friends. Please wait.', 'buddypress' ),
		),
		'member-groups-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Loading the member\'s groups. Please wait.', 'buddypress' ),
		),
		'member-notifications-loading' => array(
			'type'    => 'loading',
			'message' => __( 'Loading notifications. Please wait.', 'buddypress' ),
		),
		'member-group-invites-all' => array(
			'type'    => 'info',
			'message' => __( 'Currently every member of the community can invite you to join their groups. If you are not comfortable with it, you can always restrict group invites to your friends only.', 'buddypress' ),
		),
		'member-group-invites-friends-only' => array(
			'type'    => 'info',
			'message' => __( 'Currently only your friends can invite you to groups. Uncheck the box to allow any member to send invites.', 'buddypress' ),
		),
	) );

	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'] = __( 'You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.', 'buddypress' );
	} 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.', 'buddypress' );

			if ( $is_myprofile ) {
				$feedback_messages['member-notifications-none']['message'] = __( 'You have no unread notifications.', 'buddypress' );
			}
		} elseif ( $is_myprofile ) {
			$feedback_messages['member-notifications-none']['message'] = __( 'You have no notifications.', 'buddypress' );
		}
	} 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.', 'buddypress' );
	} elseif ( 'member-activity-loading' === $feedback_id && bp_is_my_profile() ) {
		$feedback_messages['member-activity-loading']['message'] = __( 'Loading your updates. Please wait.', 'buddypress' );
	} elseif ( 'member-blogs-loading' === $feedback_id && bp_is_my_profile() ) {
		$feedback_messages['member-blogs-loading']['message'] = __( 'Loading your blogs. Please wait.', 'buddypress' );
	} elseif ( 'member-friends-loading' === $feedback_id && bp_is_my_profile() ) {
		$feedback_messages['member-friends-loading']['message'] = __( 'Loading your friends. Please wait.', 'buddypress' );
	} elseif ( 'member-groups-loading' === $feedback_id && bp_is_my_profile() ) {
		$feedback_messages['member-groups-loading']['message'] = __( 'Loading your groups. Please wait.', 'buddypress' );
	}

	/**
	 * Filter here if you wish to edit the message just before being displayed
	 *
	 * @since 3.0.0
	 *
	 * @param array $feedback_messages
	 */
	return apply_filters( 'bp_nouveau_get_user_feedback', $feedback_messages[ $feedback_id ] );
}

Top ↑

Changelog Changelog

Changelog
Version Description
8.0.0 Adds the 'member-invites-none' feedback.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.