Skip to:
Content

BuddyPress.org

Ticket #5021: 5021.05.patch

File 5021.05.patch, 1.0 KB (added by boonebgorges, 6 years ago)
  • bp-core/bp-core-template-loader.php

    diff --git bp-core/bp-core-template-loader.php bp-core/bp-core-template-loader.php
    index 334a449..a00069a 100644
    function bp_buffer_template_part( $slug, $name = null, $echo = true ) { 
    207207
    208208        bp_get_template_part( $slug, $name );
    209209
    210         // Remove 'bp_replace_the_content' filter to prevent infinite loops
    211         add_filter( 'the_content', 'bp_replace_the_content' );
    212 
    213210        // Get the output buffer contents
    214211        $output = ob_get_contents();
    215212
  • bp-core/bp-core-theme-compatibility.php

    diff --git bp-core/bp-core-theme-compatibility.php bp-core/bp-core-theme-compatibility.php
    index 3594b49..fe46e6f 100644
    function bp_replace_the_content( $content = '' ) { 
    588588 */
    589589function bp_theme_compat_main_loop_start() {
    590590
     591        // Prevent recursion
     592        remove_action( 'loop_start', 'bp_theme_compat_main_loop_start', 9999 );
     593
    591594        // Bail if not the main query
    592595        if ( ! in_the_loop() )
    593596                return;