All in One SEO Pack - Version 2.3.14

Version Description

Download this release

Release Info

Developer hallsofmontezuma
Plugin Icon 128x128 All in One SEO Pack
Version 2.3.14
Comparing to
See all releases

Code changes from version 2.3.13.2 to 2.3.14

aioseop_class.php CHANGED
@@ -3579,6 +3579,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3579
  * Adds wordpress hooks.
3580
  *
3581
  * @since 2.3.13 #899 Adds filter:aioseop_description.
 
3582
  */
3583
  function add_hooks() {
3584
  global $aioseop_options, $aioseop_update_checker;
@@ -3622,6 +3623,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3622
  add_action( 'template_redirect', array( $this, 'template_redirect' ), 0 );
3623
  }
3624
  add_filter( 'aioseop_description', array( &$this, 'filter_description' ) );
 
3625
  }
3626
 
3627
  function visibility_warning() {
@@ -4832,41 +4834,115 @@ EOF;
4832
  function display_settings_footer() {
4833
  }
4834
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4835
  /**
4836
  * Filters meta value and applies generic cleanup.
4837
  * - Decode HTML entities.
4838
  * - Removal of urls.
4839
  * - Internal trim.
4840
  * - External trim.
4841
- * - Strips HTML.
4842
- * Returns cleaned value.
4843
  *
4844
  * @since 2.3.13
 
 
 
4845
  *
4846
  * @param string $value Value to filter.
4847
  *
4848
  * @return string
4849
  */
4850
- public function filter_description( $value) {
4851
  // Decode entities
4852
- $value = html_entity_decode( $value );
4853
  $value = preg_replace(
4854
  array(
 
4855
  '@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@',// Remove URLs
4856
  ),
4857
  array(
 
4858
  '', // Replacement URLs
4859
  ),
4860
  $value
4861
  );
4862
  // Strip html
4863
  $value = wp_strip_all_tags( $value );
 
 
4864
  // Internal whitespace trim.
4865
  $value = preg_replace( '/\s\s+/u', ' ', $value );
4866
  // External trim.
4867
  return trim( $value );
4868
  }
4869
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4870
  function display_right_sidebar() {
4871
  global $wpdb;
4872
 
3579
  * Adds wordpress hooks.
3580
  *
3581
  * @since 2.3.13 #899 Adds filter:aioseop_description.
3582
+ * @since 2.3.14 #593 Adds filter:aioseop_title.
3583
  */
3584
  function add_hooks() {
3585
  global $aioseop_options, $aioseop_update_checker;
3623
  add_action( 'template_redirect', array( $this, 'template_redirect' ), 0 );
3624
  }
3625
  add_filter( 'aioseop_description', array( &$this, 'filter_description' ) );
3626
+ add_filter( 'aioseop_title', array( &$this, 'filter_title' ) );
3627
  }
3628
 
3629
  function visibility_warning() {
4834
  function display_settings_footer() {
4835
  }
4836
 
4837
+ /**
4838
+ * Filters title and meta titles and applies cleanup.
4839
+ * - Decode HTML entities.
4840
+ * - Encodes to SEO ready HTML entities.
4841
+ * Returns cleaned value.
4842
+ *
4843
+ * @since 2.3.14
4844
+ *
4845
+ * @param string $value Value to filter.
4846
+ *
4847
+ * @return string
4848
+ */
4849
+ public function filter_title( $value ) {
4850
+ // Decode entities
4851
+ $value = $this->html_entity_decode( $value );
4852
+ // Encode to valid SEO html entities
4853
+ return $this->seo_entity_encode( $value );
4854
+ }
4855
+
4856
  /**
4857
  * Filters meta value and applies generic cleanup.
4858
  * - Decode HTML entities.
4859
  * - Removal of urls.
4860
  * - Internal trim.
4861
  * - External trim.
4862
+ * - Strips HTML except anchor texts.
4863
+ * - Returns cleaned value.
4864
  *
4865
  * @since 2.3.13
4866
+ * @since 2.3.14 Strips excerpt anchor texts.
4867
+ * @since 2.3.14 Encodes to SEO ready HTML entities.
4868
+ * @since 2.3.14 #593 encode/decode refactored.
4869
  *
4870
  * @param string $value Value to filter.
4871
  *
4872
  * @return string
4873
  */
4874
+ public function filter_description( $value ) {
4875
  // Decode entities
4876
+ $value = $this->html_entity_decode( $value );
4877
  $value = preg_replace(
4878
  array(
4879
+ '#<a.*?>([^>]*)</a>#i', // Remove link but keep anchor text
4880
  '@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@',// Remove URLs
4881
  ),
4882
  array(
4883
+ '$1', // Replacement link's anchor text.
4884
  '', // Replacement URLs
4885
  ),
4886
  $value
4887
  );
4888
  // Strip html
4889
  $value = wp_strip_all_tags( $value );
4890
+ // Encode to valid SEO html entities
4891
+ $value = $this->seo_entity_encode( $value );
4892
  // Internal whitespace trim.
4893
  $value = preg_replace( '/\s\s+/u', ' ', $value );
4894
  // External trim.
4895
  return trim( $value );
4896
  }
4897
 
4898
+ /**
4899
+ * Returns string with decoded html entities.
4900
+ * - Custom html_entity_decode supported on PHP 5.2
4901
+ *
4902
+ * @since 2.3.14
4903
+ *
4904
+ * @param string $value Value to decode.
4905
+ *
4906
+ * @return string
4907
+ */
4908
+ private function html_entity_decode( $value ) {
4909
+ // Special conversions
4910
+ $value = preg_replace(
4911
+ array(
4912
+ '/\“|\”|&#[xX]00022;|&#34;|&[lLrRbB](dquo|DQUO)(?:[rR])?;|&#[xX]0201[dDeE];'
4913
+ .'|&[OoCc](pen|lose)[Cc]urly[Dd]ouble[Qq]uote;|&#822[012];|&#[xX]27;|&#039;/', // Double quotes
4914
+ ),
4915
+ array(
4916
+ '"', // Double quotes
4917
+ ),
4918
+ $value
4919
+ );
4920
+ return html_entity_decode( $value );
4921
+ }
4922
+
4923
+ /**
4924
+ * Returns SEO ready string with encoded HTML entitites.
4925
+ *
4926
+ * @since 2.3.14
4927
+ *
4928
+ * @param string $value Value to encode.
4929
+ *
4930
+ * @return string
4931
+ */
4932
+ private function seo_entity_encode( $value ) {
4933
+ return preg_replace(
4934
+ array(
4935
+ '/\"|\“|\”|\„/', // Double quotes
4936
+ '/\'/', // Apostrophes
4937
+ ),
4938
+ array(
4939
+ '&quot;', // Double quotes
4940
+ '&apos;', // Apostrophes
4941
+ ),
4942
+ $value
4943
+ );
4944
+ }
4945
+
4946
  function display_right_sidebar() {
4947
  global $wpdb;
4948
 
all_in_one_seo_pack.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: All In One SEO Pack
4
  Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
5
  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.
6
- Version: 2.3.13.2
7
  Author: Michael Torbert
8
  Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
9
  Text Domain: all-in-one-seo-pack
@@ -31,14 +31,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
31
  * The original WordPress SEO plugin.
32
  *
33
  * @package All-in-One-SEO-Pack
34
- * @version 2.3.13.2
35
  */
36
 
37
  if ( ! defined( 'AIOSEOPPRO' ) ) {
38
  define( 'AIOSEOPPRO', false );
39
  }
40
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
41
- define( 'AIOSEOP_VERSION', '2.3.13.2' );
42
  }
43
  global $aioseop_plugin_name;
44
  $aioseop_plugin_name = 'All in One SEO Pack';
3
  Plugin Name: All In One SEO Pack
4
  Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
5
  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.
6
+ Version: 2.3.14
7
  Author: Michael Torbert
8
  Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
9
  Text Domain: all-in-one-seo-pack
31
  * The original WordPress SEO plugin.
32
  *
33
  * @package All-in-One-SEO-Pack
34
+ * @version 2.3.14
35
  */
36
 
37
  if ( ! defined( 'AIOSEOPPRO' ) ) {
38
  define( 'AIOSEOPPRO', false );
39
  }
40
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
41
+ define( 'AIOSEOP_VERSION', '2.3.14' );
42
  }
43
  global $aioseop_plugin_name;
44
  $aioseop_plugin_name = 'All in One SEO Pack';
modules/aioseop_opengraph.php CHANGED
@@ -10,6 +10,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
10
  var $fb_object_types;
11
  var $type;
12
 
 
 
 
 
 
13
  function __construct() {
14
  add_action( 'admin_enqueue_scripts', array( $this, 'og_admin_enqueue_scripts' ) );
15
 
@@ -391,10 +396,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
391
  'condshow' => Array( 'aiosp_opengraph_gen_tags' => 'on' ),
392
  ),
393
  'types' => Array(
394
- 'name' => __( 'Enable Facebook Meta for', 'all-in-one-seo-pack' ),
395
  'type' => 'multicheckbox',
396
  'initial_options' => $this->get_post_type_titles( Array( '_builtin' => false ) ),
397
- 'default' => Array( 'post' => 'post', 'page' => 'page' ),
398
  ),
399
  'title' => Array(
400
  'name' => __( 'Title', 'all-in-one-seo-pack' ),
@@ -549,7 +554,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
549
  'setcard',
550
  'customimg_twitter',
551
  ),
552
- 'display' => $display,
553
  'prefix' => 'aioseop_opengraph_',
554
  ),
