From 2c6bd800b3e1812173677a24feccf8b181a9ca8c Mon Sep 17 00:00:00 2001 From: Bivek Date: Wed, 17 Aug 2016 17:10:29 -0400 Subject: [PATCH 1/2] we should not initialize here :) bcoz it will lead to change in content. --- inc/classes/class-advanced-excerpt.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/classes/class-advanced-excerpt.php b/inc/classes/class-advanced-excerpt.php index 24916d7..56795d0 100644 --- a/inc/classes/class-advanced-excerpt.php +++ b/inc/classes/class-advanced-excerpt.php @@ -475,7 +475,8 @@ public function filter( $content ) { $content_has_filter = true; } - $text = get_the_content( '' ); + //$text = get_the_content( '' ); + $text = $content;//8iv: we should not initialize $content here :) bcoz it will lead to change in content. // Strip shortcodes if $no_shortcode is set to 1. if ( 1 === $no_shortcode ) { From 91cd935168a885d06adc890dd90fe83d09687f03 Mon Sep 17 00:00:00 2001 From: Bivek Date: Wed, 17 Aug 2016 17:17:25 -0400 Subject: [PATCH 2/2] removed reinitialization of content --- inc/classes/class-advanced-excerpt.php | 1 - 1 file changed, 1 deletion(-) diff --git a/inc/classes/class-advanced-excerpt.php b/inc/classes/class-advanced-excerpt.php index 56795d0..a0f3804 100644 --- a/inc/classes/class-advanced-excerpt.php +++ b/inc/classes/class-advanced-excerpt.php @@ -475,7 +475,6 @@ public function filter( $content ) { $content_has_filter = true; } - //$text = get_the_content( '' ); $text = $content;//8iv: we should not initialize $content here :) bcoz it will lead to change in content. // Strip shortcodes if $no_shortcode is set to 1.