Skip to:
Content

BuddyPress.org

Ticket #1137: ticket-1137.2.patch

File ticket-1137.2.patch, 945 bytes (added by dat_paulchen, 15 years ago)
  • bp-core/bp-core-catchuri.php

     
    198198        global $bp_no_status_set;
    199199        global $wp_query;
    200200       
    201         $page = $bp_path;
     201        $pages = $bp_path;
    202202       
    203203        /* Don't hijack any URLs on blog pages */
    204204        if ( bp_is_blog_page() ) {
     
    217217                        $wp_query->is_page = true;
    218218        }
    219219       
    220         if ( $located_template = apply_filters( 'bp_located_template', locate_template( array( $page . '.php' ), $page ) ) ) {
     220        if(!is_array($pages))
     221                $pages = array($pages);
     222               
     223        foreach($pages as &$page)
     224                $page .= '.php';
     225       
     226        if ( $located_template = apply_filters( 'bp_located_template', locate_template( $pages , false ), $pages ) ) {
    221227                load_template( apply_filters( 'bp_load_template', $located_template ) );
    222228        } else {
    223229                if ( $located_template = locate_template( array( '404.php' ) ) ) {