WordPress SEO Plugin – Rank Math - Version 1.0.27.1

Version Description

[Jun 21, 2019] = * Fixed Product page showing 'Page not found error' when Remove base option is enabled * Fixed security issue related to Rank Math Settings for logged in users * Fixed exclude posts option not working in the Sitemap

Full changelog can be found here - Rank Math SEO changelog

Download this release

Release Info

Developer rankmath
Plugin Icon 128x128 WordPress SEO Plugin – Rank Math
Version 1.0.27.1
Comparing to
See all releases

Code changes from version 1.0.27 to 1.0.27.1

includes/admin/class-options.php CHANGED
@@ -198,6 +198,11 @@ class Options {
198
  * Reset options.
199
  */
200
  public function reset_options() {
 
 
 
 
 
201
  $url = wp_get_referer();
202
  if ( ! $url ) {
203
  $url = admin_url();
@@ -274,6 +279,7 @@ class Options {
274
  <?php $machine->options_page_metabox(); ?>
275
 
276
  <footer class="form-footer rank-math-ui settings-footer wp-clearfix">
 
277
  <input type="submit" name="reset-cmb" id="rank-math-reset-cmb" value="Reset Options" class="button button-secondary button-xlarge reset-options alignleft">
278
  <input type="submit" name="submit-cmb" id="submit-cmb" class="button button-primary button-xlarge save-options" value="Save Changes">
279
  </footer>
198
  * Reset options.
199
  */
200
  public function reset_options() {
201
+
202
+ if ( ! check_admin_referer( 'rank-math-reset-options' ) || ! current_user_can( 'manage_options' ) ) {
203
+ return false;
204
+ }
205
+
206
  $url = wp_get_referer();
207
  if ( ! $url ) {
208
  $url = admin_url();
279
  <?php $machine->options_page_metabox(); ?>
280
 
281
  <footer class="form-footer rank-math-ui settings-footer wp-clearfix">
282
+ <?php wp_nonce_field( 'rank-math-reset-options' ); ?>
283
  <input type="submit" name="reset-cmb" id="rank-math-reset-cmb" value="Reset Options" class="button button-secondary button-xlarge reset-options alignleft">
284
  <input type="submit" name="submit-cmb" id="submit-cmb" class="button button-primary button-xlarge save-options" value="Save Changes">
285
  </footer>
includes/modules/sitemap/providers/class-post-type.php CHANGED
@@ -183,8 +183,8 @@ class Post_Type implements Provider {
183
  }
184
 
185
  foreach ( $posts as $post ) {
186
-
187
- if ( ! Helper::is_post_indexable( $post->ID ) ) {
188
  continue;
189
  }
190
 
@@ -206,7 +206,7 @@ class Post_Type implements Provider {
206
  }
207
 
208
  $stacked_urls[] = $url['loc'];
209
- if ( $post->ID === $this->get_page_for_posts_id() || $post->ID === $this->get_page_on_front_id() ) {
210
  array_unshift( $links, $url );
211
  continue;
212
  }
183
  }
184
 
185
  foreach ( $posts as $post ) {
186
+ $post_id = (int) $post->ID;
187
+ if ( ! Helper::is_post_indexable( $post_id ) ) {
188
  continue;
189
  }
190
 
206
  }
207
 
208
  $stacked_urls[] = $url['loc'];
209
+ if ( $post_id === $this->get_page_for_posts_id() || $post_id === $this->get_page_on_front_id() ) {
210
  array_unshift( $links, $url );
211
  continue;
212
  }
includes/modules/woocommerce/class-woocommerce.php CHANGED
@@ -41,7 +41,8 @@ class WooCommerce {
41
  new Admin;
42
  }
43
 
44
- $this->action( 'wp', 'integrations' );
 
45
  if ( Helper::get_settings( 'general.wc_remove_product_base' ) ) {
46
  $this->filter( 'post_type_link', 'product_post_type_link', 1, 2 );
47
  }
@@ -57,6 +58,10 @@ class WooCommerce {
57
  * Initialize integrations.
58
  */
59
  public function integrations() {
 
 
 
 
60
  // Permalink Manager.
61
  if (
62
  Helper::get_settings( 'general.wc_remove_product_base' ) ||
@@ -104,10 +109,9 @@ class WooCommerce {
104
  $replace = [];
105
  $url = explode( '/', $url );
106
  $slug = array_pop( $url );
107
-
108
  if ( 'feed' === $slug ) {
109
- $replace['feed'] = $slug;
110
- $slug = array_pop( $url );
111
  }
112
 
113
  if ( 'amp' === $slug ) {
@@ -613,15 +617,16 @@ class WooCommerce {
613
  $product_rules = [];
614
  $category_rules = [];
615
  foreach ( $this->get_categories() as $category ) {
616
- $category_slug = $remove_parent_slugs ? $category['slug'] : $this->get_category_fullpath( $category );
 
617
 
618
  $category_rules[ $category_base . $category_slug . '/?$' ] = 'index.php?product_cat=' . $category['slug'];
619
  $category_rules[ $category_base . $category_slug . '/(?:feed/)?(feed|rdf|rss|rss2|atom)/?$' ] = 'index.php?product_cat=' . $category['slug'] . '&feed=$matches[1]';
620
  $category_rules[ $category_base . $category_slug . '/' . $wp_rewrite->pagination_base . '/?([0-9]{1,})/?$' ] = 'index.php?product_cat=' . $category['slug'] . '&paged=$matches[1]';
621
 
622
  if ( $remove_product_base && $use_parent_slug ) {
623
- $product_rules[ $category_slug . '/([^/]+)/?$' ] = 'index.php?product=$matches[1]';
624
- $product_rules[ $category_slug . '/([^/]+)/' . $wp_rewrite->comments_pagination_base . '-([0-9]{1,})/?$' ] = 'index.php?product=$matches[1]&cpage=$matches[2]';
625
  }
626
  }
627
 
41
  new Admin;
42
  }
43
 
44
+ $this->integrations();
45
+
46
  if ( Helper::get_settings( 'general.wc_remove_product_base' ) ) {
47
  $this->filter( 'post_type_link', 'product_post_type_link', 1, 2 );
48
  }
58
  * Initialize integrations.
59
  */
60
  public function integrations() {
61
+ if ( is_admin() ) {
62
+ return;
63
+ }
64
+
65
  // Permalink Manager.
66
  if (
67
  Helper::get_settings( 'general.wc_remove_product_base' ) ||
109
  $replace = [];
110
  $url = explode( '/', $url );
111
  $slug = array_pop( $url );
112
+
113
  if ( 'feed' === $slug ) {
114
+ return $request;
 
115
  }
116
 
117
  if ( 'amp' === $slug ) {
617
  $product_rules = [];
618
  $category_rules = [];
619
  foreach ( $this->get_categories() as $category ) {
620
+ $category_path = $this->get_category_fullpath( $category );
621
+ $category_slug = $remove_parent_slugs ? $category['slug'] : $category_path;
622
 
623
  $category_rules[ $category_base . $category_slug . '/?$' ] = 'index.php?product_cat=' . $category['slug'];
624
  $category_rules[ $category_base . $category_slug . '/(?:feed/)?(feed|rdf|rss|rss2|atom)/?$' ] = 'index.php?product_cat=' . $category['slug'] . '&feed=$matches[1]';
625
  $category_rules[ $category_base . $category_slug . '/' . $wp_rewrite->pagination_base . '/?([0-9]{1,})/?$' ] = 'index.php?product_cat=' . $category['slug'] . '&paged=$matches[1]';
626
 
627
  if ( $remove_product_base && $use_parent_slug ) {
628
+ $product_rules[ $category_path . '/([^/]+)/?$' ] = 'index.php?product=$matches[1]';
629
+ $product_rules[ $category_path . '/([^/]+)/' . $wp_rewrite->comments_pagination_base . '-([0-9]{1,})/?$' ] = 'index.php?product=$matches[1]&cpage=$matches[2]';
630
  }
631
  }
632
 
rank-math.php CHANGED
@@ -9,7 +9,7 @@
9
  *
10
  * @wordpress-plugin
11
  * Plugin Name: Rank Math SEO
12
- * Version: 1.0.27
13
  * Plugin URI: https://s.rankmath.com/home
14
  * Description: Rank Math is a revolutionary SEO product that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible.
15
  * Author: Rank Math
@@ -34,7 +34,7 @@ final class RankMath {
34
  *
35
  * @var string
36
  */
37
- public $version = '1.0.27';
38
 
39
  /**
40
  * Rank Math database version.
9
  *
10
  * @wordpress-plugin
11
  * Plugin Name: Rank Math SEO
12
+ * Version: 1.0.27.1
13
  * Plugin URI: https://s.rankmath.com/home
14
  * Description: Rank Math is a revolutionary SEO product that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible.
15
  * Author: Rank Math
34
  *
35
  * @var string
36
  */
37
+ public $version = '1.0.27.1';
38
 
39
  /**
40
  * Rank Math database version.
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: seo, sitemap, google search console, schema, redirection
5
  Tested up to: 5.2.1
6
  Requires at least: 4.6.0
7
  Requires PHP: 5.6
8
- Stable tag: 1.0.27
9
  License: GPL-2.0+
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.txt
11
 
@@ -451,21 +451,9 @@ We look forward to helping you.
451
 
452
  == Changelog ==
453
 
454
- = 1.0.27 [Jun 18, 2019] =
455
- * Added a filter to [show Meta Keywords tag](https://s.rankmath.com/keywordmetatag) to the Search Engines like Yandex
456
- * Added some important security fixes
457
- * Added more improvements to how the SEO Analyzer works inside the plugin
458
- * Enhanced the output of the Rich Snippet's Shortcode showing the formatted date
459
- * Improved the comments to make them more meaningful
460
- * Fixed an issue with the Breadcrumbs not showing the primary category on the product pages
461
- * Fixed a compatibility issue with the Indexing API plugin and Rank Math
462
- * Fixed an issue where product categories were showing 404 when Remove Category Base option was enabled
463
- * Fixed the problem with the categories date variables not working correctly in the settings fields
464
- * Fixed a conflict with Woocommerce One Page checkout plugin
465
- * Fixed an issue where the feeds were not updating when the WooCommerce module was activated
466
- * Fixed a compatibility issue with the Ultra theme, not showing the text editor
467
- * Fixed an issue where the Search Console Box was appearing for all the users in the dashboard
468
- * Fixed a problem in the SEO Analysis where missing 'Focus Keyword in Title' test wasn't working as intended
469
- * Prepared the plugin for upcoming updates related to Gutenberg's compatibility
470
 
471
  Full changelog can be found here - **[Rank Math SEO changelog](https://rankmath.com/changelog)**
5
  Tested up to: 5.2.1
6
  Requires at least: 4.6.0
7
  Requires PHP: 5.6
8
+ Stable tag: 1.0.27.1
9
  License: GPL-2.0+
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.txt
11
 
451
 
452
  == Changelog ==
453
 
454
+ = 1.0.27.1 [Jun 21, 2019] =
455
+ * Fixed Product page showing 'Page not found error' when Remove base option is enabled
456
+ * Fixed security issue related to Rank Math Settings for logged in users
457
+ * Fixed exclude posts option not working in the Sitemap
 
 
 
 
 
 
 
 
 
 
 
 
458
 
459
  Full changelog can be found here - **[Rank Math SEO changelog](https://rankmath.com/changelog)**