Skip to:
Content

bbPress.org

Ticket #2429: 2429.patch

File 2429.patch, 677 bytes (added by johnjamesjacoby, 8 years ago)

Bail out of bbp_template_include_theme_compat() if a root template is already included

  • includes/core/theme-compat.php

     
    433433function bbp_template_include_theme_compat( $template = '' ) {
    434434
    435435        /**
     436         * Bail if a root template was already found. This prevents unintended
     437         * recursive filtering of 'the_content'.
     438         *
     439         * @link http://bbpress.trac.wordpress.org/ticket/2429
     440         */
     441        if ( bbp_is_template_included() ) {
     442                return $template;
     443        }
     444
     445        /**
    436446         * If BuddyPress is activated at a network level, the action order is
    437447         * reversed, which causes the template integration to fail. If we're looking
    438448         * at a BuddyPress page here, bail to prevent the extra processing.