Changeset 3884
- Timestamp:
- 01/24/2011 10:23:57 AM (15 years ago)
- Location:
- trunk/bp-core
- Files:
-
- 2 edited
-
bp-core-catchuri.php (modified) (1 diff)
-
bp-core-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r3835 r3884 235 235 236 236 // Determine if the root object WP page exists for this request (TODO: is there an API function for this? 237 if ( ! $page_exists = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_name = %s", $bp_unfiltered_uri[$bp_unfiltered_uri_offset] ) ) )237 if ( !empty( $bp_unfiltered_uri_offset ) && !$page_exists = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_name = %s", $bp_unfiltered_uri[$bp_unfiltered_uri_offset] ) ) ) 238 238 return false; 239 239 -
trunk/bp-core/bp-core-template.php
r3829 r3884 670 670 } 671 671 } 672 673 // Page template fallback check if $bp->current_component is empty 674 } elseif ( is_page() ) { 675 global $wp_query; 676 $page = $wp_query->get_queried_object(); 677 $custom_fields = get_post_custom_values( '_wp_page_template', $page->ID ); 678 $page_template = $custom_fields[0]; 679 680 // Component name is in the page template name 681 if ( strstr( strtolower( $page_template ), strtolower( $component ) ) ) 682 $is_current_component = true; 672 683 } 673 684
Note: See TracChangeset
for help on using the changeset viewer.