Changeset 12298 for sites/trunk/profiles.wordpress.org/public_html/wp-content/plugins/wporg-profiles-activity-handler/wporg-profiles-activity-handler.php
- Timestamp:
- 12/05/2022 08:52:35 AM (3 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
r12016 r12298 39 39 add_filter( 'bp_activity_meta_tables', array( $this, 'change_meta_table_names' ) ); 40 40 add_filter( 'bp_active_components', array( $this, 'activate_activity_component' ) ); 41 add_action( 'bp_setup_cache_groups', array( $this, 'bp_setup_cache_groups' ), 11 ); 41 42 add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) ); 42 43 … … 45 46 add_filter( 'bp_activity_do_mentions', '__return_false' ); 46 47 add_filter( 'bp_activity_use_akismet', '__return_false' ); 48 47 49 } 48 50 … … 106 108 107 109 return $tables; 110 } 111 112 /** 113 * Make the cache-group localised to the profile site. 114 * 115 * See https://core.trac.wordpress.org/ticket/54303 for remove_global_group. 116 */ 117 public function bp_setup_cache_groups() { 118 global $wp_object_cache; 119 120 if ( ! is_object( $wp_object_cache ) || 'WPORG_Object_Cache' !== get_class( $wp_object_cache ) ) { 121 return; 122 } 123 124 $wp_object_cache->global_groups = array_diff( 125 $wp_object_cache->global_groups, 126 [ 127 'bp_activity', 128 'bp_activity_comments', 129 'activity_meta' 130 ] 131 ); 108 132 } 109 133
Note: See TracChangeset
for help on using the changeset viewer.