From 05ff9140fd3b60979bdec5d9c288a65bd760e34e Mon Sep 17 00:00:00 2001 From: Michael Torbert Date: Fri, 4 Aug 2017 10:12:36 -0400 Subject: [PATCH 1/6] fix fatal error running shortcodes in description in #1032 --- aioseop_class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aioseop_class.php b/aioseop_class.php index a3619b4b4..c8d95ab6e 100644 --- a/aioseop_class.php +++ b/aioseop_class.php @@ -2551,7 +2551,7 @@ function get_post_description( $post ) { */ function trim_excerpt_without_filters_full_length( $text ) { $text = str_replace( ']]>', ']]>', $text ); - $text = preg_replace( '|(.+?\[/\\1\])?|s', '', $text ); + $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text ); $text = wp_strip_all_tags( $text ); return trim( $text ); @@ -2567,7 +2567,7 @@ function trim_excerpt_without_filters_full_length( $text ) { */ function trim_excerpt_without_filters( $text, $max = 0 ) { $text = str_replace( ']]>', ']]>', $text ); - $text = preg_replace( '|(.+?\[/\\1\])?|s', '', $text ); + $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text ); $text = wp_strip_all_tags( $text ); // Treat other common word-break characters like a space. $text2 = preg_replace( '/[,._\-=+&!\?;:*]/s', ' ', $text ); From b45536c68b2ecb88257b17beb3e2dbab0fd59b63 Mon Sep 17 00:00:00 2001 From: Michael Torbert Date: Fri, 4 Aug 2017 10:14:57 -0400 Subject: [PATCH 2/6] version bump to 2.3.15.1 --- all_in_one_seo_pack.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/all_in_one_seo_pack.php b/all_in_one_seo_pack.php index 67a8dc6a7..77d5821a3 100644 --- a/all_in_one_seo_pack.php +++ b/all_in_one_seo_pack.php @@ -3,7 +3,7 @@ Plugin Name: All In One SEO Pack Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/ Description: Out-of-the-box SEO for your WordPress blog. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 30 million downloads since 2007. -Version: 2.3.15 +Version: 2.3.15.1 Author: Michael Torbert Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/ Text Domain: all-in-one-seo-pack @@ -31,14 +31,14 @@ * The original WordPress SEO plugin. * * @package All-in-One-SEO-Pack - * @version 2.3.15 + * @version 2.3.15.1 */ if ( ! defined( 'AIOSEOPPRO' ) ) { define( 'AIOSEOPPRO', false ); } if ( ! defined( 'AIOSEOP_VERSION' ) ) { - define( 'AIOSEOP_VERSION', '2.3.15' ); + define( 'AIOSEOP_VERSION', '2.3.15.1' ); } global $aioseop_plugin_name; $aioseop_plugin_name = 'All in One SEO Pack'; From 11a0128c5dcde74777018ddd0b092f15bbf997be Mon Sep 17 00:00:00 2001 From: Michael Torbert Date: Fri, 4 Aug 2017 10:15:11 -0400 Subject: [PATCH 3/6] bump readme to 2.3.15.1 --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 141f24467..f7f0916d1 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtor Tags: seo, all in one seo, google, twitter, page, image seo, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, google sitemap, sitemaps, robots meta, yahoo, bing, news sitemaps, multisite, canonical, nofollow, noindex, keywords, description, webmaster tools, google webmaster tools, google analytics Requires at least: 4.0 Tested up to: 4.8 -Stable tag: 2.3.15 +Stable tag: 2.3.15.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html From 40c2d617dc7aa86c095bf0443243b8e5dc5e139e Mon Sep 17 00:00:00 2001 From: Michael Torbert Date: Sat, 5 Aug 2017 11:41:26 -0400 Subject: [PATCH 4/6] do shortcodes only with option #1040 --- aioseop_class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aioseop_class.php b/aioseop_class.php index c8d95ab6e..e64b9a1c9 100644 --- a/aioseop_class.php +++ b/aioseop_class.php @@ -2534,7 +2534,10 @@ function get_post_description( $post ) { $description = $this->trim_excerpt_without_filters_full_length( $this->internationalize( $post->post_excerpt ) ); } if ( ! $description && isset( $aioseop_options['aiosp_generate_descriptions'] ) && $aioseop_options['aiosp_generate_descriptions'] ) { - $content = do_shortcode( $post->post_content ); + if ( ! empty( $aioseop_options['aiosp_run_shortcodes'] ) ) { + $content = do_shortcode( $content ); + } + $content = wp_strip_all_tags( $content ); $description = $this->trim_excerpt_without_filters( $this->internationalize( $content ) ); } } From a8003f37805891c136610108239cb5abe17660ee Mon Sep 17 00:00:00 2001 From: Michael Torbert Date: Sat, 5 Aug 2017 11:45:44 -0400 Subject: [PATCH 5/6] do shortcodes only with option in OG #1040 --- modules/aioseop_opengraph.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/aioseop_opengraph.php b/modules/aioseop_opengraph.php index 047248e1e..a1c42dba7 100644 --- a/modules/aioseop_opengraph.php +++ b/modules/aioseop_opengraph.php @@ -755,7 +755,6 @@ function filter_settings( $settings, $location, $current ) { ); // Add filters - $description = do_shortcode( $description ); $description = apply_filters( 'aioseop_description', $description ); // Add placholders $settings["{$prefix}title"]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $title ); @@ -1190,9 +1189,14 @@ function add_meta() { } } + if ( ! empty( $this->options['aiosp_opengraph_title_shortcodes'] ) ) { + $title = do_shortcode( $title ); + } if ( ! empty( $description ) ) { $description = $aiosp->internationalize( preg_replace( '/\s+/', ' ', $description ) ); - $description = do_shortcode( $description ); + if ( ! empty( $this->options['aiosp_opengraph_description_shortcodes'] ) ) { + $description = do_shortcode( $description ); + } $description = $aiosp->trim_excerpt_without_filters( $description, 1000 ); } From 927c4080a1d83235187047f15080649e3bd3459b Mon Sep 17 00:00:00 2001 From: Michael Torbert Date: Sat, 5 Aug 2017 11:48:34 -0400 Subject: [PATCH 6/6] version bump to 2.3.15.2 --- all_in_one_seo_pack.php | 6 +++--- readme.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/all_in_one_seo_pack.php b/all_in_one_seo_pack.php index 77d5821a3..8fb6ceec8 100644 --- a/all_in_one_seo_pack.php +++ b/all_in_one_seo_pack.php @@ -3,7 +3,7 @@ Plugin Name: All In One SEO Pack Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/ Description: Out-of-the-box SEO for your WordPress blog. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 30 million downloads since 2007. -Version: 2.3.15.1 +Version: 2.3.15.2 Author: Michael Torbert Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/ Text Domain: all-in-one-seo-pack @@ -31,14 +31,14 @@ * The original WordPress SEO plugin. * * @package All-in-One-SEO-Pack - * @version 2.3.15.1 + * @version 2.3.15.2 */ if ( ! defined( 'AIOSEOPPRO' ) ) { define( 'AIOSEOPPRO', false ); } if ( ! defined( 'AIOSEOP_VERSION' ) ) { - define( 'AIOSEOP_VERSION', '2.3.15.1' ); + define( 'AIOSEOP_VERSION', '2.3.15.2' ); } global $aioseop_plugin_name; $aioseop_plugin_name = 'All in One SEO Pack'; diff --git a/readme.txt b/readme.txt index f7f0916d1..b31a526fe 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtor Tags: seo, all in one seo, google, twitter, page, image seo, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, google sitemap, sitemaps, robots meta, yahoo, bing, news sitemaps, multisite, canonical, nofollow, noindex, keywords, description, webmaster tools, google webmaster tools, google analytics Requires at least: 4.0 Tested up to: 4.8 -Stable tag: 2.3.15.1 +Stable tag: 2.3.15.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html