Version Description
(15 Feb 2020) =
- Fixed: A value for the thumbnailUrl field is required(Video Object) #770
- Fixed: Remove priceRange$ property from services schema type #775
- Fixed: HTML tags are showing in the review's comments #789
- Fixed: Things is not a know valid target type for the publisher property #774
- Fixed: Event type drop down value is being reset, even after changing the value #797
- Fixed: The text inside tag 'script type=application/ld+json' contains 'html comments', which is disallowed #769
- Fixed: Notices and warning #779, #772, #784
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.26 |
Comparing to | |
See all releases |
Code changes from version 1.9.25.1 to 1.9.26
- core/array-list/compatibility-list.php +2 -1
- core/array-list/schema-properties.php +8 -10
- modules/reviews/reviews_service.php +4 -5
- output/markup.php +1 -1
- output/output.php +19 -5
- output/service.php +15 -19
- readme.txt +12 -2
- structured-data-for-wp.php +2 -2
- view/paywall.php +1 -0
- view/schema_type.php +29 -19
core/array-list/compatibility-list.php
CHANGED
@@ -6,7 +6,8 @@ return array(
|
|
6 |
'plugins' => array(
|
7 |
'total_recipe_generator' => array(
|
8 |
'name' => 'Total Recipe Generator',
|
9 |
-
'free' => 'total-recipe-generator-el/total-recipe-generator-el.php',
|
|
|
10 |
'opt_name' => 'saswp-total-recipe-generator',
|
11 |
'part_in' => 'pro',
|
12 |
),
|
6 |
'plugins' => array(
|
7 |
'total_recipe_generator' => array(
|
8 |
'name' => 'Total Recipe Generator',
|
9 |
+
'free' => 'total-recipe-generator-el/total-recipe-generator-el.php',
|
10 |
+
'pro' => 'total-recipe-generator/total-recipe-generator.php',
|
11 |
'opt_name' => 'saswp-total-recipe-generator',
|
12 |
'part_in' => 'pro',
|
13 |
),
|
core/array-list/schema-properties.php
CHANGED
@@ -657,7 +657,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
657 |
'label' => 'Article Body',
|
658 |
'id' => 'saswp_article_body_'.$schema_id,
|
659 |
'type' => 'textarea',
|
660 |
-
'default' => get_the_content()
|
661 |
),
|
662 |
array(
|
663 |
'label' => 'Keywords',
|
@@ -717,12 +717,15 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
717 |
break;
|
718 |
|
719 |
case 'Event':
|
720 |
-
|
|
|
|
|
721 |
$meta_field = array(
|
722 |
array(
|
723 |
'label' => 'Type',
|
724 |
'id' => 'saswp_event_schema_type_'.$schema_id,
|
725 |
-
'type' => 'select',
|
|
|
726 |
'options' => array(
|
727 |
'' => 'Select Type (Optional)',
|
728 |
'BusinessEvent' => 'BusinessEvent',
|
@@ -1483,12 +1486,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1483 |
'label' => 'Telephone',
|
1484 |
'id' => 'saswp_service_schema_telephone_'.$schema_id,
|
1485 |
'type' => 'text',
|
1486 |
-
),
|
1487 |
-
array(
|
1488 |
-
'label' => 'Price Range',
|
1489 |
-
'id' => 'saswp_service_schema_price_range_'.$schema_id,
|
1490 |
-
'type' => 'text',
|
1491 |
-
),
|
1492 |
array(
|
1493 |
'label' => 'Description',
|
1494 |
'id' => 'saswp_service_schema_description_'.$schema_id,
|
@@ -1818,7 +1816,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1818 |
'label' => 'Author Image',
|
1819 |
'id' => 'saswp_video_object_author_image_'.$schema_id,
|
1820 |
'type' => 'media',
|
1821 |
-
'default' => $author_details['url']
|
1822 |
),
|
1823 |
array(
|
1824 |
'label' => 'Organization Name',
|
657 |
'label' => 'Article Body',
|
658 |
'id' => 'saswp_article_body_'.$schema_id,
|
659 |
'type' => 'textarea',
|
660 |
+
'default' => @get_the_content()
|
661 |
),
|
662 |
array(
|
663 |
'label' => 'Keywords',
|
717 |
break;
|
718 |
|
719 |
case 'Event':
|
720 |
+
|
721 |
+
$event_type = get_post_meta($schema_id, 'saswp_event_type', true);
|
722 |
+
|
723 |
$meta_field = array(
|
724 |
array(
|
725 |
'label' => 'Type',
|
726 |
'id' => 'saswp_event_schema_type_'.$schema_id,
|
727 |
+
'type' => 'select',
|
728 |
+
'default' => $event_type,
|
729 |
'options' => array(
|
730 |
'' => 'Select Type (Optional)',
|
731 |
'BusinessEvent' => 'BusinessEvent',
|
1486 |
'label' => 'Telephone',
|
1487 |
'id' => 'saswp_service_schema_telephone_'.$schema_id,
|
1488 |
'type' => 'text',
|
1489 |
+
),
|
|
|
|
|
|
|
|
|
|
|
1490 |
array(
|
1491 |
'label' => 'Description',
|
1492 |
'id' => 'saswp_service_schema_description_'.$schema_id,
|
1816 |
'label' => 'Author Image',
|
1817 |
'id' => 'saswp_video_object_author_image_'.$schema_id,
|
1818 |
'type' => 'media',
|
1819 |
+
'default' => isset($author_details['url']) ? $author_details['url'] : ''
|
1820 |
),
|
1821 |
array(
|
1822 |
'label' => 'Organization Name',
|
modules/reviews/reviews_service.php
CHANGED
@@ -226,7 +226,7 @@ class saswp_reviews_service {
|
|
226 |
<a target="_blank" href="'.esc_attr($review['saswp_review_link']).'"><img src="'.esc_url($review['saswp_review_platform_icon']).'"></a>
|
227 |
</span>
|
228 |
</div>
|
229 |
-
<div class="saswp-rv-txt"> <p>'.
|
230 |
</div>
|
231 |
</div>
|
232 |
</div>';
|
@@ -700,7 +700,7 @@ class saswp_reviews_service {
|
|
700 |
case 'lowest':
|
701 |
|
702 |
usort($collection, function($a, $b) {
|
703 |
-
return $a['saswp_review_rating'] - $b['saswp_review_rating'];
|
704 |
});
|
705 |
|
706 |
break;
|
@@ -708,8 +708,7 @@ class saswp_reviews_service {
|
|
708 |
case 'highest':
|
709 |
|
710 |
usort($collection, function($a, $b) {
|
711 |
-
return $a['saswp_review_rating'] - $b['saswp_review_rating'];
|
712 |
-
|
713 |
});
|
714 |
|
715 |
$collection = array_reverse($collection);
|
@@ -731,7 +730,7 @@ class saswp_reviews_service {
|
|
731 |
case 'oldest':
|
732 |
|
733 |
usort($collection, function($a, $b) {
|
734 |
-
return strtotime($a['saswp_review_date']) - strtotime($b['saswp_review_date']);
|
735 |
});
|
736 |
|
737 |
break;
|
226 |
<a target="_blank" href="'.esc_attr($review['saswp_review_link']).'"><img src="'.esc_url($review['saswp_review_platform_icon']).'"></a>
|
227 |
</span>
|
228 |
</div>
|
229 |
+
<div class="saswp-rv-txt"> <p>'.wp_strip_all_tags(html_entity_decode($review['saswp_review_text'])).'</p></div>
|
230 |
</div>
|
231 |
</div>
|
232 |
</div>';
|
700 |
case 'lowest':
|
701 |
|
702 |
usort($collection, function($a, $b) {
|
703 |
+
return $a['saswp_review_rating'] - $b['saswp_review_rating'];
|
704 |
});
|
705 |
|
706 |
break;
|
708 |
case 'highest':
|
709 |
|
710 |
usort($collection, function($a, $b) {
|
711 |
+
return $a['saswp_review_rating'] - $b['saswp_review_rating'];
|
|
|
712 |
});
|
713 |
|
714 |
$collection = array_reverse($collection);
|
730 |
case 'oldest':
|
731 |
|
732 |
usort($collection, function($a, $b) {
|
733 |
+
return strtotime($a['saswp_review_date']) - strtotime($b['saswp_review_date']);
|
734 |
});
|
735 |
|
736 |
break;
|
output/markup.php
CHANGED
@@ -2414,7 +2414,7 @@ function saswp_video_object_schema_markup($schema_id, $schema_post_id, $all_post
|
|
2414 |
'datePublished' => isset($all_post_meta['saswp_video_object_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_video_object_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
2415 |
'dateModified' => isset($all_post_meta['saswp_video_object_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_video_object_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
2416 |
'description' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_description_'.$schema_id, 'saswp_array'),
|
2417 |
-
'name'
|
2418 |
'uploadDate' => isset($all_post_meta['saswp_video_object_upload_date_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_video_object_upload_date_'.$schema_id][0])):'',
|
2419 |
'thumbnailUrl' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_thumbnail_url_'.$schema_id, 'saswp_array'),
|
2420 |
'contentUrl' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_content_url_'.$schema_id, 'saswp_array'),
|
2414 |
'datePublished' => isset($all_post_meta['saswp_video_object_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_video_object_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
2415 |
'dateModified' => isset($all_post_meta['saswp_video_object_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_video_object_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
2416 |
'description' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_description_'.$schema_id, 'saswp_array'),
|
2417 |
+
'name' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_name_'.$schema_id, 'saswp_array'),
|
2418 |
'uploadDate' => isset($all_post_meta['saswp_video_object_upload_date_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_video_object_upload_date_'.$schema_id][0])):'',
|
2419 |
'thumbnailUrl' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_thumbnail_url_'.$schema_id, 'saswp_array'),
|
2420 |
'contentUrl' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_content_url_'.$schema_id, 'saswp_array'),
|
output/output.php
CHANGED
@@ -1307,7 +1307,21 @@ function saswp_schema_output() {
|
|
1307 |
|
1308 |
if(!$description){
|
1309 |
$description = get_bloginfo('description');
|
1310 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1311 |
$input1 = array(
|
1312 |
'@context' => saswp_context_url(),
|
1313 |
'@type' => 'VideoObject',
|
@@ -1317,10 +1331,10 @@ function saswp_schema_output() {
|
|
1317 |
'datePublished' => esc_html($date),
|
1318 |
'dateModified' => esc_html($modified_date),
|
1319 |
'description' => $description,
|
1320 |
-
'name'
|
1321 |
'uploadDate' => esc_html($date),
|
1322 |
-
'thumbnailUrl' =>
|
1323 |
-
'author'
|
1324 |
);
|
1325 |
|
1326 |
if(isset($video_links[0])){
|
@@ -2012,7 +2026,7 @@ function saswp_author_output(){
|
|
2012 |
$sd_linkedin = esc_attr( stripslashes( get_the_author_meta( 'linkedin', $post_author->ID ) ) );
|
2013 |
$sd_pinterest = esc_attr( stripslashes( get_the_author_meta( 'pinterest', $post_author->ID ) ) );
|
2014 |
$sd_soundcloud = esc_attr( stripslashes( get_the_author_meta( 'soundcloud', $post_author->ID ) ) );
|
2015 |
-
$sd_tumblr
|
2016 |
|
2017 |
$sd_sameAs_links = array( $sd_website, $sd_googleplus, $sd_facebook, $sd_twitter, $sd_instagram, $sd_youtube, $sd_linkedin, $sd_pinterest, $sd_soundcloud, $sd_tumblr);
|
2018 |
|
1307 |
|
1308 |
if(!$description){
|
1309 |
$description = get_bloginfo('description');
|
1310 |
+
}
|
1311 |
+
$thumbnail = '';
|
1312 |
+
|
1313 |
+
if(isset($image_details[0])){
|
1314 |
+
|
1315 |
+
$thumbnail = $image_details[0];
|
1316 |
+
|
1317 |
+
}else{
|
1318 |
+
|
1319 |
+
if(isset($sd_data['sd_default_image']['thumbnail'])){
|
1320 |
+
$thumbnail = $sd_data['sd_default_image']['thumbnail'];
|
1321 |
+
}
|
1322 |
+
|
1323 |
+
}
|
1324 |
+
|
1325 |
$input1 = array(
|
1326 |
'@context' => saswp_context_url(),
|
1327 |
'@type' => 'VideoObject',
|
1331 |
'datePublished' => esc_html($date),
|
1332 |
'dateModified' => esc_html($modified_date),
|
1333 |
'description' => $description,
|
1334 |
+
'name' => saswp_get_the_title(),
|
1335 |
'uploadDate' => esc_html($date),
|
1336 |
+
'thumbnailUrl' => $thumbnail,
|
1337 |
+
'author' => saswp_get_author_details()
|
1338 |
);
|
1339 |
|
1340 |
if(isset($video_links[0])){
|
2026 |
$sd_linkedin = esc_attr( stripslashes( get_the_author_meta( 'linkedin', $post_author->ID ) ) );
|
2027 |
$sd_pinterest = esc_attr( stripslashes( get_the_author_meta( 'pinterest', $post_author->ID ) ) );
|
2028 |
$sd_soundcloud = esc_attr( stripslashes( get_the_author_meta( 'soundcloud', $post_author->ID ) ) );
|
2029 |
+
$sd_tumblr = esc_attr( stripslashes( get_the_author_meta( 'tumblr', $post_author->ID ) ) );
|
2030 |
|
2031 |
$sd_sameAs_links = array( $sd_website, $sd_googleplus, $sd_facebook, $sd_twitter, $sd_instagram, $sd_youtube, $sd_linkedin, $sd_pinterest, $sd_soundcloud, $sd_tumblr);
|
2032 |
|
output/service.php
CHANGED
@@ -967,11 +967,10 @@ Class saswp_output_service{
|
|
967 |
$input1['mainEntity']['author']['url'] = $custom_fields['saswp_webpage_author_url'];
|
968 |
}
|
969 |
|
970 |
-
if(isset($custom_fields['saswp_webpage_organization_name'])){
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
$input1['mainEntity']['Publisher']['logo']['url'] = $custom_fields['saswp_webpage_organization_logo'];
|
975 |
}
|
976 |
|
977 |
break;
|
@@ -1211,13 +1210,13 @@ Class saswp_output_service{
|
|
1211 |
if(isset($custom_fields['saswp_recipe_author_image'])){
|
1212 |
$input1['author']['Image']['url'] = $custom_fields['saswp_recipe_author_image'];
|
1213 |
}
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
$input1['mainEntity']['Publisher']['logo']['url'] = $custom_fields['saswp_recipe_organization_logo'];
|
1220 |
}
|
|
|
1221 |
if(isset($custom_fields['saswp_recipe_preptime'])){
|
1222 |
$input1['prepTime'] = $custom_fields['saswp_recipe_preptime'];
|
1223 |
}
|
@@ -1382,10 +1381,7 @@ Class saswp_output_service{
|
|
1382 |
}
|
1383 |
if(isset($custom_fields['saswp_service_schema_telephone'])){
|
1384 |
$input1['provider']['address']['telephone'] = $custom_fields['saswp_service_schema_telephone'];
|
1385 |
-
}
|
1386 |
-
if(isset($custom_fields['saswp_service_schema_price_range'])){
|
1387 |
-
$input1['provider']['priceRange'] = $custom_fields['saswp_service_schema_price_range'];
|
1388 |
-
}
|
1389 |
if(isset($custom_fields['saswp_service_schema_description'])){
|
1390 |
$input1['description'] = wp_strip_all_tags(strip_shortcodes( $custom_fields['saswp_service_schema_description'] ));
|
1391 |
}
|
@@ -1424,11 +1420,11 @@ Class saswp_output_service{
|
|
1424 |
if(isset($custom_fields['saswp_video_object_thumbnail_url'])){
|
1425 |
$input1['thumbnailUrl'] = $custom_fields['saswp_video_object_thumbnail_url'];
|
1426 |
}
|
1427 |
-
if(isset($custom_fields['saswp_video_object_content_url'])){
|
1428 |
$input1['contentUrl'] = $custom_fields['saswp_video_object_content_url'];
|
1429 |
}
|
1430 |
-
if(isset($custom_fields['saswp_video_object_embed_url'])){
|
1431 |
-
$input1['embedUrl']
|
1432 |
}
|
1433 |
if(isset($custom_fields['saswp_video_object_author_name'])){
|
1434 |
$input1['author']['name'] = $custom_fields['saswp_video_object_author_name'];
|
@@ -3083,7 +3079,7 @@ Class saswp_output_service{
|
|
3083 |
global $post;
|
3084 |
$input2 = array();
|
3085 |
$image_id = get_post_thumbnail_id();
|
3086 |
-
|
3087 |
|
3088 |
if( is_array($image_details) && !empty($image_details)){
|
3089 |
|
967 |
$input1['mainEntity']['author']['url'] = $custom_fields['saswp_webpage_author_url'];
|
968 |
}
|
969 |
|
970 |
+
if(isset($custom_fields['saswp_webpage_organization_logo']) && isset($custom_fields['saswp_webpage_organization_name'])){
|
971 |
+
$input1['mainEntity']['publisher']['@type'] = 'Organization';
|
972 |
+
$input1['mainEntity']['publisher']['logo'] = $custom_fields['saswp_webpage_organization_logo'];
|
973 |
+
$input1['mainEntity']['publisher']['name'] = $custom_fields['saswp_webpage_organization_name'];
|
|
|
974 |
}
|
975 |
|
976 |
break;
|
1210 |
if(isset($custom_fields['saswp_recipe_author_image'])){
|
1211 |
$input1['author']['Image']['url'] = $custom_fields['saswp_recipe_author_image'];
|
1212 |
}
|
1213 |
+
|
1214 |
+
if(isset($custom_fields['saswp_recipe_organization_name']) && isset($custom_fields['saswp_recipe_organization_logo'])){
|
1215 |
+
$input1['mainEntity']['publisher']['@type'] = 'Organization';
|
1216 |
+
$input1['mainEntity']['publisher']['logo'] = $custom_fields['saswp_recipe_organization_logo'];
|
1217 |
+
$input1['mainEntity']['publisher']['name'] = $custom_fields['saswp_recipe_organization_name'];
|
|
|
1218 |
}
|
1219 |
+
|
1220 |
if(isset($custom_fields['saswp_recipe_preptime'])){
|
1221 |
$input1['prepTime'] = $custom_fields['saswp_recipe_preptime'];
|
1222 |
}
|
1381 |
}
|
1382 |
if(isset($custom_fields['saswp_service_schema_telephone'])){
|
1383 |
$input1['provider']['address']['telephone'] = $custom_fields['saswp_service_schema_telephone'];
|
1384 |
+
}
|
|
|
|
|
|
|
1385 |
if(isset($custom_fields['saswp_service_schema_description'])){
|
1386 |
$input1['description'] = wp_strip_all_tags(strip_shortcodes( $custom_fields['saswp_service_schema_description'] ));
|
1387 |
}
|
1420 |
if(isset($custom_fields['saswp_video_object_thumbnail_url'])){
|
1421 |
$input1['thumbnailUrl'] = $custom_fields['saswp_video_object_thumbnail_url'];
|
1422 |
}
|
1423 |
+
if(isset($custom_fields['saswp_video_object_content_url']) && wp_http_validate_url($custom_fields['saswp_video_object_content_url']) ){
|
1424 |
$input1['contentUrl'] = $custom_fields['saswp_video_object_content_url'];
|
1425 |
}
|
1426 |
+
if(isset($custom_fields['saswp_video_object_embed_url']) && wp_http_validate_url($custom_fields['saswp_video_object_embed_url'])){
|
1427 |
+
$input1['embedUrl'] = $custom_fields['saswp_video_object_embed_url'];
|
1428 |
}
|
1429 |
if(isset($custom_fields['saswp_video_object_author_name'])){
|
1430 |
$input1['author']['name'] = $custom_fields['saswp_video_object_author_name'];
|
3079 |
global $post;
|
3080 |
$input2 = array();
|
3081 |
$image_id = get_post_thumbnail_id();
|
3082 |
+
$image_details = wp_get_attachment_image_src($image_id, 'full');
|
3083 |
|
3084 |
if( is_array($image_details) && !empty($image_details)){
|
3085 |
|
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.3
|
6 |
-
Stable tag: 1.9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -118,9 +118,19 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
= 1.9.25.1 (5 Feb 2020) =
|
122 |
|
123 |
-
* Fixed: Fatal error: Cannot use isset() on the result of an expression( you can use
|
124 |
|
125 |
= 1.9.25 (1 Feb 2020) =
|
126 |
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.3
|
6 |
+
Stable tag: 1.9.26
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 1.9.26 (15 Feb 2020) =
|
122 |
+
|
123 |
+
* Fixed: A value for the thumbnailUrl field is required(Video Object) #770
|
124 |
+
* Fixed: Remove priceRange$ property from services schema type #775
|
125 |
+
* Fixed: HTML tags are showing in the review's comments #789
|
126 |
+
* Fixed: Things is not a know valid target type for the publisher property #774
|
127 |
+
* Fixed: Event type drop down value is being reset, even after changing the value #797
|
128 |
+
* Fixed: The text inside tag 'script type=application/ld+json' contains 'html comments', which is disallowed #769
|
129 |
+
* Fixed: Notices and warning #779, #772, #784
|
130 |
+
|
131 |
= 1.9.25.1 (5 Feb 2020) =
|
132 |
|
133 |
+
* Fixed: Fatal error: Cannot use isset() on the result of an expression( you can use “null !==expression” instead) #768
|
134 |
|
135 |
= 1.9.25 (1 Feb 2020) =
|
136 |
|
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.26
|
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.26');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
view/paywall.php
CHANGED
@@ -78,6 +78,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
78 |
$fixed_text = '';
|
79 |
$taxonomy_term = '';
|
80 |
$fixed_image = '';
|
|
|
81 |
|
82 |
if ( isset( $_POST['notAccessibleForFree'] ) )
|
83 |
$notAccessibleForFree = sanitize_text_field($_POST['notAccessibleForFree']);
|
78 |
$fixed_text = '';
|
79 |
$taxonomy_term = '';
|
80 |
$fixed_image = '';
|
81 |
+
$cus_meta_field = array();
|
82 |
|
83 |
if ( isset( $_POST['notAccessibleForFree'] ) )
|
84 |
$notAccessibleForFree = sanitize_text_field($_POST['notAccessibleForFree']);
|
view/schema_type.php
CHANGED
@@ -37,20 +37,20 @@ function saswp_add_all_meta_boxes() {
|
|
37 |
);
|
38 |
|
39 |
add_meta_box( 'saswp_help_meta_box_id',
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
add_meta_box(
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
add_meta_box(
|
55 |
'saswp_amp_select',
|
56 |
esc_html__( 'Placement','schema-and-structured-data-for-wp' ),
|
@@ -142,7 +142,7 @@ function saswp_schema_type_meta_box_callback( $post) {
|
|
142 |
$cus_field = get_post_meta($post->ID, 'saswp_custom_meta_field', true);
|
143 |
$schema_type = get_post_meta($post->ID, 'schema_type', true);
|
144 |
$append_reviews = get_post_meta($post->ID, 'saswp_enable_append_reviews', true);
|
145 |
-
|
146 |
$speakable = get_post_meta($post->ID, 'saswp_enable_speakable_schema', true);
|
147 |
$item_list_enable = get_post_meta($post->ID, 'saswp_enable_itemlist_schema', true);
|
148 |
$item_list_tags = get_post_meta($post->ID, 'saswp_item_list_tags', true);
|
@@ -1175,12 +1175,22 @@ function saswp_schema_type_add_meta_box_save( $post_id ) {
|
|
1175 |
update_post_meta( $post_id, 'schema_type', sanitize_text_field( $_POST['schema_type'] ) );
|
1176 |
update_post_meta( $post_id, 'saswp_business_type', sanitize_text_field( $_POST['saswp_business_type'] ) );
|
1177 |
update_post_meta( $post_id, 'saswp_event_type', sanitize_text_field( $_POST['saswp_event_type'] ) );
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1182 |
|
1183 |
-
update_post_meta( $post_id, 'saswp_enable_itemlist_schema', intval($_POST['saswp_enable_itemlist_schema']) );
|
1184 |
update_post_meta( $post_id, 'saswp_item_list_tags', sanitize_text_field($_POST['saswp_item_list_tags']) );
|
1185 |
update_post_meta( $post_id, 'saswp_item_list_custom', sanitize_text_field($_POST['saswp_item_list_custom']) );
|
1186 |
update_post_meta( $post_id, 'saswp_review_item_reviewed_'.$post_id, sanitize_text_field($_POST['saswp_review_item_reviewed_'.$post_id]) );
|
37 |
);
|
38 |
|
39 |
add_meta_box( 'saswp_help_meta_box_id',
|
40 |
+
esc_html__('Help', 'schema-and-structured-data-for-wp' ),
|
41 |
+
'saswp_help_meta_box_cb',
|
42 |
+
'saswp',
|
43 |
+
'side', 'low'
|
44 |
+
);
|
45 |
+
|
46 |
add_meta_box(
|
47 |
+
'schema_options',
|
48 |
+
esc_html__( 'Advance Schema Options', 'schema-and-structured-data-for-wp' ),
|
49 |
+
'saswp_schema_options_meta_box_callback',
|
50 |
+
'saswp',
|
51 |
+
'advanced',
|
52 |
+
'low'
|
53 |
+
);
|
54 |
add_meta_box(
|
55 |
'saswp_amp_select',
|
56 |
esc_html__( 'Placement','schema-and-structured-data-for-wp' ),
|
142 |
$cus_field = get_post_meta($post->ID, 'saswp_custom_meta_field', true);
|
143 |
$schema_type = get_post_meta($post->ID, 'schema_type', true);
|
144 |
$append_reviews = get_post_meta($post->ID, 'saswp_enable_append_reviews', true);
|
145 |
+
$event_type = get_post_meta($post->ID, 'saswp_event_type', true);
|
146 |
$speakable = get_post_meta($post->ID, 'saswp_enable_speakable_schema', true);
|
147 |
$item_list_enable = get_post_meta($post->ID, 'saswp_enable_itemlist_schema', true);
|
148 |
$item_list_tags = get_post_meta($post->ID, 'saswp_item_list_tags', true);
|
1175 |
update_post_meta( $post_id, 'schema_type', sanitize_text_field( $_POST['schema_type'] ) );
|
1176 |
update_post_meta( $post_id, 'saswp_business_type', sanitize_text_field( $_POST['saswp_business_type'] ) );
|
1177 |
update_post_meta( $post_id, 'saswp_event_type', sanitize_text_field( $_POST['saswp_event_type'] ) );
|
1178 |
+
|
1179 |
+
if(isset($_POST['saswp_business_name'])){
|
1180 |
+
update_post_meta( $post_id, 'saswp_business_name', sanitize_text_field( $_POST['saswp_business_name'] ) );
|
1181 |
+
}
|
1182 |
+
if(isset($_POST['saswp_enable_speakable_schema'])){
|
1183 |
+
update_post_meta( $post_id, 'saswp_enable_speakable_schema', intval($_POST['saswp_enable_speakable_schema']) );
|
1184 |
+
}
|
1185 |
+
|
1186 |
+
if(isset($_POST['saswp_enable_append_reviews'])){
|
1187 |
+
update_post_meta( $post_id, 'saswp_enable_append_reviews', intval($_POST['saswp_enable_append_reviews']) );
|
1188 |
+
}
|
1189 |
+
|
1190 |
+
if(isset($_POST['saswp_enable_itemlist_schema'])){
|
1191 |
+
update_post_meta( $post_id, 'saswp_enable_itemlist_schema', intval($_POST['saswp_enable_itemlist_schema']) );
|
1192 |
+
}
|
1193 |
|
|
|
1194 |
update_post_meta( $post_id, 'saswp_item_list_tags', sanitize_text_field($_POST['saswp_item_list_tags']) );
|
1195 |
update_post_meta( $post_id, 'saswp_item_list_custom', sanitize_text_field($_POST['saswp_item_list_custom']) );
|
1196 |
update_post_meta( $post_id, 'saswp_review_item_reviewed_'.$post_id, sanitize_text_field($_POST['saswp_review_item_reviewed_'.$post_id]) );
|