Ticket #2491: bp_path_array.diff
| File bp_path_array.diff, 1.1 KB (added by , 16 years ago) |
|---|
-
bp-core-catchuri.php
255 255 if ( !$bp->displayed_user->id && $bp_unfiltered_uri[0] == BP_MEMBERS_SLUG && isset($bp_unfiltered_uri[1]) ) 256 256 bp_core_redirect( $bp->root_domain ); 257 257 258 // Add .php to all options in $bp_path 259 foreach( (array) $bp_path as $template ) $filtered_templates[] = "$template.php"; 260 258 261 // If the template file doesn't exist, redirect to the root domain. 259 if ( !bp_is_blog_page() && !file_exists( apply_filters( 'bp_located_template', locate_template( array( $bp_path . '.php' ), false ), array( $bp_path . '.php' ) ) ) )262 if ( !bp_is_blog_page() && !file_exists( apply_filters( 'bp_located_template', locate_template( $filtered_templates, false ), $filtered_templates ) ) ) 260 263 bp_core_redirect( $bp->root_domain ); 261 264 262 265 if ( !$bp_path && !bp_is_blog_page() ) { … … 283 286 bp_core_load_template( apply_filters( 'bp_core_template_display_profile', 'members/single/home' ) ); 284 287 } 285 288 286 ?> 287 No newline at end of file 289 ?>