stuttter / wp-user-groups

Group users together with taxonomies & terms
https://wordpress.org/plugins/wp-user-groups/
GNU General Public License v2.0
48 stars 22 forks source link

show_in_rest? #10

Closed drewcovi closed 7 years ago

drewcovi commented 7 years ago

Can we get show_in_rest added to these taxonomies?

Would be pretty nice for some of us WP_API consumers.

drewcovi commented 7 years ago

seems its already there... nevermind :) not sure why its not in the users endpoint unfortunately.

drewcovi commented 7 years ago

any idea why this wouldn't show in the users endpoint in wpapi?

JJJ commented 7 years ago

I don't see show_in_rest. Maybe check again?

You can use the register_taxonomy_args filter to add it in yourself. show_in_rest is false by default, so you'll need to make it true to fit your conditions.

I'm thinking of leaving this off by default, because enabling it exposes each user's groups to the world, which may not be expected behavior.

If we were to consider doing this at a later date, we'll want to carefully think about how to safely map meta capabilities by default.