Changeset 10184 for trunk/src/bp-groups/bp-groups-loader.php
- Timestamp:
- 10/04/2015 01:47:36 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-loader.php
r10158 r10184 251 251 $this->current_group->user_has_access = true; 252 252 } 253 254 // Check once if the current group has a custom front template 255 $this->current_group->front_template = bp_groups_get_front_template( $this->current_group ); 253 256 254 257 // Set current_group to 0 to prevent debug errors … … 372 375 $bp = buddypress(); 373 376 377 // If the activity component is not active and the current group has no custom front, members are displayed in the home nav 378 if ( 'members' === $this->default_extension && ! bp_is_active( 'activity' ) && ! $this->current_group->front_template ) { 379 $this->default_extension = 'home'; 380 } 381 374 382 if ( ! bp_current_action() ) { 375 383 $bp->current_action = $this->default_extension; … … 528 536 } 529 537 530 $sub_nav[] = array( 531 'name' => sprintf( _x( 'Members <span>%s</span>', 'My Group screen nav', 'buddypress' ), number_format( $this->current_group->total_member_count ) ), 532 'slug' => 'members', 533 'parent_url' => $group_link, 534 'parent_slug' => $this->current_group->slug, 535 'screen_function' => 'groups_screen_group_members', 536 'position' => 60, 537 'user_has_access' => $this->current_group->user_has_access, 538 'item_css_id' => 'members', 539 'no_access_url' => $group_link, 540 ); 538 if ( $this->current_group->front_template || bp_is_active( 'activity' ) ) { 539 /** 540 * If the theme is using a custom front, create activity subnav. 541 */ 542 if ( $this->current_group->front_template && bp_is_active( 'activity' ) ) { 543 $sub_nav[] = array( 544 'name' => _x( 'Activity', 'My Group screen nav', 'buddypress' ), 545 'slug' => 'activity', 546 'parent_url' => $group_link, 547 'parent_slug' => $this->current_group->slug, 548 'screen_function' => 'groups_screen_group_activity', 549 'position' => 11, 550 'user_has_access' => $this->current_group->user_has_access, 551 'item_css_id' => 'activity', 552 'no_access_url' => $group_link, 553 ); 554 } 555 556 /** 557 * Only add the members subnav if it's not the home's nav 558 */ 559 $sub_nav[] = array( 560 'name' => sprintf( _x( 'Members <span>%s</span>', 'My Group screen nav', 'buddypress' ), number_format( $this->current_group->total_member_count ) ), 561 'slug' => 'members', 562 'parent_url' => $group_link, 563 'parent_slug' => $this->current_group->slug, 564 'screen_function' => 'groups_screen_group_members', 565 'position' => 60, 566 'user_has_access' => $this->current_group->user_has_access, 567 'item_css_id' => 'members', 568 'no_access_url' => $group_link, 569 ); 570 } 541 571 542 572 if ( bp_is_active( 'friends' ) && bp_groups_user_can_send_invites() ) {
Note: See TracChangeset
for help on using the changeset viewer.