Schema & Structured Data for WP & AMP - Version 1.9.89

Version Description

(16 Nov 2021) =

  • Fixed: Yet Another Star Rating Premium isn't getting its LD+Json stripped out #1562
  • Fixed: Enabling elementor testimonial causing product failing in schema #1559
  • Added: The salary range like ( 3300 - 3600 ) in job posting schema. #1558
  • Added: dateCreated property to webpage schema #1543
Download this release

Release Info

Developer magazine3
Plugin Icon 128x128 Schema & Structured Data for WP & AMP
Version 1.9.89
Comparing to
See all releases

Code changes from version 1.9.88 to 1.9.89

core/array-list/compatibility-list.php CHANGED
@@ -157,7 +157,8 @@ return array(
157
  ),
158
  'yet_another_stars_rating' => array(
159
  'name' => 'Yet Another Stars Rating',
160
- 'free' => 'yet-another-stars-rating/yet-another-stars-rating.php',
 
161
  'opt_name' => 'saswp-yet-another-stars-rating',
162
  'part_in' => 'free',
163
  ),
157
  ),
158
  'yet_another_stars_rating' => array(
159
  'name' => 'Yet Another Stars Rating',
160
+ 'free' => 'yet-another-stars-rating/yet-another-stars-rating.php',
161
+ 'pro' => 'yet-another-stars-rating-premium/yet-another-stars-rating.php',
162
  'opt_name' => 'saswp-yet-another-stars-rating',
163
  'part_in' => 'free',
164
  ),
core/array-list/schema-properties.php CHANGED
@@ -662,7 +662,12 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
662
  'type' => 'text',
663
  'default' => saswp_get_the_title(),
664
  ),
665
-
 
 
 
 
 
666
  array(
667
  'label' => 'Date Published',
668
  'id' => 'saswp_webpage_date_published_'.$schema_id,
@@ -5552,6 +5557,22 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
5552
  'placeholder' => '40.00'
5553
  )
5554
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5555
  array(
5556
  'label' => 'Base Salary Unit Text',
5557
  'id' => 'saswp_jobposting_schema_bs_unittext_'.$schema_id,
@@ -5561,12 +5582,12 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
5561
  )
5562
  ),
5563
  array(
5564
- 'label' => 'Estimated Salary Currency',
5565
- 'id' => 'saswp_jobposting_schema_es_currency_'.$schema_id,
5566
- 'type' => 'text',
5567
- 'attributes' => array(
5568
- 'placeholder' => 'USD'
5569
- )
5570
  ),
5571
  array(
5572
  'label' => 'Estimated Salary Value',
@@ -5576,6 +5597,22 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
5576
  'placeholder' => '40.00'
5577
  )
5578
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5579
  array(
5580
  'label' => 'Estimated Salary Unit Text',
5581
  'id' => 'saswp_jobposting_schema_es_unittext_'.$schema_id,
662
  'type' => 'text',
663
  'default' => saswp_get_the_title(),
664
  ),
665
+ array(
666
+ 'label' => 'Date Created',
667
+ 'id' => 'saswp_webpage_date_created_'.$schema_id,
668
+ 'type' => 'text',
669
+ 'default' => get_the_modified_date("Y-m-d")
670
+ ),
671
  array(
672
  'label' => 'Date Published',
673
  'id' => 'saswp_webpage_date_published_'.$schema_id,
5557
  'placeholder' => '40.00'
5558
  )
5559
  ),
5560
+ array(
5561
+ 'label' => 'Base Salary Min Value',
5562
+ 'id' => 'saswp_jobposting_schema_bs_min_value_'.$schema_id,
5563
+ 'type' => 'text',
5564
+ 'attributes' => array(
5565
+ 'placeholder' => '20.00'
5566
+ )
5567
+ ),
5568
+ array(
5569
+ 'label' => 'Base Salary Max Value',
5570
+ 'id' => 'saswp_jobposting_schema_bs_max_value_'.$schema_id,
5571
+ 'type' => 'text',
5572
+ 'attributes' => array(
5573
+ 'placeholder' => '100.00'
5574
+ )
5575
+ ),
5576
  array(
5577
  'label' => 'Base Salary Unit Text',
5578
  'id' => 'saswp_jobposting_schema_bs_unittext_'.$schema_id,
5582
  )
5583
  ),
5584
  array(
5585
+ 'label' => 'Estimated Salary Currency',
5586
+ 'id' => 'saswp_jobposting_schema_es_currency_'.$schema_id,
5587
+ 'type' => 'text',
5588
+ 'attributes' => array(
5589
+ 'placeholder' => 'USD'
5590
+ )
5591
  ),
