Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/24/2011 10:23:57 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Adjust bp_is_current_component and bp_core_load_template to look for page templates as root_slug's too

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-catchuri.php

    r3835 r3884  
    235235
    236236    // 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] ) ) )
    238238        return false;
    239239
Note: See TracChangeset for help on using the changeset viewer.