Version Description
[Feb 5, 2021] = * Fixed: FAQ Schema markup showing error if HTML tags are used in the answer area
Download this release
Release Info
Developer | rankmath |
Plugin | WordPress SEO Plugin – Rank Math |
Version | 1.0.57.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.57 to 1.0.57.1
includes/modules/schema/class-admin.php
CHANGED
@@ -88,21 +88,20 @@ class Admin extends Base {
|
|
88 |
return;
|
89 |
}
|
90 |
|
91 |
-
$
|
92 |
-
$schemas = \json_decode( stripslashes( $cmb->data_to_save['rank-math-schemas'] ), true );
|
93 |
-
|
94 |
foreach ( $schemas as $meta_id => $schema ) {
|
95 |
$meta_key = 'rank_math_schema_' . $schema['@type'];
|
|
|
96 |
|
97 |
// Add new.
|
98 |
if ( Str::starts_with( 'new-', $meta_id ) ) {
|
99 |
-
$new_ids[ $meta_id ] = add_post_meta( $cmb->object_id, $meta_key, $
|
100 |
continue;
|
101 |
}
|
102 |
|
103 |
// Update old.
|
104 |
$db_id = absint( str_replace( 'schema-', '', $meta_id ) );
|
105 |
-
$prev_value = update_metadata_by_mid( 'post', $db_id, $
|
106 |
}
|
107 |
|
108 |
do_action( 'rank_math/schema/update', $cmb->object_id, $schemas );
|
88 |
return;
|
89 |
}
|
90 |
|
91 |
+
$schemas = \json_decode( stripslashes( $cmb->data_to_save['rank-math-schemas'] ), true );
|
|
|
|
|
92 |
foreach ( $schemas as $meta_id => $schema ) {
|
93 |
$meta_key = 'rank_math_schema_' . $schema['@type'];
|
94 |
+
$schema = wp_kses_post_deep( $schema );
|
95 |
|
96 |
// Add new.
|
97 |
if ( Str::starts_with( 'new-', $meta_id ) ) {
|
98 |
+
$new_ids[ $meta_id ] = add_post_meta( $cmb->object_id, $meta_key, $schema );
|
99 |
continue;
|
100 |
}
|
101 |
|
102 |
// Update old.
|
103 |
$db_id = absint( str_replace( 'schema-', '', $meta_id ) );
|
104 |
+
$prev_value = update_metadata_by_mid( 'post', $db_id, $schema, $meta_key );
|
105 |
}
|
106 |
|
107 |
do_action( 'rank_math/schema/update', $cmb->object_id, $schemas );
|
includes/modules/schema/class-jsonld.php
CHANGED
@@ -156,7 +156,7 @@ class JsonLD {
|
|
156 |
|
157 |
$options = defined( 'RANKMATH_DEBUG' ) && RANKMATH_DEBUG ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES : JSON_UNESCAPED_SLASHES;
|
158 |
|
159 |
-
echo '<script type="application/ld+json" class="rank-math-' . esc_attr( $class ) . '">' .
|
160 |
}
|
161 |
}
|
162 |
|
156 |
|
157 |
$options = defined( 'RANKMATH_DEBUG' ) && RANKMATH_DEBUG ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES : JSON_UNESCAPED_SLASHES;
|
158 |
|
159 |
+
echo '<script type="application/ld+json" class="rank-math-' . esc_attr( $class ) . '">' . wp_json_encode( wp_kses_post_deep( $json ), $options ) . '</script>' . "\n";
|
160 |
}
|
161 |
}
|
162 |
|
includes/modules/schema/class-snippet-shortcode.php
CHANGED
@@ -297,7 +297,7 @@ class Snippet_Shortcode {
|
|
297 |
public function output_field( $title, $value ) {
|
298 |
?>
|
299 |
<p>
|
300 |
-
<strong><?php echo $title; // phpcs:ignore ?>: </strong>
|
301 |
<?php echo is_array( $value ) ? implode( ', ', $value ) : wp_kses_post( $value ); // phpcs:ignore ?>
|
302 |
</p>
|
303 |
<?php
|
@@ -314,7 +314,7 @@ class Snippet_Shortcode {
|
|
314 |
$title = isset( $this->schema['title'] ) ? $this->schema['title'] : $this->schema['name'];
|
315 |
$title = $title && '' !== $title ? $title : Helper::replace_vars( '%title%', $this->post );
|
316 |
?>
|
317 |
-
<h5 class="rank-math-title"><?php echo $title; // phpcs:ignore ?></h5>
|
318 |
<?php
|
319 |
}
|
320 |
|
@@ -330,7 +330,7 @@ class Snippet_Shortcode {
|
|
330 |
}
|
331 |
$description = $description && '' !== $description ? $description : ( $excerpt ? $excerpt : Helper::get_post_meta( 'description', $this->post->ID ) );
|
332 |
?>
|
333 |
-
<p><?php echo do_shortcode( $description ); ?></p>
|
334 |
<?php
|
335 |
}
|
336 |
|
297 |
public function output_field( $title, $value ) {
|
298 |
?>
|
299 |
<p>
|
300 |
+
<strong><?php echo esc_html( $title ); // phpcs:ignore ?>: </strong>
|
301 |
<?php echo is_array( $value ) ? implode( ', ', $value ) : wp_kses_post( $value ); // phpcs:ignore ?>
|
302 |
</p>
|
303 |
<?php
|
314 |
$title = isset( $this->schema['title'] ) ? $this->schema['title'] : $this->schema['name'];
|
315 |
$title = $title && '' !== $title ? $title : Helper::replace_vars( '%title%', $this->post );
|
316 |
?>
|
317 |
+
<h5 class="rank-math-title"><?php echo esc_html( $title ); // phpcs:ignore ?></h5>
|
318 |
<?php
|
319 |
}
|
320 |
|
330 |
}
|
331 |
$description = $description && '' !== $description ? $description : ( $excerpt ? $excerpt : Helper::get_post_meta( 'description', $this->post->ID ) );
|
332 |
?>
|
333 |
+
<p><?php echo wp_kses_post( do_shortcode( $description ) ); ?></p>
|
334 |
<?php
|
335 |
}
|
336 |
|
includes/rest/class-admin.php
CHANGED
@@ -213,21 +213,20 @@ class Admin extends WP_REST_Controller {
|
|
213 |
public function update_schemas( WP_REST_Request $request ) {
|
214 |
$object_id = $request->get_param( 'objectID' );
|
215 |
$schemas = $request->get_param( 'schemas' );
|
216 |
-
|
217 |
$new_ids = [];
|
218 |
-
$sanitizer = Sanitize::get();
|
219 |
foreach ( $schemas as $meta_id => $schema ) {
|
220 |
$meta_key = 'rank_math_schema_' . $schema['@type'];
|
|
|
221 |
|
222 |
// Add new.
|
223 |
if ( Str::starts_with( 'new-', $meta_id ) ) {
|
224 |
-
$new_ids[ $meta_id ] = add_post_meta( $object_id, $meta_key, $
|
225 |
continue;
|
226 |
}
|
227 |
|
228 |
// Update old.
|
229 |
$db_id = absint( str_replace( 'schema-', '', $meta_id ) );
|
230 |
-
$prev_value = update_metadata_by_mid( 'post', $db_id, $
|
231 |
}
|
232 |
|
233 |
do_action( 'rank_math/schema/update', $object_id, $schemas );
|
213 |
public function update_schemas( WP_REST_Request $request ) {
|
214 |
$object_id = $request->get_param( 'objectID' );
|
215 |
$schemas = $request->get_param( 'schemas' );
|
|
|
216 |
$new_ids = [];
|
|
|
217 |
foreach ( $schemas as $meta_id => $schema ) {
|
218 |
$meta_key = 'rank_math_schema_' . $schema['@type'];
|
219 |
+
$schema = wp_kses_post_deep( $schema );
|
220 |
|
221 |
// Add new.
|
222 |
if ( Str::starts_with( 'new-', $meta_id ) ) {
|
223 |
+
$new_ids[ $meta_id ] = add_post_meta( $object_id, $meta_key, $schema );
|
224 |
continue;
|
225 |
}
|
226 |
|
227 |
// Update old.
|
228 |
$db_id = absint( str_replace( 'schema-', '', $meta_id ) );
|
229 |
+
$prev_value = update_metadata_by_mid( 'post', $db_id, $schema, $meta_key );
|
230 |
}
|
231 |
|
232 |
do_action( 'rank_math/schema/update', $object_id, $schemas );
|
rank-math.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
*
|
10 |
* @wordpress-plugin
|
11 |
* Plugin Name: Rank Math SEO
|
12 |
-
* Version: 1.0.57
|
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.57';
|
38 |
|
39 |
/**
|
40 |
* Rank Math database version.
|
9 |
*
|
10 |
* @wordpress-plugin
|
11 |
* Plugin Name: Rank Math SEO
|
12 |
+
* Version: 1.0.57.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.57.1';
|
38 |
|
39 |
/**
|
40 |
* Rank Math database version.
|
readme.txt
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
Contributors: rankmath
|
3 |
Plugin link: https://rankmath.com/?utm_source=LP&utm_campaign=WP
|
4 |
Tags: seo, sitemap, google search console, schema, redirection, WordPress SEO
|
5 |
-
Tested up to: 5.6
|
6 |
Requires at least: 5.2
|
7 |
Requires PHP: 7.0
|
8 |
-
Stable tag: 1.0.57
|
9 |
License: GPL-2.0+
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
|
@@ -475,7 +475,10 @@ Please drop us an email at support@rankmath.com and we would be more than happy
|
|
475 |
|
476 |
== Changelog ==
|
477 |
|
478 |
-
= 1.0.57 [Feb
|
|
|
|
|
|
|
479 |
* **Improved: The overall [Schema](https://rankmath.com/blog/schema-markup/) output and generation to a great level after consulting top Schema consultants**
|
480 |
* Added: Undo and Redo now works like a charm inside the [Schema Generator](https://www.youtube.com/watch?v=4DapQQd6ceE) popup
|
481 |
* Added: Added an option to [send an email when an update](https://rankmath.com/kb/version-control/#update-notification-email) is available for the Rank Math SEO plugin
|
2 |
Contributors: rankmath
|
3 |
Plugin link: https://rankmath.com/?utm_source=LP&utm_campaign=WP
|
4 |
Tags: seo, sitemap, google search console, schema, redirection, WordPress SEO
|
5 |
+
Tested up to: 5.6.1
|
6 |
Requires at least: 5.2
|
7 |
Requires PHP: 7.0
|
8 |
+
Stable tag: 1.0.57.1
|
9 |
License: GPL-2.0+
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
|
475 |
|
476 |
== Changelog ==
|
477 |
|
478 |
+
= 1.0.57.1 [Feb 5, 2021] =
|
479 |
+
* Fixed: FAQ Schema markup showing error if HTML tags are used in the answer area
|
480 |
+
|
481 |
+
= 1.0.57 [Feb 3, 2021] =
|
482 |
* **Improved: The overall [Schema](https://rankmath.com/blog/schema-markup/) output and generation to a great level after consulting top Schema consultants**
|
483 |
* Added: Undo and Redo now works like a charm inside the [Schema Generator](https://www.youtube.com/watch?v=4DapQQd6ceE) popup
|
484 |
* Added: Added an option to [send an email when an update](https://rankmath.com/kb/version-control/#update-notification-email) is available for the Rank Math SEO plugin
|