- Timestamp:
- 04/18/2021 10:18:06 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/functions.php
r12595 r12892 4 4 * 5 5 * @since 3.0.0 6 * @version 3.1.06 * @version 8.0.0 7 7 */ 8 8 … … 238 238 */ 239 239 function bp_nouveau_wrapper( $args = array() ) { 240 /** 241 * Classes need to be determined & set by component to a certain degree 242 * 243 * Check the component to find a default container_class to add 244 */ 245 $current_component_class = bp_current_component() . '-meta'; 240 /** 241 * Classes need to be determined & set by component to a certain degree. 242 * 243 * Check the component to find a default container_class based on the component ID to add. 244 * We need to to this because bp_current_component() is using the component slugs which can differ 245 * from the component ID. 246 */ 247 $current_component_id = bp_core_get_active_components( array( 'slug' => bp_current_component() ) ); 248 if ( $current_component_id && 1 === count( $current_component_id ) ) { 249 $current_component_id = reset( $current_component_id ); 250 } else { 251 $current_component_id = bp_current_component(); 252 } 253 254 $current_component_class = $current_component_id . '-meta'; 246 255 247 256 if ( bp_is_group_activity() ) { … … 256 265 'container' => 'div', 257 266 'container_id' => '', 258 'container_classes' => array( $generic_class, $current_component_class 267 'container_classes' => array( $generic_class, $current_component_class ), 259 268 'output' => '', 260 269 ), … … 533 542 534 543 if ( empty( $component ) ) { 535 if ( 'directory' === $context || 'user' === $context ) { 536 $component = bp_current_component(); 544 if ( 'user' === $context ) { 545 $component = bp_core_get_active_components( array( 'slug' => bp_current_component() ) ); 546 $component = reset( $component ); 537 547 538 548 if ( 'friends' === $component ) { … … 544 554 } elseif ( 'group' === $context && bp_is_group_members() ) { 545 555 $component = 'members'; 556 } else { 557 $component = bp_current_component(); 546 558 } 547 559 }
Note: See TracChangeset
for help on using the changeset viewer.