Version Description
(04 July 2021) =
- Fixed: Google review page redirect to wrong url, it should redirect to Google review page url. #1457
- Fixed: When the "Defragment Schema Markup" option is enabled knowledge graph markup is displaying on the category post and pages. #1455
- Fixed: Microdata cleaner option does not remove single itemtype, itemprop #1463
- Fixed: Remove the cause property in the Medical condition schema type #1462
- Fixed: Errors in NewsArticle (The property 2 is not recognised by the schema) #1468
- Added: Google Shopping reviews platform #1448
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.81 |
Comparing to | |
See all releases |
Code changes from version 1.9.80 to 1.9.81
- admin_section/fields-generator.php +3 -0
- admin_section/images/reviews_platform_icon/google-shopping-img.png +0 -0
- core/array-list/repeater-fields.php +2 -10
- modules/reviews/reviews_service.php +10 -0
- modules/reviews/reviews_setup.php +5 -4
- output/function.php +9 -2
- output/markup.php +1 -16
- output/service.php +13 -6
- readme.txt +11 -1
- structured-data-for-wp.php +2 -2
- view/taxonomy.php +6 -0
admin_section/fields-generator.php
CHANGED
@@ -20,6 +20,9 @@ class saswp_fields_generator {
|
|
20 |
array(
|
21 |
"image" => "/admin_section/images/reviews_platform_icon/google-1-img.png",
|
22 |
"name" => "Google Reviews"),
|
|
|
|
|
|
|
23 |
array(
|
24 |
"image" => "/admin_section/images/reviews_platform_icon/shopper-approved-img.png",
|
25 |
"name" => "Shopper Approved"),
|
20 |
array(
|
21 |
"image" => "/admin_section/images/reviews_platform_icon/google-1-img.png",
|
22 |
"name" => "Google Reviews"),
|
23 |
+
array(
|
24 |
+
"image" => "/admin_section/images/reviews_platform_icon/google-1-img.png",
|
25 |
+
"name" => "Google Shopping Reviews"),
|
26 |
array(
|
27 |
"image" => "/admin_section/images/reviews_platform_icon/shopper-approved-img.png",
|
28 |
"name" => "Shopper Approved"),
|
admin_section/images/reviews_platform_icon/google-shopping-img.png
ADDED
Binary file
|
core/array-list/repeater-fields.php
CHANGED
@@ -69,8 +69,7 @@ return array( 'schema_type_element' => array(
|
|
69 |
'additional-property' => 'additional_property',
|
70 |
|
71 |
),
|
72 |
-
'MedicalCondition' => array(
|
73 |
-
'mc-cause' => 'mc_cause',
|
74 |
'mc-symptom' => 'mc_symptom',
|
75 |
'mc-risk_factor' => 'mc_risk_factor',
|
76 |
|
@@ -465,14 +464,7 @@ return array( 'schema_type_element' => array(
|
|
465 |
'name' => 'saswp_mc_risk_factor_name',
|
466 |
'type' => 'text',
|
467 |
)
|
468 |
-
),
|
469 |
-
'mc_cause' => array(
|
470 |
-
array(
|
471 |
-
'label' => 'Cause',
|
472 |
-
'name' => 'saswp_mc_cause_name',
|
473 |
-
'type' => 'text',
|
474 |
-
)
|
475 |
-
),
|
476 |
'tvseries_actor' => array(
|
477 |
array(
|
478 |
'label' => 'Actor Name',
|
69 |
'additional-property' => 'additional_property',
|
70 |
|
71 |
),
|
72 |
+
'MedicalCondition' => array(
|
|
|
73 |
'mc-symptom' => 'mc_symptom',
|
74 |
'mc-risk_factor' => 'mc_risk_factor',
|
75 |
|
464 |
'name' => 'saswp_mc_risk_factor_name',
|
465 |
'type' => 'text',
|
466 |
)
|
467 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
'tvseries_actor' => array(
|
469 |
array(
|
470 |
'label' => 'Actor Name',
|
modules/reviews/reviews_service.php
CHANGED
@@ -997,6 +997,12 @@ class saswp_reviews_service {
|
|
997 |
$review_link = $value['saswp_review_location_id'].'#client_reviews';
|
998 |
|
999 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1000 |
|
1001 |
$html = '';
|
1002 |
$date_str = $this->saswp_convert_datetostring($value['saswp_review_date'], $date_format);
|
@@ -1183,6 +1189,10 @@ class saswp_reviews_service {
|
|
1183 |
|
1184 |
$platform_name = $value['saswp_review_platform_name'];
|
1185 |
$source_url = $value['saswp_review_location_id'];
|
|
|
|
|
|
|
|
|
1186 |
|
1187 |
if($platform_name == 'Self'){
|
1188 |
$platform_name = saswp_t_string(saswp_label_text('translation-self'));
|
997 |
$review_link = $value['saswp_review_location_id'].'#client_reviews';
|
998 |
|
999 |
}
|
1000 |
+
|
1001 |
+
if($value['saswp_review_platform_name'] == 'Bark.com' && $review_link == ''){
|
1002 |
+
|
1003 |
+
$review_link = $value['saswp_review_location_id'].'#parent-reviews';
|
1004 |
+
|
1005 |
+
}
|
1006 |
|
1007 |
$html = '';
|
1008 |
$date_str = $this->saswp_convert_datetostring($value['saswp_review_date'], $date_format);
|
1189 |
|
1190 |
$platform_name = $value['saswp_review_platform_name'];
|
1191 |
$source_url = $value['saswp_review_location_id'];
|
1192 |
+
|
1193 |
+
if($platform_name == 'Google'){
|
1194 |
+
$source_url = 'https://search.google.com/local/reviews?placeid='.$source_url;
|
1195 |
+
}
|
1196 |
|
1197 |
if($platform_name == 'Self'){
|
1198 |
$platform_name = saswp_t_string(saswp_label_text('translation-self'));
|
modules/reviews/reviews_setup.php
CHANGED
@@ -357,7 +357,7 @@ function saswp_insert_platform_terms(){
|
|
357 |
|
358 |
$platform_inserted = get_transient('saswp_platform_inserted');
|
359 |
|
360 |
-
if( $platform_inserted !=
|
361 |
|
362 |
$term_array = array(
|
363 |
'Self',
|
@@ -367,7 +367,8 @@ function saswp_insert_platform_terms(){
|
|
367 |
'Apple AppStore',
|
368 |
'Expedia',
|
369 |
'Facebook',
|
370 |
-
'Google',
|
|
|
371 |
'Goodreads',
|
372 |
'TripAdvisor',
|
373 |
'Yelp',
|
@@ -481,8 +482,8 @@ function saswp_insert_platform_terms(){
|
|
481 |
|
482 |
}
|
483 |
|
484 |
-
if(count($term_ids) ==
|
485 |
-
set_transient('saswp_platform_inserted',
|
486 |
}
|
487 |
|
488 |
}
|
357 |
|
358 |
$platform_inserted = get_transient('saswp_platform_inserted');
|
359 |
|
360 |
+
if( $platform_inserted != 98 ){
|
361 |
|
362 |
$term_array = array(
|
363 |
'Self',
|
367 |
'Apple AppStore',
|
368 |
'Expedia',
|
369 |
'Facebook',
|
370 |
+
'Google',
|
371 |
+
'Google Shopping',
|
372 |
'Goodreads',
|
373 |
'TripAdvisor',
|
374 |
'Yelp',
|
482 |
|
483 |
}
|
484 |
|
485 |
+
if(count($term_ids) == 98){
|
486 |
+
set_transient('saswp_platform_inserted', 98, 24*7*HOUR_IN_SECONDS );
|
487 |
}
|
488 |
|
489 |
}
|
output/function.php
CHANGED
@@ -249,7 +249,8 @@ function saswp_get_all_schema_markup_output() {
|
|
249 |
|
250 |
$schema_breadcrumb_output = saswp_schema_breadcrumb_output();
|
251 |
|
252 |
-
if((is_home() || is_front_page() || ( function_exists('ampforwp_is_home') && ampforwp_is_home())) ||
|
|
|
253 |
$kb_website_output = saswp_kb_website_output();
|
254 |
$kb_schema_output = saswp_kb_schema_output();
|
255 |
}
|
@@ -1482,7 +1483,13 @@ function saswp_remove_microdata($content){
|
|
1482 |
$content = preg_replace('/itemprop=\"(worstRating|ratingValue|bestRating|aggregateRating|ratingCount|reviewBody|review|name|datePublished|author|reviewRating)\"/', "", $content);
|
1483 |
$content = preg_replace('/itemscope\=\"(.*?)\"/', "", $content);
|
1484 |
$content = preg_replace("/itemscope\='(.*?)\'/", "", $content);
|
1485 |
-
$content = preg_replace('/itemscope/', "", $content);
|
|
|
|
|
|
|
|
|
|
|
|
|
1486 |
$content = preg_replace('/hreview-aggregate/', "", $content);
|
1487 |
$content = preg_replace('/hrecipe/', "", $content);
|
1488 |
|
249 |
|
250 |
$schema_breadcrumb_output = saswp_schema_breadcrumb_output();
|
251 |
|
252 |
+
if((is_home() || is_front_page() || ( function_exists('ampforwp_is_home') && ampforwp_is_home())) || (isset($sd_data['saswp-defragment']) && $sd_data['saswp-defragment'] == 1 && is_singular())){
|
253 |
+
|
254 |
$kb_website_output = saswp_kb_website_output();
|
255 |
$kb_schema_output = saswp_kb_schema_output();
|
256 |
}
|
1483 |
$content = preg_replace('/itemprop=\"(worstRating|ratingValue|bestRating|aggregateRating|ratingCount|reviewBody|review|name|datePublished|author|reviewRating)\"/', "", $content);
|
1484 |
$content = preg_replace('/itemscope\=\"(.*?)\"/', "", $content);
|
1485 |
$content = preg_replace("/itemscope\='(.*?)\'/", "", $content);
|
1486 |
+
$content = preg_replace('/itemscope/', "", $content);
|
1487 |
+
$content = preg_replace('/itemprop\=\"(.*?)\"/', "", $content);
|
1488 |
+
$content = preg_replace("/itemprop\='(.*?)\'/", "", $content);
|
1489 |
+
$content = preg_replace('/itemprop/', "", $content);
|
1490 |
+
$content = preg_replace('/itemtype\=\"(.*?)\"/', "", $content);
|
1491 |
+
$content = preg_replace("/itemtype\='(.*?)\'/", "", $content);
|
1492 |
+
$content = preg_replace('/itemtype/', "", $content);
|
1493 |
$content = preg_replace('/hreview-aggregate/', "", $content);
|
1494 |
$content = preg_replace('/hrecipe/', "", $content);
|
1495 |
|
output/markup.php
CHANGED
@@ -2669,22 +2669,7 @@ function saswp_medical_condition_schema_markup($schema_id, $schema_post_id, $all
|
|
2669 |
|
2670 |
$input1['code']['@type'] = 'MedicalCode';
|
2671 |
$input1['code']['code'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_medical_code_'.$schema_id, 'saswp_array');
|
2672 |
-
$input1['code']['codingSystem'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_coding_system_'.$schema_id, 'saswp_array');
|
2673 |
-
|
2674 |
-
$cause_arr = array();
|
2675 |
-
if(!empty($cause)){
|
2676 |
-
|
2677 |
-
foreach($cause as $val){
|
2678 |
-
|
2679 |
-
$supply_data = array();
|
2680 |
-
$supply_data['@type'] = 'MedicalCause';
|
2681 |
-
$supply_data['name'] = $val['saswp_mc_cause_name'];
|
2682 |
-
|
2683 |
-
$cause_arr[] = $supply_data;
|
2684 |
-
}
|
2685 |
-
$input1['cause'] = $cause_arr;
|
2686 |
-
}
|
2687 |
-
|
2688 |
$symptom_arr = array();
|
2689 |
if(!empty($symptom)){
|
2690 |
|
2669 |
|
2670 |
$input1['code']['@type'] = 'MedicalCode';
|
2671 |
$input1['code']['code'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_medical_code_'.$schema_id, 'saswp_array');
|
2672 |
+
$input1['code']['codingSystem'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_coding_system_'.$schema_id, 'saswp_array');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2673 |
$symptom_arr = array();
|
2674 |
if(!empty($symptom)){
|
2675 |
|
output/service.php
CHANGED
@@ -3980,7 +3980,14 @@ Class saswp_output_service{
|
|
3980 |
|
3981 |
foreach($variations as $value){
|
3982 |
|
3983 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3984 |
|
3985 |
}
|
3986 |
}
|
@@ -4967,11 +4974,11 @@ Class saswp_output_service{
|
|
4967 |
|
4968 |
if(empty($input2) && isset($image_details[0]) && $image_details[0] !='' && isset($image_details[1]) && isset($image_details[2]) ){
|
4969 |
|
4970 |
-
$input2['image']['@type'] = 'ImageObject';
|
4971 |
-
$input2['image']['@id'] = saswp_get_permalink().'#primaryimage';
|
4972 |
-
$input2['image']['url'] = esc_url($image_details[0]);
|
4973 |
-
$input2['image']['width'] = esc_attr($image_details[1]);
|
4974 |
-
$input2['image']['height'] = esc_attr($image_details[2]);
|
4975 |
|
4976 |
}
|
4977 |
|
3980 |
|
3981 |
foreach($variations as $value){
|
3982 |
|
3983 |
+
$product_variation = wc_get_product( $value['variation_id'] );
|
3984 |
+
$p_inc_tax = $product_variation->get_price_including_tax();
|
3985 |
+
|
3986 |
+
if($p_inc_tax){
|
3987 |
+
$varible_prices[] = $p_inc_tax;
|
3988 |
+
}else{
|
3989 |
+
$varible_prices[] = $value['display_price'];
|
3990 |
+
}
|
3991 |
|
3992 |
}
|
3993 |
}
|
4974 |
|
4975 |
if(empty($input2) && isset($image_details[0]) && $image_details[0] !='' && isset($image_details[1]) && isset($image_details[2]) ){
|
4976 |
|
4977 |
+
$input2['image'][0]['@type'] = 'ImageObject';
|
4978 |
+
$input2['image'][0]['@id'] = saswp_get_permalink().'#primaryimage';
|
4979 |
+
$input2['image'][0]['url'] = esc_url($image_details[0]);
|
4980 |
+
$input2['image'][0]['width'] = esc_attr($image_details[1]);
|
4981 |
+
$input2['image'][0]['height'] = esc_attr($image_details[2]);
|
4982 |
|
4983 |
}
|
4984 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
|
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.7
|
6 |
-
Stable tag: 1.9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -120,6 +120,16 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
120 |
|
121 |
== Changelog ==
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
= 1.9.80 (23 Jun 2021) =
|
124 |
|
125 |
* Fixed: Item name mismatches when We try to activate "1-Click Indexing API Integration" extension. #1454
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.7
|
6 |
+
Stable tag: 1.9.81
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
120 |
|
121 |
== Changelog ==
|
122 |
|
123 |
+
= 1.9.81 (04 July 2021) =
|
124 |
+
|
125 |
+
* Fixed: Google review page redirect to wrong url, it should redirect to Google review page url. #1457
|
126 |
+
* Fixed: When the "Defragment Schema Markup" option is enabled knowledge graph markup is displaying on the category post and pages. #1455
|
127 |
+
* Fixed: Microdata cleaner option does not remove single itemtype, itemprop #1463
|
128 |
+
* Fixed: Remove the cause property in the Medical condition schema type #1462
|
129 |
+
* Fixed: Errors in NewsArticle (The property 2 is not recognised by the schema) #1468
|
130 |
+
* Added: Google Shopping reviews platform #1448
|
131 |
+
|
132 |
+
|
133 |
= 1.9.80 (23 Jun 2021) =
|
134 |
|
135 |
* Fixed: Item name mismatches when We try to activate "1-Click Indexing API Integration" extension. #1454
|
structured-data-for-wp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP & AMP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
-
Version: 1.9.
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Domain Path: /languages
|
8 |
Author: Magazine3
|
@@ -13,7 +13,7 @@ License: GPL2
|
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
-
define('SASWP_VERSION', '1.9.
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP & AMP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
+
Version: 1.9.81
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Domain Path: /languages
|
8 |
Author: Magazine3
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
+
define('SASWP_VERSION', '1.9.81');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
view/taxonomy.php
CHANGED
@@ -50,6 +50,8 @@ class SASWP_View_Taxonomy
|
|
50 |
}
|
51 |
|
52 |
public function saswp_edit_term_fields( $term, $taxonomy ) {
|
|
|
|
|
53 |
|
54 |
$value = get_term_meta( $term->term_id, 'saswp_custom_schema_field', true );
|
55 |
|
@@ -71,6 +73,10 @@ class SASWP_View_Taxonomy
|
|
71 |
|
72 |
|
73 |
public function saswp_save_term_fields( $term_id ) {
|
|
|
|
|
|
|
|
|
74 |
|
75 |
if(isset($_POST['saswp_custom_schema_field'])){
|
76 |
|
50 |
}
|
51 |
|
52 |
public function saswp_edit_term_fields( $term, $taxonomy ) {
|
53 |
+
|
54 |
+
wp_nonce_field( 'taxonomy_specific_nonce_data', 'taxonomy_specific_nonce' );
|
55 |
|
56 |
$value = get_term_meta( $term->term_id, 'saswp_custom_schema_field', true );
|
57 |
|
73 |
|
74 |
|
75 |
public function saswp_save_term_fields( $term_id ) {
|
76 |
+
|
77 |
+
if ( ! isset( $_POST['taxonomy_specific_nonce'] ) ) return $term_id;
|
78 |
+
|
79 |
+
if ( !wp_verify_nonce( $_POST['taxonomy_specific_nonce'], 'taxonomy_specific_nonce_data' ) ) return $term_id;
|
80 |
|
81 |
if(isset($_POST['saswp_custom_schema_field'])){
|
82 |
|