Today, I am presenting you with the most flexible, re-imagined, BuddyPress Friendship restrictions. If you were wondering how to limit users from one role to befriend only some other selected roles, you can do it now.
The BuddyPress Friendship Restrictions empowers you to:-
- Put global restrictions on Friendship
- Enable custom restrictions by role or member type
- Based on your selection, you can override all restrictions for the given role or member type.
Here is a list of things you can do(all are optional) in the global settings.
General Options(Global settings):-
- Restrict who can be requested friendship(you can limit to one or more roles).
- Restrict who can send friendship requests(you can limit to one or more roles).
- Rate limit(throttle) the friendship request. How many can be sent during a certain period?
- Set a limit on how many friends a user can have(maximum limit)
- Disable unfriending(Users can not cancel friendship).
- Enable advance restrictions(By role or member type).
If you enable the advance restrictions, you can override almost everything for each role or member type.
Here is what you can do for each role.
- You can enable override the global restrictions. If you don't, the global restrictions will apply.
- Enable/Disable restrictions for sending requests.
- You can set a limit or remove the limit on the number of friends.
- You can enable/disable request restrictions for this role.
- You can select who(which roles) can send them friend requests.
- You can select which roles the user(having this role) can send friendship requests.
- You can select which other roles can befriend for the user with this role
Member Types based settings:-
It has the same functionality as role-based settings. You can select if you want to enable custom restrictions for a member type and customize the settings.
Question:- If a member has more than one role, which settings will apply?
Answer:- The setting which is most permissive will be applied. For example, if role A allows 5 friends and role B allows 10, then 10 friends will be allowed.