WordPress SEO Plugin – Rank Math - Version 1.0.100.1

Version Description

Download this release

Release Info

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

Code changes from version 1.0.100 to 1.0.100.1

includes/class-thumbnail-overlay.php CHANGED
@@ -45,7 +45,11 @@ class Thumbnail_Overlay {
45
  public function generate_overlay_thumbnail() {
46
  $thumbnail_id = Param::request( 'id', 0, FILTER_VALIDATE_INT );
47
  $type = Param::request( 'type', 'play' );
48
- $secret = Param::request( 'secret', '' );
 
 
 
 
49
  $choices = Helper::choices_overlay_images();
50
  if ( ! isset( $choices[ $type ] ) ) {
51
  die();
45
  public function generate_overlay_thumbnail() {
46
  $thumbnail_id = Param::request( 'id', 0, FILTER_VALIDATE_INT );
47
  $type = Param::request( 'type', 'play' );
48
+ $secret = Param::request( 'hash', '' );
49
+ if ( ! $secret ) {
50
+ $secret = Param::request( 'secret', '' );
51
+ }
52
+
53
  $choices = Helper::choices_overlay_images();
54
  if ( ! isset( $choices[ $type ] ) ) {
55
  die();
includes/opengraph/class-image.php CHANGED
@@ -130,7 +130,7 @@ class Image {
130
  $og_image = $image_meta['url'];
131
  if ( $overlay && ! empty( $image_meta['id'] ) ) {
132
  $secret = $this->generate_secret( $image_meta['id'], $overlay );
133
- $og_image = admin_url( "admin-ajax.php?action=rank_math_overlay_thumb&id={$image_meta['id']}&type={$overlay}&secret={$secret}" );
134
  }
135
  $this->opengraph->tag( 'og:image', esc_url_raw( $og_image ) );
136
 
@@ -223,10 +223,19 @@ class Image {
223
  * @param string $img The image we are about to add.
224
  */
225
  $filter_image_url = trim( $this->do_filter( "opengraph/{$this->network}/image", isset( $attachment['url'] ) ? $attachment['url'] : '' ) );
226
- if ( ! empty( $filter_image_url ) ) {
227
  $attachment = [ 'url' => $filter_image_url ];
228
  }
229
 
 
 
 
 
 
 
 
 
 
230
  if ( ! is_array( $attachment ) || empty( $attachment['url'] ) ) {
231
  return;
232
  }
130
  $og_image = $image_meta['url'];
131
  if ( $overlay && ! empty( $image_meta['id'] ) ) {
132
  $secret = $this->generate_secret( $image_meta['id'], $overlay );
133
+ $og_image = admin_url( "admin-ajax.php?action=rank_math_overlay_thumb&id={$image_meta['id']}&type={$overlay}&hash={$secret}" );
134
  }
135
  $this->opengraph->tag( 'og:image', esc_url_raw( $og_image ) );
136
 
223
  * @param string $img The image we are about to add.
224
  */
225
  $filter_image_url = trim( $this->do_filter( "opengraph/{$this->network}/image", isset( $attachment['url'] ) ? $attachment['url'] : '' ) );
226
+ if ( ! empty( $filter_image_url ) && $filter_image_url !== $attachment['url'] ) {
227
  $attachment = [ 'url' => $filter_image_url ];
228
  }
229
 
230
+ /**
231
+ * Secondary filter to allow changing the whole array.
232
+ * The dynamic part of the hook name, $this->network, is the network slug (facebook, twitter).
233
+ * This makes it possible to change the image ID too, to allow for image overlays.
234
+ *
235
+ * @param array $attachment The image we are about to add.
236
+ */
237
+ $attachment = $this->do_filter( "opengraph/{$this->network}/image_array", $attachment );
238
+
239
  if ( ! is_array( $attachment ) || empty( $attachment['url'] ) ) {
240
  return;
241
  }
includes/opengraph/class-twitter.php CHANGED
@@ -195,7 +195,7 @@ class Twitter extends OpenGraph {
195
  $overlay = $this->get_overlay_image( $this->prefix );
196
  if ( $overlay && ! empty( $image_meta['id'] ) ) {
197
  $secret = $images->generate_secret( $image_meta['id'], $overlay );
198
- $image_url = admin_url( "admin-ajax.php?action=rank_math_overlay_thumb&id={$image_meta['id']}&type={$overlay}&secret={$secret}" );
199
  }
200
 
201
  $this->tag( 'twitter:image', esc_url_raw( $image_url ) );
195
  $overlay = $this->get_overlay_image( $this->prefix );
196
  if ( $overlay && ! empty( $image_meta['id'] ) ) {
197
  $secret = $images->generate_secret( $image_meta['id'], $overlay );
198
+ $image_url = admin_url( "admin-ajax.php?action=rank_math_overlay_thumb&id={$image_meta['id']}&type={$overlay}&hash={$secret}" );
199
  }
200
 
201
  $this->tag( 'twitter:image', esc_url_raw( $image_url ) );
rank-math.php CHANGED
@@ -9,7 +9,7 @@
9
  *
10
  * @wordpress-plugin
11
  * Plugin Name: Rank Math SEO
12
- * Version: 1.0.100
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.100';
38
 
39
  /**
40
  * Rank Math database version.
9
  *
10
  * @wordpress-plugin
11
  * Plugin Name: Rank Math SEO
12
+ * Version: 1.0.100.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.100.1';
38
 
39
  /**
40
  * Rank Math database version.
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: seo, sitemap, google search console, schema, redirection, WordPress SEO
5
  Tested up to: 6.0
6
  Requires at least: 5.6
7
  Requires PHP: 7.4
8
- Stable tag: 1.0.100
9
  License: GPLv3 or later
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
11
 
@@ -586,4 +586,8 @@ Please drop us an email at support@rankmath.com and we would be more than happy
586
  * Fixed: Filter to change [Opengraph image](https://rankmath.com/kb/filters-hooks-api-developer/#change-opengraph-image) was not working when an image was not added in the settings
587
  * Fixed: Sitemap was getting timed out on some sites hosted on Cloudflare when the [Include Images in Sitemap](https://rankmath.com/kb/configure-sitemaps/#images-in-sitemaps) option was enabled
588
 
 
 
 
 
589
  Full changelog can be found here - **[Rank Math changelog](https://rankmath.com/changelog/?utm_source=Plugin&utm_medium=Changelog&utm_campaign=WP)**
5
  Tested up to: 6.0
6
  Requires at least: 5.6
7
  Requires PHP: 7.4
8
+ Stable tag: 1.0.100.1
9
  License: GPLv3 or later
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
11
 
586
  * Fixed: Filter to change [Opengraph image](https://rankmath.com/kb/filters-hooks-api-developer/#change-opengraph-image) was not working when an image was not added in the settings
587
  * Fixed: Sitemap was getting timed out on some sites hosted on Cloudflare when the [Include Images in Sitemap](https://rankmath.com/kb/configure-sitemaps/#images-in-sitemaps) option was enabled
588
 
589
+ = 1.0.100.1[Oct 21, 2022] =
590
+ * Improved: Renamed the secret parameter in the thumbnail overlay URL to hash to avoid any confusion, as this is not a sensitive information
591
+ * Fixed: [Icon Overlay](https://rankmath.com/kb/meta-box-social-tab/#add-icon-overlay-to-thumbnails) was not working after the last update
592
+
593
  Full changelog can be found here - **[Rank Math changelog](https://rankmath.com/changelog/?utm_source=Plugin&utm_medium=Changelog&utm_campaign=WP)**