diff --git a/aioseop_class.php b/aioseop_class.php index 44a428665..d036e3dea 100644 --- a/aioseop_class.php +++ b/aioseop_class.php @@ -2552,14 +2552,14 @@ function get_post_description( $post ) { } if ( ! $description ) { if ( empty( $aioseop_options['aiosp_skip_excerpt'] ) ) { - $description = $this->trim_excerpt_without_filters_full_length( $this->internationalize( $post->post_excerpt ) ); + $description = $this->trim_text_without_filters_full_length( $this->internationalize( $post->post_excerpt ) ); } if ( ! $description && isset( $aioseop_options['aiosp_generate_descriptions'] ) && $aioseop_options['aiosp_generate_descriptions'] ) { $content = $post->post_content; if ( ! empty( $aioseop_options['aiosp_run_shortcodes'] ) ) { $content = do_shortcode( $content ); } - $description =$this->internationalize( $content ); + $description = $this->trim_text_without_filters_full_length( $this->internationalize( $content ) ); } $description = apply_filters( 'aioseop_description', @@ -2578,7 +2578,7 @@ function get_post_description( $post ) { * * @return string */ - function trim_excerpt_without_filters_full_length( $text ) { + function trim_text_without_filters_full_length( $text ) { $text = str_replace( ']]>', ']]>', $text ); $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text ); $text = wp_strip_all_tags( $text );