[buddypress-trac] [BuddyPress Trac] #7343: Add the_group filter to allow group object modification

buddypress-trac noreply at wordpress.org
Thu Apr 20 16:07:07 UTC 2017

#7343: Add the_group filter to allow group object modification
 Reporter:  ninjew        |       Owner:  dcavins
     Type:  enhancement   |      Status:  accepted
 Priority:  normal        |   Milestone:  Under Consideration
Component:  Groups        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
Changes (by dcavins):

 * owner:   => dcavins
 * status:  new => accepted


 Hi @ninjew-

 This is an interesting idea. The groups in the `$groups_template` are
 populated using `groups_get_groups()` which offers several filter options:

 Could you filter the group objects there? Maybe in combination with a
 `bp_is_groups_directory()` scoping check?

 Other notes: `the_post` filter occurs in WP_Query::setup_postdata():

 Which seems more like filtering `groups_get_group` to me. @boonebgorges,
 what about instead of using `new BP_Groups_Group( $id )` here:
 we called `groups_get_group( $id )`, which would apply the
 `groups_get_group` filter to each group object?


Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7343#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list