diff --git src/bp-templates/bp-nouveau/includes/template-tags.php src/bp-templates/bp-nouveau/includes/template-tags.php
index ed509377a..3439280fb 100644
|
|
function bp_nouveau_loop_classes() { |
547 | 547 | $bp_nouveau = bp_nouveau(); |
548 | 548 | |
549 | 549 | // @todo: this function could do with passing args so we can pass simple strings in or array of strings |
| 550 | $is_directory = bp_is_directory(); |
550 | 551 | |
551 | 552 | // The $component is faked if it's the single group member loop |
552 | | if ( ! bp_is_directory() && ( bp_is_group() && 'members' === bp_current_action() ) ) { |
| 553 | if ( ! $is_directory && ( bp_is_group() && 'members' === bp_current_action() ) ) { |
553 | 554 | $component = 'members_group'; |
554 | | } elseif ( ! bp_is_directory() && ( bp_is_user() && 'my-friends' === bp_current_action() ) ) { |
| 555 | } elseif ( ! $is_directory && ( bp_is_user() && 'my-friends' === bp_current_action() ) ) { |
555 | 556 | $component = 'members_friends'; |
556 | 557 | } else { |
557 | 558 | $component = sanitize_key( bp_current_component() ); |
558 | 559 | } |
559 | 560 | |
| 561 | /* |
| 562 | * For the groups component, we need to take in account the |
| 563 | * Groups directory can list Groups according to a Group Type. |
| 564 | */ |
| 565 | if ( 'groups' === $component ) { |
| 566 | $is_directory = bp_is_groups_directory(); |
| 567 | } |
| 568 | |
560 | 569 | $classes = array( |
561 | 570 | 'item-list', |
562 | 571 | sprintf( '%s-list', str_replace( '_', '-', $component ) ), |
… |
… |
function bp_nouveau_loop_classes() { |
584 | 593 | ); |
585 | 594 | |
586 | 595 | // Only the available components supports custom layouts. |
587 | | if ( ! empty( $available_components[ $component ] ) && ( bp_is_directory() || bp_is_group() || bp_is_user() ) ) { |
| 596 | if ( ! empty( $available_components[ $component ] ) && ( $is_directory || bp_is_group() || bp_is_user() ) ) { |
588 | 597 | $customizer_option = sprintf( '%s_layout', $component ); |
589 | 598 | $layout_prefs = bp_nouveau_get_temporary_setting( |
590 | 599 | $customizer_option, |