5592
  array(
5593
  'label' => 'Estimated Salary Value',
5597
  'placeholder' => '40.00'
5598
  )
5599
  ),
5600
+ array(
5601
+ 'label' => 'Estimated Salary Min Value',
5602
+ 'id' => 'saswp_jobposting_schema_es_min_value_'.$schema_id,
5603
+ 'type' => 'text',
5604
+ 'attributes' => array(
5605
+ 'placeholder' => '20.00'
5606
+ )
5607
+ ),
5608
+ array(
5609
+ 'label' => 'Estimated Salary Max Value',
5610
+ 'id' => 'saswp_jobposting_schema_es_max_value_'.$schema_id,
5611
+ 'type' => 'text',
5612
+ 'attributes' => array(
5613
+ 'placeholder' => '100.00'
5614
+ )
5615
+ ),
5616
  array(
5617
  'label' => 'Estimated Salary Unit Text',
5618
  'id' => 'saswp_jobposting_schema_es_unittext_'.$schema_id,
output/compatibility.php CHANGED
@@ -179,8 +179,16 @@ class saswp_output_compatibility{
179
  }
180
  public function saswp_wp_customer_reviews_override(){
181
  }
182
- public function saswp_yet_another_stars_rating_override(){
183
- remove_filter('the_content', 'yasr_add_schema');
 
 
 
 
 
 
 
 
184
  }
185
  public function saswp_testimonial_pro_override(){
186
 
179
  }
180
  public function saswp_wp_customer_reviews_override(){
181
  }
182
+ public function saswp_yet_another_stars_rating_override(){
183
+
184
+ global $yasr_additional_rich_fields;
185
+
186
+ remove_filter('the_content', 'yasr_add_schema');
187
+
188
+ if($yasr_additional_rich_fields){
189
+ remove_filter('the_content', array($yasr_additional_rich_fields, 'addSchema'), 99);
190
+ }
191
+
192
  }
193
  public function saswp_testimonial_pro_override(){
194
 
output/function.php CHANGED
@@ -1046,7 +1046,7 @@ function saswp_get_elementor_testomonials(){
1046
 
1047
  $reviews[] = array(
1048
  '@type' => 'Review',
1049
- 'author' => array('@type'=> 'Person', 'name' => isset($value['settings']['testimonial_name']) ? $value['settings']['testimonial_name'] : ''),
1050
  'description' => isset($value['settings']['testimonial_content']) ? $value['settings']['testimonial_content'] : '',
1051
  'reviewRating' => array(
1052
  '@type' => 'Rating',
1046
 
1047
  $reviews[] = array(
1048
  '@type' => 'Review',
1049
+ 'author' => array('@type'=> 'Person', 'name' => isset($value['settings']['testimonial_name']) ? $value['settings']['testimonial_name'] : 'Anonymous'),
1050
  'description' => isset($value['settings']['testimonial_content']) ? $value['settings']['testimonial_content'] : '',
1051
  'reviewRating' => array(
1052
  '@type' => 'Rating',
output/markup.php CHANGED
@@ -2468,12 +2468,25 @@ function saswp_job_posting_schema_markup($schema_id, $schema_post_id, $all_post_
2468
  $input1['baseSalary']['value']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_value_'.$schema_id, 'saswp_array');
2469
  $input1['baseSalary']['value']['unitText'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_unittext_'.$schema_id, 'saswp_array');
2470
 
 
 
 
 
 
 
2471
  $input1['estimatedSalary']['@type'] = 'MonetaryAmount';
2472
  $input1['estimatedSalary']['currency'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_es_currency_'.$schema_id, 'saswp_array');
2473
  $input1['estimatedSalary']['value']['@type'] = 'QuantitativeValue';
2474
  $input1['estimatedSalary']['value']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_es_value_'.$schema_id, 'saswp_array');
2475
  $input1['estimatedSalary']['value']['unitText'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_es_unittext_'.$schema_id, 'saswp_array');
2476
 
 
 
 
 
 
 
 
2477
  if( ( isset($all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0] ) && $all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0] !='' ) && date('Y-m-d',strtotime($all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0]) ) < date('Y-m-d') ){
2478
  $input1 = array();
2479
  }
@@ -3654,6 +3667,7 @@ function saswp_webpage_schema_markup($schema_id, $schema_post_id, $all_post_meta
3654
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_name_'.$schema_id, 'saswp_array'),
3655
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_url_'.$schema_id, 'saswp_array'),
3656
  'lastReviewed' => isset($all_post_meta['saswp_webpage_last_reviewed_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_webpage_last_reviewed_'.$schema_id][0], get_post_time('h:i:s')) :'',
 
3657
  'reviewedBy' => array(
3658
  '@type' => 'Organization',
3659
  'logo' => array(
2468
  $input1['baseSalary']['value']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_value_'.$schema_id, 'saswp_array');
2469
  $input1['baseSalary']['value']['unitText'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_unittext_'.$schema_id, 'saswp_array');
2470
 
2471
+ if( isset($all_post_meta['saswp_jobposting_schema_bs_min_value_'.$schema_id][0]) ){
2472
+ $input1['baseSalary']['value']['minValue'] = $all_post_meta['saswp_jobposting_schema_bs_min_value_'.$schema_id][0];
2473
+ }
2474
+ if( isset($all_post_meta['saswp_jobposting_schema_bs_max_value_'.$schema_id][0]) ){
2475
+ $input1['baseSalary']['value']['maxValue'] = $all_post_meta['saswp_jobposting_schema_bs_max_value_'.$schema_id][0];
2476
+ }
2477
  $input1['estimatedSalary']['@type'] = 'MonetaryAmount';
2478
  $input1['estimatedSalary']['currency'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_es_currency_'.$schema_id, 'saswp_array');
2479
  $input1['estimatedSalary']['value']['@type'] = 'QuantitativeValue';
2480
  $input1['estimatedSalary']['value']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_es_value_'.$schema_id, 'saswp_array');
2481
  $input1['estimatedSalary']['value']['unitText'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_es_unittext_'.$schema_id, 'saswp_array');
2482
 
2483
+ if( isset($all_post_meta['saswp_jobposting_schema_es_min_value_'.$schema_id][0]) ){
2484
+ $input1['estimatedSalary']['value']['minValue'] = $all_post_meta['saswp_jobposting_schema_es_min_value_'.$schema_id][0];
2485
+ }
2486
+ if( isset($all_post_meta['saswp_jobposting_schema_es_max_value_'.$schema_id][0]) ){
2487
+ $input1['estimatedSalary']['value']['maxValue'] = $all_post_meta['saswp_jobposting_schema_es_max_value_'.$schema_id][0];
2488
+ }
2489
+
2490
  if( ( isset($all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0] ) && $all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0] !='' ) && date('Y-m-d',strtotime($all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0]) ) < date('Y-m-d') ){
2491
  $input1 = array();
2492
  }
3667
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_name_'.$schema_id, 'saswp_array'),
3668
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_url_'.$schema_id, 'saswp_array'),
3669
  'lastReviewed' => isset($all_post_meta['saswp_webpage_last_reviewed_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_webpage_last_reviewed_'.$schema_id][0], get_post_time('h:i:s')) :'',
3670
+ 'dateCreated' => isset($all_post_meta['saswp_webpage_date_created_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_webpage_date_created_'.$schema_id][0], get_post_time('h:i:s')) :'',
3671
  'reviewedBy' => array(
3672
  '@type' => 'Organization',
3673
  'logo' => array(
output/service.php CHANGED
@@ -1968,6 +1968,9 @@ Class saswp_output_service{
1968
  if(isset($custom_fields['saswp_webpage_last_reviewed'])){
1969
  $input1['lastReviewed'] = $custom_fields['saswp_webpage_last_reviewed'];
1970
  }
 
 
 
1971
 
1972
  if(isset($custom_fields['saswp_webpage_main_entity_of_page'])){
1973
  $input1['mainEntity']['mainEntityOfPage'] = saswp_validate_url($custom_fields['saswp_webpage_main_entity_of_page']);
@@ -3983,14 +3986,26 @@ Class saswp_output_service{
3983
  if(isset($custom_fields['saswp_jobposting_schema_bs_value'])){
3984
  $input1['baseSalary']['value']['value'] = $custom_fields['saswp_jobposting_schema_bs_value'];
3985
  }
 
 
 
 
 
 
3986
  if(isset($custom_fields['saswp_jobposting_schema_bs_unittext'])){
3987
- $input1['baseSalary']['value']['unitText'] = $custom_fields['saswp_jobposting_schema_bs_unittext'];
3988
  }
3989
  if(isset($custom_fields['saswp_jobposting_schema_es_currency'])){
3990
- $input1['estimatedSalary']['currency'] = $custom_fields['saswp_jobposting_schema_es_currency'];
3991
  }
3992
  if(isset($custom_fields['saswp_jobposting_schema_es_value'])){
3993
- $input1['estimatedSalary']['value']['value'] = $custom_fields['saswp_jobposting_schema_es_value'];
 
 
 
 
 
 
3994
  }
3995
  if(isset($custom_fields['saswp_jobposting_schema_es_unittext'])){
3996
  $input1['estimatedSalary']['value']['unitText'] = $custom_fields['saswp_jobposting_schema_es_unittext'];
@@ -4964,7 +4979,8 @@ Class saswp_output_service{
4964
  '@id' => trailingslashit(saswp_get_permalink()).'#webpage',
4965
  'name' => saswp_get_the_title(),
4966
  'url' => saswp_get_permalink(),
4967
- 'lastReviewed' => esc_html($modified_date),
 
4968
  'inLanguage' => get_bloginfo('language'),
4969
  'description' => saswp_get_the_excerpt(),
4970
  'mainEntity' => array(
1968
  if(isset($custom_fields['saswp_webpage_last_reviewed'])){
1969
  $input1['lastReviewed'] = $custom_fields['saswp_webpage_last_reviewed'];
1970
  }
1971
+ if(isset($custom_fields['saswp_webpage_date_created'])){
1972
+ $input1['dateCreated'] = $custom_fields['saswp_webpage_date_created'];
1973
+ }
1974
 
1975
  if(isset($custom_fields['saswp_webpage_main_entity_of_page'])){
1976
  $input1['mainEntity']['mainEntityOfPage'] = saswp_validate_url($custom_fields['saswp_webpage_main_entity_of_page']);
3986
  if(isset($custom_fields['saswp_jobposting_schema_bs_value'])){
3987
  $input1['baseSalary']['value']['value'] = $custom_fields['saswp_jobposting_schema_bs_value'];
3988
  }
3989
+ if(isset($custom_fields['saswp_jobposting_schema_bs_min_value'])){
3990
+ $input1['baseSalary']['value']['minValue'] = $custom_fields['saswp_jobposting_schema_bs_min_value'];
3991
+ }
3992
+ if(isset($custom_fields['saswp_jobposting_schema_bs_max_value'])){
3993
+ $input1['baseSalary']['value']['maxValue'] = $custom_fields['saswp_jobposting_schema_bs_max_value'];
3994
+ }
3995
  if(isset($custom_fields['saswp_jobposting_schema_bs_unittext'])){
3996
+ $input1['baseSalary']['value']['unitText'] = $custom_fields['saswp_jobposting_schema_bs_unittext'];
3997
  }
3998
  if(isset($custom_fields['saswp_jobposting_schema_es_currency'])){
3999
+ $input1['estimatedSalary']['currency'] = $custom_fields['saswp_jobposting_schema_es_currency'];
4000
  }
4001
  if(isset($custom_fields['saswp_jobposting_schema_es_value'])){
4002
+ $input1['estimatedSalary']['value']['value'] = $custom_fields['saswp_jobposting_schema_es_value'];
4003
+ }
4004
+ if(isset($custom_fields['saswp_jobposting_schema_es_min_value'])){
4005
+ $input1['estimatedSalary']['value']['minValue'] = $custom_fields['saswp_jobposting_schema_es_min_value'];
4006
+ }
4007
+ if(isset($custom_fields['saswp_jobposting_schema_es_max_value'])){
4008
+ $input1['estimatedSalary']['value']['maxValue'] = $custom_fields['saswp_jobposting_schema_es_max_value'];
4009
  }
4010
  if(isset($custom_fields['saswp_jobposting_schema_es_unittext'])){
4011
  $input1['estimatedSalary']['value']['unitText'] = $custom_fields['saswp_jobposting_schema_es_unittext'];
4979
  '@id' => trailingslashit(saswp_get_permalink()).'#webpage',
4980
  'name' => saswp_get_the_title(),
4981
  'url' => saswp_get_permalink(),
4982
+ 'lastReviewed' => esc_html($modified_date),
4983
+ 'dateCreated' => esc_html($date),
4984
  'inLanguage' => get_bloginfo('language'),
4985
  'description' => saswp_get_the_excerpt(),
4986
  'mainEntity' => array(
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.8
6
- Stable tag: 1.9.88
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -120,6 +120,14 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
 
 
 
123
  = 1.9.88 (03 Nov 2021) =
124
 
125
  * Added: An option called "Specific" in the Sorting Filter for Collection feature. #1472
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.8
6
+ Stable tag: 1.9.89
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.89 (16 Nov 2021) =
124
+
125
+ * Fixed: Yet Another Star Rating Premium isn't getting its LD+Json stripped out #1562
126
+ * Fixed: Enabling elementor testimonial causing product failing in schema #1559
127
+ * Added: The salary range like ( €3300 - €3600 ) in job posting schema. #1558
128
+ * Added: dateCreated property to webpage schema #1543
129
+
130
+
131
  = 1.9.88 (03 Nov 2021) =
132
 
133
  * Added: An option called "Specific" in the Sorting Filter for Collection feature. #1472
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.88
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.88');
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.89
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.89');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));