Changeset 4057 for trunk/bp-core/bp-core-buddybar.php
- Timestamp:
- 02/21/2011 01:03:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-buddybar.php
r4027 r4057 54 54 55 55 /*** 56 * If we are not viewing a user, and this is a root component, don't attach the 57 * default subnav function so we can display a directory or something else. 56 * If the nav item is visible, we are not viewing a user, and this is a root 57 * component, don't attach the default subnav function so we can display a 58 * directory or something else. 58 59 */ 59 if ( bp_is_root_component( $slug ) && !bp_displayed_user_id() )60 if ( ( -1 != $position ) && bp_is_root_component( $slug ) && !bp_displayed_user_id() ) 60 61 return; 61 62 63 // Look for current component 62 64 if ( bp_is_current_component( $slug ) && !bp_current_action() ) { 65 if ( !is_object( $screen_function[0] ) ) 66 add_action( 'bp_screens', $screen_function ); 67 else 68 add_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ), 3 ); 69 70 if ( !empty( $default_subnav_slug ) ) 71 $bp->current_action = $default_subnav_slug; 72 73 // Look for current item 74 } elseif ( bp_is_current_item( $slug ) && !bp_current_action() ) { 63 75 if ( !is_object( $screen_function[0] ) ) 64 76 add_action( 'bp_screens', $screen_function ); … … 186 198 ); 187 199 200 // Look for current component 188 201 if ( ( $bp->current_action == $slug && $bp->current_component == $parent_slug ) && $user_has_access ) { 202 if ( !is_object( $screen_function[0] ) ) 203 add_action( 'bp_screens', $screen_function ); 204 else 205 add_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ) ); 206 207 // Look for current item 208 } elseif ( ( $bp->current_action == $slug && $bp->current_item == $parent_slug ) && $user_has_access ) { 189 209 if ( !is_object( $screen_function[0] ) ) 190 210 add_action( 'bp_screens', $screen_function );
Note: See TracChangeset
for help on using the changeset viewer.