From 8dfb98a94f2bf1569384f452a2f752370ac43bef Mon Sep 17 00:00:00 2001 From: Jeffrey Schutzman Date: Mon, 25 Aug 2014 09:20:13 -0400 Subject: [PATCH 1/2] Applies the_content filter to process the post_content using installed hooks --- wpsc-components/theme-engine-v1/helpers/template-tags.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wpsc-components/theme-engine-v1/helpers/template-tags.php b/wpsc-components/theme-engine-v1/helpers/template-tags.php index dfe7cde39e..52020a5855 100644 --- a/wpsc-components/theme-engine-v1/helpers/template-tags.php +++ b/wpsc-components/theme-engine-v1/helpers/template-tags.php @@ -146,10 +146,12 @@ function wpsc_the_product_title( $post = 0 ) { /** * wpsc product description function + * @uses the_content Applies the filter to process the post_content using installed hooks * @return string - the product description */ function wpsc_the_product_description() { $content = get_the_content( __( 'Read the rest of this entry »', 'wpsc' ) ); + $content = apply_filters( 'the_content', $content ); return do_shortcode( wpautop( $content,1 ) ); } From 4ab1d6ee99f245965cb9752ccd761df327389e0e Mon Sep 17 00:00:00 2001 From: Jeffrey Schutzman Date: Wed, 27 Aug 2014 10:12:33 -0400 Subject: [PATCH 2/2] Remove filter that fires 'the_content' for the products page to prevent infinite recursive include of the products page template Remove references to unused global variables --- wpsc-components/theme-engine-v1/helpers/page.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wpsc-components/theme-engine-v1/helpers/page.php b/wpsc-components/theme-engine-v1/helpers/page.php index 9049bbff20..6d7fcd3b29 100644 --- a/wpsc-components/theme-engine-v1/helpers/page.php +++ b/wpsc-components/theme-engine-v1/helpers/page.php @@ -635,7 +635,12 @@ function wpsc_the_category_title( $title='', $id='' ){ //handles replacing the tags in the pages function wpsc_products_page( $content = '' ) { - global $wpdb, $wp_query, $wpsc_query, $wpsc_query_vars, $_wpsc_is_in_custom_loop; + + /* prevent recursively including of the product page, see wpsc_enable_page_filters() */ + remove_filter( 'the_content', 'wpsc_products_page', 1 ); + + global $wp_query, $wpsc_query, $_wpsc_is_in_custom_loop; + $output = ''; if ( ! in_the_loop() ) return $content;