BP 8.0 Introduces Site Membership Invitations

With the release of BuddyPress 8.0, your BuddyPress community can grow organically by referral, attracting new members with personalized invitations from existing members. This feature is deactivated by default but can easily be enabled by visiting the BuddyPress Options screen at WP Admin > Settings > BuddyPress > Options. Enable membership invitations by ticking the checkbox labeled “Allow registered members to invite people to join this network.”

The BuddyPress Options screen, with the new invitations option highlighted.

When invitations are enabled, users can accept an invitation and register for your site even if “Anyone can register” is disabled. This means you can disable public registration and enable invitations to create a site with membership by invitation only. Or, enable public registration and use invitations as just another way to spread the word about your community.

Once invitations are enabled, your members will have access to an Invitations tab in their member profiles. Simply enter a valid email address and optionally add a personalized message to send an invitation to the new potential member via email.

The new member invitations "send invites" screen in a member's profile.

Once invitations are sent, a member can view a list of pending invitations and resend the email or cancel the invitation.

The new member invitations "pending invites" screen in a member's profile.

The invitee receives an email that includes a link to the registration form (with a customized acceptance key that allows access even if public registration is disabled). The message also includes the personalized message from the inviting user and an unsubscribe link which allows the invitee to opt out from future invitations from your site. The email’s content is customizable via the BuddyPress Emails admin interface.

The email sent to the invited user containing a personalized message and acceptance and opt-out links.

If the invitee chooses to accept the invitation, he or she can follow the customized link to the registration form.

The customized registration form that is reached by accepting an invitation.

When a new membership is the result of an invitation, the activity item will be expanded to include the name of the inviter.

The expanded activity item when a new membership is the result of an invitation.

Administration Tools

BuddyPress site admins can also view a list of all invitations and opt-outs from the WP Admin dashboard. The new screens are available at Tools > BuddyPress.

On the “Manage Invitations” screen, site admins can view pending and accepted invitations and choose to resend the email or cancel the invitation.

The WP Admin "Manage Invitation" screen available to BP site admins.

On the “Manage Opt-outs” screen, site admins can see opt-out requests, with a record of what type of email resulted in the opt-out request, and who sent the email. This screen can be used to see if any particular component or plugin or user is abusing the system to send unwanted emails that result in many opt-outs. It is also possible find a specific opt-out by searching for an email address, which is useful, for example, in the case where a user who has previously opted out changes his or her mind and would like to have the opt-out request deleted. Note that the email addresses associated with an opt-out request are hashed before being stored in the database.

The WP Admin "Manage Opt-outs" screen available to BP site admins.

We hope this new feature enriches your BuddyPress commmunity by attracting new, engaged members!

#8-0-0, #invitations, #members

Nice! 8.0.0 will include a BP Email to welcome your new community members

If registrations to your site are open, your new members will now receive a warm welcome email once they activated their account.

Screen capture of the default Welcome email

By default its content is very simple, it contains:

  • a link to the user’s profile page,
  • a link to reset their password.

But as you probably know BP Emails are customizable emails, so you can edit this content and make it very unique to your community. Let’s remind ourselves how to achieve this.

First, from the Emails menu of your WordPress Dashboard, look for the [{{{site.name}}}] Welcome! BP Email, mouse over its title and click on the “Edit” link as shown above.

Then edit the content of your email with the text of your choice. I chose to use one containing a link using a custom email token: <a href="{{{groups.url}}}">. In order to replace the groups.url token with the Groups directory permalink before the email is sent, I need to make sure this token is defined using the bp_send_welcome_email_tokens filter. The code below shows you an example of how you can do it.

 * Add the Groups directory URL to the welcome email's tokens.
 * @param array $tokens  An associative array of email tokens.
 * @param int   $user_id The ID of the user who activated their account.
 * @return array An associative array of email tokens.
