Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Group Type and Member Type Taxonomies #370

Open
JeanDavidDaviet opened this issue Dec 11, 2020 · 4 comments
Open

Add Group Type and Member Type Taxonomies #370

JeanDavidDaviet opened this issue Dec 11, 2020 · 4 comments

Comments

@JeanDavidDaviet
Copy link

Since BP 7.0.0, Admin Types have been added to the Group and Member components.
The Rest API should be updated to reflect these changes.

Thanks to this, it will be possible to use the REST API to update the interface of the administration with JavaScript.
For reference : https://buddypress.trac.wordpress.org/ticket/8409

@imath
Copy link
Member

imath commented Dec 11, 2020

I agree it would be a nice addition now that we are using the site's database for Member Types/Group Types registration.

@renatonascalves
Copy link
Member

I don't use this feature quite often, so it would be good to have more information here:

  • Endpoint namespace. Any preference?
  • http://site.com/wp-json/buddypress/v1/member|group_types/ ?
  • Schema of a group/member type?
  • Who can delete/add/update group/member types?
  • Any other information one should be aware of when implementing these endpoints?

@imath
Copy link
Member

imath commented Jun 18, 2021

Hi!

  1. For the namespace, I'd rather we use member-types and group-types
  2. common schema for member types and group types: https://github.com/buddypress/buddypress/blob/master/src/bp-core/bp-core-functions.php#L3207|L3249
  3. Specific schema for member type: https://github.com/buddypress/buddypress/blob/master/src/bp-members/bp-members-functions.php#L2763|L2787
  4. Specific schema for group type: https://github.com/buddypress/buddypress/blob/master/src/bp-groups/bp-groups-functions.php#L2626|L2658
  5. delete, add, update, assign => 'bp_moderate'| group admins
  6. Types are specific WP Terms all registered on this site id : bp_get_taxonomy_term_site_id( bp_get_member_type_tax_name() ) and bp_get_taxonomy_term_site_id( bp_get_group_type_tax_name() )
  7. Informations about types are using Terms metadata or data registered with code see bp_get_member_types() and bp_groups_get_group_types(), in Terms db only the slug and name of the BP Type are used.
  8. Functions about types are mainly in:

@imath
Copy link
Member

imath commented Jun 18, 2021

OOps, I forgot:
NB: Group Admins can also assign group types

@renatonascalves renatonascalves self-assigned this Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants