Changeset 5559
- Timestamp:
- 12/16/2011 03:35:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-buddybar.php
r5415 r5559 44 44 'show_for_displayed_user' => $show_for_displayed_user, 45 45 'position' => $position, 46 'screen_function' => &$screen_function 46 'screen_function' => &$screen_function, 47 'default_subnav_slug' => $default_subnav_slug 47 48 ); 48 49 … … 118 119 $bp->bp_nav[$parent_slug]['screen_function'] = &$screen_function; 119 120 121 // If the current_action has been set to the default_subnav_slug, it will be reflected 122 // in the redirect_stack. Unset the action manually so that the new nav default can be set 123 if ( !empty( $bp->redirect_stack['action'] ) && $bp->redirect_stack['action'] == $bp->bp_nav[$parent_slug]['default_subnav_slug'] ) { 124 $bp->current_action = ''; 125 } 126 120 127 if ( $bp->current_component == $parent_slug && !$bp->current_action ) { 121 128 if ( !is_object( $screen_function[0] ) ) … … 124 131 add_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ) ); 125 132 126 if ( $subnav_slug ) 127 $bp->current_action = $subnav_slug; 133 if ( $subnav_slug ) { 134 $bp->current_action = $subnav_slug; 135 $bp->redirect_stack['action'] = $bp->current_action; 136 } 128 137 } 129 138 }
Note: See TracChangeset
for help on using the changeset viewer.