Changeset 3942
- Timestamp:
- 06/08/2012 10:18:22 PM (12 years ago)
- Location:
- branches/plugin/bbp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-core-shortcodes.php
r3930 r3942 173 173 bbp_set_query_name( $query_name ); 174 174 175 // Remove 'bbp_replace_the_content' filter to prevent infinite loops 176 remove_filter( 'the_content', 'bbp_replace_the_content' ); 177 175 178 // Start output buffer 176 179 ob_start(); … … 198 201 // Reset the query name 199 202 bbp_reset_query_name(); 203 204 // Add 'bbp_replace_the_content' filter back (@see $this::start()) 205 add_filter( 'the_content', 'bbp_replace_the_content' ); 200 206 201 207 return $output; -
branches/plugin/bbp-includes/bbp-theme-compatibility.php
r3929 r3942 607 607 $new_content = ''; 608 608 609 // Remove the filter that was added in bbp_template_include()610 remove_filter( 'the_content', 'bbp_replace_the_content' );611 612 609 // Bail if shortcodes are unset somehow 613 610 if ( !is_a( $bbp->shortcodes, 'BBP_Shortcodes' ) ) … … 652 649 if ( !empty( $page ) ) { 653 650 651 // Restore previously unset filters 652 bbp_restore_all_filters( 'the_content' ); 653 654 // Remove 'bbp_replace_the_content' filter to prevent infinite loops 655 remove_filter( 'the_content', 'bbp_replace_the_content' ); 656 654 657 // Start output buffer 655 658 ob_start(); 656 659 657 // Restore previously unset filters658 bbp_restore_all_filters( 'the_content' );659 660 660 // Grab the content of this page 661 $new_content = do_shortcode( apply_filters( 'the_content', get_post_field( 'post_content', $page->ID ) ));661 $new_content = apply_filters( 'the_content', $page->post_content ); 662 662 663 663 // Clean up the buffer 664 664 ob_end_clean(); 665 666 // Add 'bbp_replace_the_content' filter back (@see $this::start()) 667 add_filter( 'the_content', 'bbp_replace_the_content' ); 665 668 666 669 // No page so show the archive … … 678 681 if ( !empty( $page ) ) { 679 682 683 // Restore previously unset filters 684 bbp_restore_all_filters( 'the_content' ); 685 686 // Remove 'bbp_replace_the_content' filter to prevent infinite loops 687 remove_filter( 'the_content', 'bbp_replace_the_content' ); 688 680 689 // Start output buffer 681 690 ob_start(); 682 691 683 // Restore previously unset filters684 bbp_restore_all_filters( 'the_content' );685 686 692 // Grab the content of this page 687 $new_content = do_shortcode( apply_filters( 'the_content', get_post_field( 'post_content', $page->ID ) ));693 $new_content = apply_filters( 'the_content', $page->post_content ); 688 694 689 695 // Clean up the buffer 690 696 ob_end_clean(); 691 697 698 // Add 'bbp_replace_the_content' filter back (@see $this::start()) 699 add_filter( 'the_content', 'bbp_replace_the_content' ); 692 700 693 701 // No page so show the archive
Note: See TracChangeset
for help on using the changeset viewer.