equal
deleted
inserted
replaced
645 /** |
645 /** |
646 * Replaces the_content() if the post_type being displayed is one that would |
646 * Replaces the_content() if the post_type being displayed is one that would |
647 * normally be handled by bbPress, but proper single page templates do not |
647 * normally be handled by bbPress, but proper single page templates do not |
648 * exist in the currently active theme. |
648 * exist in the currently active theme. |
649 * |
649 * |
|
650 * Note that we do *not* currently use is_main_query() here. This is because so |
|
651 * many existing themes either use query_posts() or fail to use wp_reset_query() |
|
652 * when running queries before the main loop, causing theme compat to fail. |
|
653 * |
650 * @since bbPress (r3034) |
654 * @since bbPress (r3034) |
651 * @param string $content |
655 * @param string $content |
652 * @return type |
656 * @return type |
653 */ |
657 */ |
654 function bbp_replace_the_content( $content = '' ) { |
658 function bbp_replace_the_content( $content = '' ) { |
655 |
659 |
656 // Bail if not inside the main query loop |
660 // Bail if not inside the query loop |
657 if ( ! in_the_loop() || ! is_main_query() ) |
661 if ( ! in_the_loop() ) |
658 return $content; |
662 return $content; |
659 |
663 |
660 $bbp = bbpress(); |
664 $bbp = bbpress(); |
661 |
665 |
662 // Define local variable(s) |
666 // Define local variable(s) |