Schema & Structured Data for WP & AMP - Version 1.9.30

Version Description

(30 Mar 2020) =

  • Fixed: Duplicate Query in some places that can be improved #897
  • Fixed: Structured data markup has a corrupted font #902
  • Fixed: Review Schema, datePublished is being populated with an incorrect format as offset time is missing #894
  • Fixed: Primary image other properties should not be appeared if url is blank #882
  • Fixed: Jump links not working in AMP if user is using it along with the Schema and Structured data FOR WP plugin #878
  • Fixed: Debug Warnings.(Trying to access array offset on value of type bool in /htdocs/1/wp-content/plugins/schema-and-structured-data-for-wp/output/service.php on line 3308) #898
  • Fixed: If we selected sub-business type that selected sub-business type should also appear in the schema type column #899
  • Added: Virtual Location property in event schema #886
  • Added: Event Attendance Mode property in event schema (google latest support) #886
  • Added: Event Status property in event schema (google latest support) #891
  • Added: Date Modified proprerty in review schema type. #894
Download this release

Release Info

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

Code changes from version 1.9.29 to 1.9.30

admin_section/common-function.php CHANGED
@@ -1904,7 +1904,7 @@ if ( ! defined('ABSPATH') ) exit;
1904
  if(is_object($post)){
1905
  $content = get_post_field('post_content', $post->ID);
1906
  $content = wp_strip_all_tags(strip_shortcodes($content));
1907
- $content = preg_replace('/[^A-Za-z0-9\-]/', ' ', $content); // Removes special chars.
1908
  }
1909
 
1910
  return apply_filters('saswp_the_content' ,$content);
@@ -2537,6 +2537,11 @@ function saswp_migrate_old_social_profile(){
2537
 
2538
  }
2539
 
 
 
 
 
 
2540
  function saswp_format_date_time($date, $time=null){
2541
 
2542
  $formated = '';
1904
  if(is_object($post)){
1905
  $content = get_post_field('post_content', $post->ID);
1906
  $content = wp_strip_all_tags(strip_shortcodes($content));
1907
+ $content = str_replace('=', '', $content); // Removes special chars.
1908
  }
1909
 
1910
  return apply_filters('saswp_the_content' ,$content);
2537
 
2538
  }
2539
 
2540
+ function saswp_validate_date($date, $format = 'Y-m-d H:i:s'){
2541
+ $d = DateTime::createFromFormat($format, $date);
2542
+ return $d && $d->format($format) == $date;
2543
+ }
2544
+
2545
  function saswp_format_date_time($date, $time=null){
2546
 
2547
  $formated = '';
admin_section/js/functions-list.js CHANGED
@@ -250,6 +250,7 @@
250
  html += '<option value="saswp_review_publisher_url">Review Publisher URL</option>';
251
  html += '<option value="saswp_review_rating_value">Review Rating Value</option>';
252
  html += '<option value="saswp_review_date_published">Review Published Date</option>';
 
253
  html += '<option value="saswp_review_url">Review URL</option>';
254
  html += '</optgroup>';
255
 
250
  html += '<option value="saswp_review_publisher_url">Review Publisher URL</option>';
251
  html += '<option value="saswp_review_rating_value">Review Rating Value</option>';
252
  html += '<option value="saswp_review_date_published">Review Published Date</option>';
253
+ html += '<option value="saswp_review_date_modified">Review Modified Date</option>';
254
  html += '<option value="saswp_review_url">Review URL</option>';
255
  html += '</optgroup>';
256
 
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);e={time:a.toLocaleTimeString(),date:a.toLocaleDateString()}}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()}).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").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_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_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(){var s="";for(var e in saswp_total_collection=[],saswp_collection)saswp_collection[e]&&(jQuery.each(saswp_collection[e],function(s,e){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 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>"}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;jQuery.each(saswp_collection[e],function(s,e){a=e.saswp_review_platform_icon,t=e.saswp_review_platform_name,n+=parseFloat(e.saswp_review_rating),i++}),n>0&&(p=n/i),saswp_collection[e]&&(s+="<li>",s+='<a href="#">',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+="Based on "+i+" 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" 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>",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>';for(l=1;l<=r;l++)n+=l==saswp_grid_page?'<a class="active saswp-grid-page" data-id="'+l+'" href="#">'+l+"</a>":'<a class="saswp-grid-page" 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-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()),p=!1,r=0,l=n;if(jQuery("#saswp-coll-pagination").is(":checked")){p=!0;saswp_grid_page>0&&(l=saswp_grid_page*n),r=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,p,n,r,l)}function saswp_get_collection_data(s,e,a=null){jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:s,platform_id:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if(s.status){var t=s.message;saswp_collection[e]=t,saswp_collection[e]=jQuery.extend(saswp_collection[e],t),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)}
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);e={time:a.toLocaleTimeString(),date:a.toLocaleDateString()}}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()}).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").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,p=jQuery(e).attr("data-id"),n=jQuery(e).attr("post-specific"),r=jQuery(".saswp_modify_this_schema_hidden_"+p).val();append_id=null==a?jQuery("#saswp_specific_"+p):jQuery(".saswp-manual-modification"),jQuery.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",modify_this:r,schema_type:s,schema_id:p,post_specific:n,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,p){var n=t;null==n&&(n=Object.keys(a)[0]);var r="";if(r+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+n+']">',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_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,p){saswp_meta_list[e]?saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,p):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(n){saswp_meta_list[e]=n[e],saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,p)},"json")}function saswp_get_post_specific_schema_fields(s,e,a,t,i,p,n){if(saswp_meta_fields[p]){var r=saswp_fields_html_generator(e,i,p,t,saswp_meta_fields[p]);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:n,meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[p]=a;var n=saswp_fields_html_generator(e,i,p,t,a);n&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(n),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(s,e,a,t,i){var p="";return p+='<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 n="";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)&&(n="saswp-datepicker-picker"),i.type){case"number":case"text":p+="<tr><th>"+i.label+'</th><td><input class="'+n+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']"></td></tr>';break;case"textarea":p+="<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>"}),p+="<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":p+="<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>'}}),p+="</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){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 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>"}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 p=s.find(".saswp-slider-controls").find(".saswp-slider-next-btn"),n=s.find(".saswp-slider-controls").find(".saswp-slider-prev-btn");p.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),p=e.offset().left,n=i.offset().left-p;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( -"+n+"px, 0px)"})}()}),n.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 p=e.find(".saswp-si").eq(i),n=e.offset().left,r=p.offset().left-n;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),p.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,p=0,n=1;jQuery.each(saswp_collection[e],function(s,e){a=e.saswp_review_platform_icon,t=e.saswp_review_platform_name,p+=parseFloat(e.saswp_review_rating),i++}),p>0&&(n=p/i),saswp_collection[e]&&(s+="<li>",s+='<a href="#">',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+=n.toFixed(1),s+="</span>",s+='<span class="saswp-stars">',s+=saswp_create_rating_html_by_value(n.toString()),s+="</span>",s+="</div>",s+='<span class="saswp-r3-brv">',s+="Based on "+i+" 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 p=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">'+p.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" 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 p="",n="",r=0;if(saswp_total_collection.length>0){r=Math.ceil(saswp_total_collection.length/a),p+='<div class="saswp-r1">';for(var l=1;l<=s;l++)n+=" 1fr";if(s.length>3?p+='<ul style="grid-template-columns:'+n+';overflow-y: scroll;">':p+='<ul style="grid-template-columns:'+n+';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);p+="<li>",p+='<div class="saswp-rc">',p+='<div class="saswp-rc-a">',p+='<div class="saswp-r1-aimg">',p+='<img src="'+e.saswp_reviewer_image+'" width="56" height="56"/>',p+="</div>",p+='<div class="saswp-rc-nm">',p+='<a href="#">'+e.saswp_reviewer_name+"</a>",p+=saswp_create_rating_html_by_value(e.saswp_review_rating),a.date&&(p+='<span class="saswp-rc-dt">'+a.date+"</span>"),p+="</div>",p+="</div>",p+='<div class="saswp-rc-lg">',p+='<img src="'+e.saswp_review_platform_icon+'"/>',p+="</div>",p+="</div>",p+='<div class="saswp-rc-cnt">',p+="<p>"+e.saswp_review_text+"</p>",p+="</div>",p+="</li>"})}if(p+="</ul>",r>0&&e){p+='<div class="saswp-grid-pagination">',p+='<a class="saswp-grid-page" data-id="1" href="#">&laquo;</a>';for(l=1;l<=r;l++)p+=l==saswp_grid_page?'<a class="active saswp-grid-page" data-id="'+l+'" href="#">'+l+"</a>":'<a class="saswp-grid-page" data-id="'+l+'" href="#">'+l+"</a>";p+='<a class="saswp-grid-page" data-id="'+r+'" href="#">&raquo;</a>',p+="</div>"}p+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(p)}function saswp_create_collection_by_design(s,e,a,t,i,p,n,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(p,n)}}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(),p=parseInt(jQuery("#saswp-coll-per-page").val()),n=!1,r=0,l=p;if(jQuery("#saswp-coll-pagination").is(":checked")){n=!0;saswp_grid_page>0&&(l=saswp_grid_page*p),r=l-p}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,n,p,r,l)}function saswp_get_collection_data(s,e,a=null){jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:s,platform_id:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if(s.status){var t=s.message;saswp_collection[e]=t,saswp_collection[e]=jQuery.extend(saswp_collection[e],t),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)}
admin_section/js/main-script.js CHANGED
@@ -1434,6 +1434,7 @@ return false;
1434
 
