Schema & Structured Data for WP & AMP - Version 1.9.88

Version Description

(03 Nov 2021) =

  • Added: An option called "Specific" in the Sorting Filter for Collection feature. #1472
  • Added: Support for SeekToAction in Video Object Schema #1498
  • Added: Support for video object in How to schema. #1513
  • Added: textarea or multiline support for the description. #1456
  • Added: reviewbody and actor properties to Review Schema
  • Added: Two properties(Latitude, Longitude) for ApartmentComplex schema #1524
  • Added: The number of votes each comment has received in the structured data #1523
  • Fixed: Issue with Yell an Yellowpages fetched reviews in collection #1534
  • Fixed: Schema add empty review array to the code #1557
  • Fixed: Invalid author type for review when product individually modified #1556
Download this release

Release Info

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

Code changes from version 1.9.87 to 1.9.88

admin_section/js/functions-list.js CHANGED
@@ -291,6 +291,7 @@
291
  html += '<optgroup label="Review">';
292
  html += '<option value="saswp_review_name">Review Name</option>';
293
  html += '<option value="saswp_review_description">Review Description</option>';
 
294
  html += '<option value="saswp_review_author">Review Author</option>';
295
  html += '<option value="saswp_review_author_url">Review Author Profile URL</option>';
296
  html += '<option value="saswp_review_publisher">Review Publisher</option>';
@@ -471,7 +472,7 @@
471
 
472
  }
473
 
474
- function saswp_create_total_collection(){
475
 
476
  var platform_list = '';
477
 
@@ -489,8 +490,16 @@
489
  value.is_remove = false;
490
  }
491
 
492
- saswp_total_collection.push(value);
493
-
 
 
 
 
 
 
 
 
494
  });
495
 
496
  platform_list += saswp_function_added_platform(key, saswp_collection[key].length );
@@ -1291,6 +1300,7 @@
1291
  function saswp_on_collection_design_change(){
1292
 
1293
  var sorting = jQuery(".saswp-collection-sorting").val();
 
1294
  var design = jQuery(".saswp-collection-desing").val();
1295
  var cols = jQuery("#saswp-collection-cols").val();
1296
  var slider = jQuery(".saswp-slider-type").val();
@@ -1301,6 +1311,7 @@
1301
  var pagination = false;
1302
  var offset = 0;
1303
  var nextpage = perpage;
 
1304
 
1305
  if(jQuery("#saswp-coll-pagination").is(":checked")){
1306
  pagination = true;
@@ -1311,6 +1322,10 @@
1311
  offset = nextpage - perpage;
1312
 
1313
  }
 
 
 
 
1314
 
1315
  //var fomo_visibility = jQuery("#saswp_fomo_visibility").val();
1316
 
@@ -1326,7 +1341,7 @@
1326
  var dots = false;
1327
  }
1328
 
1329
- saswp_create_total_collection();
1330
  saswp_collection_sorting(sorting);
1331
  saswp_collection_total_reviews_id();
1332
  saswp_create_collection_by_design(design, cols, slider, arrow, dots, fomo_inverval, fomo_inverval, pagination, perpage, offset, nextpage);
291
  html += '<optgroup label="Review">';
292
  html += '<option value="saswp_review_name">Review Name</option>';
293
  html += '<option value="saswp_review_description">Review Description</option>';
294
+ html += '<option value="saswp_review_body">Review Body</option>';
295
  html += '<option value="saswp_review_author">Review Author</option>';
296
  html += '<option value="saswp_review_author_url">Review Author Profile URL</option>';
297
  html += '<option value="saswp_review_publisher">Review Publisher</option>';
472
 
473
  }
474
 
475
+ function saswp_create_total_collection( s_rating_enable, s_rating_val ){
476
 
477
  var platform_list = '';
478
 
490
  value.is_remove = false;
491
  }
492
 
493
+ if(s_rating_enable){
494
+
495
+ if( value.saswp_review_rating >= s_rating_val ){
496
+ saswp_total_collection.push(value);
497
+ }
498
+
499
+ }else{
500
+ saswp_total_collection.push(value);
501
+ }
502
+
503
  });
504
 
505
  platform_list += saswp_function_added_platform(key, saswp_collection[key].length );
1300
  function saswp_on_collection_design_change(){
1301
 
1302
  var sorting = jQuery(".saswp-collection-sorting").val();
1303
+ var s_rating_val = jQuery("#saswp_collection_specific_rating_sel").val();
1304
  var design = jQuery(".saswp-collection-desing").val();
1305
  var cols = jQuery("#saswp-collection-cols").val();
1306
  var slider = jQuery(".saswp-slider-type").val();
1311
  var pagination = false;
1312
  var offset = 0;
1313
  var nextpage = perpage;
1314
+ var s_rating_enable = false;
1315
 
1316
  if(jQuery("#saswp-coll-pagination").is(":checked")){
1317
  pagination = true;
1322
  offset = nextpage - perpage;
1323
 
1324
  }
1325
+
1326
+ if(jQuery("#saswp_collection_specific_rating").is(":checked")){
1327
+ s_rating_enable = true;
1328
+ }
1329
 
1330
  //var fomo_visibility = jQuery("#saswp_fomo_visibility").val();
1331
 
1341
  var dots = false;
1342
  }
1343
 
1344
+ saswp_create_total_collection( s_rating_enable, s_rating_val );
1345
  saswp_collection_sorting(sorting);
1346
  saswp_collection_total_reviews_id();
1347
  saswp_create_collection_by_design(design, cols, slider, arrow, dots, fomo_inverval, fomo_inverval, pagination, perpage, offset, nextpage);
