Changeset 1459
- Timestamp:
- 03/27/2015 09:59:39 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/profiles.wordpress.org/public_html/wp-content/plugins/wporg-profiles-activity-handler/wporg-profiles-activity-handler.php
r870 r1459 36 36 */ 37 37 public function __construct() { 38 add_filter( 'bp_activity_global_tables', array( $this, 'change_table_names' ) ); 38 add_filter( 'bp_activity_global_tables', array( $this, 'change_global_table_names' ) ); 39 add_filter( 'bp_activity_meta_tables', array( $this, 'change_meta_table_names' ) ); 39 40 add_filter( 'bp_active_components', array( $this, 'activate_activity_component' ) ); 40 41 add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) ); … … 60 61 * @return array 61 62 */ 62 public function change_ table_names( $tables ) {63 public function change_global_table_names( $tables ) { 63 64 global $bp; 64 65 65 return array( 66 'table_name' => $bp->table_prefix . 'wporg_activity', 67 'table_name_meta' => $bp->table_prefix . 'wporg_activity_meta', 68 ); 66 $tables['table_name'] = $bp->table_prefix . 'wporg_activity'; 67 $tables['table_name_meta'] = $bp->table_prefix . 'wporg_activity_meta'; 68 69 return $tables; 70 } 71 72 /** 73 * Changes the meta table name to use custom wporg activity meta tables rather 74 * than the ones for BuddyPress.org. 75 * 76 * @param array $tables The default meta table. 77 * @return array 78 */ 79 public function change_meta_table_names( $tables ) { 80 global $bp; 81 82 $tables['activity'] = $bp->table_prefix . 'wporg_activity_meta'; 83 84 return $tables; 69 85 } 70 86
Note: See TracChangeset
for help on using the changeset viewer.