Changeset 5760
- Timestamp:
- 02/13/2012 07:28:31 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r5729 r5760 343 343 */ 344 344 function bp_core_load_template( $templates ) { 345 global $post, $bp, $wpdb, $wp_query; 346 347 // Bail if there is no offset 348 if ( empty( $bp->unfiltered_uri[$bp->unfiltered_uri_offset] ) ) 349 return false; 350 351 // Determine if the root object WP page exists for this request 352 // (@todo: use reliable API function (get_page_by_path() doesn't work?) 353 if ( !$wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_name = %s", $bp->unfiltered_uri[$bp->unfiltered_uri_offset] ) ) ) 354 return false; 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 enabled 349 if ( !empty( $bp->unfiltered_uri_offset ) ) { 350 if ( ! get_page_by_path( $bp->unfiltered_uri[$bp->unfiltered_uri_offset] ) ) { 351 return false; 352 } 353 } 355 354 356 355 // Set the root object as the current wp_query-ied item
Note: See TracChangeset
for help on using the changeset viewer.