Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/20/2012 09:40:25 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Move root template check to below reset_post blocks. Fixes incorrect 404 and corrects header statuses when using root templates. See #1478.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/core/theme-compat.php

    r4579 r4593  
    454454function bbp_template_include_theme_compat( $template = '' ) {
    455455
    456     // Bail if the template already matches a bbPress template. This includes
    457     // archive-* and single-* WordPress post_type matches (allowing
    458     // themes to use the expected format) as well as all bbPress-specific
    459     // template files for users, topics, forums, etc...
    460     if ( !empty( bbpress()->theme_compat->bbpress_template ) )
    461         return $template;
    462 
    463456    /** Users *************************************************************/
    464457
     
    630623        ) );
    631624    }
     625
     626    /**
     627     * Bail if the template already matches a bbPress template. This includes
     628     * archive-* and single-* WordPress post_type matches (allowing
     629     * themes to use the expected format) as well as all bbPress-specific
     630     * template files for users, topics, forums, etc...
     631     *
     632     * We do this after the above checks to prevent incorrect 404 body classes
     633     * and header statuses.
     634     *
     635     * @see http://bbpress.trac.wordpress.org/ticket/1478/
     636     */
     637    if ( !empty( bbpress()->theme_compat->bbpress_template ) )
     638        return $template;
    632639
    633640    /**
Note: See TracChangeset for help on using the changeset viewer.