555
  );
10
  var $fb_object_types;
11
  var $type;
12
 
13
+ /**
14
+ * Module constructor.
15
+ *
16
+ * @since 2.4.14 Added display filter.
17
+ */
18
  function __construct() {
19
  add_action( 'admin_enqueue_scripts', array( $this, 'og_admin_enqueue_scripts' ) );
20
 
396
  'condshow' => Array( 'aiosp_opengraph_gen_tags' => 'on' ),
397
  ),
398
  'types' => Array(
399
+ 'name' => __( 'Enable Facebook Meta for Post Types', 'all-in-one-seo-pack' ),
400
  'type' => 'multicheckbox',
401
  'initial_options' => $this->get_post_type_titles( Array( '_builtin' => false ) ),
402
+ 'default' => Array( 'post' => 'Post', 'page' => 'Page' ),
403
  ),
404
  'title' => Array(
405
  'name' => __( 'Title', 'all-in-one-seo-pack' ),
554
  'setcard',
555
  'customimg_twitter',
556
  ),
557
+ 'display' => apply_filters( 'aioseop_opengraph_display', $display ),
558
  'prefix' => 'aioseop_opengraph_',
559
  ),
560
  );
modules/aioseop_performance.php CHANGED
@@ -295,18 +295,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
295
  }
