Changeset 4057 for trunk/bp-core/bp-core-template.php
- Timestamp:
- 02/21/2011 01:03:41 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template.php
r4050 r4057 22 22 $component_index = !empty( $bp->displayed_user ) ? $bp->current_component : bp_get_root_slug( $bp->current_component ); 23 23 24 if ( !isset( $bp->bp_options_nav[$component_index] ) || count( $bp->bp_options_nav[$component_index] ) < 1 ) 25 return false; 24 if ( !bp_is_single_item() ) { 25 if ( !isset( $bp->bp_options_nav[$component_index] ) || count( $bp->bp_options_nav[$component_index] ) < 1 ) { 26 return false; 27 } else { 28 $the_index = $component_index; 29 } 30 } else { 31 if ( !isset( $bp->bp_options_nav[$bp->current_item] ) || count( $bp->bp_options_nav[$bp->current_item] ) < 1 ) { 32 return false; 33 } else { 34 $the_index = $bp->current_item; 35 } 36 } 26 37 27 38 // Loop through each navigation item 28 foreach ( (array)$bp->bp_options_nav[$ component_index] as $subnav_item ) {39 foreach ( (array)$bp->bp_options_nav[$the_index] as $subnav_item ) { 29 40 if ( !$subnav_item['user_has_access'] ) 30 41 continue;
Note: See TracChangeset
for help on using the changeset viewer.