BuddyPress 2.2 on Track to Provide a Basic Member Type API

photo credit: Dunechaser - cc
photo credit: Dunechasercc

BuddyPress 2.2 is under active development and contributors are close to having the basics of a new Member Type API on board for the upcoming release. The new API would allow developers to separate users into different types, a common request for many BuddyPress-powered communities. User types make it possible to create some interesting community features, such as restricting content, filtering the member directory, assigning different permissions, and displaying profiles in a unique way for different types of members.

BuddyPress lead developer Boone Gorges proposed the enhancement in a ticket that outlines developers’ need for this API. “It’s time for BP to provide the basics of a User Type API, so that plugin devs and site builders will have some common tools for building the user type functionality required by their implementation,” Gorges said.

In the past, Gorges, like many others, used xprofile, taxonomies, and usermeta to create user types. For BuddyPress 2.2, he is proposing that BP register a private taxonomy 'bp_user_type'. Registering a member type would require a new function. Gorges’ first pass at the member type API adds bp_register_member_type( $type, $args ), with syntax similar to what you might use to register a custom post type or a custom taxonomy. Gorges provided an example mu-plugin to demonstrate how simple it will be to register a new member type.

At the moment, the UI for the Member Type API is very basic. When member types have been registered, you will see a meta box added to the community profile screen in the admin. This will allow admins to change a user’s member type, which is currently limited to one. The 2.2 release may ship with support for one member type or it may support multiple types, depending on how the feature evolves during this development cycle.

The Member Type API won’t actually do anything visible for users in the first iteration. It’s purely a feature for developers that will enable them to build their own interfaces for creating and managing user types. The idea has been well-received by BuddyPress developers who are excited to have a standard way to accomplish user type requests that are common to building niche social networks.

BuddyPress 2.2 is expected at the end of January 2015. The Member Type API isn’t yet a lock but appears to be on track for inclusion in the next release. If you have any feedback to offer, feel free to jump in on the relevant ticket (#6006) on BuddyPress trac.


4 responses to “BuddyPress 2.2 on Track to Provide a Basic Member Type API”

  1. I really wish user types were part of WordPress proper; it’d enhance user capabilities nicely. Actually, they need to type all the things: users, comments, etc. It’d make it easier for the BuddyPress guys, as well as developers in general and open up a lot of nice capabilities

  2. Maybe all the membership plugin devs out there could use this to add full BP support to their plugins! (Would be very handy for me!) :D

  3. This is so cool. I’ve wanted this feature for years! Dating sites (male/female), job sites (employer/job seeker), company intranets (manager, sales, etc.). The use case scenarios are endless.


Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

%d bloggers like this: