Schema & Structured Data for WP & AMP - Version 1.9.95

Version Description

(28 Mar 2022) =

  • Fixed: Activation of the plugin is causing structure displacement on the website in Admin view. #1637
  • Fixed: Deprecated: WC_Product::get_price_including_tax warning on product page #1627
  • Fixed: Service schema not displaying all fields #1617
  • Enhancement: IDX integration updated #1626
  • Enhancement: Remove old data tracking method and add new system to get user feedback #1623
  • Added: Compatibility with EventON Lite plugin (https://wordpress.org/plugins/eventon-lite/) #1624
  • Added: Compatability with Real Estate 7 WordPress Theme #1619
Download this release

Release Info

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

Code changes from version 1.9.94 to 1.9.95

admin_section/common-function.php CHANGED
@@ -2840,10 +2840,10 @@ function saswp_remove_unwanted_notice_boxes(){
2840
 
2841
  remove_all_actions('admin_notices');
2842
 
2843
- global $saswp_wisdom;
2844
 
2845
- add_action( 'admin_notices', array($saswp_wisdom , 'optin_notice') );
2846
- add_action( 'admin_notices', array($saswp_wisdom , 'marketing_notice') );
2847
  add_action( 'admin_notices', 'saswp_admin_notice' );
2848
  }
2849
 
@@ -3142,6 +3142,7 @@ function saswp_get_field_note($pname){
3142
  'realhomes' => saswp_t_string('Requires').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>',
3143
  'myhome' => saswp_t_string('Requires').' <a target="_blank" href="https://myhometheme.net/">My Home Theme</a>',
3144
  'realestate_5' => saswp_t_string('Requires').' <a target="_blank" href="https://myhometheme.net/">WP Pro Realstate 5</a>',
 
3145
  'geodirectory' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/geodirectory/">GeoDirectory – Business Directory</a>',
3146
  'classipress' => saswp_t_string('Requires').' <a target="_blank" href="https://www.appthemes.com/themes/classipress/">ClassiPress</a>',
3147
  'taqyeem' => saswp_t_string('Requires').' <a target="_blank" href="https://codecanyon.net/item/taqyeem-wordpress-review-plugin/4558799">Taqyeem</a>',
2840
 
2841
  remove_all_actions('admin_notices');
2842
 
2843
+ // global $saswp_wisdom;
2844
 
2845
+ // add_action( 'admin_notices', array($saswp_wisdom , 'optin_notice') );
2846
+ // add_action( 'admin_notices', array($saswp_wisdom , 'marketing_notice') );
2847
  add_action( 'admin_notices', 'saswp_admin_notice' );
2848
  }
2849
 
3142
  'realhomes' => saswp_t_string('Requires').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>',
3143
  'myhome' => saswp_t_string('Requires').' <a target="_blank" href="https://myhometheme.net/">My Home Theme</a>',
3144
  'realestate_5' => saswp_t_string('Requires').' <a target="_blank" href="https://myhometheme.net/">WP Pro Realstate 5</a>',
3145
+ 'realestate_7' => saswp_t_string('Requires').' <a target="_blank" href="https://myhometheme.net/">WP Pro Realstate 7</a>',
3146
  'geodirectory' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/geodirectory/">GeoDirectory – Business Directory</a>',
3147
  'classipress' => saswp_t_string('Requires').' <a target="_blank" href="https://www.appthemes.com/themes/classipress/">ClassiPress</a>',
3148
  'taqyeem' => saswp_t_string('Requires').' <a target="_blank" href="https://codecanyon.net/item/taqyeem-wordpress-review-plugin/4558799">Taqyeem</a>',
admin_section/js/main-script.js CHANGED
@@ -1379,6 +1379,15 @@ jQuery(document).ready(function($){
1379
  }
1380
  break;
1381
 
 
 
 
 
 
 
 
 
 
1382
  case 'saswp-stamped-checkbox':
1383
  saswp_compatibliy_notes(current, id);
1384
  if ($(this).is(':checked')) {
1379
  }
1380
  break;
1381
 
1382
+ case 'saswp-realestate-7-checkbox':
1383
+ saswp_compatibliy_notes(current, id);
1384
+ if ($(this).is(':checked')) {
1385
+ $("#saswp-realestate-7").val(1);
1386
+ }else{
1387
+ $("#saswp-realestate-7").val(0);
1388
+ }
1389
+ break;
1390
+
1391
  case 'saswp-stamped-checkbox':
1392
  saswp_compatibliy_notes(current, id);
1393
  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-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,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?(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"),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=&quot;1&quot;]" 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=&quot;your key&quot; secret_key=&quot;your key&quot;]" 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(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,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?(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"),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=&quot;1&quot;]" 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=&quot;your key&quot; secret_key=&quot;your key&quot;]" 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)});
admin_section/settings.php CHANGED
@@ -3112,7 +3112,7 @@ function saswp_compatibility_page_callback(){
3112
  )
3113
  );
3114
  $event_on = array(
3115
- 'label' => 'Event On',
3116
  'id' => 'saswp-event-on-checkbox',
3117
  'name' => 'saswp-event-on-checkbox',
3118
  'type' => 'checkbox',
@@ -3307,6 +3307,19 @@ function saswp_compatibility_page_callback(){
3307
  'name' => 'sd_data[saswp-realestate-5]',
3308
  )
3309
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
3310
 
3311
  $geo_directory = array(
3312
  'label' => 'GeoDirectory – Business Directory Plugin',
@@ -4042,6 +4055,7 @@ function saswp_compatibility_page_callback(){
4042
  $wpresidence['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
4043
  $myhome['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
4044
  $realestate_5['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
 
4045
  $geo_directory['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
4046
 
4047
  }
@@ -4217,6 +4231,7 @@ function saswp_compatibility_page_callback(){
4217
  $myhome,
4218
  $classipress,
4219
  $realestate_5,
 
4220
  $geo_directory,
4221
  $learn_press,
4222
  $learn_dash,
3112
  )
3113
  );
3114
  $event_on = array(
3115
+ 'label' => 'Event On / Event On Lite',
3116
  'id' => 'saswp-event-on-checkbox',
3117
  'name' => 'saswp-event-on-checkbox',
3118
  'type' => 'checkbox',
3307
  'name' => 'sd_data[saswp-realestate-5]',
3308
  )
3309
  );
3310
+
3311
+ $realestate_7 = array(
3312
+ 'label' => 'WP Pro Real Estate 7',
3313
+ 'id' => 'saswp-realestate-7-checkbox',
3314
+ 'name' => 'saswp-realestate-7-checkbox',
3315
+ 'type' => 'checkbox',
3316
+ 'class' => 'checkbox saswp-checkbox',
3317
+ 'note' => saswp_get_field_note('realestate_7'),
3318
+ 'hidden' => array(
3319
+ 'id' => 'saswp-realestate-7',
3320
+ 'name' => 'sd_data[saswp-realestate-7]',
3321
+ )
3322
+ );
3323
 
3324
  $geo_directory = array(
3325
  'label' => 'GeoDirectory – Business Directory Plugin',
4055
  $wpresidence['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
4056
  $myhome['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
4057
  $realestate_5['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
4058
+ $realestate_7['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
4059
  $geo_directory['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
4060
 
4061
  }
4231
  $myhome,
4232
  $classipress,
4233
  $realestate_5,
4234
+ $realestate_7,
4235
  $geo_directory,
4236
  $learn_press,
4237
  $learn_dash,
admin_section/tracking/deactivate-feedback.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $reasons = array(
3
+ 1 => '<li><label><input type="radio" name="saswp_disable_reason" value="temporary"/>' . __('It is only temporary', 'saswp-for-wp') . '</label></li>',
4
+ 2 => '<li><label><input type="radio" name="saswp_disable_reason" value="stopped"/>' . __('I stopped using Schema plugin on my site', 'saswp-for-wp') . '</label></li>',
5
+ 3 => '<li><label><input type="radio" name="saswp_disable_reason" value="missing"/>' . __('I miss a feature', 'saswp-for-wp') . '</label></li>
6
+ <li><input class="mb-box missing" type="text" name="saswp_disable_text[]" value="" placeholder="Please describe the feature"/></li>',
7
+ 4 => '<li><label><input type="radio" name="saswp_disable_reason" value="technical"/>' . __('Technical Issue', 'saswp-for-wp') . '</label></li>
8
+ <li><textarea class="mb-box technical" name="saswp_disable_text[]" placeholder="' . __('How Can we help? Please describe your problem', 'saswp-for-wp') . '"></textarea></li>',
9
+ 5 => '<li><label><input type="radio" name="saswp_disable_reason" value="another plugin"/>' . __('I switched to another plugin', 'saswp-for-wp') . '</label></li>
10
+ <li><input class="mb-box another" type="text" name="saswp_disable_text[]" value="" placeholder="Name of the plugin"/></li>',
11
+ 6 => '<li><label><input type="radio" name="saswp_disable_reason" value="other"/>' . __('Other reason', 'saswp-for-wp') . '</label></li>
12
+ <li><textarea class="mb-box other" name="saswp_disable_text[]" placeholder="' . __('Please specify, if possible', 'saswp-for-wp') . '"></textarea></li>',
13
+ );
14
+ shuffle($reasons);
15
+ ?>
16
+
17
+
18
+ <div id="saswp-reloaded-feedback-overlay" style="display: none;">
19
+ <div id="saswp-reloaded-feedback-content">
20
+ <form action="" method="post">
21
+ <h3><strong><?php _e('If you have a moment, please let us know why you are deactivating:', 'saswp-for-wp'); ?></strong></h3>
22
+ <ul>
23
+ <?php
24
+ foreach ($reasons as $reason){
25
+ echo $reason;
26
+ }
27
+ ?>
28
+ </ul>
29
+ <?php if ($email) : ?>
30
+ <input type="hidden" name="saswp_disable_from" value="<?php echo $email; ?>"/>
31
+ <?php endif; ?>
32
+ <input id="saswp-reloaded-feedback-submit" class="button button-primary" type="submit" name="saswp_disable_submit" value="<?php _e('Submit & Deactivate', 'saswp-for-wp'); ?>"/>
33
+ <a class="button"><?php _e('Only Deactivate', 'saswp-for-wp'); ?></a>
34
+ <a class="saswp-for-wp-feedback-not-deactivate" href="#"><?php _e('Don\'t deactivate', 'saswp-for-wp'); ?></a>
35
+ </form>
36
+ </div>
37
+ </div>
admin_section/tracking/make-better-admin.css ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* makebetter admin css*/
2
+
3
+ /**
4
+ PLUGINS ADMIN PAGE
5
+ */
6
+ #saswp-reloaded-feedback-overlay {
7
+ /* Height & width depends on how you want to reveal the overlay (see JS below) */
8
+ height: 100%;
9
+ width: 100%;
10
+ position: fixed; /* Stay in place */
11
+ z-index: 10000; /* Sit on top */
12
+ left: 0;
13
+ top: 0;
14
+ background-color: rgb(120,120,120); /* Black fallback color */
15
+ background-color: rgba(0,0,0, 0.5); /* Black w/opacity */
16
+ }
17
+ #saswp-reloaded-feedback-content {
18
+ position: relative;
19
+ top: 25%; /* 25% from the top */
20
+ width: 500px;
21
+ max-width: 100%;
22
+ margin: auto;
23
+ margin-top: 30px; /* 30px top margin to avoid conflict with the close button on smaller screens */
24
+ max-height: 50%;
25
+ padding: 20px;
26
+ background-color: #fff;
27
+ overflow-y: auto;
28
+ }
29
+ .mb-box{display: none;width:100%;}
30
+ .saswp-for-wp-feedback-not-deactivate { display: block; text-align: right; }
31
+
32
+ #saswp-reloaded-feedback-content h3{
33
+ margin:5px;
34
+ font-size: 1em;
35
+ }
36
+
37
+ @media screen and (max-width:400px){
38
+ #saswp-reloaded-feedback-content {
39
+ padding:0px;
40
+ padding-bottom:50px;
41
+ }
42
+ }
admin_section/tracking/make-better-admin.js ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var strict;
2
+
3
+ jQuery(document).ready(function ($) {
4
+ /**
5
+ * DEACTIVATION FEEDBACK FORM
6
+ */
7
+ // show overlay when clicked on "deactivate"
8
+ saswp_deactivate_link = $('.wp-admin.plugins-php tr[data-slug="schema-and-structured-data-for-wp"] .row-actions .deactivate a');
9
+ saswp_deactivate_link_url = saswp_deactivate_link.attr('href');
10
+
11
+ saswp_deactivate_link.click(function (e) {
12
+ e.preventDefault();
13
+
14
+ // only show feedback form once per 30 days
15
+ var c_value = saswp_admin_get_cookie("saswp_hide_deactivate_feedback");
16
+
17
+ if (c_value === undefined) {
18
+ $('#saswp-reloaded-feedback-overlay').show();
19
+ } else {
20
+ // click on the link
21
+ window.location.href = saswp_deactivate_link_url;
22
+ }
23
+ });
24
+ // show text fields
25
+ $('#saswp-reloaded-feedback-content input[type="radio"]').click(function () {
26
+ // show text field if there is one
27
+ var inputValue = $(this).attr("value");
28
+ var targetBox = $("." + inputValue);
29
+ $(".mb-box").not(targetBox).hide();
30
+ $(targetBox).show();
31
+ });
32
+ // send form or close it
33
+ $('#saswp-reloaded-feedback-content .button').click(function (e) {
34
+ e.preventDefault();
35
+ // set cookie for 30 days
36
+ var exdate = new Date();
37
+ exdate.setSeconds(exdate.getSeconds() + 2592000);
38
+ document.cookie = "saswp_hide_deactivate_feedback=1; expires=" + exdate.toUTCString() + "; path=/";
39
+
40
+ $('#saswp-reloaded-feedback-overlay').hide();
41
+ if ('saswp-reloaded-feedback-submit' === this.id) {
42
+ // Send form data
43
+ $.ajax({
44
+ type: 'POST',
45
+ url: ajaxurl,
46
+ dataType: 'json',
47
+ data: {
48
+ action: 'saswp_send_feedback',
49
+ data: $('#saswp-reloaded-feedback-content form').serialize()
50
+ },
51
+ complete: function (MLHttpRequest, textStatus, errorThrown) {
52
+ // deactivate the plugin and close the popup
53
+ $('#saswp-reloaded-feedback-overlay').remove();
54
+ window.location.href = saswp_deactivate_link_url;
55
+
56
+ }
57
+ });
58
+ } else {
59
+ $('#saswp-reloaded-feedback-overlay').remove();
60
+ window.location.href = saswp_deactivate_link_url;
61
+ }
62
+ });
63
+ // close form without doing anything
64
+ $('.saswp-for-wp-feedback-not-deactivate').click(function (e) {
65
+ $('#saswp-reloaded-feedback-overlay').hide();
66
+ });
67
+
68
+ function saswp_admin_get_cookie (name) {
69
+ var i, x, y, saswp_cookies = document.cookie.split( ";" );
70
+ for (i = 0; i < saswp_cookies.length; i++)
71
+ {
72
+ x = saswp_cookies[i].substr( 0, saswp_cookies[i].indexOf( "=" ) );
73
+ y = saswp_cookies[i].substr( saswp_cookies[i].indexOf( "=" ) + 1 );
74
+ x = x.replace( /^\s+|\s+$/g, "" );
75
+ if (x === name)
76
+ {
77
+ return unescape( y );
78
+ }
79
+ }
80
+ }
81
+
82
+ }); // document ready
admin_section/tracking/make-better-helper.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if( !defined( 'ABSPATH' ) )
5
+ exit;
6
+
7
+ /**
8
+ * Helper method to check if user is in the plugins page.
9
+ *
10
+ * @author
11
+ * @since 1.4.0
12
+ *
13
+ * @return bool
14
+ */
15
+ function saswp_is_plugins_page() {
16
+ global $pagenow;
17
+
18
+ return ( 'plugins.php' === $pagenow );
19
+ }
20
+
21
+ /**
22
+ * display deactivation logic on plugins page
23
+ *
24
+ * @since 1.4.0
25
+ */
26
+
27
+
28
+ function saswp_add_deactivation_feedback_modal() {
29
+
30
+
31
+ if( !is_admin() && !saswp_is_plugins_page()) {
32
+ return;
33
+ }
34
+
35
+ $current_user = wp_get_current_user();
36
+ if( !($current_user instanceof WP_User) ) {
37
+ $email = '';
38
+ } else {
39
+ $email = trim( $current_user->user_email );
40
+ }
41
+
42
+ require_once SASWP_DIR_NAME. '/admin_section/tracking/deactivate-feedback.php';
43
+
44
+ }
45
+
46
+ /**
47
+ * send feedback via email
48
+ *
49
+ * @since 1.4.0
50
+ */
51
+ function saswp_send_feedback() {
52
+
53
+ if( isset( $_POST['data'] ) ) {
54
+ parse_str( $_POST['data'], $form );
55
+ }
56
+
57
+ $text = '';
58
+ if( isset( $form['saswp_disable_text'] ) ) {
59
+ $text = implode( "\n\r", $form['saswp_disable_text'] );
60
+ }
61
+
62
+ $headers = array();
63
+
64
+ $from = isset( $form['saswp_disable_from'] ) ? $form['saswp_disable_from'] : '';
65
+ if( $from ) {
66
+ $headers[] = "From: $from";
67
+ $headers[] = "Reply-To: $from";
68
+ }
69
+
70
+ $subject = isset( $form['saswp_disable_reason'] ) ? $form['saswp_disable_reason'] : '(no reason given)';
71
+
72
+ $subject = $subject.' - Schema & Structured Data for WP & AMP';
73
+
74
+ if($subject == 'technical - Schema & Structured Data for WP & AMP'){
75
+
76
+ $text = trim($text);
77
+
78
+ if(!empty($text)){
79
+
80
+ $text = 'technical issue description: '.$text;
81
+
82
+ }else{
83
+
84
+ $text = 'no description: '.$text;
85
+ }
86
+
87
+ }
88
+
89
+ $success = wp_mail( 'makebetter@magazine3.in', $subject, $text, $headers );
90
+
91
+ die();
92
+ }
93
+ add_action( 'wp_ajax_saswp_send_feedback', 'saswp_send_feedback' );
94
+
95
+
96
+
97
+ add_action( 'admin_enqueue_scripts', 'saswp_enqueue_makebetter_email_js' );
98
+
99
+ function saswp_enqueue_makebetter_email_js(){
100
+
101
+ if( !is_admin() && !saswp_is_plugins_page()) {
102
+ return;
103
+ }
104
+
105
+ wp_enqueue_script( 'saswp-make-better-js', SASWP_DIR_URI . '/admin_section/tracking/make-better-admin.js', array( 'jquery' ), SASWP_VERSION);
106
+
107
+ wp_enqueue_style( 'saswp-make-better-css', SASWP_DIR_URI . '/admin_section/tracking/make-better-admin.css', false , SASWP_VERSION);
108
+ }
109
+
110
+ if( is_admin() && saswp_is_plugins_page()) {
111
+ add_filter('admin_footer', 'saswp_add_deactivation_feedback_modal');
112
+ }
113
+
114
+
core/array-list/compatibility-list.php CHANGED
@@ -244,8 +244,9 @@ return array(
244
  'part_in' => 'pro',
245
  ),
246
  'event_on' => array(
247
- 'name' => 'Event On',
248
- 'free' => 'eventON/eventon.php',
 
249
  'opt_name' => 'saswp-event-on',
250
  'part_in' => 'pro',
251
  ),
@@ -739,6 +740,12 @@ return array(
739
  'free' => 'realestate-5',
740
  'opt_name' => 'saswp-realestate-5',
741
  'part_in' => 'pro',
 
 
 
 
 
 
742
  ),
743
  'saswp_realhomes' => array(
744
  'name' => 'RealHomes Theme',
244
  'part_in' => 'pro',
245
  ),
246
  'event_on' => array(
247
+ 'name' => 'Event On / Event On Lite',
248
+ 'free' => 'eventon-lite/eventon.php',
249
+ 'pro' => 'eventON/eventon.php',
250
  'opt_name' => 'saswp-event-on',
251
  'part_in' => 'pro',
252
  ),
740
  'free' => 'realestate-5',
741
  'opt_name' => 'saswp-realestate-5',
742
  'part_in' => 'pro',
743
+ ),
744
+ 'realestate_7' => array(
745
+ 'name' => 'WP Pro Realestate 7',
746
+ 'free' => 'realestate-7',
747
+ 'opt_name' => 'saswp-realestate-7',
748
+ 'part_in' => 'pro',
749
  ),
750
  'saswp_realhomes' => array(
751
  'name' => 'RealHomes Theme',
output/flexmls.php CHANGED
@@ -17,196 +17,50 @@ class saswp_flexmls_list extends flexmlsConnectPageCore{
17
  protected $search_criteria;
18
 
19
  function __construct() {
20
-
21
- global $fmc_api;
22
-
23
- if(!empty($fmc_api)){
24
-
25
- parent::__construct($fmc_api);
26
-
27
- }
28
-
29
  add_filter('the_content', array($this,'saswp_content'),9);
30
- add_action('wp_footer', array($this, 'saswp_get_flexidx_listing'));
31
  add_action('amp_post_template_footer',array($this, 'saswp_get_flexidx_listing'));
32
  }
33
  public function saswp_get_flexidx_listing(){
34
 
35
  global $fmc_api;
36
 
37
- if(!empty($fmc_api)){
38
-
39
- $settings = array();
40
-
41
- foreach ($this->shorcode[1] as $shortcodeAttr){
42
-
43
- if (preg_match_all('/(\b\w+)="(.*?(?="\s\w+=|$))/', $shortcodeAttr, $matches)) {
44
-
45
- $settings = array_combine ( $matches[1], $matches[2] );
46
-
47
- }
48
-
49
- $title = isset($settings['title']) ? ($settings['title']) : '';
50
- $source = isset($settings['source']) ? trim($settings['source']) : '';
51
- $display = isset($settings['display']) ? trim($settings['display']) : '';
52
- $days = isset($settings['days']) ? trim($settings['days']) : '';
53
- $property_type = isset($settings['property_type']) ? trim($settings['property_type']): '';
54
- $property_sub_type = isset($settings['property_sub_type']) ? trim($settings['property_sub_type']): '';
55
- $link = isset($settings['link']) ? trim($settings['link']) : '';
56
- $sort = isset($settings['sort']) ? trim($settings['sort']) : '';
57
- $agent = isset($settings['agent']) ? trim($settings['agent']) : '';
58
- $status = isset($settings['status']) ? trim($settings['status'], '"') : '';
59
- $locations = '';
60
-
61
- if ( isset($settings['location']) ) {
62
- $locations = html_entity_decode( flexmlsConnect::clean_comma_list( stripslashes( $settings['location'] ) ) );
63
- }
64
- if ($link == "default") {
65
- $link = flexmlsConnect::get_default_idx_link();
66
- }
67
- $source = (empty($source)) ? "my" : $source;
68
- $pure_conditions = array();
69
-
70
- if (isset($settings['days'])){
71
- $days = $settings['days'];
72
- }
73
- elseif ($display == "open_houses"){
74
- //For backward compatibility. Set # of days for open house default to 10
75
- $days = 10;
76
- }
77
- else{
78
- $days = 1;
79
- if (date("l") == "Monday")
80
- $days = 3;
81
- }
82
-
83
- $flexmls_temp_date = date_default_timezone_get();
84
- date_default_timezone_set('America/Chicago');
85
- $specific_time = date("Y-m-d\TH:i:s.u",strtotime("-".$days." days"));
86
- date_default_timezone_set($flexmls_temp_date);
87
-
88
- if ($display == "new") {
89
- $pure_conditions["OriginalOnMarketTimestamp"] = $specific_time;
90
- }
91
- elseif ($display == "open_houses") {
92
- $pure_conditions['OpenHouses'] = $days;
93
- }
94
- elseif ($display == "price_changes") {
95
- $pure_conditions["PriceChangeTimestamp"] = $specific_time;
96
- }
97
- elseif ($display == "recent_sales") {
98
- $pure_conditions["StatusChangeTimestamp"] = $specific_time;
99
- }
100
-
101
- if ($sort == "recently_changed") {
102
- $pure_conditions['OrderBy'] = "-ModificationTimestamp"; // special tag caught later
103
- }
104
- elseif ($sort == "price_low_high") {
105
- $pure_conditions['OrderBy'] = "+ListPrice";
106
- }
107
- elseif ($sort == "price_high_low") {
108
- $pure_conditions['OrderBy'] = "-ListPrice";
109
- }
110
- elseif ($sort == "open_house"){
111
- $pure_conditions['OrderBy'] = "+OpenHouses";
112
- }
113
- elseif ($sort == "sqft_low_high") {
114
- $pure_conditions['OrderBy'] = "+BuildingAreaTotal";
115
- }
116
- elseif ($sort == "sqft_high_low") {
117
- $pure_conditions['OrderBy'] = "-BuildingAreaTotal";
118
- }
119
- elseif ($sort == "year_built_high_low") {
120
- $pure_conditions['OrderBy'] = "-YearBuilt";
121
- }
122
- elseif ($sort == "year_built_low_high") {
123
- $pure_conditions['OrderBy'] = "+YearBuilt";
124
- }
125
 
126
- $apply_property_type = ($source == 'location') ? true : false;
127
-
128
- if ($source == 'agent') {
129
-
130
- $pure_conditions['ListAgentId'] = $agent;
131
-
132
- }
133
- // parse location search settings
134
- $locations = flexmlsConnect::parse_location_search_string($locations);
135
- if($locations){
136
-
137
- foreach ($locations as $loc) {
138
-
139
- if(array_key_exists($loc['f'], $pure_conditions)) {
140
- $pure_conditions[$loc['f']] .= ',' . $loc['v'];
141
- } else {
142
- $pure_conditions[$loc['f']] = $loc['v'];
143
- }
144
-
145
- }
146
- }
147
 
148
- if ($apply_property_type and !empty($property_type)) {
149
- $pure_conditions['PropertyType'] = $property_type;
150
- $pure_conditions['PropertySubType'] = $property_sub_type;
151
- }
 
 
 
 
152
 
153
- if ($link) {
154
- $link_details = $fmc_api->GetIDXLinkFromTinyId($link);
155
 
156
- if ($link_details['LinkType'] == "SavedSearch") {
157
- $pure_conditions['SavedSearch'] = $link_details['SearchId'];
158
- }
159
- }
160
-
161
- if ($source == "my") {
162
- // make a simple request to /my/listings with no _filter's
163
- $pure_conditions['My'] = 'listings';
164
- }
165
- elseif ($source == "office") {
166
- $pure_conditions['My'] = 'office';
167
- }
168
- elseif ($source == "company") {
169
- $pure_conditions['My'] = 'company';
170
- }
171
 
172
- if ($status) {
173
- $pure_conditions["StandardStatus"] = $status;
174
- }
175
-
176
- $custom_page = new flexmlsConnectPageSearchResults($fmc_api);
177
- $custom_page->title = $title;
178
- $custom_page->input_source = 'shortcode';
179
- $custom_page->input_data = $pure_conditions;
180
- list($params, $cleaned_raw_criteria, $context) = $custom_page->parse_search_parameters_into_api_request();
181
- unset($params['_select']);
182
- $this->search_criteria = $cleaned_raw_criteria;
183
 
184
- require_once( ABSPATH . '/wp-content/plugins/flexmls-idx/lib/flexmlsAPI/Core.php' );
185
- $flexcoreApi = new flexmlsAPI_Core();
186
-
187
- if ($context == "listings") {
188
- $results = $flexcoreApi->GetMyListings($params);
189
-
190
- }
191
- elseif ($context == "office") {
192
- $results = $flexcoreApi->GetOfficeListings($params);
193
- }
194
- elseif ($context == "company") {
195
- $results = $flexcoreApi->GetCompanyListings($params);
196
- }
197
- else {
198
- $cache_time = (strpos($params['_filter'],'ListingCart')!==false) ? 0 : '10m';
199
- $results = $flexcoreApi->GetListings($params, $cache_time);
200
- }
201
- $count = count($results);
202
  echo "\n";
203
  echo '<!-- Schema & Structured Data For WP v'.esc_attr(SASWP_VERSION) .' IDX - -->';
204
  echo "\n";
205
- echo '<script type="application/ld+json">';
206
  echo "\n";
207
- echo "[";
208
 
209
- foreach ($results as $result){
210
 
211
  if($count > 1){
212
 
@@ -221,11 +75,14 @@ class saswp_flexmls_list extends flexmlsConnectPageCore{
221
  $count --;
222
 
223
  }
 
224
  echo ']';
225
  echo "\n";
226
- echo '</script>';
227
- }
228
-
 
 
229
  }
230
 
231
  }
@@ -269,8 +126,8 @@ class saswp_flexmls_list extends flexmlsConnectPageCore{
269
  $sellerpricerange =$sd_data['sd-seller-price-range'];
270
  }
271
 
272
- $link_to_details_criteria = $this->search_criteria;
273
- $link_to_details = flexmlsConnect::make_nice_address_url($result['StandardFields'], $link_to_details_criteria, 'fmc_tag');
274
 
275
  $photos = array();
276
 
17
  protected $search_criteria;
18
 
19
  function __construct() {
20
+
 
 
 
 
 
 
 
 
21
  add_filter('the_content', array($this,'saswp_content'),9);
22
+ add_action('wp_footer', array($this, 'saswp_get_flexidx_listing'));
23
  add_action('amp_post_template_footer',array($this, 'saswp_get_flexidx_listing'));
24
  }
25
  public function saswp_get_flexidx_listing(){
26
 
27
  global $fmc_api;
28
 
29
+ if(!empty($fmc_api)){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
+ $custom_page = new flexmlsConnectPageSearchResults($fmc_api);
33
+ list($params, $cleaned_raw_criteria, $context) = $custom_page->parse_search_parameters_into_api_request();
34
+
35
+ require_once( ABSPATH . '/wp-content/plugins/flexmls-idx/lib/flexmlsAPI/Core.php' );
36
+ $flexcoreApi = new flexmlsAPI_Core();
37
+
38
+ $tag = get_query_var('fmc_tag');
39
+ preg_match('/mls\_(.*?)$/', $tag, $matches);
40
 
41
+ $id_found = $matches[1];
 
42
 
43
+ $filterstr = "ListingId Eq '{$id_found}'";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
+ if ( $mls_id = flexmlsConnect::wp_input_get('m') ) {
46
+ $filterstr .= " and MlsId Eq '".$mls_id."'";
47
+ }
48
+ $params['_filter'] = $filterstr;
49
+ $params['_limit'] = 1;
50
+ $results = $flexcoreApi->GetListings($params);
51
+
52
+ if(!empty($results)){
53
+
54
+ $count = count($results);
 
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  echo "\n";
57
  echo '<!-- Schema & Structured Data For WP v'.esc_attr(SASWP_VERSION) .' IDX - -->';
58
  echo "\n";
59
+ echo '<script class="saswp-schema-markup-output" type="application/ld+json">';
60
  echo "\n";
61
+ echo "[";
62
 
63
+ foreach ($results as $result){
64
 
65
  if($count > 1){
66
 
75
  $count --;
76
 
77
  }
78
+
79
  echo ']';
80
  echo "\n";
81
+ echo '</script>';
82
+ }
83
+
84
+
85
+
86
  }
87
 
88
  }
126
  $sellerpricerange =$sd_data['sd-seller-price-range'];
127
  }
128
 
129
+
130
+ $link_to_details = '';
131
 
132
  $photos = array();
133
 
output/function.php CHANGED
@@ -2663,6 +2663,10 @@ function saswp_append_fetched_reviews($input1, $schema_post_id = null){
2663
  }
2664
 
2665
  function saswp_get_mainEntity($schema_id){
 
 
 
 
2666
 
2667
  global $post;
2668
 
@@ -2759,6 +2763,13 @@ function saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $sche
2759
 
2760
  break;
2761
 
 
 
 
 
 
 
 
2762
  default:
2763
  break;
2764
  }
2663
  }
2664
 
2665
  function saswp_get_mainEntity($schema_id){
2666
+
2667
+ if( (function_exists('ampforwp_is_front_page') && ampforwp_is_front_page()) || is_front_page() ){
2668
+ return array();
2669
+ }
2670
 
2671
  global $post;
2672
 
2763
 
2764
  break;
2765
 
2766
+ case 'Service':
2767
+
2768
+ $data = saswp_service_schema_markup($schema_post_id, $schema_post_id, $all_post_meta);
2769
+ $input1 = array_merge($input1, $data);
2770
+
2771
+ break;
2772
+
2773
  default:
2774
  break;
2775
  }
output/service.php CHANGED
@@ -4262,14 +4262,14 @@ Class saswp_output_service{
4262
  if($product_id_some instanceof WC_Product_Variable) {
4263
 
4264
  $variations = $product_id_some->get_available_variations();
4265
-
4266
  if($variations){
4267
 
4268
  foreach($variations as $value){
4269
 
4270
  $product_variation = wc_get_product( $value['variation_id'] );
4271
- $p_inc_tax = $product_variation->get_price_including_tax();
4272
-
4273
  if($p_inc_tax){
4274
  $varible_prices[] = $p_inc_tax;
4275
  }else{
4262
  if($product_id_some instanceof WC_Product_Variable) {
4263
 
4264
  $variations = $product_id_some->get_available_variations();
4265
+
4266
  if($variations){
4267
 
4268
  foreach($variations as $value){
4269
 
4270
  $product_variation = wc_get_product( $value['variation_id'] );
4271
+ $p_inc_tax = wc_get_price_including_tax($product_variation);
4272
+
4273
  if($p_inc_tax){
4274
  $varible_prices[] = $p_inc_tax;
4275
  }else{
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.9
6
- Stable tag: 1.9.94
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -120,6 +120,16 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
 
 
 
 
 
123
 
124
  = 1.9.94 (18 Feb 2022) =
125
 
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.9
6
+ Stable tag: 1.9.95
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.95 (28 Mar 2022) =
124
+
125
+ * Fixed: Activation of the plugin is causing structure displacement on the website in Admin view. #1637
126
+ * Fixed: Deprecated: WC_Product::get_price_including_tax warning on product page #1627
127
+ * Fixed: Service schema not displaying all fields #1617
128
+ * Enhancement: IDX integration updated #1626
129
+ * Enhancement: Remove old data tracking method and add new system to get user feedback #1623
130
+ * Added: Compatibility with EventON Lite plugin (https://wordpress.org/plugins/eventon-lite/) #1624
131
+ * Added: Compatability with Real Estate 7 WordPress Theme #1619
132
+
133
 
134
  = 1.9.94 (18 Feb 2022) =
135
 
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.94
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.94');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
@@ -79,7 +79,8 @@ require_once SASWP_DIR_NAME.'/admin_section/common-function.php';
79
  require_once SASWP_DIR_NAME .'/output/location.php';
80
  require_once SASWP_DIR_NAME.'/admin_section/fields-generator.php';
81
  require_once SASWP_DIR_NAME.'/admin_section/newsletter.php';
82
- require_once SASWP_DIR_NAME.'/admin_section/plugin-installer/install.php';
 
83
  //Loading View files
84
 
85
  require_once SASWP_DIR_NAME.'/view/help.php';
@@ -139,21 +140,21 @@ function saswp_add_plugin_meta_links($meta_fields, $file) {
139
 
140
  }
141
 
142
- if( ! class_exists( 'SASWP_Plugin_Usage_Tracker') ) {
143
- require_once SASWP_DIR_NAME. '/admin_section/tracking/class-saswp-plugin-usage-tracker.php';
144
- }
145
- if( ! function_exists( 'saswp_start_plugin_tracking' ) ) {
146
- function saswp_start_plugin_tracking() {
147
- global $saswp_wisdom;
148
- $saswp_wisdom = new SASWP_Plugin_Usage_Tracker(
149
- __FILE__,
150
- 'http://data.ampforwp.com/ssdw',
151
- array('sd_data'),
152
- true,
153
- true,
154
- 0
155
- );
156
- }
157
-
158
- saswp_start_plugin_tracking();
159
- }
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.95
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.95');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
79
  require_once SASWP_DIR_NAME .'/output/location.php';
80
  require_once SASWP_DIR_NAME.'/admin_section/fields-generator.php';
81
  require_once SASWP_DIR_NAME.'/admin_section/newsletter.php';
82
+ require_once SASWP_DIR_NAME.'/admin_section/plugin-installer/install.php';
83
+ require_once SASWP_DIR_NAME.'/admin_section/tracking/make-better-helper.php';
84
  //Loading View files
85
 
86
  require_once SASWP_DIR_NAME.'/view/help.php';
140
 
141
  }
142
 
143
+ // if( ! class_exists( 'SASWP_Plugin_Usage_Tracker') ) {
144
+ // require_once SASWP_DIR_NAME. '/admin_section/tracking/class-saswp-plugin-usage-tracker.php';
145
+ // }
146
+ // if( ! function_exists( 'saswp_start_plugin_tracking' ) ) {
147
+ // function saswp_start_plugin_tracking() {
148
+ // global $saswp_wisdom;
149
+ // $saswp_wisdom = new SASWP_Plugin_Usage_Tracker(
150
+ // __FILE__,
151
+ // 'http://data.ampforwp.com/ssdw',
152
+ // array('sd_data'),
153
+ // true,
154
+ // true,
155
+ // 0
156
+ // );
157
+ // }
158
+
159
+ // saswp_start_plugin_tracking();
160
+ // }