Ticket #4228: filter-global-tables.diff
File filter-global-tables.diff, 1.0 KB (added by , 13 years ago) |
---|
-
bp-core/bp-core-component.php
147 147 $this->notification_callback = apply_filters( 'bp_' . $this->id . '_notification_callback', $r['notification_callback'] ); 148 148 149 149 // Setup global table names 150 if ( !empty( $r['global_tables'] ) ) 150 if ( !empty( $r['global_tables'] ) ){ 151 //allow filtering of the tables used by component 152 $r['global_tables']=apply_filters('bp_global_tables',$r['global_tables'],$this->id);//using bp_global_tables over 'bp_' . $this->id.'_global_tables' has additional advatnage that a single function can catch all the tables and process it 151 153 foreach ( $r['global_tables'] as $global_name => $table_name ) 152 154 $this->$global_name = $table_name; 153 155 } 154 156 /** BuddyPress ********************************************************/ 155 157 156 158 // Register this component in the loaded components array