Version Description
(27 June 2020) =
- Added: Project Schema #486
- Added: ApartmentComplex Schema #787
- Added: RentAction Schema #788
- Added: HotelRoom Schema #788
- Added: Certifications/education ( EducationalOccupationalCredential ) scheme type #859
- Added: Podcast ( Audiobook, PodcastEpisode & PodcastSeasons ) Schema
- Enhancement: Rating selection in decimal number like 3.1, 3.5 etc. #782
- Fixed: Breadcrumb is not correct on category page #1056
- Fixed: Uncaught Error: Option 'ajax' is not allowed for Select2 when attached to a
- Fixed: Product schema adding through the "Electro" theme on the product category pages causing error #1081
- Fixed: The text inside tag 'script type=application/ld+json' contains 'html comments' in videoObject schema #1078
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.42 |
Comparing to | |
See all releases |
Code changes from version 1.9.41.3 to 1.9.42
- admin_section/common-function.php +1 -1
- admin_section/css/jquery.rateyo.min.css +35 -1
- admin_section/css/saswp-style.css +0 -1
- admin_section/js/main-script.js +8 -7
- admin_section/js/main-script.min.js +1 -1
- admin_section/js/review-form.js +5 -2
- admin_section/js/review-form.min.js +1 -1
- admin_section/js/saswp-frontend.js +6 -3
- admin_section/js/saswp-frontend.min.js +1 -1
- admin_section/settings.php +5 -1
- admin_section/structure_admin.php +17 -12
- core/array-list/schema-properties.php +629 -0
- core/array-list/schemas.php +12 -5
- core/global.php +9 -1
- modules/reviews/comments.php +4 -1
- modules/reviews/reviews_admin.php +2 -2
- modules/reviews/reviews_form.php +1 -1
- modules/reviews/reviews_service.php +1 -1
- output/function.php +4 -1
- output/markup.php +402 -0
- output/output.php +191 -2
- output/service.php +401 -1
- readme.txt +15 -1
- structured-data-for-wp.php +2 -2
- view/schema_type.php +4 -0
admin_section/common-function.php
CHANGED
@@ -3251,7 +3251,7 @@ function saswp_get_video_links(){
|
|
3251 |
$attributes = saswp_get_gutenberg_block_data('core-embed/youtube');
|
3252 |
|
3253 |
if(isset($attributes['attrs']['url'])){
|
3254 |
-
$response[] = $attributes['attrs']['url'];
|
3255 |
}
|
3256 |
|
3257 |
}
|
3251 |
$attributes = saswp_get_gutenberg_block_data('core-embed/youtube');
|
3252 |
|
3253 |
if(isset($attributes['attrs']['url'])){
|
3254 |
+
$response[0] = $attributes['attrs']['url'];
|
3255 |
}
|
3256 |
|
3257 |
}
|
admin_section/css/jquery.rateyo.min.css
CHANGED
@@ -36,4 +36,38 @@
|
|
36 |
left: 0;
|
37 |
overflow: hidden;
|
38 |
}
|
39 |
-
/*# sourceMappingURL=min/jquery.rateyo.min.css.map */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
left: 0;
|
37 |
overflow: hidden;
|
38 |
}
|
39 |
+
/*# sourceMappingURL=min/jquery.rateyo.min.css.map */
|
40 |
+
|
41 |
+
.saswp-rateyo-counter::before{
|
42 |
+
content: "";
|
43 |
+
width: 0;
|
44 |
+
height: 0;
|
45 |
+
top: 50%;
|
46 |
+
margin-top: -5px;
|
47 |
+
display: block;
|
48 |
+
border-color: transparent rgba(0, 0, 0, 0.8) transparent transparent;
|
49 |
+
border-width: 5px 5px 5px 0px;
|
50 |
+
left: -10px;
|
51 |
+
border-style: solid;
|
52 |
+
position: relative;
|
53 |
+
}
|
54 |
+
.saswp-rateyo-counter{
|
55 |
+
display: none;
|
56 |
+
position: absolute;
|
57 |
+
min-width: 20px;
|
58 |
+
padding: 5px;
|
59 |
+
font-size: 15px;
|
60 |
+
line-height: 8px;
|
61 |
+
height: 25px;
|
62 |
+
background-color: rgba(0, 0, 0, 0.8);
|
63 |
+
top: 50%;
|
64 |
+
left: 200px;
|
65 |
+
margin-top: -14px;
|
66 |
+
color: white;
|
67 |
+
}
|
68 |
+
.saswp-rating-container{
|
69 |
+
position: relative;
|
70 |
+
}
|
71 |
+
.saswp-rating-container:hover div.saswp-rateyo-counter{
|
72 |
+
display: block;
|
73 |
+
}
|
admin_section/css/saswp-style.css
CHANGED
@@ -10,7 +10,6 @@
|
|
10 |
margin-top:30px;
|
11 |
width:100%;
|
12 |
}
|
13 |
-
.saswp-review-list{}
|
14 |
.saswp-channel-list{
|
15 |
margin-right: 15px;
|
16 |
}
|
10 |
margin-top:30px;
|
11 |
width:100%;
|
12 |
}
|
|
|
13 |
.saswp-channel-list{
|
14 |
margin-right: 15px;
|
15 |
}
|
admin_section/js/main-script.js
CHANGED
@@ -2413,16 +2413,17 @@ jQuery(document).ready(function($){
|
|
2413 |
|
2414 |
//star rating stars here
|
2415 |
if(typeof(saswp_reviews_data) !== 'undefined'){
|
2416 |
-
|
2417 |
$(".saswp-rating-div").rateYo({
|
2418 |
-
|
2419 |
-
rating: saswp_reviews_data.rating_val,
|
2420 |
-
halfStar: true,
|
2421 |
readOnly: saswp_reviews_data.readonly,
|
2422 |
onSet: function (rating, rateYoInstance) {
|
2423 |
-
$(this).next().val(rating);
|
2424 |
-
}
|
2425 |
-
|
|
|
|
|
2426 |
});
|
2427 |
|
2428 |
}
|
2413 |
|
2414 |
//star rating stars here
|
2415 |
if(typeof(saswp_reviews_data) !== 'undefined'){
|
2416 |
+
console.log(saswp_reviews_data.rating_val);
|
2417 |
$(".saswp-rating-div").rateYo({
|
2418 |
+
spacing: "5px",
|
2419 |
+
rating: saswp_reviews_data.rating_val,
|
|
|
2420 |
readOnly: saswp_reviews_data.readonly,
|
2421 |
onSet: function (rating, rateYoInstance) {
|
2422 |
+
$(this).next().next().val(rating);
|
2423 |
+
}
|
2424 |
+
}).on("rateyo.change", function (e, data){
|
2425 |
+
var rating = data.rating;
|
2426 |
+
$(this).next().text(rating);
|
2427 |
});
|
2428 |
|
2429 |
}
|
admin_section/js/main-script.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var saswp_attached_rv=[],saswp_attached_col=[];jQuery(document).ready(function(s){if(saswp_select2(),s(".saswp-upgrade-to-pro").parent().attr({href:"https://structured-data-for-wp.com/pricing/",target:"_blank"}),s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show(saswp_localize_data.translable_txt.attach_review,"#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,p="";t>0&&(p+=t+" Reviews, "),i>0&&(p+=i+" Collection"),p||(p=0),s(".saswp-attached-rv-count").text("Attached "+p),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='<div class="saswp-add-rv-loop" data-type="'+a+'" data-id="'+e.saswp_review_id+'">',"review"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" ( Rating - "+e.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+e.saswp_review_platform_icon+'"/></span></strong>'),"collection"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" </strong>"),t+="</div>"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),e.message&&(s(".saswp-rv-not-found[data-type="+a+"]").removeClass("saswp_hide"),s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"))}else alert(e.message);s("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),s(".saswp-modify-schema-toggle").click(function(e){e.preventDefault(),s(".saswp-modify-container").slideToggle("300");var a=s("#saswp_enable_custom_field"),t=a.val();a.val("1"===t?"0":"1"),s(".saswp-enable-modify-schema-output").change()}),s(".saswp-enable-itemlist").change(function(){s(this).is(":checked")?(s("#saswp_item_list_tags").show(),s(".saspw-item-list-note").show(),"custom"==s("#saswp_item_list_tags").val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()):(s(".saspw-item-list-note").hide(),s("#saswp_item_list_tags").hide(),s("#saswp_item_list_custom").hide())}),s("#saswp_item_list_tags").change(function(){"custom"==s(this).val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()}),s(document).on("click",".saswp-add-g-location-btn",function(e){var a="";a=s("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',e.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>'+saswp_localize_data.translable_txt.place_id+'</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>'+saswp_localize_data.translable_txt.reviews+'</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">'+saswp_localize_data.translable_txt.fetch+'</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),c=s("#reviews_addon_license_key").val(),o=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=i%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(c||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:o,reviews_api:c,location:t,blocks:i,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert(saswp_localize_data.translable_txt.enter_place_id),""==p&&alert(saswp_localize_data.translable_txt.enter_api_key),""==c&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var e,a="<h3>"+saswp_localize_data.translable_txt.using_schema+"</h3>";a+="<p>"+saswp_localize_data.translable_txt.do_you_want+" <b>"+saswp_localize_data.translable_txt.sd_update+"</b> "+saswp_localize_data.translable_txt.before_others+"</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #saswp_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="saswp_mc_embed_signup">',a+='<form method="POST" accept-charset="utf-8" id="saswp-news-letter-form">',a+='<div id="saswp_mc_embed_signup_scroll">',a+='<div class="saswp-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="saswp_subscriber_name" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="saswp_subscriber_email" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="saswp_subscriber_website" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+='<p id="saswp-news-letter-status"></p>',a+="</div>",a+="</form>",a+="</div>",s(document).on("submit","#saswp-news-letter-form",function(e){e.preventDefault();var a=s(this),t=a.find('input[name="saswp_subscriber_name"]').val(),i=a.find('input[name="saswp_subscriber_email"]').val();website=a.find('input[name="saswp_subscriber_website"]').val(),s.post(saswp_localize_data.ajax_url,{action:"saswp_subscribe_to_news_letter",saswp_security_nonce:saswp_localize_data.saswp_security_nonce,name:t,email:i,website:website},function(e){e?"Some fields are missing."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid email address."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Already subscribed."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):(s("#saswp-news-letter-status").text("You're subscribed!"),s("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var t={content:a,position:{edge:"top",align:"left"}};e=function(){s(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},(t=s.extend(t,{buttons:function(s,e){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){e.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){e.element.pointer("close")},3e3)}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?s(window).bind("load.wp-pointers",e):e()}if(s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),s(".saswp-schame-type-select").select2(),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-item-reivewed-list").change()),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-itemlist-item-type-list").change()):s(".saswp-schema-modify-section").show(),saswp_enable_rating_review(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").select2(),s(".saswp-local-sub-type-2").select2(),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)):s(".saswp-schema-modify-section").show(),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":s(this).is(":checked")?(s("#saswp_kb_contact_1").val(1),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(s("#saswp_kb_contact_1").val(0),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":s(this).is(":checked")?(s("#saswp-logo-dimensions").val(1),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(s("#saswp-logo-dimensions").val(0),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":s(this).is(":checked")?(s("#saswp_archive_schema").val(1),s(".saswp_archive_schema_type_class").parent().parent().show()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_schema").val(1):s("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yet-another-stars-rating").val(1):s("#saswp-yet-another-stars-rating").val(0);break;case"saswp-simple-author-box-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simple-author-box").val(1):s("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-theme-reviews").val(1):s("#saswp-wp-theme-reviews").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-myhome").val(1):s("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-5").val(1):s("#saswp-realestate-5").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-classipress").val(1):s("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wplms").val(1):s("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-manager").val(1):s("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-calendar-wd").val(1):s("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-organiser").val(1):s("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-modern-events-calendar").val(1):s("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking").val(1),s("#saswp-woocommerce-booking-main").val(1)):(s("#saswp-woocommerce-booking").val(0),s("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking-main").val(1),s("#saswp-woocommerce-booking").val(1)):(s("#saswp-woocommerce-booking-main").val(0),s("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce-membership").val(1):s("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":s(this).is(":checked")?s("#saswp-defragment").val(1):s("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-shopper-approved-review").val(1),s(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-shopper-approved-review").val(0),s(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":s(this).is(":checked")?(s("#saswp-google-review").val(1),s("#saswp-google-rv-free-checkbox").length?(s("#saswp-google-review-free").parent().parent().show(),s("#saswp-google-rv-free-checkbox").is(":checked")?s("#saswp_google_place_api_key").parent().parent().show():s("#saswp_google_place_api_key").parent().parent().hide()):s("#saswp_google_place_api_key").parent().parent().show(),s(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-google-review").val(0),s("#saswp_google_place_api_key").parent().parent().hide(),s(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),s("#saswp-google-rv-free-checkbox").length&&s("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":s("#saswp-google-review-checkbox").is(":checked")&&s(this).is(":checked")?(s("#saswp-google-review-free").val(1),s("#saswp_google_place_api_key").parent().parent().show()):(s("#saswp-google-review-free").val(0),s("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":s(this).is(":checked")?s("#saswp-markup-footer").val(1):s("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":s(this).is(":checked")?s("#saswp-pretty-print").val(1):s("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-rss-feed-image-checkbox":s(this).is(":checked")?s("#saswp-rss-feed-image").val(1):s("#saswp-rss-feed-image").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-schemaforfaqs").val(1):s("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-customer-reviews").val(1):s("#saswp-wp-customer-reviews").val(0);break;case"saswp-total-recipe-generator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-total-recipe-generator").val(1):s("#saswp-total-recipe-generator").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stachethemes-event-calendar").val(1):s("#saswp-stachethemes-event-calendar").val(0);break;case"saswp-all-in-one-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-all-in-one-event-calendar").val(1):s("#saswp-all-in-one-event-calendar").val(0);break;case"saswp-event-on-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-on").val(1):s("#saswp-event-on").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var p="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(p='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+e.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+p)}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-post-specific-wrapper[data-id="+a+"] .saswp-post-specific-setting").after(e),s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){t.removeClass("updating-message"),"t"==e.status?(s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+a).val();if(s(this).is(":checked")){var p=0;s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s("#saswp_custom_schema_field[schema-id="+a+"]").parent().addClass("saswp_hide")}else{s("#saswp_custom_schema_field[schema-id="+a+"]").parent().removeClass("saswp_hide"),1==i?(s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"));p=1}s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:p,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),1==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),p=s("#"+i+"_addon_license_key").val();t&&i&&p?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:p,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)),a.removeClass("updating-message")},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();console.log(saswpIsEmail(t)),""!=s.trim(a)&&i&&""!=s.trim(t)&&1==saswpIsEmail(t)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",premium_cus:i,message:a,email:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s(".saswp-query-success").show(),s(".saswp-query-error").hide()):(s(".saswp-query-success").hide(),s(".saswp-query-error").show())},error:function(s){console.log(s)}}):""==s.trim(a)&&""==i&&""==s.trim(t)?alert("Please enter the message, email and select customer type"):(""==i&&alert("Select Customer type"),""==s.trim(a)&&alert("Please enter the message"),""==s.trim(t)&&alert("Please enter the email"),0==saswpIsEmail(t)&&alert("Please enter a valid email"))}),s(".saswp-import-plugins").on("click",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id");s.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?(s(a).parent().find(".saswp-imported-message").text(e.message),s(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(s(a).parent().find(".saswp-imported-message").addClass("saswp-error"),s(a).parent().find(".saswp-imported-message").text(e.message)),a.removeClass("updating-message")},"json")}),s(".saswp-feedback-no-thanks").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(".saswp-feedback-remindme").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(document).on("change",".saswp-local-business-type-select",function(e){e.preventDefault();var a=s(this),t=s(this).val();s.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){s(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',s.each(e.result,function(s,e){i+='<option value="'+s+'">'+e+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else s(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),jQuery(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),s(document).on("click",".saswp-add-custom-schema",function(e){e.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(e){e.preventDefault(),s("#saswp_custom_schema_field").val(""),s(".saswp-add-custom-schema-field").addClass("saswp_hide"),s(".saswp-add-custom-schema").show()}),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_reviews_datepicker(),s(document).on("click",".saswp-add-more-item",function(e){e.preventDefault();s(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),s(document).on("click",".saswp-remove-review-item",function(e){e.preventDefault(),s(this).parent().parent("tr").remove()}),s(document).on("focusout",".saswp-review-item-tr input[type=number]",function(e){e.preventDefault();var a=0,t=s(".saswp-review-item-tr input[type=number]").length;s(".saswp-review-item-tr input[type=number]").each(function(e,t){""==s(t).val()?a+=parseFloat(0):a+=parseFloat(s(t).val())});var i=a/t;s("#saswp-review-item-over-all").val(i)}),s("#saswp-review-location").change(function(){var e=s(this).val();s(".saswp-review-shortcode").addClass("saswp_hide"),3==e&&s(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),s("#saswp-review-item-enable").change(function(){s(this).is(":checked")?s(".saswp-review-fields").show():s(".saswp-review-fields").hide()}).change(),s(document).on("click",".saswp-restore-post-schema",function(e){e.preventDefault();var a=s(this);if(a.addClass("updating-message"),s(".saswp-post-specific-schema-ids").val())var t=JSON.parse(s(".saswp-post-specific-schema-ids").val());s.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?setTimeout(function(){location.reload()},1e3):(alert(s.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?s(".saswp-global-container:eq(2)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s(".saswp-tools-container:first").show(),s("#saswp-tools-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-tools-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();-1==t.indexOf("_image")&&-1==t.indexOf("_logo")||(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),p=s(this).attr("div_type"),c=s(this).attr("itemlist_sub_type"),o=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div:nth-child("+o+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,p,t,i+"_",c)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),p="",c=a.toLowerCase()+"_"+i,o="saswp_fixed_image["+i+"]";"manual_text"==t?(p+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(p+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(p),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,p+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(p),saswpCustomSelect2())},"json"):"custom_field"==t?(p+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',p+="</select></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"fixed_image"==t?(p+="<td>",p+="<fieldset>",p+='<input data-id="media" style="width: 30%;" class="button" id="'+c+'_button" name="'+c+'_button" type="button" value="Upload" />',p+='<input type="hidden" data-id="'+c+'_height" class="upload-height" name="'+o+'[height]" id="'+c+'_height" value="">',p+='<input type="hidden" data-id="'+c+'_width" class="upload-width" name="'+o+'[width]" id="'+c+'_width" value="">',p+='<input type="hidden" data-id="'+c+'_thumbnail" class="upload-thumbnail" name="'+o+'[thumbnail]" id="'+c+'_thumbnail" value="">',p+='<div class="saswp_image_div_'+c+'">',p+="</div>",p+="</fieldset>",p+="</td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):(p+="<td></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var p=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:p,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('<tr><td><input type="text" placeholder="https://www.facebook.com/profile" name="sd_data[saswp_social_links][]" value=""></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td></tr>')}),s(document).on("click",".saswp-show-accept-rv-popup",function(){tb_show("Reviews Form","#TB_inline??width=600&height=400&inlineId=saswp-accept-reviews-popup"),s(document).find("#TB_window").width(600).height(400).css({top:"100px","margin-top":"0px"})}),("saswp_reviews"==saswp_localize_data.post_type||"saswp-collections"==saswp_localize_data.post_type)&&"edit.php"==saswp_localize_data.page_now){var i='<div class="saswp-custom-post-tab">';i+='<div style="display:none;" id="saswp-accept-reviews-popup">',i+='<div class="saswp-accept-rv-container">',i+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",i+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',i+='<div class="saswp-show-form-on-tab"><strong>Show form on button tap</strong> <input value="[saswp-reviews-form onbutton="1"]" type="text" readonly></div>',i+="</div>",i+="</div>",i+='<h2 class="nav-tab-wrapper">',i+="<a href="+saswp_localize_data.reviews_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.reviews_page_url?"saswp-global-selected":"")+'">Reviews</a>',i+="<a href="+saswp_localize_data.collections_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.collections_page_url?"saswp-global-selected":"")+'">Collections</a>',i+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',i+="</h2>",i+="</div>",jQuery(jQuery(".wrap")).prepend(i)}"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().val(e)}}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')}),saswpCollectionSlider(),s(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),"grid"==e&&s(".saswp-grid-options").removeClass("saswp_hide"),"gallery"==e&&s(".saswp-slider-options").removeClass("saswp_hide"),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px")),"popup"==e&&s(".saswp-collection-lp").css("height","31px"),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a)):alert("Enter Count")});var p,c,o=s("#saswp_collection_id").val();o&&(s(".spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_collection_platforms",collection_id:o,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if(e.status){var a=e.message;s.each(a,function(s,e){saswp_get_collection_data(e,s,null)})}s(".spinner").removeClass("is-active")},"json")),(p=document.createElement("div")).style.cssText="position:absolute; background:black; color:white; padding:4px 6px;z-index:10000;border-radius:2px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);opacity:0;transition:opacity 0.3s",p.innerHTML="Copied!",document.body.appendChild(p);var n=document.getElementById("motivatebox");n&&n.addEventListener("mouseup",function(s){var e=(s=s||event).target||s.srcElement;"motivate"==e.className&&(!function(s){var e=document.createRange();e.selectNodeContents(s);var a=window.getSelection();a.removeAllRanges(),a.addRange(e)}(e),function(){var s;try{s=document.execCommand("copy")}catch(e){s=!1}return s}()&&function(s){var e=s||event;clearTimeout(c),p.style.left=e.pageX-10+"px",p.style.top=e.pageY+15+"px",p.style.opacity=1,c=setTimeout(function(){p.style.opacity=0},500)}(s))},!1)});
|
1 |
+
var saswp_attached_rv=[],saswp_attached_col=[];jQuery(document).ready(function(s){if(saswp_select2(),s(".saswp-upgrade-to-pro").parent().attr({href:"https://structured-data-for-wp.com/pricing/",target:"_blank"}),s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show(saswp_localize_data.translable_txt.attach_review,"#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,p="";t>0&&(p+=t+" Reviews, "),i>0&&(p+=i+" Collection"),p||(p=0),s(".saswp-attached-rv-count").text("Attached "+p),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='<div class="saswp-add-rv-loop" data-type="'+a+'" data-id="'+e.saswp_review_id+'">',"review"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" ( Rating - "+e.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+e.saswp_review_platform_icon+'"/></span></strong>'),"collection"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" </strong>"),t+="</div>"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),e.message&&(s(".saswp-rv-not-found[data-type="+a+"]").removeClass("saswp_hide"),s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"))}else alert(e.message);s("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),s(".saswp-modify-schema-toggle").click(function(e){e.preventDefault(),s(".saswp-modify-container").slideToggle("300");var a=s("#saswp_enable_custom_field"),t=a.val();a.val("1"===t?"0":"1"),s(".saswp-enable-modify-schema-output").change()}),s(".saswp-enable-itemlist").change(function(){s(this).is(":checked")?(s("#saswp_item_list_tags").show(),s(".saspw-item-list-note").show(),"custom"==s("#saswp_item_list_tags").val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()):(s(".saspw-item-list-note").hide(),s("#saswp_item_list_tags").hide(),s("#saswp_item_list_custom").hide())}),s("#saswp_item_list_tags").change(function(){"custom"==s(this).val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()}),s(document).on("click",".saswp-add-g-location-btn",function(e){var a="";a=s("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',e.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>'+saswp_localize_data.translable_txt.place_id+'</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>'+saswp_localize_data.translable_txt.reviews+'</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">'+saswp_localize_data.translable_txt.fetch+'</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),o=s("#reviews_addon_license_key").val(),c=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=i%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(o||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:c,reviews_api:o,location:t,blocks:i,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert(saswp_localize_data.translable_txt.enter_place_id),""==p&&alert(saswp_localize_data.translable_txt.enter_api_key),""==o&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var e,a="<h3>"+saswp_localize_data.translable_txt.using_schema+"</h3>";a+="<p>"+saswp_localize_data.translable_txt.do_you_want+" <b>"+saswp_localize_data.translable_txt.sd_update+"</b> "+saswp_localize_data.translable_txt.before_others+"</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #saswp_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="saswp_mc_embed_signup">',a+='<form method="POST" accept-charset="utf-8" id="saswp-news-letter-form">',a+='<div id="saswp_mc_embed_signup_scroll">',a+='<div class="saswp-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="saswp_subscriber_name" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="saswp_subscriber_email" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="saswp_subscriber_website" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+='<p id="saswp-news-letter-status"></p>',a+="</div>",a+="</form>",a+="</div>",s(document).on("submit","#saswp-news-letter-form",function(e){e.preventDefault();var a=s(this),t=a.find('input[name="saswp_subscriber_name"]').val(),i=a.find('input[name="saswp_subscriber_email"]').val();website=a.find('input[name="saswp_subscriber_website"]').val(),s.post(saswp_localize_data.ajax_url,{action:"saswp_subscribe_to_news_letter",saswp_security_nonce:saswp_localize_data.saswp_security_nonce,name:t,email:i,website:website},function(e){e?"Some fields are missing."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid email address."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Already subscribed."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):(s("#saswp-news-letter-status").text("You're subscribed!"),s("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var t={content:a,position:{edge:"top",align:"left"}};e=function(){s(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},(t=s.extend(t,{buttons:function(s,e){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){e.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){e.element.pointer("close")},3e3)}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?s(window).bind("load.wp-pointers",e):e()}if(s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),s(".saswp-schame-type-select").select2(),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-item-reivewed-list").change()),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-itemlist-item-type-list").change()):s(".saswp-schema-modify-section").show(),saswp_enable_rating_review(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").select2(),s(".saswp-local-sub-type-2").select2(),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)):s(".saswp-schema-modify-section").show(),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":s(this).is(":checked")?(s("#saswp_kb_contact_1").val(1),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(s("#saswp_kb_contact_1").val(0),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":s(this).is(":checked")?(s("#saswp-logo-dimensions").val(1),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(s("#saswp-logo-dimensions").val(0),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":s(this).is(":checked")?(s("#saswp_archive_schema").val(1),s(".saswp_archive_schema_type_class").parent().parent().show()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_schema").val(1):s("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yet-another-stars-rating").val(1):s("#saswp-yet-another-stars-rating").val(0);break;case"saswp-simple-author-box-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simple-author-box").val(1):s("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-theme-reviews").val(1):s("#saswp-wp-theme-reviews").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-myhome").val(1):s("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-5").val(1):s("#saswp-realestate-5").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-classipress").val(1):s("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wplms").val(1):s("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-manager").val(1):s("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-calendar-wd").val(1):s("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-organiser").val(1):s("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-modern-events-calendar").val(1):s("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking").val(1),s("#saswp-woocommerce-booking-main").val(1)):(s("#saswp-woocommerce-booking").val(0),s("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking-main").val(1),s("#saswp-woocommerce-booking").val(1)):(s("#saswp-woocommerce-booking-main").val(0),s("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce-membership").val(1):s("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":s(this).is(":checked")?s("#saswp-defragment").val(1):s("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-shopper-approved-review").val(1),s(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-shopper-approved-review").val(0),s(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":s(this).is(":checked")?(s("#saswp-google-review").val(1),s("#saswp-google-rv-free-checkbox").length?(s("#saswp-google-review-free").parent().parent().show(),s("#saswp-google-rv-free-checkbox").is(":checked")?s("#saswp_google_place_api_key").parent().parent().show():s("#saswp_google_place_api_key").parent().parent().hide()):s("#saswp_google_place_api_key").parent().parent().show(),s(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-google-review").val(0),s("#saswp_google_place_api_key").parent().parent().hide(),s(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),s("#saswp-google-rv-free-checkbox").length&&s("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":s("#saswp-google-review-checkbox").is(":checked")&&s(this).is(":checked")?(s("#saswp-google-review-free").val(1),s("#saswp_google_place_api_key").parent().parent().show()):(s("#saswp-google-review-free").val(0),s("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":s(this).is(":checked")?s("#saswp-markup-footer").val(1):s("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":s(this).is(":checked")?s("#saswp-pretty-print").val(1):s("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-rss-feed-image-checkbox":s(this).is(":checked")?s("#saswp-rss-feed-image").val(1):s("#saswp-rss-feed-image").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-schemaforfaqs").val(1):s("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-customer-reviews").val(1):s("#saswp-wp-customer-reviews").val(0);break;case"saswp-total-recipe-generator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-total-recipe-generator").val(1):s("#saswp-total-recipe-generator").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stachethemes-event-calendar").val(1):s("#saswp-stachethemes-event-calendar").val(0);break;case"saswp-all-in-one-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-all-in-one-event-calendar").val(1):s("#saswp-all-in-one-event-calendar").val(0);break;case"saswp-event-on-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-on").val(1):s("#saswp-event-on").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var p="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(p='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+e.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+p)}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-post-specific-wrapper[data-id="+a+"] .saswp-post-specific-setting").after(e),s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){t.removeClass("updating-message"),"t"==e.status?(s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+a).val();if(s(this).is(":checked")){var p=0;s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s("#saswp_custom_schema_field[schema-id="+a+"]").parent().addClass("saswp_hide")}else{s("#saswp_custom_schema_field[schema-id="+a+"]").parent().removeClass("saswp_hide"),1==i?(s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"));p=1}s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:p,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),1==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),p=s("#"+i+"_addon_license_key").val();t&&i&&p?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:p,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)),a.removeClass("updating-message")},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();console.log(saswpIsEmail(t)),""!=s.trim(a)&&i&&""!=s.trim(t)&&1==saswpIsEmail(t)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",premium_cus:i,message:a,email:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s(".saswp-query-success").show(),s(".saswp-query-error").hide()):(s(".saswp-query-success").hide(),s(".saswp-query-error").show())},error:function(s){console.log(s)}}):""==s.trim(a)&&""==i&&""==s.trim(t)?alert("Please enter the message, email and select customer type"):(""==i&&alert("Select Customer type"),""==s.trim(a)&&alert("Please enter the message"),""==s.trim(t)&&alert("Please enter the email"),0==saswpIsEmail(t)&&alert("Please enter a valid email"))}),s(".saswp-import-plugins").on("click",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id");s.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?(s(a).parent().find(".saswp-imported-message").text(e.message),s(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(s(a).parent().find(".saswp-imported-message").addClass("saswp-error"),s(a).parent().find(".saswp-imported-message").text(e.message)),a.removeClass("updating-message")},"json")}),s(".saswp-feedback-no-thanks").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(".saswp-feedback-remindme").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(document).on("change",".saswp-local-business-type-select",function(e){e.preventDefault();var a=s(this),t=s(this).val();s.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){s(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',s.each(e.result,function(s,e){i+='<option value="'+s+'">'+e+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else s(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),jQuery(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),s(document).on("click",".saswp-add-custom-schema",function(e){e.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(e){e.preventDefault(),s("#saswp_custom_schema_field").val(""),s(".saswp-add-custom-schema-field").addClass("saswp_hide"),s(".saswp-add-custom-schema").show()}),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_reviews_datepicker(),s(document).on("click",".saswp-add-more-item",function(e){e.preventDefault();s(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),s(document).on("click",".saswp-remove-review-item",function(e){e.preventDefault(),s(this).parent().parent("tr").remove()}),s(document).on("focusout",".saswp-review-item-tr input[type=number]",function(e){e.preventDefault();var a=0,t=s(".saswp-review-item-tr input[type=number]").length;s(".saswp-review-item-tr input[type=number]").each(function(e,t){""==s(t).val()?a+=parseFloat(0):a+=parseFloat(s(t).val())});var i=a/t;s("#saswp-review-item-over-all").val(i)}),s("#saswp-review-location").change(function(){var e=s(this).val();s(".saswp-review-shortcode").addClass("saswp_hide"),3==e&&s(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),s("#saswp-review-item-enable").change(function(){s(this).is(":checked")?s(".saswp-review-fields").show():s(".saswp-review-fields").hide()}).change(),s(document).on("click",".saswp-restore-post-schema",function(e){e.preventDefault();var a=s(this);if(a.addClass("updating-message"),s(".saswp-post-specific-schema-ids").val())var t=JSON.parse(s(".saswp-post-specific-schema-ids").val());s.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?setTimeout(function(){location.reload()},1e3):(alert(s.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?s(".saswp-global-container:eq(2)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s(".saswp-tools-container:first").show(),s("#saswp-tools-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-tools-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();-1==t.indexOf("_image")&&-1==t.indexOf("_logo")||(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),p=s(this).attr("div_type"),o=s(this).attr("itemlist_sub_type"),c=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div:nth-child("+c+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,p,t,i+"_",o)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),p="",o=a.toLowerCase()+"_"+i,c="saswp_fixed_image["+i+"]";"manual_text"==t?(p+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(p+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(p),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,p+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(p),saswpCustomSelect2())},"json"):"custom_field"==t?(p+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',p+="</select></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"fixed_image"==t?(p+="<td>",p+="<fieldset>",p+='<input data-id="media" style="width: 30%;" class="button" id="'+o+'_button" name="'+o+'_button" type="button" value="Upload" />',p+='<input type="hidden" data-id="'+o+'_height" class="upload-height" name="'+c+'[height]" id="'+o+'_height" value="">',p+='<input type="hidden" data-id="'+o+'_width" class="upload-width" name="'+c+'[width]" id="'+o+'_width" value="">',p+='<input type="hidden" data-id="'+o+'_thumbnail" class="upload-thumbnail" name="'+c+'[thumbnail]" id="'+o+'_thumbnail" value="">',p+='<div class="saswp_image_div_'+o+'">',p+="</div>",p+="</fieldset>",p+="</td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):(p+="<td></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var p=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:p,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('<tr><td><input type="text" placeholder="https://www.facebook.com/profile" name="sd_data[saswp_social_links][]" value=""></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td></tr>')}),s(document).on("click",".saswp-show-accept-rv-popup",function(){tb_show("Reviews Form","#TB_inline??width=600&height=400&inlineId=saswp-accept-reviews-popup"),s(document).find("#TB_window").width(600).height(400).css({top:"100px","margin-top":"0px"})}),("saswp_reviews"==saswp_localize_data.post_type||"saswp-collections"==saswp_localize_data.post_type)&&"edit.php"==saswp_localize_data.page_now){var i='<div class="saswp-custom-post-tab">';i+='<div style="display:none;" id="saswp-accept-reviews-popup">',i+='<div class="saswp-accept-rv-container">',i+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",i+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',i+='<div class="saswp-show-form-on-tab"><strong>Show form on button tap</strong> <input value="[saswp-reviews-form onbutton="1"]" type="text" readonly></div>',i+="</div>",i+="</div>",i+='<h2 class="nav-tab-wrapper">',i+="<a href="+saswp_localize_data.reviews_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.reviews_page_url?"saswp-global-selected":"")+'">Reviews</a>',i+="<a href="+saswp_localize_data.collections_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.collections_page_url?"saswp-global-selected":"")+'">Collections</a>',i+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',i+="</h2>",i+="</div>",jQuery(jQuery(".wrap")).prepend(i)}"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&(console.log(saswp_reviews_data.rating_val),s(".saswp-rating-div").rateYo({spacing:"5px",rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().next().val(e)}}).on("rateyo.change",function(e,a){var t=a.rating;s(this).next().text(t)})),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')}),saswpCollectionSlider(),s(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),"grid"==e&&s(".saswp-grid-options").removeClass("saswp_hide"),"gallery"==e&&s(".saswp-slider-options").removeClass("saswp_hide"),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px")),"popup"==e&&s(".saswp-collection-lp").css("height","31px"),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a)):alert("Enter Count")});var p,o,c=s("#saswp_collection_id").val();c&&(s(".spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_collection_platforms",collection_id:c,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if(e.status){var a=e.message;s.each(a,function(s,e){saswp_get_collection_data(e,s,null)})}s(".spinner").removeClass("is-active")},"json")),(p=document.createElement("div")).style.cssText="position:absolute; background:black; color:white; padding:4px 6px;z-index:10000;border-radius:2px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);opacity:0;transition:opacity 0.3s",p.innerHTML="Copied!",document.body.appendChild(p);var n=document.getElementById("motivatebox");n&&n.addEventListener("mouseup",function(s){var e=(s=s||event).target||s.srcElement;"motivate"==e.className&&(!function(s){var e=document.createRange();e.selectNodeContents(s);var a=window.getSelection();a.removeAllRanges(),a.addRange(e)}(e),function(){var s;try{s=document.execCommand("copy")}catch(e){s=!1}return s}()&&function(s){var e=s||event;clearTimeout(o),p.style.left=e.pageX-10+"px",p.style.top=e.pageY+15+"px",p.style.opacity=1,o=setTimeout(function(){p.style.opacity=0},500)}(s))},!1)});
|
admin_section/js/review-form.js
CHANGED
@@ -2,10 +2,13 @@ jQuery(document).ready(function($){
|
|
2 |
|
3 |
jQuery(".saswp-rating-front-div").rateYo({
|
4 |
rating : 5,
|
5 |
-
|
6 |
onSet: function (rating, rateYoInstance) {
|
7 |
-
$(this).next().val(rating);
|
8 |
}
|
|
|
|
|
|
|
9 |
});
|
10 |
jQuery(".saswp-rv-form-btn a").on("click", function(e){
|
11 |
e.preventDefault();
|
2 |
|
3 |
jQuery(".saswp-rating-front-div").rateYo({
|
4 |
rating : 5,
|
5 |
+
spacing: "5px",
|
6 |
onSet: function (rating, rateYoInstance) {
|
7 |
+
$(this).next().next().val(rating);
|
8 |
}
|
9 |
+
}).on("rateyo.change", function(e, data){
|
10 |
+
var rating = data.rating;
|
11 |
+
$(this).next().text(rating);
|
12 |
});
|
13 |
jQuery(".saswp-rv-form-btn a").on("click", function(e){
|
14 |
e.preventDefault();
|
admin_section/js/review-form.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(n){jQuery(".saswp-rating-front-div").rateYo({rating:5,
|
1 |
+
jQuery(document).ready(function(n){jQuery(".saswp-rating-front-div").rateYo({rating:5,spacing:"5px",onSet:function(t,e){n(this).next().next().val(t)}}).on("rateyo.change",function(t,e){var a=e.rating;n(this).next().text(a)}),jQuery(".saswp-rv-form-btn a").on("click",function(t){t.preventDefault(),n(".saswp-review-submission-form").slideToggle("fast")})});
|
admin_section/js/saswp-frontend.js
CHANGED
@@ -1,11 +1,14 @@
|
|
1 |
jQuery(document).ready(function($){
|
2 |
|
3 |
jQuery("#saswp-comment-rating-div").rateYo({
|
4 |
-
rating : 5,
|
5 |
-
|
6 |
onSet: function (rating, rateYoInstance) {
|
7 |
-
$(this).next().val(rating);
|
8 |
}
|
|
|
|
|
|
|
9 |
});
|
10 |
|
11 |
});
|
1 |
jQuery(document).ready(function($){
|
2 |
|
3 |
jQuery("#saswp-comment-rating-div").rateYo({
|
4 |
+
rating : 5,
|
5 |
+
spacing: "5px",
|
6 |
onSet: function (rating, rateYoInstance) {
|
7 |
+
$(this).next().next().val(rating);
|
8 |
}
|
9 |
+
}).on("rateyo.change", function(e, data){
|
10 |
+
var rating = data.rating;
|
11 |
+
$(this).next().text(rating);
|
12 |
});
|
13 |
|
14 |
});
|
admin_section/js/saswp-frontend.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function(n){jQuery("#saswp-comment-rating-div").rateYo({rating:5,spacing:"5px",onSet:function(t,e){n(this).next().next().val(t)}}).on("rateyo.change",function(t,e){var a=e.rating;n(this).next().text(a)})});
|
admin_section/settings.php
CHANGED
@@ -3033,7 +3033,11 @@ function saswp_enqueue_saswp_select2_js( $hook ) {
|
|
3033 |
}
|
3034 |
|
3035 |
if($saswp_metaboxes || $post_type == 'saswp' || $post_type == 'saswp-collections' || $post_type == 'saswp_reviews' || $hook == 'saswp_page_structured_data_options' || $hook == 'saswp_page_collection' ){
|
3036 |
-
|
|
|
|
|
|
|
|
|
3037 |
wp_enqueue_style('saswp-select2-style', SASWP_PLUGIN_URL. 'admin_section/css/select2.min.css' , false, SASWP_VERSION);
|
3038 |
wp_enqueue_script('saswp-select2-script', SASWP_PLUGIN_URL. 'admin_section/js/select2.min.js', array( 'jquery', 'jquery-core', 'jquery-ui-core' ), SASWP_VERSION, true);
|
3039 |
wp_enqueue_script('saswp-select2-extended-script', SASWP_PLUGIN_URL. 'admin_section/js/select2-extended.min.js', array( 'jquery', 'jquery-core', 'jquery-ui-core' ), SASWP_VERSION, true);
|
3033 |
}
|
3034 |
|
3035 |
if($saswp_metaboxes || $post_type == 'saswp' || $post_type == 'saswp-collections' || $post_type == 'saswp_reviews' || $hook == 'saswp_page_structured_data_options' || $hook == 'saswp_page_collection' ){
|
3036 |
+
|
3037 |
+
//DIGINEX theme compatibility starts
|
3038 |
+
wp_dequeue_script( 'select2-js' );
|
3039 |
+
//DIGINEX theme compatibility ends
|
3040 |
+
|
3041 |
wp_enqueue_style('saswp-select2-style', SASWP_PLUGIN_URL. 'admin_section/css/select2.min.css' , false, SASWP_VERSION);
|
3042 |
wp_enqueue_script('saswp-select2-script', SASWP_PLUGIN_URL. 'admin_section/js/select2.min.js', array( 'jquery', 'jquery-core', 'jquery-ui-core' ), SASWP_VERSION, true);
|
3043 |
wp_enqueue_script('saswp-select2-extended-script', SASWP_PLUGIN_URL. 'admin_section/js/select2-extended.min.js', array( 'jquery', 'jquery-core', 'jquery-ui-core' ), SASWP_VERSION, true);
|
admin_section/structure_admin.php
CHANGED
@@ -1154,20 +1154,25 @@ function saswp_custom_breadcrumbs() {
|
|
1154 |
|
1155 |
} else if ( is_category() ) {
|
1156 |
|
1157 |
-
$
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
|
|
1164 |
|
1165 |
-
$
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
|
|
|
|
1170 |
|
|
|
|
|
1171 |
}
|
1172 |
}
|
1173 |
} else if ( is_page() ) {
|
1154 |
|
1155 |
} else if ( is_category() ) {
|
1156 |
|
1157 |
+
$current_url = saswp_get_current_url();
|
1158 |
+
$exploded_cat = explode('/', $current_url);
|
1159 |
+
|
1160 |
+
if(!empty($exploded_cat) && is_array($exploded_cat)) {
|
1161 |
+
|
1162 |
+
foreach ($exploded_cat as $value) {
|
1163 |
+
|
1164 |
+
$category_value = get_category_by_slug($value);
|
1165 |
|
1166 |
+
if($category_value && is_object($category_value)){
|
1167 |
+
|
1168 |
+
$category_name = get_category($category_value);
|
1169 |
+
$cat_name = $category_name->name;
|
1170 |
+
$variables1_titles[] = $cat_name;
|
1171 |
+
$variables2_links[] = get_category_link( $category_value );
|
1172 |
+
$breadcrumb_url = get_category_link( $category_value );
|
1173 |
|
1174 |
+
}
|
1175 |
+
|
1176 |
}
|
1177 |
}
|
1178 |
} else if ( is_page() ) {
|
core/array-list/schema-properties.php
CHANGED
@@ -1772,6 +1772,498 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
1772 |
);
|
1773 |
|
1774 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1775 |
|
1776 |
case 'Product':
|
1777 |
|
@@ -4563,6 +5055,143 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
|
|
4563 |
);
|
4564 |
break;
|
4565 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4566 |
case 'Movie':
|
4567 |
|
4568 |
$meta_field = array(
|
1772 |
);
|
1773 |
|
1774 |
break;
|
1775 |
+
|
1776 |
+
case 'RentAction':
|
1777 |
+
|
1778 |
+
$meta_field = array(
|
1779 |
+
array(
|
1780 |
+
'label' => 'Agent Name',
|
1781 |
+
'id' => 'saswp_rent_action_agent_name_'.$schema_id,
|
1782 |
+
'type' => 'text'
|
1783 |
+
),
|
1784 |
+
array(
|
1785 |
+
'label' => 'Land Lord Name',
|
1786 |
+
'id' => 'saswp_rent_action_land_lord_name_'.$schema_id,
|
1787 |
+
'type' => 'text'
|
1788 |
+
),
|
1789 |
+
array(
|
1790 |
+
'label' => 'Object Name',
|
1791 |
+
'id' => 'saswp_rent_action_object_name_'.$schema_id,
|
1792 |
+
'type' => 'text'
|
1793 |
+
)
|
1794 |
+
|
1795 |
+
);
|
1796 |
+
|
1797 |
+
break;
|
1798 |
+
|
1799 |
+
case 'Audiobook':
|
1800 |
+
|
1801 |
+
$meta_field = array(
|
1802 |
+
array(
|
1803 |
+
'label' => 'Name',
|
1804 |
+
'id' => 'saswp_audiobook_name_'.$schema_id,
|
1805 |
+
'type' => 'text',
|
1806 |
+
'default' => get_the_title()
|
1807 |
+
),
|
1808 |
+
array(
|
1809 |
+
'label' => 'Description',
|
1810 |
+
'id' => 'saswp_audiobook_description_'.$schema_id,
|
1811 |
+
'type' => 'textarea',
|
1812 |
+
'default' => get_the_excerpt()
|
1813 |
+
),
|
1814 |
+
array(
|
1815 |
+
'label' => 'URL',
|
1816 |
+
'id' => 'saswp_audiobook_url_'.$schema_id,
|
1817 |
+
'type' => 'text',
|
1818 |
+
'default' => get_permalink()
|
1819 |
+
),
|
1820 |
+
array(
|
1821 |
+
'label' => 'Image',
|
1822 |
+
'id' => 'saswp_audiobook_image_'.$schema_id,
|
1823 |
+
'type' => 'media'
|
1824 |
+
),
|
1825 |
+
array(
|
1826 |
+
'label' => 'DatePublished',
|
1827 |
+
'id' => 'saswp_audiobook_date_published_'.$schema_id,
|
1828 |
+
'type' => 'text',
|
1829 |
+
'default' => get_the_date("Y-m-d")
|
1830 |
+
),
|
1831 |
+
array(
|
1832 |
+
'label' => 'DateModified',
|
1833 |
+
'id' => 'saswp_audiobook_date_modified_'.$schema_id,
|
1834 |
+
'type' => 'text',
|
1835 |
+
'default' => get_the_modified_date("Y-m-d")
|
1836 |
+
),
|
1837 |
+
array(
|
1838 |
+
'label' => 'Author Name',
|
1839 |
+
'id' => 'saswp_audiobook_author_name_'.$schema_id,
|
1840 |
+
'type' => 'text',
|
1841 |
+
'default' => is_object($current_user) ? $current_user->display_name : ''
|
1842 |
+
),
|
1843 |
+
array(
|
1844 |
+
'label' => 'Author Description',
|
1845 |
+
'id' => 'saswp_audiobook_author_description_'.$schema_id,
|
1846 |
+
'type' => 'textarea',
|
1847 |
+
'default' => $author_desc
|
1848 |
+
),
|
1849 |
+
array(
|
1850 |
+
'label' => 'Author URL',
|
1851 |
+
'id' => 'saswp_audiobook_author_url_'.$schema_id,
|
1852 |
+
'type' => 'text',
|
1853 |
+
'default' => $author_url
|
1854 |
+
),
|
1855 |
+
array(
|
1856 |
+
'label' => 'Author Image',
|
1857 |
+
'id' => 'saswp_audiobook_author_image_'.$schema_id,
|
1858 |
+
'type' => 'media',
|
1859 |
+
'default' => isset($author_details['url']) ? $author_details['url'] : ''
|
1860 |
+
),
|
1861 |
+
array(
|
1862 |
+
'label' => 'Publisher',
|
1863 |
+
'id' => 'saswp_audiobook_publisher_'.$schema_id,
|
1864 |
+
'type' => 'text',
|
1865 |
+
),
|
1866 |
+
array(
|
1867 |
+
'label' => 'Provider',
|
1868 |
+
'id' => 'saswp_audiobook_provider_'.$schema_id,
|
1869 |
+
'type' => 'text',
|
1870 |
+
),
|
1871 |
+
array(
|
1872 |
+
'label' => 'Read By',
|
1873 |
+
'id' => 'saswp_audiobook_readby_'.$schema_id,
|
1874 |
+
'type' => 'text',
|
1875 |
+
),
|
1876 |
+
array(
|
1877 |
+
'label' => 'Content URL',
|
1878 |
+
'id' => 'saswp_audiobook_content_url_'.$schema_id,
|
1879 |
+
'type' => 'text',
|
1880 |
+
),
|
1881 |
+
array(
|
1882 |
+
'label' => 'Duration',
|
1883 |
+
'id' => 'saswp_audiobook_duration_'.$schema_id,
|
1884 |
+
'type' => 'text',
|
1885 |
+
),
|
1886 |
+
array(
|
1887 |
+
'label' => 'Encoding Format',
|
1888 |
+
'id' => 'saswp_audiobook_encoding_format_'.$schema_id,
|
1889 |
+
'type' => 'text',
|
1890 |
+
),
|
1891 |
+
array(
|
1892 |
+
'label' => 'Player Type',
|
1893 |
+
'id' => 'saswp_audiobook_player_type_'.$schema_id,
|
1894 |
+
'type' => 'text',
|
1895 |
+
),
|
1896 |
+
array(
|
1897 |
+
'label' => 'Main Entity Of Page',
|
1898 |
+
'id' => 'saswp_audiobook_main_entity_of_page_'.$schema_id,
|
1899 |
+
'type' => 'text',
|
1900 |
+
)
|
1901 |
+
);
|
1902 |
+
|
1903 |
+
break;
|
1904 |
+
|
1905 |
+
case 'HotelRoom':
|
1906 |
+
|
1907 |
+
$meta_field = array(
|
1908 |
+
array(
|
1909 |
+
'label' => 'Hotel Name',
|
1910 |
+
'id' => 'saswp_hotelroom_hotel_name_'.$schema_id,
|
1911 |
+
'type' => 'text'
|
1912 |
+
),
|
1913 |
+
array(
|
1914 |
+
'label' => 'Hotel Image',
|
1915 |
+
'id' => 'saswp_hotelroom_hotel_image_'.$schema_id,
|
1916 |
+
'type' => 'media'
|
1917 |
+
),
|
1918 |
+
array(
|
1919 |
+
'label' => 'Hotel Description',
|
1920 |
+
'id' => 'saswp_hotelroom_hotel_description_'.$schema_id,
|
1921 |
+
'type' => 'textarea'
|
1922 |
+
),
|
1923 |
+
array(
|
1924 |
+
'label' => 'Hotel Price Range',
|
1925 |
+
'id' => 'saswp_hotelroom_hotel_price_range_'.$schema_id,
|
1926 |
+
'type' => 'text'
|
1927 |
+
),
|
1928 |
+
array(
|
1929 |
+
'label' => 'Hotel Telephone',
|
1930 |
+
'id' => 'saswp_hotelroom_hotel_telephone_'.$schema_id,
|
1931 |
+
'type' => 'text'
|
1932 |
+
),
|
1933 |
+
array(
|
1934 |
+
'label' => 'Hotel Street Address',
|
1935 |
+
'id' => 'saswp_hotelroom_hotel_streetaddress_'.$schema_id,
|
1936 |
+
'type' => 'text',
|
1937 |
+
),
|
1938 |
+
array(
|
1939 |
+
'label' => 'Hotel Locality',
|
1940 |
+
'id' => 'saswp_hotelroom_hotel_locality_'.$schema_id,
|
1941 |
+
'type' => 'text',
|
1942 |
+
),
|
1943 |
+
array(
|
1944 |
+
'label' => 'Hotel Region',
|
1945 |
+
'id' => 'saswp_hotelroom_hotel_region_'.$schema_id,
|
1946 |
+
'type' => 'text',
|
1947 |
+
),
|
1948 |
+
array(
|
1949 |
+
'label' => 'Hotel PostalCode',
|
1950 |
+
'id' => 'saswp_hotelroom_hotel_postalcode_'.$schema_id,
|
1951 |
+
'type' => 'text',
|
1952 |
+
),
|
1953 |
+
array(
|
1954 |
+
'label' => 'Hotel Country',
|
1955 |
+
'id' => 'saswp_hotelroom_hotel_country_'.$schema_id,
|
1956 |
+
'type' => 'text',
|
1957 |
+
),
|
1958 |
+
array(
|
1959 |
+
'label' => 'Hotel Room Name',
|
1960 |
+
'id' => 'saswp_hotelroom_name_'.$schema_id,
|
1961 |
+
'type' => 'text',
|
1962 |
+
),
|
1963 |
+
array(
|
1964 |
+
'label' => 'Hotel Room Description',
|
1965 |
+
'id' => 'saswp_hotelroom_description_'.$schema_id,
|
1966 |
+
'type' => 'textarea',
|
1967 |
+
),
|
1968 |
+
array(
|
1969 |
+
'label' => 'Hotel Room Image',
|
1970 |
+
'id' => 'saswp_hotelroom_image_'.$schema_id,
|
1971 |
+
'type' => 'media',
|
1972 |
+
),
|
1973 |
+
array(
|
1974 |
+
'label' => 'Hotel Room Offer name',
|
1975 |
+
'id' => 'saswp_hotelroom_offer_name_'.$schema_id,
|
1976 |
+
'type' => 'text',
|
1977 |
+
),
|
1978 |
+
array(
|
1979 |
+
'label' => 'Hotel Room Offer Terms & Condition',
|
1980 |
+
'id' => 'saswp_hotelroom_offer_description_'.$schema_id,
|
1981 |
+
'type' => 'textarea',
|
1982 |
+
),
|
1983 |
+
array(
|
1984 |
+
'label' => 'Hotel Room Offer Price',
|
1985 |
+
'id' => 'saswp_hotelroom_offer_price_'.$schema_id,
|
1986 |
+
'type' => 'text',
|
1987 |
+
),
|
1988 |
+
array(
|
1989 |
+
'label' => 'Hotel Room Offer Price Currency',
|
1990 |
+
'id' => 'saswp_hotelroom_offer_price_currency_'.$schema_id,
|
1991 |
+
'type' => 'text',
|
1992 |
+
),
|
1993 |
+
array(
|
1994 |
+
'label' => 'Hotel Room Offer Price UnitCode',
|
1995 |
+
'id' => 'saswp_hotelroom_offer_unitcode_'.$schema_id,
|
1996 |
+
'type' => 'text',
|
1997 |
+
),
|
1998 |
+
array(
|
1999 |
+
'label' => 'Hotel Room Offer Price Valid Through',
|
2000 |
+
'id' => 'saswp_hotelroom_offer_validthrough_'.$schema_id,
|
2001 |
+
'type' => 'text',
|
2002 |
+
),
|
2003 |
+
);
|
2004 |
+
break;
|
2005 |
+
|
2006 |
+
case 'PodcastEpisode':
|
2007 |
+
|
2008 |
+
$meta_field = array(
|
2009 |
+
array(
|
2010 |
+
'label' => 'Name',
|
2011 |
+
'id' => 'saswp_podcast_episode_name_'.$schema_id,
|
2012 |
+
'type' => 'text'
|
2013 |
+
),
|
2014 |
+
array(
|
2015 |
+
'label' => 'Description',
|
2016 |
+
'id' => 'saswp_podcast_episode_description_'.$schema_id,
|
2017 |
+
'type' => 'textarea'
|
2018 |
+
),
|
2019 |
+
array(
|
2020 |
+
'label' => 'URL',
|
2021 |
+
'id' => 'saswp_podcast_episode_url_'.$schema_id,
|
2022 |
+
'type' => 'text'
|
2023 |
+
),
|
2024 |
+
array(
|
2025 |
+
'label' => 'Image',
|
2026 |
+
'id' => 'saswp_podcast_episode_image_'.$schema_id,
|
2027 |
+
'type' => 'media'
|
2028 |
+
),
|
2029 |
+
array(
|
2030 |
+
'label' => 'DatePublished',
|
2031 |
+
'id' => 'saswp_podcast_episode_date_published_'.$schema_id,
|
2032 |
+
'type' => 'text',
|
2033 |
+
'default' => get_the_date("Y-m-d")
|
2034 |
+
),
|
2035 |
+
array(
|
2036 |
+
'label' => 'DateModified',
|
2037 |
+
'id' => 'saswp_podcast_episode_date_modified_'.$schema_id,
|
2038 |
+
'type' => 'text',
|
2039 |
+
'default' => get_the_modified_date("Y-m-d")
|
2040 |
+
),
|
2041 |
+
array(
|
2042 |
+
'label' => 'Time Required',
|
2043 |
+
'id' => 'saswp_podcast_episode_timeRequired_'.$schema_id,
|
2044 |
+
'type' => 'text'
|
2045 |
+
),
|
2046 |
+
array(
|
2047 |
+
'label' => 'Content URL',
|
2048 |
+
'id' => 'saswp_podcast_episode_content_url_'.$schema_id,
|
2049 |
+
'type' => 'text'
|
2050 |
+
),
|
2051 |
+
array(
|
2052 |
+
'label' => 'PodcastSeries Name',
|
2053 |
+
'id' => 'saswp_podcast_episode_series_name_'.$schema_id,
|
2054 |
+
'type' => 'text'
|
2055 |
+
),
|
2056 |
+
array(
|
2057 |
+
'label' => 'PodcastSeries URL',
|
2058 |
+
'id' => 'saswp_podcast_episode_series_url_'.$schema_id,
|
2059 |
+
'type' => 'text'
|
2060 |
+
)
|
2061 |
+
);
|
2062 |
+
|
2063 |
+
break;
|
2064 |
+
|
2065 |
+
case 'PodcastSeason':
|
2066 |
+
|
2067 |
+
$meta_field = array(
|
2068 |
+
array(
|
2069 |
+
'label' => 'Name',
|
2070 |
+
'id' => 'saswp_podcast_season_name_'.$schema_id,
|
2071 |
+
'type' => 'text'
|
2072 |
+
),
|
2073 |
+
array(
|
2074 |
+
'label' => 'Description',
|
2075 |
+
'id' => 'saswp_podcast_season_description_'.$schema_id,
|
2076 |
+
'type' => 'textarea'
|
2077 |
+
),
|
2078 |
+
array(
|
2079 |
+
'label' => 'URL',
|
2080 |
+
'id' => 'saswp_podcast_season_url_'.$schema_id,
|
2081 |
+
'type' => 'text'
|
2082 |
+
),
|
2083 |
+
array(
|
2084 |
+
'label' => 'Image',
|
2085 |
+
'id' => 'saswp_podcast_season_image_'.$schema_id,
|
2086 |
+
'type' => 'media'
|
2087 |
+
),
|
2088 |
+
array(
|
2089 |
+
'label' => 'DatePublished',
|
2090 |
+
'id' => 'saswp_podcast_season_date_published_'.$schema_id,
|
2091 |
+
'type' => 'text',
|
2092 |
+
'default' => get_the_date("Y-m-d")
|
2093 |
+
),
|
2094 |
+
array(
|
2095 |
+
'label' => 'DateModified',
|
2096 |
+
'id' => 'saswp_podcast_season_date_modified_'.$schema_id,
|
2097 |
+
'type' => 'text',
|
2098 |
+
'default' => get_the_modified_date("Y-m-d")
|
2099 |
+
),
|
2100 |
+
array(
|
2101 |
+
'label' => 'Season Number',
|
2102 |
+
'id' => 'saswp_podcast_season_number_'.$schema_id,
|
2103 |
+
'type' => 'text'
|
2104 |
+
),
|
2105 |
+
array(
|
2106 |
+
'label' => 'Number of seasons',
|
2107 |
+
'id' => 'saswp_podcast_season_number_of_seasons_'.$schema_id,
|
2108 |
+
'type' => 'text'
|
2109 |
+
),
|
2110 |
+
array(
|
2111 |
+
'label' => 'PodcastSeries Name',
|
2112 |
+
'id' => 'saswp_podcast_season_series_name_'.$schema_id,
|
2113 |
+
'type' => 'text'
|
2114 |
+
),
|
2115 |
+
array(
|
2116 |
+
'label' => 'PodcastSeries URL',
|
2117 |
+
'id' => 'saswp_podcast_season_series_url_'.$schema_id,
|
2118 |
+
'type' => 'text'
|
2119 |
+
)
|
2120 |
+
);
|
2121 |
+
|
2122 |
+
break;
|
2123 |
+
|
2124 |
+
case 'EducationalOccupationalCredential':
|
2125 |
+
|
2126 |
+
$meta_field = array(
|
2127 |
+
array(
|
2128 |
+
'label' => 'Additional Type',
|
2129 |
+
'id' => 'saswp_eoc_additional_type_'.$schema_id,
|
2130 |
+
'type' => 'text'
|
2131 |
+
),
|
2132 |
+
array(
|
2133 |
+
'label' => 'Name',
|
2134 |
+
'id' => 'saswp_eoc_name_'.$schema_id,
|
2135 |
+
'type' => 'text'
|
2136 |
+
),
|
2137 |
+
array(
|
2138 |
+
'label' => 'Alternative Name',
|
2139 |
+
'id' => 'saswp_eoc_alt_name_'.$schema_id,
|
2140 |
+
'type' => 'text'
|
2141 |
+
),
|
2142 |
+
array(
|
2143 |
+
'label' => 'Description',
|
2144 |
+
'id' => 'saswp_eoc_description_'.$schema_id,
|
2145 |
+
'type' => 'textarea'
|
2146 |
+
),
|
2147 |
+
|
2148 |
+
array(
|
2149 |
+
'label' => 'Educational Level Name',
|
2150 |
+
'id' => 'saswp_eoc_e_lavel_name_'.$schema_id,
|
2151 |
+
'type' => 'text'
|
2152 |
+
),
|
2153 |
+
array(
|
2154 |
+
'label' => 'Educational Level DefinedTermSet',
|
2155 |
+
'id' => 'saswp_eoc_e_lavel_definedtermset_'.$schema_id,
|
2156 |
+
'type' => 'text'
|
2157 |
+
),
|
2158 |
+
|
2159 |
+
array(
|
2160 |
+
'label' => 'Credential Category Name',
|
2161 |
+
'id' => 'saswp_eoc_c_category_name_'.$schema_id,
|
2162 |
+
'type' => 'text'
|
2163 |
+
),
|
2164 |
+
array(
|
2165 |
+
'label' => 'Credential Category Term Code',
|
2166 |
+
'id' => 'saswp_eoc_c_category_term_code_'.$schema_id,
|
2167 |
+
'type' => 'text'
|
2168 |
+
),
|
2169 |
+
array(
|
2170 |
+
'label' => 'Credential Category DefinedTermSet',
|
2171 |
+
'id' => 'saswp_eoc_c_category_definedtermset_'.$schema_id,
|
2172 |
+
'type' => 'text'
|
2173 |
+
),
|
2174 |
+
|
2175 |
+
array(
|
2176 |
+
'label' => 'Competency Required Name',
|
2177 |
+
'id' => 'saswp_eoc_c_required_name_'.$schema_id,
|
2178 |
+
'type' => 'text'
|
2179 |
+
),
|
2180 |
+
array(
|
2181 |
+
'label' => 'Competency Required Term Code',
|
2182 |
+
'id' => 'saswp_eoc_c_required_term_code_'.$schema_id,
|
2183 |
+
'type' => 'text'
|
2184 |
+
),
|
2185 |
+
array(
|
2186 |
+
'label' => 'Competency Required DefinedTermSet',
|
2187 |
+
'id' => 'saswp_eoc_c_required_definedtermset_'.$schema_id,
|
2188 |
+
'type' => 'text'
|
2189 |
+
),
|
2190 |
+
array(
|
2191 |
+
'label' => 'Competency Required URL',
|
2192 |
+
'id' => 'saswp_eoc_c_required_url_'.$schema_id,
|
2193 |
+
'type' => 'text'
|
2194 |
+
)
|
2195 |
+
|
2196 |
+
);
|
2197 |
+
|
2198 |
+
break;
|
2199 |
+
|
2200 |
+
case 'ApartmentComplex':
|
2201 |
+
|
2202 |
+
$meta_field = array(
|
2203 |
+
|
2204 |
+
array(
|
2205 |
+
'label' => 'Name',
|
2206 |
+
'id' => 'saswp_apartment_complex_name_'.$schema_id,
|
2207 |
+
'type' => 'text'
|
2208 |
+
),
|
2209 |
+
array(
|
2210 |
+
'label' => 'Description',
|
2211 |
+
'id' => 'saswp_apartment_complex_description_'.$schema_id,
|
2212 |
+
'type' => 'textarea'
|
2213 |
+
),
|
2214 |
+
array(
|
2215 |
+
'label' => 'URL',
|
2216 |
+
'id' => 'saswp_apartment_complex_url_'.$schema_id,
|
2217 |
+
'type' => 'text'
|
2218 |
+
),
|
2219 |
+
array(
|
2220 |
+
'label' => 'Image',
|
2221 |
+
'id' => 'saswp_apartment_complex_image_'.$schema_id,
|
2222 |
+
'type' => 'media'
|
2223 |
+
),
|
2224 |
+
array(
|
2225 |
+
'label' => 'Number Of Bedrooms',
|
2226 |
+
'id' => 'saswp_apartment_complex_no_of_bedrooms_'.$schema_id,
|
2227 |
+
'type' => 'number'
|
2228 |
+
),
|
2229 |
+
array(
|
2230 |
+
'label' => 'Pets Allowed',
|
2231 |
+
'id' => 'saswp_apartment_complex_pets_allowed_'.$schema_id,
|
2232 |
+
'type' => 'text'
|
2233 |
+
),
|
2234 |
+
array(
|
2235 |
+
'label' => 'Location Street Address',
|
2236 |
+
'id' => 'saswp_apartment_complex_streetaddress_'.$schema_id,
|
2237 |
+
'type' => 'text',
|
2238 |
+
),
|
2239 |
+
array(
|
2240 |
+
'label' => 'Location Locality',
|
2241 |
+
'id' => 'saswp_apartment_complex_locality_'.$schema_id,
|
2242 |
+
'type' => 'text',
|
2243 |
+
),
|
2244 |
+
array(
|
2245 |
+
'label' => 'Location Region',
|
2246 |
+
'id' => 'saswp_apartment_complex_region_'.$schema_id,
|
2247 |
+
'type' => 'text',
|
2248 |
+
),
|
2249 |
+
array(
|
2250 |
+
'label' => 'Location PostalCode',
|
2251 |
+
'id' => 'saswp_apartment_complex_postalcode_'.$schema_id,
|
2252 |
+
'type' => 'text',
|
2253 |
+
),
|
2254 |
+
array(
|
2255 |
+
'label' => 'Location Country',
|
2256 |
+
'id' => 'saswp_apartment_complex_country_'.$schema_id,
|
2257 |
+
'type' => 'text',
|
2258 |
+
),
|
2259 |
+
array(
|
2260 |
+
'label' => 'Location Phone',
|
2261 |
+
'id' => 'saswp_apartment_complex_phone_'.$schema_id,
|
2262 |
+
'type' => 'text',
|
2263 |
+
)
|
2264 |
+
);
|
2265 |
+
|
2266 |
+
break;
|
2267 |
|
2268 |
case 'Product':
|
2269 |
|
5055 |
);
|
5056 |
break;
|
5057 |
|
5058 |
+
case 'Project':
|
5059 |
+
|
5060 |
+
$meta_field = array(
|
5061 |
+
array(
|
5062 |
+
'label' => 'Name',
|
5063 |
+
'id' => 'saswp_project_name_'.$schema_id,
|
5064 |
+
'type' => 'text',
|
5065 |
+
),
|
5066 |
+
array(
|
5067 |
+
'label' => 'Description',
|
5068 |
+
'id' => 'saswp_project_description_'.$schema_id,
|
5069 |
+
'type' => 'textarea',
|
5070 |
+
),
|
5071 |
+
array(
|
5072 |
+
'label' => 'URL',
|
5073 |
+
'id' => 'saswp_project_url_'.$schema_id,
|
5074 |
+
'type' => 'text',
|
5075 |
+
),
|
5076 |
+
array(
|
5077 |
+
'label' => 'Image',
|
5078 |
+
'id' => 'saswp_project_image_'.$schema_id,
|
5079 |
+
'type' => 'media',
|
5080 |
+
),
|
5081 |
+
array(
|
5082 |
+
'label' => 'Logo',
|
5083 |
+
'id' => 'saswp_project_logo_'.$schema_id,
|
5084 |
+
'type' => 'media',
|
5085 |
+
),
|
5086 |
+
array(
|
5087 |
+
'label' => 'Street Address',
|
5088 |
+
'id' => 'saswp_project_street_address_'.$schema_id,
|
5089 |
+
'type' => 'text',
|
5090 |
+
),
|
5091 |
+
array(
|
5092 |
+
'label' => 'City',
|
5093 |
+
'id' => 'saswp_project_city_'.$schema_id,
|
5094 |
+
'type' => 'text',
|
5095 |
+
),
|
5096 |
+
array(
|
5097 |
+
'label' => 'State',
|
5098 |
+
'id' => 'saswp_project_state_'.$schema_id,
|
5099 |
+
'type' => 'text',
|
5100 |
+
),
|
5101 |
+
array(
|
5102 |
+
'label' => 'Country',
|
5103 |
+
'id' => 'saswp_project_country_'.$schema_id,
|
5104 |
+
'type' => 'text',
|
5105 |
+
),
|
5106 |
+
array(
|
5107 |
+
'label' => 'Postal Code',
|
5108 |
+
'id' => 'saswp_project_postal_code_'.$schema_id,
|
5109 |
+
'type' => 'text',
|
5110 |
+
),
|
5111 |
+
array(
|
5112 |
+
'label' => 'Email',
|
5113 |
+
'id' => 'saswp_project_email_'.$schema_id,
|
5114 |
+
'type' => 'text',
|
5115 |
+
),
|
5116 |
+
array(
|
5117 |
+
'label' => 'Telephone',
|
5118 |
+
'id' => 'saswp_project_telephone_'.$schema_id,
|
5119 |
+
'type' => 'text',
|
5120 |
+
),
|
5121 |
+
array(
|
5122 |
+
'label' => 'Website',
|
5123 |
+
'id' => 'saswp_project_website_'.$schema_id,
|
5124 |
+
'type' => 'text',
|
5125 |
+
),
|
5126 |
+
array(
|
5127 |
+
'label' => 'Facebook',
|
5128 |
+
'id' => 'saswp_project_facebook_'.$schema_id,
|
5129 |
+
'type' => 'text',
|
5130 |
+
),
|
5131 |
+
array(
|
5132 |
+
'label' => 'Twitter',
|
5133 |
+
'id' => 'saswp_project_twitter_'.$schema_id,
|
5134 |
+
'type' => 'text',
|
5135 |
+
),
|
5136 |
+
array(
|
5137 |
+
'label' => 'LinkedIn',
|
5138 |
+
'id' => 'saswp_project_linkedin_'.$schema_id,
|
5139 |
+
'type' => 'text',
|
5140 |
+
),
|
5141 |
+
array(
|
5142 |
+
'label' => 'Founder',
|
5143 |
+
'id' => 'saswp_project_founder_'.$schema_id,
|
5144 |
+
'type' => 'text',
|
5145 |
+
),
|
5146 |
+
array(
|
5147 |
+
'label' => 'Founding Date',
|
5148 |
+
'id' => 'saswp_project_founding_date_'.$schema_id,
|
5149 |
+
'type' => 'text',
|
5150 |
+
),
|
5151 |
+
array(
|
5152 |
+
'label' => 'Dun & Bradstreet DUNS',
|
5153 |
+
'id' => 'saswp_project_duns_'.$schema_id,
|
5154 |
+
'type' => 'text',
|
5155 |
+
),
|
5156 |
+
array(
|
5157 |
+
'label' => 'Qualifications ( Credential Awarded)',
|
5158 |
+
'id' => 'saswp_project_qualifications_'.$schema_id,
|
5159 |
+
'type' => 'text',
|
5160 |
+
),
|
5161 |
+
array(
|
5162 |
+
'label' => 'Knows About',
|
5163 |
+
'id' => 'saswp_project_knows_about_'.$schema_id,
|
5164 |
+
'type' => 'text',
|
5165 |
+
),
|
5166 |
+
array(
|
5167 |
+
'label' => 'Member Of',
|
5168 |
+
'id' => 'saswp_project_member_of_'.$schema_id,
|
5169 |
+
'type' => 'text',
|
5170 |
+
),
|
5171 |
+
array(
|
5172 |
+
'label' => 'Parent project',
|
5173 |
+
'id' => 'saswp_project_parent_project_'.$schema_id,
|
5174 |
+
'type' => 'text',
|
5175 |
+
),
|
5176 |
+
array(
|
5177 |
+
'label' => 'Aggregate Rating',
|
5178 |
+
'id' => 'saswp_project_enable_rating_'.$schema_id,
|
5179 |
+
'type' => 'checkbox',
|
5180 |
+
),
|
5181 |
+
array(
|
5182 |
+
'label' => 'Rating',
|
5183 |
+
'id' => 'saswp_project_rating_value_'.$schema_id,
|
5184 |
+
'type' => 'text',
|
5185 |
+
),
|
5186 |
+
array(
|
5187 |
+
'label' => 'Rating Count',
|
5188 |
+
'id' => 'saswp_project_rating_count_'.$schema_id,
|
5189 |
+
'type' => 'text',
|
5190 |
+
),
|
5191 |
+
|
5192 |
+
);
|
5193 |
+
break;
|
5194 |
+
|
5195 |
case 'Movie':
|
5196 |
|
5197 |
$meta_field = array(
|
core/array-list/schemas.php
CHANGED
@@ -3,14 +3,15 @@
|
|
3 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
return array(
|
6 |
-
|
7 |
'Accommodation' => array(
|
8 |
'Apartment' => 'Apartment',
|
9 |
'House' => 'House',
|
|
|
10 |
'SingleFamilyResidence' => 'SingleFamilyResidence',
|
11 |
),
|
12 |
'CreativeWork' => array(
|
13 |
'Article' => 'Article',
|
|
|
14 |
'BlogPosting' => 'BlogPosting',
|
15 |
'Book' => 'Book',
|
16 |
'Course' => 'Course',
|
@@ -24,7 +25,9 @@ return array(
|
|
24 |
'MusicAlbum' => 'MusicAlbum',
|
25 |
'MusicComposition' => 'MusicComposition',
|
26 |
'Movie' => 'Movie',
|
27 |
-
'NewsArticle' => 'NewsArticle',
|
|
|
|
|
28 |
'qanda' => 'Q&A',
|
29 |
'Review' => 'Review',
|
30 |
'Recipe' => 'Recipe',
|
@@ -73,8 +76,12 @@ return array(
|
|
73 |
'Mosque' => 'Mosque',
|
74 |
),
|
75 |
'Thing' => array(
|
76 |
-
'
|
77 |
-
'
|
78 |
-
'
|
|
|
|
|
|
|
|
|
79 |
)
|
80 |
);
|
3 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
return array(
|
|
|
6 |
'Accommodation' => array(
|
7 |
'Apartment' => 'Apartment',
|
8 |
'House' => 'House',
|
9 |
+
'HotelRoom' => 'HotelRoom',
|
10 |
'SingleFamilyResidence' => 'SingleFamilyResidence',
|
11 |
),
|
12 |
'CreativeWork' => array(
|
13 |
'Article' => 'Article',
|
14 |
+
'Audiobook' => 'Audiobook',
|
15 |
'BlogPosting' => 'BlogPosting',
|
16 |
'Book' => 'Book',
|
17 |
'Course' => 'Course',
|
25 |
'MusicAlbum' => 'MusicAlbum',
|
26 |
'MusicComposition' => 'MusicComposition',
|
27 |
'Movie' => 'Movie',
|
28 |
+
'NewsArticle' => 'NewsArticle',
|
29 |
+
'PodcastEpisode' => 'PodcastEpisode',
|
30 |
+
'PodcastSeason' => 'PodcastSeason',
|
31 |
'qanda' => 'Q&A',
|
32 |
'Review' => 'Review',
|
33 |
'Recipe' => 'Recipe',
|
76 |
'Mosque' => 'Mosque',
|
77 |
),
|
78 |
'Thing' => array(
|
79 |
+
'ApartmentComplex' => 'ApartmentComplex',
|
80 |
+
'EducationalOccupationalCredential' => 'EducationalOccupationalCredential',
|
81 |
+
'Person' => 'Person',
|
82 |
+
'Organization' => 'Organization',
|
83 |
+
'Project' => 'Project',
|
84 |
+
'PsychologicalTreatment' => 'PsychologicalTreatment',
|
85 |
+
'RentAction' => 'RentAction'
|
86 |
)
|
87 |
);
|
core/global.php
CHANGED
@@ -24,11 +24,18 @@ $with_aggregate = array(
|
|
24 |
'AudioObject',
|
25 |
'VideoObject',
|
26 |
'local_business',
|
27 |
-
'Organization',
|
|
|
28 |
'Product'
|
29 |
);
|
30 |
$without_aggregate = array(
|
31 |
'Apartment',
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
'RealEstateListing',
|
33 |
'House',
|
34 |
'SingleFamilyResidence',
|
@@ -50,6 +57,7 @@ $without_aggregate = array(
|
|
50 |
'TouristDestination',
|
51 |
'LandmarksOrHistoricalBuildings',
|
52 |
'PsychologicalTreatment',
|
|
|
53 |
'HinduTemple',
|
54 |
'BuddhistTemple',
|
55 |
'Church',
|
24 |
'AudioObject',
|
25 |
'VideoObject',
|
26 |
'local_business',
|
27 |
+
'Organization',
|
28 |
+
'project',
|
29 |
'Product'
|
30 |
);
|
31 |
$without_aggregate = array(
|
32 |
'Apartment',
|
33 |
+
'HotelRoom',
|
34 |
+
'Audiobook',
|
35 |
+
'PodcastEpisode',
|
36 |
+
'PodcastSeason',
|
37 |
+
'EducationalOccupationalCredential',
|
38 |
+
'ApartmentComplex',
|
39 |
'RealEstateListing',
|
40 |
'House',
|
41 |
'SingleFamilyResidence',
|
57 |
'TouristDestination',
|
58 |
'LandmarksOrHistoricalBuildings',
|
59 |
'PsychologicalTreatment',
|
60 |
+
'RentAction',
|
61 |
'HinduTemple',
|
62 |
'BuddhistTemple',
|
63 |
'Church',
|
modules/reviews/comments.php
CHANGED
@@ -75,8 +75,11 @@ function saswp_comment_rating_rating_field () {
|
|
75 |
|
76 |
?>
|
77 |
<p class="comment-form-comment">
|
|
|
78 |
<div id="saswp-comment-rating-div"></div>
|
|
|
79 |
<input type="hidden" name="review_rating" value="5" />
|
|
|
80 |
</p>
|
81 |
<?php
|
82 |
|
@@ -89,7 +92,7 @@ function saswp_comment_rating_save_comment_rating( $comment_id ) {
|
|
89 |
|
90 |
if ( ( isset( $_POST['review_rating'] ) ) && ( '' !== $_POST['review_rating'] ) ){
|
91 |
|
92 |
-
$rating =
|
93 |
add_comment_meta( $comment_id, 'review_rating', $rating );
|
94 |
|
95 |
}
|
75 |
|
76 |
?>
|
77 |
<p class="comment-form-comment">
|
78 |
+
<div class="saswp-rating-container">
|
79 |
<div id="saswp-comment-rating-div"></div>
|
80 |
+
<div class="saswp-rateyo-counter"></div>
|
81 |
<input type="hidden" name="review_rating" value="5" />
|
82 |
+
</div>
|
83 |
</p>
|
84 |
<?php
|
85 |
|
92 |
|
93 |
if ( ( isset( $_POST['review_rating'] ) ) && ( '' !== $_POST['review_rating'] ) ){
|
94 |
|
95 |
+
$rating = floatval( $_POST['review_rating'] );
|
96 |
add_comment_meta( $comment_id, 'review_rating', $rating );
|
97 |
|
98 |
}
|
modules/reviews/reviews_admin.php
CHANGED
@@ -230,8 +230,8 @@ class saswp_reviews_admin {
|
|
230 |
case 'star':
|
231 |
|
232 |
$input = sprintf(
|
233 |
-
'<div class="saswp-rating-div"></div>'
|
234 |
-
. '<input id="%s" name="%s" type="hidden" value="%s">',
|
235 |
esc_attr($meta_field['id']),
|
236 |
esc_attr($meta_field['id']),
|
237 |
esc_attr($meta_value),
|
230 |
case 'star':
|
231 |
|
232 |
$input = sprintf(
|
233 |
+
'<div class="saswp-rating-container"><div class="saswp-rating-div"></div><div class="saswp-rateyo-counter"></div>'
|
234 |
+
. '<input id="%s" name="%s" type="hidden" value="%s"></div>',
|
235 |
esc_attr($meta_field['id']),
|
236 |
esc_attr($meta_field['id']),
|
237 |
esc_attr($meta_value),
|
modules/reviews/reviews_form.php
CHANGED
@@ -219,7 +219,7 @@ class SASWP_Reviews_Form {
|
|
219 |
$form .= '<div class="saswp-rv-form-btn"><a href="#" class="button button-default">'.saswp_label_text('translation-review-form').'</a></div>';
|
220 |
}
|
221 |
|
222 |
-
$rating_html = '<div class="saswp-rating-front-div"></div><input type="hidden" name="saswp_review_rating" value="5">';
|
223 |
$form .= '<form action="'.esc_url( admin_url('admin-post.php') ).'" method="post" class="saswp-review-submission-form '.($on_button ? "saswp_hide" : "").'">';
|
224 |
|
225 |
}else{
|
219 |
$form .= '<div class="saswp-rv-form-btn"><a href="#" class="button button-default">'.saswp_label_text('translation-review-form').'</a></div>';
|
220 |
}
|
221 |
|
222 |
+
$rating_html = '<div class="saswp-rating-container"><div class="saswp-rating-front-div"></div><div class="saswp-rateyo-counter"></div><input type="hidden" name="saswp_review_rating" value="5"></div>';
|
223 |
$form .= '<form action="'.esc_url( admin_url('admin-post.php') ).'" method="post" class="saswp-review-submission-form '.($on_button ? "saswp_hide" : "").'">';
|
224 |
|
225 |
}else{
|
modules/reviews/reviews_service.php
CHANGED
@@ -123,7 +123,7 @@ class saswp_reviews_service {
|
|
123 |
|
124 |
$rv_text = sanitize_textarea_field($form_data['saswp_review_text']);
|
125 |
$rv_name = sanitize_text_field($form_data['saswp_reviewer_name']);
|
126 |
-
$rv_rating =
|
127 |
$rv_place_id = intval($form_data['saswp_place_id']);
|
128 |
$rv_link = sanitize_text_field($form_data['saswp_review_link']);
|
129 |
$rv_date = date('Y-m-d');
|
123 |
|
124 |
$rv_text = sanitize_textarea_field($form_data['saswp_review_text']);
|
125 |
$rv_name = sanitize_text_field($form_data['saswp_reviewer_name']);
|
126 |
+
$rv_rating = floatval($form_data['saswp_review_rating']);
|
127 |
$rv_place_id = intval($form_data['saswp_place_id']);
|
128 |
$rv_link = sanitize_text_field($form_data['saswp_review_link']);
|
129 |
$rv_date = date('Y-m-d');
|
output/function.php
CHANGED
@@ -46,8 +46,11 @@ function saswp_schema_markup_hook_on_init() {
|
|
46 |
remove_action( 'amp_post_template_head', 'amp_post_template_add_schemaorg_metadata',99,1);
|
47 |
remove_action( 'amp_post_template_footer', 'amp_post_template_add_schemaorg_metadata',99,1);
|
48 |
remove_action( 'wp_footer', 'orbital_markup_site');
|
|
|
49 |
add_filter( 'amp_schemaorg_metadata', '__return_empty_array' );
|
50 |
-
add_filter( 'hunch_schema_markup', '__return_false');
|
|
|
|
|
51 |
|
52 |
}
|
53 |
|
46 |
remove_action( 'amp_post_template_head', 'amp_post_template_add_schemaorg_metadata',99,1);
|
47 |
remove_action( 'amp_post_template_footer', 'amp_post_template_add_schemaorg_metadata',99,1);
|
48 |
remove_action( 'wp_footer', 'orbital_markup_site');
|
49 |
+
|
50 |
add_filter( 'amp_schemaorg_metadata', '__return_empty_array' );
|
51 |
+
add_filter( 'hunch_schema_markup', '__return_false');
|
52 |
+
add_filter('electro_structured_data', '__return_false');
|
53 |
+
add_filter('electro_woocommerce_structured_data', '__return_false');
|
54 |
|
55 |
}
|
56 |
|
output/markup.php
CHANGED
@@ -905,6 +905,33 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
|
|
905 |
|
906 |
}
|
907 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
908 |
function saswp_real_estate_listing_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
909 |
|
910 |
$product_image = get_post_meta( get_the_ID(), 'saswp_real_estate_listing_image_'.$schema_id.'_detail',true);
|
@@ -1221,6 +1248,190 @@ function saswp_organization_schema_markup($schema_id, $schema_post_id, $all_post
|
|
1221 |
return $input1;
|
1222 |
}
|
1223 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1224 |
function saswp_video_game_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
1225 |
|
1226 |
$input1 = array();
|
@@ -2096,6 +2307,43 @@ function saswp_apartment_schema_markup($schema_id, $schema_post_id, $all_post_me
|
|
2096 |
|
2097 |
}
|
2098 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2099 |
function saswp_house_schema_makrup($schema_id, $schema_post_id, $all_post_meta){
|
2100 |
|
2101 |
$input1 = array();
|
@@ -3043,6 +3291,160 @@ function saswp_news_article_schema_markup($schema_id, $schema_post_id, $all_post
|
|
3043 |
|
3044 |
}
|
3045 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3046 |
function saswp_video_object_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
3047 |
|
3048 |
$input1 = array();
|
905 |
|
906 |
}
|
907 |
|
908 |
+
function saswp_rent_action_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
909 |
+
|
910 |
+
$input1 = array(
|
911 |
+
'@context' => saswp_context_url(),
|
912 |
+
'@type' => 'RentAction',
|
913 |
+
'@id' => trailingslashit(get_permalink()).'#RentAction',
|
914 |
+
'url' => trailingslashit(get_permalink()),
|
915 |
+
);
|
916 |
+
|
917 |
+
if(isset($all_post_meta['saswp_rent_action_agent_name_'.$schema_id][0])){
|
918 |
+
$input1['agent']['@type'] = 'Person';
|
919 |
+
$input1['agent']['name'] = $all_post_meta['saswp_rent_action_agent_name_'.$schema_id][0];
|
920 |
+
}
|
921 |
+
|
922 |
+
if(isset($all_post_meta['saswp_rent_action_land_lord_name_'.$schema_id][0])){
|
923 |
+
$input1['landlord']['@type'] = 'Person';
|
924 |
+
$input1['landlord']['name'] = $all_post_meta['saswp_rent_action_land_lord_name_'.$schema_id][0];
|
925 |
+
}
|
926 |
+
|
927 |
+
if(isset($all_post_meta['saswp_rent_action_object_name_'.$schema_id][0])){
|
928 |
+
$input1['object']['@type'] = 'Residence';
|
929 |
+
$input1['object']['name'] = $all_post_meta['saswp_rent_action_object_name_'.$schema_id][0];
|
930 |
+
}
|
931 |
+
|
932 |
+
return $input1;
|
933 |
+
}
|
934 |
+
|
935 |
function saswp_real_estate_listing_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
936 |
|
937 |
$product_image = get_post_meta( get_the_ID(), 'saswp_real_estate_listing_image_'.$schema_id.'_detail',true);
|
1248 |
return $input1;
|
1249 |
}
|
1250 |
|
1251 |
+
function saswp_project_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
1252 |
+
|
1253 |
+
$input1 = array();
|
1254 |
+
|
1255 |
+
$input1['@context'] = saswp_context_url();
|
1256 |
+
$input1['@type'] = 'Project';
|
1257 |
+
$input1['@id'] = trailingslashit(get_permalink()).'#Project';
|
1258 |
+
$input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_project_name_'.$schema_id, 'saswp_array');
|
1259 |
+
$input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_project_url_'.$schema_id, 'saswp_array');
|
1260 |
+
$input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_project_description_'.$schema_id, 'saswp_array');
|
1261 |
+
|
1262 |
+
$howto_image = get_post_meta( get_the_ID(), 'saswp_project_logo_'.$schema_id.'_detail',true);
|
1263 |
+
|
1264 |
+
if(!(empty($howto_image))){
|
1265 |
+
|
1266 |
+
$input1['logo']['@type'] = 'ImageObject';
|
1267 |
+
$input1['logo']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
|
1268 |
+
$input1['logo']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
|
1269 |
+
$input1['logo']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
|
1270 |
+
|
1271 |
+
}
|
1272 |
+
|
1273 |
+
$input1['address']['@type'] = 'PostalAddress';
|
1274 |
+
$input1['address']['streetAddress'] = saswp_remove_warnings($all_post_meta, 'saswp_project_street_address_'.$schema_id, 'saswp_array');
|
1275 |
+
$input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_project_country_'.$schema_id, 'saswp_array');
|
1276 |
+
$input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_project_city_'.$schema_id, 'saswp_array');
|
1277 |
+
$input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_project_state_'.$schema_id, 'saswp_array');
|
1278 |
+
$input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_project_postal_code_'.$schema_id, 'saswp_array');
|
1279 |
+
$input1['address']['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_project_telephone_'.$schema_id, 'saswp_array');
|
1280 |
+
$input1['address']['email'] = saswp_remove_warnings($all_post_meta, 'saswp_project_email_'.$schema_id, 'saswp_array');
|
1281 |
+
|
1282 |
+
if( isset($all_post_meta['saswp_project_duns_'.$schema_id][0]) ){
|
1283 |
+
$input1['duns'] = $all_post_meta['saswp_project_duns_'.$schema_id][0];
|
1284 |
+
}
|
1285 |
+
if( isset($all_post_meta['saswp_project_founder_'.$schema_id][0]) ){
|
1286 |
+
$input1['founder'] = $all_post_meta['saswp_project_founder_'.$schema_id][0];
|
1287 |
+
}
|
1288 |
+
if( isset($all_post_meta['saswp_project_founding_date_'.$schema_id][0]) ){
|
1289 |
+
$input1['foundingDate'] = saswp_format_date_time($all_post_meta['saswp_project_founding_date_'.$schema_id][0]);
|
1290 |
+
}
|
1291 |
+
if( isset($all_post_meta['saswp_project_qualifications_'.$schema_id][0]) ){
|
1292 |
+
$input1['hasCredential'] = $all_post_meta['saswp_project_qualifications_'.$schema_id][0];
|
1293 |
+
}
|
1294 |
+
if( isset($all_post_meta['saswp_project_knows_about_'.$schema_id][0]) ){
|
1295 |
+
$input1['knowsAbout'] = $all_post_meta['saswp_project_knows_about_'.$schema_id][0];
|
1296 |
+
}
|
1297 |
+
if( isset($all_post_meta['saswp_project_member_of_'.$schema_id][0]) ){
|
1298 |
+
$input1['memberOf'] = $all_post_meta['saswp_project_member_of_'.$schema_id][0];
|
1299 |
+
}
|
1300 |
+
if( isset($all_post_meta['saswp_project_parent_project_'.$schema_id][0]) ){
|
1301 |
+
$input1['parentProject'] = $all_post_meta['saswp_project_parent_project_'.$schema_id][0];
|
1302 |
+
}
|
1303 |
+
if(isset($all_post_meta['saswp_project_enable_rating_'.$schema_id]) && isset($all_post_meta['saswp_project_rating_value_'.$schema_id]) && isset($all_post_meta['saswp_project_rating_count_'.$schema_id])){
|
1304 |
+
$input1['aggregateRating']['@type'] = 'aggregateRating';
|
1305 |
+
$input1['aggregateRating']['ratingValue'] = $all_post_meta['saswp_project_rating_value_'.$schema_id][0];
|
1306 |
+
$input1['aggregateRating']['ratingCount'] = $all_post_meta['saswp_project_rating_count_'.$schema_id][0];
|
1307 |
+
}
|
1308 |
+
|
1309 |
+
return $input1;
|
1310 |
+
}
|
1311 |
+
|
1312 |
+
function saswp_hotel_room_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
1313 |
+
|
1314 |
+
$input1 = array();
|
1315 |
+
|
1316 |
+
$input1['@context'] = saswp_context_url();
|
1317 |
+
$input1['@type'] = 'Hotel';
|
1318 |
+
$input1['@id'] = trailingslashit(get_permalink()).'#Hotel';
|
1319 |
+
|
1320 |
+
if(isset($all_post_meta['saswp_hotelroom_hotel_name_'.$schema_id][0])){
|
1321 |
+
$input1['name'] = $all_post_meta['saswp_hotelroom_hotel_name_'.$schema_id][0];
|
1322 |
+
}
|
1323 |
+
if(isset($all_post_meta['saswp_hotelroom_hotel_image_'.$schema_id][0])){
|
1324 |
+
$input1['image'] = $all_post_meta['saswp_hotelroom_hotel_image_'.$schema_id][0];
|
1325 |
+
}
|
1326 |
+
if(isset($all_post_meta['saswp_hotelroom_hotel_description_'.$schema_id][0])){
|
1327 |
+
$input1['description'] = $all_post_meta['saswp_hotelroom_hotel_description_'.$schema_id][0];
|
1328 |
+
}
|
1329 |
+
if(isset($all_post_meta['saswp_hotelroom_hotel_price_range_'.$schema_id][0])){
|
1330 |
+
$input1['priceRange'] = $all_post_meta['saswp_hotelroom_hotel_price_range_'.$schema_id][0];
|
1331 |
+
}
|
1332 |
+
if(isset($all_post_meta['saswp_hotelroom_hotel_telephone_'.$schema_id][0])){
|
1333 |
+
$input1['telephone'] = $all_post_meta['saswp_hotelroom_hotel_telephone_'.$schema_id][0];
|
1334 |
+
}
|
1335 |
+
|
1336 |
+
if(isset($all_post_meta['saswp_hotelroom_hotel_streetaddress_'.$schema_id][0])){
|
1337 |
+
$input1['address']['streetAddress'] = $all_post_meta['saswp_hotelroom_hotel_streetaddress_'.$schema_id][0];
|
1338 |
+
}
|
1339 |
+
if(isset($all_post_meta['saswp_hotelroom_hotel_locality_'.$schema_id][0])){
|
1340 |
+
$input1['address']['addressLocality'] = $all_post_meta['saswp_hotelroom_hotel_locality_'.$schema_id][0];
|
1341 |
+
}
|
1342 |
+
if(isset($all_post_meta['saswp_hotelroom_hotel_region_'.$schema_id][0])){
|
1343 |
+
$input1['address']['addressRegion'] = $all_post_meta['saswp_hotelroom_hotel_region_'.$schema_id][0];
|
1344 |
+
}
|
1345 |
+
if(isset($all_post_meta['saswp_hotelroom_hotel_country_'.$schema_id][0])){
|
1346 |
+
$input1['address']['addressCountry'] = $all_post_meta['saswp_hotelroom_hotel_country_'.$schema_id][0];
|
1347 |
+
}
|
1348 |
+
if(isset($all_post_meta['saswp_hotelroom_hotel_postalcode_'.$schema_id][0])){
|
1349 |
+
$input1['address']['postalCode'] = $all_post_meta['saswp_hotelroom_hotel_postalcode_'.$schema_id][0];
|
1350 |
+
}
|
1351 |
+
|
1352 |
+
if(isset($all_post_meta['saswp_hotelroom_name_'.$schema_id][0])){
|
1353 |
+
$input1['containsPlace']['@type'] = 'HotelRoom';
|
1354 |
+
$input1['containsPlace']['name'] = $all_post_meta['saswp_hotelroom_name_'.$schema_id][0];
|
1355 |
+
}
|
1356 |
+
if(isset($all_post_meta['saswp_hotelroom_description_'.$schema_id][0])){
|
1357 |
+
$input1['containsPlace']['@type'] = 'HotelRoom';
|
1358 |
+
$input1['containsPlace']['description'] = $all_post_meta['saswp_hotelroom_description_'.$schema_id][0];
|
1359 |
+
}
|
1360 |
+
if(isset($all_post_meta['saswp_hotelroom_image_'.$schema_id][0])){
|
1361 |
+
$input1['containsPlace']['@type'] = 'HotelRoom';
|
1362 |
+
$input1['containsPlace']['image'] = $all_post_meta['saswp_hotelroom_image_'.$schema_id][0];
|
1363 |
+
}
|
1364 |
+
|
1365 |
+
if(isset($all_post_meta['saswp_hotelroom_offer_name_'.$schema_id][0])){
|
1366 |
+
$input1['makesOffer']['@type'] = 'offer';
|
1367 |
+
$input1['makesOffer']['name'] = $all_post_meta['saswp_hotelroom_offer_name_'.$schema_id][0];
|
1368 |
+
}
|
1369 |
+
|
1370 |
+
if(isset($all_post_meta['saswp_hotelroom_offer_description_'.$schema_id][0])){
|
1371 |
+
$input1['makesOffer']['@type'] = 'offer';
|
1372 |
+
$input1['makesOffer']['description'] = $all_post_meta['saswp_hotelroom_offer_description_'.$schema_id][0];
|
1373 |
+
}
|
1374 |
+
|
1375 |
+
if(isset($all_post_meta['saswp_hotelroom_offer_price_'.$schema_id][0]) && isset($all_post_meta['saswp_hotelroom_offer_price_currency_'.$schema_id][0])){
|
1376 |
+
|
1377 |
+
$input1['makesOffer']['@type'] = 'offer';
|
1378 |
+
$input1['makesOffer']['priceSpecification']['@type'] = 'UnitPriceSpecification';
|
1379 |
+
|
1380 |
+
$input1['makesOffer']['priceSpecification']['priceCurrency'] = $all_post_meta['saswp_hotelroom_offer_price_currency_'.$schema_id][0];
|
1381 |
+
$input1['makesOffer']['priceSpecification']['price'] = $all_post_meta['saswp_hotelroom_offer_price_'.$schema_id][0];
|
1382 |
+
$input1['makesOffer']['priceSpecification']['unitCode'] = $all_post_meta['saswp_hotelroom_offer_unitcode_'.$schema_id][0];
|
1383 |
+
$input1['makesOffer']['priceSpecification']['validThrough'] = $all_post_meta['saswp_hotelroom_offer_validthrough_'.$schema_id][0];
|
1384 |
+
|
1385 |
+
}
|
1386 |
+
|
1387 |
+
return $input1;
|
1388 |
+
}
|
1389 |
+
|
1390 |
+
function saswp_educational_occupational_credential_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
1391 |
+
|
1392 |
+
$input1 = array();
|
1393 |
+
|
1394 |
+
$input1['@context'] = saswp_context_url();
|
1395 |
+
$input1['@type'] = 'EducationalOccupationalCredential';
|
1396 |
+
$input1['@id'] = trailingslashit(get_permalink()).'#EducationalOccupationalCredential';
|
1397 |
+
|
1398 |
+
if( isset($all_post_meta['saswp_eoc_additional_type_'.$schema_id][0]) ){
|
1399 |
+
$input1['additionalType'] = $all_post_meta['saswp_eoc_additional_type_'.$schema_id][0];
|
1400 |
+
}
|
1401 |
+
if( isset($all_post_meta['saswp_eoc_name_'.$schema_id][0]) ){
|
1402 |
+
$input1['name'] = $all_post_meta['saswp_eoc_name_'.$schema_id][0];
|
1403 |
+
}
|
1404 |
+
if( isset($all_post_meta['saswp_eoc_alt_name_'.$schema_id][0]) ){
|
1405 |
+
$input1['alternateName'] = $all_post_meta['saswp_eoc_alt_name_'.$schema_id][0];
|
1406 |
+
}
|
1407 |
+
if( isset($all_post_meta['saswp_eoc_description_'.$schema_id][0]) ){
|
1408 |
+
$input1['description'] = $all_post_meta['saswp_eoc_description_'.$schema_id][0];
|
1409 |
+
}
|
1410 |
+
|
1411 |
+
if( isset($all_post_meta['saswp_eoc_e_lavel_name_'.$schema_id][0]) ){
|
1412 |
+
$input1['educationalLevel']['@type'] = 'DefinedTerm';
|
1413 |
+
$input1['educationalLevel']['name'] = $all_post_meta['saswp_eoc_e_lavel_name_'.$schema_id][0];
|
1414 |
+
$input1['educationalLevel']['inDefinedTermSet'] = $all_post_meta['saswp_eoc_e_lavel_definedtermset_'.$schema_id][0];
|
1415 |
+
}
|
1416 |
+
|
1417 |
+
if( isset($all_post_meta['saswp_eoc_c_category_name_'.$schema_id][0]) ){
|
1418 |
+
$input1['credentialCategory']['@type'] = 'DefinedTerm';
|
1419 |
+
$input1['credentialCategory']['name'] = $all_post_meta['saswp_eoc_c_category_name_'.$schema_id][0];
|
1420 |
+
$input1['credentialCategory']['inDefinedTermSet'] = $all_post_meta['saswp_eoc_c_category_definedtermset_'.$schema_id][0];
|
1421 |
+
$input1['credentialCategory']['termCode'] = $all_post_meta['saswp_eoc_c_category_term_code_'.$schema_id][0];
|
1422 |
+
}
|
1423 |
+
|
1424 |
+
if( isset($all_post_meta['saswp_eoc_c_required_name_'.$schema_id][0]) ){
|
1425 |
+
$input1['competencyRequired']['@type'] = 'DefinedTerm';
|
1426 |
+
$input1['competencyRequired']['name'] = $all_post_meta['saswp_eoc_c_required_name_'.$schema_id][0];
|
1427 |
+
$input1['competencyRequired']['inDefinedTermSet'] = $all_post_meta['saswp_eoc_c_required_definedtermset_'.$schema_id][0];
|
1428 |
+
$input1['competencyRequired']['termCode'] = $all_post_meta['saswp_eoc_c_required_term_code_'.$schema_id][0];
|
1429 |
+
$input1['competencyRequired']['url'] = $all_post_meta['saswp_eoc_c_required_url_'.$schema_id][0];
|
1430 |
+
}
|
1431 |
+
|
1432 |
+
return $input1;
|
1433 |
+
}
|
1434 |
+
|
1435 |
function saswp_video_game_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
1436 |
|
1437 |
$input1 = array();
|
2307 |
|
2308 |
}
|
2309 |
|
2310 |
+
function saswp_apartment_complex_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
2311 |
+
|
2312 |
+
$input1 = array();
|
2313 |
+
|
2314 |
+
$howto_image = get_post_meta( get_the_ID(), 'saswp_apartment_complex_image_'.$schema_id.'_detail',true);
|
2315 |
+
|
2316 |
+
$input1['@context'] = saswp_context_url();
|
2317 |
+
$input1['@type'] = 'ApartmentComplex';
|
2318 |
+
$input1['@id'] = trailingslashit(get_permalink()).'#ApartmentComplex';
|
2319 |
+
$input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_url_'.$schema_id, 'saswp_array');
|
2320 |
+
$input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_name_'.$schema_id, 'saswp_array');
|
2321 |
+
$input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_description_'.$schema_id, 'saswp_array');
|
2322 |
+
|
2323 |
+
if(!(empty($howto_image))){
|
2324 |
+
|
2325 |
+
$input1['image']['@type'] = 'ImageObject';
|
2326 |
+
$input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
|
2327 |
+
$input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
|
2328 |
+
$input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
|
2329 |
+
|
2330 |
+
}
|
2331 |
+
|
2332 |
+
$input1['numberOfBedrooms'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_no_of_bedrooms_'.$schema_id, 'saswp_array');
|
2333 |
+
$input1['petsAllowed'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_pets_allowed_'.$schema_id, 'saswp_array');
|
2334 |
+
|
2335 |
+
$input1['address']['@type'] = 'PostalAddress';
|
2336 |
+
$input1['address']['streetAddress'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_streetaddress_'.$schema_id, 'saswp_array');
|
2337 |
+
$input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_country_'.$schema_id, 'saswp_array');
|
2338 |
+
$input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_locality_'.$schema_id, 'saswp_array');
|
2339 |
+
$input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_region_'.$schema_id, 'saswp_array');
|
2340 |
+
$input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_postalcode_'.$schema_id, 'saswp_array');
|
2341 |
+
$input1['address']['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_phone_'.$schema_id, 'saswp_array');
|
2342 |
+
|
2343 |
+
return $input1;
|
2344 |
+
|
2345 |
+
}
|
2346 |
+
|
2347 |
function saswp_house_schema_makrup($schema_id, $schema_post_id, $all_post_meta){
|
2348 |
|
2349 |
$input1 = array();
|
3291 |
|
3292 |
}
|
3293 |
|
3294 |
+
function saswp_audiobook_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
3295 |
+
|
3296 |
+
$input1 = array();
|
3297 |
+
|
3298 |
+
$author_image = get_post_meta( get_the_ID(), 'saswp_audiobook_author_image_'.$schema_id.'_detail',true);
|
3299 |
+
$image = get_post_meta( get_the_ID(), 'saswp_audiobook_image_'.$schema_id.'_detail',true);
|
3300 |
+
|
3301 |
+
$input1 = array(
|
3302 |
+
'@context' => saswp_context_url(),
|
3303 |
+
'@type' => 'Audiobook' ,
|
3304 |
+
'@id' => trailingslashit(get_permalink()).'#Audiobook',
|
3305 |
+
'inLanguage' => get_bloginfo('language'),
|
3306 |
+
'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_main_entity_of_page_'.$schema_id, 'saswp_array'),
|
3307 |
+
'url' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_url_'.$schema_id, 'saswp_array'),
|
3308 |
+
'name' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_name_'.$schema_id, 'saswp_array'),
|
3309 |
+
'datePublished' => isset($all_post_meta['saswp_audiobook_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_audiobook_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
3310 |
+
'dateModified' => isset($all_post_meta['saswp_audiobook_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_audiobook_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
3311 |
+
'description' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_description_'.$schema_id, 'saswp_array'),
|
3312 |
+
'contentUrl' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_content_url_'.$schema_id, 'saswp_array'),
|
3313 |
+
|
3314 |
+
'publisher' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_publisher_'.$schema_id, 'saswp_array'),
|
3315 |
+
'provider' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_provider_'.$schema_id, 'saswp_array'),
|
3316 |
+
'duration' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_duration_'.$schema_id, 'saswp_array'),
|
3317 |
+
'encodingFormat' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_encoding_format_'.$schema_id, 'saswp_array'),
|
3318 |
+
'playerType' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_player_type_'.$schema_id, 'saswp_array'),
|
3319 |
+
'readBy' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_readby_'.$schema_id, 'saswp_array'),
|
3320 |
+
|
3321 |
+
'author' => array(
|
3322 |
+
'@type' => 'Person',
|
3323 |
+
'name' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_author_name_'.$schema_id, 'saswp_array'),
|
3324 |
+
'description' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_author_description_'.$schema_id, 'saswp_array'),
|
3325 |
+
'url' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_author_url_'.$schema_id, 'saswp_array'),
|
3326 |
+
'Image' => array(
|
3327 |
+
'@type' => 'ImageObject',
|
3328 |
+
'url' => saswp_remove_warnings($all_post_meta, 'saswp_audiobook_author_image_'.$schema_id, 'saswp_array'),
|
3329 |
+
'height' => saswp_remove_warnings($author_image, 'height', 'saswp_string'),
|
3330 |
+
'width' => saswp_remove_warnings($author_image, 'width', 'saswp_string')
|
3331 |
+
),
|
3332 |
+
)
|
3333 |
+
);
|
3334 |
+
|
3335 |
+
if(!(empty($image))){
|
3336 |
+
|
3337 |
+
$input1['image']['@type'] = 'ImageObject';
|
3338 |
+
$input1['image']['url'] = isset($image['thumbnail']) ? esc_url($image['thumbnail']):'';
|
3339 |
+
$input1['image']['height'] = isset($image['width']) ? esc_attr($image['width']) :'';
|
3340 |
+
$input1['image']['width'] = isset($image['height']) ? esc_attr($image['height']) :'';
|
3341 |
+
|
3342 |
+
}
|
3343 |
+
|
3344 |
+
return $input1;
|
3345 |
+
|
3346 |
+
}
|
3347 |
+
|
3348 |
+
function saswp_podcast_episode_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
3349 |
+
|
3350 |
+
$input1 = array();
|
3351 |
+
|
3352 |
+
$image = get_post_meta( get_the_ID(), 'saswp_podcast_episode_image_'.$schema_id.'_detail',true);
|
3353 |
+
|
3354 |
+
$input1 = array(
|
3355 |
+
'@context' => saswp_context_url(),
|
3356 |
+
'@type' => 'PodcastEpisode' ,
|
3357 |
+
'@id' => trailingslashit(get_permalink()).'#PodcastEpisode',
|
3358 |
+
'inLanguage' => get_bloginfo('language'),
|
3359 |
+
'url' => saswp_remove_warnings($all_post_meta, 'saswp_podcast_episode_url_'.$schema_id, 'saswp_array'),
|
3360 |
+
'name' => saswp_remove_warnings($all_post_meta, 'saswp_podcast_episode_name_'.$schema_id, 'saswp_array'),
|
3361 |
+
'datePublished' => isset($all_post_meta['saswp_podcast_episode_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_podcast_episode_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
3362 |
+
'dateModified' => isset($all_post_meta['saswp_podcast_episode_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_podcast_episode_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
3363 |
+
'description' => saswp_remove_warnings($all_post_meta, 'saswp_podcast_episode_description_'.$schema_id, 'saswp_array'),
|
3364 |
+
);
|
3365 |
+
|
3366 |
+
if(isset($all_post_meta['saswp_podcast_episode_content_url_'.$schema_id][0])){
|
3367 |
+
|
3368 |
+
$input1['associatedMedia']['@type'] = 'MediaObject';
|
3369 |
+
$input1['associatedMedia']['contentUrl'] = $all_post_meta['saswp_podcast_episode_content_url_'.$schema_id][0];
|
3370 |
+
}
|
3371 |
+
|
3372 |
+
if(isset($all_post_meta['saswp_podcast_episode_series_name_'.$schema_id][0])){
|
3373 |
+
$input1['partOfSeries']['@type'] = 'PodcastSeries';
|
3374 |
+
$input1['partOfSeries']['name'] = $all_post_meta['saswp_podcast_episode_series_name_'.$schema_id][0];
|
3375 |
+
}
|
3376 |
+
|
3377 |
+
if(isset($all_post_meta['saswp_podcast_episode_series_url_'.$schema_id][0])){
|
3378 |
+
$input1['partOfSeries']['@type'] = 'PodcastSeries';
|
3379 |
+
$input1['partOfSeries']['url'] = $all_post_meta['saswp_podcast_episode_series_url_'.$schema_id][0];
|
3380 |
+
}
|
3381 |
+
|
3382 |
+
if(!(empty($image))){
|
3383 |
+
|
3384 |
+
$input1['image']['@type'] = 'ImageObject';
|
3385 |
+
$input1['image']['url'] = isset($image['thumbnail']) ? esc_url($image['thumbnail']):'';
|
3386 |
+
$input1['image']['height'] = isset($image['width']) ? esc_attr($image['width']) :'';
|
3387 |
+
$input1['image']['width'] = isset($image['height']) ? esc_attr($image['height']) :'';
|
3388 |
+
|
3389 |
+
}
|
3390 |
+
|
3391 |
+
return $input1;
|
3392 |
+
|
3393 |
+
}
|
3394 |
+
|
3395 |
+
|
3396 |
+
function saswp_podcast_season_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
3397 |
+
|
3398 |
+
$input1 = array();
|
3399 |
+
|
3400 |
+
$image = get_post_meta( get_the_ID(), 'saswp_podcast_season_image_'.$schema_id.'_detail',true);
|
3401 |
+
|
3402 |
+
$input1 = array(
|
3403 |
+
'@context' => saswp_context_url(),
|
3404 |
+
'@type' => 'PodcastSeason' ,
|
3405 |
+
'@id' => trailingslashit(get_permalink()).'#PodcastSeason',
|
3406 |
+
'inLanguage' => get_bloginfo('language'),
|
3407 |
+
'url' => saswp_remove_warnings($all_post_meta, 'saswp_podcast_season_url_'.$schema_id, 'saswp_array'),
|
3408 |
+
'name' => saswp_remove_warnings($all_post_meta, 'saswp_podcast_season_name_'.$schema_id, 'saswp_array'),
|
3409 |
+
'datePublished' => isset($all_post_meta['saswp_podcast_season_date_published_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_podcast_season_date_published_'.$schema_id][0], get_post_time('h:i:s')) :'',
|
3410 |
+
'dateModified' => isset($all_post_meta['saswp_podcast_season_date_modified_'.$schema_id])? saswp_format_date_time($all_post_meta['saswp_podcast_season_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) :'',
|
3411 |
+
'description' => saswp_remove_warnings($all_post_meta, 'saswp_podcast_season_description_'.$schema_id, 'saswp_array'),
|
3412 |
+
);
|
3413 |
+
|
3414 |
+
if(isset($all_post_meta['saswp_podcast_season_number_'.$schema_id][0])){
|
3415 |
+
|
3416 |
+
$input1['seasonNumber'] = $all_post_meta['saswp_podcast_season_number_'.$schema_id][0];
|
3417 |
+
}
|
3418 |
+
|
3419 |
+
if(isset($all_post_meta['saswp_podcast_season_number_of_seasons_'.$schema_id][0])){
|
3420 |
+
|
3421 |
+
$input1['numberOfEpisodes'] = $all_post_meta['saswp_podcast_season_number_of_seasons_'.$schema_id][0];
|
3422 |
+
}
|
3423 |
+
|
3424 |
+
if(isset($all_post_meta['saswp_podcast_season_series_name_'.$schema_id][0])){
|
3425 |
+
$input1['partOfSeries']['@type'] = 'PodcastSeries';
|
3426 |
+
$input1['partOfSeries']['name'] = $all_post_meta['saswp_podcast_season_series_name_'.$schema_id][0];
|
3427 |
+
}
|
3428 |
+
|
3429 |
+
if(isset($all_post_meta['saswp_podcast_season_series_url_'.$schema_id][0])){
|
3430 |
+
$input1['partOfSeries']['@type'] = 'PodcastSeries';
|
3431 |
+
$input1['partOfSeries']['url'] = $all_post_meta['saswp_podcast_season_series_url_'.$schema_id][0];
|
3432 |
+
}
|
3433 |
+
|
3434 |
+
if(!(empty($image))){
|
3435 |
+
|
3436 |
+
$input1['image']['@type'] = 'ImageObject';
|
3437 |
+
$input1['image']['url'] = isset($image['thumbnail']) ? esc_url($image['thumbnail']):'';
|
3438 |
+
$input1['image']['height'] = isset($image['width']) ? esc_attr($image['width']) :'';
|
3439 |
+
$input1['image']['width'] = isset($image['height']) ? esc_attr($image['height']) :'';
|
3440 |
+
|
3441 |
+
}
|
3442 |
+
|
3443 |
+
return $input1;
|
3444 |
+
|
3445 |
+
}
|
3446 |
+
|
3447 |
+
|
3448 |
function saswp_video_object_schema_markup($schema_id, $schema_post_id, $all_post_meta){
|
3449 |
|
3450 |
$input1 = array();
|
output/output.php
CHANGED
@@ -871,6 +871,153 @@ function saswp_schema_output() {
|
|
871 |
|
872 |
break;
|
873 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
874 |
case 'Organization':
|
875 |
|
876 |
$input1 = array(
|
@@ -1247,6 +1394,48 @@ function saswp_schema_output() {
|
|
1247 |
|
1248 |
break;
|
1249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1250 |
case 'PsychologicalTreatment':
|
1251 |
|
1252 |
$input1 = array(
|
@@ -1467,8 +1656,8 @@ function saswp_schema_output() {
|
|
1467 |
|
1468 |
if(isset($video_links[0])){
|
1469 |
|
1470 |
-
$input1['contentUrl'] = $video_links[0];
|
1471 |
-
$input1['embedUrl'] = $video_links[0];
|
1472 |
|
1473 |
}
|
1474 |
|
871 |
|
872 |
break;
|
873 |
|
874 |
+
case 'EducationalOccupationalCredential':
|
875 |
+
|
876 |
+
$input1 = array(
|
877 |
+
'@context' => saswp_context_url(),
|
878 |
+
'@type' => 'EducationalOccupationalCredential',
|
879 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#EducationalOccupationalCredential',
|
880 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
881 |
+
'description' => saswp_get_the_excerpt(),
|
882 |
+
'name' => saswp_get_the_title()
|
883 |
+
);
|
884 |
+
|
885 |
+
$input1 = apply_filters('saswp_modify_educational_occupational_credential_schema_output', $input1 );
|
886 |
+
|
887 |
+
$input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
|
888 |
+
|
889 |
+
if($modified_schema == 1){
|
890 |
+
|
891 |
+
$input1 = saswp_educational_occupational_credential_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
|
892 |
+
|
893 |
+
}
|
894 |
+
|
895 |
+
break;
|
896 |
+
|
897 |
+
case 'Audiobook':
|
898 |
+
|
899 |
+
$input1 = array(
|
900 |
+
'@context' => saswp_context_url(),
|
901 |
+
'@type' => 'Audiobook',
|
902 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#Audiobook',
|
903 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
904 |
+
'description' => saswp_get_the_excerpt(),
|
905 |
+
'name' => saswp_get_the_title(),
|
906 |
+
'datePublished' => esc_html($date),
|
907 |
+
'dateModified' => esc_html($modified_date),
|
908 |
+
'author' => saswp_get_author_details()
|
909 |
+
);
|
910 |
+
|
911 |
+
$input1 = apply_filters('saswp_modify_audiobook_schema_output', $input1 );
|
912 |
+
|
913 |
+
$input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
|
914 |
+
|
915 |
+
if($modified_schema == 1){
|
916 |
+
|
917 |
+
$input1 = saswp_audiobook_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
|
918 |
+
|
919 |
+
}
|
920 |
+
|
921 |
+
break;
|
922 |
+
|
923 |
+
case 'PodcastEpisode':
|
924 |
+
|
925 |
+
$input1 = array(
|
926 |
+
'@context' => saswp_context_url(),
|
927 |
+
'@type' => 'PodcastEpisode',
|
928 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#PodcastEpisode',
|
929 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
930 |
+
'description' => saswp_get_the_excerpt(),
|
931 |
+
'name' => saswp_get_the_title(),
|
932 |
+
'datePublished' => esc_html($date),
|
933 |
+
'dateModified' => esc_html($modified_date),
|
934 |
+
);
|
935 |
+
|
936 |
+
$input1 = apply_filters('saswp_modify_podcast_episode_schema_output', $input1 );
|
937 |
+
|
938 |
+
$input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
|
939 |
+
|
940 |
+
if($modified_schema == 1){
|
941 |
+
|
942 |
+
$input1 = saswp_podcast_episode_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
|
943 |
+
|
944 |
+
}
|
945 |
+
|
946 |
+
break;
|
947 |
+
|
948 |
+
case 'HotelRoom':
|
949 |
+
|
950 |
+
$input1 = array(
|
951 |
+
'@context' => saswp_context_url(),
|
952 |
+
'@type' => 'Hotel',
|
953 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#Hotel',
|
954 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
955 |
+
'description' => saswp_get_the_excerpt(),
|
956 |
+
'name' => saswp_get_the_title()
|
957 |
+
);
|
958 |
+
|
959 |
+
$input1 = apply_filters('saswp_modify_hotel_room_schema_output', $input1 );
|
960 |
+
|
961 |
+
$input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
|
962 |
+
|
963 |
+
if($modified_schema == 1){
|
964 |
+
|
965 |
+
$input1 = saswp_hotel_room_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
|
966 |
+
|
967 |
+
}
|
968 |
+
|
969 |
+
break;
|
970 |
+
|
971 |
+
case 'PodcastSeason':
|
972 |
+
|
973 |
+
$input1 = array(
|
974 |
+
'@context' => saswp_context_url(),
|
975 |
+
'@type' => 'PodcastSeason',
|
976 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#PodcastSeason',
|
977 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
978 |
+
'description' => saswp_get_the_excerpt(),
|
979 |
+
'name' => saswp_get_the_title(),
|
980 |
+
'datePublished' => esc_html($date),
|
981 |
+
'dateModified' => esc_html($modified_date),
|
982 |
+
);
|
983 |
+
|
984 |
+
$input1 = apply_filters('saswp_modify_podcast_season_schema_output', $input1 );
|
985 |
+
|
986 |
+
$input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
|
987 |
+
|
988 |
+
if($modified_schema == 1){
|
989 |
+
|
990 |
+
$input1 = saswp_podcast_season_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
|
991 |
+
|
992 |
+
}
|
993 |
+
|
994 |
+
break;
|
995 |
+
|
996 |
+
case 'Project':
|
997 |
+
|
998 |
+
$input1 = array(
|
999 |
+
'@context' => saswp_context_url(),
|
1000 |
+
'@type' => 'Project',
|
1001 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#Project',
|
1002 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
1003 |
+
'description' => saswp_get_the_excerpt(),
|
1004 |
+
'name' => saswp_get_the_title()
|
1005 |
+
);
|
1006 |
+
|
1007 |
+
$input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
|
1008 |
+
|
1009 |
+
$input1 = apply_filters('saswp_modify_project_schema_output', $input1 );
|
1010 |
+
|
1011 |
+
$input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
|
1012 |
+
|
1013 |
+
if($modified_schema == 1){
|
1014 |
+
|
1015 |
+
$input1 = saswp_project_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
|
1016 |
+
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
break;
|
1020 |
+
|
1021 |
case 'Organization':
|
1022 |
|
1023 |
$input1 = array(
|
1394 |
|
1395 |
break;
|
1396 |
|
1397 |
+
case 'ApartmentComplex':
|
1398 |
+
|
1399 |
+
$input1 = array(
|
1400 |
+
'@context' => saswp_context_url(),
|
1401 |
+
'@type' => 'ApartmentComplex',
|
1402 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#ApartmentComplex',
|
1403 |
+
'url' => trailingslashit(saswp_get_permalink()),
|
1404 |
+
'name' => saswp_get_the_title(),
|
1405 |
+
'description' => saswp_get_the_excerpt()
|
1406 |
+
);
|
1407 |
+
|
1408 |
+
$input1 = apply_filters('saswp_modify_apartment_complex_schema_output', $input1 );
|
1409 |
+
|
1410 |
+
$input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
|
1411 |
+
|
1412 |
+
if($modified_schema == 1){
|
1413 |
+
|
1414 |
+
$input1 = saswp_apartment_complex_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
|
1415 |
+
}
|
1416 |
+
|
1417 |
+
break;
|
1418 |
+
|
1419 |
+
case 'RentAction':
|
1420 |
+
|
1421 |
+
$input1 = array(
|
1422 |
+
'@context' => saswp_context_url(),
|
1423 |
+
'@type' => 'RentAction',
|
1424 |
+
'@id' => trailingslashit(saswp_get_permalink()).'#RentAction',
|
1425 |
+
'url' => trailingslashit(saswp_get_permalink())
|
1426 |
+
);
|
1427 |
+
|
1428 |
+
$input1 = apply_filters('saswp_modify_rent_action_schema_output', $input1 );
|
1429 |
+
|
1430 |
+
$input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
|
1431 |
+
|
1432 |
+
if($modified_schema == 1){
|
1433 |
+
|
1434 |
+
$input1 = saswp_rent_action_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
|
1435 |
+
}
|
1436 |
+
|
1437 |
+
break;
|
1438 |
+
|
1439 |
case 'PsychologicalTreatment':
|
1440 |
|
1441 |
$input1 = array(
|
1656 |
|
1657 |
if(isset($video_links[0])){
|
1658 |
|
1659 |
+
$input1['contentUrl'] = saswp_validate_url($video_links[0]);
|
1660 |
+
$input1['embedUrl'] = saswp_validate_url($video_links[0]);
|
1661 |
|
1662 |
}
|
1663 |
|
output/service.php
CHANGED
@@ -556,6 +556,351 @@ Class saswp_output_service{
|
|
556 |
}
|
557 |
|
558 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
559 |
case 'Organization':
|
560 |
|
561 |
if(isset($custom_fields['saswp_organization_name'])){
|
@@ -1631,6 +1976,23 @@ Class saswp_output_service{
|
|
1631 |
|
1632 |
break;
|
1633 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1634 |
case 'RealEstateListing':
|
1635 |
if(isset($custom_fields['saswp_real_estate_listing_date_posted'])){
|
1636 |
$input1['datePosted'] = $custom_fields['saswp_real_estate_listing_date_posted'];
|
@@ -1683,6 +2045,44 @@ Class saswp_output_service{
|
|
1683 |
|
1684 |
break;
|
1685 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1686 |
case 'PsychologicalTreatment':
|
1687 |
|
1688 |
if(isset($custom_fields['saswp_psychological_treatment_name'])){
|
@@ -2790,7 +3190,7 @@ Class saswp_output_service{
|
|
2790 |
global $woocommerce;
|
2791 |
global $sd_data;
|
2792 |
|
2793 |
-
|
2794 |
|
2795 |
if(is_object($product)){
|
2796 |
|
556 |
}
|
557 |
|
558 |
break;
|
559 |
+
|
560 |
+
case 'PodcastEpisode':
|
561 |
+
|
562 |
+
if(isset($custom_fields['saswp_podcast_episode_name'])){
|
563 |
+
$input1['name'] = $custom_fields['saswp_podcast_episode_name'];
|
564 |
+
}
|
565 |
+
if(isset($custom_fields['saswp_podcast_episode_description'])){
|
566 |
+
$input1['description'] = $custom_fields['saswp_podcast_episode_description'];
|
567 |
+
}
|
568 |
+
if(isset($custom_fields['saswp_podcast_episode_url'])){
|
569 |
+
$input1['url'] = $custom_fields['saswp_podcast_episode_url'];
|
570 |
+
}
|
571 |
+
if(isset($custom_fields['saswp_podcast_episode_image'])){
|
572 |
+
$input1['image'] = $custom_fields['saswp_podcast_episode_image'];
|
573 |
+
}
|
574 |
+
|
575 |
+
if(isset($custom_fields['saswp_podcast_episode_date_published'])){
|
576 |
+
$input1['datePublished'] = $custom_fields['saswp_podcast_episode_date_published'];
|
577 |
+
}
|
578 |
+
if(isset($custom_fields['saswp_podcast_episode_date_modified'])){
|
579 |
+
$input1['dateModified'] = $custom_fields['saswp_podcast_episode_date_modified'];
|
580 |
+
}
|
581 |
+
if(isset($custom_fields['saswp_podcast_episode_content_url'])){
|
582 |
+
|
583 |
+
$input1['associatedMedia']['@type'] = 'MediaObject';
|
584 |
+
$input1['associatedMedia']['contentUrl'] = $custom_fields['saswp_podcast_episode_content_url'];
|
585 |
+
|
586 |
+
}
|
587 |
+
|
588 |
+
if(isset($custom_fields['saswp_podcast_episode_series_name'])){
|
589 |
+
$input1['partOfSeries']['@type'] = 'PodcastSeries';
|
590 |
+
$input1['partOfSeries']['name'] = $custom_fields['saswp_podcast_episode_series_name'];
|
591 |
+
}
|
592 |
+
|
593 |
+
if(isset($custom_fields['saswp_podcast_episode_series_url'])){
|
594 |
+
$input1['partOfSeries']['@type'] = 'PodcastSeries';
|
595 |
+
$input1['partOfSeries']['url'] = $custom_fields['saswp_podcast_episode_series_url'];
|
596 |
+
}
|
597 |
+
|
598 |
+
if(isset($custom_fields['saswp_podcast_episode_timeRequired'])){
|
599 |
+
$input1['timeRequired'] = $custom_fields['saswp_podcast_episode_timeRequired'];
|
600 |
+
}
|
601 |
+
|
602 |
+
break;
|
603 |
+
|
604 |
+
case 'PodcastSeason':
|
605 |
+
|
606 |
+
if(isset($custom_fields['saswp_podcast_season_name'])){
|
607 |
+
$input1['name'] = $custom_fields['saswp_podcast_season_name'];
|
608 |
+
}
|
609 |
+
if(isset($custom_fields['saswp_podcast_season_description'])){
|
610 |
+
$input1['description'] = $custom_fields['saswp_podcast_season_description'];
|
611 |
+
}
|
612 |
+
if(isset($custom_fields['saswp_podcast_season_url'])){
|
613 |
+
$input1['url'] = $custom_fields['saswp_podcast_season_url'];
|
614 |
+
}
|
615 |
+
if(isset($custom_fields['saswp_podcast_season_image'])){
|
616 |
+
$input1['image'] = $custom_fields['saswp_podcast_season_image'];
|
617 |
+
}
|
618 |
+
if(isset($custom_fields['saswp_podcast_season_date_published'])){
|
619 |
+
$input1['datePublished'] = $custom_fields['saswp_podcast_season_date_published'];
|
620 |
+
}
|
621 |
+
if(isset($custom_fields['saswp_podcast_season_date_modified'])){
|
622 |
+
$input1['dateModified'] = $custom_fields['saswp_podcast_season_date_modified'];
|
623 |
+
}
|
624 |
+
|
625 |
+
if(isset($custom_fields['saswp_podcast_season_number'])){
|
626 |
+
$input1['seasonNumber'] = $custom_fields['saswp_podcast_season_number'];
|
627 |
+
}
|
628 |
+
if(isset($custom_fields['saswp_podcast_season_number_of_seasons'])){
|
629 |
+
$input1['numberOfEpisodes'] = $custom_fields['saswp_podcast_season_number_of_seasons'];
|
630 |
+
}
|
631 |
+
|
632 |
+
if(isset($custom_fields['saswp_podcast_season_series_name'])){
|
633 |
+
$input1['partOfSeries']['@type'] = 'PodcastSeries';
|
634 |
+
$input1['partOfSeries']['name'] = $custom_fields['saswp_podcast_season_series_name'];
|
635 |
+
}
|
636 |
+
|
637 |
+
if(isset($custom_fields['saswp_podcast_season_series_url'])){
|
638 |
+
$input1['partOfSeries']['@type'] = 'PodcastSeries';
|
639 |
+
$input1['partOfSeries']['url'] = $custom_fields['saswp_podcast_season_series_url'];
|
640 |
+
}
|
641 |
+
|
642 |
+
break;
|
643 |
+
|
644 |
+
case 'HotelRoom':
|
645 |
+
|
646 |
+
if(isset($custom_fields['saswp_hotelroom_hotel_name'])){
|
647 |
+
$input1['name'] = $custom_fields['saswp_hotelroom_hotel_name'];
|
648 |
+
}
|
649 |
+
if(isset($custom_fields['saswp_hotelroom_hotel_image'])){
|
650 |
+
$input1['image'] = $custom_fields['saswp_hotelroom_hotel_image'];
|
651 |
+
}
|
652 |
+
if(isset($custom_fields['saswp_hotelroom_hotel_description'])){
|
653 |
+
$input1['description'] = $custom_fields['saswp_hotelroom_hotel_description'];
|
654 |
+
}
|
655 |
+
if(isset($custom_fields['saswp_hotelroom_hotel_price_range'])){
|
656 |
+
$input1['priceRange'] = $custom_fields['saswp_hotelroom_hotel_price_range'];
|
657 |
+
}
|
658 |
+
if(isset($custom_fields['saswp_hotelroom_hotel_telephone'])){
|
659 |
+
$input1['telephone'] = $custom_fields['saswp_hotelroom_hotel_telephone'];
|
660 |
+
}
|
661 |
+
|
662 |
+
if(isset($custom_fields['saswp_hotelroom_hotel_streetaddress'])){
|
663 |
+
$input1['address']['streetAddress'] = $custom_fields['saswp_hotelroom_hotel_streetaddress'];
|
664 |
+
}
|
665 |
+
if(isset($custom_fields['saswp_hotelroom_hotel_locality'])){
|
666 |
+
$input1['address']['addressLocality'] = $custom_fields['saswp_hotelroom_hotel_locality'];
|
667 |
+
}
|
668 |
+
if(isset($custom_fields['saswp_hotelroom_hotel_region'])){
|
669 |
+
$input1['address']['addressRegion'] = $custom_fields['saswp_hotelroom_hotel_region'];
|
670 |
+
}
|
671 |
+
if(isset($custom_fields['saswp_hotelroom_hotel_country'])){
|
672 |
+
$input1['address']['addressCountry'] = $custom_fields['saswp_hotelroom_hotel_country'];
|
673 |
+
}
|
674 |
+
if(isset($custom_fields['saswp_hotelroom_hotel_postalcode'])){
|
675 |
+
$input1['address']['postalCode'] = $custom_fields['saswp_hotelroom_hotel_postalcode'];
|
676 |
+
}
|
677 |
+
|
678 |
+
if(isset($custom_fields['saswp_hotelroom_name'])){
|
679 |
+
$input1['containsPlace']['@type'] = 'HotelRoom';
|
680 |
+
$input1['containsPlace']['name'] = $custom_fields['saswp_hotelroom_name'];
|
681 |
+
}
|
682 |
+
if(isset($custom_fields['saswp_hotelroom_description'])){
|
683 |
+
$input1['containsPlace']['@type'] = 'HotelRoom';
|
684 |
+
$input1['containsPlace']['description'] = $custom_fields['saswp_hotelroom_description'];
|
685 |
+
}
|
686 |
+
if(isset($custom_fields['saswp_hotelroom_image'])){
|
687 |
+
$input1['containsPlace']['@type'] = 'HotelRoom';
|
688 |
+
$input1['containsPlace']['image'] = $custom_fields['saswp_hotelroom_image'];
|
689 |
+
}
|
690 |
+
|
691 |
+
if(isset($custom_fields['saswp_hotelroom_offer_name'])){
|
692 |
+
$input1['makesOffer']['@type'] = 'offer';
|
693 |
+
$input1['makesOffer']['name'] = $custom_fields['saswp_hotelroom_offer_name'];
|
694 |
+
}
|
695 |
+
|
696 |
+
if(isset($custom_fields['saswp_hotelroom_offer_description'])){
|
697 |
+
$input1['makesOffer']['@type'] = 'offer';
|
698 |
+
$input1['makesOffer']['description'] = $custom_fields['saswp_hotelroom_offer_description'];
|
699 |
+
}
|
700 |
+
|
701 |
+
if(isset($custom_fields['saswp_hotelroom_offer_price']) && isset($custom_fields['saswp_hotelroom_offer_price_currency'])){
|
702 |
+
|
703 |
+
$input1['makesOffer']['@type'] = 'offer';
|
704 |
+
$input1['makesOffer']['priceSpecification']['@type'] = 'UnitPriceSpecification';
|
705 |
+
|
706 |
+
$input1['makesOffer']['priceSpecification']['priceCurrency'] = $custom_fields['saswp_hotelroom_offer_price_currency'];
|
707 |
+
$input1['makesOffer']['priceSpecification']['price'] = $custom_fields['saswp_hotelroom_offer_price'];
|
708 |
+
$input1['makesOffer']['priceSpecification']['unitCode'] = $custom_fields['saswp_hotelroom_offer_unitcode'];
|
709 |
+
$input1['makesOffer']['priceSpecification']['validThrough'] = $custom_fields['saswp_hotelroom_offer_validthrough'];
|
710 |
+
|
711 |
+
}
|
712 |
+
|
713 |
+
|
714 |
+
break;
|
715 |
+
|
716 |
+
case 'Audiobook':
|
717 |
+
|
718 |
+
if(isset($custom_fields['saswp_audiobook_name'])){
|
719 |
+
$input1['name'] = $custom_fields['saswp_audiobook_name'];
|
720 |
+
}
|
721 |
+
if(isset($custom_fields['saswp_audiobook_description'])){
|
722 |
+
$input1['description'] = $custom_fields['saswp_audiobook_description'];
|
723 |
+
}
|
724 |
+
if(isset($custom_fields['saswp_audiobook_url'])){
|
725 |
+
$input1['url'] = saswp_validate_url($custom_fields['saswp_audiobook_url']);
|
726 |
+
}
|
727 |
+
if(isset($custom_fields['saswp_audiobook_date_published'])){
|
728 |
+
$input1['datePublished'] = $custom_fields['saswp_audiobook_date_published'];
|
729 |
+
}
|
730 |
+
if(isset($custom_fields['saswp_audiobook_date_modified'])){
|
731 |
+
$input1['dateModified'] = $custom_fields['saswp_audiobook_date_modified'];
|
732 |
+
}
|
733 |
+
if(isset($custom_fields['saswp_audiobook_image'])){
|
734 |
+
$input1['image'] = $custom_fields['saswp_audiobook_image'];
|
735 |
+
}
|
736 |
+
if(isset($custom_fields['saswp_audiobook_author_name'])){
|
737 |
+
$input1['author']['name'] = $custom_fields['saswp_audiobook_author_name'];
|
738 |
+
}
|
739 |
+
if(isset($custom_fields['saswp_audiobook_author_url'])){
|
740 |
+
$input1['author']['url'] = saswp_validate_url($custom_fields['saswp_audiobook_author_url']);
|
741 |
+
}
|
742 |
+
if(isset($custom_fields['saswp_audiobook_author_description'])){
|
743 |
+
$input1['author']['description'] = $custom_fields['saswp_audiobook_author_description'];
|
744 |
+
}
|
745 |
+
if(isset($custom_fields['saswp_audiobook_author_image'])){
|
746 |
+
$input1['author']['image'] = $custom_fields['saswp_audiobook_author_image'];
|
747 |
+
}
|
748 |
+
if(isset($custom_fields['saswp_audiobook_publisher'])){
|
749 |
+
$input1['publisher'] = $custom_fields['saswp_audiobook_publisher'];
|
750 |
+
}
|
751 |
+
if(isset($custom_fields['saswp_audiobook_provider'])){
|
752 |
+
$input1['provider'] = $custom_fields['saswp_audiobook_provider'];
|
753 |
+
}
|
754 |
+
if(isset($custom_fields['saswp_audiobook_readby'])){
|
755 |
+
$input1['readBy'] = $custom_fields['saswp_audiobook_readby'];
|
756 |
+
}
|
757 |
+
if(isset($custom_fields['saswp_audiobook_content_url'])){
|
758 |
+
$input1['contentUrl'] = $custom_fields['saswp_audiobook_content_url'];
|
759 |
+
}
|
760 |
+
if(isset($custom_fields['saswp_audiobook_duration'])){
|
761 |
+
$input1['duration'] = $custom_fields['saswp_audiobook_duration'];
|
762 |
+
}
|
763 |
+
if(isset($custom_fields['saswp_audiobook_encoding_format'])){
|
764 |
+
$input1['encodingFormat'] = $custom_fields['saswp_audiobook_encoding_format'];
|
765 |
+
}
|
766 |
+
if(isset($custom_fields['saswp_audiobook_player_type'])){
|
767 |
+
$input1['playerType'] = $custom_fields['saswp_audiobook_player_type'];
|
768 |
+
}
|
769 |
+
if(isset($custom_fields['saswp_audiobook_main_entity_of_page'])){
|
770 |
+
$input1['mainEntityOfPage'] = $custom_fields['saswp_audiobook_main_entity_of_page'];
|
771 |
+
}
|
772 |
+
|
773 |
+
break;
|
774 |
+
|
775 |
+
case 'EducationalOccupationalCredential':
|
776 |
+
|
777 |
+
if(isset($custom_fields['saswp_eoc_additional_type'])){
|
778 |
+
$input1['additionalType'] = $custom_fields['saswp_eoc_additional_type'];
|
779 |
+
}
|
780 |
+
if(isset($custom_fields['saswp_eoc_name'])){
|
781 |
+
$input1['name'] = $custom_fields['saswp_eoc_name'];
|
782 |
+
}
|
783 |
+
if(isset($custom_fields['saswp_eoc_alt_name'])){
|
784 |
+
$input1['alternateName'] = $custom_fields['saswp_eoc_alt_name'];
|
785 |
+
}
|
786 |
+
if(isset($custom_fields['saswp_eoc_description'])){
|
787 |
+
$input1['description'] = $custom_fields['saswp_eoc_description'];
|
788 |
+
}
|
789 |
+
|
790 |
+
if(isset($custom_fields['saswp_eoc_e_lavel_name'])){
|
791 |
+
|
792 |
+
$input1['educationalLevel']['@type'] = 'DefinedTerm';
|
793 |
+
$input1['educationalLevel']['name'] = $custom_fields['saswp_eoc_e_lavel_name'];
|
794 |
+
$input1['educationalLevel']['inDefinedTermSet'] = $custom_fields['saswp_eoc_e_lavel_definedtermset'];
|
795 |
+
|
796 |
+
}
|
797 |
+
|
798 |
+
if(isset($custom_fields['saswp_eoc_c_category_name'])){
|
799 |
+
|
800 |
+
$input1['credentialCategory']['@type'] = 'DefinedTerm';
|
801 |
+
$input1['credentialCategory']['name'] = $custom_fields['saswp_eoc_c_category_name'];
|
802 |
+
$input1['credentialCategory']['inDefinedTermSet'] = $custom_fields['saswp_eoc_c_category_definedtermset'];
|
803 |
+
$input1['credentialCategory']['termCode'] = $custom_fields['saswp_eoc_c_category_term_code'];
|
804 |
+
|
805 |
+
}
|
806 |
+
|
807 |
+
if(isset($custom_fields['saswp_eoc_c_required_name'])){
|
808 |
+
|
809 |
+
$input1['competencyRequired']['@type'] = 'DefinedTerm';
|
810 |
+
$input1['competencyRequired']['name'] = $custom_fields['saswp_eoc_c_required_name'];
|
811 |
+
$input1['competencyRequired']['inDefinedTermSet'] = $custom_fields['saswp_eoc_c_required_definedtermset'];
|
812 |
+
$input1['competencyRequired']['termCode'] = $custom_fields['saswp_eoc_c_required_term_code'];
|
813 |
+
$input1['competencyRequired']['url'] = $custom_fields['saswp_eoc_c_required_url'];
|
814 |
+
|
815 |
+
}
|
816 |
+
|
817 |
+
break;
|
818 |
+
|
819 |
+
case 'Project':
|
820 |
+
|
821 |
+
if(isset($custom_fields['saswp_project_name'])){
|
822 |
+
$input1['name'] = $custom_fields['saswp_project_name'];
|
823 |
+
}
|
824 |
+
if(isset($custom_fields['saswp_project_description'])){
|
825 |
+
$input1['description'] = $custom_fields['saswp_project_description'];
|
826 |
+
}
|
827 |
+
if(isset($custom_fields['saswp_project_url'])){
|
828 |
+
$input1['url'] = saswp_validate_url($custom_fields['saswp_project_url']);
|
829 |
+
}
|
830 |
+
if(isset($custom_fields['saswp_project_street_address'])){
|
831 |
+
$input1['address']['streetAddress'] = $custom_fields['saswp_project_street_address'];
|
832 |
+
}
|
833 |
+
if(isset($custom_fields['saswp_project_city'])){
|
834 |
+
$input1['address']['addressLocality'] = $custom_fields['saswp_project_city'];
|
835 |
+
}
|
836 |
+
if(isset($custom_fields['saswp_project_state'])){
|
837 |
+
$input1['address']['addressRegion'] = $custom_fields['saswp_project_state'];
|
838 |
+
}
|
839 |
+
if(isset($custom_fields['saswp_project_country'])){
|
840 |
+
$input1['address']['addressCountry'] = $custom_fields['saswp_project_country'];
|
841 |
+
}
|
842 |
+
if(isset($custom_fields['saswp_project_postal_code'])){
|
843 |
+
$input1['address']['postalCode'] = $custom_fields['saswp_project_postal_code'];
|
844 |
+
}
|
845 |
+
if(isset($custom_fields['saswp_project_telephone'])){
|
846 |
+
$input1['address']['telephone'] = $custom_fields['saswp_project_telephone'];
|
847 |
+
}
|
848 |
+
if(isset($custom_fields['saswp_project_email'])){
|
849 |
+
$input1['address']['email'] = $custom_fields['saswp_project_email'];
|
850 |
+
}
|
851 |
+
if(isset($custom_fields['saswp_project_logo'])){
|
852 |
+
$input1['logo'] = $custom_fields['saswp_project_logo'];
|
853 |
+
}
|
854 |
+
if(isset($custom_fields['saswp_project_image'])){
|
855 |
+
$input1['image'] = $custom_fields['saswp_project_image'];
|
856 |
+
}
|
857 |
+
if(isset($custom_fields['saswp_project_duns'])){
|
858 |
+
$input1['duns'] = $custom_fields['saswp_project_duns'];
|
859 |
+
}
|
860 |
+
if(isset($custom_fields['saswp_project_founder'])){
|
861 |
+
$input1['founder'] = $custom_fields['saswp_project_founder'];
|
862 |
+
}
|
863 |
+
if(isset($custom_fields['saswp_project_founding_date'])){
|
864 |
+
$input1['foundingDate'] = $custom_fields['saswp_project_founding_date'];
|
865 |
+
}
|
866 |
+
if(isset($custom_fields['saswp_project_qualifications'])){
|
867 |
+
$input1['hasCredential'] = $custom_fields['saswp_project_qualifications'];
|
868 |
+
}
|
869 |
+
if(isset($custom_fields['saswp_project_knows_about'])){
|
870 |
+
$input1['knowsAbout'] = $custom_fields['saswp_project_knows_about'];
|
871 |
+
}
|
872 |
+
if(isset($custom_fields['saswp_project_member_of'])){
|
873 |
+
$input1['memberOf'] = $custom_fields['saswp_project_member_of'];
|
874 |
+
}
|
875 |
+
if(isset($custom_fields['saswp_project_parent_project'])){
|
876 |
+
$input1['parentproject'] = $custom_fields['saswp_project_parent_project'];
|
877 |
+
}
|
878 |
+
|
879 |
+
$sameas = array();
|
880 |
+
if(isset($custom_fields['saswp_project_website'])){
|
881 |
+
$sameas[] = $custom_fields['saswp_project_website'];
|
882 |
+
}
|
883 |
+
if(isset($custom_fields['saswp_project_facebook'])){
|
884 |
+
$sameas[] = $custom_fields['saswp_project_facebook'];
|
885 |
+
}
|
886 |
+
if(isset($custom_fields['saswp_project_twitter'])){
|
887 |
+
$sameas[] = $custom_fields['saswp_project_twitter'];
|
888 |
+
}
|
889 |
+
if(isset($custom_fields['saswp_project_linkedin'])){
|
890 |
+
$sameas[] = $custom_fields['saswp_project_linkedin'];
|
891 |
+
}
|
892 |
+
if($sameas){
|
893 |
+
$input1['sameAs'] = $sameas;
|
894 |
+
}
|
895 |
+
|
896 |
+
if(isset($custom_fields['saswp_project_rating_value']) && isset($custom_fields['saswp_project_rating_count'])){
|
897 |
+
$input1['aggregateRating']['@type'] = 'AggregateRating';
|
898 |
+
$input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_project_rating_value'];
|
899 |
+
$input1['aggregateRating']['ratingCount'] = $custom_fields['saswp_project_rating_count'];
|
900 |
+
}
|
901 |
+
|
902 |
+
break;
|
903 |
+
|
904 |
case 'Organization':
|
905 |
|
906 |
if(isset($custom_fields['saswp_organization_name'])){
|
1976 |
|
1977 |
break;
|
1978 |
|
1979 |
+
case 'RentAction':
|
1980 |
+
|
1981 |
+
if(isset($custom_fields['saswp_rent_action_agent_name'])){
|
1982 |
+
$input1['agent']['@type'] = 'Person';
|
1983 |
+
$input1['agent']['name'] = $custom_fields['saswp_rent_action_agent_name'];
|
1984 |
+
}
|
1985 |
+
if(isset($custom_fields['saswp_rent_action_land_lord_name'])){
|
1986 |
+
$input1['landlord']['@type'] = 'Person';
|
1987 |
+
$input1['landlord']['name'] = $custom_fields['saswp_rent_action_land_lord_name'];
|
1988 |
+
}
|
1989 |
+
if(isset($custom_fields['saswp_rent_action_object_name'])){
|
1990 |
+
$input1['object']['@type'] = 'Residence';
|
1991 |
+
$input1['object']['name'] = $custom_fields['saswp_rent_action_object_name'];
|
1992 |
+
}
|
1993 |
+
|
1994 |
+
break;
|
1995 |
+
|
1996 |
case 'RealEstateListing':
|
1997 |
if(isset($custom_fields['saswp_real_estate_listing_date_posted'])){
|
1998 |
$input1['datePosted'] = $custom_fields['saswp_real_estate_listing_date_posted'];
|
2045 |
|
2046 |
break;
|
2047 |
|
2048 |
+
case 'ApartmentComplex':
|
2049 |
+
|
2050 |
+
if(isset($custom_fields['saswp_apartment_complex_name'])){
|
2051 |
+
$input1['name'] = $custom_fields['saswp_apartment_complex_name'];
|
2052 |
+
}
|
2053 |
+
if(isset($custom_fields['saswp_apartment_complex_url'])){
|
2054 |
+
$input1['url'] = saswp_validate_url($custom_fields['saswp_apartment_complex_url']);
|
2055 |
+
}
|
2056 |
+
if(isset($custom_fields['saswp_apartment_complex_description'])){
|
2057 |
+
$input1['description'] = $custom_fields['saswp_apartment_complex_description'];
|
2058 |
+
}
|
2059 |
+
if(isset($custom_fields['saswp_apartment_complex_pets_allowed'])){
|
2060 |
+
$input1['petsAllowed'] = $custom_fields['saswp_apartment_complex_pets_allowed'];
|
2061 |
+
}
|
2062 |
+
if(isset($custom_fields['saswp_apartment_complex_image'])){
|
2063 |
+
$input1['image'] = $custom_fields['saswp_apartment_complex_image'];
|
2064 |
+
}
|
2065 |
+
|
2066 |
+
$location = array();
|
2067 |
+
|
2068 |
+
if(isset($custom_fields['saswp_apartment_complex_streetaddress'])){
|
2069 |
+
|
2070 |
+
$location = array(
|
2071 |
+
'@type' => 'PostalAddress',
|
2072 |
+
'streetAddress' => $custom_fields['saswp_apartment_complex_streetaddress'],
|
2073 |
+
'addressLocality' => $custom_fields['saswp_apartment_complex_locality'],
|
2074 |
+
'addressRegion' => $custom_fields['saswp_apartment_complex_region'],
|
2075 |
+
'addressCountry' => $custom_fields['saswp_apartment_complex_country'],
|
2076 |
+
'postalCode' => $custom_fields['saswp_apartment_complex_postalcode'],
|
2077 |
+
'telephone' => $custom_fields['saswp_apartment_complex_phone'],
|
2078 |
+
);
|
2079 |
+
|
2080 |
+
|
2081 |
+
$input1['address'] = $location;
|
2082 |
+
}
|
2083 |
+
|
2084 |
+
break;
|
2085 |
+
|
2086 |
case 'PsychologicalTreatment':
|
2087 |
|
2088 |
if(isset($custom_fields['saswp_psychological_treatment_name'])){
|
3190 |
global $woocommerce;
|
3191 |
global $sd_data;
|
3192 |
|
3193 |
+
$product = wc_get_product($post_id);
|
3194 |
|
3195 |
if(is_object($product)){
|
3196 |
|
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.4
|
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,20 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
120 |
|
121 |
== Changelog ==
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
= 1.9.41.3 (20 June 2020) =
|
124 |
|
125 |
* Enhancement: Make stars color yellow as default. #1062
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.4
|
6 |
+
Stable tag: 1.9.42
|
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.42 (27 June 2020) =
|
124 |
+
|
125 |
+
* Added: Project Schema #486
|
126 |
+
* Added: ApartmentComplex Schema #787
|
127 |
+
* Added: RentAction Schema #788
|
128 |
+
* Added: HotelRoom Schema #788
|
129 |
+
* Added: Certifications/education ( EducationalOccupationalCredential ) scheme type #859
|
130 |
+
* Added: Podcast ( Audiobook, PodcastEpisode & PodcastSeasons ) Schema
|
131 |
+
* Enhancement: Rating selection in decimal number like 3.1, 3.5 etc. #782
|
132 |
+
* Fixed: Breadcrumb is not correct on category page #1056
|
133 |
+
* Fixed: Uncaught Error: Option 'ajax' is not allowed for Select2 when attached to a <select> element #1082
|
134 |
+
* Fixed: Product schema adding through the "Electro" theme on the product category pages causing error #1081
|
135 |
+
* Fixed: The text inside tag 'script type=application/ld+json' contains 'html comments' in videoObject schema #1078
|
136 |
+
|
137 |
= 1.9.41.3 (20 June 2020) =
|
138 |
|
139 |
* Enhancement: Make stars color yellow as default. #1062
|
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.42
|
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.42');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
view/schema_type.php
CHANGED
@@ -1198,6 +1198,8 @@ function saswp_schema_type_add_meta_box_save( $post_id ) {
|
|
1198 |
}
|
1199 |
if(isset($_POST['saswp_enable_speakable_schema'])){
|
1200 |
update_post_meta( $post_id, 'saswp_enable_speakable_schema', intval($_POST['saswp_enable_speakable_schema']) );
|
|
|
|
|
1201 |
}
|
1202 |
|
1203 |
if(isset($_POST['saswp_enable_append_reviews'])){
|
@@ -1208,6 +1210,8 @@ function saswp_schema_type_add_meta_box_save( $post_id ) {
|
|
1208 |
|
1209 |
if(isset($_POST['saswp_enable_itemlist_schema'])){
|
1210 |
update_post_meta( $post_id, 'saswp_enable_itemlist_schema', intval($_POST['saswp_enable_itemlist_schema']) );
|
|
|
|
|
1211 |
}
|
1212 |
|
1213 |
update_post_meta( $post_id, 'saswp_item_list_tags', sanitize_text_field($_POST['saswp_item_list_tags']) );
|
1198 |
}
|
1199 |
if(isset($_POST['saswp_enable_speakable_schema'])){
|
1200 |
update_post_meta( $post_id, 'saswp_enable_speakable_schema', intval($_POST['saswp_enable_speakable_schema']) );
|
1201 |
+
}else{
|
1202 |
+
update_post_meta( $post_id, 'saswp_enable_speakable_schema', '0' );
|
1203 |
}
|
1204 |
|
1205 |
if(isset($_POST['saswp_enable_append_reviews'])){
|
1210 |
|
1211 |
if(isset($_POST['saswp_enable_itemlist_schema'])){
|
1212 |
update_post_meta( $post_id, 'saswp_enable_itemlist_schema', intval($_POST['saswp_enable_itemlist_schema']) );
|
1213 |
+
}else{
|
1214 |
+
update_post_meta( $post_id, 'saswp_enable_itemlist_schema', '0' );
|
1215 |
}
|
1216 |
|
1217 |
update_post_meta( $post_id, 'saswp_item_list_tags', sanitize_text_field($_POST['saswp_item_list_tags']) );
|