[buddypress-trac] [BuddyPress Trac] #7224: bp_groups_get_group_type() probably shouldn't return unregistered group types.

buddypress-trac noreply at wordpress.org
Thu Aug 18 22:03:59 UTC 2016


#7224: bp_groups_get_group_type() probably shouldn't return unregistered group
types.
-------------------------+-----------------------
 Reporter:  dcavins      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  2.7
Component:  Groups       |    Version:  2.6.0
 Severity:  normal       |   Keywords:  has-patch
-------------------------+-----------------------
 The function `bp_groups_register_group_type()` adds items to
 `buddypress()->groups->types` and `bp_groups_get_group_types()` gets them
 from there. However, when you’re setting a type for a group, you’re using
 the new taxonomy to do so. So if a group type is no longer registered,
 `bp_groups_get_group_type()`—which is referring to the taxonomy
 relationship—could return currently unregistered types.

 The attached patch checks that the found types via taxonomy are
 represented in the `buddypress()` global before including them in the
 return value.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7224>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list