Skip to:
Content

BuddyPress.org

Changeset 13094


Ignore:
Timestamp:
08/25/2021 08:40:56 AM (3 years ago)
Author:
imath
Message:

Make sure Group nav items positioning includes the Members nav

BP Nouveau includes a specific customizer tool to edit the position of the Group nav items and a customizer setting to add a custom front page to the Group. When this front page is disabled, the Members nav was not included by the specific customizer tool. It's now the case.

Fixes #8548

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/groups/classes.php

    r12789 r13094  
    281281        remove_filter( '_bp_nouveau_group_reset_front_template', array( $this, 'all_groups_fronts' ), 10, 1 );
    282282
     283        $members_nav = array(
     284            'name'        => _x( 'Members', 'My Group screen nav', 'buddypress' ),
     285            'slug'        => 'members',
     286            'parent_slug' => $this->group->slug,
     287            'position'    => 60,
     288        );
     289
    283290        if ( ! $front_template ) {
    284291            if ( bp_is_active( 'activity' ) ) {
    285292                $nav_items['home']['name'] = _x( 'Home (Activity)', 'Group screen navigation title', 'buddypress' );
     293
     294                // Add the members nav.
     295                $nav_items['members'] = $members_nav;
    286296            } else {
    287297                $nav_items['home']['name'] = _x( 'Home (Members)', 'Group screen navigation title', 'buddypress' );
     
    297307            }
    298308
    299             // Add the members one
    300             $nav_items['members'] = array(
    301                 'name'        => _x( 'Members', 'My Group screen nav', 'buddypress' ),
    302                 'slug'        => 'members',
    303                 'parent_slug' => $this->group->slug,
    304                 'position'    => 60,
    305             );
     309            // Add the members nav.
     310            $nav_items['members'] = $members_nav;
    306311        }
    307312
Note: See TracChangeset for help on using the changeset viewer.