Changeset 12837
- Timestamp:
- 01/22/2021 06:38:09 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/7.0/src/bp-templates/bp-nouveau/includes/template-tags.php
r12814 r12837 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() ); 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(); 558 567 } 559 568 … … 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(
Note: See TracChangeset
for help on using the changeset viewer.