All in One SEO Pack - Version 3.3.1

Version Description

Download this release

Release Info

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

Code changes from version 3.3 to 3.3.1

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 WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 50 million downloads since 2007.
6
- Version: 3.3
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,7 +31,7 @@ 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 3.3
35
  */
36
 
37
  if ( ! defined( 'AIOSEOPPRO' ) ) {
@@ -45,7 +45,7 @@ if ( ! defined( 'AIOSEOP_PLUGIN_NAME' ) ) {
45
  }
46
  }
47
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
48
- define( 'AIOSEOP_VERSION', '3.3' );
49
  }
50
 
51
  /*
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 WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 50 million downloads since 2007.
6
+ Version: 3.3.1
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 3.3.1
35
  */
36
 
37
  if ( ! defined( 'AIOSEOPPRO' ) ) {
45
  }
46
  }
47
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
48
+ define( 'AIOSEOP_VERSION', '3.3.1' );
49
  }
50
 
51
  /*
inc/general/aioseop-robots-meta.php CHANGED
@@ -14,6 +14,20 @@
14
  */
15
  class AIOSEOP_Robots_Meta {
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  /**
18
  * The get_robots_meta() function.
19
  *
@@ -125,10 +139,15 @@ class AIOSEOP_Robots_Meta {
125
  * @return string
126
  */
127
  private function get_meta_value( $key ) {
128
- $requested_page = get_queried_object();
129
  $meta = array();
130
  $meta_value = '';
 
131
 
 
 
 
 
 
132
  if ( property_exists( $requested_page, 'ID' ) ) {
133
  $meta = get_post_meta( $requested_page->ID );
134
  }
@@ -227,8 +246,7 @@ class AIOSEOP_Robots_Meta {
227
  * @return bool
228
  */
229
  private function is_noindexed_paginated_page( $page_number ) {
230
- global $aioseop_options;
231
- if ( ! empty( $aioseop_options['aiosp_paginated_noindex'] ) && 1 < $page_number ) {
232
  return true;
233
  }
234
  return false;
@@ -245,8 +263,7 @@ class AIOSEOP_Robots_Meta {
245
  * @return bool
246
  */
247
  private function is_nofollowed_paginated_page( $page_number ) {
248
- global $aioseop_options;
249
- if ( ! empty( $aioseop_options['aiosp_paginated_nofollow'] ) && 1 < $page_number ) {
250
  return true;
251
  }
252
  return false;
@@ -281,14 +298,13 @@ class AIOSEOP_Robots_Meta {
281
  * @return bool
282
  */
283
  private function is_noindexed_tax() {
284
- global $aioseop_options;
285
  if (
286
- ( is_category() && ! empty( $aioseop_options['aiosp_category_noindex'] ) ) ||
287
- ( is_date() && ! empty( $aioseop_options['aiosp_archive_date_noindex'] ) ) ||
288
- ( is_author() && ! empty( $aioseop_options['aiosp_archive_author_noindex'] ) ) ||
289
- ( is_tag() && ! empty( $aioseop_options['aiosp_tags_noindex'] ) ) ||
290
- ( is_search() && ! empty( $aioseop_options['aiosp_search_noindex'] ) ) ||
291
- ( is_404() && ! empty( $aioseop_options['aiosp_404_noindex'] ) ) ||
292
  ( is_tax() && in_array( get_query_var( 'taxonomy' ), $this->get_noindexed_taxonomies() ) )
293
  ) {
294
  return true;
@@ -306,9 +322,8 @@ class AIOSEOP_Robots_Meta {
306
  * @return array
307
  */
308
  private function get_noindexed_taxonomies() {
309
- global $aioseop_options;
310
- if ( isset( $aioseop_options['aiosp_tax_noindex'] ) && ! empty( $aioseop_options['aiosp_tax_noindex'] ) ) {
311
- return $aioseop_options['aiosp_tax_noindex'];
312
  }
313
  return array();
314
  }
@@ -326,10 +341,9 @@ class AIOSEOP_Robots_Meta {
326
  * @return bool
327
  */
328
  private function is_noindexed_singular( $post_type, $post_meta_noindex ) {
329
- global $aioseop_options;
330
  if ( is_singular() && '' === $post_meta_noindex &&
331
- ! empty( $aioseop_options['aiosp_cpostnoindex'] ) &&
332
- in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] )
333
  ) {
334
  return true;
335
  }
@@ -349,10 +363,9 @@ class AIOSEOP_Robots_Meta {
349
  * @return bool
350
  */
351
  private function is_nofollowed_singular( $post_type, $post_meta_follow ) {
352
- global $aioseop_options;
353
  if ( is_singular() && '' === $post_meta_follow &&
354
- ! empty( $aioseop_options['aiosp_cpostnofollow'] ) &&
355
- in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] )
356
  ) {
357
  return true;
358
  }
14
  */
15
  class AIOSEOP_Robots_Meta {
16
 
17
+ /**
18
+ * User-defined plugin options.
19
+ *
20
+ * @since 3.3.1
21
+ *
22
+ * @var array
23
+ */
24
+ private static $plugin_options;
25
+
26
+ public function __construct() {
27
+ global $aioseop_options;
28
+ $plugin_options = $aioseop_options;
29
+ }
30
+
31
  /**
32
  * The get_robots_meta() function.
33
  *
139
  * @return string
140
  */
141
  private function get_meta_value( $key ) {
 
142
  $meta = array();
143
  $meta_value = '';
144
+ $requested_page = get_queried_object();
145
 
146
+ if ( empty( $requested_page ) ) {
147
+ return $meta_value;
148
+ }
149
+
150
+ // TODO Use $meta_opts when get_current_options() is refactored - #2729.
151
  if ( property_exists( $requested_page, 'ID' ) ) {
152
  $meta = get_post_meta( $requested_page->ID );
153
  }
246
  * @return bool
247
  */
248
  private function is_noindexed_paginated_page( $page_number ) {
249
+ if ( ! empty( $plugin_options['aiosp_paginated_noindex'] ) && 1 < $page_number ) {
 
250
  return true;
251
  }
252
  return false;
263
  * @return bool
264
  */
265
  private function is_nofollowed_paginated_page( $page_number ) {
266
+ if ( ! empty( $plugin_options['aiosp_paginated_nofollow'] ) && 1 < $page_number ) {
 
267
  return true;
268
  }
269
  return false;
298
  * @return bool
299
  */
300
  private function is_noindexed_tax() {
 
301
  if (
302
+ ( is_category() && ! empty( $plugin_options['aiosp_category_noindex'] ) ) ||
303
+ ( is_date() && ! empty( $plugin_options['aiosp_archive_date_noindex'] ) ) ||
304
+ ( is_author() && ! empty( $plugin_options['aiosp_archive_author_noindex'] ) ) ||
305
+ ( is_tag() && ! empty( $plugin_options['aiosp_tags_noindex'] ) ) ||
306
+ ( is_search() && ! empty( $plugin_options['aiosp_search_noindex'] ) ) ||
307
+ ( is_404() && ! empty( $plugin_options['aiosp_404_noindex'] ) ) ||
308
  ( is_tax() && in_array( get_query_var( 'taxonomy' ), $this->get_noindexed_taxonomies() ) )
309
  ) {
310
  return true;
322
  * @return array
323
  */
324
  private function get_noindexed_taxonomies() {
325
+ if ( isset( $plugin_options['aiosp_tax_noindex'] ) && ! empty( $plugin_options['aiosp_tax_noindex'] ) ) {
326
+ return $plugin_options['aiosp_tax_noindex'];
 
327
  }
328
  return array();
329
  }
341
  * @return bool
342
  */
343
  private function is_noindexed_singular( $post_type, $post_meta_noindex ) {
 
344
  if ( is_singular() && '' === $post_meta_noindex &&
345
+ ! empty( $plugin_options['aiosp_cpostnoindex'] ) &&
346
+ in_array( $post_type, $plugin_options['aiosp_cpostnoindex'] )
347
  ) {
348
  return true;
349
  }
363
  * @return bool
364
  */
365
  private function is_nofollowed_singular( $post_type, $post_meta_follow ) {
 
366
  if ( is_singular() && '' === $post_meta_follow &&
367
+ ! empty( $plugin_options['aiosp_cpostnofollow'] ) &&
368
+ in_array( $post_type, $plugin_options['aiosp_cpostnofollow'] )
369
  ) {
370
  return true;
371
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: hallsofmontezuma, semperplugins, wpsmort, arnaudbroes
3
  Tags: SEO, Google Search Console, XML Sitemap, meta description, meta title, noindex
4
  Requires at least: 4.9
5
  Tested up to: 5.3
6
- Stable tag: 3.3
7
  License: GPLv2 or later
8
  Requires PHP: 5.2.4
9
 
3
  Tags: SEO, Google Search Console, XML Sitemap, meta description, meta title, noindex
4
  Requires at least: 4.9
5
  Tested up to: 5.3
6
+ Stable tag: 3.3.1
7
  License: GPLv2 or later
8
  Requires PHP: 5.2.4
9