admin_section/js/functions-list.min.js CHANGED
@@ -1 +1 @@
1
- var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[],saswp_taxonomy_term=[],saswp_collection=[],saswp_total_collection=[],saswp_total_reviews=[],saswp_coll_json=null,saswp_grid_page=1;function saswp_convert_datetostring(s){var e={};if(s){var a=new Date(s),t=a.getDate(),i=a.getMonth();i+=1;var n=a.getFullYear(),r=a.toLocaleDateString(),p=jQuery(".saswp-collection-date-format").val();p&&"Y-m-d"==p&&(r=n+"-"+i+"-"+t),p&&"d-m-Y"==p&&(r=t+"-"+i+"-"+n),e={time:a.toLocaleTimeString(),date:r}}else e={time:"",date:""};return e}function saswp_taxonomy_term_html(s,e){var a="";return a+="<td>",a+='<select name="saswp_taxonomy_term['+e+']">',jQuery.each(s,function(s,e){a+='<option value="'+s+'">'+e+"</option>"}),a+="</select>",a+="</td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'}function saswp_enable_rating_review(){var s="";jQuery("select#schema_type option:selected").val()&&(s=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&jQuery(".saswp-enable-rating-review-"+s.toLowerCase()).change(function(){jQuery(this).is(":checked")?jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).show():jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).hide(),saswp_enable_rating_automate()}).change()}function saswp_enable_rating_automate(){var s="";jQuery("select#schema_type option:selected").val()&&(s=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&jQuery(".saswp-enable-rating-automate-"+s.toLowerCase()).change(function(){jQuery(this).is(":checked")&&jQuery(this).is(":visible")?(jQuery(this).parent().parent().next().show(),jQuery(this).parent().parent().next().next().hide(),jQuery(this).parent().parent().next().next().next().hide()):(jQuery(this).parent().parent().next().hide(),jQuery(".saswp-enable-rating-review-"+s.toLowerCase()).is(":checked")&&(jQuery(this).parent().parent().next().next().show(),jQuery(this).parent().parent().next().next().next().show()))}).change()}function getParameterByName(s,e){e||(e=window.location.href),s=s.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+s+"(=([^&#]*)|&|#|$)").exec(e);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswpCustomSelect2(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||!jQuery(".saswp-custom-fields-select2").length||jQuery(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(s){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:s.term,action:"saswp_get_custom_meta_fields"}},processResults:function(s){return{results:s}},cache:!0},minimumInputLength:2})}function saswp_reviews_datepicker(){jQuery(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_timepicker(){jQuery(".saswp-timepicker").timepicker({timeFormat:"H:i:s"})}function saswp_item_reviewed_ajax(s,e,a=null){var t=e.val(),i=saswp_localize_data.post_id,n=jQuery(e).attr("data-id"),r=jQuery(e).attr("post-specific"),p=jQuery(".saswp_modify_this_schema_hidden_"+n).val();append_id=null==a?jQuery("#saswp_specific_"+n):jQuery(".saswp-manual-modification"),jQuery.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",modify_this:p,schema_type:s,schema_id:n,post_specific:r,item:t,post_id:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){jQuery(append_id).find(".saswp-table-create-onajax").remove();var e=jQuery(append_id).find(".saswp-table-create-onload");jQuery.each(e,function(s,e){0!=s&&jQuery(this).remove()}),jQuery(append_id).append(s),saswp_schema_datepicker(),saswp_schema_timepicker()})}function saswp_item_reviewed_call(){jQuery(".saswp-item-reviewed").change(function(s){s.preventDefault();var e="";(jQuery("select#schema_type option:selected").val()&&(e=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(e=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===e)&&saswp_item_reviewed_ajax(e,jQuery(this))}).change()}function saswp_compatibliy_notes(s,e){var a=e.replace("-checkbox",""),t=jQuery("#"+a).next("p").text();s.is(":checked")&&""!==t?jQuery("#"+a).next("p").removeClass("saswp_hide"):1==jQuery("#"+a).next("p").attr("data-id")?jQuery("#"+a).next("p").text("This feature is only available in pro version"):jQuery("#"+a).next("p").addClass("saswp_hide")}function saswp_meta_list_html(s,e,a,t,i,n){var r=t;null==r&&(r=Object.keys(a)[0]);var p="";if(p+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+r+']">',jQuery.each(e,function(s,e){p+='<optgroup label="'+e.label+'">',jQuery.each(e["meta-list"],function(s,e){p+='<option value="'+s+'">'+e+"</option>"}),p+="</optgroup>"}),p+="</select>",a){var l=jQuery("select#schema_type option:selected").val(),c="";"Review"==l&&(c=jQuery("select.saswp-item-reivewed-list option:selected").val());var o="<tr>";o+="<td>",o+='<select class="saswp-custom-fields-name">',"Review"==l&&(o+='<optgroup label="Review">',o+='<option value="saswp_review_name">Review Name</option>',o+='<option value="saswp_review_description">Review Description</option>',o+='<option value="saswp_review_author">Review Author</option>',o+='<option value="saswp_review_author_url">Review Author Profile URL</option>',o+='<option value="saswp_review_publisher">Review Publisher</option>',o+='<option value="saswp_review_publisher_url">Review Publisher URL</option>',o+='<option value="saswp_review_rating_value">Review Rating Value</option>',o+='<option value="saswp_review_date_published">Review Published Date</option>',o+='<option value="saswp_review_date_modified">Review Modified Date</option>',o+='<option value="saswp_review_url">Review URL</option>',o+="</optgroup>"),"Review"==l&&(o+='<optgroup label="'+c+'">'),jQuery.each(a,function(s,e){o+='<option value="'+s+'">'+e+"</option>"}),"Review"==l&&(o+="</optgroup>"),o+="</select>",o+="</td>",o+="<td>",o+=p,o+="</td>",o+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',o+="</tr>",jQuery(".saswp-custom-fields-table").append(o),null!=s&&s.removeClass("updating-message")}else jQuery(i).html(p),null!=s&&s.removeClass("updating-message")}function saswp_get_meta_list(s,e,a,t,i,n){saswp_meta_list[e]?saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(r){saswp_meta_list[e]=r[e],saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n)},"json")}function saswp_get_post_specific_schema_fields(s,e,a,t,i,n,r){if(saswp_meta_fields[n]){var p=saswp_fields_html_generator(e,i,n,t,saswp_meta_fields[n]);p&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(p),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",schema_id:i,schema_type:r,meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[n]=a;var r=saswp_fields_html_generator(e,i,n,t,a);r&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(r),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(s,e,a,t,i){var n="";return n+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+s+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var r="";switch((i.name.indexOf("published_date")>-1||i.name.indexOf("date_created")>-1||i.name.indexOf("created_date")>-1||i.name.indexOf("modified_date")>-1||i.name.indexOf("date_published")>-1||i.name.indexOf("date_modified")>-1)&&(r="saswp-datepicker-picker"),i.type){case"number":case"text":n+="<tr><th>"+i.label+'</th><td><input class="'+r+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']"></td></tr>';break;case"textarea":n+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var p="";jQuery.each(i.options,function(s,e){p+='<option value="'+s+'">'+e+"</option>"}),n+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']">'+p+"</select></td></tr>";break;case"media":n+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+s+"_"+e+'" name="'+i.name+"_"+s+"_"+e+'"><input type="hidden" data-id="'+i.name+"_"+s+"_"+e+'_id" name="'+a+e+"["+s+"]["+i.name+'_id]" id="'+i.name+"_"+s+"_"+e+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+s+"_"+e+'_button" name="'+i.name+"_"+s+"_"+e+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+s+"_"+e+'"></div></fieldset></td></tr>'}}),n+="</table></div>"}function saswp_create_total_collection(){var s="";for(var e in saswp_total_collection=[],saswp_collection)saswp_collection[e]&&(jQuery.each(saswp_collection[e],function(s,e){rmv_boolean?e.is_remove=!0:e.is_remove=!1,saswp_total_collection.push(e)}),s+=saswp_function_added_platform(e,saswp_collection[e].length));jQuery(".saswp-platform-added-list").html(""),jQuery(".saswp-platform-added-list").append(s)}function saswp_create_rating_html_by_value(s){var e="";e+='<div class="saswp-rvw-str">';for(var a=0;a<5;a++)if(s>a){var t=s.split(".");t[1]?a<t[0]?e+='<span class="str-ic"></span>':e+='<span class="half-str"></span>':e+='<span class="str-ic"></span>'}else e+='<span class="df-clr"></span>';return e+="</div>"}function saswpChunkArray(s,e){for(var a=JSON.parse(JSON.stringify(s)),t=[];a.length;)t.push(a.splice(0,e));return t}function saswp_function_added_platform(s,e){var a="";return e>0&&(a+='<div class="cancel-btn">',a+="<span>"+jQuery("#saswp-plaftorm-list option[value="+s+"]").text()+"</span><span>("+e+")</span>",a+='<input type="hidden" name="saswp_platform_ids['+s+']" value="'+e+'">',a+='<a platform-id="'+s+'" class="button button-default saswp-remove-platform"></a>',a+="</div>"),a}function saswpCollectionSlider(){jQuery(".saswp-cs").each(function(){var s=jQuery(this),e=s.find(".saswp-sic");function a(){var s=0;jQuery(e).find(".saswp-si").each(function(){s+=jQuery(this).outerWidth()}),e.width(s)}function t(){if(jQuery(".saswp-si.saswp-active").length>0){var s=e.find(".saswp-si.saswp-active").offset().left-e.offset().left;e.css({transform:"translate( -"+s+"px, 0px)"})}}0==e.find(".saswp-si.saswp-active").length&&e.find(".saswp-si").first().addClass("saswp-active"),a(),t(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length;for(i=0;i<t;i++)s.find(".saswp-slider-dots").append("<div class='saswp-dot'></div>");s.find(".saswp-slider-dots").find(".saswp-dot").eq(a).addClass("saswp-active")}(),jQuery(document).ready(function(){a(),t()}),jQuery(window).resize(function(){a(),t()});var n=s.find(".saswp-slider-controls").find(".saswp-slider-next-btn"),r=s.find(".saswp-slider-controls").find(".saswp-slider-prev-btn");n.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=0;t=a+1>e.find(".saswp-si").length-1?0:a+1;var i=e.find(".saswp-si").eq(t),n=e.offset().left,r=i.offset().left-n;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),i.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(t).addClass("saswp-active"),e.css({transform:"translate( -"+r+"px, 0px)"})}()}),r.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length,i=0;i=a-1<0?t-1:a-1;var n=e.find(".saswp-si").eq(i),r=e.offset().left,p=n.offset().left-r;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),n.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(i).addClass("saswp-active"),e.css({transform:"translate( -"+p+"px, 0px)"})}()}),s.find(".saswp-slider-dots").find(".saswp-dot").on("click",function(a){var t=jQuery(this).index(),i=e.find(".saswp-si").eq(t).offset().left-e.offset().left;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),e.find(".saswp-si").eq(t).addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),jQuery(this).addClass("saswp-active"),e.css({transform:"translate( -"+i+"px, 0px)"})})})}function saswp_review_desing_for_slider(s){var e=saswp_convert_datetostring(s.saswp_review_date),a="";return a+='<div class="saswp-r2-sli">',a+='<div class="saswp-r2-b">',a+='<div class="saswp-r2-q">',a+='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="95.333px" height="95.332px" viewBox="0 0 95.333 95.332" style="enable-background:new 0 0 95.333 95.332;" xml:space="preserve"><path d="M30.512,43.939c-2.348-0.676-4.696-1.019-6.98-1.019c-3.527,0-6.47,0.806-8.752,1.793 c2.2-8.054,7.485-21.951,18.013-23.516c0.975-0.145,1.774-0.85,2.04-1.799l2.301-8.23c0.194-0.696,0.079-1.441-0.318-2.045 s-1.035-1.007-1.75-1.105c-0.777-0.106-1.569-0.16-2.354-0.16c-12.637,0-25.152,13.19-30.433,32.076 c-3.1,11.08-4.009,27.738,3.627,38.223c4.273,5.867,10.507,9,18.529,9.313c0.033,0.001,0.065,0.002,0.098,0.002 c9.898,0,18.675-6.666,21.345-16.209c1.595-5.705,0.874-11.688-2.032-16.851C40.971,49.307,36.236,45.586,30.512,43.939z"></path><path d="M92.471,54.413c-2.875-5.106-7.61-8.827-13.334-10.474c-2.348-0.676-4.696-1.019-6.979-1.019 c-3.527,0-6.471,0.806-8.753,1.793c2.2-8.054,7.485-21.951,18.014-23.516c0.975-0.145,1.773-0.85,2.04-1.799l2.301-8.23 c0.194-0.696,0.079-1.441-0.318-2.045c-0.396-0.604-1.034-1.007-1.75-1.105c-0.776-0.106-1.568-0.16-2.354-0.16 c-12.637,0-25.152,13.19-30.434,32.076c-3.099,11.08-4.008,27.738,3.629,38.225c4.272,5.866,10.507,9,18.528,9.312 c0.033,0.001,0.065,0.002,0.099,0.002c9.897,0,18.675-6.666,21.345-16.209C96.098,65.559,95.376,59.575,92.471,54.413z"></path></svg>',a+="</div>",a+='<div class="saswp-rc-cnt">',a+="<p>",a+=s.saswp_review_text,a+="</p>",a+="</div>",a+='<div class="saswp-r2-strs">',a+='<span class="saswp-r2-s">',a+=saswp_create_rating_html_by_value(s.saswp_review_rating),a+="</span>",a+="</div>",a+="</div>",a+='<div class="saswp-rc">',a+='<div class="saswp-rc-a">',a+='<img src="'+s.saswp_reviewer_image+'"/>',a+='<div class="saswp-rc-nm">',a+='<a href="#">'+s.saswp_reviewer_name+"</a>",a+='<span class="saswp-rc-dt">'+e.date+"</span>",a+="</div>",a+='<div class="saswp-rc-lg">',a+='<img src="'+s.saswp_review_platform_icon+'"/>',a+="</div>",a+="</div>",a+="</div>",a+="</div>"}function saswp_create_collection_slider(s,e,a){var t="";if(saswp_total_collection.length>0){if(t+="slider"==s?'<div class="saswp-cst">':'<div class="saswp-cct">',t+='<div class="saswp-cs">',t+='<div class="saswp-sic">',"slider"==s&&jQuery.each(saswp_total_collection,function(s,e){t+='<div class="saswp-si">',t+=saswp_review_desing_for_slider(e),t+="</div>"}),"carousel"==s){var i=saswpChunkArray(saswp_total_collection,3);i&&jQuery.each(i,function(s,e){t+='<div class="saswp-si">',jQuery.each(e,function(s,e){t+=saswp_review_desing_for_slider(e)}),t+="</div>"})}t+="</div>",e&&(t+='<div class="saswp-slider-controls">',t+='<a href="#" class="saswp-slider-prev-btn"></a>',t+='<a href="#" class="saswp-slider-next-btn"></a>',t+="</div>"),a&&(t+='<div class="saswp-slider-dots">',t+="</div>"),t+="</div>",t+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(t),saswpCollectionSlider()}function saswp_create_collection_badge(){var s="";if(saswp_total_collection.length>0){for(var e in s+='<div class="saswp-rd3-warp">',s+="<ul>",saswp_collection){var a="",t="",i=0,n=0,r=1,p="";jQuery.each(saswp_collection[e],function(s,e){p=e.saswp_review_location_id,a=e.saswp_review_platform_icon,"Self"==(t=e.saswp_review_platform_name)&&(t=saswp_localize_data.trans_self),n+=parseFloat(e.saswp_review_rating),i++}),n>0&&(r=n/i),saswp_collection[e]&&(s+="<li>",s+='<a target="_blank" href="'+p+'">',s+='<div class="saswp-r3-lg">',s+="<span>",s+='<img src="'+a+'"/>',s+="</span>",s+='<span class="saswp-r3-tlt">'+t+'</span">',s+="</div>",s+='<div class="saswp-r3-rtng">',s+='<div class="saswp-r3-rtxt">',s+='<span class="saswp-r3-num">',s+=r.toFixed(1),s+="</span>",s+='<span class="saswp-stars">',s+=saswp_create_rating_html_by_value(r.toString()),s+="</span>",s+="</div>",s+='<span class="saswp-r3-brv">',s+=saswp_localize_data.trans_based_on+" "+i+" "+saswp_localize_data.trans_reviews,s+="</span>",s+="</div>",s+="</a>",s+="</li>")}s+="</ul>",s+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_popup(){var s="",e="";if(saswp_total_collection.length>0){var a=0,t=0,i=1;jQuery.each(saswp_total_collection,function(s,i){platform_icon=i.saswp_review_platform_icon,t+=parseFloat(i.saswp_review_rating),a++;var n=saswp_convert_datetostring(i.saswp_review_date);e+="<li>",e+='<div class="saswp-r4-b">',e+='<span class="saswp-r4-str">',e+=saswp_create_rating_html_by_value(i.saswp_review_rating),e+="</span>",e+='<span class="saswp-r4-tx">'+n.date+"</span>",e+="</div>",e+='<div class="saswp-r4-cnt">',e+="<h3>"+i.saswp_reviewer_name+"</h3>",e+="<p>"+i.saswp_review_text+"</p>",e+="</div>",e+="</li>"}),t>0&&(i=t/a),a>0&&(s+='<div id="saswp-sticky-review">',s+='<div class="saswp-open-class saswp-popup-btn">',s+='<div class="saswp-opn-cls-btn">',s+='<div class="saswp-onclick-hide">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</div>",s+='<div class="saswp-onclick-show">',s+="<span>Ratings and reviews</span>",s+='<span class="saswp-mines"></span>',s+="</div>",s+="</div>",s+='<div id="saswp-reviews-cntn">',s+='<div class="saswp-r4-info">',s+="<ul>",s+='<li class="saswp-r4-r">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</li>",s+=e,s+="</ul>",s+="</div>",s+="</div>",s+="</div>",s+="</div>")}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_fomo(s,e){var a="";saswp_total_collection.length>0&&jQuery.each(saswp_total_collection,function(s,e){var t=saswp_convert_datetostring(e.saswp_review_date);a+='<div id="'+s+'" class="saswp-r5">',a+='<div class="saswp-r5-r">',a+='<div class="saswp-r5-lg">',a+="<span>",a+='<img height="70" width="70" src="'+e.saswp_review_platform_icon+'"/>',a+="</span>",a+="</div>",a+='<div class="saswp-r5-rng">',a+=saswp_create_rating_html_by_value(e.saswp_review_rating),a+='<div class="saswp-r5-txrng">',a+="<span>"+e.saswp_review_rating+" Stars</span>",a+="<span>by</span>",a+="<span>"+e.saswp_reviewer_name+"</span>",a+="</div>",a+='<span class="saswp-r5-dt">'+t.date+"</span>",a+="</div>",a+="</div>",a+="</div>"}),jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(a),saswp_fomo_slide(s,e)}function saswp_fomo_slide(s,e){var a=jQuery(".saswp-collection-preview .saswp-r5"),t=a.length,i=0;!function s(){a.eq(i%t).fadeIn(6e3,function(){a.eq(i%t).fadeOut(3e3,s),i++})}()}function saswp_collection_sorting(s){if(saswp_total_collection.length>0)switch(s){case"lowest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating});break;case"highest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating}),saswp_total_collection.reverse();break;case"newest":case"recent":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)}),saswp_total_collection.reverse();break;case"oldest":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)});break;case"random":saswp_total_collection.sort(function(s,e){return.5-Math.random()})}}function saswp_collection_total_reviews_id(){if(saswp_total_collection.length>0){saswp_total_reviews=[],jQuery.each(saswp_total_collection,function(s,e){saswp_total_reviews.push(e.saswp_review_id)});var s='<input type="hidden" id="saswp_total_reviews_list" name="saswp_total_reviews" value="'+JSON.stringify(saswp_total_reviews)+'">';jQuery(".saswp-total-reviews-list").html(""),jQuery(".saswp-total-reviews-list").append(s)}}function saswp_create_collection_grid(s,e,a,t,i){var n="",r="",p=0;if(saswp_total_collection.length>0){p=Math.ceil(saswp_total_collection.length/a),n+='<div class="saswp-r1">';for(var l=1;l<=s;l++)r+=" 1fr";if(s.length>3?n+='<ul style="grid-template-columns:'+r+';overflow-y: scroll;">':n+='<ul style="grid-template-columns:'+r+';overflow-y:hidden;">',saswp_total_collection){var c=saswp_total_collection;e&&a>0&&(c=c.slice(t,i)),jQuery.each(c,function(s,e){var a=saswp_convert_datetostring(e.saswp_review_date);n+="<li>",n+='<div class="saswp-rc">',n+='<div class="saswp-rc-a">',n+='<div class="saswp-r1-aimg">',n+='<img src="'+e.saswp_reviewer_image+'" width="56" height="56"/>',n+="</div>",n+='<div class="saswp-rc-nm">',n+='<a href="#">'+e.saswp_reviewer_name+"</a>",n+=saswp_create_rating_html_by_value(e.saswp_review_rating),a.date&&(n+='<span class="saswp-rc-dt">'+a.date+"</span>"),n+="</div>",n+="</div>",n+='<div class="saswp-rc-lg">',n+='<img src="'+e.saswp_review_platform_icon+'"/>',n+="</div>",n+="</div>",n+='<div class="saswp-rc-cnt">',n+="<p>"+e.saswp_review_text+"</p>",n+="</div>",e.is_remove&&(n+='<span platform-id="'+e.saswp_review_platform+'" data-id="'+e.saswp_review_id+'" class="dashicons dashicons-remove saswp-remove-coll-rv"></span>'),n+="</li>"})}if(n+="</ul>",p>0&&e){n+='<div class="saswp-grid-pagination">',n+='<a class="saswp-grid-page" data-id="1" href="#">&laquo;</a>';var o=parseInt(saswp_grid_page)-3,_=parseInt(saswp_grid_page)+3;for(l=1;l<=p;l++){var w="saswp_hide";l>o&&l<_&&(w=""),n+=l==saswp_grid_page?'<a class="active saswp-grid-page '+w+'" data-id="'+l+'" href="#">'+l+"</a>":'<a class="saswp-grid-page '+w+'" data-id="'+l+'" href="#">'+l+"</a>"}n+='<a class="saswp-grid-page" data-id="'+p+'" href="#">&raquo;</a>',n+="</div>"}n+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(n)}function saswp_create_collection_by_design(s,e,a,t,i,n,r,p,l,c,o){switch(s){case"grid":saswp_create_collection_grid(e,p,l,c,o);break;case"gallery":saswp_create_collection_slider(a,t,i);break;case"badge":saswp_create_collection_badge();break;case"popup":saswp_create_collection_popup();break;case"fomo":saswp_create_collection_fomo(n,r)}}function saswp_on_collection_design_change(){var s=jQuery(".saswp-collection-sorting").val(),e=jQuery(".saswp-collection-desing").val(),a=jQuery("#saswp-collection-cols").val(),t=jQuery(".saswp-slider-type").val(),i=jQuery("#saswp_fomo_interval").val(),n=parseInt(jQuery("#saswp-coll-per-page").val()),r=!1,p=0,l=n;if(jQuery("#saswp-coll-pagination").is(":checked")){r=!0;saswp_grid_page>0&&(l=saswp_grid_page*n),p=l-n}if(jQuery("#saswp_gallery_arrow").is(":checked"))var c=!0;else c=!1;if(jQuery("#saswp_gallery_dots").is(":checked"))var o=!0;else o=!1;saswp_create_total_collection(),saswp_collection_sorting(s),saswp_collection_total_reviews_id(),saswp_create_collection_by_design(e,a,t,c,o,i,i,r,n,p,l)}function saswp_get_collection_data(s,e,a=null,t=null,i=null){jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:s,reviews_ids:i,review_id:t,platform_id:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s.status&&(jQuery.each(s.message,function(s,e){var a=JSON.parse(e.saswp_review_platform),t=[];if(t.push(e),void 0===saswp_collection[a])saswp_collection[a]=t;else{var i=[...new Set([...saswp_collection[a],...t])];saswp_collection[a]=i}}),saswp_on_collection_design_change()),a&&a.removeClass("updating-message")},"json")}function saswpIsEmail(s){return/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(s)}function saswp_select2(){var s=jQuery(".saswp-select2");s.length>0&&jQuery(s).each(function(s,e){var a=jQuery(this),t=jQuery("option[value]:not([selected])",a),i=[];t.each(function(){var s=jQuery(this);i.push({id:s.attr("value"),text:s.text()})});var n=a.attr("data-type"),r=ajaxurl+"?action=saswp_get_select2_data&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&type="+n;a.select2({ajax:{url:r,delay:250,cache:!1},minimumInputLength:2,minimumResultsForSearch:50,dataAdapter:jQuery.fn.select2.amd.require("select2/data/extended-ajax"),defaultResults:i})})}
1
+ var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[],saswp_taxonomy_term=[],saswp_collection=[],saswp_total_collection=[],saswp_total_reviews=[],saswp_coll_json=null,saswp_grid_page=1;function saswp_convert_datetostring(s){var e={};if(s){var a=new Date(s),t=a.getDate(),i=a.getMonth();i+=1;var n=a.getFullYear(),p=a.toLocaleDateString(),r=jQuery(".saswp-collection-date-format").val();r&&"Y-m-d"==r&&(p=n+"-"+i+"-"+t),r&&"d-m-Y"==r&&(p=t+"-"+i+"-"+n),e={time:a.toLocaleTimeString(),date:p}}else e={time:"",date:""};return e}function saswp_taxonomy_term_html(s,e){var a="";return a+="<td>",a+='<select name="saswp_taxonomy_term['+e+']">',jQuery.each(s,function(s,e){a+='<option value="'+s+'">'+e+"</option>"}),a+="</select>",a+="</td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'}function saswp_enable_rating_review(){var s="";jQuery("select#schema_type option:selected").val()&&(s=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&jQuery(".saswp-enable-rating-review-"+s.toLowerCase()).change(function(){jQuery(this).is(":checked")?jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).show():jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).hide(),saswp_enable_rating_automate()}).change()}function saswp_enable_rating_automate(){var s="";jQuery("select#schema_type option:selected").val()&&(s=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&jQuery(".saswp-enable-rating-automate-"+s.toLowerCase()).change(function(){jQuery(this).is(":checked")&&jQuery(this).is(":visible")?(jQuery(this).parent().parent().next().show(),jQuery(this).parent().parent().next().next().hide(),jQuery(this).parent().parent().next().next().next().hide()):(jQuery(this).parent().parent().next().hide(),jQuery(".saswp-enable-rating-review-"+s.toLowerCase()).is(":checked")&&(jQuery(this).parent().parent().next().next().show(),jQuery(this).parent().parent().next().next().next().show()))}).change()}function getParameterByName(s,e){e||(e=window.location.href),s=s.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+s+"(=([^&#]*)|&|#|$)").exec(e);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswpCustomSelect2(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||!jQuery(".saswp-custom-fields-select2").length||jQuery(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(s){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:s.term,action:"saswp_get_custom_meta_fields"}},processResults:function(s){return{results:s}},cache:!0},minimumInputLength:2})}function saswp_reviews_datepicker(){jQuery(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_timepicker(){jQuery(".saswp-timepicker").timepicker({timeFormat:"H:i:s"})}function saswp_item_reviewed_ajax(s,e,a=null){var t=e.val(),i=saswp_localize_data.post_id,n=jQuery(e).attr("data-id"),p=jQuery(e).attr("post-specific"),r=jQuery(".saswp_modify_this_schema_hidden_"+n).val();append_id=null==a?jQuery("#saswp_specific_"+n):jQuery(".saswp-manual-modification"),jQuery.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",modify_this:r,schema_type:s,schema_id:n,post_specific:p,item:t,post_id:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){jQuery(append_id).find(".saswp-table-create-onajax").remove();var e=jQuery(append_id).find(".saswp-table-create-onload");jQuery.each(e,function(s,e){0!=s&&jQuery(this).remove()}),jQuery(append_id).append(s),saswp_schema_datepicker(),saswp_schema_timepicker()})}function saswp_item_reviewed_call(){jQuery(".saswp-item-reviewed").change(function(s){s.preventDefault();var e="";(jQuery("select#schema_type option:selected").val()&&(e=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(e=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===e)&&saswp_item_reviewed_ajax(e,jQuery(this))}).change()}function saswp_compatibliy_notes(s,e){var a=e.replace("-checkbox",""),t=jQuery("#"+a).next("p").text();s.is(":checked")&&""!==t?jQuery("#"+a).next("p").removeClass("saswp_hide"):1==jQuery("#"+a).next("p").attr("data-id")?jQuery("#"+a).next("p").text("This feature is only available in pro version"):jQuery("#"+a).next("p").addClass("saswp_hide")}function saswp_meta_list_html(s,e,a,t,i,n){var p=t;null==p&&(p=Object.keys(a)[0]);var r="";if(r+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+p+']">',jQuery.each(e,function(s,e){r+='<optgroup label="'+e.label+'">',jQuery.each(e["meta-list"],function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),r+="</optgroup>"}),r+="</select>",a){var l=jQuery("select#schema_type option:selected").val(),c="";"Review"==l&&(c=jQuery("select.saswp-item-reivewed-list option:selected").val());var o="<tr>";o+="<td>",o+='<select class="saswp-custom-fields-name">',"Review"==l&&(o+='<optgroup label="Review">',o+='<option value="saswp_review_name">Review Name</option>',o+='<option value="saswp_review_description">Review Description</option>',o+='<option value="saswp_review_body">Review Body</option>',o+='<option value="saswp_review_author">Review Author</option>',o+='<option value="saswp_review_author_url">Review Author Profile URL</option>',o+='<option value="saswp_review_publisher">Review Publisher</option>',o+='<option value="saswp_review_publisher_url">Review Publisher URL</option>',o+='<option value="saswp_review_rating_value">Review Rating Value</option>',o+='<option value="saswp_review_date_published">Review Published Date</option>',o+='<option value="saswp_review_date_modified">Review Modified Date</option>',o+='<option value="saswp_review_url">Review URL</option>',o+="</optgroup>"),"Review"==l&&(o+='<optgroup label="'+c+'">'),jQuery.each(a,function(s,e){o+='<option value="'+s+'">'+e+"</option>"}),"Review"==l&&(o+="</optgroup>"),o+="</select>",o+="</td>",o+="<td>",o+=r,o+="</td>",o+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',o+="</tr>",jQuery(".saswp-custom-fields-table").append(o),null!=s&&s.removeClass("updating-message")}else jQuery(i).html(r),null!=s&&s.removeClass("updating-message")}function saswp_get_meta_list(s,e,a,t,i,n){saswp_meta_list[e]?saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(p){saswp_meta_list[e]=p[e],saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n)},"json")}function saswp_get_post_specific_schema_fields(s,e,a,t,i,n,p){if(saswp_meta_fields[n]){var r=saswp_fields_html_generator(e,i,n,t,saswp_meta_fields[n]);r&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(r),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",schema_id:i,schema_type:p,meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[n]=a;var p=saswp_fields_html_generator(e,i,n,t,a);p&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(p),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(s,e,a,t,i){var n="";return n+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+s+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var p="";switch((i.name.indexOf("published_date")>-1||i.name.indexOf("date_created")>-1||i.name.indexOf("created_date")>-1||i.name.indexOf("modified_date")>-1||i.name.indexOf("date_published")>-1||i.name.indexOf("date_modified")>-1)&&(p="saswp-datepicker-picker"),i.type){case"number":case"text":n+="<tr><th>"+i.label+'</th><td><input class="'+p+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']"></td></tr>';break;case"textarea":n+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var r="";jQuery.each(i.options,function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),n+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']">'+r+"</select></td></tr>";break;case"media":n+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+s+"_"+e+'" name="'+i.name+"_"+s+"_"+e+'"><input type="hidden" data-id="'+i.name+"_"+s+"_"+e+'_id" name="'+a+e+"["+s+"]["+i.name+'_id]" id="'+i.name+"_"+s+"_"+e+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+s+"_"+e+'_button" name="'+i.name+"_"+s+"_"+e+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+s+"_"+e+'"></div></fieldset></td></tr>'}}),n+="</table></div>"}function saswp_create_total_collection(s,e){var a="";for(var t in saswp_total_collection=[],saswp_collection)saswp_collection[t]&&(jQuery.each(saswp_collection[t],function(a,t){rmv_boolean?t.is_remove=!0:t.is_remove=!1,s?t.saswp_review_rating>=e&&saswp_total_collection.push(t):saswp_total_collection.push(t)}),a+=saswp_function_added_platform(t,saswp_collection[t].length));jQuery(".saswp-platform-added-list").html(""),jQuery(".saswp-platform-added-list").append(a)}function saswp_create_rating_html_by_value(s){var e="";e+='<div class="saswp-rvw-str">';for(var a=0;a<5;a++)if(s>a){var t=s.split(".");t[1]?a<t[0]?e+='<span class="str-ic"></span>':e+='<span class="half-str"></span>':e+='<span class="str-ic"></span>'}else e+='<span class="df-clr"></span>';return e+="</div>"}function saswpChunkArray(s,e){for(var a=JSON.parse(JSON.stringify(s)),t=[];a.length;)t.push(a.splice(0,e));return t}function saswp_function_added_platform(s,e){var a="";return e>0&&(a+='<div class="cancel-btn">',a+="<span>"+jQuery("#saswp-plaftorm-list option[value="+s+"]").text()+"</span><span>("+e+")</span>",a+='<input type="hidden" name="saswp_platform_ids['+s+']" value="'+e+'">',a+='<a platform-id="'+s+'" class="button button-default saswp-remove-platform"></a>',a+="</div>"),a}function saswpCollectionSlider(){jQuery(".saswp-cs").each(function(){var s=jQuery(this),e=s.find(".saswp-sic");function a(){var s=0;jQuery(e).find(".saswp-si").each(function(){s+=jQuery(this).outerWidth()}),e.width(s)}function t(){if(jQuery(".saswp-si.saswp-active").length>0){var s=e.find(".saswp-si.saswp-active").offset().left-e.offset().left;e.css({transform:"translate( -"+s+"px, 0px)"})}}0==e.find(".saswp-si.saswp-active").length&&e.find(".saswp-si").first().addClass("saswp-active"),a(),t(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length;for(i=0;i<t;i++)s.find(".saswp-slider-dots").append("<div class='saswp-dot'></div>");s.find(".saswp-slider-dots").find(".saswp-dot").eq(a).addClass("saswp-active")}(),jQuery(document).ready(function(){a(),t()}),jQuery(window).resize(function(){a(),t()});var n=s.find(".saswp-slider-controls").find(".saswp-slider-next-btn"),p=s.find(".saswp-slider-controls").find(".saswp-slider-prev-btn");n.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=0;t=a+1>e.find(".saswp-si").length-1?0:a+1;var i=e.find(".saswp-si").eq(t),n=e.offset().left,p=i.offset().left-n;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),i.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(t).addClass("saswp-active"),e.css({transform:"translate( -"+p+"px, 0px)"})}()}),p.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length,i=0;i=a-1<0?t-1:a-1;var n=e.find(".saswp-si").eq(i),p=e.offset().left,r=n.offset().left-p;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),n.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(i).addClass("saswp-active"),e.css({transform:"translate( -"+r+"px, 0px)"})}()}),s.find(".saswp-slider-dots").find(".saswp-dot").on("click",function(a){var t=jQuery(this).index(),i=e.find(".saswp-si").eq(t).offset().left-e.offset().left;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),e.find(".saswp-si").eq(t).addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),jQuery(this).addClass("saswp-active"),e.css({transform:"translate( -"+i+"px, 0px)"})})})}function saswp_review_desing_for_slider(s){var e=saswp_convert_datetostring(s.saswp_review_date),a="";return a+='<div class="saswp-r2-sli">',a+='<div class="saswp-r2-b">',a+='<div class="saswp-r2-q">',a+='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="95.333px" height="95.332px" viewBox="0 0 95.333 95.332" style="enable-background:new 0 0 95.333 95.332;" xml:space="preserve"><path d="M30.512,43.939c-2.348-0.676-4.696-1.019-6.98-1.019c-3.527,0-6.47,0.806-8.752,1.793 c2.2-8.054,7.485-21.951,18.013-23.516c0.975-0.145,1.774-0.85,2.04-1.799l2.301-8.23c0.194-0.696,0.079-1.441-0.318-2.045 s-1.035-1.007-1.75-1.105c-0.777-0.106-1.569-0.16-2.354-0.16c-12.637,0-25.152,13.19-30.433,32.076 c-3.1,11.08-4.009,27.738,3.627,38.223c4.273,5.867,10.507,9,18.529,9.313c0.033,0.001,0.065,0.002,0.098,0.002 c9.898,0,18.675-6.666,21.345-16.209c1.595-5.705,0.874-11.688-2.032-16.851C40.971,49.307,36.236,45.586,30.512,43.939z"></path><path d="M92.471,54.413c-2.875-5.106-7.61-8.827-13.334-10.474c-2.348-0.676-4.696-1.019-6.979-1.019 c-3.527,0-6.471,0.806-8.753,1.793c2.2-8.054,7.485-21.951,18.014-23.516c0.975-0.145,1.773-0.85,2.04-1.799l2.301-8.23 c0.194-0.696,0.079-1.441-0.318-2.045c-0.396-0.604-1.034-1.007-1.75-1.105c-0.776-0.106-1.568-0.16-2.354-0.16 c-12.637,0-25.152,13.19-30.434,32.076c-3.099,11.08-4.008,27.738,3.629,38.225c4.272,5.866,10.507,9,18.528,9.312 c0.033,0.001,0.065,0.002,0.099,0.002c9.897,0,18.675-6.666,21.345-16.209C96.098,65.559,95.376,59.575,92.471,54.413z"></path></svg>',a+="</div>",a+='<div class="saswp-rc-cnt">',a+="<p>",a+=s.saswp_review_text,a+="</p>",a+="</div>",a+='<div class="saswp-r2-strs">',a+='<span class="saswp-r2-s">',a+=saswp_create_rating_html_by_value(s.saswp_review_rating),a+="</span>",a+="</div>",a+="</div>",a+='<div class="saswp-rc">',a+='<div class="saswp-rc-a">',a+='<img src="'+s.saswp_reviewer_image+'"/>',a+='<div class="saswp-rc-nm">',a+='<a href="#">'+s.saswp_reviewer_name+"</a>",a+='<span class="saswp-rc-dt">'+e.date+"</span>",a+="</div>",a+='<div class="saswp-rc-lg">',a+='<img src="'+s.saswp_review_platform_icon+'"/>',a+="</div>",a+="</div>",a+="</div>",a+="</div>"}function saswp_create_collection_slider(s,e,a){var t="";if(saswp_total_collection.length>0){if(t+="slider"==s?'<div class="saswp-cst">':'<div class="saswp-cct">',t+='<div class="saswp-cs">',t+='<div class="saswp-sic">',"slider"==s&&jQuery.each(saswp_total_collection,function(s,e){t+='<div class="saswp-si">',t+=saswp_review_desing_for_slider(e),t+="</div>"}),"carousel"==s){var i=saswpChunkArray(saswp_total_collection,3);i&&jQuery.each(i,function(s,e){t+='<div class="saswp-si">',jQuery.each(e,function(s,e){t+=saswp_review_desing_for_slider(e)}),t+="</div>"})}t+="</div>",e&&(t+='<div class="saswp-slider-controls">',t+='<a href="#" class="saswp-slider-prev-btn"></a>',t+='<a href="#" class="saswp-slider-next-btn"></a>',t+="</div>"),a&&(t+='<div class="saswp-slider-dots">',t+="</div>"),t+="</div>",t+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(t),saswpCollectionSlider()}function saswp_create_collection_badge(){var s="";if(saswp_total_collection.length>0){for(var e in s+='<div class="saswp-rd3-warp">',s+="<ul>",saswp_collection){var a="",t="",i=0,n=0,p=1,r="";jQuery.each(saswp_collection[e],function(s,e){r=e.saswp_review_location_id,a=e.saswp_review_platform_icon,"Self"==(t=e.saswp_review_platform_name)&&(t=saswp_localize_data.trans_self),n+=parseFloat(e.saswp_review_rating),i++}),n>0&&(p=n/i),saswp_collection[e]&&(s+="<li>",s+='<a target="_blank" href="'+r+'">',s+='<div class="saswp-r3-lg">',s+="<span>",s+='<img src="'+a+'"/>',s+="</span>",s+='<span class="saswp-r3-tlt">'+t+'</span">',s+="</div>",s+='<div class="saswp-r3-rtng">',s+='<div class="saswp-r3-rtxt">',s+='<span class="saswp-r3-num">',s+=p.toFixed(1),s+="</span>",s+='<span class="saswp-stars">',s+=saswp_create_rating_html_by_value(p.toString()),s+="</span>",s+="</div>",s+='<span class="saswp-r3-brv">',s+=saswp_localize_data.trans_based_on+" "+i+" "+saswp_localize_data.trans_reviews,s+="</span>",s+="</div>",s+="</a>",s+="</li>")}s+="</ul>",s+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_popup(){var s="",e="";if(saswp_total_collection.length>0){var a=0,t=0,i=1;jQuery.each(saswp_total_collection,function(s,i){platform_icon=i.saswp_review_platform_icon,t+=parseFloat(i.saswp_review_rating),a++;var n=saswp_convert_datetostring(i.saswp_review_date);e+="<li>",e+='<div class="saswp-r4-b">',e+='<span class="saswp-r4-str">',e+=saswp_create_rating_html_by_value(i.saswp_review_rating),e+="</span>",e+='<span class="saswp-r4-tx">'+n.date+"</span>",e+="</div>",e+='<div class="saswp-r4-cnt">',e+="<h3>"+i.saswp_reviewer_name+"</h3>",e+="<p>"+i.saswp_review_text+"</p>",e+="</div>",e+="</li>"}),t>0&&(i=t/a),a>0&&(s+='<div id="saswp-sticky-review">',s+='<div class="saswp-open-class saswp-popup-btn">',s+='<div class="saswp-opn-cls-btn">',s+='<div class="saswp-onclick-hide">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</div>",s+='<div class="saswp-onclick-show">',s+="<span>Ratings and reviews</span>",s+='<span class="saswp-mines"></span>',s+="</div>",s+="</div>",s+='<div id="saswp-reviews-cntn">',s+='<div class="saswp-r4-info">',s+="<ul>",s+='<li class="saswp-r4-r">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</li>",s+=e,s+="</ul>",s+="</div>",s+="</div>",s+="</div>",s+="</div>")}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_fomo(s,e){var a="";saswp_total_collection.length>0&&jQuery.each(saswp_total_collection,function(s,e){var t=saswp_convert_datetostring(e.saswp_review_date);a+='<div id="'+s+'" class="saswp-r5">',a+='<div class="saswp-r5-r">',a+='<div class="saswp-r5-lg">',a+="<span>",a+='<img height="70" width="70" src="'+e.saswp_review_platform_icon+'"/>',a+="</span>",a+="</div>",a+='<div class="saswp-r5-rng">',a+=saswp_create_rating_html_by_value(e.saswp_review_rating),a+='<div class="saswp-r5-txrng">',a+="<span>"+e.saswp_review_rating+" Stars</span>",a+="<span>by</span>",a+="<span>"+e.saswp_reviewer_name+"</span>",a+="</div>",a+='<span class="saswp-r5-dt">'+t.date+"</span>",a+="</div>",a+="</div>",a+="</div>"}),jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(a),saswp_fomo_slide(s,e)}function saswp_fomo_slide(s,e){var a=jQuery(".saswp-collection-preview .saswp-r5"),t=a.length,i=0;!function s(){a.eq(i%t).fadeIn(6e3,function(){a.eq(i%t).fadeOut(3e3,s),i++})}()}function saswp_collection_sorting(s){if(saswp_total_collection.length>0)switch(s){case"lowest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating});break;case"highest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating}),saswp_total_collection.reverse();break;case"newest":case"recent":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)}),saswp_total_collection.reverse();break;case"oldest":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)});break;case"random":saswp_total_collection.sort(function(s,e){return.5-Math.random()})}}function saswp_collection_total_reviews_id(){if(saswp_total_collection.length>0){saswp_total_reviews=[],jQuery.each(saswp_total_collection,function(s,e){saswp_total_reviews.push(e.saswp_review_id)});var s='<input type="hidden" id="saswp_total_reviews_list" name="saswp_total_reviews" value="'+JSON.stringify(saswp_total_reviews)+'">';jQuery(".saswp-total-reviews-list").html(""),jQuery(".saswp-total-reviews-list").append(s)}}function saswp_create_collection_grid(s,e,a,t,i){var n="",p="",r=0;if(saswp_total_collection.length>0){r=Math.ceil(saswp_total_collection.length/a),n+='<div class="saswp-r1">';for(var l=1;l<=s;l++)p+=" 1fr";if(s.length>3?n+='<ul style="grid-template-columns:'+p+';overflow-y: scroll;">':n+='<ul style="grid-template-columns:'+p+';overflow-y:hidden;">',saswp_total_collection){var c=saswp_total_collection;e&&a>0&&(c=c.slice(t,i)),jQuery.each(c,function(s,e){var a=saswp_convert_datetostring(e.saswp_review_date);n+="<li>",n+='<div class="saswp-rc">',n+='<div class="saswp-rc-a">',n+='<div class="saswp-r1-aimg">',n+='<img src="'+e.saswp_reviewer_image+'" width="56" height="56"/>',n+="</div>",n+='<div class="saswp-rc-nm">',n+='<a href="#">'+e.saswp_reviewer_name+"</a>",n+=saswp_create_rating_html_by_value(e.saswp_review_rating),a.date&&(n+='<span class="saswp-rc-dt">'+a.date+"</span>"),n+="</div>",n+="</div>",n+='<div class="saswp-rc-lg">',n+='<img src="'+e.saswp_review_platform_icon+'"/>',n+="</div>",n+="</div>",n+='<div class="saswp-rc-cnt">',n+="<p>"+e.saswp_review_text+"</p>",n+="</div>",e.is_remove&&(n+='<span platform-id="'+e.saswp_review_platform+'" data-id="'+e.saswp_review_id+'" class="dashicons dashicons-remove saswp-remove-coll-rv"></span>'),n+="</li>"})}if(n+="</ul>",r>0&&e){n+='<div class="saswp-grid-pagination">',n+='<a class="saswp-grid-page" data-id="1" href="#">&laquo;</a>';var o=parseInt(saswp_grid_page)-3,_=parseInt(saswp_grid_page)+3;for(l=1;l<=r;l++){var w="saswp_hide";l>o&&l<_&&(w=""),n+=l==saswp_grid_page?'<a class="active saswp-grid-page '+w+'" data-id="'+l+'" href="#">'+l+"</a>":'<a class="saswp-grid-page '+w+'" data-id="'+l+'" href="#">'+l+"</a>"}n+='<a class="saswp-grid-page" data-id="'+r+'" href="#">&raquo;</a>',n+="</div>"}n+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(n)}function saswp_create_collection_by_design(s,e,a,t,i,n,p,r,l,c,o){switch(s){case"grid":saswp_create_collection_grid(e,r,l,c,o);break;case"gallery":saswp_create_collection_slider(a,t,i);break;case"badge":saswp_create_collection_badge();break;case"popup":saswp_create_collection_popup();break;case"fomo":saswp_create_collection_fomo(n,p)}}function saswp_on_collection_design_change(){var s=jQuery(".saswp-collection-sorting").val(),e=jQuery("#saswp_collection_specific_rating_sel").val(),a=jQuery(".saswp-collection-desing").val(),t=jQuery("#saswp-collection-cols").val(),i=jQuery(".saswp-slider-type").val(),n=jQuery("#saswp_fomo_interval").val(),p=parseInt(jQuery("#saswp-coll-per-page").val()),r=!1,l=0,c=p,o=!1;if(jQuery("#saswp-coll-pagination").is(":checked")){r=!0;saswp_grid_page>0&&(c=saswp_grid_page*p),l=c-p}if(jQuery("#saswp_collection_specific_rating").is(":checked")&&(o=!0),jQuery("#saswp_gallery_arrow").is(":checked"))var _=!0;else _=!1;if(jQuery("#saswp_gallery_dots").is(":checked"))var w=!0;else w=!1;saswp_create_total_collection(o,e),saswp_collection_sorting(s),saswp_collection_total_reviews_id(),saswp_create_collection_by_design(a,t,i,_,w,n,n,r,p,l,c)}function saswp_get_collection_data(s,e,a=null,t=null,i=null){jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:s,reviews_ids:i,review_id:t,platform_id:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s.status&&(jQuery.each(s.message,function(s,e){var a=JSON.parse(e.saswp_review_platform),t=[];if(t.push(e),void 0===saswp_collection[a])saswp_collection[a]=t;else{var i=[...new Set([...saswp_collection[a],...t])];saswp_collection[a]=i}}),saswp_on_collection_design_change()),a&&a.removeClass("updating-message")},"json")}function saswpIsEmail(s){return/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(s)}function saswp_select2(){var s=jQuery(".saswp-select2");s.length>0&&jQuery(s).each(function(s,e){var a=jQuery(this),t=jQuery("option[value]:not([selected])",a),i=[];t.each(function(){var s=jQuery(this);i.push({id:s.attr("value"),text:s.text()})});var n=a.attr("data-type"),p=ajaxurl+"?action=saswp_get_select2_data&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&type="+n;a.select2({ajax:{url:p,delay:250,cache:!1},minimumInputLength:2,minimumResultsForSearch:50,dataAdapter:jQuery.fn.select2.amd.require("select2/data/extended-ajax"),defaultResults:i})})}
admin_section/js/main-script.js CHANGED
@@ -3246,7 +3246,7 @@ jQuery(document).ready(function($){
3246
  var media_name = 'saswp_fixed_image['+field_name+']';
3247
 
3248
  if(meta_val == 'manual_text'){
3249
- html += '<td><input type="text" name="saswp_fixed_text['+field_name+']"></td>';
3250
  html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
3251
 
3252
  $(this).parent().parent('tr').find("td:gt(1)").remove();
@@ -3737,8 +3737,8 @@ jQuery(document).ready(function($){
3737
 
3738
  $(".saswp-coll-settings-options").change(function(){
3739
  saswp_grid_page = 1;
3740
- var design = $(".saswp-collection-desing").val();
3741
-
3742
  $(".saswp-coll-options").addClass('saswp_hide');
3743
  $(".saswp-collection-lp").css('height', 'auto');
3744
  $(".saswp-rmv-coll-rv").hide();
@@ -3762,6 +3762,27 @@ jQuery(document).ready(function($){
3762
  if(design == 'popup'){
3763
  $(".saswp-collection-lp").css('height', '31px');
3764
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3765
 
3766
  saswp_on_collection_design_change();
3767
 
3246
  var media_name = 'saswp_fixed_image['+field_name+']';
3247
 
3248
  if(meta_val == 'manual_text'){
3249
+ html += '<td><textarea cols="35" rows="2" name="saswp_fixed_text['+field_name+']"></textarea></td>';
3250
  html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
3251
 
3252
  $(this).parent().parent('tr').find("td:gt(1)").remove();
3737
 
3738
  $(".saswp-coll-settings-options").change(function(){
3739
  saswp_grid_page = 1;
3740
+ var design = $(".saswp-collection-desing").val();
3741
+ var sorting = $(".saswp-collection-sorting").val();
3742
  $(".saswp-coll-options").addClass('saswp_hide');
3743
  $(".saswp-collection-lp").css('height', 'auto');
3744
  $(".saswp-rmv-coll-rv").hide();
3762
  if(design == 'popup'){
3763
  $(".saswp-collection-lp").css('height', '31px');
3764
  }
3765
+
3766
+ if($("#saswp_collection_specific_rating").is(':checked')){
3767
+ $("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide");
3768
+ }else{
3769
+ $("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide");
3770
+ }
3771
+
3772
+ if(sorting == 'recent'){
3773
+ $("#saswp_collection_specific_rating").parent().parent().removeClass("saswp_hide");
3774
+ $("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide");
3775
+
3776
+ if($("#saswp_collection_specific_rating").is(':checked')){
3777
+ $("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide");
3778
+ }else{
3779
+ $("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide");
3780
+ }
3781
+
3782
+ }else{
3783
+ $("#saswp_collection_specific_rating").parent().parent().addClass("saswp_hide");
3784
+ $("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide");
3785
+ }
3786
 
3787
  saswp_on_collection_design_change();
3788
 
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:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>'+saswp_localize_data.translable_txt.reviews+'</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">'+saswp_localize_data.translable_txt.fetch+'</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-blocks-field").val(),c=s("#saswp_google_place_api_key").val(),p=s("#reviews_addon_license_key").val(),o=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=i%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(p||c)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:o,reviews_api:p,location:t,blocks:i,g_api:c,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),""==c&&alert(saswp_localize_data.translable_txt.enter_api_key),""==p&&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?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><input type="text" name="saswp_fixed_text['+i+']"></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();e&&jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:"",platform_id:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if(e.status&&e.message){var a="";if(s.each(e.message,function(s,e){a+='<option value="'+e.saswp_review_id+'">'+e.saswp_reviewer_name+" ( "+e.saswp_review_rating+" ) </option>"}),a){var t="";t+='<select id="saswp_dynamic_reviews_list" class="saswp-select2">',t+=a,t+="</select>",t+='<a class="button button-default saswp-add-single-rv">Add</a>',s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after(t),saswp_select2()}}},"json")}),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();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"),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:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>'+saswp_localize_data.translable_txt.reviews+'</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">'+saswp_localize_data.translable_txt.fetch+'</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-blocks-field").val(),c=s("#saswp_google_place_api_key").val(),p=s("#reviews_addon_license_key").val(),o=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=i%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(p||c)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:o,reviews_api:p,location:t,blocks:i,g_api:c,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),""==c&&alert(saswp_localize_data.translable_txt.enter_api_key),""==p&&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?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();e&&jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:"",platform_id:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if(e.status&&e.message){var a="";if(s.each(e.message,function(s,e){a+='<option value="'+e.saswp_review_id+'">'+e.saswp_reviewer_name+" ( "+e.saswp_review_rating+" ) </option>"}),a){var t="";t+='<select id="saswp_dynamic_reviews_list" class="saswp-select2">',t+=a,t+="</select>",t+='<a class="button button-default saswp-add-single-rv">Add</a>',s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after(t),saswp_select2()}}},"json")}),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)});
core/array-list/repeater-fields.php CHANGED
@@ -432,7 +432,27 @@ return array( 'schema_type_element' => array(
432
  'label' => 'Step Image',
433
  'name' => 'saswp_howto_step_image',
434
  'type' => 'media',
435
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
436
  ),
437
  'recipe_instructions' => array(
438
  array(
432
  'label' => 'Step Image',
433
  'name' => 'saswp_howto_step_image',
434
  'type' => 'media',
435
+ ),
436
+ array(
437
+ 'label' => 'Video Clip Name',
438
+ 'name' => 'saswp_howto_video_clip_name',
439
+ 'type' => 'text',
440
+ ),
441
+ array(
442
+ 'label' => 'Video Clip URL',
443
+ 'name' => 'saswp_howto_video_clip_url',
444
+ 'type' => 'text',
445
+ ),
446
+ array(
447
+ 'label' => 'Video Clip StartOffset',
448
+ 'name' => 'saswp_howto_video_start_offset',
449
+ 'type' => 'number',
450
+ ),
451
+ array(
452
+ 'label' => 'Video Clip EndOffset',
453
+ 'name' => 'saswp_howto_video_end_offset',
454
+ 'type' => 'number',
455
+ )
456
  ),
457
  'recipe_instructions' => array(
458
  array(
core/array-list/schema-properties.php CHANGED
@@ -3120,6 +3120,22 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
3120
  'label' => 'Location Phone',
3121
  'id' => 'saswp_apartment_complex_phone_'.$schema_id,
3122
  'type' => 'text',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3123
  )
3124
  );
3125
 
@@ -3563,6 +3579,12 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
3563
  'id' => 'saswp_review_description_'.$schema_id,
3564
  'type' => 'textarea',
3565
  'default' => saswp_strip_all_tags(get_the_excerpt())
 
 
 
 
 
 
3566
  );
3567
  $meta_field[] = array(
3568
  'label' => 'Review Author',
@@ -3934,6 +3956,16 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
3934
  'id' => 'saswp_video_object_embed_url_'.$schema_id,
3935
  'type' => 'text',
3936
  'default' => isset($video_links[0]['video_url']) ? $video_links[0]['video_url'] : get_permalink()
 
 
 
 
 
 
 
 
 
 
3937
  ),
3938
  array(
3939
  'label' => 'Main Entity Id',
@@ -4204,6 +4236,64 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
4204
  'id' => 'saswp_howto_ec_schema_date_modified_'.$schema_id,
4205
  'type' => 'text',
4206
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4207
  array(
4208
  'label' => 'Supplies',
4209
  'id' => 'saswp_howto_schema_supplies_'.$schema_id,
@@ -7001,6 +7091,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
7001
  'id' => 'saswp_movie_director_'.$schema_id,
7002
  'type' => 'text',
7003
  ),
 
 
 
 
 
7004
  array(
7005
  'label' => 'Aggregate Rating',
7006
  'id' => 'saswp_movie_enable_rating_'.$schema_id,
3120
  'label' => 'Location Phone',
3121
  'id' => 'saswp_apartment_complex_phone_'.$schema_id,
3122
  'type' => 'text',
3123
+ ),
3124
+ array(
3125
+ 'label' => 'GeoCoordinates Latitude',
3126
+ 'id' => 'saswp_apartment_complex_latitude_'.$schema_id,
3127
+ 'type' => 'text',
3128
+ 'attributes' => array(
3129
+ 'placeholder' => '17.412'
3130
+ ),
3131
+ ),
3132
+ array(
3133
+ 'label' => 'GeoCoordinates Longitude',
3134
+ 'id' => 'saswp_apartment_complex_longitude_'.$schema_id,
3135
+ 'type' => 'text',
3136
+ 'attributes' => array(
3137
+ 'placeholder' => '78.433'
3138
+ ),
3139
  )
3140
  );
3141
 
3579
  'id' => 'saswp_review_description_'.$schema_id,
3580
  'type' => 'textarea',
3581
  'default' => saswp_strip_all_tags(get_the_excerpt())
3582
+ );
3583
+ $meta_field[] = array(
3584
+ 'label' => 'Review Body',
3585
+ 'id' => 'saswp_review_body_'.$schema_id,
3586
+ 'type' => 'textarea',
3587
+ 'default' => saswp_strip_all_tags(get_the_excerpt())
3588
  );
3589
  $meta_field[] = array(
3590
  'label' => 'Review Author',
3956
  'id' => 'saswp_video_object_embed_url_'.$schema_id,
3957
  'type' => 'text',
3958
  'default' => isset($video_links[0]['video_url']) ? $video_links[0]['video_url'] : get_permalink()
3959
+ ),
3960
+ array(
3961
+ 'label' => 'Seek To Video URL',
3962
+ 'id' => 'saswp_video_object_seek_to_video_url_'.$schema_id,
3963
+ 'type' => 'text'
3964
+ ),
3965
+ array(
3966
+ 'label' => 'Seek To Second Number',
3967
+ 'id' => 'saswp_video_object_seek_to_seconds_'.$schema_id,
3968
+ 'type' => 'number'
3969
  ),
3970
  array(
3971
  'label' => 'Main Entity Id',
4236
  'id' => 'saswp_howto_ec_schema_date_modified_'.$schema_id,
4237
  'type' => 'text',
4238
  ),
4239
+
4240
+ array(
4241
+ 'label' => 'Video Name',
4242
+ 'id' => 'saswp_howto_schema_video_name_'.$schema_id,
4243
+ 'type' => 'text',
4244
+ 'attributes' => array(
4245
+ 'placeholder' => 'Build a Trivia Game for the Google Assistant with No Code'
4246
+ ),
4247
+ ),
4248
+ array(
4249
+ 'label' => 'Video Description',
4250
+ 'id' => 'saswp_howto_schema_video_description_'.$schema_id,
4251
+ 'type' => 'textarea',
4252
+ 'attributes' => array(
4253
+ 'placeholder' => 'Learn how to create a Trivia action for Assistant within minutes.'
4254
+ ),
4255
+ ),
4256
+ array(
4257
+ 'label' => 'Video Thumbnail URL',
4258
+ 'id' => 'saswp_howto_schema_video_thumbnail_url_'.$schema_id,
4259
+ 'type' => 'text',
4260
+ 'attributes' => array(
4261
+ 'placeholder' => 'https://example.com/photos/photo.jpg'
4262
+ ),
4263
+ ),
4264
+ array(
4265
+ 'label' => 'Video Content URL',
4266
+ 'id' => 'saswp_howto_schema_video_content_url_'.$schema_id,
4267
+ 'type' => 'text',
4268
+ 'attributes' => array(
4269
+ 'placeholder' => 'https://www.youtube.com/watch?v=4AOI1tZrgMI'
4270
+ ),
4271
+ ),
4272
+ array(
4273
+ 'label' => 'Video Embed URL',
4274
+ 'id' => 'saswp_howto_schema_video_embed_url_'.$schema_id,
4275
+ 'type' => 'text',
4276
+ 'attributes' => array(
4277
+ 'placeholder' => 'https://www.youtube.com/embed/4AOI1tZrgMI'
4278
+ ),
4279
+ ),
4280
+ array(
4281
+ 'label' => 'Video Upload Date',
4282
+ 'id' => 'saswp_howto_schema_video_upload_date_'.$schema_id,
4283
+ 'type' => 'text',
4284
+ 'attributes' => array(
4285
+ 'placeholder' => '2019-01-05'
4286
+ ),
4287
+ ),
4288
+ array(
4289
+ 'label' => 'Video Duration',
4290
+ 'id' => 'saswp_howto_schema_video_duration_'.$schema_id,
4291
+ 'type' => 'text',
4292
+ 'attributes' => array(
4293
+ 'placeholder' => 'P1MT10S'
4294
+ ),
4295
+ ),
4296
+
4297
  array(
4298
  'label' => 'Supplies',
4299
  'id' => 'saswp_howto_schema_supplies_'.$schema_id,
7091
  'id' => 'saswp_movie_director_'.$schema_id,
7092
  'type' => 'text',
7093
  ),
7094
+ array(
7095
+ 'label' => 'Actor',
7096
+ 'id' => 'saswp_movie_actor_'.$schema_id,
7097
+ 'type' => 'text',
7098
+ ),
7099
  array(
7100
  'label' => 'Aggregate Rating',
7101
  'id' => 'saswp_movie_enable_rating_'.$schema_id,
modules/reviews/reviews_collection.php CHANGED
@@ -571,6 +571,14 @@ class SASWP_Reviews_Collection {
571
  'lowest' => 'Lowest Rating',
572
  'random' => 'Random'
573
  );
 
 
 
 
 
 
 
 
574
 
575
  $coll_display_type = array(
576
  'shortcode' => 'Shortcode',
@@ -744,6 +752,25 @@ class SASWP_Reviews_Collection {
744
  ?>
745
  </select>
746
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
747
  </div>
748
  </li>
749
  <li>
@@ -898,9 +925,11 @@ class SASWP_Reviews_Collection {
898
  $post_meta['saswp_collection_design'] = isset($_POST['saswp_collection_design']) ? sanitize_text_field($_POST['saswp_collection_design']) : '';
899
  $post_meta['saswp_collection_date_format'] = isset($_POST['saswp_collection_date_format']) ? sanitize_text_field($_POST['saswp_collection_date_format']) : '';
900
  $post_meta['saswp_collection_sorting'] = isset($_POST['saswp_collection_sorting']) ? sanitize_text_field($_POST['saswp_collection_sorting']) : '';
 
901
  $post_meta['saswp_collection_display_type'] = $display_type;
902
  $post_meta['saswp_collection_gallery_type'] = isset($_POST['saswp_collection_gallery_type']) ? sanitize_text_field($_POST['saswp_collection_gallery_type']) : '';
903
  $post_meta['saswp_collection_cols'] = isset($_POST['saswp_collection_cols']) ? intval($_POST['saswp_collection_cols']) : '';
 
904
  $post_meta['saswp_gallery_arrow'] = isset($_POST['saswp_gallery_arrow']) ? intval($_POST['saswp_gallery_arrow']) : '';
905
  $post_meta['saswp_gallery_dots'] = isset($_POST['saswp_gallery_dots']) ? intval($_POST['saswp_gallery_dots']) : '';
906
  $post_meta['saswp_collection_pagination'] = isset($_POST['saswp_collection_pagination']) ? intval($_POST['saswp_collection_pagination']) : '';
571
  'lowest' => 'Lowest Rating',
572
  'random' => 'Random'
573
  );
574
+
575
+ $rating_specific_sel = array(
576
+ 5 => 5,
577
+ 4 => 4,
578
+ 3 => 3,
579
+ 2 => 2,
580
+ 1 => 1
581
+ );
582
 
583
  $coll_display_type = array(
584
  'shortcode' => 'Shortcode',
752
  ?>
753
  </select>
754
  </div>
755
+
756
+ <div class="saswp-dp-dsg saswp-dp-dtm">
757
+ <span><?php echo saswp_t_string( 'Specific Rating' ); ?></span>
758
+ <span><input name="saswp_collection_specific_rating" type="checkbox" id="saswp_collection_specific_rating" class="saswp-coll-settings-options" value="1" <?php echo (isset($post_meta['saswp_collection_specific_rating'][0]) && $post_meta['saswp_collection_specific_rating'][0] == 1 ? 'checked' : '' ); ?>></span>
759
+ </div>
760
+
761
+ <div class="saswp-dp-dsg">
762
+ <lable><?php echo saswp_t_string('Rating'); ?></lable>
763
+ <select id="saswp_collection_specific_rating_sel" name="saswp_collection_specific_rating_sel" class="saswp-coll-settings-options saswp-coll-settings-options">
764
+ <?php
765
+ foreach($rating_specific_sel as $key => $val){
766
+ echo '<option value="'.esc_attr($key).'" '.($post_meta['saswp_collection_specific_rating_sel'][0] == $key ? 'selected':'').' >'.saswp_t_string( $val ).'</option>';
767
+
768
+ }
769
+
770
+ ?>
771
+ </select>
772
+ </div>
773
+
774
  </div>
775
  </li>
776
  <li>
925
  $post_meta['saswp_collection_design'] = isset($_POST['saswp_collection_design']) ? sanitize_text_field($_POST['saswp_collection_design']) : '';
926
  $post_meta['saswp_collection_date_format'] = isset($_POST['saswp_collection_date_format']) ? sanitize_text_field($_POST['saswp_collection_date_format']) : '';
927
  $post_meta['saswp_collection_sorting'] = isset($_POST['saswp_collection_sorting']) ? sanitize_text_field($_POST['saswp_collection_sorting']) : '';
928
+ $post_meta['saswp_collection_specific_rating'] = isset($_POST['saswp_collection_specific_rating']) ? sanitize_text_field($_POST['saswp_collection_specific_rating']) : '';
929
  $post_meta['saswp_collection_display_type'] = $display_type;
930
  $post_meta['saswp_collection_gallery_type'] = isset($_POST['saswp_collection_gallery_type']) ? sanitize_text_field($_POST['saswp_collection_gallery_type']) : '';
931
  $post_meta['saswp_collection_cols'] = isset($_POST['saswp_collection_cols']) ? intval($_POST['saswp_collection_cols']) : '';
932
+ $post_meta['saswp_collection_specific_rating_sel'] = isset($_POST['saswp_collection_specific_rating_sel']) ? intval($_POST['saswp_collection_specific_rating_sel']) : '';
933
  $post_meta['saswp_gallery_arrow'] = isset($_POST['saswp_gallery_arrow']) ? intval($_POST['saswp_gallery_arrow']) : '';
934
  $post_meta['saswp_gallery_dots'] = isset($_POST['saswp_gallery_dots']) ? intval($_POST['saswp_gallery_dots']) : '';
935
  $post_meta['saswp_collection_pagination'] = isset($_POST['saswp_collection_pagination']) ? intval($_POST['saswp_collection_pagination']) : '';
output/function.php CHANGED
@@ -1193,8 +1193,13 @@ function saswp_extract_wp_post_ratings(){
1193
  function saswp_get_comments($post_id){
1194
 
1195
  global $sd_data;
 
 
 
 
 
1196
 
1197
- $comments = array();
1198
  $post_comments = array();
1199
 
1200
  $is_bbpress = false;
@@ -1237,12 +1242,31 @@ function saswp_get_comments($post_id){
1237
  if ( count( $post_comments ) ) {
1238
 
1239
  foreach ( $post_comments as $comment ) {
1240
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1241
  $comments[] = array (
1242
- '@type' => 'Comment',
1243
- 'id' => trailingslashit(get_permalink()).'comment-'.$comment->comment_ID,
1244
- 'dateCreated' => $is_bbpress ? $comment->comment_date : saswp_format_date_time($comment->comment_date),
1245
- 'description' => strip_tags($comment->comment_content),
 
 
1246
  'author' => array (
1247
  '@type' => 'Person',
1248
  'name' => esc_attr($comment->comment_author),
1193
  function saswp_get_comments($post_id){
1194
 
1195
  global $sd_data;
1196
+ $wpdiscuz = false;
1197
+
1198
+ if(isset($sd_data['saswp-wpdiscuz']) && $sd_data['saswp-wpdiscuz'] == 1 && is_plugin_active('wpdiscuz/class.WpdiscuzCore.php') ){
1199
+ $wpdiscuz = true;
1200
+ }
1201
 
1202
+ $comments = array();
1203
  $post_comments = array();
1204
 
1205
  $is_bbpress = false;
1242
  if ( count( $post_comments ) ) {
1243
 
1244
  foreach ( $post_comments as $comment ) {
1245
+
1246
+ $likes = 0;
1247
+ $dislikes = 0;
1248
+
1249
+ if($wpdiscuz){
1250
+
1251
+ $wpdiscuz_votes = get_comment_meta($comment->comment_ID, 'wpdiscuz_votes_seperate', true);
1252
+
1253
+ if(isset($wpdiscuz_votes['like'])){
1254
+ $likes = $wpdiscuz_votes['like'];
1255
+ }
1256
+
1257
+ if(isset($wpdiscuz_votes['dislike'])){
1258
+ $dislikes = $wpdiscuz_votes['dislike'];
1259
+ }
1260
+ }
1261
+
1262
+
1263
  $comments[] = array (
1264
+ '@type' => 'Comment',
1265
+ 'id' => trailingslashit(get_permalink()).'comment-'.$comment->comment_ID,
1266
+ 'dateCreated' => $is_bbpress ? $comment->comment_date : saswp_format_date_time($comment->comment_date),
1267
+ 'description' => strip_tags($comment->comment_content),
1268
+ 'upvoteCount' => $likes,
1269
+ 'downvoteCount' => $dislikes,
1270
  'author' => array (
1271
  '@type' => 'Person',
1272
  'name' => esc_attr($comment->comment_author),
output/markup.php CHANGED
@@ -29,7 +29,7 @@ function saswp_get_reviews_schema_markup($reviews){
29
 
30
  $sumofrating += $rv['saswp_review_rating'];
31
 
32
- if($rv['saswp_review_rating'] && $rv['saswp_reviewer_name']){
33
 
34
  $reviews_arr[] = array(
35
  '@type' => 'Review',
@@ -180,6 +180,13 @@ function saswp_movie_schema_markup($schema_id, $schema_post_id, $all_post_meta){
180
  $input1['director']['name'] = $all_post_meta['saswp_movie_director_'.$schema_id][0];
181
 
182
  }
 
 
 
 
 
 
 
183
 
184
  if(saswp_remove_warnings($all_post_meta, 'saswp_movie_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_movie_rating_value_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_movie_rating_count_'.$schema_id, 'saswp_array')){
185
 
@@ -237,7 +244,30 @@ function saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta){
237
  $input1['estimatedCost']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_value_'.$schema_id, 'saswp_array');
238
  }
239
 
 
240
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  $supply_arr = array();
242
  if(!empty($supply)){
243
 
@@ -293,10 +323,10 @@ function saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta){
293
  }
294
 
295
  //step
296
-
297
  $step_arr = array();
298
  if(!empty($step)){
299
-
300
  foreach($step as $key => $val){
301
 
302
  $supply_data = array();
@@ -333,16 +363,36 @@ function saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta){
333
 
334
  }
335
 
336
- $step_arr[] = $supply_data;
337
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  }
339
 
340
  $input1['step'] = $step_arr;
341
 
342
  }
343
 
 
 
 
 
 
 
344
  $input1['totalTime'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_schema_totaltime_'.$schema_id, 'saswp_array');
345
-
346
  return $input1;
347
  }
348
 
@@ -1103,7 +1153,7 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
1103
 
1104
  $review_fields['@type'] = 'Review';
1105
  $review_fields['author']['@type'] = 'Person';
1106
- $review_fields['author'] = esc_attr($review['saswp_product_reviews_reviewer_name']);
1107
 
1108
  if(isset($review['saswp_product_reviews_created_date'])){
1109
  $review_fields['datePublished'] = esc_html($review['saswp_product_reviews_created_date']);
@@ -1140,7 +1190,7 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
1140
 
1141
  $review_fields['@type'] = 'Review';
1142
  $review_fields['author']['@type'] = 'Person';
1143
- $review_fields['author'] = esc_attr($review['author']);
1144
  $review_fields['datePublished'] = esc_html($review['datePublished']);
1145
  $review_fields['description'] = $review['description'];
1146
 
@@ -2733,7 +2783,15 @@ function saswp_apartment_complex_schema_markup($schema_id, $schema_post_id, $all
2733
  $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_region_'.$schema_id, 'saswp_array');
2734
  $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_postalcode_'.$schema_id, 'saswp_array');
2735
  $input1['address']['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_phone_'.$schema_id, 'saswp_array');
2736
-
 
 
 
 
 
 
 
 
2737
  return $input1;
2738
 
2739
  }
@@ -3289,7 +3347,7 @@ function saswp_vehicle_schema_markup($schema_id, $schema_post_id, $all_post_meta
3289
 
3290
  $review_fields['@type'] = 'Review';
3291
  $review_fields['author']['@type'] = 'Person';
3292
- $review_fields['author'] = esc_attr($review['saswp_vehicle_reviews_reviewer_name']);
3293
 
3294
  if(isset($review['saswp_vehicle_reviews_created_date'])){
3295
  $review_fields['datePublished'] = esc_html($review['saswp_vehicle_reviews_created_date']);
@@ -3325,7 +3383,7 @@ function saswp_vehicle_schema_markup($schema_id, $schema_post_id, $all_post_meta
3325
 
3326
  $review_fields['@type'] = 'Review';
3327
  $review_fields['author']['@type'] = 'Person';
3328
- $review_fields['author'] = esc_attr($review['author']);
3329
  $review_fields['datePublished'] = esc_html($review['datePublished']);
3330
  $review_fields['description'] = $review['description'];
3331
 
@@ -3448,7 +3506,7 @@ function saswp_car_schema_markup($schema_id, $schema_post_id, $all_post_meta){
3448
 
3449
  $review_fields['@type'] = 'Review';
3450
  $review_fields['author']['@type'] = 'Person';
3451
- $review_fields['author'] = esc_attr($review['saswp_car_reviews_reviewer_name']);
3452
 
3453
  if(isset($review['saswp_car_reviews_created_date'])){
3454
  $review_fields['datePublished'] = esc_html($review['saswp_car_reviews_created_date']);
@@ -3484,7 +3542,7 @@ function saswp_car_schema_markup($schema_id, $schema_post_id, $all_post_meta){
3484
 
3485
  $review_fields['@type'] = 'Review';
3486
  $review_fields['author']['@type'] = 'Person';
3487
- $review_fields['author'] = esc_attr($review['author']);
3488
  $review_fields['datePublished'] = esc_html($review['datePublished']);
3489
  $review_fields['description'] = $review['description'];
3490
 
@@ -4364,7 +4422,15 @@ function saswp_video_object_schema_markup($schema_id, $schema_post_id, $all_post
4364
  }
4365
  if(isset($all_post_meta['saswp_video_object_embed_url_'.$schema_id][0]) && wp_http_validate_url($all_post_meta['saswp_video_object_embed_url_'.$schema_id][0])){
4366
  $input1['embedUrl'] = $all_post_meta['saswp_video_object_embed_url_'.$schema_id][0];
4367
- }
 
 
 
 
 
 
 
 
4368
 
4369
  return $input1;
4370
 
@@ -4622,10 +4688,14 @@ function saswp_review_schema_markup($schema_id, $schema_post_id, $all_post_meta)
4622
  }
4623
  }
4624
 
4625
- if(isset($all_post_meta['saswp_review_description_'.$schema_id])){
4626
  $input1['description'] = $all_post_meta['saswp_review_description_'.$schema_id][0];
4627
  }
4628
 
 
 
 
 
4629
  if(isset($all_post_meta['saswp_review_author_'.$schema_id])){
4630
 
4631
  $review_author = $all_post_meta['saswp_review_author_'.$schema_id][0];
29
 
30
  $sumofrating += $rv['saswp_review_rating'];
31
 
32
+ if($rv['saswp_review_rating'] && $rv['saswp_reviewer_name'] !='' ){
33
 
34
  $reviews_arr[] = array(
35
  '@type' => 'Review',
180
  $input1['director']['name'] = $all_post_meta['saswp_movie_director_'.$schema_id][0];
181
 
182
  }
183
+
184
+ if(isset($all_post_meta['saswp_movie_actor_'.$schema_id][0])){
185
+
186
+ $input1['actor']['@type'] = 'Person';
187
+ $input1['actor']['name'] = $all_post_meta['saswp_movie_actor_'.$schema_id][0];
188
+
189
+ }
190
 
191
  if(saswp_remove_warnings($all_post_meta, 'saswp_movie_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_movie_rating_value_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_movie_rating_count_'.$schema_id, 'saswp_array')){
192
 
244
  $input1['estimatedCost']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_value_'.$schema_id, 'saswp_array');
245
  }
246
 
247
+ $video_object = array();
248
 
249
+ if( isset($all_post_meta['saswp_howto_schema_video_name_'.$schema_id][0]) ){
250
+ $video_object['name'] = $all_post_meta['saswp_howto_schema_video_name_'.$schema_id][0];
251
+ }
252
+ if( isset($all_post_meta['saswp_howto_schema_video_description_'.$schema_id][0]) ){
253
+ $video_object['description'] = $all_post_meta['saswp_howto_schema_video_description_'.$schema_id][0];
254
+ }
255
+ if( isset($all_post_meta['saswp_howto_schema_video_thumbnail_url_'.$schema_id][0]) ){
256
+ $video_object['thumbnailUrl'] = $all_post_meta['saswp_howto_schema_video_thumbnail_url_'.$schema_id][0];
257
+ }
258
+ if( isset($all_post_meta['saswp_howto_schema_video_content_url_'.$schema_id][0]) ){
259
+ $video_object['contentUrl'] = $all_post_meta['saswp_howto_schema_video_content_url_'.$schema_id][0];
260
+ }
261
+ if( isset($all_post_meta['saswp_howto_schema_video_embed_url_'.$schema_id][0]) ){
262
+ $video_object['embedUrl'] = $all_post_meta['saswp_howto_schema_video_embed_url_'.$schema_id][0];
263
+ }
264
+ if( isset($all_post_meta['saswp_howto_schema_video_upload_date_'.$schema_id][0]) ){
265
+ $video_object['uploadDate'] = $all_post_meta['saswp_howto_schema_video_upload_date_'.$schema_id][0];
266
+ }
267
+ if( isset($all_post_meta['saswp_howto_schema_video_duration_'.$schema_id][0]) ){
268
+ $video_object['duration'] = $all_post_meta['saswp_howto_schema_video_duration_'.$schema_id][0];
269
+ }
270
+
271
  $supply_arr = array();
272
  if(!empty($supply)){
273
 
323
  }
324
 
325
  //step
326
+ $haspart = array();
327
  $step_arr = array();
328
  if(!empty($step)){
329
+ $j = 1;
330
  foreach($step as $key => $val){
331
 
332
  $supply_data = array();
363
 
364
  }
365
 
366
+ if(isset($val['saswp_howto_video_clip_name']) && $val['saswp_howto_video_start_offset']){
367
 
368
+ $haspart[] = array(
369
+ '@type' => 'Clip',
370
+ '@id' => 'Clip'.$j,
371
+ 'name' => $val['saswp_howto_video_clip_name'],
372
+ 'startOffset' => $val['saswp_howto_video_start_offset'],
373
+ 'endOffset' => $val['saswp_howto_video_end_offset'],
374
+ 'url' => $val['saswp_howto_video_clip_url'],
375
+ );
376
+
377
+ $supply_data['video']['@id'] = 'Clip'.$j;
378
+ }
379
+
380
+ $step_arr[] = $supply_data;
381
+ $j++;
382
  }
383
 
384
  $input1['step'] = $step_arr;
385
 
386
  }
387
 
388
+ if(!empty($video_object)){
389
+ $video_object['@type'] = 'VideoObject';
390
+ $video_object['hasPart'] = $haspart;
391
+ $input1['video'] = $video_object;
392
+ }
393
+
394
  $input1['totalTime'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_schema_totaltime_'.$schema_id, 'saswp_array');
395
+
396
  return $input1;
397
  }
398
 
1153
 
1154
  $review_fields['@type'] = 'Review';
1155
  $review_fields['author']['@type'] = 'Person';
1156
+ $review_fields['author']['name'] = $review['saswp_product_reviews_reviewer_name'] ? esc_attr($review['saswp_product_reviews_reviewer_name']) : 'Anonymous';
1157
 
1158
  if(isset($review['saswp_product_reviews_created_date'])){
1159
  $review_fields['datePublished'] = esc_html($review['saswp_product_reviews_created_date']);
1190
 
1191
  $review_fields['@type'] = 'Review';
1192
  $review_fields['author']['@type'] = 'Person';
1193
+ $review_fields['author']['name'] = $review['author'] ? esc_attr($review['author']) : 'Anonymous';
1194
  $review_fields['datePublished'] = esc_html($review['datePublished']);
1195
  $review_fields['description'] = $review['description'];
1196
 
2783
  $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_region_'.$schema_id, 'saswp_array');
2784
  $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_postalcode_'.$schema_id, 'saswp_array');
2785
  $input1['address']['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_complex_phone_'.$schema_id, 'saswp_array');
2786
+
2787
+ if(isset($all_post_meta['saswp_apartment_complex_latitude_'.$schema_id][0]) && isset($all_post_meta['saswp_apartment_complex_longitude_'.$schema_id][0])){
2788
+
2789
+ $input1['geo']['@type'] = 'GeoCoordinates';
2790
+ $input1['geo']['latitude'] = $all_post_meta['saswp_apartment_complex_latitude_'.$schema_id][0];
2791
+ $input1['geo']['longitude'] = $all_post_meta['saswp_apartment_complex_longitude_'.$schema_id][0];
2792
+
2793
+ }
2794
+
2795
  return $input1;
2796
 
2797
  }
3347
 
3348
  $review_fields['@type'] = 'Review';
3349
  $review_fields['author']['@type'] = 'Person';
3350
+ $review_fields['author']['name'] = esc_attr($review['saswp_vehicle_reviews_reviewer_name']);
3351
 
3352
  if(isset($review['saswp_vehicle_reviews_created_date'])){
3353
  $review_fields['datePublished'] = esc_html($review['saswp_vehicle_reviews_created_date']);
3383
 
3384
  $review_fields['@type'] = 'Review';
3385
  $review_fields['author']['@type'] = 'Person';
3386
+ $review_fields['author']['name'] = esc_attr($review['author']);
3387
  $review_fields['datePublished'] = esc_html($review['datePublished']);
3388
  $review_fields['description'] = $review['description'];
3389
 
3506
 
3507
  $review_fields['@type'] = 'Review';
3508
  $review_fields['author']['@type'] = 'Person';
3509
+ $review_fields['author']['name'] = esc_attr($review['saswp_car_reviews_reviewer_name']);
3510
 
3511
  if(isset($review['saswp_car_reviews_created_date'])){
3512
  $review_fields['datePublished'] = esc_html($review['saswp_car_reviews_created_date']);
3542
 
3543
  $review_fields['@type'] = 'Review';
3544
  $review_fields['author']['@type'] = 'Person';
3545
+ $review_fields['author']['name'] = esc_attr($review['author']);
3546
  $review_fields['datePublished'] = esc_html($review['datePublished']);
3547
  $review_fields['description'] = $review['description'];
3548
 
4422
  }
4423
  if(isset($all_post_meta['saswp_video_object_embed_url_'.$schema_id][0]) && wp_http_validate_url($all_post_meta['saswp_video_object_embed_url_'.$schema_id][0])){
4424
  $input1['embedUrl'] = $all_post_meta['saswp_video_object_embed_url_'.$schema_id][0];
4425
+ }
4426
+
4427
+ if(!empty($all_post_meta['saswp_video_object_seek_to_seconds_'.$schema_id][0]) && !empty($all_post_meta['saswp_video_object_seek_to_video_url_'.$schema_id][0])){
4428
+
4429
+ $input1['potentialAction']['@type'] = 'SeekToAction';
4430
+ $input1['potentialAction']['target'] = $all_post_meta['saswp_video_object_seek_to_video_url_'.$schema_id][0].'?t'.$all_post_meta['saswp_video_object_seek_to_seconds_'.$schema_id][0];
4431
+ $input1['potentialAction']['startOffset-input'] = 'required name=seek_to_second_number';
4432
+
4433
+ }
4434
 
4435
  return $input1;
4436
 
4688
  }
4689
  }
4690
 
4691
+ if(isset($all_post_meta['saswp_review_description_'.$schema_id][0])){
4692
  $input1['description'] = $all_post_meta['saswp_review_description_'.$schema_id][0];
4693
  }
4694
 
4695
+ if(isset($all_post_meta['saswp_review_body_'.$schema_id][0])){
4696
+ $input1['reviewBody'] = $all_post_meta['saswp_review_body_'.$schema_id][0];
4697
+ }
4698
+
4699
  if(isset($all_post_meta['saswp_review_author_'.$schema_id])){
4700
 
4701
  $review_author = $all_post_meta['saswp_review_author_'.$schema_id][0];
output/service.php CHANGED
@@ -570,6 +570,9 @@ Class saswp_output_service{
570
  if(isset($custom_fields['saswp_review_description'])){
571
  $review_markup['description'] = $custom_fields['saswp_review_description'];
572
  }
 
 
 
573
  if(isset($custom_fields['saswp_review_rating_value'])){
574
  $review_markup['reviewRating']['@type'] = 'Rating';
575
  $review_markup['reviewRating']['ratingValue'] = $custom_fields['saswp_review_rating_value'];
@@ -719,6 +722,10 @@ Class saswp_output_service{
719
  $input1['director']['@type'] = 'Person';
720
  $input1['director']['name'] = $custom_fields['saswp_movie_director'];
721
  }
 
 
 
 
722
  if(isset($custom_fields['saswp_movie_rating_value']) && isset($custom_fields['saswp_movie_rating_count'])){
723
  $input1['aggregateRating']['@type'] = 'aggregateRating';
724
  $input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_movie_rating_value'];
@@ -2841,6 +2848,12 @@ Class saswp_output_service{
2841
 
2842
  $input1['address'] = $location;
2843
  }
 
 
 
 
 
 
2844
 
2845
  break;
2846
 
@@ -3035,7 +3048,16 @@ Class saswp_output_service{
3035
  }
3036
  if(isset($custom_fields['saswp_video_object_embed_url']) && wp_http_validate_url($custom_fields['saswp_video_object_embed_url'])){
3037
  $input1['embedUrl'] = saswp_validate_url($custom_fields['saswp_video_object_embed_url']);
3038
- }
 
 
 
 
 
 
 
 
 
3039
  if(isset($custom_fields['saswp_video_object_author_type'])){
3040
  $input1['author']['@type'] = $custom_fields['saswp_video_object_author_type'];
3041
  }
@@ -4516,7 +4538,7 @@ Class saswp_output_service{
4516
 
4517
  }else{
4518
 
4519
- if(isset($sd_data['saswp_default_review']) && $sd_data['saswp_default_review'] == 1){
4520
 
4521
  $reviews_arr[] = array(
4522
  'author' => saswp_get_the_author_name(),
570
  if(isset($custom_fields['saswp_review_description'])){
571
  $review_markup['description'] = $custom_fields['saswp_review_description'];
572
  }
573
+ if(isset($custom_fields['saswp_review_body'])){
574
+ $review_markup['reviewBody'] = $custom_fields['saswp_review_body'];
575
+ }
576
  if(isset($custom_fields['saswp_review_rating_value'])){
577
  $review_markup['reviewRating']['@type'] = 'Rating';
578
  $review_markup['reviewRating']['ratingValue'] = $custom_fields['saswp_review_rating_value'];
722
  $input1['director']['@type'] = 'Person';
723
  $input1['director']['name'] = $custom_fields['saswp_movie_director'];
724
  }
725
+ if(isset($custom_fields['saswp_movie_actor'])){
726
+ $input1['actor']['@type'] = 'Person';
727
+ $input1['actor']['name'] = $custom_fields['saswp_movie_actor'];
728
+ }
729
  if(isset($custom_fields['saswp_movie_rating_value']) && isset($custom_fields['saswp_movie_rating_count'])){
730
  $input1['aggregateRating']['@type'] = 'aggregateRating';
731
  $input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_movie_rating_value'];
2848
 
2849
  $input1['address'] = $location;
2850
  }
2851
+
2852
+ if(isset($custom_fields['saswp_apartment_complex_latitude']) && isset($custom_fields['saswp_apartment_complex_longitude'])){
2853
+ $input1['geo']['@type'] = 'GeoCoordinates';
2854
+ $input1['geo']['latitude'] = $custom_fields['saswp_apartment_complex_latitude'];
2855
+ $input1['geo']['longitude'] = $custom_fields['saswp_apartment_complex_longitude'];
2856
+ }
2857
 
2858
  break;
2859
 
3048
  }
3049
  if(isset($custom_fields['saswp_video_object_embed_url']) && wp_http_validate_url($custom_fields['saswp_video_object_embed_url'])){
3050
  $input1['embedUrl'] = saswp_validate_url($custom_fields['saswp_video_object_embed_url']);
3051
+ }
3052
+
3053
+ if(!empty($custom_fields['saswp_video_object_seek_to_seconds']) && !empty($custom_fields['saswp_video_object_seek_to_video_url'])){
3054
+
3055
+ $input1['potentialAction']['@type'] = 'SeekToAction';
3056
+ $input1['potentialAction']['target'] = $custom_fields['saswp_video_object_seek_to_video_url'].'?t'.$custom_fields['saswp_video_object_seek_to_seconds'];
3057
+ $input1['potentialAction']['startOffset-input'] = 'required name=seek_to_second_number';
3058
+
3059
+ }
3060
+
3061
  if(isset($custom_fields['saswp_video_object_author_type'])){
3062
  $input1['author']['@type'] = $custom_fields['saswp_video_object_author_type'];
3063
  }
4538
 
4539
  }else{
4540
 
4541
+ if( isset($sd_data['saswp_default_review']) && $sd_data['saswp_default_review'] == 1 && saswp_get_the_author_name() ){
4542
 
4543
  $reviews_arr[] = array(
4544
  'author' => saswp_get_the_author_name(),
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.8
6
- Stable tag: 1.9.87
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -120,6 +120,19 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
 
124
  = 1.9.87 (23 Oct 2021) =
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.8
6
+ Stable tag: 1.9.88
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
120
 
121
  == Changelog ==
122
 
123
+ = 1.9.88 (03 Nov 2021) =
124
+
125
+ * Added: An option called "Specific" in the Sorting Filter for Collection feature. #1472
126
+ * Added: Support for SeekToAction in Video Object Schema #1498
127
+ * Added: Support for video object in How to schema. #1513
128
+ * Added: textarea or multiline support for the description. #1456
129
+ * Added: reviewbody and actor properties to Review Schema
130
+ * Added: Two properties(Latitude, Longitude) for ApartmentComplex schema #1524
131
+ * Added: The number of votes each comment has received in the structured data #1523
132
+ * Fixed: Issue with Yell an Yellowpages fetched reviews in collection #1534
133
+ * Fixed: Schema add empty review array to the code #1557
134
+ * Fixed: Invalid author type for review when product individually modified #1556
135
+
136
 
137
  = 1.9.87 (23 Oct 2021) =
138
 
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.87
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.87');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
2
  /*
3
  Plugin Name: Schema & Structured Data for WP & AMP
4
  Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
5
+ Version: 1.9.88
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.88');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
view/common.php CHANGED
@@ -703,7 +703,7 @@ class saswp_view_common_class {
703
  $sanitize_data = array();
704
 
705
  foreach($supply as $k => $el){
706
- if($el){
707
  $sanitize_data[$k] = wp_kses_post(wp_unslash($el));
708
  }
709
 
703
  $sanitize_data = array();
704
 
705
  foreach($supply as $k => $el){
706
+ if(isset($el)){
707
  $sanitize_data[$k] = wp_kses_post(wp_unslash($el));
708
  }
709
 
view/schema_type.php CHANGED
@@ -901,7 +901,8 @@ function saswp_schema_type_meta_box_callback( $post) {
901
  $schema_type = $item_reviewed;
902
 
903
  $review_fields['saswp_review_name'] = 'Review Name';
904
- $review_fields['saswp_review_description'] = 'Review Description';
 
905
  $review_fields['saswp_review_author'] = 'Review Author';
906
  $review_fields['saswp_review_author_url'] = 'Review Author Profile URL';
907
  $review_fields['saswp_review_publisher'] = 'Review Publisher';
@@ -1000,7 +1001,7 @@ function saswp_schema_type_meta_box_callback( $post) {
1000
  echo '</td>';
1001
 
1002
  if($fieldval == 'manual_text'){
1003
- echo '<td><input type="text" name="saswp_fixed_text['.esc_attr($fieldkey).']" value="'.(isset($fixed_text[$fieldkey]) ? esc_html($fixed_text[$fieldkey]) :'').'"></td>';
1004
  }else if($fieldval == 'taxonomy_term'){
1005
 
1006
  $choices = array('all' => saswp_t_string('All'));
901
  $schema_type = $item_reviewed;
902
 
903
  $review_fields['saswp_review_name'] = 'Review Name';
904
+ $review_fields['saswp_review_description'] = 'Review Description';
905
+ $review_fields['saswp_review_body'] = 'Review Body';
906
  $review_fields['saswp_review_author'] = 'Review Author';
907
  $review_fields['saswp_review_author_url'] = 'Review Author Profile URL';
908
  $review_fields['saswp_review_publisher'] = 'Review Publisher';
1001
  echo '</td>';
1002
 
1003
  if($fieldval == 'manual_text'){
1004
+ echo '<td><textarea cols="35" rows="2" name="saswp_fixed_text['.esc_attr($fieldkey).']">'.(isset($fixed_text[$fieldkey]) ? esc_html($fixed_text[$fieldkey]) :'').'</textarea></td>';
1005
  }else if($fieldval == 'taxonomy_term'){
1006
 
1007
  $choices = array('all' => saswp_t_string('All'));