1435
  current.removeClass('updating-message');
1436
  saswp_schema_datepicker();
 
1437
  saswp_enable_rating_review();
1438
  saswp_item_reviewed_call();
1439
 
1434
 
1435
  current.removeClass('updating-message');
1436
  saswp_schema_datepicker();
1437
+ saswp_schema_timepicker();
1438
  saswp_enable_rating_review();
1439
  saswp_item_reviewed_call();
1440
 
admin_section/js/main-script.min.js CHANGED
@@ -1 +1 @@
1
- var saswp_attached_rv=[],saswp_attached_col=[];jQuery(document).ready(function(s){if(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("Attach reviews to this schema type","#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,p="";t>0&&(p+=t+" Reviews, "),i>0&&(p+=i+" Collection"),p||(p=0),s(".saswp-attached-rv-count").text("Attached "+p),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='<div class="saswp-add-rv-loop" data-type="'+a+'" data-id="'+e.saswp_review_id+'">',"review"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" ( Rating - "+e.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+e.saswp_review_platform_icon+'"/></span></strong>'),"collection"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" </strong>"),t+="</div>"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),e.message&&(s(".saswp-rv-not-found[data-type="+a+"]").removeClass("saswp_hide"),s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"))}else alert(e.message);s("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),s(".saswp-modify-schema-toggle").click(function(e){e.preventDefault(),s(".saswp-modify-container").slideToggle("300");var a=s("#saswp_enable_custom_field"),t=a.val();a.val("1"===t?"0":"1"),s(".saswp-enable-modify-schema-output").change()}),s(".saswp-enable-itemlist").change(function(){s(this).is(":checked")?(s("#saswp_item_list_tags").show(),s(".saspw-item-list-note").show(),"custom"==s("#saswp_item_list_tags").val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()):(s(".saspw-item-list-note").hide(),s("#saswp_item_list_tags").hide(),s("#saswp_item_list_custom").hide())}),s("#saswp_item_list_tags").change(function(){"custom"==s(this).val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()}),s(document).on("click",".saswp-add-g-location-btn",function(e){var a="";a=s("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',e.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>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>Reviews</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),o=s("#reviews_addon_license_key").val(),c=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert("Blocks value is zero"),e.removeClass("updating-message"),!1;if(0!=i%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text("Reviews count should be in step of 10"),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(o||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:c,reviews_api:o,location:t,blocks:i,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text("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("Please enter place id"),""==p&&alert("Please enter api key"),""==o&&alert("Please enter reviews api key"),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var e,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</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} #afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/z7t4b8" data-id="258182" data-code="z7t4b8" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[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="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" 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 class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',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+="</div>",a+="</form>";var t={content:a+="</div>",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(){e.element.pointer("close")}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?s(window).bind("load.wp-pointers",e):e()}if(s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),s(".saswp-schame-type-select").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||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-item-reivewed-list").change()),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-itemlist-item-type-list").change()):s(".saswp-schema-modify-section").show(),saswp_enable_rating_review(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").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||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)):s(".saswp-schema-modify-section").show(),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":s(this).is(":checked")?(s("#saswp_kb_contact_1").val(1),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(s("#saswp_kb_contact_1").val(0),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":s(this).is(":checked")?(s("#saswp-logo-dimensions").val(1),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(s("#saswp-logo-dimensions").val(0),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":s(this).is(":checked")?(s("#saswp_archive_schema").val(1),s(".saswp_archive_schema_type_class").parent().parent().show()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_schema").val(1):s("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-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-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tagyeem").val(1):s("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-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-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-manager").val(1):s("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-calendar-wd").val(1):s("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-organiser").val(1):s("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-modern-events-calendar").val(1):s("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking").val(1),s("#saswp-woocommerce-booking-main").val(1)):(s("#saswp-woocommerce-booking").val(0),s("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking-main").val(1),s("#saswp-woocommerce-booking").val(1)):(s("#saswp-woocommerce-booking-main").val(0),s("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce-membership").val(1):s("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":s(this).is(":checked")?s("#saswp-defragment").val(1):s("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-shopper-approved-review").val(1),s(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-shopper-approved-review").val(0),s(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":s(this).is(":checked")?(s("#saswp-google-review").val(1),s("#saswp-google-rv-free-checkbox").length?(s("#saswp-google-review-free").parent().parent().show(),s("#saswp-google-rv-free-checkbox").is(":checked")?s("#saswp_google_place_api_key").parent().parent().show():s("#saswp_google_place_api_key").parent().parent().hide()):s("#saswp_google_place_api_key").parent().parent().show(),s(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-google-review").val(0),s("#saswp_google_place_api_key").parent().parent().hide(),s(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),s("#saswp-google-rv-free-checkbox").length&&s("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":s("#saswp-google-review-checkbox").is(":checked")&&s(this).is(":checked")?(s("#saswp-google-review-free").val(1),s("#saswp_google_place_api_key").parent().parent().show()):(s("#saswp-google-review-free").val(0),s("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":s(this).is(":checked")?s("#saswp-markup-footer").val(1):s("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":s(this).is(":checked")?s("#saswp-pretty-print").val(1):s("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-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-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var p="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(p='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+e.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+p)}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-post-specific-wrapper[data-id="+a+"] .saswp-post-specific-setting").after(e),s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_enable_rating_review(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){t.removeClass("updating-message"),"t"==e.status?(s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+a).val();if(s(this).is(":checked")){var p=0;s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s("#saswp_custom_schema_field[schema-id="+a+"]").parent().addClass("saswp_hide")}else{s("#saswp_custom_schema_field[schema-id="+a+"]").parent().removeClass("saswp_hide"),1==i?(s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"));p=1}s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:p,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),1==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),p=s("#"+i+"_addon_license_key").val();t&&i&&p?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:p,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)),a.removeClass("updating-message")},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();console.log(saswpIsEmail(t)),""!=s.trim(a)&&i&&""!=s.trim(t)&&1==saswpIsEmail(t)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",premium_cus:i,message:a,email:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s(".saswp-query-success").show(),s(".saswp-query-error").hide()):(s(".saswp-query-success").hide(),s(".saswp-query-error").show())},error:function(s){console.log(s)}}):""==s.trim(a)&&""==i&&""==s.trim(t)?alert("Please enter the message, email and select customer type"):(""==i&&alert("Select Customer type"),""==s.trim(a)&&alert("Please enter the message"),""==s.trim(t)&&alert("Please enter the email"),0==saswpIsEmail(t)&&alert("Please enter a valid email"))}),s(".saswp-import-plugins").on("click",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id");s.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?(s(a).parent().find(".saswp-imported-message").text(e.message),s(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(s(a).parent().find(".saswp-imported-message").addClass("saswp-error"),s(a).parent().find(".saswp-imported-message").text(e.message)),a.removeClass("updating-message")},"json")}),s(".saswp-feedback-no-thanks").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(".saswp-feedback-remindme").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(document).on("change",".saswp-local-business-type-select",function(e){e.preventDefault();var a=s(this),t=s(this).val();s.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){s(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',s.each(e.result,function(s,e){i+='<option value="'+s+'">'+e+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else s(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),jQuery(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),s(document).on("click",".saswp-add-custom-schema",function(e){e.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(e){e.preventDefault(),s("#saswp_custom_schema_field").val(""),s(".saswp-add-custom-schema-field").addClass("saswp_hide"),s(".saswp-add-custom-schema").show()}),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_reviews_datepicker(),s(document).on("click",".saswp-add-more-item",function(e){e.preventDefault();s(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),s(document).on("click",".saswp-remove-review-item",function(e){e.preventDefault(),s(this).parent().parent("tr").remove()}),s(document).on("focusout",".saswp-review-item-tr input[type=number]",function(e){e.preventDefault();var a=0,t=s(".saswp-review-item-tr input[type=number]").length;s(".saswp-review-item-tr input[type=number]").each(function(e,t){""==s(t).val()?a+=parseFloat(0):a+=parseFloat(s(t).val())});var i=a/t;s("#saswp-review-item-over-all").val(i)}),s("#saswp-review-location").change(function(){var e=s(this).val();s(".saswp-review-shortcode").addClass("saswp_hide"),3==e&&s(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),s("#saswp-review-item-enable").change(function(){s(this).is(":checked")?s(".saswp-review-fields").show():s(".saswp-review-fields").hide()}).change(),s(document).on("click",".saswp-restore-post-schema",function(e){e.preventDefault();var a=s(this);if(a.addClass("updating-message"),s(".saswp-post-specific-schema-ids").val())var t=JSON.parse(s(".saswp-post-specific-schema-ids").val());s.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?setTimeout(function(){location.reload()},1e3):(alert(s.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?s(".saswp-global-container:eq(2)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s(".saswp-tools-container:first").show(),s("#saswp-tools-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-tools-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();-1==t.indexOf("_image")&&-1==t.indexOf("_logo")||(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),p=s(this).attr("div_type"),o=s(this).attr("itemlist_sub_type"),c=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div:nth-child("+c+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,p,t,i+"_",o)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),p="",o=a.toLowerCase()+"_"+i,c="saswp_fixed_image["+i+"]";"manual_text"==t?(p+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(p+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(p),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,p+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(p),saswpCustomSelect2())},"json"):"custom_field"==t?(p+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',p+="</select></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"fixed_image"==t?(p+="<td>",p+="<fieldset>",p+='<input data-id="media" style="width: 30%;" class="button" id="'+o+'_button" name="'+o+'_button" type="button" value="Upload" />',p+='<input type="hidden" data-id="'+o+'_height" class="upload-height" name="'+c+'[height]" id="'+o+'_height" value="">',p+='<input type="hidden" data-id="'+o+'_width" class="upload-width" name="'+c+'[width]" id="'+o+'_width" value="">',p+='<input type="hidden" data-id="'+o+'_thumbnail" class="upload-thumbnail" name="'+c+'[thumbnail]" id="'+o+'_thumbnail" value="">',p+='<div class="saswp_image_div_'+o+'">',p+="</div>",p+="</fieldset>",p+="</td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):(p+="<td></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var p=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:p,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('<tr><td><input type="text" placeholder="https://www.facebook.com/profile" name="sd_data[saswp_social_links][]" value=""></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td></tr>')}),s(document).on("click",".saswp-show-accept-rv-popup",function(){tb_show("Reviews Form","#TB_inline??width=600&height=400&inlineId=saswp-accept-reviews-popup"),s(document).find("#TB_window").width(600).height(400).css({top:"100px","margin-top":"0px"})}),("saswp_reviews"==saswp_localize_data.post_type||"saswp-collections"==saswp_localize_data.post_type)&&"edit.php"==saswp_localize_data.page_now){var i='<div class="saswp-custom-post-tab">';i+='<div style="display:none;" id="saswp-accept-reviews-popup">',i+='<div class="saswp-accept-rv-container">',i+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",i+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',i+='<div class="saswp-show-form-on-tab"><strong>Show form on button tap</strong> <input value="[saswp-reviews-form onbutton=&quot;1&quot;]" type="text" readonly></div>',i+="</div>",i+="</div>",i+='<h2 class="nav-tab-wrapper">',i+="<a href="+saswp_localize_data.reviews_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.reviews_page_url?"saswp-global-selected":"")+'">Reviews</a>',i+="<a href="+saswp_localize_data.collections_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.collections_page_url?"saswp-global-selected":"")+'">Collections</a>',i+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',i+="</h2>",i+="</div>",jQuery(jQuery(".wrap")).prepend(i)}"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().val(e)}}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')}),saswpCollectionSlider(),s(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),"grid"==e&&s(".saswp-grid-options").removeClass("saswp_hide"),"gallery"==e&&s(".saswp-slider-options").removeClass("saswp_hide"),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px")),"popup"==e&&s(".saswp-collection-lp").css("height","31px"),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a)):alert("Enter Count")});var p,o,c=s("#saswp_collection_id").val();c&&(s(".spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_collection_platforms",collection_id:c,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if(e.status){var a=e.message;s.each(a,function(s,e){saswp_get_collection_data(e,s,null)})}s(".spinner").removeClass("is-active")},"json")),(p=document.createElement("div")).style.cssText="position:absolute; background:black; color:white; padding:4px 6px;z-index:10000;border-radius:2px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);opacity:0;transition:opacity 0.3s",p.innerHTML="Copied!",document.body.appendChild(p);var n=document.getElementById("motivatebox");n&&n.addEventListener("mouseup",function(s){var e=(s=s||event).target||s.srcElement;"motivate"==e.className&&(!function(s){var e=document.createRange();e.selectNodeContents(s);var a=window.getSelection();a.removeAllRanges(),a.addRange(e)}(e),function(){var s;try{s=document.execCommand("copy")}catch(e){s=!1}return s}()&&function(s){var e=s||event;clearTimeout(o),p.style.left=e.pageX-10+"px",p.style.top=e.pageY+15+"px",p.style.opacity=1,o=setTimeout(function(){p.style.opacity=0},500)}(s))},!1)});
1
+ var saswp_attached_rv=[],saswp_attached_col=[];jQuery(document).ready(function(s){if(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("Attach reviews to this schema type","#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,p="";t>0&&(p+=t+" Reviews, "),i>0&&(p+=i+" Collection"),p||(p=0),s(".saswp-attached-rv-count").text("Attached "+p),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='<div class="saswp-add-rv-loop" data-type="'+a+'" data-id="'+e.saswp_review_id+'">',"review"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" ( Rating - "+e.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+e.saswp_review_platform_icon+'"/></span></strong>'),"collection"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" </strong>"),t+="</div>"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),e.message&&(s(".saswp-rv-not-found[data-type="+a+"]").removeClass("saswp_hide"),s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"))}else alert(e.message);s("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),s(".saswp-modify-schema-toggle").click(function(e){e.preventDefault(),s(".saswp-modify-container").slideToggle("300");var a=s("#saswp_enable_custom_field"),t=a.val();a.val("1"===t?"0":"1"),s(".saswp-enable-modify-schema-output").change()}),s(".saswp-enable-itemlist").change(function(){s(this).is(":checked")?(s("#saswp_item_list_tags").show(),s(".saspw-item-list-note").show(),"custom"==s("#saswp_item_list_tags").val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()):(s(".saspw-item-list-note").hide(),s("#saswp_item_list_tags").hide(),s("#saswp_item_list_custom").hide())}),s("#saswp_item_list_tags").change(function(){"custom"==s(this).val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()}),s(document).on("click",".saswp-add-g-location-btn",function(e){var a="";a=s("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',e.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>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>Reviews</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),o=s("#reviews_addon_license_key").val(),c=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert("Blocks value is zero"),e.removeClass("updating-message"),!1;if(0!=i%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text("Reviews count should be in step of 10"),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(o||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:c,reviews_api:o,location:t,blocks:i,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text("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("Please enter place id"),""==p&&alert("Please enter api key"),""==o&&alert("Please enter reviews api key"),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var e,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</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} #afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/z7t4b8" data-id="258182" data-code="z7t4b8" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[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="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" 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 class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',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+="</div>",a+="</form>";var t={content:a+="</div>",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(){e.element.pointer("close")}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?s(window).bind("load.wp-pointers",e):e()}if(s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),s(".saswp-schame-type-select").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||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-item-reivewed-list").change()),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-itemlist-item-type-list").change()):s(".saswp-schema-modify-section").show(),saswp_enable_rating_review(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").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||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)):s(".saswp-schema-modify-section").show(),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":s(this).is(":checked")?(s("#saswp_kb_contact_1").val(1),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(s("#saswp_kb_contact_1").val(0),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":s(this).is(":checked")?(s("#saswp-logo-dimensions").val(1),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(s("#saswp-logo-dimensions").val(0),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":s(this).is(":checked")?(s("#saswp_archive_schema").val(1),s(".saswp_archive_schema_type_class").parent().parent().show()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_schema").val(1):s("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-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-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tagyeem").val(1):s("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-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-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-manager").val(1):s("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-calendar-wd").val(1):s("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-organiser").val(1):s("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-modern-events-calendar").val(1):s("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking").val(1),s("#saswp-woocommerce-booking-main").val(1)):(s("#saswp-woocommerce-booking").val(0),s("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking-main").val(1),s("#saswp-woocommerce-booking").val(1)):(s("#saswp-woocommerce-booking-main").val(0),s("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce-membership").val(1):s("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":s(this).is(":checked")?s("#saswp-defragment").val(1):s("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-shopper-approved-review").val(1),s(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-shopper-approved-review").val(0),s(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":s(this).is(":checked")?(s("#saswp-google-review").val(1),s("#saswp-google-rv-free-checkbox").length?(s("#saswp-google-review-free").parent().parent().show(),s("#saswp-google-rv-free-checkbox").is(":checked")?s("#saswp_google_place_api_key").parent().parent().show():s("#saswp_google_place_api_key").parent().parent().hide()):s("#saswp_google_place_api_key").parent().parent().show(),s(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-google-review").val(0),s("#saswp_google_place_api_key").parent().parent().hide(),s(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),s("#saswp-google-rv-free-checkbox").length&&s("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":s("#saswp-google-review-checkbox").is(":checked")&&s(this).is(":checked")?(s("#saswp-google-review-free").val(1),s("#saswp_google_place_api_key").parent().parent().show()):(s("#saswp-google-review-free").val(0),s("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":s(this).is(":checked")?s("#saswp-markup-footer").val(1):s("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":s(this).is(":checked")?s("#saswp-pretty-print").val(1):s("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-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-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var p="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(p='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+e.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+p)}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-post-specific-wrapper[data-id="+a+"] .saswp-post-specific-setting").after(e),s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){t.removeClass("updating-message"),"t"==e.status?(s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+a).val();if(s(this).is(":checked")){var p=0;s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s("#saswp_custom_schema_field[schema-id="+a+"]").parent().addClass("saswp_hide")}else{s("#saswp_custom_schema_field[schema-id="+a+"]").parent().removeClass("saswp_hide"),1==i?(s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"));p=1}s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:p,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),1==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),p=s("#"+i+"_addon_license_key").val();t&&i&&p?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:p,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)),a.removeClass("updating-message")},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();console.log(saswpIsEmail(t)),""!=s.trim(a)&&i&&""!=s.trim(t)&&1==saswpIsEmail(t)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",premium_cus:i,message:a,email:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s(".saswp-query-success").show(),s(".saswp-query-error").hide()):(s(".saswp-query-success").hide(),s(".saswp-query-error").show())},error:function(s){console.log(s)}}):""==s.trim(a)&&""==i&&""==s.trim(t)?alert("Please enter the message, email and select customer type"):(""==i&&alert("Select Customer type"),""==s.trim(a)&&alert("Please enter the message"),""==s.trim(t)&&alert("Please enter the email"),0==saswpIsEmail(t)&&alert("Please enter a valid email"))}),s(".saswp-import-plugins").on("click",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id");s.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?(s(a).parent().find(".saswp-imported-message").text(e.message),s(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(s(a).parent().find(".saswp-imported-message").addClass("saswp-error"),s(a).parent().find(".saswp-imported-message").text(e.message)),a.removeClass("updating-message")},"json")}),s(".saswp-feedback-no-thanks").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(".saswp-feedback-remindme").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(document).on("change",".saswp-local-business-type-select",function(e){e.preventDefault();var a=s(this),t=s(this).val();s.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){s(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',s.each(e.result,function(s,e){i+='<option value="'+s+'">'+e+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else s(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),jQuery(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),s(document).on("click",".saswp-add-custom-schema",function(e){e.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(e){e.preventDefault(),s("#saswp_custom_schema_field").val(""),s(".saswp-add-custom-schema-field").addClass("saswp_hide"),s(".saswp-add-custom-schema").show()}),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_reviews_datepicker(),s(document).on("click",".saswp-add-more-item",function(e){e.preventDefault();s(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),s(document).on("click",".saswp-remove-review-item",function(e){e.preventDefault(),s(this).parent().parent("tr").remove()}),s(document).on("focusout",".saswp-review-item-tr input[type=number]",function(e){e.preventDefault();var a=0,t=s(".saswp-review-item-tr input[type=number]").length;s(".saswp-review-item-tr input[type=number]").each(function(e,t){""==s(t).val()?a+=parseFloat(0):a+=parseFloat(s(t).val())});var i=a/t;s("#saswp-review-item-over-all").val(i)}),s("#saswp-review-location").change(function(){var e=s(this).val();s(".saswp-review-shortcode").addClass("saswp_hide"),3==e&&s(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),s("#saswp-review-item-enable").change(function(){s(this).is(":checked")?s(".saswp-review-fields").show():s(".saswp-review-fields").hide()}).change(),s(document).on("click",".saswp-restore-post-schema",function(e){e.preventDefault();var a=s(this);if(a.addClass("updating-message"),s(".saswp-post-specific-schema-ids").val())var t=JSON.parse(s(".saswp-post-specific-schema-ids").val());s.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?setTimeout(function(){location.reload()},1e3):(alert(s.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?s(".saswp-global-container:eq(2)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s(".saswp-tools-container:first").show(),s("#saswp-tools-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-tools-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();-1==t.indexOf("_image")&&-1==t.indexOf("_logo")||(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),p=s(this).attr("div_type"),o=s(this).attr("itemlist_sub_type"),c=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div:nth-child("+c+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,p,t,i+"_",o)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),p="",o=a.toLowerCase()+"_"+i,c="saswp_fixed_image["+i+"]";"manual_text"==t?(p+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(p+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(p),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,p+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(p),saswpCustomSelect2())},"json"):"custom_field"==t?(p+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',p+="</select></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"fixed_image"==t?(p+="<td>",p+="<fieldset>",p+='<input data-id="media" style="width: 30%;" class="button" id="'+o+'_button" name="'+o+'_button" type="button" value="Upload" />',p+='<input type="hidden" data-id="'+o+'_height" class="upload-height" name="'+c+'[height]" id="'+o+'_height" value="">',p+='<input type="hidden" data-id="'+o+'_width" class="upload-width" name="'+c+'[width]" id="'+o+'_width" value="">',p+='<input type="hidden" data-id="'+o+'_thumbnail" class="upload-thumbnail" name="'+c+'[thumbnail]" id="'+o+'_thumbnail" value="">',p+='<div class="saswp_image_div_'+o+'">',p+="</div>",p+="</fieldset>",p+="</td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):(p+="<td></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var p=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:p,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('<tr><td><input type="text" placeholder="https://www.facebook.com/profile" name="sd_data[saswp_social_links][]" value=""></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td></tr>')}),s(document).on("click",".saswp-show-accept-rv-popup",function(){tb_show("Reviews Form","#TB_inline??width=600&height=400&inlineId=saswp-accept-reviews-popup"),s(document).find("#TB_window").width(600).height(400).css({top:"100px","margin-top":"0px"})}),("saswp_reviews"==saswp_localize_data.post_type||"saswp-collections"==saswp_localize_data.post_type)&&"edit.php"==saswp_localize_data.page_now){var i='<div class="saswp-custom-post-tab">';i+='<div style="display:none;" id="saswp-accept-reviews-popup">',i+='<div class="saswp-accept-rv-container">',i+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",i+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',i+='<div class="saswp-show-form-on-tab"><strong>Show form on button tap</strong> <input value="[saswp-reviews-form onbutton=&quot;1&quot;]" type="text" readonly></div>',i+="</div>",i+="</div>",i+='<h2 class="nav-tab-wrapper">',i+="<a href="+saswp_localize_data.reviews_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.reviews_page_url?"saswp-global-selected":"")+'">Reviews</a>',i+="<a href="+saswp_localize_data.collections_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.collections_page_url?"saswp-global-selected":"")+'">Collections</a>',i+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',i+="</h2>",i+="</div>",jQuery(jQuery(".wrap")).prepend(i)}"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().val(e)}}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')}),saswpCollectionSlider(),s(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),"grid"==e&&s(".saswp-grid-options").removeClass("saswp_hide"),"gallery"==e&&s(".saswp-slider-options").removeClass("saswp_hide"),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px")),"popup"==e&&s(".saswp-collection-lp").css("height","31px"),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a)):alert("Enter Count")});var p,o,c=s("#saswp_collection_id").val();c&&(s(".spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_collection_platforms",collection_id:c,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if(e.status){var a=e.message;s.each(a,function(s,e){saswp_get_collection_data(e,s,null)})}s(".spinner").removeClass("is-active")},"json")),(p=document.createElement("div")).style.cssText="position:absolute; background:black; color:white; padding:4px 6px;z-index:10000;border-radius:2px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);opacity:0;transition:opacity 0.3s",p.innerHTML="Copied!",document.body.appendChild(p);var n=document.getElementById("motivatebox");n&&n.addEventListener("mouseup",function(s){var e=(s=s||event).target||s.srcElement;"motivate"==e.className&&(!function(s){var e=document.createRange();e.selectNodeContents(s);var a=window.getSelection();a.removeAllRanges(),a.addRange(e)}(e),function(){var s;try{s=document.execCommand("copy")}catch(e){s=!1}return s}()&&function(s){var e=s||event;clearTimeout(o),p.style.left=e.pageX-10+"px",p.style.top=e.pageY+15+"px",p.style.opacity=1,o=setTimeout(function(){p.style.opacity=0},500)}(s))},!1)});
admin_section/structure_admin.php CHANGED
@@ -39,28 +39,34 @@ function saswp_delete_post_transient( $post_id ){
39
  }
40
 
41
  function saswp_get_saved_schema_ids(){
42
-
 
43
  $schema_ids = array();
44
-
45
- $all_schemas = get_posts(
46
- array(
47
- 'post_type' => 'saswp',
48
- 'posts_per_page' => -1,
49
- 'post_status' => 'publish',
50
- )
51
- );
 
 
 
 
 
52
  if($all_schemas){
53
-
54
- foreach($all_schemas as $schema){
55
-
56
- $schema_ids[] = $schema->ID;
57
 
58
- }
59
-
60
- }
 
 
61
 
62
  return $schema_ids;
63
-
64
  }
65
 
66
  /*
@@ -1195,7 +1201,18 @@ function saswp_custom_column_set( $column, $post_id ) {
1195
  $url = admin_url( 'post.php?post='.$post_id.'&action=edit' );
1196
 
1197
  if($schema_type == 'local_business'){
1198
- echo '<strong><a class="row-title" href="'.esc_url($url).'">LocalBusiness</a></strong>';
 
 
 
 
 
 
 
 
 
 
 
1199
  }else if($schema_type == 'qanda'){
1200
  echo '<strong><a class="row-title" href="'.esc_url($url).'">Q&A</a></strong>';
1201
  }else{
39
  }
40
 
41
  function saswp_get_saved_schema_ids(){
42
+
43
+ global $all_schemas;
44
  $schema_ids = array();
45
+
46
+ if(!$all_schemas){
47
+
48
+ $all_schemas = get_posts(
49
+ array(
50
+ 'post_type' => 'saswp',
51
+ 'posts_per_page' => -1,
52
+ 'post_status' => 'publish',
53
+ )
54
+ );
55
+
56
+ }
57
+
58
  if($all_schemas){
59
+
60
+ foreach($all_schemas as $schema){
 
 
61
 
62
+ $schema_ids[] = $schema->ID;
63
+
64
+ }
65
+
66
+ }
67
 
68
  return $schema_ids;
69
+
70
  }
71
 
72
  /*
1201
  $url = admin_url( 'post.php?post='.$post_id.'&action=edit' );
1202
 
1203
  if($schema_type == 'local_business'){
1204
+
1205
+ $business_type = get_post_meta($post_id, 'saswp_business_type', true);
1206
+ $business_name = get_post_meta($post_id, 'saswp_business_name', true);
1207
+
1208
+ if($business_name){
1209
+ echo '<strong><a class="row-title" href="'.esc_url($url).'">LocalBusiness ('.esc_html($business_name).')</a></strong>';
1210
+ } else if($business_type){
1211
+ echo '<strong><a class="row-title" href="'.esc_url($url).'">LocalBusiness ('.esc_html($business_type).')</a></strong>';
1212
+ } else {
1213
+ echo '<strong><a class="row-title" href="'.esc_url($url).'">LocalBusiness</a></strong>';
1214
+ }
1215
+
1216
  }else if($schema_type == 'qanda'){
1217
  echo '<strong><a class="row-title" href="'.esc_url($url).'">Q&A</a></strong>';
1218
  }else{
core/3rd-party/class-amp-review-form-blacklist.php CHANGED
@@ -323,15 +323,7 @@ if ( class_exists( 'AMP_Blacklist_Sanitizer' ) ) {
323
 
324
  }
325
 
326
- }
327
-
328
- // Remove the node from the parent, if defined.
329
-
330
- if ( $node->parentNode ) {
331
-
332
- $node->parentNode->removeChild( $node );
333
-
334
- }
335
 
336
  }
337
 
323
 
324
  }
325
 
326
+ }
 
 
 
 
 
 
 
 
327
 
328
  }
329
 
core/array-list/schema-properties.php CHANGED
@@ -752,6 +752,30 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
752
  'TheaterEvent' => 'TheaterEvent',
753
  'VisualArtsEvent' => 'VisualArtsEvent'
754
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
755
  ),
756
  array(
757
  'label' => 'Name',
@@ -763,6 +787,16 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
763
  'id' => 'saswp_event_schema_description_'.$schema_id,
764
  'type' => 'textarea',
765
  ),
 
 
 
 
 
 
 
 
 
 
766
  array(
767
  'label' => 'Location Name',
768
  'id' => 'saswp_event_schema_location_name_'.$schema_id,
@@ -793,6 +827,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
793
  'id' => 'saswp_event_schema_location_country_'.$schema_id,
794
  'type' => 'text',
795
  ),
 
 
 
 
 
796
  array(
797
  'label' => 'Start Date',
798
  'id' => 'saswp_event_schema_start_date_'.$schema_id,
@@ -812,7 +851,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
812
  'label' => 'End Time',
813
  'id' => 'saswp_event_schema_end_time_'.$schema_id,
814
  'type' => 'text',
815
- ),
816
  array(
817
  'label' => 'Image',
818
  'id' => 'saswp_event_schema_image_'.$schema_id,
@@ -1582,6 +1621,12 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
1582
  'type' => 'text',
1583
  'default' => get_the_date("Y-m-d")
1584
  );
 
 
 
 
 
 
1585
  $meta_field[] = array(
1586
  'label' => 'Review URL',
1587
  'id' => 'saswp_review_url_'.$schema_id,
752
  'TheaterEvent' => 'TheaterEvent',
753
  'VisualArtsEvent' => 'VisualArtsEvent'
754
  )
755
+ ),
756
+ array(
757
+ 'label' => 'Event Status',
758
+ 'id' => 'saswp_event_schema_status_'.$schema_id,
759
+ 'type' => 'select',
760
+ 'options' => array(
761
+ '' => 'Select Status',
762
+ 'EventScheduled' => 'EventScheduled',
763
+ 'EventPostponed' => 'Postponed',
764
+ 'EventRescheduled' => 'Rescheduled',
765
+ 'EventMovedOnline' => 'MovedOnline',
766
+ 'EventCancelled' => 'Cancelled'
767
+ )
768
+ ),
769
+ array(
770
+ 'label' => 'Attendance Mode',
771
+ 'id' => 'saswp_event_schema_attendance_mode_'.$schema_id,
772
+ 'type' => 'select',
773
+ 'options' => array(
774
+ '' => 'Select Attendance Mode',
775
+ 'OfflineEventAttendanceMode' => 'Offline',
776
+ 'OnlineEventAttendanceMode' => 'Online',
777
+ 'MixedEventAttendanceMode' => 'Mixed',
778
+ )
779
  ),
780
  array(
781
  'label' => 'Name',
787
  'id' => 'saswp_event_schema_description_'.$schema_id,
788
  'type' => 'textarea',
789
  ),
790
+ array(
791
+ 'label' => 'Virtual Location Name',
792
+ 'id' => 'saswp_event_schema_virtual_location_name_'.$schema_id,
793
+ 'type' => 'text',
794
+ ),
795
+ array(
796
+ 'label' => 'Virtual Location URL',
797
+ 'id' => 'saswp_event_schema_virtual_location_url_'.$schema_id,
798
+ 'type' => 'text',
799
+ ),
800
  array(
801
  'label' => 'Location Name',
802
  'id' => 'saswp_event_schema_location_name_'.$schema_id,
827
  'id' => 'saswp_event_schema_location_country_'.$schema_id,
828
  'type' => 'text',
829
  ),
830
+ array(
831
+ 'label' => 'Previous Start Date',
832
+ 'id' => 'saswp_event_schema_previous_start_date_'.$schema_id,
833
+ 'type' => 'text',
834
+ ),
835
  array(
836
  'label' => 'Start Date',
837
  'id' => 'saswp_event_schema_start_date_'.$schema_id,
851
  'label' => 'End Time',
852
  'id' => 'saswp_event_schema_end_time_'.$schema_id,
853
  'type' => 'text',
854
+ ),
855
  array(
856
  'label' => 'Image',
857
  'id' => 'saswp_event_schema_image_'.$schema_id,
1621
  'type' => 'text',
1622
  'default' => get_the_date("Y-m-d")
1623
  );
1624
+ $meta_field[] = array(
1625
+ 'label' => 'Review Modified Date',
1626
+ 'id' => 'saswp_review_date_modified_'.$schema_id,
1627
+ 'type' => 'text',
1628
+ 'default' => get_the_modified_date("Y-m-d")
1629
+ );
1630
  $meta_field[] = array(
1631
  'label' => 'Review URL',
1632
  'id' => 'saswp_review_url_'.$schema_id,
output/markup.php CHANGED
@@ -345,19 +345,7 @@ function saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta){
345
  'url' => isset($event_image['thumbnail']) ? esc_url($event_image['thumbnail']):'' ,
346
  'width' => isset($event_image['width']) ? esc_attr($event_image['width']) :'' ,
347
  'height' => isset($event_image['height']) ? esc_attr($event_image['height']) :'' ,
348
- ),
349
- 'location' => array(
350
- '@type' => 'Place',
351
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_name_'.$schema_id, 'saswp_array'),
352
- 'address' => array(
353
- '@type' => 'PostalAddress',
354
- 'streetAddress' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_streetaddress_'.$schema_id, 'saswp_array'),
355
- 'addressLocality' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_locality_'.$schema_id, 'saswp_array'),
356
- 'postalCode' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_postalcode_'.$schema_id, 'saswp_array'),
357
- 'addressRegion' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_region_'.$schema_id, 'saswp_array'),
358
- 'addressCountry' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_country_'.$schema_id, 'saswp_array'),
359
- )
360
- ),
361
  'offers' => array(
362
  '@type' => 'Offer',
363
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_url_'.$schema_id, 'saswp_array'),
@@ -367,8 +355,53 @@ function saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta){
367
  'validFrom' => isset($all_post_meta['saswp_event_schema_validfrom_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_event_schema_validfrom_'.$schema_id][0])):'',
368
  )
369
  );
370
-
371
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
372
  if(isset($all_post_meta['saswp_event_schema_start_date_'.$schema_id][0])){
373
 
374
  $date = $time = '';
@@ -1372,7 +1405,7 @@ function saswp_job_posting_schema_markup($schema_id, $schema_post_id, $all_post_
1372
  $input1['baseSalary']['value']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_value_'.$schema_id, 'saswp_array');
1373
  $input1['baseSalary']['value']['unitText'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_unittext_'.$schema_id, 'saswp_array');
1374
 
1375
- if(isset($all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0]) && $all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0] < date('Y-m-d')){
1376
  $input1 = array();
1377
  }
1378
 
@@ -2621,6 +2654,7 @@ function saswp_review_schema_markup($schema_id, $schema_post_id, $all_post_meta)
2621
  $input1['name'] = isset($all_post_meta['saswp_review_name_'.$schema_id][0]) ? $all_post_meta['saswp_review_name_'.$schema_id][0] : '';
2622
  $input1['url'] = isset($all_post_meta['saswp_review_url_'.$schema_id][0]) ? $all_post_meta['saswp_review_url_'.$schema_id][0] : '';
2623
  $input1['datePublished'] = isset($all_post_meta['saswp_review_date_published_'.$schema_id][0])&& $all_post_meta['saswp_review_date_published_'.$schema_id][0] !='' ? saswp_format_date_time($all_post_meta['saswp_review_date_published_'.$schema_id][0], get_post_time('h:i:s')) : '';
 
2624
 
2625
  if(isset($all_post_meta['saswp_review_publisher_'.$schema_id][0])){
2626
  $input1['publisher']['@type'] = 'Organization';
345
  'url' => isset($event_image['thumbnail']) ? esc_url($event_image['thumbnail']):'' ,
346
  'width' => isset($event_image['width']) ? esc_attr($event_image['width']) :'' ,
347
  'height' => isset($event_image['height']) ? esc_attr($event_image['height']) :'' ,
348
+ ),
 
 
 
 
 
 
 
 
 
 
 
 
349
  'offers' => array(
350
  '@type' => 'Offer',
351
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_url_'.$schema_id, 'saswp_array'),
355
  'validFrom' => isset($all_post_meta['saswp_event_schema_validfrom_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_event_schema_validfrom_'.$schema_id][0])):'',
356
  )
357
  );
358
+
359
+
360
+ $phy_location = array(
361
+ '@type' => 'Place',
362
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_name_'.$schema_id, 'saswp_array'),
363
+ 'address' => array(
364
+ '@type' => 'PostalAddress',
365
+ 'streetAddress' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_streetaddress_'.$schema_id, 'saswp_array'),
366
+ 'addressLocality' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_locality_'.$schema_id, 'saswp_array'),
367
+ 'postalCode' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_postalcode_'.$schema_id, 'saswp_array'),
368
+ 'addressRegion' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_region_'.$schema_id, 'saswp_array'),
369
+ 'addressCountry' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_country_'.$schema_id, 'saswp_array'),
370
+ )
371
+ );
372
+
373
+ $vir_location = array(
374
+ '@type' => 'VirtualLocation',
375
+ 'name' => isset($all_post_meta['saswp_event_schema_virtual_location_name_'.$schema_id][0]) ? $all_post_meta['saswp_event_schema_virtual_location_name_'.$schema_id][0] : '',
376
+ 'url' => isset($all_post_meta['saswp_event_schema_virtual_location_url_'.$schema_id][0]) ? $all_post_meta['saswp_event_schema_virtual_location_url_'.$schema_id][0]: ''
377
+ );
378
+ if(isset($all_post_meta['saswp_event_schema_attendance_mode_'.$schema_id][0]) && $all_post_meta['saswp_event_schema_attendance_mode_'.$schema_id][0] == 'OfflineEventAttendanceMode'){
379
+ $input1['location'] = $phy_location;
380
+ }else if(isset($all_post_meta['saswp_event_schema_attendance_mode_'.$schema_id][0]) && $all_post_meta['saswp_event_schema_attendance_mode_'.$schema_id][0] == 'OnlineEventAttendanceMode'){
381
+ $input1['location'] = $vir_location;
382
+ }else{
383
+ $input1['location'] = array($vir_location, $phy_location);
384
+ }
385
+ if(isset($all_post_meta['saswp_event_schema_status_'.$schema_id][0])){
386
+ $input1['eventStatus'] = $all_post_meta['saswp_event_schema_status_'.$schema_id][0];
387
+ }
388
+ if(isset($all_post_meta['saswp_event_schema_attendance_mode_'.$schema_id][0])){
389
+ $input1['eventAttendanceMode'] = $all_post_meta['saswp_event_schema_attendance_mode_'.$schema_id][0];
390
+ }
391
+ if(isset($all_post_meta['saswp_event_schema_previous_start_date_'.$schema_id][0])){
392
+
393
+ $date = $time = '';
394
+
395
+ $date = $all_post_meta['saswp_event_schema_previous_start_date_'.$schema_id][0];
396
+
397
+ if(isset($all_post_meta['saswp_event_schema_previous_start_time_'.$schema_id][0])){
398
+ $time = $all_post_meta['saswp_event_schema_previous_start_time_'.$schema_id][0];
399
+ }
400
+
401
+ $input1['previousStartDate'] = saswp_format_date_time($date, $time);
402
+
403
+ }
404
+
405
  if(isset($all_post_meta['saswp_event_schema_start_date_'.$schema_id][0])){
406
 
407
  $date = $time = '';
1405
  $input1['baseSalary']['value']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_value_'.$schema_id, 'saswp_array');
1406
  $input1['baseSalary']['value']['unitText'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_unittext_'.$schema_id, 'saswp_array');
1407
 
1408
+ if(isset($all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0]) && date('Y-m-d',strtotime($all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0])) < date('Y-m-d')){
1409
  $input1 = array();
1410
  }
1411
 
2654
  $input1['name'] = isset($all_post_meta['saswp_review_name_'.$schema_id][0]) ? $all_post_meta['saswp_review_name_'.$schema_id][0] : '';
2655
  $input1['url'] = isset($all_post_meta['saswp_review_url_'.$schema_id][0]) ? $all_post_meta['saswp_review_url_'.$schema_id][0] : '';
2656
  $input1['datePublished'] = isset($all_post_meta['saswp_review_date_published_'.$schema_id][0])&& $all_post_meta['saswp_review_date_published_'.$schema_id][0] !='' ? saswp_format_date_time($all_post_meta['saswp_review_date_published_'.$schema_id][0], get_post_time('h:i:s')) : '';
2657
+ $input1['dateModified'] = isset($all_post_meta['saswp_review_date_modified_'.$schema_id][0])&& $all_post_meta['saswp_review_date_modified_'.$schema_id][0] !='' ? saswp_format_date_time($all_post_meta['saswp_review_date_modified_'.$schema_id][0], get_post_time('h:i:s')) : '';
2658
 
2659
  if(isset($all_post_meta['saswp_review_publisher_'.$schema_id][0])){
2660
  $input1['publisher']['@type'] = 'Organization';
output/service.php CHANGED
@@ -405,8 +405,24 @@ Class saswp_output_service{
405
  }
406
  }
407
  if(isset($custom_fields['saswp_review_date_published'])){
408
- $review_markup['datePublished'] = date('c',strtotime($custom_fields['saswp_review_date_published']));
409
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
 
411
  }
412
 
@@ -979,7 +995,10 @@ Class saswp_output_service{
979
  break;
980
 
981
  case 'Event':
982
-
 
 
 
983
  if(isset($custom_fields['saswp_event_schema_name'])){
984
  $input1['name'] = $custom_fields['saswp_event_schema_name'];
985
  }
@@ -989,29 +1008,57 @@ Class saswp_output_service{
989
 
990
  if(isset($custom_fields['saswp_event_schema_location_name']) || isset($custom_fields['saswp_event_schema_location_streetaddress'])){
991
 
992
- $input1['location']['@type'] = 'Place';
993
- $input1['location']['name'] = $custom_fields['saswp_event_schema_location_name'];
994
 
995
  if(isset($custom_fields['saswp_event_schema_location_streetaddress'])){
996
- $input1['location']['address']['streetAddress'] = $custom_fields['saswp_event_schema_location_streetaddress'];
997
  }
998
  if(isset($custom_fields['saswp_event_schema_location_locality'])){
999
- $input1['location']['address']['addressLocality'] = $custom_fields['saswp_event_schema_location_locality'];
1000
  }
1001
  if(isset($custom_fields['saswp_event_schema_location_region'])){
1002
- $input1['location']['address']['addressRegion'] = $custom_fields['saswp_event_schema_location_region'];
1003
  }
1004
  if(isset($custom_fields['saswp_event_schema_location_postalcode'])){
1005
- $input1['location']['address']['postalCode'] = $custom_fields['saswp_event_schema_location_postalcode'];
1006
  }
1007
  if(isset($custom_fields['saswp_event_schema_location_country'])){
1008
- $input1['location']['address']['addressCountry'] = $custom_fields['saswp_event_schema_location_country'];
1009
  }
1010
  if(isset($custom_fields['saswp_event_schema_location_hasmap'])){
1011
- $input1['location']['hasMap'] = $custom_fields['saswp_event_schema_location_hasmap'];
1012
  }
 
 
 
 
 
1013
  }
1014
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1015
  if(isset($custom_fields['saswp_event_schema_start_date'])){
1016
 
1017
  $time = '';
@@ -2145,7 +2192,7 @@ Class saswp_output_service{
2145
  if(isset($custom_fields['saswp_jobposting_schema_bs_unittext'])){
2146
  $input1['baseSalary']['value']['unitText'] = $custom_fields['saswp_jobposting_schema_bs_unittext'];
2147
  }
2148
- if(isset($custom_fields['saswp_jobposting_schema_validthrough']) && $custom_fields['saswp_jobposting_schema_validthrough'] < date('Y-m-d') ){
2149
  $input1 = array();
2150
  }
2151
 
@@ -3115,7 +3162,7 @@ Class saswp_output_service{
3115
 
3116
  $resize_image = saswp_aq_resize( $image_details[0], $width[$i], $height[$i], true, false, true );
3117
 
3118
- if(isset($resize_image[0]) && isset($resize_image[1]) && isset($resize_image[2]) ){
3119
 
3120
  $input2['image'][$i]['@type'] = 'ImageObject';
3121
 
@@ -3150,7 +3197,7 @@ Class saswp_output_service{
3150
 
3151
  $resize_image = saswp_aq_resize( $image_details[0], $width[$i], $height[$i], true, false, true );
3152
 
3153
- if(isset($resize_image[0]) && isset($resize_image[1]) && isset($resize_image[2]) ){
3154
 
3155
  $input2['image'][$i]['@type'] = 'ImageObject';
3156
 
@@ -3170,7 +3217,7 @@ Class saswp_output_service{
3170
 
3171
  }
3172
 
3173
- if(empty($input2)){
3174
 
3175
  $input2['image']['@type'] = 'ImageObject';
3176
  $input2['image']['@id'] = saswp_get_permalink().'#primaryimage';
@@ -3205,11 +3252,13 @@ Class saswp_output_service{
3205
 
3206
  if(is_array($attach_details) && !empty($attach_details)){
3207
 
3208
- $attach_images['image'][$k]['@type'] = 'ImageObject';
3209
- $attach_images['image'][$k]['url'] = esc_url($attachment);
3210
- $attach_images['image'][$k]['width'] = isset($attach_details[$k][0]) ? $attach_details[$k][0] : 0;
3211
- $attach_images['image'][$k]['height'] = isset($attach_details[$k][1]) ? $attach_details[$k][1] : 0;
3212
-
 
 
3213
  }
3214
 
3215
  $k++;
@@ -3242,10 +3291,12 @@ Class saswp_output_service{
3242
 
3243
  if(is_array($resized_image) && !empty($resized_image)){
3244
 
3245
- $attach_images['image'][$key]['url'] = $resized_image[0];
3246
- $attach_images['image'][$key]['width'] = $resized_image[1];
3247
- $attach_images['image'][$key]['height'] = $resized_image[2];
3248
-
 
 
3249
  }
3250
 
3251
  }
@@ -3305,7 +3356,7 @@ Class saswp_output_service{
3305
 
3306
  $custom_logo_id = get_theme_mod( 'custom_logo' );
3307
  $img_details = wp_get_attachment_image_src( $custom_logo_id, 'full');
3308
- if($img_details[0]){
3309
  $img_details = @saswp_aq_resize( $img_details[0], 600, 60, true, false, true );
3310
  }
3311
 
405
  }
406
  }
407
  if(isset($custom_fields['saswp_review_date_published'])){
408
+
409
+ if(saswp_validate_date($custom_fields['saswp_review_date_published'], 'Y-m-d\TH:i:sP')){
410
+ $review_markup['datePublished'] = $custom_fields['saswp_review_date_published'];
411
+ }else{
412
+ $review_markup['datePublished'] = date('c',strtotime($custom_fields['saswp_review_date_published']));
413
+ }
414
+
415
+ }
416
+
417
+ if(isset($custom_fields['saswp_review_date_modified'])){
418
+
419
+ if(saswp_validate_date($custom_fields['saswp_review_date_modified'], 'Y-m-d\TH:i:sP')){
420
+ $review_markup['dateModified'] = $custom_fields['saswp_review_date_modified'];
421
+ }else{
422
+ $review_markup['dateModified'] = date('c',strtotime($custom_fields['saswp_review_date_modified']));
423
+ }
424
+
425
+ }
426
 
427
  }
428
 
995
  break;
996
 
997
  case 'Event':
998
+
999
+ $phy_location = array();
1000
+ $vir_location = array();
1001
+
1002
  if(isset($custom_fields['saswp_event_schema_name'])){
1003
  $input1['name'] = $custom_fields['saswp_event_schema_name'];
1004
  }
1008
 
1009
  if(isset($custom_fields['saswp_event_schema_location_name']) || isset($custom_fields['saswp_event_schema_location_streetaddress'])){
1010
 
1011
+ $phy_location['@type'] = 'Place';
1012
+ $phy_location['name'] = $custom_fields['saswp_event_schema_location_name'];
1013
 
1014
  if(isset($custom_fields['saswp_event_schema_location_streetaddress'])){
1015
+ $phy_location['address']['streetAddress'] = $custom_fields['saswp_event_schema_location_streetaddress'];
1016
  }
1017
  if(isset($custom_fields['saswp_event_schema_location_locality'])){
1018
+ $phy_location['address']['addressLocality'] = $custom_fields['saswp_event_schema_location_locality'];
1019
  }
1020
  if(isset($custom_fields['saswp_event_schema_location_region'])){
1021
+ $phy_location['address']['addressRegion'] = $custom_fields['saswp_event_schema_location_region'];
1022
  }
1023
  if(isset($custom_fields['saswp_event_schema_location_postalcode'])){
1024
+ $phy_location['address']['postalCode'] = $custom_fields['saswp_event_schema_location_postalcode'];
1025
  }
1026
  if(isset($custom_fields['saswp_event_schema_location_country'])){
1027
+ $phy_location['address']['addressCountry'] = $custom_fields['saswp_event_schema_location_country'];
1028
  }
1029
  if(isset($custom_fields['saswp_event_schema_location_hasmap'])){
1030
+ $phy_location['hasMap'] = $custom_fields['saswp_event_schema_location_hasmap'];
1031
  }
1032
+ }
1033
+ if(isset($custom_fields['saswp_event_schema_virtual_location_name']) || isset($custom_fields['saswp_event_schema_virtual_location_url'])){
1034
+ $vir_location['@type'] = 'VirtualLocation';
1035
+ $reviews_arr['name'] = $custom_fields['saswp_event_schema_virtual_location_name'];
1036
+ $vir_location['url'] = $custom_fields['saswp_event_schema_virtual_location_url'];
1037
  }
1038
 
1039
+ $input1['location'] = array($vir_location, $phy_location);
1040
+
1041
+ if(isset($custom_fields['saswp_event_schema_status'])){
1042
+ $input1['eventStatus'] = $custom_fields['saswp_event_schema_status'];
1043
+ }
1044
+ if( isset($custom_fields['saswp_event_schema_attendance_mode']) ){
1045
+ $input1['eventAttendanceMode'] = $custom_fields['saswp_event_schema_attendance_mode'];
1046
+ }
1047
+
1048
+ if(isset($custom_fields['saswp_event_schema_previous_start_date'])){
1049
+
1050
+ $time = '';
1051
+
1052
+ if(isset($custom_fields['saswp_event_schema_previous_start_time'])){
1053
+
1054
+ $time = $custom_fields['saswp_event_schema_previous_start_time'];
1055
+
1056
+ }
1057
+
1058
+ $input1['previousStartDate'] = saswp_format_date_time($custom_fields['saswp_event_schema_previous_start_date'], $time);
1059
+
1060
+ }
1061
+
1062
  if(isset($custom_fields['saswp_event_schema_start_date'])){
1063
 
1064
  $time = '';
2192
  if(isset($custom_fields['saswp_jobposting_schema_bs_unittext'])){
2193
  $input1['baseSalary']['value']['unitText'] = $custom_fields['saswp_jobposting_schema_bs_unittext'];
2194
  }
2195
+ if(isset($custom_fields['saswp_jobposting_schema_validthrough']) && date('Y-m-d',strtotime($custom_fields['saswp_jobposting_schema_validthrough'])) < date('Y-m-d') ){
2196
  $input1 = array();
2197
  }
2198
 
3162
 
3163
  $resize_image = saswp_aq_resize( $image_details[0], $width[$i], $height[$i], true, false, true );
3164
 
3165
+ if(isset($resize_image[0]) && $resize_image[0] !='' && isset($resize_image[1]) && isset($resize_image[2]) ){
3166
 
3167
  $input2['image'][$i]['@type'] = 'ImageObject';
3168
 
3197
 
3198
  $resize_image = saswp_aq_resize( $image_details[0], $width[$i], $height[$i], true, false, true );
3199
 
3200
+ if(isset($resize_image[0]) && $resize_image[0] != '' && isset($resize_image[1]) && isset($resize_image[2]) ){
3201
 
3202
  $input2['image'][$i]['@type'] = 'ImageObject';
3203
 
3217
 
3218
  }
3219
 
3220
+ if(empty($input2) && isset($image_details[0]) && $image_details[0] !='' && isset($image_details[1]) && isset($image_details[2]) ){
3221
 
3222
  $input2['image']['@type'] = 'ImageObject';
3223
  $input2['image']['@id'] = saswp_get_permalink().'#primaryimage';
3252
 
3253
  if(is_array($attach_details) && !empty($attach_details)){
3254
 
3255
+ if($attachment !=''){
3256
+ $attach_images['image'][$k]['@type'] = 'ImageObject';
3257
+ $attach_images['image'][$k]['url'] = esc_url($attachment);
3258
+ $attach_images['image'][$k]['width'] = isset($attach_details[$k][0]) ? $attach_details[$k][0] : 0;
3259
+ $attach_images['image'][$k]['height'] = isset($attach_details[$k][1]) ? $attach_details[$k][1] : 0;
3260
+ }
3261
+
3262
  }
3263
 
3264
  $k++;
3291
 
3292
  if(is_array($resized_image) && !empty($resized_image)){
3293
 
3294
+ if(isset($resized_image[0]) && $resized_image[0] !=''){
3295
+ $attach_images['image'][$key]['url'] = $resized_image[0];
3296
+ $attach_images['image'][$key]['width'] = $resized_image[1];
3297
+ $attach_images['image'][$key]['height'] = $resized_image[2];
3298
+ }
3299
+
3300
  }
3301
 
3302
  }
3356
 
3357
  $custom_logo_id = get_theme_mod( 'custom_logo' );
3358
  $img_details = wp_get_attachment_image_src( $custom_logo_id, 'full');
3359
+ if(isset($img_details[0])){
3360
  $img_details = @saswp_aq_resize( $img_details[0], 600, 60, true, false, true );
3361
  }
3362
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.3
6
- Stable tag: 1.9.29
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -118,6 +118,20 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
118
 
119
  == Changelog ==
120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  = 1.9.29 (26 Mar 2020) =
122
 
123
  * Fixed: When we update the page it is getting redirect to the warning url when schema is activated #871
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.3
6
+ Stable tag: 1.9.30
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
118
 
119
  == Changelog ==
120
 
121
+ = 1.9.30 (30 Mar 2020) =
122
+
123
+ * Fixed: Duplicate Query in some places that can be improved #897
124
+ * Fixed: Structured data markup has a corrupted font #902
125
+ * Fixed: Review Schema, datePublished is being populated with an incorrect format as offset time is missing #894
126
+ * Fixed: Primary image other properties should not be appeared if url is blank #882
127
+ * Fixed: Jump links not working in AMP if user is using it along with the Schema and Structured data FOR WP plugin #878
128
+ * Fixed: Debug Warnings.(Trying to access array offset on value of type bool in /htdocs/1/wp-content/plugins/schema-and-structured-data-for-wp/output/service.php on line 3308) #898
129
+ * Fixed: If we selected sub-business type that selected sub-business type should also appear in the schema type column #899
130
+ * Added: Virtual Location property in event schema #886
131
+ * Added: Event Attendance Mode property in event schema (google latest support) #886
132
+ * Added: Event Status property in event schema (google latest support) #891
133
+ * Added: Date Modified proprerty in review schema type. #894
134
+
135
  = 1.9.29 (26 Mar 2020) =
136
 
137
  * Fixed: When we update the page it is getting redirect to the warning url when schema is activated #871
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.29
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.29');
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.30
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.30');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
view/schema_type.php CHANGED
@@ -873,6 +873,7 @@ function saswp_schema_type_meta_box_callback( $post) {
873
  $review_fields['saswp_review_publisher_url'] = 'Review Publisher URL';
874
  $review_fields['saswp_review_rating_value'] = 'Review Rating Value';
875
  $review_fields['saswp_review_date_published'] = 'Review Published Date';
 
876
  $review_fields['saswp_review_url'] = 'Review URL';
877
 
878
  }
@@ -1183,6 +1184,8 @@ function saswp_schema_type_add_meta_box_save( $post_id ) {
1183
 
1184
  if(isset($_POST['saswp_business_name'])){
1185
  update_post_meta( $post_id, 'saswp_business_name', sanitize_text_field( $_POST['saswp_business_name'] ) );
 
 
1186
  }
1187
  if(isset($_POST['saswp_enable_speakable_schema'])){
1188
  update_post_meta( $post_id, 'saswp_enable_speakable_schema', intval($_POST['saswp_enable_speakable_schema']) );
873
  $review_fields['saswp_review_publisher_url'] = 'Review Publisher URL';
874
  $review_fields['saswp_review_rating_value'] = 'Review Rating Value';
875
  $review_fields['saswp_review_date_published'] = 'Review Published Date';
876
+ $review_fields['saswp_review_date_modified'] = 'Review Modified Date';
877
  $review_fields['saswp_review_url'] = 'Review URL';
878
 
879
  }
1184
 
1185
  if(isset($_POST['saswp_business_name'])){
1186
  update_post_meta( $post_id, 'saswp_business_name', sanitize_text_field( $_POST['saswp_business_name'] ) );
1187
+ }else{
1188
+ update_post_meta( $post_id, 'saswp_business_name', '' );
1189
  }
1190
  if(isset($_POST['saswp_enable_speakable_schema'])){
1191
  update_post_meta( $post_id, 'saswp_enable_speakable_schema', intval($_POST['saswp_enable_speakable_schema']) );