Changeset 10212 for trunk/src/bp-core/bp-core-catchuri.php
- Timestamp:
- 10/08/2015 04:52:31 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-catchuri.php
r10110 r10212 241 241 // Rejig the offset 242 242 if ( !empty( $slug ) && ( 1 < count( $slug ) ) ) { 243 array_pop( $slug ); 244 $uri_offset = count( $slug ); 243 // Only offset if not on a root profile. Fixes issue when Members page is nested. 244 if ( false === $root_profile ) { 245 array_pop( $slug ); 246 $uri_offset = count( $slug ); 247 } 245 248 } 246 249 … … 265 268 // Are we viewing a specific user? 266 269 if ( $after_member_slug ) { 270 // If root profile, we've already queried for the user 271 if ( $root_profile instanceof WP_User ) { 272 $bp->displayed_user->id = $root_profile->ID; 273 267 274 // Switch the displayed_user based on compatibility mode 268 if ( bp_is_username_compatibility_mode() ) {275 } elseif ( bp_is_username_compatibility_mode() ) { 269 276 $bp->displayed_user->id = (int) bp_core_get_userid( urldecode( $after_member_slug ) ); 277 270 278 } else { 271 279 $bp->displayed_user->id = (int) bp_core_get_userid_from_nicename( $after_member_slug );
Note: See TracChangeset
for help on using the changeset viewer.