296
 
297
  do {
298
- if ( ! empty( $_REQUEST['sfwd_debug_submit'] ) || ! empty( $_REQUEST['sfwd_update_check'] ) ) {
299
  $nonce = $_REQUEST['sfwd_debug_nonce'];
300
  if ( ! wp_verify_nonce( $nonce, 'sfwd-debug-nonce' ) ) {
301
  echo "<div class='sfwd_debug_error'>" . __( 'Form submission error: verification check failed.', 'all-in-one-seo-pack' ) . '</div>';
302
  break;
303
  }
304
- if ( ! empty( $_REQUEST['sfwd_update_check'] ) ) {
305
- global $aioseop_update_checker;
306
- $aioseop_update_checker->checkForUpdates();
307
- echo "<div class='sfwd_debug_mail_sent'>" . sprintf( __( '%s has checked for updates.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ) . '</div>';
308
- break;
309
- }
310
  $email = '';
311
  if ( ! empty( $_REQUEST['sfwd_debug_send_email'] ) ) {
312
  $email = sanitize_email( $_REQUEST['sfwd_debug_send_email'] );
@@ -356,11 +350,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
356
  $nonce = wp_create_nonce( 'sfwd-debug-nonce' );
357
  $buf = '<input name="sfwd_debug_send_email" type="text" value="" placeholder="' . __( 'E-mail debug information', 'all-in-one-seo-pack' ) . '"><input name="sfwd_debug_nonce" type="hidden" value="' .
358
  $nonce . '"><input name="sfwd_debug_submit" type="submit" value="' . __( 'Submit', 'all-in-one-seo-pack' ) . '" class="button-primary">';
359
-
360
- if ( AIOSEOPPRO ) {
361
- $buf .= '<p><input name="sfwd_update_check" type="submit" value="' . __( 'Check For Updates', 'all-in-one-seo-pack' ) . '" class="button-primary">';
362
- }
363
-
364
  return $buf;
365
  }
366
 
295
  }
296
 
297
  do {
298
+ if ( ! empty( $_REQUEST['sfwd_debug_submit'] ) ) {
299
  $nonce = $_REQUEST['sfwd_debug_nonce'];
300
  if ( ! wp_verify_nonce( $nonce, 'sfwd-debug-nonce' ) ) {
301
  echo "<div class='sfwd_debug_error'>" . __( 'Form submission error: verification check failed.', 'all-in-one-seo-pack' ) . '</div>';
302
  break;
303
  }
 
 
 
 
 
 
304
  $email = '';
305
  if ( ! empty( $_REQUEST['sfwd_debug_send_email'] ) ) {
306
  $email = sanitize_email( $_REQUEST['sfwd_debug_send_email'] );
350
  $nonce = wp_create_nonce( 'sfwd-debug-nonce' );
351
  $buf = '<input name="sfwd_debug_send_email" type="text" value="" placeholder="' . __( 'E-mail debug information', 'all-in-one-seo-pack' ) . '"><input name="sfwd_debug_nonce" type="hidden" value="' .
352
  $nonce . '"><input name="sfwd_debug_submit" type="submit" value="' . __( 'Submit', 'all-in-one-seo-pack' ) . '" class="button-primary">';
 
 
 
 
 
353
  return $buf;
354
  }
355
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtor
4
  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
5
  Requires at least: 4.0
6
  Tested up to: 4.8
7
- Stable tag: 2.3.13.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
4
  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
5
  Requires at least: 4.0
6
  Tested up to: 4.8
7
+ Stable tag: 2.3.14
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10