Changeset 5810
- Timestamp:
- 02/20/2012 05:16:21 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r5767 r5810 343 343 */ 344 344 function bp_core_load_template( $templates ) { 345 global $post, $bp, $wp_query ;346 347 // Bail if there is a uri offset but not a page in its place.348 // * Possibly root profiles are enabled349 if ( !empty( $bp->unfiltered_uri_offset ) ) { 350 if ( ! get_page_by_path( $bp->unfiltered_uri[$bp->unfiltered_uri_offset]) ) {345 global $post, $bp, $wp_query, $wpdb; 346 347 // Determine if the root object WP page exists for this request 348 // note: get_page_by_path() breaks non-root pages 349 if ( !empty( $bp->unfiltered_uri_offset ) ) { 350 if ( !$page_exists = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_name = %s", $bp->unfiltered_uri[$bp->unfiltered_uri_offset] ) ) ) { 351 351 return false; 352 352 } 353 353 } 354 354 355 355 // Set the root object as the current wp_query-ied item 356 356 $object_id = 0;
Note: See TracChangeset
for help on using the changeset viewer.