Skip to content

Commit

Permalink
Merge pull request #1467 from semperfiwebdesign/development
Browse files Browse the repository at this point in the history
Development to master for 2.4.4 with additional issue
  • Loading branch information
michaeltorbert authored Jan 11, 2018
2 parents b885c05 + a1ef974 commit 49b5acc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aioseop_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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 );
Expand Down

0 comments on commit 49b5acc

Please sign in to comment.