Changeset 5313
- Timestamp:
- 11/08/2011 09:37:42 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-loader.php
r5301 r5313 110 110 'position' => 30, 111 111 'screen_function' => 'bp_blogs_screen_my_blogs', 112 'default_subnav_slug' => 'my- blogs',112 'default_subnav_slug' => 'my-sites', 113 113 'item_css_id' => $this->id 114 114 ); 115 116 $parent_url = trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() ); 117 118 $sub_nav[] = array( 119 'name' => __( 'My Sites', 'buddypress' ), 120 'slug' => 'my-sites', 121 'parent_url' => $parent_url, 122 'parent_slug' => $bp->blogs->slug, 123 'screen_function' => 'bp_blogs_screen_my_blogs', 124 'position' => 10 125 ); 115 126 116 127 // Setup navigation 117 parent::setup_nav( $main_nav );128 parent::setup_nav( $main_nav, $sub_nav ); 118 129 } 119 130 -
trunk/bp-core/bp-core-buddybar.php
r5295 r5313 70 70 add_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ), 3 ); 71 71 72 if ( !empty( $default_subnav_slug ) ) 73 $bp->current_action = apply_filters( 'bp_default_component_subnav', $default_subnav_slug, $r ); 72 if ( !empty( $default_subnav_slug ) ) { 73 /** 74 * BuddyPress will attempt to resolve to the most specific URL possible, 75 * to avoid search-engine-unfriendly content reduplication. Filter 76 * bp_guarantee_unique_uris (and return false) to avoid this behavior 77 */ 78 if ( apply_filters( 'bp_guarantee_unique_uris', true ) ) { 79 bp_core_redirect( bp_displayed_user_domain() . $slug . '/' . apply_filters( 'bp_default_component_subnav', $default_subnav_slug, $r ) ); 80 } else { 81 $bp->current_action = apply_filters( 'bp_default_component_subnav', $default_subnav_slug, $r ); 82 } 83 } 74 84 75 85 // Look for current item … … 80 90 add_action( 'bp_screens', array( &$screen_function[0], $screen_function[1] ), 3 ); 81 91 82 if ( !empty( $default_subnav_slug ) ) 83 $bp->current_action = apply_filters( 'bp_default_component_subnav', $default_subnav_slug, $r ); 92 if ( !empty( $default_subnav_slug ) ) { 93 /** 94 * BuddyPress will attempt to resolve to the most specific URL possible, 95 * to avoid search-engine-unfriendly content reduplication. Filter 96 * bp_guarantee_unique_uris (and return false) to avoid this behavior 97 */ 98 if ( apply_filters( 'bp_guarantee_unique_uris', true ) ) { 99 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_root_slug( bp_current_component() ) . '/' . $slug . '/' . apply_filters( 'bp_default_component_subnav', $default_subnav_slug, $r ) ); 100 } else { 101 $bp->current_action = apply_filters( 'bp_default_component_subnav', $default_subnav_slug, $r ); 102 } 103 } 84 104 } 85 105 -
trunk/bp-members/bp-members-loader.php
r5302 r5313 115 115 } 116 116 117 if ( !$bp->current_component && bp_displayed_user_id() ) 118 $bp->current_component = $bp->default_component; 117 if ( !bp_current_component() && bp_displayed_user_id() ) { 118 /** 119 * BuddyPress will attempt to resolve to the most specific URL possible, 120 * to avoid search-engine-unfriendly content reduplication. Filter 121 * bp_guarantee_unique_uris (and return false) to avoid this behavior 122 */ 123 if ( apply_filters( 'bp_guarantee_unique_uris', true ) ) { 124 bp_core_redirect( bp_displayed_user_domain() . $bp->default_component ); 125 } else { 126 $bp->current_component = $bp->default_component; 127 } 128 } 119 129 } 120 130
Note: See TracChangeset
for help on using the changeset viewer.