function bp_custom_code_add_groups_url_to_welcome_email_tokens( $tokens = array(), $user_id = 0 ) {
	// I known, as the Admin of the site, the Groups component is active, let's include a link to its directory.
	$tokens['groups.url'] = bp_get_groups_directory_permalink();

	return $tokens;
add_filter( 'bp_send_welcome_email_tokens', 'bp_custom_code_add_groups_url_to_welcome_email_tokens', 10, 2 );

And.. It’s working 🙌 See the screen capture below 😇


#8-0-0, #bp-email, #welcome

New xProfile Field Type – Checkbox Acceptance will be introduced in BuddyPress 8.0.0

The BuddyPress xProfile component gives you the power to create as many profile fields as you wish quickly and to organize these fields into groups of fields. An important step when creating a new profile field is to select the Field Type that best suits your need to display the information.

The Checkbox Acceptance field type is a new type of field we will introduce into our next major release (8.0.0). Thanks to it you’ll be able to easily create a new field to manage the Terms of Service of your site (which is often mandatory nowadays to follow compliance) or any other acceptance page (eg: code of conduct, good behavior rules, etc…). As it’s a profile field, it’s very easy to include it into your registration form to be sure to have your new members to agree to your linked acceptance page.

Adding a new field using the Checkbox Acceptance type.

When you’ll create a new xProfile field once you upgraded to BuddyPress 8.0.0, you will find a new field type option – Checkbox Acceptance.

Checkbox Acceptance field option

After selecting the Acceptance field, you can map your terms of service page to field options and include it into your registration form using the checkbox of the new Signup metabox (also introduced in 8.0.0).

Select your Terms of Service page to Checkbox Acceptance field

Save your profile field, and log out to preview the result on your registration page.

Checkbox Acceptance field view at register page.

It will be visible as in the above screenshot, mapped terms & condition page link on the register page with checkbox. Of course, new users will be able to click on the “Terms and conditions” link to aknowledge it.

Checkbox Acceptance field view for existing users.

Existing members can also agree to your acceptance page. Tell them to log in and visit their edit profile screen to submit their Acceptance from there. Once submitted, it will be a read-only field; members can not uncheck the value for the Acceptance field.

The acceptance field will only be visible to the logged-in member (viewing their self profile) and the admin. It will not be visible to members visiting any other one’s profile.

Checkbox Acceptance field view at own profile

Watch the demo!

The video below will show you how to create a new Acceptance field

Please read the full story about this new xProfile field type, head over to this ticket on our Trac environment.

#8-0-0, #xprofile

Bye-bye BuddyBar, you did great!

I have the great honor to announce you all, the BuddyBar that was with us since BuddyPress 1.0.0 (@apeatling gave it birth on September 9, 2009) has been completely removed from our source code on April 29, 2021, 12.854 commits later!

Screenshot of the BuddyBar
Screenshot of the BuddyBar into BuddyPress 1.0.3

Its menus has been transposed into the WP Admin Bar which firstly appeared in WordPress 3.1. It was possible to turn off the WP Admin Bar in favor of the BuddyBar for a while even when we deprecated it in BuddyPress 2.1. We were thinking about completely removing it since version 3.0, but we regularly delayed its disappearance. I can understand it was a difficult move to do 😉. Yesterday, I took my courage in both hands and made this hard move.

To honor its memory and to remember my early times with BuddyPress, I’ve installed the 1.0.3 version of BuddyPress on a WordPress µ (version 2.8.1) configuration earlier today. The least we can say is: it looked really great in our first default theme!

The BuddyPress member’s page, 12 years ago!

Thanks a lot BuddyBar, you did a great job and I won’t forget you 💪 😘

#8-0-0, #buddybar

2 new xProfile Field types will be introduced in BuddyPress 8.0.0

The BuddyPress xProfile component gives you the power to easily create as many profile fields as you wish and to organize these fields into groups of fields. So far there was only one field which was linked to an existing WordPress user field : the base Name field. This field’s data is synchronized with the WordPress user display name (unless you opt out this synchronization from the BuddyPress Options Administration screen).

WP xProfile field types are arriving!

In BuddyPress 8.0.0, you’ll have the extra power to include other WordPress fields into the xProfile groups of fields. This time, unlike what we’re doing for the Name field, we are not duplicating and synchronizing field values between the WordPress user field tables (the wp_users & the wp_usermeta ones) and the BuddyPress xProfile data table). Instead we are directly using the WordPress user field values.

Creating these new field types, we’ve also improved our xProfile field API so that you can now have more control about the features your custom type of field can support.

 * Custom xProfile field type.
class Custom_XProfile_Field_Type extends BP_XProfile_Field_Type {

	 * This property enforces Field's default visibility.
	public $visibility = 'public';

	 * Supported features for the WordPress field type.
	public static $supported_features = array(
		'required'                => false,
		'do_autolink'             => false,
		'allow_custom_visibility' => false,
		'member_types'            => false,

Using the static $supported_features property, you can disable the corresponding features meta boxes from the xProfile Administration Screen. The above example is showing the supported features by the WordPress fields : as defined by WordPress, these fields cannot be made required, cannot have their visibility changed for something different than public and cannot be restricted to a member type. Below are the values used by default for any xProfile field type.

A regular xProfile field can be made required, can be restricted to a specific member type, can be set to let members define the field data visibility and can be auto linked to a members search request about the field value.

1. wp-biography

The first type is specially designed to let you include the biographical information of the user into the group of xProfile fields of your choice.

2. wp-textbox

Using this type of field, you can insert the first name, the last name, the website URL and the potential WordPress User Contact Methods you added. Once you created your wp-textbox field, you’ll just need to use the advanced meta box below the field’s description textarea to select the information to include into the group of fields of your choice.

Watch the demo!

The video below will show you how to create a new field to add/edit the Member’s website URL and the Biographical information directly from their front-end profile.

If you want to read the full story about these new xProfile field types, head over to this ticket on our Trac environment.

#8-0-0, #wordpress, #xprofile