[buddypress-trac] [BuddyPress] #4228: Allow filtering Global tables for the component

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu May 31 23:47:41 UTC 2012

#4228: Allow filtering Global tables for the component
 Reporter:  sbrajesh     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  1.6
Component:  Core         |     Version:  1.5.5
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
Changes (by boonebgorges):

 * milestone:  Awaiting Review => 1.6


 I don't have a problem with a filter here, since we have filters on all
 the other properties set in this method.

 I understand what you mean about 'bp_global_tables', but (a) we should be
 consistent about the way we name the filters here, and (b) the purpose of
 this filter is to do component-specific filtering anyway, so I'm going to
 go with the 'bp_' . $this->id . '_global_tables' filter format. You can
 still use a single function, you just have to hook it to multiple filters:

 add_filter( 'bp_xprofile_global_tables', 'foo' );
 add_filter( 'bp_activity_global_tables', 'foo' );
 // etc

 and just do your switch case inside of the `foo()` function.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4228#comment:1>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list