Changeset 9276 for trunk/src/bp-groups/bp-groups-filters.php
- Timestamp:
- 12/24/2014 08:09:13 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-groups/bp-groups-filters.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-filters.php
r9026 r9276 234 234 } 235 235 add_filter( 'get_latest_topics_fields', 'groups_filter_forums_root_page_sql' ); 236 237 /** 238 * Should BuddyPress load the mentions scripts and related assets, including results to prime the 239 * mentions suggestions? 240 * 241 * @param bool $load_mentions True to load mentions assets, false otherwise. 242 * @param bool $mentions_enabled True if mentions are enabled. 243 * @return bool True if mentions scripts should be loaded. 244 * @since BuddyPress (2.2.0) 245 */ 246 function bp_groups_maybe_load_mentions_scripts( $load_mentions, $mentions_enabled ) { 247 if ( ! $mentions_enabled ) { 248 return $load_mentions; 249 } 250 251 if ( $load_mentions || ( bp_is_group_activity() || bp_is_group_home() ) ) { 252 return true; 253 } 254 255 return $load_mentions; 256 } 257 add_filter( 'bp_activity_maybe_load_mentions_scripts', 'bp_groups_maybe_load_mentions_scripts', 10, 2 );
Note: See TracChangeset
for help on using the changeset viewer.