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

buddypress-trac noreply at wordpress.org
Wed May 3 18:05:52 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  |
--------------------------+----------------------------------

Comment (by boonebgorges):

 I'd prefer not to use `apply_filters()`. We have some implicit conventions
 (both here and in WP) about passing objects through filters: it tends to
 encourage plugin developers to pass their own objects back to the filter,
 which causes forward-compatibility problems. We could revisit this if our
 primary objects had interfaces that developers could rely on, but that's
 some way off.

 Technically similar, but semantically more in-line with the rest of WP, is
 a `do_action()` call at the end of `BP_Groups_Group::populate()`.
 `the_bp_group` parallels WP in some ways, but `BP_Groups_Group` is called
 in places other than a loop, so let's steer clear of that naming
 convention. Maybe something like:

 {{{
 do_action( 'bp_groups_group', $this );
 }}}

 or 'bp_groups_group_populated' (ick)?

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


More information about the buddypress-trac mailing list