Changeset 4961 for trunk/bp-core/bp-core-catchuri.php
- Timestamp:
- 08/10/2011 06:32:02 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r4920 r4961 181 181 } 182 182 } 183 184 // URLs with BP_ENABLE_ROOT_PROFILES enabled won't be caught above 183 184 // URLs with BP_ENABLE_ROOT_PROFILES enabled won't be caught above 185 185 if ( empty( $matches ) && defined( 'BP_ENABLE_ROOT_PROFILES' ) && BP_ENABLE_ROOT_PROFILES ) { 186 186 187 187 // Make sure there's a user corresponding to $bp_uri[0] 188 188 if ( !empty( $bp_uri[0] ) && $root_profile = get_userdatabylogin( $bp_uri[0] ) ) { 189 189 190 190 // Force BP to recognize that this is a members page 191 191 $matches[] = 1; 192 192 $match = $bp->pages->members; 193 193 $match->key = 'members'; 194 194 195 195 // Without the 'members' URL chunk, WordPress won't know which page to load 196 196 // This filter intercepts the WP query and tells it to load the members page 197 197 add_filter( 'request', create_function( '$query_args', '$query_args["pagename"] = "' . $match->name . '"; return $query_args;' ) ); 198 199 } 200 198 199 } 200 201 201 } 202 202 … … 224 224 225 225 // Global the unfiltered offset to use in bp_core_load_template(). 226 // To avoid PHP warnings in bp_core_load_template(), it must always be >= 0 226 // To avoid PHP warnings in bp_core_load_template(), it must always be >= 0 227 227 $bp_unfiltered_uri_offset = $uri_offset >= 0 ? $uri_offset : 0; 228 228 … … 238 238 // Viewing a specific user 239 239 if ( !empty( $bp_uri[$uri_offset + 1] ) ) { 240 240 241 241 // Switch the displayed_user based on compatbility mode 242 242 if ( bp_is_username_compatibility_mode() ) … … 247 247 if ( empty( $bp->displayed_user->id ) ) { 248 248 // Prevent components from loading their templates 249 $bp->current_component = ''; 249 $bp->current_component = ''; 250 250 251 251 bp_do_404(); … … 263 263 $bp->current_component = ''; 264 264 } 265 265 266 266 // Reset the offset 267 267 $uri_offset = 0;
Note: See TracChangeset
for help on using the changeset viewer.