Skip to:
Content

BuddyPress.org

Changeset 6290


Ignore:
Timestamp:
09/03/2012 01:03:01 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Theme Compatibility:

  • Temporarily override 404 in bp_core_load_template() when a template cannot be found, but we can confirm we are in a BuddyPress component. This is a brute-force override that will be made more elegant later.
  • See: #3741.
File:
1 edited

Legend:

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

    r6285 r6290  
    382382        // Template was located, lets set this as a valid page and not a 404.
    383383        status_header( 200 );
    384         $wp_query->is_page = $wp_query->is_singular = true;
    385         $wp_query->is_404  = false;
     384        $wp_query->is_page     = true;
     385        $wp_query->is_singular = true;
     386        $wp_query->is_404      = false;         
    386387
    387388        do_action( 'bp_core_pre_load_template', $located_template );
     
    397398    // @todo Some other 404 handling if theme compat doesn't kick in
    398399    } else {
     400
     401        // We know where we are, so reset important $wp_query bits here early.
     402        // The rest will be done by bp_theme_compat_reset_post() later.
     403        if ( is_buddypress() ) {
     404            status_header( 200 );
     405            $wp_query->is_page     = true;
     406            $wp_query->is_singular = true;
     407            $wp_query->is_404      = false;         
     408        }
     409
    399410        do_action( 'bp_setup_theme_compat' );
    400411    }
Note: See TracChangeset for help on using the changeset viewer.