Skip to:
Content

BuddyPress.org

Changeset 5515


Ignore:
Timestamp:
12/11/2011 09:16:17 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Move Group Admin link to the end of the navigation, to prevent it from shifting links. Fixes #3837.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-loader.php

    r5500 r5515  
    317317                        );
    318318
    319                         // If the user is a group mod or more, then show the group admin nav item
    320                         if ( bp_is_item_admin() || bp_is_item_mod() ) {
    321                                 $sub_nav[] = array(
    322                                         'name'            => __( 'Admin', 'buddypress' ),
    323                                         'slug'            => 'admin',
    324                                         'parent_url'      => $group_link,
    325                                         'parent_slug'     => $this->current_group->slug,
    326                                         'screen_function' => 'groups_screen_group_admin',
    327                                         'position'        => 20,
    328                                         'user_has_access' => ( $bp->is_item_admin + (int)$bp->is_item_mod ),
    329                                         'item_css_id'     => 'admin'
    330                                 );
    331                         }
    332 
    333319                        // If this is a private group, and the user is not a member, show a "Request Membership" nav item.
    334320                        if ( is_user_logged_in() &&
    … …  
    386372                        }
    387373
     374                        // If the user is a group mod or more, then show the group admin nav item
     375                        if ( bp_is_item_admin() || bp_is_item_mod() ) {
     376                                $sub_nav[] = array(
     377                                        'name'            => __( 'Admin', 'buddypress' ),
     378                                        'slug'            => 'admin',
     379                                        'parent_url'      => $group_link,
     380                                        'parent_slug'     => $this->current_group->slug,
     381                                        'screen_function' => 'groups_screen_group_admin',
     382                                        'position'        => 20,
     383                                        'user_has_access' => ( $bp->is_item_admin + (int)$bp->is_item_mod ),
     384                                        'item_css_id'     => 'admin'
     385                                );
     386                        }
     387
    388388                        parent::setup_nav( $main_nav, $sub_nav );
    389389                }
Note: See TracChangeset for help on using the changeset viewer.