Version Description
(15 July 2022) =
- Fixed: Need to add the atttribute to the [saswp-breadcrumbs] to remove the post/page title from the displayed breadcrumbs in frontend #1697
- Fixed: Modified data is not getting updated in EducationalOccupationalProgram Schema #1686
- Fixed: Query monitor showing a PHP warning. #1688
- Fixed: Person schema error. #1699
Download this release
Release Info
Developer | magazine3 |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.9.99 |
Comparing to | |
See all releases |
Code changes from version 1.9.98.1 to 1.9.99
- admin_section/common-function.php +9 -0
- admin_section/js/main-script.js +10 -0
- admin_section/js/main-script.min.js +1 -1
- admin_section/settings.php +15 -0
- admin_section/structure_admin.php +20 -2
- admin_section/tracking/make-better-helper.php +1 -1
- core/array-list/compatibility-list.php +7 -0
- output/compatibility.php +4 -1
- output/function.php +17 -5
- output/service.php +85 -0
- readme.txt +8 -1
- structured-data-for-wp.php +3 -3
admin_section/common-function.php
CHANGED
@@ -3033,6 +3033,7 @@ function saswp_remove_anonymous_object_filter_or_action( $tag, $class, $method,
|
|
3033 |
function saswp_get_field_note($pname){
|
3034 |
|
3035 |
$notes = array(
|
|
|
3036 |
'wpml' => saswp_t_string('Requires').' <a target="_blank" href="https://wpml.org">WPML</a>',
|
3037 |
'polylang' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/polylang/">Polylang</a>',
|
3038 |
'autolistings' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/auto-listings">Auto Listings</a>',
|
@@ -4014,6 +4015,14 @@ function saswp_get_condition_list($condition, $search = '', $saved_data = ''){
|
|
4014 |
|
4015 |
break;
|
4016 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4017 |
case "all":
|
4018 |
|
4019 |
$args = array(
|
3033 |
function saswp_get_field_note($pname){
|
3034 |
|
3035 |
$notes = array(
|
3036 |
+
'ameliabooking' => saswp_t_string('Requires').' <a target="_blank" href="https://wpamelia.com/">wpamelia</a>',
|
3037 |
'wpml' => saswp_t_string('Requires').' <a target="_blank" href="https://wpml.org">WPML</a>',
|
3038 |
'polylang' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/polylang/">Polylang</a>',
|
3039 |
'autolistings' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/auto-listings">Auto Listings</a>',
|
4015 |
|
4016 |
break;
|
4017 |
|
4018 |
+
case "author_name":
|
4019 |
+
|
4020 |
+
$authors = get_users('role=author&orderby=display_name&order=ASC');
|
4021 |
+
foreach ($authors as $author) {
|
4022 |
+
$choices[] = array('id' => $author->ID, 'text' => $author->display_name);
|
4023 |
+
}
|
4024 |
+
break;
|
4025 |
+
|
4026 |
case "all":
|
4027 |
|
4028 |
$args = array(
|
admin_section/js/main-script.js
CHANGED
@@ -2065,6 +2065,16 @@ jQuery(document).ready(function($){
|
|
2065 |
|
2066 |
break;
|
2067 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2068 |
case 'saswp-easyaccordion-checkbox':
|
2069 |
saswp_compatibliy_notes(current, id);
|
2070 |
if ($(this).is(':checked')) {
|
2065 |
|
2066 |
break;
|
2067 |
|
2068 |
+
case 'saswp-ameliabooking-checkbox':
|
2069 |
+
saswp_compatibliy_notes(current, id);
|
2070 |
+
if ($(this).is(':checked')) {
|
2071 |
+
$("#saswp-ameliabooking").val(1);
|
2072 |
+
}else{
|
2073 |
+
$("#saswp-ameliabooking").val(0);
|
2074 |
+
}
|
2075 |
+
|
2076 |
+
break;
|
2077 |
+
|
2078 |
case 'saswp-easyaccordion-checkbox':
|
2079 |
saswp_compatibliy_notes(current, id);
|
2080 |
if ($(this).is(':checked')) {
|
admin_section/js/main-script.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var saswp_attached_rv=[],saswp_attached_col=[],rmv_boolean=!1,rmv_html="";jQuery(document).ready(function(s){if(s(document).on("click","#saswp_loc_display_on_front",function(){s(this).is(":checked")?s(".saswp-front-location-inst").removeClass("saswp_hide"):s(".saswp-front-location-inst").addClass("saswp_hide")}),s(document).on("change",".saswp-collection-where",function(){s(this);var e=s(this).val();e&&function(e){e&&s.ajax({url:ajaxurl,method:"GET",data:{action:"saswp_get_select2_data",type:e,q:"",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},beforeSend:function(){},success:function(e){if(e){var a="";s.each(e,function(s,e){a+='<option value="'+e.id+'">'+e.text+"</option>"}),s(".saswp-collection-where-data").html(""),s(".saswp-collection-where-data").append(a),saswp_select2()}},error:function(s){console.log("Failed Ajax Request"),console.log(s)}})}(e)}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?(s(".saswp-coll-where").addClass("saswp_hide"),s("#saswp-motivatebox").css("display","block")):(s(".saswp-coll-where").removeClass("saswp_hide"),s("#saswp-motivatebox").css("display","none"))}).change(),s(document).on("click",".saswp-dismiss-notices",function(){var e=s(this),a=s(this).attr("notice-type");a&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_dismiss_notices",notice_type:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status&&e.parent().parent().hide()},error:function(s){console.log(s)}})}),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,c="";t>0&&(c+=t+" Reviews, "),i>0&&(c+=i+" Collection"),c||(c=0),s(".saswp-attached-rv-count").text("Attached "+c),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:15%;"><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.language+'</strong></td><td style="width:10%;"><input class="saswp-g-language-field" name="sd_data[saswp_reviews_language_name][]" type="text" value="" placeholder="nl"></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-language-field").val(),c=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(),n=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(c>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=c%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:n,reviews_api:o,location:t,language:i,blocks:c,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()}var i;if(s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);if(t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),"premium_features"!=t||"yes"!=jQuery(this).attr("data-extmgr"))return s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1;window.location.href="edit.php?post_type=saswp&page=saswp-extension-manager"}),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(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s("#saswp_location_meta_box").removeClass("saswp_hide"),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(),saswp_enable_rating_automate(),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||"Service"==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(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_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),s("#saswp_location_meta_box").removeClass("saswp_hide")),"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(),saswp_enable_rating_automate()}).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-wpzoom-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpzoom").val(1):s("#saswp-wpzoom").val(0);break;case"saswp-yotpo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yotpo").val(1):s("#saswp-yotpo").val(0);break;case"saswp-ryviu-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ryviu").val(1):s("#saswp-ryviu").val(0);break;case"saswp-ultimate-blocks-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimate-blocks").val(1):s("#saswp-ultimate-blocks").val(0);break;case"saswp-starsrating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-starsrating").val(1):s("#saswp-starsrating").val(0);break;case"saswp-wptastyrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wptastyrecipe").val(1):s("#saswp-wptastyrecipe").val(0);break;case"saswp-recipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-recipress").val(1):s("#saswp-recipress").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_remove_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_remove_cat").val(1):s("#saswp_breadcrumb_remove_cat").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?(s("#saswp_breadcrumb_schema").val(1),s("#saswp_breadcrumb_remove_cat").parent().parent().show()):(s("#saswp_breadcrumb_schema").val(0),s("#saswp_breadcrumb_remove_cat").parent().parent().hide());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(this).parent().parent().next().removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(this).parent().parent().next().addClass("saswp_hide"),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-rmprating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rmprating").val(1):s("#saswp-rmprating").val(0);break;case"saswp-ratingform-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratingform").val(1):s("#saswp-ratingform").val(0);break;case"saswp-wpdiscuz-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpdiscuz").val(1):s("#saswp-wpdiscuz").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_woocommerce_archive_checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_woocommerce_archive").val(1):s("#saswp_woocommerce_archive").val(0);break;case"saswp-wpecommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpecommerce").val(1):s("#saswp-wpecommerce").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-single-price-product-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-single-price-product").val(1),s(".saswp-single-price-opt").parent().parent().show()):(s("#saswp-single-price-product").val(0),s(".saswp-single-price-opt").parent().parent().hide());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-enfold-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-enfold").val(1):s("#saswp-enfold").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-wpqa-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpqa").val(1):s("#saswp-wpqa").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-polylang-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-polylang").val(1):s("#saswp-polylang").val(0);break;case"saswp-autolistings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-autolistings").val(1):s("#saswp-autolistings").val(0);break;case"saswp-wpml-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpml").val(1):s("#saswp-wpml").val(0);break;case"saswp-metatagmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-metatagmanager").val(1):s("#saswp-metatagmanager").val(0);break;case"saswp-slimseo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-slimseo").val(1):s("#saswp-slimseo").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-video-thumbnails-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-video-thumbnails").val(1):s("#saswp-video-thumbnails").val(0);break;case"saswp-featured-video-plus-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-featured-video-plus").val(1):s("#saswp-featured-video-plus").val(0);break;case"saswp-wp-product-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-product-review").val(1):s("#saswp-wp-product-review").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-ratency-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratency").val(1):s("#saswp-ratency").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-realestate-7-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-7").val(1):s("#saswp-realestate-7").val(0);break;case"saswp-stamped-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stamped").val(1):s("#saswp-stamped").val(0);break;case"saswp-sabaidiscuss-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-sabaidiscuss").val(1):s("#saswp-sabaidiscuss").val(0);break;case"saswp-geodirectory-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-geodirectory").val(1):s("#saswp-geodirectory").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-senseilms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-senseilms").val(1):s("#saswp-senseilms").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-full-heading-checkbox":s(this).is(":checked")?s("#saswp-full-heading").val(1):s("#saswp-full-heading").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-image-resizing-checkbox":s(this).is(":checked")?s("#saswp-image-resizing").val(1):s("#saswp-image-resizing").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-brb-checkbox":s(this).is(":checked")?s("#saswp-brb").val(1):s("#saswp-brb").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-wpreviewslider-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewslider").val(1):s("#saswp-wpreviewslider").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-cmp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cmp").val(1):s("#saswp-cmp").val(0);break;case"saswp-wpreviewpro-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewpro").val(1):s("#saswp-wpreviewpro").val(0);break;case"saswp-webstories-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webstories").val(1):s("#saswp-webstories").val(0);break;case"saswp-resized-image-folder-checkbox":var t=s("#saswp-resized-image-folder-checkbox");s(this).is(":checked")?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_create_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s("#saswp-resized-image-folder").val(1),s("#saswp-resized-image-folder-checkbox").after('<a class="saswp-clear-images button button-default">Clear Images</a>')):(t.prop("checked",!1),t.next().text(e.message),t.next().css("color","red"))},error:function(s){t.prop("checked",!1),t.next().text(s),t.next().css("color","red")}}):(s("#saswp-resized-image-folder").val(0),s(".saswp-clear-images").remove());break;case"saswp-elementor-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-elementor").val(1):s("#saswp-elementor").val(0);break;case"saswp-rannarecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rannarecipe").val(1):s("#saswp-rannarecipe").val(0);break;case"saswp-jetpackrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jetpackrecipe").val(1):s("#saswp-jetpackrecipe").val(0);break;case"saswp-quickandeasyfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-quickandeasyfaq").val(1):s("#saswp-quickandeasyfaq").val(0);break;case"saswp-ultimatefaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatefaqs").val(1):s("#saswp-ultimatefaqs").val(0);break;case"saswp-arconixfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-arconixfaq").val(1):s("#saswp-arconixfaq").val(0);break;case"saswp-faqconcertina-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqconcertina").val(1):s("#saswp-faqconcertina").val(0);break;case"saswp-wpjobmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobmanager").val(1):s("#saswp-wpjobmanager").val(0);break;case"saswp-simplejobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simplejobboard").val(1):s("#saswp-simplejobboard").val(0);break;case"saswp-wpjobopenings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobopenings").val(1):s("#saswp-wpjobopenings").val(0);break;case"saswp-webfaq10-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webfaq10").val(1):s("#saswp-webfaq10").val(0);break;case"saswp-wpfaqschemamarkup-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpfaqschemamarkup").val(1):s("#saswp-wpfaqschemamarkup").val(0);break;case"saswp-faqschemaforpost-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqschemaforpost").val(1):s("#saswp-faqschemaforpost").val(0);break;case"saswp-masteraccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-masteraccordion").val(1):s("#saswp-masteraccordion").val(0);break;case"saswp-easyfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyfaqs").val(1):s("#saswp-easyfaqs").val(0);break;case"saswp-accordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordion").val(1):s("#saswp-accordion").val(0);break;case"saswp-html5responsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-html5responsivefaq").val(1):s("#saswp-html5responsivefaq").val(0);break;case"saswp-wpresponsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresponsivefaq").val(1):s("#saswp-wpresponsivefaq").val(0);break;case"saswp-easyaccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyaccordion").val(1):s("#saswp-easyaccordion").val(0);break;case"saswp-helpiefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-helpiefaq").val(1):s("#saswp-helpiefaq").val(0);break;case"saswp-mooberrybm-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mooberrybm").val(1):s("#saswp-mooberrybm").val(0);break;case"saswp-novelist-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-novelist").val(1):s("#saswp-novelist").val(0);break;case"saswp-accordionfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordionfaq").val(1):s("#saswp-accordionfaq").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-timetable-event-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-timetable-event").val(1):s("#saswp-timetable-event").val(0);break;case"saswp-xo-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-xo-event-calendar").val(1):s("#saswp-xo-event-calendar").val(0);break;case"saswp-vs-event-list-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-vs-event-list").val(1):s("#saswp-vs-event-list").val(0);break;case"saswp-calendarize-it-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-calendarize-it").val(1):s("#saswp-calendarize-it").val(0);break;case"saswp-events-schedule-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-schedule").val(1):s("#saswp-events-schedule").val(0);break;case"saswp-woo-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-event-manager").val(1):s("#saswp-woo-event-manager").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 c="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(c='<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>'+c)}).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",tag_ID:saswp_localize_data.tag_ID,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_enable_rating_automate(),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",tag_ID:saswp_localize_data.tag_ID,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 c=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"));c=1}s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:c,schema_id:a,post_id:t,req_from:saswp_localize_data.req_from,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"),c=s("#"+i+"_addon_license_key").val();t&&i&&c?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,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&&e.days_remaining<0?(s("span.inactive_status_reviews").text("Expired"),s("span.inactive_status_reviews").css({color:"red","font-weight":"400"})):"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("span.addon-activated_reviews").css({color:"green","margin-left":"8px","font-weight":"400"}),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("span.inactive_status_"+i).text("Active"),s("span.inactive_status_"+i).css({color:"green","margin-left":"8px","font-weight":"400"}),s("span.inactive_status_"+i).removeClass("inactive_status_"+i).addClass("addon-activated_"+i)):(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),s("span.addon-activated_"+i).text("Inactive"),s("span.addon-activated_"+i).css("color","#bebfc0"),s("span.addon-activated_"+i).removeClass("addon-activated_"+i).addClass("inactive_status_"+i),s("span.limit_span").css("display","none")),a.removeClass("updating-message")},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),jQuery(document).on("click",".user_refresh_single_addon",function(s){var e=jQuery(this);s.preventDefault();var a=e.attr("add-on"),t=e.attr("remaining_days_org"),i=jQuery("#"+a+"_addon_license_key").val();document.getElementById("user_refresh_"+a).classList.add("spin");var c=new Date;var p=function(s){for(var e=s+"=",a=document.cookie.split(";"),t=0;t<a.length;t++){for(var i=a[t];" "==i.charAt(0);)i=i.substring(1,i.length);if(0==i.indexOf(e))return i.substring(e.length,i.length)}return null}("saswp_addon_refresh_check"),o=-1;if(null!=typeof(p=new Date(p))){var n=Math.abs(c.getTime()-p.getTime());o=Math.ceil(n/864e5)}var l=new Date(t),r=(n=Math.abs(l.getTime()-c.getTime()),Math.ceil(n/864e5));-1==o||o>1||r<1?(document.cookie="saswp_addon_refresh_check="+c,jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:i,license_status:"active",add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){jQuery("#"+a+"_addon_license_key_status").val(s.status),document.getElementById("user_refresh_"+a).classList.remove("spin"),e.removeClass("updating-message")},error:function(s){console.log(s)}})):(setTimeout(function(){jQuery(".dashicons").removeClass("spin")},0),p=Math.abs(p.getDate()+1)+"/"+Math.abs(p.getMonth()+1)+"/"+p.getFullYear()+" "+p.getHours()+":"+p.getMinutes()+":"+p.getSeconds(),alert("Please try after "+p))}),i=document.getElementById("activated-plugins-days_remaining"))var c=i.getAttribute("days_remaining");if(c>=0&&c<=7&&setTimeout(function(){jQuery("#refresh_license_icon_top-").trigger("click")},0),jQuery(document).on("click","#refresh_license_icon_top-",function(e){document.getElementById("refresh_license_icon_top").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on"),c=(s(this).attr("data-attr"),s(this).attr("add-onname"),s("#"+i+"_addon_license_key").val());i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_license_icon_top").classList.remove("spin");var a=e.days_remaining;a>=0&&a<=7&&s("span.saswp-addon-alert").text("expiring in "+a+" days ")}else{document.getElementsByClassName("saswp-addon-alert")[0].style.color="green",document.getElementsByClassName("renewal-license")[0].style.display="none",document.getElementById("refresh_license_icon_top").classList.remove("spin"),s("span.pro_warning").css("display","none")}}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})}),i=document.getElementById("activated-plugins-days_remaining"))c=i.getAttribute("days_remaining");if(c>=0&&c<=7&&setTimeout(function(){jQuery("#user_refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#user_refresh_expired_addon-",function(e){document.getElementById("user_refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on"),c=(s(this).attr("data-attr"),s(this).attr("add-onname"),s("#"+i+"_addon_license_key").val());i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("user_refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?(s("span#exp").text("Expired"),location.reload()):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),i=document.getElementById("activated-plugins-days_remaining"))c=i.getAttribute("days_remaining");setTimeout(function(){jQuery("#refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#refresh_expired_addon-",function(e){document.getElementById("refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on"),c=(s(this).attr("data-attr"),s(this).attr("add-onname"),s("#"+i+"_addon_license_key").val());i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?s("span#exp").text("Expired"):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_expired_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})}),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();""!=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(),saswp_enable_rating_automate()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide();var p=window.location.hash;if("#saswp-default-container"==p?s(".saswp-global-container:eq(2)").show():"#saswp-knowledge-container"==p?s(".saswp-global-container:eq(1)").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-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"),c=s(this).attr("div_type"),p=s(this).attr("itemlist_sub_type"),o=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div:nth-child("+o+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,c,t,i+"_",p)}),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(),c="",p=a.toLowerCase()+"_"+i,o="saswp_fixed_image["+i+"]";"manual_text"==t?(c+='<td><textarea cols="35" rows="2" name="saswp_fixed_text['+i+']"></textarea></td>',c+='<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(c),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(c+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),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,c+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2())},"json"):"custom_field"==t?(c+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',c+="</select></td>",c+='<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(c),saswpCustomSelect2()):"fixed_image"==t?(c+="<td>",c+="<fieldset>",c+='<input data-id="media" style="width: 30%;" class="button" id="'+p+'_button" name="'+p+'_button" type="button" value="Upload" />',c+='<input type="hidden" data-id="'+p+'_height" class="upload-height" name="'+o+'[height]" id="'+p+'_height" value="">',c+='<input type="hidden" data-id="'+p+'_width" class="upload-width" name="'+o+'[width]" id="'+p+'_width" value="">',c+='<input type="hidden" data-id="'+p+'_thumbnail" class="upload-thumbnail" name="'+o+'[thumbnail]" id="'+p+'_thumbnail" value="">',c+='<div class="saswp_image_div_'+p+'">',c+="</div>",c+="</fieldset>",c+="</td>",c+='<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(c),saswpCustomSelect2()):(c+="<td></td>",c+='<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(c),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 c=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:c,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(),saswp_enable_rating_automate(),saswp_enable_rating_automate(),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 o='<div class="saswp-custom-post-tab">';o+='<div style="display:none;" id="saswp-accept-reviews-popup">',o+='<div class="saswp-accept-rv-container">',o+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",o+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',o+='<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>',o+='<p><strong>Note:</strong> To enable google reCAPTCHA v2 add SITE KEY & SECRET KEY respectively as parameters in above shortcode. Eg <input value="[saswp-reviews-form site_key="your key" secret_key="your key"]" type="text" readonly>. To get keys <a target="_blank" href="https://www.google.com/recaptcha/admin/create">Click here.</a> You must choose reCAPTCHA type v2 </p>',o+="</div>",o+="</div>",o+='<h2 class="nav-tab-wrapper">',o+="<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>',o+="<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>',o+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',o+="</h2>",o+="</div>",jQuery(jQuery(".wrap")).prepend(o)}jQuery(document).on("click",".saswp-clear-images",function(e){e.preventDefault();var a=s(this);1==confirm("Are you sure? It will remove all the resized images")&&(a.addClass("updating-message"),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_clear_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){a.removeClass("updating-message"),"t"!=s.status&&alert("something went wrong")},error:function(s){console.log(s)}}))}),"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({spacing:"5px",rtl:saswp_localize_data.is_rtl,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-add-rv-btn",function(){s(".saswp-dynamic-platforms").toggle()}),s(".saswp-rmv-coll-rv").on("click",function(){if(rmv_boolean=!rmv_boolean,saswp_on_collection_design_change(),jQuery(jQuery(".saswp-add-dynamic-section")).remove(),rmv_boolean){var s="";s+='<div class="saswp-add-dynamic-section">',s+='<div class="saswp-add-dynamic-btn">',s+='<span class="dashicons dashicons-plus-alt saswp-add-rv-btn"></span>',s+="</div>",s+='<div class="saswp-dynamic-platforms" style="display:none;">',s+='<select name="saswp_dynamic_platforms" id="saswp_dynamic_platforms"><option value="">Choose Platform</option>'+jQuery("#saswp-plaftorm-list").html()+"</select>",s+="</div>",s+="</div>",jQuery(jQuery(".saswp-collection-preview")[0]).after(s)}}),s(document).on("change","#saswp_dynamic_platforms",function(){var e=s(this).val();s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after('<select id="saswp_dynamic_reviews_list"></select><a class="button button-default saswp-add-single-rv">Add</a>');var a=ajaxurl+"?action=saswp_add_reviews_to_select2&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&platform_id="+e;s("#saswp_dynamic_reviews_list").select2({ajax:{url:a,dataType:"json",processResults:function(s){if(s.status)return{results:s.message}}}})}),s(document).on("click",".saswp-add-single-rv",function(e){e.preventDefault();var a=s("#saswp_dynamic_reviews_list").val(),t=s("#saswp_dynamic_platforms").val();a&&saswp_get_collection_data(null,t,null,a,!0)}),s(document).on("click",".saswp-remove-coll-rv",function(){var e=s(this).attr("data-id"),a=s(this).attr("platform-id");if(a){var t=saswp_collection[a].filter(function(s){return s.saswp_review_id!=e});saswp_collection[a]=t,saswp_on_collection_design_change()}}),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(),a=s(".saswp-collection-sorting").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),s(".saswp-rmv-coll-rv").hide(),s(".saswp-add-dynamic-section").hide(),"grid"==e&&(s(".saswp-grid-options").removeClass("saswp_hide"),s(".saswp-rmv-coll-rv").show(),s(".saswp-add-dynamic-section").show()),"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"),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide"),"recent"==a?(s("#saswp_collection_specific_rating").parent().parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")):(s("#saswp_collection_specific_rating").parent().parent().addClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")),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,null)):alert("Enter Count")});var n,l,r=s("#saswp_total_reviews_list").val();r&&saswp_get_collection_data(null,null,null,null,r),(n=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",n.innerHTML="Copied!",document.body.appendChild(n);var w=document.getElementById("saswp-motivatebox");w&&w.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(l),n.style.left=e.pageX-10+"px",n.style.top=e.pageY+15+"px",n.style.opacity=1,l=setTimeout(function(){n.style.opacity=0},500)}(s))},!1)});
|
1 |
+
var saswp_attached_rv=[],saswp_attached_col=[],rmv_boolean=!1,rmv_html="";jQuery(document).ready(function($){if($(document).on("click","#saswp_loc_display_on_front",function(){$(this).is(":checked")?$(".saswp-front-location-inst").removeClass("saswp_hide"):$(".saswp-front-location-inst").addClass("saswp_hide")}),$(document).on("change",".saswp-collection-where",function(){$(this);var a,b=$(this).val();b&&(a=b)&&$.ajax({url:ajaxurl,method:"GET",data:{action:"saswp_get_select2_data",type:a,q:"",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},beforeSend:function(){},success:function(a){if(a){var b="";$.each(a,function(c,a){b+='<option value="'+a.id+'">'+a.text+"</option>"}),$(".saswp-collection-where-data").html(""),$(".saswp-collection-where-data").append(b),saswp_select2()}},error:function(a){console.log("Failed Ajax Request"),console.log(a)}})}),$(".saswp-collection-display-method").change(function(){"shortcode"==$(this).val()?($(".saswp-coll-where").addClass("saswp_hide"),$("#saswp-motivatebox").css("display","block")):($(".saswp-coll-where").removeClass("saswp_hide"),$("#saswp-motivatebox").css("display","none"))}).change(),$(document).on("click",".saswp-dismiss-notices",function(){var b=$(this),a=$(this).attr("notice-type");a&&$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_dismiss_notices",notice_type:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){"t"==a.status&&b.parent().parent().hide()},error:function(a){console.log(a)}})}),saswp_select2(),$(".saswp-upgrade-to-pro").parent().attr({href:"https://structured-data-for-wp.com/pricing/",target:"_blank"}),$(document).on("click",".saswp-attach-reviews",function(){$(".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"),$(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),$(".saswp-attached-rv-count").show()):$(".saswp-attached-rv-count").hide()}),$(".close-attached-reviews-popup").on("click",function(){$("#TB_closeWindowButton").trigger("click")}),$("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse($("#saswp_attahced_reviews").val())),$("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse($("#saswp_attached_collection").val())),$(document).on("click",".saswp-attach-rv-checkbox",function(){var a=null;a=parseInt($(this).parent().attr("data-id"));var c=$(this).parent().attr("data-type");$(this).is(":checked")?("review"==c&&saswp_attached_rv.push(a),"collection"==c&&saswp_attached_col.push(a)):("review"==c&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(a),1),"collection"==c&&saswp_attached_col.splice(saswp_attached_col.indexOf(a),1));var d=saswp_attached_rv.length,e=saswp_attached_col.length,b="";d>0&&(b+=d+" Reviews, "),e>0&&(b+=e+" Collection"),b||(b=0),$(".saswp-attached-rv-count").text("Attached "+b),$("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),$("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),$(".saswp-load-more-rv").on("click",function(c){var a=$(this).attr("data-type"),b=$(".saswp-add-rv-loop[data-type="+a+"]").length;$("#saswp-add-rv-automatic .spinner").addClass("is-active"),c.preventDefault(),$.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:b,paged:b/10+1,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(b){if("t"==b.status){var c="";b.result&&($.each(b.result,function(e,b){var d="";"review"==a&&saswp_attached_rv.includes(parseInt(b.saswp_review_id))&&(d="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(b.saswp_review_id))&&(d="checked"),c+='<div class="saswp-add-rv-loop" data-type="'+a+'" data-id="'+b.saswp_review_id+'">',"review"==a&&(c+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+d+"> <strong> "+b.saswp_reviewer_name+" ( Rating - "+b.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+b.saswp_review_platform_icon+'"/></span></strong>'),"collection"==a&&(c+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+d+"> <strong> "+b.saswp_reviewer_name+" </strong>"),c+="</div>"}),$(".saswp-add-rv-automatic-list[data-type="+a+"]").append(c)),b.message&&($(".saswp-rv-not-found[data-type="+a+"]").removeClass("saswp_hide"),$(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"))}else alert(b.message);$("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),$(".saswp-modify-schema-toggle").click(function(b){b.preventDefault(),$(".saswp-modify-container").slideToggle("300");var a=$("#saswp_enable_custom_field"),c=a.val();a.val("1"===c?"0":"1"),$(".saswp-enable-modify-schema-output").change()}),$(".saswp-enable-itemlist").change(function(){$(this).is(":checked")?($("#saswp_item_list_tags").show(),$(".saspw-item-list-note").show(),"custom"==$("#saswp_item_list_tags").val()?$("#saswp_item_list_custom").show():$("#saswp_item_list_custom").hide()):($(".saspw-item-list-note").hide(),$("#saswp_item_list_tags").hide(),$("#saswp_item_list_custom").hide())}),$("#saswp_item_list_tags").change(function(){"custom"==$(this).val()?$("#saswp_item_list_custom").show():$("#saswp_item_list_custom").hide()}),$(document).on("click",".saswp-add-g-location-btn",function(c){var a="";a=$("#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">',c.preventDefault();var b="";(b+='<tr><td style="width:12%;"><strong>'+saswp_localize_data.translable_txt.place_id+'</strong></td><td style="width:15%;"><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.language+'</strong></td><td style="width:10%;"><input class="saswp-g-language-field" name="sd_data[saswp_reviews_language_name][]" type="text" value="" placeholder="nl"></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>')&&$(".saswp-g-reviews-settings-table").append(b)}),$(document).on("click",".saswp-fetch-g-reviews",function(){var a=$(this),f="free";a.addClass("updating-message");var b=$(this).parent().parent().find(".saswp-g-location-field").val(),g=$(this).parent().parent().find(".saswp-g-language-field").val(),c=$(this).parent().parent().find(".saswp-g-blocks-field").val(),d=$("#saswp_google_place_api_key").val(),e=$("#reviews_addon_license_key").val(),h=$("#reviews_addon_license_key_status").val();if("premium"==(f=$("#saswp_google_place_api_key").length?"free":"premium")){if(!(c>0))return alert(saswp_localize_data.translable_txt.blocks_zero),a.removeClass("updating-message"),!1;if(0!=c%10)return a.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),a.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),a.removeClass("updating-message"),!1}""!=b&&(e||d)?$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:h,reviews_api:e,location:b,language:g,blocks:c,g_api:d,premium_status:f,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(b){"t"==b.status?(a.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),a.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(a.parent().parent().find(".saswp-rv-fetched-msg").text(b.message),a.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),a.removeClass("updating-message")},error:function(a){console.log(a)}}):(""==b&&alert(saswp_localize_data.translable_txt.enter_place_id),""==d&&alert(saswp_localize_data.translable_txt.enter_api_key),""==e&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),a.removeClass("updating-message"))}),saswp_localize_data.do_tour){var f,k,g,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>",$(document).on("submit","#saswp-news-letter-form",function(b){b.preventDefault();var a=$(this),c=a.find('input[name="saswp_subscriber_name"]').val(),d=a.find('input[name="saswp_subscriber_email"]').val();website=a.find('input[name="saswp_subscriber_website"]').val(),$.post(saswp_localize_data.ajax_url,{action:"saswp_subscribe_to_news_letter",saswp_security_nonce:saswp_localize_data.saswp_security_nonce,name:c,email:d,website:website},function(a){a?"Some fields are missing."==a?($("#saswp-news-letter-status").text(""),$("#saswp-news-letter-status").css("color","red")):"Invalid email address."==a?($("#saswp-news-letter-status").text(""),$("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==a?($("#saswp-news-letter-status").text(""),$("#saswp-news-letter-status").css("color","red")):"Already subscribed."==a?($("#saswp-news-letter-status").text(""),$("#saswp-news-letter-status").css("color","red")):($("#saswp-news-letter-status").text("You're subscribed!"),$("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var e={content:a,position:{edge:"top",align:"left"}};e=$.extend(e,{buttons:function(a,b){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(){b.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){b.element.pointer("close")},3e3)}),button},close:function(){$.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(b,a){a.pointer.css({left:"170px",top:"160px"})}}),g=function(){$(saswp_localize_data.displayID).pointer(e).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(){$.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},e.position&&e.position.defer_loading?$(window).bind("load.wp-pointers",g):g()}$(".saswp-tabs a").click(function(c){var b=$(this).attr("href"),a=getParameterByName("tab",b);if(a||(a="general"),$(this).siblings().removeClass("nav-tab-active"),$(this).addClass("nav-tab-active"),"premium_features"!=a||"yes"!=jQuery(this).attr("data-extmgr"))return $(".form-wrap").find(".saswp-"+a).siblings().hide(),$(".form-wrap .saswp-"+a).show(),window.history.pushState("","",b),!1;window.location.href="edit.php?post_type=saswp&page=saswp-extension-manager"}),$(".saswp-schame-type-select").select2(),$(".saswp-schame-type-select").change(function(b){b.preventDefault(),$(".saswp-custom-fields-table").html("");var a=$(this).val();$(".saswp-option-table-class tr").each(function(a,b){a>0&&$(this).hide()}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?$(".saswp-enable-speakable").parent().parent().show():$(".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?$(".saswp-enable-append-reviews").parent().parent().show():$(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?$(".saswp-enable-markup-class").parent().parent().show():$(".saswp-enable-markup-class").parent().parent().hide(),$("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&($("#saswp_location_meta_box").removeClass("saswp_hide"),$(".saswp-option-table-class tr").eq(1).show(),$(".saswp-business-text-field-tr").show(),$(".saswp-option-table-class tr").find("select").attr("disabled",!1),$(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&($(".saswp-service-text-field-tr").show(),$(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&($(".saswp-event-text-field-tr").show(),$(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==a&&($(".saswp-review-text-field-tr").show(),$(".saswp-option-table-class tr").find("select").attr("disabled",!1),$(".saswp-item-reivewed-list").change()),"ItemList"==a?($(".saswp-schema-modify-section").hide(),$(".saswp-itemlist-text-field-tr").show(),$(".saswp-option-table-class tr").find("select").attr("disabled",!1),$(".saswp-itemlist-item-type-list").change()):$(".saswp-schema-modify-section").show(),saswp_enable_rating_review(),saswp_enable_rating_automate(),$(".saswp-manual-modification").html(""),$(".saswp-static-container .spinner").addClass("is-active"),$.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(a){$(".saswp-static-container .spinner").removeClass("is-active"),$(".saswp-manual-modification").append(a),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a||"Service"==a?$(".saswp-enable-modify-schema").show():($(".saswp-enable-modify-schema-output").val("automatic"),$(".saswp-enable-modify-schema-output").change(),$(".saswp-enable-modify-schema").hide())}),$("#saswp_business_type").select2(),$(".saswp-local-sub-type-2").select2(),$("#saswp_business_type").change(function(){var b=$(this).val(),a=$(".saswp-schame-type-select").val();$(".saswp-option-table-class tr").each(function(a,b){a>1&&($(this).hide(),$(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?$(".saswp-enable-speakable").parent().parent().show():$(".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?$(".saswp-enable-append-reviews").parent().parent().show():$(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?$(".saswp-enable-markup-class").parent().parent().show():$(".saswp-enable-markup-class").parent().parent().hide(),$("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&($(".saswp-"+b+"-tr").show(),$(".saswp-business-text-field-tr").show(),$(".saswp-"+b+"-tr").find("select").attr("disabled",!1),$("#saswp_location_meta_box").removeClass("saswp_hide")),"Review"==a&&($(".saswp-review-text-field-tr").show(),$(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"ItemList"==a?($(".saswp-schema-modify-section").hide(),$(".saswp-itemlist-text-field-tr").show(),$(".saswp-option-table-class tr").find("select").attr("disabled",!1)):$(".saswp-schema-modify-section").show(),"Event"==a&&($(".saswp-event-text-field-tr").show(),$(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate()}).change(),$(".saswp-checkbox").change(function(){var a=$(this).attr("id"),b=$(this);switch(a){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-the-seo-framework").val(1):$("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-seo-press").val(1):$("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-aiosp").val(1):$("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-smart-crawl").val(1):$("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-squirrly-seo").val(1):$("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wp-recipe-maker").val(1):$("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpzoom-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpzoom").val(1):$("#saswp-wpzoom").val(0);break;case"saswp-yotpo-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-yotpo").val(1):$("#saswp-yotpo").val(0);break;case"saswp-ryviu-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-ryviu").val(1):$("#saswp-ryviu").val(0);break;case"saswp-ultimate-blocks-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-ultimate-blocks").val(1):$("#saswp-ultimate-blocks").val(0);break;case"saswp-starsrating-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-starsrating").val(1):$("#saswp-starsrating").val(0);break;case"saswp-wptastyrecipe-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wptastyrecipe").val(1):$("#saswp-wptastyrecipe").val(0);break;case"saswp-recipress-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-recipress").val(1):$("#saswp-recipress").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wp-ultimate-recipe").val(1):$("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-zip-recipes").val(1):$("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-mediavine-create").val(1):$("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-ht-recipes").val(1):$("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpsso-core").val(1):$("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":$(this).is(":checked")?$("#saswp-for-wordpress").val(1):$("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":$(this).is(":checked")?$("#saswp-for-amp").val(1):$("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":$(this).is(":checked")?($("#saswp_kb_contact_1").val(1),$("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):($("#saswp_kb_contact_1").val(0),$("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":$(this).is(":checked")?($("#saswp-logo-dimensions").val(1),$("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):($("#saswp-logo-dimensions").val(0),$("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":$(this).is(":checked")?($("#saswp_archive_schema").val(1),$(".saswp_archive_schema_type_class").parent().parent().show()):($("#saswp_archive_schema").val(0),$(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":$(this).is(":checked")?($("#saswp_website_schema").val(1),$("#saswp_search_box_schema").parent().parent().show()):($("#saswp_website_schema").val(0),$("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":$(this).is(":checked")?$("#saswp_search_box_schema").val(1):$("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_remove_cat_checkbox":$(this).is(":checked")?$("#saswp_breadcrumb_remove_cat").val(1):$("#saswp_breadcrumb_remove_cat").val(0);break;case"saswp_breadcrumb_schema_checkbox":$(this).is(":checked")?($("#saswp_breadcrumb_schema").val(1),$("#saswp_breadcrumb_remove_cat").parent().parent().show()):($("#saswp_breadcrumb_schema").val(0),$("#saswp_breadcrumb_remove_cat").parent().parent().hide());break;case"saswp_comments_schema_checkbox":$(this).is(":checked")?$("#saswp_comments_schema").val(1):$("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":$(this).is(":checked")?$("#saswp-flexmlx-compativility").val(1):$("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":$(this).is(":checked")?$("#saswp-review-module").val(1):$("#saswp-review-module").val(0);break;case"saswp-stars-rating-checkbox":$(this).is(":checked")?($(".saswp-stars-post-table").removeClass("saswp_hide"),$(this).parent().parent().next().removeClass("saswp_hide"),$("#saswp-stars-rating").val(1)):($(this).parent().parent().next().addClass("saswp_hide"),$(".saswp-stars-post-table").addClass("saswp_hide"),$("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-kk-star-raring").val(1):$("#saswp-kk-star-raring").val(0);break;case"saswp-rmprating-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-rmprating").val(1):$("#saswp-rmprating").val(0);break;case"saswp-ratingform-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-ratingform").val(1):$("#saswp-ratingform").val(0);break;case"saswp-wpdiscuz-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpdiscuz").val(1):$("#saswp-wpdiscuz").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-yet-another-stars-rating").val(1):$("#saswp-yet-another-stars-rating").val(0);break;case"saswp-simple-author-box-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-simple-author-box").val(1):$("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-woocommerce").val(1):$("#saswp-woocommerce").val(0);break;case"saswp_woocommerce_archive_checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp_woocommerce_archive").val(1):$("#saswp_woocommerce_archive").val(0);break;case"saswp-wpecommerce-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpecommerce").val(1):$("#saswp-wpecommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp_default_review").val(1):$("#saswp_default_review").val(0);break;case"saswp-single-price-product-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?($("#saswp-single-price-product").val(1),$(".saswp-single-price-opt").parent().parent().show()):($("#saswp-single-price-product").val(0),$(".saswp-single-price-opt").parent().parent().hide());break;case"saswp-extra-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-extra").val(1):$("#saswp-extra").val(0);break;case"saswp-enfold-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-enfold").val(1):$("#saswp-enfold").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-soledad").val(1):$("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wp-theme-reviews").val(1):$("#saswp-wp-theme-reviews").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-dw-question-answer").val(1):$("#saswp-dw-question-answer").val(0);break;case"saswp-wpqa-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpqa").val(1):$("#saswp-wpqa").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wp-job-manager").val(1):$("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-yoast").val(1):$("#saswp-yoast").val(0);break;case"saswp-polylang-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-polylang").val(1):$("#saswp-polylang").val(0);break;case"saswp-autolistings-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-autolistings").val(1):$("#saswp-autolistings").val(0);break;case"saswp-wpml-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpml").val(1):$("#saswp-wpml").val(0);break;case"saswp-metatagmanager-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-metatagmanager").val(1):$("#saswp-metatagmanager").val(0);break;case"saswp-slimseo-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-slimseo").val(1):$("#saswp-slimseo").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-rankmath").val(1):$("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-taqyeem").val(1):$("#saswp-taqyeem").val(0);break;case"saswp-video-thumbnails-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-video-thumbnails").val(1):$("#saswp-video-thumbnails").val(0);break;case"saswp-featured-video-plus-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-featured-video-plus").val(1):$("#saswp-featured-video-plus").val(0);break;case"saswp-wp-product-review-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wp-product-review").val(1):$("#saswp-wp-product-review").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-the-events-calendar").val(1):$("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-homeland").val(1):$("#saswp-homeland").val(0);break;case"saswp-ratency-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-ratency").val(1):$("#saswp-ratency").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpresidence").val(1):$("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-myhome").val(1):$("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-realestate-5").val(1):$("#saswp-realestate-5").val(0);break;case"saswp-realestate-7-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-realestate-7").val(1):$("#saswp-realestate-7").val(0);break;case"saswp-stamped-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-stamped").val(1):$("#saswp-stamped").val(0);break;case"saswp-sabaidiscuss-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-sabaidiscuss").val(1):$("#saswp-sabaidiscuss").val(0);break;case"saswp-geodirectory-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-geodirectory").val(1):$("#saswp-geodirectory").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-classipress").val(1):$("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-realhomes").val(1):$("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-learn-press").val(1):$("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wplms").val(1):$("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-learn-dash").val(1):$("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-lifter-lms").val(1):$("#saswp-lifter-lms").val(0);break;case"saswp-senseilms-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-senseilms").val(1):$("#saswp-senseilms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wp-event-manager").val(1):$("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-events-manager").val(1):$("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-event-calendar-wd").val(1):$("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-event-organiser").val(1):$("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-modern-events-calendar").val(1):$("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?($("#saswp-woocommerce-booking").val(1),$("#saswp-woocommerce-booking-main").val(1)):($("#saswp-woocommerce-booking").val(0),$("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?($("#saswp-woocommerce-booking-main").val(1),$("#saswp-woocommerce-booking").val(1)):($("#saswp-woocommerce-booking-main").val(0),$("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-woocommerce-membership").val(1):$("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":$(this).is(":checked")?$("#saswp-defragment").val(1):$("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-cooked").val(1):$("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-flexmlx-compativility").val(1):$("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?($("#saswp-shopper-approved-review").val(1),$(".saswp-s-reviews-settings-table").parent().parent().parent().show()):($("#saswp-shopper-approved-review").val(0),$(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":$(this).is(":checked")?($("#saswp-google-review").val(1),$("#saswp-google-rv-free-checkbox").length?($("#saswp-google-review-free").parent().parent().show(),$("#saswp-google-rv-free-checkbox").is(":checked")?$("#saswp_google_place_api_key").parent().parent().show():$("#saswp_google_place_api_key").parent().parent().hide()):$("#saswp_google_place_api_key").parent().parent().show(),$(".saswp-g-reviews-settings-table").parent().parent().parent().show()):($("#saswp-google-review").val(0),$("#saswp_google_place_api_key").parent().parent().hide(),$(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),$("#saswp-google-rv-free-checkbox").length&&$("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":$("#saswp-google-review-checkbox").is(":checked")&&$(this).is(":checked")?($("#saswp-google-review-free").val(1),$("#saswp_google_place_api_key").parent().parent().show()):($("#saswp-google-review-free").val(0),$("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":$(this).is(":checked")?$("#saswp-markup-footer").val(1):$("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":$(this).is(":checked")?$("#saswp-pretty-print").val(1):$("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wppostratings-raring").val(1):$("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-bbpress").val(1):$("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":$(this).is(":checked")?$("#saswp-microdata-cleanup").val(1):$("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":$(this).is(":checked")?$("#saswp-other-images").val(1):$("#saswp-other-images").val(0);break;case"saswp-full-heading-checkbox":$(this).is(":checked")?$("#saswp-full-heading").val(1):$("#saswp-full-heading").val(0);break;case"saswp-rss-feed-image-checkbox":$(this).is(":checked")?$("#saswp-rss-feed-image").val(1):$("#saswp-rss-feed-image").val(0);break;case"saswp-image-resizing-checkbox":$(this).is(":checked")?$("#saswp-image-resizing").val(1):$("#saswp-image-resizing").val(0);break;case"saswp-multiple-size-image-checkbox":$(this).is(":checked")?$("#saswp-multiple-size-image").val(1):$("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":$(this).is(":checked")?$("#saswp-easy-testimonials").val(1):$("#saswp-easy-testimonials").val(0);break;case"saswp-brb-checkbox":$(this).is(":checked")?$("#saswp-brb").val(1):$("#saswp-brb").val(0);break;case"saswp-testimonial-pro-checkbox":$(this).is(":checked")?$("#saswp-testimonial-pro").val(1):$("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":$(this).is(":checked")?$("#saswp-bne-testimonials").val(1):$("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-ampforwp").val(1):$("#saswp-ampforwp").val(0);break;case"saswp-wpreviewslider-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpreviewslider").val(1):$("#saswp-wpreviewslider").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-ampbyautomatic").val(1):$("#saswp-ampbyautomatic").val(0);break;case"saswp-cmp-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-cmp").val(1):$("#saswp-cmp").val(0);break;case"saswp-wpreviewpro-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpreviewpro").val(1):$("#saswp-wpreviewpro").val(0);break;case"saswp-webstories-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-webstories").val(1):$("#saswp-webstories").val(0);break;case"saswp-resized-image-folder-checkbox":var c=$("#saswp-resized-image-folder-checkbox");$(this).is(":checked")?$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_create_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){"t"==a.status?($("#saswp-resized-image-folder").val(1),$("#saswp-resized-image-folder-checkbox").after('<a class="saswp-clear-images button button-default">Clear Images</a>')):(c.prop("checked",!1),c.next().text(a.message),c.next().css("color","red"))},error:function(a){c.prop("checked",!1),c.next().text(a),c.next().css("color","red")}}):($("#saswp-resized-image-folder").val(0),$(".saswp-clear-images").remove());break;case"saswp-elementor-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-elementor").val(1):$("#saswp-elementor").val(0);break;case"saswp-rannarecipe-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-rannarecipe").val(1):$("#saswp-rannarecipe").val(0);break;case"saswp-jetpackrecipe-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-jetpackrecipe").val(1):$("#saswp-jetpackrecipe").val(0);break;case"saswp-quickandeasyfaq-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-quickandeasyfaq").val(1):$("#saswp-quickandeasyfaq").val(0);break;case"saswp-ultimatefaqs-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-ultimatefaqs").val(1):$("#saswp-ultimatefaqs").val(0);break;case"saswp-arconixfaq-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-arconixfaq").val(1):$("#saswp-arconixfaq").val(0);break;case"saswp-faqconcertina-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-faqconcertina").val(1):$("#saswp-faqconcertina").val(0);break;case"saswp-wpjobmanager-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpjobmanager").val(1):$("#saswp-wpjobmanager").val(0);break;case"saswp-simplejobboard-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-simplejobboard").val(1):$("#saswp-simplejobboard").val(0);break;case"saswp-wpjobopenings-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpjobopenings").val(1):$("#saswp-wpjobopenings").val(0);break;case"saswp-webfaq10-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-webfaq10").val(1):$("#saswp-webfaq10").val(0);break;case"saswp-wpfaqschemamarkup-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpfaqschemamarkup").val(1):$("#saswp-wpfaqschemamarkup").val(0);break;case"saswp-faqschemaforpost-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-faqschemaforpost").val(1):$("#saswp-faqschemaforpost").val(0);break;case"saswp-masteraccordion-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-masteraccordion").val(1):$("#saswp-masteraccordion").val(0);break;case"saswp-easyfaqs-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-easyfaqs").val(1):$("#saswp-easyfaqs").val(0);break;case"saswp-accordion-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-accordion").val(1):$("#saswp-accordion").val(0);break;case"saswp-html5responsivefaq-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-html5responsivefaq").val(1):$("#saswp-html5responsivefaq").val(0);break;case"saswp-wpresponsivefaq-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpresponsivefaq").val(1):$("#saswp-wpresponsivefaq").val(0);break;case"saswp-ameliabooking-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-ameliabooking").val(1):$("#saswp-ameliabooking").val(0);break;case"saswp-easyaccordion-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-easyaccordion").val(1):$("#saswp-easyaccordion").val(0);break;case"saswp-helpiefaq-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-helpiefaq").val(1):$("#saswp-helpiefaq").val(0);break;case"saswp-mooberrybm-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-mooberrybm").val(1):$("#saswp-mooberrybm").val(0);break;case"saswp-novelist-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-novelist").val(1):$("#saswp-novelist").val(0);break;case"saswp-accordionfaq-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-accordionfaq").val(1):$("#saswp-accordionfaq").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-schemaforfaqs").val(1):$("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wp-customer-reviews").val(1):$("#saswp-wp-customer-reviews").val(0);break;case"saswp-total-recipe-generator-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-total-recipe-generator").val(1):$("#saswp-total-recipe-generator").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wordpress-news").val(1):$("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-ampwp").val(1):$("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wp-event-aggregator").val(1):$("#saswp-wp-event-aggregator").val(0);break;case"saswp-timetable-event-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-timetable-event").val(1):$("#saswp-timetable-event").val(0);break;case"saswp-xo-event-calendar-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-xo-event-calendar").val(1):$("#saswp-xo-event-calendar").val(0);break;case"saswp-vs-event-list-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-vs-event-list").val(1):$("#saswp-vs-event-list").val(0);break;case"saswp-calendarize-it-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-calendarize-it").val(1):$("#saswp-calendarize-it").val(0);break;case"saswp-events-schedule-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-events-schedule").val(1):$("#saswp-events-schedule").val(0);break;case"saswp-woo-event-manager-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-woo-event-manager").val(1):$("#saswp-woo-event-manager").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-stachethemes-event-calendar").val(1):$("#saswp-stachethemes-event-calendar").val(0);break;case"saswp-all-in-one-event-calendar-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-all-in-one-event-calendar").val(1):$("#saswp-all-in-one-event-calendar").val(0);break;case"saswp-event-on-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-event-on").val(1):$("#saswp-event-on").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-easy-recipe").val(1):$("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-tevolution-events").val(1):$("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-strong-testimonials").val(1):$("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wordlift").val(1):$("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-betteramp").val(1):$("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(b,a),$(this).is(":checked")?$("#saswp-wpamp").val(1):$("#saswp-wpamp").val(0)}}).change(),$("#saswp_kb_type").change(function(){var a=$(this).val();$(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),$(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),$("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==a&&($(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),$(".saswp_person_fields").parent().parent().addClass("saswp_hide"),$(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),$("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==a&&($(".saswp_org_fields").parent().parent().addClass("saswp_hide"),$(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),$(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),$("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),$(document).on("click","input[data-id=media]",function(a){a.preventDefault();var b=$(this),c=b.attr("id").replace("_button",""),d=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var a=d.state().get("selection").first().toJSON();$("#"+c).val(a.url),$("input[data-id='"+c+"_id']").val(a.id),$("input[data-id='"+c+"_height']").val(a.height),$("input[data-id='"+c+"_width']").val(a.width),$("input[data-id='"+c+"_thumbnail']").val(a.url),"sd_default_image_button"===b.attr("id")&&($("#sd_default_image_width").val(a.width),$("#sd_default_image_height").val(a.height));var e="";"saswp_image_div_"+c=="saswp_image_div_sd_default_image"&&a.height<1200&&(e='<p class="saswp_warning">Image size is smaller than recommended size</p>'),$(".saswp_image_div_"+c).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+a.url+'"/><a data-id="'+c+'" href="#" class="saswp_prev_close">X</a></div>'+e)}).open()}),$(document).on("click",".saswp_prev_close",function(b){b.preventDefault();var a=$(this).attr("data-id");$(this).parent().remove(),$("#"+a).val(""),$("input[data-id='"+a+"_id']").val(""),$("input[data-id='"+a+"_height']").val(""),$("input[data-id='"+a+"_width']").val(""),$("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&($("#sd_default_image_width").val(""),$("#sd_default_image_height").val(""))}),$(document).on("click",".saswp-modify-schema",function(a){a.preventDefault();var b=$(this).attr("schema-id"),c=$(this);c.addClass("updating-message"),$.get(ajaxurl,{action:"saswp_modify_schema_post_enable",tag_ID:saswp_localize_data.tag_ID,schema_id:b,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){$(".saswp-post-specific-wrapper[data-id="+b+"] .saswp-post-specific-setting").after(a),$(".saswp_modify_this_schema_hidden_"+b).val(1),$(".saswp-ps-toggle[schema-id="+b+"]").removeClass("saswp_hide"),$(".saswp-restore-schema[schema-id="+b+"]").parent().removeClass("saswp_hide"),$(".saswp-modify-schema[schema-id="+b+"]").parent().addClass("saswp_hide"),c.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_item_reviewed_call()})}),$(document).on("click",".saswp-restore-schema",function(a){a.preventDefault();var b=$(this).attr("schema-id"),c=$(this);c.addClass("updating-message"),$.post(ajaxurl,{action:"saswp_modify_schema_post_restore",tag_ID:saswp_localize_data.tag_ID,schema_id:b,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){c.removeClass("updating-message"),"t"==a.status?($(".saswp_modify_this_schema_hidden_"+b).val(0),$(".saswp-restore-schema[schema-id="+b+"]").parent().addClass("saswp_hide"),$(".saswp-modify-schema[schema-id="+b+"]").parent().removeClass("saswp_hide"),$(".saswp-ps-toggle[schema-id="+b+"]").remove()):alert("Something went wrong")},"json")}),$(document).on("change",".saswp-schema-type-toggle",function(e){var a=$(this).attr("data-schema-id"),c=$(this).attr("data-post-id"),d=$(".saswp_modify_this_schema_hidden_"+a).val();if($(this).is(":checked")){var b=0;$(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),$(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),$(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),$("#saswp_custom_schema_field[schema-id="+a+"]").parent().addClass("saswp_hide")}else{$("#saswp_custom_schema_field[schema-id="+a+"]").parent().removeClass("saswp_hide"),1==d?($(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),$(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):($(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),$(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),$(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"));var b=1}$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:b,schema_id:a,post_id:c,req_from:saswp_localize_data.req_from,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){},error:function(a){console.log(a)}})}),$(document).on("click",".saswp-reset-data",function(a){a.preventDefault(),!0==confirm("Are you sure?")&&$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){setTimeout(function(){location.reload()},1e3)},error:function(a){console.log(a)}})}),$(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var b=$(this);b.addClass("updating-message");var c=$(this).attr("license-status"),a=$(this).attr("add-on"),d=$("#"+a+"_addon_license_key").val();c&&a&&d?$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:d,license_status:c,add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(c){$("#"+a+"_addon_license_key_status").val(c.status),"active"==c.status&&c.days_remaining<0?($("span.inactive_status_reviews").text("Expired"),$("span.inactive_status_reviews").css({color:"red","font-weight":"400"})):"active"==c.status?($(".saswp-"+a+"-dashicons").addClass("dashicons-yes"),$(".saswp-"+a+"-dashicons").removeClass("dashicons-no-alt"),$(".saswp-"+a+"-dashicons").css("color","green"),$(".saswp_license_activation[add-on='"+a+"']").attr("license-status","inactive"),$(".saswp_license_activation[add-on='"+a+"']").text("Deactivate"),$("span.addon-activated_reviews").css({color:"green","margin-left":"8px","font-weight":"400"}),$(".saswp_license_status_msg[add-on='"+a+"']").text("Activated"),$(".saswp_license_status_msg[add-on='"+a+"']").css("color","green"),$(".saswp_license_status_msg[add-on='"+a+"']").text(c.message),$("span.inactive_status_"+a).text("Active"),$("span.inactive_status_"+a).css({color:"green","margin-left":"8px","font-weight":"400"}),$("span.inactive_status_"+a).removeClass("inactive_status_"+a).addClass("addon-activated_"+a)):($(".saswp-"+a+"-dashicons").addClass("dashicons-no-alt"),$(".saswp-"+a+"-dashicons").removeClass("dashicons-yes"),$(".saswp-"+a+"-dashicons").css("color","red"),$(".saswp_license_activation[add-on='"+a+"']").attr("license-status","active"),$(".saswp_license_activation[add-on='"+a+"']").text("Activate"),$(".saswp_license_status_msg[add-on='"+a+"']").css("color","red"),$(".saswp_license_status_msg[add-on='"+a+"']").text(c.message),$("span.addon-activated_"+a).text("Inactive"),$("span.addon-activated_"+a).css("color","#bebfc0"),$("span.addon-activated_"+a).removeClass("addon-activated_"+a).addClass("inactive_status_"+a),$("span.limit_span").css("display","none")),b.removeClass("updating-message")},error:function(a){console.log(a)}}):(alert("Please enter value license key"),b.removeClass("updating-message"))}),jQuery(document).on("click",".user_refresh_single_addon",function(g){var f=jQuery(this);g.preventDefault();var b=f.attr("add-on"),h=f.attr("remaining_days_org"),i=jQuery("#"+b+"_addon_license_key").val();document.getElementById("user_refresh_"+b).classList.add("spin");var c=new Date,a=function(e){for(var c=e+"=",d=document.cookie.split(";"),b=0;b<d.length;b++){for(var a=d[b];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(c))return a.substring(c.length,a.length)}return null}("saswp_addon_refresh_check");a=new Date(a);var d=-1,e=Math.abs(c.getTime()-a.getTime()),d=Math.ceil(e/864e5),e=Math.abs(new Date(h).getTime()-c.getTime());-1==d||d>1||1>Math.ceil(e/864e5)?(document.cookie="saswp_addon_refresh_check="+c,jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:i,license_status:"active",add_on:b,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){jQuery("#"+b+"_addon_license_key_status").val(a.status),document.getElementById("user_refresh_"+b).classList.remove("spin"),f.removeClass("updating-message")},error:function(a){console.log(a)}})):(setTimeout(function(){jQuery(".dashicons").removeClass("spin")},0),alert("Please try after "+(a=Math.abs(a.getDate()+1)+"/"+Math.abs(a.getMonth()+1)+"/"+a.getFullYear()+" "+a.getHours()+":"+a.getMinutes()+":"+a.getSeconds())))});var c=document.getElementById("activated-plugins-days_remaining");if(c)var d=c.getAttribute("days_remaining");d>=0&&d<=7&&setTimeout(function(){jQuery("#refresh_license_icon_top-").trigger("click")},0),jQuery(document).on("click","#refresh_license_icon_top-",function(e){document.getElementById("refresh_license_icon_top").classList.add("spin"),jQuery(this);var c=$(this),d=$(this).attr("licensestatusinternal"),a=$(this).attr("add-on");$(this).attr("data-attr"),$(this).attr("add-onname");var b=$("#"+a+"_addon_license_key").val();a?$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:b,license_status:d,add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(c){if("active"==$("#"+a+"_addon_license_key_status").val()){document.getElementById("refresh_license_icon_top").classList.remove("spin");var b=c.days_remaining;b>=0&&b<=7&&$("span.saswp-addon-alert").text("expiring in "+b+" days ")}else document.getElementsByClassName("saswp-addon-alert")[0].style.color="green",document.getElementsByClassName("renewal-license")[0].style.display="none",document.getElementById("refresh_license_icon_top").classList.remove("spin"),$("span.pro_warning").css("display","none")}}):(alert("Please enter value license key"),c.removeClass("updating-message")),$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_transient",license_key:b,license_key:b,add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){JSON.parse(a)}})});var c=document.getElementById("activated-plugins-days_remaining");if(c)var d=c.getAttribute("days_remaining");d>=0&&d<=7&&setTimeout(function(){jQuery("#user_refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#user_refresh_expired_addon-",function(e){document.getElementById("user_refresh_expired_addon").classList.add("spin"),jQuery(this);var b=$(this),c=$(this).attr("licensestatusinternal"),a=$(this).attr("add-on");$(this).attr("data-attr"),$(this).attr("add-onname");var d=$("#"+a+"_addon_license_key").val();a?$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:d,license_status:c,add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(c){if("active"==$("#"+a+"_addon_license_key_status").val()){document.getElementById("user_refresh_expired_addon").classList.remove("spin");var b=c.days_remaining;b<0?($("span#exp").text("Expired"),location.reload()):b>7&&($("span.inner_span").text(""),$("span.saswp_addon_inactive").text(""),$("span.expiredinner_span").text("Your License is Active"),$("span.expiredinner_span").css("color","green"),$(".renewal-license").css("display","none"),$(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),b.removeClass("updating-message"))});var c=document.getElementById("activated-plugins-days_remaining");if(c)var d=c.getAttribute("days_remaining");setTimeout(function(){jQuery("#refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#refresh_expired_addon-",function(e){document.getElementById("refresh_expired_addon").classList.add("spin"),jQuery(this);var c=$(this),d=$(this).attr("licensestatusinternal"),a=$(this).attr("add-on");$(this).attr("data-attr"),$(this).attr("add-onname");var b=$("#"+a+"_addon_license_key").val();a?$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:b,license_status:d,add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(c){if("active"==$("#"+a+"_addon_license_key_status").val()){document.getElementById("refresh_expired_addon").classList.remove("spin");var b=c.days_remaining;b<0?$("span#exp").text("Expired"):b>7&&($("span.inner_span").text(""),$("span.saswp_addon_inactive").text(""),$("span.expiredinner_span").text("Your License is Active"),$("span.expiredinner_span").css("color","green"),$(".renewal-license").css("display","none"),$(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),c.removeClass("updating-message")),$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_expired_license_transient",license_key:b,license_key:b,add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){JSON.parse(a)}})}),$(".saswp-send-query").on("click",function(d){d.preventDefault();var b=$("#saswp_query_message").val(),a=$("#saswp_query_email").val(),c=$("#saswp_query_premium_cus").val();""!=$.trim(b)&&c&&""!=$.trim(a)&& !0==saswpIsEmail(a)?$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",premium_cus:c,message:b,email:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){"t"==a.status?($(".saswp-query-success").show(),$(".saswp-query-error").hide()):($(".saswp-query-success").hide(),$(".saswp-query-error").show())},error:function(a){console.log(a)}}):""==$.trim(b)&&""==c&&""==$.trim(a)?alert("Please enter the message, email and select customer type"):(""==c&&alert("Select Customer type"),""==$.trim(b)&&alert("Please enter the message"),""==$.trim(a)&&alert("Please enter the email"),!1==saswpIsEmail(a)&&alert("Please enter a valid email"))}),$(".saswp-import-plugins").on("click",function(a){a.preventDefault();var b=$(this);b.addClass("updating-message");var c=$(this).attr("data-id");$.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:c,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){"t"==a.status?($(b).parent().find(".saswp-imported-message").text(a.message),$(b).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):($(b).parent().find(".saswp-imported-message").addClass("saswp-error"),$(b).parent().find(".saswp-imported-message").text(a.message)),b.removeClass("updating-message")},"json")}),$(".saswp-feedback-no-thanks").on("click",function(a){a.preventDefault(),$.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){"t"==a.status&&$(".saswp-feedback-notice").hide()},"json")}),$(".saswp-feedback-remindme").on("click",function(a){a.preventDefault(),$.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){"t"==a.status&&$(".saswp-feedback-notice").hide()},"json")}),$(document).on("change",".saswp-local-business-type-select",function(a){a.preventDefault();var c=$(this),b=$(this).val();$.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:b,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(d){if("t"==d.status){$(".saswp-local-business-name-select").parents("tr").remove();var b=c.parents(".saswp-post-specific-wrapper").attr("data-id"),a='<tr><th><label for="saswp_business_name_'+b+'">Sub Business Type</label></th>';a+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+b+'" name="saswp_business_name_'+b+'">',$.each(d.result,function(b,c){a+='<option value="'+b+'">'+c+"</option>"}),a+="</select></td>",a+="</tr>",c.parents(".form-table tr:first").after(a)}else $(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),jQuery(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),$(document).on("click",".saswp-add-custom-schema",function(a){a.preventDefault(),$(".saswp-add-custom-schema-field").removeClass("saswp_hide"),$(this).hide()}),$(document).on("click",".saswp-delete-custom-schema",function(a){a.preventDefault(),$("#saswp_custom_schema_field").val(""),$(".saswp-add-custom-schema-field").addClass("saswp_hide"),$(".saswp-add-custom-schema").show()}),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_reviews_datepicker(),$(document).on("click",".saswp-add-more-item",function(b){b.preventDefault();var a='<tr class="saswp-review-item-tr">';a+="<td>Review Item Feature</td>",a+='<td><input type="text" name="saswp-review-item-feature[]"></td>',a+="<td>Rating</td>",a+='<td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td>',a+='<td><a type="button" class="saswp-remove-review-item button">x</a></td>',a+="</tr>",$(".saswp-review-item-list-table").append(a)}),$(document).on("click",".saswp-remove-review-item",function(a){a.preventDefault(),$(this).parent().parent("tr").remove()}),$(document).on("focusout",".saswp-review-item-tr input[type=number]",function(a){a.preventDefault();var b=0,c=$(".saswp-review-item-tr input[type=number]").length;$(".saswp-review-item-tr input[type=number]").each(function(c,a){""==$(a).val()?b+=parseFloat(0):b+=parseFloat($(a).val())}),$("#saswp-review-item-over-all").val(b/c)}),$("#saswp-review-location").change(function(){var a=$(this).val();$(".saswp-review-shortcode").addClass("saswp_hide"),3==a&&$(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),$("#saswp-review-item-enable").change(function(){$(this).is(":checked")?$(".saswp-review-fields").show():$(".saswp-review-fields").hide()}).change(),$(document).on("click",".saswp-restore-post-schema",function(a){a.preventDefault();var b=$(this);if(b.addClass("updating-message"),$(".saswp-post-specific-schema-ids").val())var c=JSON.parse($(".saswp-post-specific-schema-ids").val());$.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:c,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){"t"==a.status||alert(a.msg),setTimeout(function(){location.reload()},1e3),b.removeClass("updating-message")},"json")}),$(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(a){a.preventDefault();var b=$(this).attr("data-id");$(".saswp-post-specific-wrapper").hide(),$("#"+b).show(),$("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),$("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),$(this).addClass("selected"),$(this).parent().addClass("selected"),saswp_enable_rating_review(),saswp_enable_rating_automate()}),$("#saswp-global-tabs a:first").addClass("saswp-global-selected"),$(".saswp-global-container").hide();var h=window.location.hash;if("#saswp-default-container"==h?$(".saswp-global-container:eq(2)").show():"#saswp-knowledge-container"==h?$(".saswp-global-container:eq(1)").show():$(".saswp-global-container:first").show(),$("#saswp-global-tabs a").click(function(){var a=$(this).attr("data-id");$(this).hasClass("saswp-global-selected")||($("#saswp-global-tabs a").removeClass("saswp-global-selected"),$(this).addClass("saswp-global-selected"),$(".saswp-global-container").hide(),$("#"+a).show())}),$("#saswp-review-tabs a:first").addClass("saswp-global-selected"),$(".saswp-review-container").hide(),$(".saswp-review-container:first").show(),$("#saswp-review-tabs a").click(function(){var a=$(this).attr("data-id");$(this).hasClass("saswp-global-selected")||($("#saswp-review-tabs a").removeClass("saswp-global-selected"),$(this).addClass("saswp-global-selected"),$(".saswp-review-container").hide(),$("#"+a).show())}),$("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),$(".saswp-compatibility-container").hide(),$(".saswp-compatibility-container:first").show(),$("#saswp-compatibility-tabs a").click(function(){var a=$(this).attr("data-id");$(this).hasClass("saswp-global-selected")||($("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),$(this).addClass("saswp-global-selected"),$(".saswp-compatibility-container").hide(),$("#"+a).show())}),$('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),$(".saswp-enable-modify-schema-output").on("change",function(){$(".saswp-static-container").addClass("saswp_hide"),$(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==$(this).val()&&($(".saswp-static-container").removeClass("saswp_hide"),$(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==$(this).val()&&($(".saswp-static-container").addClass("saswp_hide"),$(".saswp-dynamic-container").removeClass("saswp_hide"))}),$(document).on("change",".saswp-custom-fields-name",function(){var b="text",c=$(this).parent().parent("tr"),a=$(this).val();(-1!=a.indexOf("_image")|| -1!=a.indexOf("_logo"))&&(b="image");var d=$(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,b,null,d,a,c)}),$(document).on("click",".saswp-skip-button",function(a){a.preventDefault(),$(this).parent().parent().hide(),$.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){},"json")}),$(document).on("click",".saswp_add_schema_fields_on_fly",function(f){f.preventDefault();var d=$(this);d.addClass("updating-message");var b=$(this).attr("data-id"),e=$(this).attr("fields_type"),c=$(this).attr("div_type"),g=$(this).attr("itemlist_sub_type"),h=$("saswp_specific_"+b+" , .saswp-"+c+"-table-div").length,a=$("saswp_specific_"+b+" , .saswp-"+c+"-table-div:nth-child("+h+")").attr("data-id");(a=++a)||(a=0),saswp_get_post_specific_schema_fields(d,a,e,c,b,e+"_",g)}),$(document).on("click",".saswp-table-close",function(){$(this).parent().remove()}),$(document).on("click",".saswp-rmv-modify_row",function(a){a.preventDefault(),$(this).parent().parent().remove()}),$(document).on("change",".saswp-custom-meta-list",function(){var f=$(this),g=$("select#schema_type option:selected").val(),d=$(this).val(),c=$(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),a="",b=g.toLowerCase()+"_"+c,e="saswp_fixed_image["+c+"]";"manual_text"==d?(a+='<td><textarea cols="35" rows="2" name="saswp_fixed_text['+c+']"></textarea></td>',a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',$(this).parent().parent("tr").find("td:gt(1)").remove(),$(this).parent().parent("tr").append(a),saswpCustomSelect2()):"taxonomy_term"==d?saswp_taxonomy_term.taxonomy?(a+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,c),f.parent().parent("tr").find("td:gt(1)").remove(),f.parent().parent("tr").append(a),saswpCustomSelect2()):$.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(b){b&&(saswp_taxonomy_term.taxonomy=b,a+=saswp_taxonomy_term_html(b,c),f.parent().parent("tr").find("td:gt(1)").remove(),f.parent().parent("tr").append(a),saswpCustomSelect2())},"json"):"custom_field"==d?(a+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+c+']">',a+="</select></td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',$(this).parent().parent("tr").find("td:gt(1)").remove(),$(this).parent().parent("tr").append(a),saswpCustomSelect2()):"fixed_image"==d?(a+="<td>",a+="<fieldset>",a+='<input data-id="media" style="width: 30%;" class="button" id="'+b+'_button" name="'+b+'_button" type="button" value="Upload" />',a+='<input type="hidden" data-id="'+b+'_height" class="upload-height" name="'+e+'[height]" id="'+b+'_height" value="">',a+='<input type="hidden" data-id="'+b+'_width" class="upload-width" name="'+e+'[width]" id="'+b+'_width" value="">',a+='<input type="hidden" data-id="'+b+'_thumbnail" class="upload-thumbnail" name="'+e+'[thumbnail]" id="'+b+'_thumbnail" value="">',a+='<div class="saswp_image_div_'+b+'">',a+="</div>",a+="</fieldset>",a+="</td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',$(this).parent().parent("tr").find("td:gt(1)").remove(),$(this).parent().parent("tr").append(a),saswpCustomSelect2()):(a+="<td></td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',$(this).parent().parent("tr").find("td:gt(1)").remove(),$(this).parent().parent("tr").append(a),saswpCustomSelect2())}),$(document).on("change",".saswp-item-reivewed-list",function(){$(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var a=$(this),b=$("select#schema_type option:selected").val();saswp_item_reviewed_ajax(b,a,"manual")}),$(document).on("click",".saswp-add-custom-fields",function(){var b=$(this);b.addClass("updating-message");var a=$("select#schema_type option:selected").val(),c="",d=null;"Review"==a&&(c=$("select.saswp-item-reivewed-list option:selected").val(),d="saswp_review_name");var e=$("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(b,"text",saswp_meta_list_fields[a],null,d,null):$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:e,schema_type:a,schema_subtype:c,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(c){saswp_meta_list_fields[a]=c,saswp_get_meta_list(b,"text",saswp_meta_list_fields[a],null,d,null)},error:function(a){console.log(a)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_enable_rating_automate(),$('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),$(document).on("click",".saswp_coonect_google_place",function(){var a=$("#saswp_google_place_id").val(),b=$("#saswp_language_list").val(),c=$("#saswp_googel_api").val();""!=a&&$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:a,language:b,google_api:c,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){console.log(a.status)},error:function(a){console.log(a)}})}),$(document).on("click",".saswp-add-social-links",function(){$(".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>')}),$(document).on("click",".saswp-show-accept-rv-popup",function(){tb_show("Reviews Form","#TB_inline??width=600&height=400&inlineId=saswp-accept-reviews-popup"),$(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 b='<div class="saswp-custom-post-tab">';b+='<div style="display:none;" id="saswp-accept-reviews-popup">',b+='<div class="saswp-accept-rv-container">',b+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",b+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',b+='<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>',b+='<p><strong>Note:</strong> To enable google reCAPTCHA v2 add SITE KEY & SECRET KEY respectively as parameters in above shortcode. Eg <input value="[saswp-reviews-form site_key="your key" secret_key="your key"]" type="text" readonly>. To get keys <a target="_blank" href="https://www.google.com/recaptcha/admin/create">Click here.</a> You must choose reCAPTCHA type v2 </p>',b+="</div>",b+="</div>",b+='<h2 class="nav-tab-wrapper">',b+="<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>',b+="<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>',b+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',b+="</h2>",b+="</div>",jQuery(jQuery(".wrap")).prepend(b)}jQuery(document).on("click",".saswp-clear-images",function(a){a.preventDefault();var b=$(this);!0==confirm("Are you sure? It will remove all the resized images")&&(b.addClass("updating-message"),$.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_clear_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){b.removeClass("updating-message"),"t"!=a.status&&alert("something went wrong")},error:function(a){console.log(a)}}))}),"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&&$(".saswp-rating-div").rateYo({spacing:"5px",rtl:saswp_localize_data.is_rtl,rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(a,b){$(this).next().next().val(a)}}).on("rateyo.change",function(c,a){var b=a.rating;$(this).next().text(b)}),$("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var a=$(this);a.parent().find(".saswp-phone-validation").remove();var b=$(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(b)?a.parent().find(".saswp-phone-validation").remove():a.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')}),saswpCollectionSlider(),$(document).on("click",".saswp-add-rv-btn",function(){$(".saswp-dynamic-platforms").toggle()}),$(".saswp-rmv-coll-rv").on("click",function(){if(rmv_boolean=!rmv_boolean,saswp_on_collection_design_change(),jQuery(jQuery(".saswp-add-dynamic-section")).remove(),rmv_boolean){var a="";a+='<div class="saswp-add-dynamic-section">',a+='<div class="saswp-add-dynamic-btn">',a+='<span class="dashicons dashicons-plus-alt saswp-add-rv-btn"></span>',a+="</div>",a+='<div class="saswp-dynamic-platforms" style="display:none;">',a+='<select name="saswp_dynamic_platforms" id="saswp_dynamic_platforms"><option value="">Choose Platform</option>'+jQuery("#saswp-plaftorm-list").html()+"</select>",a+="</div>",a+="</div>",jQuery(jQuery(".saswp-collection-preview")[0]).after(a)}}),$(document).on("change","#saswp_dynamic_platforms",function(){var b=$(this).val(),a="";a+='<select id="saswp_dynamic_reviews_list">',a+="</select>",a+='<a class="button button-default saswp-add-single-rv">Add</a>',$("#saswp_dynamic_platforms").nextAll().remove(),$("#saswp_dynamic_platforms").after(a);var c=ajaxurl+"?action=saswp_add_reviews_to_select2&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&platform_id="+b;$("#saswp_dynamic_reviews_list").select2({ajax:{url:c,dataType:"json",processResults:function(a){if(a.status)return{results:a.message}}}})}),$(document).on("click",".saswp-add-single-rv",function(b){b.preventDefault();var a=$("#saswp_dynamic_reviews_list").val(),c=$("#saswp_dynamic_platforms").val();a&&saswp_get_collection_data(null,c,null,a,!0)}),$(document).on("click",".saswp-remove-coll-rv",function(){var c=$(this).attr("data-id"),a=$(this).attr("platform-id");if(a){var b=saswp_collection[a].filter(function(a){return a.saswp_review_id!=c});saswp_collection[a]=b,saswp_on_collection_design_change()}}),$(document).on("click",".saswp-grid-page",function(a){a.preventDefault(),saswp_grid_page=$(this).attr("data-id"),saswp_on_collection_design_change()}),$("#saswp-coll-pagination").change(function(){saswp_grid_page=1,$("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),$(this).is(":checked")&&$("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),$(".saswp-accordion").click(function(){$(this).toggleClass("active"),$(this).next(".saswp-accordion-panel").slideToggle(200)}),$(document).on("click",".saswp-opn-cls-btn",function(){$("#saswp-reviews-cntn").toggle(),$("#saswp-reviews-cntn").is(":visible")?($(".saswp-onclick-show").css("display","flex"),$(".saswp-onclick-hide").hide(),$(".saswp-open-class").css("width","500px")):($(".saswp-onclick-show").css("display","none"),$(".saswp-onclick-hide").show(),$(".saswp-open-class").css("width","300px"))}),$(".saswp-collection-display-method").change(function(){"shortcode"==$(this).val()?$(".saswp-collection-shortcode").removeClass("saswp_hide"):$(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),$(document).on("click",".saswp-remove-platform",function(a){a.preventDefault();var b=$(this).attr("platform-id");saswp_collection.splice(b,1),$(this).parent().remove(),saswp_on_collection_design_change()}),$(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),$(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var a=$(".saswp-collection-desing").val(),b=$(".saswp-collection-sorting").val();$(".saswp-coll-options").addClass("saswp_hide"),$(".saswp-collection-lp").css("height","auto"),$(".saswp-rmv-coll-rv").hide(),$(".saswp-add-dynamic-section").hide(),"grid"==a&&($(".saswp-grid-options").removeClass("saswp_hide"),$(".saswp-rmv-coll-rv").show(),$(".saswp-add-dynamic-section").show()),"gallery"==a&&$(".saswp-slider-options").removeClass("saswp_hide"),"fomo"==a&&($(".saswp-fomo-options").removeClass("saswp_hide"),$(".saswp-collection-lp").css("height","31px")),"popup"==a&&$(".saswp-collection-lp").css("height","31px"),$("#saswp_collection_specific_rating").is(":checked")?$("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):$("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide"),"recent"==b?($("#saswp_collection_specific_rating").parent().parent().removeClass("saswp_hide"),$("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"),$("#saswp_collection_specific_rating").is(":checked")?$("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):$("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")):($("#saswp_collection_specific_rating").parent().parent().addClass("saswp_hide"),$("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")),saswp_on_collection_design_change()}).change(),$(".saswp-add-to-collection").on("click",function(d){d.preventDefault();var a=$(this),b=$("#saswp-plaftorm-list").val(),c=$("#saswp-review-count").val();b&&c>0?(a.addClass("updating-message"),saswp_get_collection_data(c,b,a,null)):alert("Enter Count")});var i=$("#saswp_total_reviews_list").val();i&&saswp_get_collection_data(null,null,null,null,i),(f=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",f.innerHTML="Copied!",document.body.appendChild(f);var j=document.getElementById("saswp-motivatebox");j&&j.addEventListener("mouseup",function(a){var c,d,e,h,b,a=a||event,g=a.target||a.srcElement;"motivate"==g.className&&(c=g,(d=document.createRange()).selectNodeContents(c),(e=window.getSelection()).removeAllRanges(),e.addRange(d),function(){var a;try{a=document.execCommand("copy")}catch(b){a=!1}return a}()&&(b=a||event,clearTimeout(k),f.style.left=b.pageX-10+"px",f.style.top=b.pageY+15+"px",f.style.opacity=1,k=setTimeout(function(){f.style.opacity=0},500)))},!1)})
|
admin_section/settings.php
CHANGED
@@ -2897,6 +2897,19 @@ function saswp_compatibility_page_callback(){
|
|
2897 |
)
|
2898 |
);
|
2899 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2900 |
$easyaccordion = array(
|
2901 |
'label' => 'Easy Accordion',
|
2902 |
'id' => 'saswp-easyaccordion-checkbox',
|
@@ -4134,6 +4147,7 @@ function saswp_compatibility_page_callback(){
|
|
4134 |
|
4135 |
if(!is_plugin_active('event-schema-for-saswp/event-schema-for-saswp.php')){
|
4136 |
|
|
|
4137 |
$the_events_calendar['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
4138 |
$events_calendar_wd['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
4139 |
$wp_event_manager['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
@@ -4250,6 +4264,7 @@ function saswp_compatibility_page_callback(){
|
|
4250 |
$lifter_lms,
|
4251 |
$senseilms,
|
4252 |
$wplms,
|
|
|
4253 |
$the_events_calendar,
|
4254 |
$wp_event_manager,
|
4255 |
$events_manager,
|
2897 |
)
|
2898 |
);
|
2899 |
|
2900 |
+
$ameliabooking = array(
|
2901 |
+
'label' => 'Amelia Booking',
|
2902 |
+
'id' => 'saswp-ameliabooking-checkbox',
|
2903 |
+
'name' => 'saswp-ameliabooking-checkbox',
|
2904 |
+
'type' => 'checkbox',
|
2905 |
+
'class' => 'checkbox saswp-checkbox',
|
2906 |
+
'note' => saswp_get_field_note('ameliabooking'),
|
2907 |
+
'hidden' => array(
|
2908 |
+
'id' => 'saswp-ameliabooking',
|
2909 |
+
'name' => 'sd_data[saswp-ameliabooking]',
|
2910 |
+
)
|
2911 |
+
);
|
2912 |
+
|
2913 |
$easyaccordion = array(
|
2914 |
'label' => 'Easy Accordion',
|
2915 |
'id' => 'saswp-easyaccordion-checkbox',
|
4147 |
|
4148 |
if(!is_plugin_active('event-schema-for-saswp/event-schema-for-saswp.php')){
|
4149 |
|
4150 |
+
$ameliabooking['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
4151 |
$the_events_calendar['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
4152 |
$events_calendar_wd['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
4153 |
$wp_event_manager['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/event-schema/">Event Schema Addon</a>';
|
4264 |
$lifter_lms,
|
4265 |
$senseilms,
|
4266 |
$wplms,
|
4267 |
+
$ameliabooking,
|
4268 |
$the_events_calendar,
|
4269 |
$wp_event_manager,
|
4270 |
$events_manager,
|
admin_section/structure_admin.php
CHANGED
@@ -277,8 +277,7 @@ function saswp_generate_field_data( $post_id, $post ){
|
|
277 |
|
278 |
foreach ($data_group_array as $group){
|
279 |
|
280 |
-
if(is_array($group['data_array'])){
|
281 |
-
|
282 |
$inner_output = array();
|
283 |
|
284 |
foreach($group['data_array'] as $value){
|
@@ -421,6 +420,24 @@ function saswp_comparison_logic_checker($input, $post){
|
|
421 |
|
422 |
break;
|
423 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
424 |
// Logged in User Type
|
425 |
case 'user_type':
|
426 |
if ( $comparison == 'equal') {
|
@@ -845,6 +862,7 @@ if(is_admin()){
|
|
845 |
'user_type' => saswp_t_string("Logged in User Type"),
|
846 |
'homepage' => saswp_t_string("Homepage"),
|
847 |
'author' => saswp_t_string("Author"),
|
|
|
848 |
),
|
849 |
saswp_t_string("Post") => array(
|
850 |
'post' => saswp_t_string("Post"),
|
277 |
|
278 |
foreach ($data_group_array as $group){
|
279 |
|
280 |
+
if(!empty($group['data_array']) && is_array($group['data_array'])) {
|
|
|
281 |
$inner_output = array();
|
282 |
|
283 |
foreach($group['data_array'] as $value){
|
420 |
|
421 |
break;
|
422 |
|
423 |
+
case 'author_name':
|
424 |
+
|
425 |
+
$get_author = get_post_field('post_author',$post->ID);
|
426 |
+
|
427 |
+
if ( $comparison == 'equal' ) {
|
428 |
+
if ( $get_author == $data ) {
|
429 |
+
|
430 |
+
$result = true;
|
431 |
+
}
|
432 |
+
}
|
433 |
+
if ( $comparison == 'not_equal') {
|
434 |
+
if ( $get_author != $data ) {
|
435 |
+
$result = true;
|
436 |
+
}
|
437 |
+
}
|
438 |
+
|
439 |
+
break;
|
440 |
+
|
441 |
// Logged in User Type
|
442 |
case 'user_type':
|
443 |
if ( $comparison == 'equal') {
|
862 |
'user_type' => saswp_t_string("Logged in User Type"),
|
863 |
'homepage' => saswp_t_string("Homepage"),
|
864 |
'author' => saswp_t_string("Author"),
|
865 |
+
'author_name' => saswp_t_string("Author Name"),
|
866 |
),
|
867 |
saswp_t_string("Post") => array(
|
868 |
'post' => saswp_t_string("Post"),
|
admin_section/tracking/make-better-helper.php
CHANGED
@@ -86,7 +86,7 @@ function saswp_send_feedback() {
|
|
86 |
|
87 |
}
|
88 |
|
89 |
-
$success = wp_mail( '
|
90 |
|
91 |
die();
|
92 |
}
|
86 |
|
87 |
}
|
88 |
|
89 |
+
$success = wp_mail( 'team@magazine3.in', $subject, $text, $headers );
|
90 |
|
91 |
die();
|
92 |
}
|
core/array-list/compatibility-list.php
CHANGED
@@ -4,6 +4,13 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
4 |
|
5 |
return array(
|
6 |
'plugins' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
'autolistings' => array(
|
8 |
'name' => 'Auto Listings',
|
9 |
'free' => 'auto-listings/auto-listings.php',
|
4 |
|
5 |
return array(
|
6 |
'plugins' => array(
|
7 |
+
'ameliabooking' => array(
|
8 |
+
'name' => 'Amelia Booking',
|
9 |
+
'free' => 'ameliabooking/ameliabooking.php',
|
10 |
+
'pro' => 'ameliabooking/ameliabooking.php',
|
11 |
+
'opt_name' => 'saswp-ameliabooking',
|
12 |
+
'part_in' => 'pro',
|
13 |
+
),
|
14 |
'autolistings' => array(
|
15 |
'name' => 'Auto Listings',
|
16 |
'free' => 'auto-listings/auto-listings.php',
|
output/compatibility.php
CHANGED
@@ -350,7 +350,10 @@ class saswp_output_compatibility{
|
|
350 |
/**
|
351 |
* Functions on compatiblity plugin activation starts here
|
352 |
*/
|
353 |
-
public function
|
|
|
|
|
|
|
354 |
$this->saswp_update_option_on_compatibility_activation('saswp-flexmlx-compativility');
|
355 |
}
|
356 |
public function simple_author_box_on_activation(){
|
350 |
/**
|
351 |
* Functions on compatiblity plugin activation starts here
|
352 |
*/
|
353 |
+
public function ameliabooking_on_activation(){
|
354 |
+
$this->saswp_update_option_on_compatibility_activation('saswp-ameliabooking');
|
355 |
+
}
|
356 |
+
public function ameliabookingflex_mls_idx_on_activation(){
|
357 |
$this->saswp_update_option_on_compatibility_activation('saswp-flexmlx-compativility');
|
358 |
}
|
359 |
public function simple_author_box_on_activation(){
|
output/function.php
CHANGED
@@ -3313,12 +3313,18 @@ function saswp_get_ampforwp_story_images(){
|
|
3313 |
|
3314 |
add_shortcode('saswp-breadcrumbs', 'saswp_render_breadcrumbs_html');
|
3315 |
|
3316 |
-
function saswp_render_breadcrumbs_html($
|
3317 |
-
|
3318 |
-
global $sd_data;
|
3319 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3320 |
$breadcrumbs = '';
|
3321 |
-
|
3322 |
if(!empty($sd_data['titles'])){
|
3323 |
|
3324 |
$breadcrumbs .= '<style>';
|
@@ -3345,7 +3351,13 @@ function saswp_render_breadcrumbs_html($attr){
|
|
3345 |
$breadcrumbs .= '<ul class="saswp-breadcrumbs-ul">';
|
3346 |
|
3347 |
foreach ($sd_data['titles'] as $key => $value) {
|
3348 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
3349 |
}
|
3350 |
|
3351 |
$breadcrumbs .= '</ul>';
|
3313 |
|
3314 |
add_shortcode('saswp-breadcrumbs', 'saswp_render_breadcrumbs_html');
|
3315 |
|
3316 |
+
function saswp_render_breadcrumbs_html($atts){
|
|
|
|
|
3317 |
|
3318 |
+
global $sd_data,$post;
|
3319 |
+
$attr = shortcode_atts(
|
3320 |
+
array(
|
3321 |
+
'hide_post_title' => '',
|
3322 |
+
), $atts, 'saswp-breadcrumbs' );
|
3323 |
+
|
3324 |
+
$hide_post_title = ($attr['hide_post_title']) ? $attr['hide_post_title'] : 0;
|
3325 |
+
$get_current_post_title = get_post_field('post_title',$post->ID);
|
3326 |
$breadcrumbs = '';
|
3327 |
+
// echo "<pre>";print_r($get_current_post_title);echo "</pre>";
|
3328 |
if(!empty($sd_data['titles'])){
|
3329 |
|
3330 |
$breadcrumbs .= '<style>';
|
3351 |
$breadcrumbs .= '<ul class="saswp-breadcrumbs-ul">';
|
3352 |
|
3353 |
foreach ($sd_data['titles'] as $key => $value) {
|
3354 |
+
if($hide_post_title == 1 && $value == $get_current_post_title){
|
3355 |
+
// do nothing
|
3356 |
+
}else{
|
3357 |
+
$breadcrumbs .= '<li class="saswp-breadcrumbs-li" ><a href="'.esc_url($sd_data['links'][$key]).'">'.esc_html($value).'</a></li>';
|
3358 |
+
|
3359 |
+
}
|
3360 |
+
|
3361 |
}
|
3362 |
|
3363 |
$breadcrumbs .= '</ul>';
|
output/service.php
CHANGED
@@ -1080,6 +1080,91 @@ Class saswp_output_service{
|
|
1080 |
}
|
1081 |
|
1082 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1083 |
|
1084 |
case 'Project':
|
1085 |
|
1080 |
}
|
1081 |
|
1082 |
break;
|
1083 |
+
case 'EducationalOccupationalProgram':
|
1084 |
+
|
1085 |
+
if(isset($custom_fields['saswp_eop_name'])){
|
1086 |
+
$input1['name'] = $custom_fields['saswp_eop_name'];
|
1087 |
+
}
|
1088 |
+
if(isset($custom_fields['saswp_eop_description'])){
|
1089 |
+
$input1['description'] = ($custom_fields['saswp_eop_description']);
|
1090 |
+
}
|
1091 |
+
if(isset($custom_fields['saswp_eop_url'])){
|
1092 |
+
$input1['url'] = saswp_validate_url($custom_fields['saswp_eop_url']);
|
1093 |
+
}
|
1094 |
+
if(isset($custom_fields['saswp_eop_image'])){
|
1095 |
+
$input1['image'] = ($custom_fields['saswp_eop_image']);
|
1096 |
+
}
|
1097 |
+
if(isset($custom_fields['saswp_eop_time_to_complete'])){
|
1098 |
+
$input1['timeToComplete'] = ($custom_fields['saswp_eop_time_to_complete']);
|
1099 |
+
}
|
1100 |
+
if(isset($custom_fields['saswp_eop_occupational_category'])){
|
1101 |
+
$input1['occupationalCategory'] = ($custom_fields['saswp_eop_occupational_category']);
|
1102 |
+
}
|
1103 |
+
if(isset($custom_fields['saswp_eop_occupational_credential_awarded'])){
|
1104 |
+
$input1['occupationalCredentialAwarded'] = ($custom_fields['saswp_eop_occupational_credential_awarded']);
|
1105 |
+
}
|
1106 |
+
if(isset($custom_fields['saswp_eop_program_prerequisites'])){
|
1107 |
+
$input1['programPrerequisites'] = ($custom_fields['saswp_eop_program_prerequisites']);
|
1108 |
+
}
|
1109 |
+
if(isset($custom_fields['saswp_eop_application_start_date'])){
|
1110 |
+
$input1['applicationStartDate'] = ($custom_fields['saswp_eop_application_start_date']);
|
1111 |
+
}
|
1112 |
+
if(isset($custom_fields['saswp_eop_application_deadline'])){
|
1113 |
+
$input1['applicationDeadLine'] = ($custom_fields['saswp_eop_application_deadline']);
|
1114 |
+
}
|
1115 |
+
if(isset($custom_fields['saswp_eop_start_date'])){
|
1116 |
+
$input1['startDate'] = ($custom_fields['saswp_eop_start_date']);
|
1117 |
+
}
|
1118 |
+
if(isset($custom_fields['saswp_eop_end_date'])){
|
1119 |
+
$input1['endDate'] = ($custom_fields['saswp_eop_end_date']);
|
1120 |
+
}
|
1121 |
+
if(isset($custom_fields['saswp_eop_day_of_week'])){
|
1122 |
+
$input1['dayOfWeek'] = ($custom_fields['saswp_eop_day_of_week']);
|
1123 |
+
}
|
1124 |
+
if(isset($custom_fields['saswp_eop_time_of_day'])){
|
1125 |
+
$input1['timeOfDay'] = ($custom_fields['saswp_eop_time_of_day']);
|
1126 |
+
}
|
1127 |
+
if(isset($custom_fields['saswp_eop_number_of_credits'])){
|
1128 |
+
$input1['numberOfCredits'] = ($custom_fields['saswp_eop_number_of_credits']);
|
1129 |
+
}
|
1130 |
+
if(isset($custom_fields['saswp_eop_typical_credits_per_term'])){
|
1131 |
+
$input1['typicalCreditsPerterm'] = ($custom_fields['saswp_eop_typical_credits_per_term']);
|
1132 |
+
}
|
1133 |
+
if(isset($custom_fields['saswp_eop_term_duration'])){
|
1134 |
+
$input1['termDuration'] = ($custom_fields['saswp_eop_term_duration']);
|
1135 |
+
}
|
1136 |
+
if(isset($custom_fields['saswp_eop_terms_per_year'])){
|
1137 |
+
$input1['termPerYear'] = ($custom_fields['saswp_eop_terms_per_year']);
|
1138 |
+
}
|
1139 |
+
if(isset($custom_fields['saswp_eop_maximum_enrollment'])){
|
1140 |
+
$input1['maximumEnrollment'] = ($custom_fields['saswp_eop_maximum_enrollment']);
|
1141 |
+
}
|
1142 |
+
if(isset($custom_fields['saswp_eop_educational_program_mode'])){
|
1143 |
+
$input1['educationalProgramMode'] = ($custom_fields['saswp_eop_educational_program_mode']);
|
1144 |
+
}
|
1145 |
+
if(isset($custom_fields['saswp_eop_financial_aid_eligible'])){
|
1146 |
+
$input1['financialAidEligible'] = ($custom_fields['saswp_eop_financial_aid_eligible']);
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
$provider = array();
|
1150 |
+
|
1151 |
+
if(isset($custom_fields['saswp_eop_provider_name'])){
|
1152 |
+
$provider = array(
|
1153 |
+
'@type' => 'Organization',
|
1154 |
+
'name' => $custom_fields['saswp_eop_provider_name'],
|
1155 |
+
'telephone' => $custom_fields['saswp_eop_provider_telephone'],
|
1156 |
+
'address' => array(
|
1157 |
+
'@type' => 'Postaladdress',
|
1158 |
+
'streetAddress' => $custom_fields['saswp_eop_provider_street_address'],
|
1159 |
+
'addressLocality' => $custom_fields['saswp_eop_provider_address_locality'],
|
1160 |
+
'addressRegion' => $custom_fields['saswp_eop_provider_address_region'],
|
1161 |
+
'addressCountry' => $custom_fields['saswp_eop_provider_address_country'],
|
1162 |
+
'postalCode' => $custom_fields['saswp_eop_provider_postal_code'],
|
1163 |
+
),
|
1164 |
+
);
|
1165 |
+
$input1['provider'] = $provider;
|
1166 |
+
}
|
1167 |
+
break;
|
1168 |
|
1169 |
case 'Project':
|
1170 |
|
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: 6.0
|
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,13 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
120 |
|
121 |
== Changelog ==
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
= 1.9.98.1 (26 May 2022) =
|
124 |
|
125 |
* Fixed: Uncaught Error: Undefined constant “SECURE_AUTH_COOKIE” #1680
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 6.0
|
6 |
+
Stable tag: 1.9.99
|
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.99 (15 July 2022) =
|
124 |
+
|
125 |
+
* Fixed: Need to add the atttribute to the [saswp-breadcrumbs] to remove the post/page title from the displayed breadcrumbs in frontend #1697
|
126 |
+
* Fixed: Modified data is not getting updated in EducationalOccupationalProgram Schema #1686
|
127 |
+
* Fixed: Query monitor showing a PHP warning. #1688
|
128 |
+
* Fixed: Person schema error. #1699
|
129 |
+
|
130 |
= 1.9.98.1 (26 May 2022) =
|
131 |
|
132 |
* Fixed: Uncaught Error: Undefined constant “SECURE_AUTH_COOKIE” #1680
|
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__));
|
@@ -27,7 +27,7 @@ define('SASWP_PLUGIN_URL', plugin_dir_url( __FILE__ ));
|
|
27 |
define('SASWP_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
28 |
define('SASWP_EDD_STORE_URL', 'http://structured-data-for-wp.com/');
|
29 |
|
30 |
-
//define('SASWP_ENVIRONMENT', 'development');
|
31 |
define('SASWP_ENVIRONMENT', 'production');
|
32 |
// including the output file
|
33 |
require_once SASWP_DIR_NAME .'/core/queries_function.php';
|
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.99
|
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.99');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
27 |
define('SASWP_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
28 |
define('SASWP_EDD_STORE_URL', 'http://structured-data-for-wp.com/');
|
29 |
|
30 |
+
// define('SASWP_ENVIRONMENT', 'development');
|
31 |
define('SASWP_ENVIRONMENT', 'production');
|
32 |
// including the output file
|
33 |
require_once SASWP_DIR_NAME .'/core/queries_function.php';
|