Schema & Structured Data for WP & AMP - Version 1.9.33

Version Description

(16 Apr 2020) =

  • Added: Compatibility with "Yet Another Stars Rating" ( https://wordpress.org/plugins/yet-another-stars-rating/ ) plugin #919
  • Added: Compatibility with "WP Customer Reviews" ( https://wordpress.org/plugins/wp-customer-reviews/ ) plugin #888
  • Added: Compatibility with "Products And Services Review WP Theme" ( https://themeforest.net/item/reviews-products-and-services-review-wp-theme/13004739?s_rank=4 ) plugin #933
  • Added: MobileApplication schema type #757
  • Added: Special Announcement schema type related to Coronavirus #757
  • Added: Translate field for "badge" #924
  • Added: An option as when we enable it the featured image should be passed along with the content to RSS feed #913
  • Fixed: Fatal error: Call to undefined method WC_Product_Simple::get_type() in /plugins/schema-and-structured-data-for-wp/output/service.php on line 2356 #929
  • Fixed: Custom name of the business is not working #928
  • Fixed: Review:- Copyrightyear is not updated accordingly. #694
  • Fixed: Item list error ( All values provided for URL must point to the same page ) on product category pages (Pagination). #758
  • Fixed: breadcrumb navxt compatibility + validation error #876
  • Fixed: Category selection is not working correct in placement #890
  • Fixed: Debug error #939
  • Fixed: Fatal Error with FAQ block #931
  • Fixed: Warning with FAQ block in DIVI builder. #780
  • Fixed: Blogposting: Item reviewed and Aggregate rating error due to Taqyeem compatibility. #926
Download this release

Release Info

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

Code changes from version 1.9.32 to 1.9.33

admin_section/common-function.php CHANGED
@@ -2749,6 +2749,8 @@ function saswp_get_field_note($pname){
2749
  $notes = array(
2750
  'easy_recipe' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/easyrecipe/">EasyRecipe</a>',
2751
  'total_recipe_generator' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/total-recipe-generator-wordpress-recipe-maker-with-schema-and-nutrition-facts-elementor-addon/21445400/">Total Recipe Generator</a>',
 
 
2752
  'wordpress_news' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="#">Wordpress News</a>',
2753
  'strong_testimonials' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/strong-testimonials">Strong Testimonials</a>',
2754
  'wp_event_aggregator' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-event-aggregator/">WP Event Aggregator</a>',
@@ -2789,6 +2791,7 @@ function saswp_get_field_note($pname){
2789
  'extra' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.elegantthemes.com/gallery/extra/">Extra Theme</a>',
2790
  'homeland' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/homeland-responsive-real-estate-theme-for-wordpress/6518965">Homeland</a>',
2791
  'wpresidence' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wpresidence.net/">WP Residence</a>',
 
2792
  'realhomes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>',
2793
  'taqyeem' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/taqyeem-wordpress-review-plugin/4558799">Taqyeem</a>',
2794
  'soledad' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/soledad-multiconcept-blogmagazine-wp-theme/12945398">Soledad Theme</a>',
@@ -3018,6 +3021,8 @@ function saswp_is_date_field($date_str){
3018
 
3019
  if (strpos($date_str, 'date_modified') !== false
3020
  || strpos($date_str, 'date_published') !== false
 
 
3021
  || strpos($date_str, 'published_date') !== false
3022
  || strpos($date_str, 'upload_date') !== false
3023
  || strpos($date_str, 'qa_date_created') !== false
2749
  $notes = array(
2750
  'easy_recipe' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/easyrecipe/">EasyRecipe</a>',
2751
  'total_recipe_generator' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/total-recipe-generator-wordpress-recipe-maker-with-schema-and-nutrition-facts-elementor-addon/21445400/">Total Recipe Generator</a>',
2752
+ 'yet_another_stars_rating' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/yet-another-stars-rating/">Yet Another Stars Rating</a>',
2753
+ 'wp_customer_reviews' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-customer-reviews">WP Customer Reviews</a>',
2754
  'wordpress_news' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="#">Wordpress News</a>',
2755
  'strong_testimonials' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/strong-testimonials">Strong Testimonials</a>',
2756
  'wp_event_aggregator' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-event-aggregator/">WP Event Aggregator</a>',
2791
  'extra' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.elegantthemes.com/gallery/extra/">Extra Theme</a>',
2792
  'homeland' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/homeland-responsive-real-estate-theme-for-wordpress/6518965">Homeland</a>',
2793
  'wpresidence' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wpresidence.net/">WP Residence</a>',
2794
+ 'reviews' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/reviews-products-and-services-review-wp-theme/13004739?s_rank=4">Reviews - Products And Services Review WP Theme</a>',
2795
  'realhomes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>',
2796
  'taqyeem' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/taqyeem-wordpress-review-plugin/4558799">Taqyeem</a>',
2797
  'soledad' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/soledad-multiconcept-blogmagazine-wp-theme/12945398">Soledad Theme</a>',
3021
 
3022
  if (strpos($date_str, 'date_modified') !== false
3023
  || strpos($date_str, 'date_published') !== false
3024
+ || strpos($date_str, 'date_posted') !== false
3025
+ || strpos($date_str, 'date_expires') !== false
3026
  || strpos($date_str, 'published_date') !== false
3027
  || strpos($date_str, 'upload_date') !== false
3028
  || strpos($date_str, 'qa_date_created') !== false
admin_section/js/functions-list.js CHANGED
@@ -794,6 +794,11 @@
794
  jQuery.each(saswp_collection[key], function(index, value){
795
  platform_icon = value.saswp_review_platform_icon;
796
  platform_name = value.saswp_review_platform_name;
 
 
 
 
 
797
  sum_of_rating += parseFloat(value.saswp_review_rating);
798
  review_count++;
799
  });
@@ -827,7 +832,7 @@
827
  html += '</div>';
828
 
829
  html += '<span class="saswp-r3-brv">';
830
- html += 'Based on '+review_count+' Reviews';
831
  html += '</span>';
832
 
833
  html += '</div>';
794
  jQuery.each(saswp_collection[key], function(index, value){
795
  platform_icon = value.saswp_review_platform_icon;
796
  platform_name = value.saswp_review_platform_name;
797
+
798
+ if(platform_name == 'Self'){
799
+ platform_name = saswp_localize_data.trans_self;
800
+ }
801
+
802
  sum_of_rating += parseFloat(value.saswp_review_rating);
803
  review_count++;
804
  });
832
  html += '</div>';
833
 
834
  html += '<span class="saswp-r3-brv">';
835
+ html += saswp_localize_data.trans_based_on +' '+ review_count+' '+saswp_localize_data.trans_reviews;
836
  html += '</span>';
837
 
838
  html += '</div>';
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").length||jQuery(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(s){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:s.term,action:"saswp_get_custom_meta_fields"}},processResults:function(s){return{results:s}},cache:!0},minimumInputLength:2})}function saswp_reviews_datepicker(){jQuery(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_timepicker(){jQuery(".saswp-timepicker").timepicker({timeFormat:"H:i:s"})}function saswp_item_reviewed_ajax(s,e,a=null){var t=e.val(),i=saswp_localize_data.post_id,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)}
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").length||jQuery(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(s){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:s.term,action:"saswp_get_custom_meta_fields"}},processResults:function(s){return{results:s}},cache:!0},minimumInputLength:2})}function saswp_reviews_datepicker(){jQuery(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_timepicker(){jQuery(".saswp-timepicker").timepicker({timeFormat:"H:i:s"})}function saswp_item_reviewed_ajax(s,e,a=null){var t=e.val(),i=saswp_localize_data.post_id,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,"Self"==(t=e.saswp_review_platform_name)&&(t=saswp_localize_data.trans_self),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+=saswp_localize_data.trans_based_on+" "+i+" "+saswp_localize_data.trans_reviews,s+="</span>",s+="</div>",s+="</a>",s+="</li>")}s+="</ul>",s+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_popup(){var s="",e="";if(saswp_total_collection.length>0){var a=0,t=0,i=1;jQuery.each(saswp_total_collection,function(s,i){platform_icon=i.saswp_review_platform_icon,t+=parseFloat(i.saswp_review_rating),a++;var 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
@@ -787,6 +787,15 @@ return false;
787
  $("#saswp-kk-star-raring").val(0);
788
  }
789
  break;
 
 
 
 
 
 
 
 
 
790
  case 'saswp-simple-author-box-checkbox':
791
 
792
  saswp_compatibliy_notes(current, id);
@@ -831,6 +840,15 @@ return false;
831
  $("#saswp-soledad").val(0);
832
  }
833
  break;
 
 
 
 
 
 
 
 
 
834
 
835
  case 'saswp-dw-question-answer-checkbox':
836
  saswp_compatibliy_notes(current, id);
@@ -1167,6 +1185,16 @@ return false;
1167
 
1168
  break;
1169
 
 
 
 
 
 
 
 
 
 
 
1170
  case 'saswp-multiple-size-image-checkbox':
1171
 
1172
  if ($(this).is(':checked')) {
@@ -1227,6 +1255,16 @@ return false;
1227
 
1228
  break;
1229
 
 
 
 
 
 
 
 
 
 
 
1230
  case 'saswp-total-recipe-generator-checkbox':
1231
  saswp_compatibliy_notes(current, id);
1232
  if ($(this).is(':checked')) {
787
  $("#saswp-kk-star-raring").val(0);
788
  }
789
  break;
790
+ case 'saswp-yet-another-stars-rating-checkbox':
791
+
792
+ saswp_compatibliy_notes(current, id);
793
+ if ($(this).is(':checked')) {
794
+ $("#saswp-yet-another-stars-rating").val(1);
795
+ }else{
796
+ $("#saswp-yet-another-stars-rating").val(0);
797
+ }
798
+ break;
799
  case 'saswp-simple-author-box-checkbox':
800
 
801
  saswp_compatibliy_notes(current, id);
840
  $("#saswp-soledad").val(0);
841
  }
842
  break;
843
+
844
+ case 'saswp-wp-theme-reviews-checkbox':
845
+ saswp_compatibliy_notes(current, id);
846
+ if ($(this).is(':checked')) {
847
+ $("#saswp-wp-theme-reviews").val(1);
848
+ }else{
849
+ $("#saswp-wp-theme-reviews").val(0);
850
+ }
851
+ break;
852
 
853
  case 'saswp-dw-question-answer-checkbox':
854
  saswp_compatibliy_notes(current, id);
1185
 
1186
  break;
1187
 
1188
+ case 'saswp-rss-feed-image-checkbox':
1189
+
1190
+ if ($(this).is(':checked')) {
1191
+ $("#saswp-rss-feed-image").val(1);
1192
+ }else{
1193
+ $("#saswp-rss-feed-image").val(0);
1194
+ }
1195
+
1196
+ break;
1197
+
1198
  case 'saswp-multiple-size-image-checkbox':
1199
 
1200
  if ($(this).is(':checked')) {
1255
 
1256
  break;
1257
 
1258
+ case 'saswp-wp-customer-reviews-checkbox':
1259
+ saswp_compatibliy_notes(current, id);
1260
+ if ($(this).is(':checked')) {
1261
+ $("#saswp-wp-customer-reviews").val(1);
1262
+ }else{
1263
+ $("#saswp-wp-customer-reviews").val(0);
1264
+ }
1265
+
1266
+ break;
1267
+
1268
  case 'saswp-total-recipe-generator-checkbox':
1269
  saswp_compatibliy_notes(current, id);
1270
  if ($(this).is(':checked')) {
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-simple-author-box-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simple-author-box").val(1):s("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-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)});
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-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yet-another-stars-rating").val(1):s("#saswp-yet-another-stars-rating").val(0);break;case"saswp-simple-author-box-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simple-author-box").val(1):s("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-theme-reviews").val(1):s("#saswp-wp-theme-reviews").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-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-rss-feed-image-checkbox":s(this).is(":checked")?s("#saswp-rss-feed-image").val(1):s("#saswp-rss-feed-image").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-customer-reviews").val(1):s("#saswp-wp-customer-reviews").val(0);break;case"saswp-total-recipe-generator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-total-recipe-generator").val(1):s("#saswp-total-recipe-generator").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-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/settings.php CHANGED
@@ -1196,7 +1196,7 @@ function saswp_import_callback(){
1196
  'id' => 'saswp-other-images',
1197
  'name' => 'sd_data[saswp-other-images]',
1198
  )
1199
- ),
1200
  array(
1201
  'label' => 'Allow Multiple Size Image Creation',
1202
  'id' => 'saswp-multiple-size-image-checkbox',
@@ -1208,6 +1208,18 @@ function saswp_import_callback(){
1208
  'id' => 'saswp-multiple-size-image',
1209
  'name' => 'sd_data[saswp-multiple-size-image]',
1210
  )
 
 
 
 
 
 
 
 
 
 
 
 
1211
  )
1212
 
1213
  );
@@ -1804,6 +1816,18 @@ function saswp_compatibility_page_callback(){
1804
  'name' => 'sd_data[saswp-total-recipe-generator]',
1805
  )
1806
  );
 
 
 
 
 
 
 
 
 
 
 
 
1807
  $simple_author_box = array(
1808
  'label' => 'Simple Author Box',
1809
  'id' => 'saswp-simple-author-box-checkbox',
@@ -2190,6 +2214,18 @@ function saswp_compatibility_page_callback(){
2190
  'id' => 'saswp-kk-star-raring',
2191
  'name' => 'sd_data[saswp-kk-star-raring]',
2192
  )
 
 
 
 
 
 
 
 
 
 
 
 
2193
  );
2194
  $wppostratings = array(
2195
  'label' => 'WP-PostRatings',
@@ -2277,7 +2313,19 @@ function saswp_compatibility_page_callback(){
2277
  'id' => 'saswp-soledad',
2278
  'name' => 'sd_data[saswp-soledad]',
2279
  )
2280
- );
 
 
 
 
 
 
 
 
 
 
 
 
2281
  $dwquestiton = array(
2282
  'label' => 'DW Question Answer',
2283
  'id' => 'saswp-dw-question-answer-checkbox',
@@ -2467,6 +2515,8 @@ function saswp_compatibility_page_callback(){
2467
  $wpamp,
2468
  $ampwp,
2469
  $kk_star,
 
 
2470
  $simple_author_box,
2471
  $wppostratings,
2472
  $bbpress,
@@ -2475,6 +2525,7 @@ function saswp_compatibility_page_callback(){
2475
  $woocommerce_mem,
2476
  $cooked,
2477
  $soledad,
 
2478
  $taqyeem,
2479
  $extratheme,
2480
  $dwquestiton,
@@ -2731,7 +2782,10 @@ function saswp_enqueue_style_js( $hook ) {
2731
  'post_type' => $post_type,
2732
  'page_now' => $hook,
2733
  'saswp_settings_url' => esc_url(admin_url('edit.php?post_type=saswp&page=structured_data_options')),
2734
- 'saswp_schema_types' => $all_schema_array
 
 
 
2735
  );
2736
 
2737
  $data = apply_filters('saswp_localize_filter',$data,'saswp_localize_data');
1196
  'id' => 'saswp-other-images',
1197
  'name' => 'sd_data[saswp-other-images]',
1198
  )
1199
+ ),
1200
  array(
1201
  'label' => 'Allow Multiple Size Image Creation',
1202
  'id' => 'saswp-multiple-size-image-checkbox',
1208
  'id' => 'saswp-multiple-size-image',
1209
  'name' => 'sd_data[saswp-multiple-size-image]',
1210
  )
1211
+ ),
1212
+ array(
1213
+ 'label' => 'Add Featured Image in RSS feed',
1214
+ 'id' => 'saswp-rss-feed-image-checkbox',
1215
+ 'name' => 'saswp-rss-feed-image-checkbox',
1216
+ 'type' => 'checkbox',
1217
+ 'class' => 'checkbox saswp-checkbox',
1218
+ 'note' => 'Showing images alongside news/blogs if your website or blog appears in Google News',
1219
+ 'hidden' => array(
1220
+ 'id' => 'saswp-rss-feed-image',
1221
+ 'name' => 'sd_data[saswp-rss-feed-image]',
1222
+ )
1223
  )
1224
 
1225
  );
1816
  'name' => 'sd_data[saswp-total-recipe-generator]',
1817
  )
1818
  );
1819
+ $wp_customer_review = array(
1820
+ 'label' => 'WP Customer Reviews',
1821
+ 'id' => 'saswp-wp-customer-reviews-checkbox',
1822
+ 'name' => 'saswp-wp-customer-reviews-checkbox',
1823
+ 'type' => 'checkbox',
1824
+ 'class' => 'checkbox saswp-checkbox',
1825
+ 'note' => saswp_get_field_note('wp_customer_reviews'),
1826
+ 'hidden' => array(
1827
+ 'id' => 'saswp-wp-customer-reviews',
1828
+ 'name' => 'sd_data[saswp-wp-customer-reviews]',
1829
+ )
1830
+ );
1831
  $simple_author_box = array(
1832
  'label' => 'Simple Author Box',
1833
  'id' => 'saswp-simple-author-box-checkbox',
2214
  'id' => 'saswp-kk-star-raring',
2215
  'name' => 'sd_data[saswp-kk-star-raring]',
2216
  )
2217
+ );
2218
+ $yasr = array(
2219
+ 'label' => 'Yet Another Stars Rating',
2220
+ 'id' => 'saswp-yet-another-stars-rating-checkbox',
2221
+ 'name' => 'saswp-yet-another-stars-rating-checkbox',
2222
+ 'type' => 'checkbox',
2223
+ 'class' => 'checkbox saswp-checkbox',
2224
+ 'note' => saswp_get_field_note('yet_another_stars_rating'),
2225
+ 'hidden' => array(
2226
+ 'id' => 'saswp-yet-another-stars-rating',
2227
+ 'name' => 'sd_data[saswp-yet-another-stars-rating]',
2228
+ )
2229
  );
2230
  $wppostratings = array(
2231
  'label' => 'WP-PostRatings',
2313
  'id' => 'saswp-soledad',
2314
  'name' => 'sd_data[saswp-soledad]',
2315
  )
2316
+ );
2317
+ $reviews_wp_theme = array(
2318
+ 'label' => 'Reviews WP Theme',
2319
+ 'id' => 'saswp-wp-theme-reviews-checkbox',
2320
+ 'name' => 'saswp-wp-theme-reviews-checkbox',
2321
+ 'type' => 'checkbox',
2322
+ 'class' => 'checkbox saswp-checkbox',
2323
+ 'note' => saswp_get_field_note('reviews'),
2324
+ 'hidden' => array(
2325
+ 'id' => 'saswp-wp-theme-reviews',
2326
+ 'name' => 'sd_data[saswp-wp-theme-reviews]',
2327
+ )
2328
+ );
2329
  $dwquestiton = array(
2330
  'label' => 'DW Question Answer',
2331
  'id' => 'saswp-dw-question-answer-checkbox',
2515
  $wpamp,
2516
  $ampwp,
2517
  $kk_star,
2518
+ $yasr,
2519
+ $wp_customer_review,
2520
  $simple_author_box,
2521
  $wppostratings,
2522
  $bbpress,
2525
  $woocommerce_mem,
2526
  $cooked,
2527
  $soledad,
2528
+ $reviews_wp_theme,
2529
  $taqyeem,
2530
  $extratheme,
2531
  $dwquestiton,
2782
  'post_type' => $post_type,
2783
  'page_now' => $hook,
2784
  'saswp_settings_url' => esc_url(admin_url('edit.php?post_type=saswp&page=structured_data_options')),
2785
+ 'saswp_schema_types' => $all_schema_array,
2786
+ 'trans_based_on' => saswp_label_text('translation-based-on'),
2787
+ 'trans_reviews' => saswp_label_text('translation-reviews'),
2788
+ 'trans_self' => saswp_label_text('translation-self')
2789
  );
2790
 
2791
  $data = apply_filters('saswp_localize_filter',$data,'saswp_localize_data');
admin_section/structure_admin.php CHANGED
@@ -411,29 +411,36 @@ function saswp_comparison_logic_checker($input){
411
 
412
  // Post Category
413
  case 'post_category':
414
-
415
- $current_category = '';
 
416
 
417
  if(is_object($post)){
418
-
419
- $postcat = get_the_category( $post->ID );
420
- if(!empty($postcat)){
421
- if(is_object($postcat[0])){
422
- $current_category = $postcat[0]->cat_ID;
423
- }
 
 
 
424
  }
 
 
425
 
426
  }
427
 
428
  if ( $comparison == 'equal') {
429
- if ( $data == $current_category ) {
430
  $result = true;
431
  }
432
  }
 
433
  if ( $comparison == 'not_equal') {
434
- if ( $data != $current_category ) {
435
- $result = true;
436
- }
437
  }
438
  break;
439
  // Post Format
411
 
412
  // Post Category
413
  case 'post_category':
414
+
415
+ global $cat_id_obj;
416
+ $cat_id_arr = array();
417
 
418
  if(is_object($post)){
419
+
420
+ if(!$cat_id_obj){
421
+ $cat_id_obj = get_the_category( $post->ID );
422
+ }
423
+
424
+ if($cat_id_obj){
425
+
426
+ foreach ($cat_id_obj as $value) {
427
+ $cat_id_arr[] = $value->term_id;
428
  }
429
+
430
+ }
431
 
432
  }
433
 
434
  if ( $comparison == 'equal') {
435
+ if (in_array($data, $cat_id_arr) ) {
436
  $result = true;
437
  }
438
  }
439
+
440
  if ( $comparison == 'not_equal') {
441
+ if (!in_array($data, $cat_id_arr) ) {
442
+ $result = true;
443
+ }
444
  }
445
  break;
446
  // Post Format
core/array-list/compatibility-list.php CHANGED
@@ -4,12 +4,24 @@ if ( ! defined( 'ABSPATH' ) ) exit;
4
 
5
  return array(
6
  'plugins' => array(
 
 
 
 
 
 
 
 
 
 
 
 
7
  'total_recipe_generator' => array(
8
- 'name' => 'Total Recipe Generator',
9
- 'free' => 'total-recipe-generator-el/total-recipe-generator-el.php',
10
- 'pro' => 'total-recipe-generator/total-recipe-generator.php',
11
- 'opt_name' => 'saswp-total-recipe-generator',
12
- 'part_in' => 'pro',
13
  ),
14
  'wordpress_news' => array(
15
  'name' => 'Wordpress News',
@@ -329,5 +341,11 @@ return array(
329
  'opt_name' => 'saswp-wpresidence',
330
  'part_in' => 'pro',
331
  ),
 
 
 
 
 
 
332
  )
333
  );
4
 
5
  return array(
6
  'plugins' => array(
7
+ 'yet_another_stars_rating' => array(
8
+ 'name' => 'Yet Another Stars Rating',
9
+ 'free' => 'yet-another-stars-rating/yet-another-stars-rating.php',
10
+ 'opt_name' => 'saswp-yet-another-stars-rating',
11
+ 'part_in' => 'free',
12
+ ),
13
+ 'wp_customer_reviews' => array(
14
+ 'name' => 'WP Customer Reviews',
15
+ 'free' => 'wp-customer-reviews/wp-customer-reviews-3.php',
16
+ 'opt_name' => 'saswp-wp-customer-reviews',
17
+ 'part_in' => 'free',
18
+ ),
19
  'total_recipe_generator' => array(
20
+ 'name' => 'Total Recipe Generator',
21
+ 'free' => 'total-recipe-generator-el/total-recipe-generator-el.php',
22
+ 'pro' => 'total-recipe-generator/total-recipe-generator.php',
23
+ 'opt_name' => 'saswp-total-recipe-generator',
24
+ 'part_in' => 'pro',
25
  ),
26
  'wordpress_news' => array(
27
  'name' => 'Wordpress News',
341
  'opt_name' => 'saswp-wpresidence',
342
  'part_in' => 'pro',
343
  ),
344
+ 'reviews' => array(
345
+ 'name' => 'Reviews WP Theme',
346
+ 'free' => 'reviews',
347
+ 'opt_name' => 'saswp-wp-theme-reviews',
348
+ 'part_in' => 'free',
349
+ ),
350
  )
351
  );
core/array-list/repeater-fields.php CHANGED
@@ -47,7 +47,10 @@ return array( 'schema_type_element' => array(
47
  'how-to-supply' => 'howto_supply',
48
  'how-to-tool' => 'howto_tool',
49
  'how-to-step' => 'howto_step',
50
- ),
 
 
 
51
  'MusicPlaylist' => array(
52
  'music-playlist-track' => 'music_playlist_track',
53
  ),
@@ -308,7 +311,58 @@ return array( 'schema_type_element' => array(
308
  'name' => 'saswp_howto_step_image',
309
  'type' => 'media',
310
  )
311
- ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  'mc_symptom' => array(
313
  array(
314
  'label' => 'Sign Or Symptom',
47
  'how-to-supply' => 'howto_supply',
48
  'how-to-tool' => 'howto_tool',
49
  'how-to-step' => 'howto_step',
50
+ ),
51
+ 'SpecialAnnouncement' => array(
52
+ 'announcement-location' => 'announcement_location',
53
+ ),
54
  'MusicPlaylist' => array(
55
  'music-playlist-track' => 'music_playlist_track',
56
  ),
311
  'name' => 'saswp_howto_step_image',
312
  'type' => 'media',
313
  )
314
+ ),
315
+ 'announcement_location' => array(
316
+ array(
317
+ 'label' => 'Location Type',
318
+ 'name' => 'saswp_sp_location_type',
319
+ 'type' => 'select',
320
+ 'options' => array(
321
+ 'CovidTestingFacility' => 'CovidTestingFacility',
322
+ 'School' => 'School'
323
+ )
324
+ ),
325
+ array(
326
+ 'label' => 'Location Name',
327
+ 'name' => 'saswp_sp_location_name',
328
+ 'type' => 'text',
329
+ ),
330
+ array(
331
+ 'label' => 'Location Street Address',
332
+ 'name' => 'saswp_sp_location_street_address',
333
+ 'type' => 'text',
334
+ ),
335
+ array(
336
+ 'label' => 'Location Address Locality',
337
+ 'name' => 'saswp_sp_location_street_locality',
338
+ 'type' => 'text',
339
+ ),
340
+ array(
341
+ 'label' => 'Location Address Region',
342
+ 'name' => 'saswp_sp_location_street_region',
343
+ 'type' => 'text',
344
+ ),
345
+ array(
346
+ 'label' => 'Location URL',
347
+ 'name' => 'saswp_sp_location_url',
348
+ 'type' => 'text',
349
+ ),
350
+ array(
351
+ 'label' => 'Location Telephone',
352
+ 'name' => 'saswp_sp_location_telephone',
353
+ 'type' => 'text',
354
+ ),
355
+ array(
356
+ 'label' => 'Location PriceRange',
357
+ 'name' => 'saswp_sp_location_price_range',
358
+ 'type' => 'text',
359
+ ),
360
+ array(
361
+ 'label' => 'Location Image',
362
+ 'name' => 'saswp_sp_location_image',
363
+ 'type' => 'media',
364
+ )
365
+ ),
366
  'mc_symptom' => array(
367
  array(
368
  'label' => 'Sign Or Symptom',
core/array-list/schema-properties.php CHANGED
@@ -631,105 +631,280 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
631
  );
632
  break;
633
 
634
- case 'Article':
635
- $meta_field = array(
636
- array(
637
- 'label' => 'Main Entity Of Page',
638
- 'id' => 'saswp_article_main_entity_of_page_'.$schema_id,
639
- 'type' => 'text',
640
- 'default' => get_permalink()
641
- ),
642
- array(
643
- 'label' => 'URL',
644
- 'id' => 'saswp_article_url_'.$schema_id,
645
- 'type' => 'text',
646
- 'default' => get_permalink(),
647
- ),
648
- array(
649
- 'label' => 'Image',
650
- 'id' => 'saswp_article_image_'.$schema_id,
651
- 'type' => 'media'
652
- ),
653
- array(
654
- 'label' => 'Headline',
655
- 'id' => 'saswp_article_headline_'.$schema_id,
656
- 'type' => 'text',
657
- 'default' => saswp_get_the_title()
658
- ),
659
- array(
660
- 'label' => 'Description',
661
- 'id' => 'saswp_article_description_'.$schema_id,
662
- 'type' => 'textarea',
663
- 'default' => get_the_excerpt()
664
- ),
665
- array(
666
- 'label' => 'Article Section',
667
- 'id' => 'saswp_article_section_'.$schema_id,
668
- 'type' => 'textarea',
669
- 'default' => get_the_excerpt()
670
- ),
671
- array(
672
- 'label' => 'Article Body',
673
- 'id' => 'saswp_article_body_'.$schema_id,
674
- 'type' => 'textarea',
675
- 'default' => is_object($post) ? wp_strip_all_tags(strip_shortcodes($post->post_content)) : ''
676
- ),
677
- array(
678
- 'label' => 'Keywords',
679
- 'id' => 'saswp_article_keywords_'.$schema_id,
680
- 'type' => 'text',
681
- 'default' => saswp_get_the_tags()
682
- ),
683
- array(
684
- 'label' => 'Date Published',
685
- 'id' => 'saswp_article_date_published_'.$schema_id,
686
- 'type' => 'text',
687
- 'default' => get_the_date("Y-m-d")
688
- ),
689
- array(
690
- 'label' => 'Date Modified',
691
- 'id' => 'saswp_article_date_modified_'.$schema_id,
692
- 'type' => 'text',
693
- 'default' => get_the_modified_date("Y-m-d")
694
- ),
695
- array(
696
- 'label' => 'Author Name',
697
- 'id' => 'saswp_article_author_name_'.$schema_id,
698
- 'type' => 'text',
699
- 'default' => is_object($current_user) ? $current_user->display_name : ''
700
- ),
701
- array(
702
- 'label' => 'Author Description',
703
- 'id' => 'saswp_article_author_description_'.$schema_id,
704
- 'type' => 'textarea',
705
- 'default' => $author_desc
706
- ),
707
- array(
708
- 'label' => 'Author URL',
709
- 'id' => 'saswp_article_author_url_'.$schema_id,
710
- 'type' => 'text',
711
- 'default' => $author_url
712
- ),
713
- array(
714
- 'label' => 'Organization Name',
715
- 'id' => 'saswp_article_organization_name_'.$schema_id,
716
- 'type' => 'text',
717
- 'default' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
718
- ),
719
- array(
720
- 'label' => 'Organization Logo',
721
- 'id' => 'saswp_article_organization_logo_'.$schema_id,
722
- 'type' => 'media',
723
- 'default' => isset($sd_data['sd_logo']['url']) ? $sd_data['sd_logo']['url']:''
724
- ),
725
- array(
726
- 'label' => 'Speakable',
727
- 'id' => 'saswp_article_speakable_'.$schema_id,
728
- 'type' => 'checkbox',
 
 
 
 
729
 
730
- )
731
- );
732
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
733
 
734
  case 'Event':
735
 
@@ -1679,6 +1854,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
1679
  'Product' => 'Product',
1680
  'Recipe' => 'Recipe',
1681
  'SoftwareApplication' => 'SoftwareApplication',
 
1682
  'VideoGame' => 'VideoGame',
1683
  )
1684
  );
@@ -1816,6 +1992,75 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
1816
  ),
1817
  );
1818
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1819
 
1820
  case 'VideoObject':
1821
 
631
  );
632
  break;
633
 
634
+ case 'Article':
635
+ $meta_field = array(
636
+ array(
637
+ 'label' => 'Main Entity Of Page',
638
+ 'id' => 'saswp_article_main_entity_of_page_'.$schema_id,
639
+ 'type' => 'text',
640
+ 'default' => get_permalink()
641
+ ),
642
+ array(
643
+ 'label' => 'URL',
644
+ 'id' => 'saswp_article_url_'.$schema_id,
645
+ 'type' => 'text',
646
+ 'default' => get_permalink(),
647
+ ),
648
+ array(
649
+ 'label' => 'Image',
650
+ 'id' => 'saswp_article_image_'.$schema_id,
651
+ 'type' => 'media'
652
+ ),
653
+ array(
654
+ 'label' => 'Headline',
655
+ 'id' => 'saswp_article_headline_'.$schema_id,
656
+ 'type' => 'text',
657
+ 'default' => saswp_get_the_title()
658
+ ),
659
+ array(
660
+ 'label' => 'Description',
661
+ 'id' => 'saswp_article_description_'.$schema_id,
662
+ 'type' => 'textarea',
663
+ 'default' => get_the_excerpt()
664
+ ),
665
+ array(
666
+ 'label' => 'Article Section',
667
+ 'id' => 'saswp_article_section_'.$schema_id,
668
+ 'type' => 'textarea',
669
+ 'default' => get_the_excerpt()
670
+ ),
671
+ array(
672
+ 'label' => 'Article Body',
673
+ 'id' => 'saswp_article_body_'.$schema_id,
674
+ 'type' => 'textarea',
675
+ 'default' => is_object($post) ? wp_strip_all_tags(strip_shortcodes($post->post_content)) : ''
676
+ ),
677
+ array(
678
+ 'label' => 'Keywords',
679
+ 'id' => 'saswp_article_keywords_'.$schema_id,
680
+ 'type' => 'text',
681
+ 'default' => saswp_get_the_tags()
682
+ ),
683
+ array(
684
+ 'label' => 'Date Published',
685
+ 'id' => 'saswp_article_date_published_'.$schema_id,
686
+ 'type' => 'text',
687
+ 'default' => get_the_date("Y-m-d")
688
+ ),
689
+ array(
690
+ 'label' => 'Date Modified',
691
+ 'id' => 'saswp_article_date_modified_'.$schema_id,
692
+ 'type' => 'text',
693
+ 'default' => get_the_modified_date("Y-m-d")
694
+ ),
695
+ array(
696
+ 'label' => 'Author Name',
697
+ 'id' => 'saswp_article_author_name_'.$schema_id,
698
+ 'type' => 'text',
699
+ 'default' => is_object($current_user) ? $current_user->display_name : ''
700
+ ),
701
+ array(
702
+ 'label' => 'Author Description',
703
+ 'id' => 'saswp_article_author_description_'.$schema_id,
704
+ 'type' => 'textarea',
705
+ 'default' => $author_desc
706
+ ),
707
+ array(
708
+ 'label' => 'Author URL',
709
+ 'id' => 'saswp_article_author_url_'.$schema_id,
710
+ 'type' => 'text',
711
+ 'default' => $author_url
712
+ ),
713
+ array(
714
+ 'label' => 'Organization Name',
715
+ 'id' => 'saswp_article_organization_name_'.$schema_id,
716
+ 'type' => 'text',
717
+ 'default' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
718
+ ),
719
+ array(
720
+ 'label' => 'Organization Logo',
721
+ 'id' => 'saswp_article_organization_logo_'.$schema_id,
722
+ 'type' => 'media',
723
+ 'default' => isset($sd_data['sd_logo']['url']) ? $sd_data['sd_logo']['url']:''
724
+ ),
725
+ array(
726
+ 'label' => 'Speakable',
727
+ 'id' => 'saswp_article_speakable_'.$schema_id,
728
+ 'type' => 'checkbox',
729
+
730
+ )
731
+ );
732
+ break;
733
 
734
+ case 'SpecialAnnouncement':
735
+
736
+ $category_detail =get_the_category(get_the_ID());//$post->ID
737
+ $article_section = '';
738
+
739
+ if($category_detail){
740
+
741
+ foreach($category_detail as $cd){
742
+
743
+ $article_section = $cd->cat_name;
744
+
745
+ }
746
+
747
+ }
748
+
749
+ $meta_field = array(
750
+ array(
751
+ 'label' => 'Name',
752
+ 'id' => 'saswp_special_announcement_name_'.$schema_id,
753
+ 'type' => 'text',
754
+ 'default' => saswp_get_the_title()
755
+ ),
756
+ array(
757
+ 'label' => 'Description',
758
+ 'id' => 'saswp_special_announcement_description_'.$schema_id,
759
+ 'type' => 'textarea',
760
+ 'default' => get_the_excerpt()
761
+ ),
762
+ array(
763
+ 'label' => 'Quarantine Guidelines',
764
+ 'id' => 'saswp_special_announcement_quarantine_guidelines_'.$schema_id,
765
+ 'type' => 'text',
766
+ 'default' => get_permalink()
767
+ ),
768
+ array(
769
+ 'label' => 'NewsUpdates And Guidelines',
770
+ 'id' => 'saswp_special_announcement_newsupdates_and_guidelines_'.$schema_id,
771
+ 'type' => 'text',
772
+ 'default' => get_permalink()
773
+ ),
774
+ array(
775
+ 'label' => 'Disease Prevention Info',
776
+ 'id' => 'saswp_special_announcement_disease_prevention_info_'.$schema_id,
777
+ 'type' => 'text',
778
+ 'default' => get_permalink()
779
+ ),
780
+ array(
781
+ 'label' => 'Keywords',
782
+ 'id' => 'saswp_special_announcement_keywords_'.$schema_id,
783
+ 'type' => 'text',
784
+ 'default' => saswp_get_the_tags()
785
+ ),
786
+ array(
787
+ 'label' => 'Category',
788
+ 'id' => 'saswp_special_announcement_category_'.$schema_id,
789
+ 'type' => 'text',
790
+ 'default' => get_permalink()
791
+ ),
792
+ array(
793
+ 'label' => 'Date Posted',
794
+ 'id' => 'saswp_special_announcement_date_posted_'.$schema_id,
795
+ 'type' => 'text',
796
+ 'default' => get_the_date("Y-m-d")
797
+ ),
798
+ array(
799
+ 'label' => 'Date Expires',
800
+ 'id' => 'saswp_special_announcement_date_expires_'.$schema_id,
801
+ 'type' => 'text',
802
+ 'default' => get_the_date("Y-m-d")
803
+ ),
804
+ array(
805
+ 'label' => 'Date Published',
806
+ 'id' => 'saswp_special_announcement_date_published_'.$schema_id,
807
+ 'type' => 'text',
808
+ 'default' => get_the_date("Y-m-d")
809
+ ),
810
+ array(
811
+ 'label' => 'Date Modified',
812
+ 'id' => 'saswp_special_announcement_date_modified_'.$schema_id,
813
+ 'type' => 'text',
814
+ 'default' => get_the_modified_date("Y-m-d")
815
+ ),
816
+ array(
817
+ 'label' => 'URL',
818
+ 'id' => 'saswp_special_announcement_url_'.$schema_id,
819
+ 'type' => 'text',
820
+ 'default' => get_permalink(),
821
+ ),
822
+ array(
823
+ 'label' => 'Image',
824
+ 'id' => 'saswp_special_announcement_image_'.$schema_id,
825
+ 'type' => 'media'
826
+ ),
827
+ array(
828
+ 'label' => 'Author Name',
829
+ 'id' => 'saswp_special_announcement_author_name_'.$schema_id,
830
+ 'type' => 'text',
831
+ 'default' => is_object($current_user) ? $current_user->display_name : ''
832
+ ),
833
+ array(
834
+ 'label' => 'Author Description',
835
+ 'id' => 'saswp_special_announcement_author_description_'.$schema_id,
836
+ 'type' => 'textarea',
837
+ 'default' => $author_desc
838
+ ),
839
+ array(
840
+ 'label' => 'Author URL',
841
+ 'id' => 'saswp_special_announcement_author_url_'.$schema_id,
842
+ 'type' => 'text',
843
+ 'default' => $author_url
844
+ ),
845
+ array(
846
+ 'label' => 'Organization Name',
847
+ 'id' => 'saswp_special_announcement_organization_name_'.$schema_id,
848
+ 'type' => 'text',
849
+ 'default' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
850
+ ),
851
+ array(
852
+ 'label' => 'Organization Logo',
853
+ 'id' => 'saswp_special_announcement_organization_logo_'.$schema_id,
854
+ 'type' => 'media',
855
+ 'default' => isset($sd_data['sd_logo']['url']) ? $sd_data['sd_logo']['url']:''
856
+ ),
857
+ array(
858
+ 'label' => 'Announcement Location Type',
859
+ 'id' => 'saswp_special_announcement_location_type_'.$schema_id,
860
+ 'type' => 'select',
861
+ 'options' => array(
862
+ 'CovidTestingFacility' => 'CovidTestingFacility',
863
+ 'School' => 'School',
864
+ )
865
+ ),
866
+ array(
867
+ 'label' => 'Announcement Location Name',
868
+ 'id' => 'saswp_special_announcement_location_name_'.$schema_id,
869
+ 'type' => 'text'
870
+ ),
871
+ array(
872
+ 'label' => 'Announcement Location Street Address',
873
+ 'id' => 'saswp_special_announcement_location_street_address_'.$schema_id,
874
+ 'type' => 'text'
875
+ ),
876
+ array(
877
+ 'label' => 'Announcement Location Address Locality',
878
+ 'id' => 'saswp_special_announcement_location_address_locality_'.$schema_id,
879
+ 'type' => 'text'
880
+ ),
881
+ array(
882
+ 'label' => 'Announcement Location Address Region',
883
+ 'id' => 'saswp_special_announcement_location_address_region_'.$schema_id,
884
+ 'type' => 'text'
885
+ ),
886
+ array(
887
+ 'label' => 'Announcement Location Telephone',
888
+ 'id' => 'saswp_special_announcement_location_telephone_'.$schema_id,
889
+ 'type' => 'text'
890
+ ),
891
+ array(
892
+ 'label' => 'Announcement Location URL',
893
+ 'id' => 'saswp_special_announcement_location_url_'.$schema_id,
894
+ 'type' => 'text'
895
+ ),
896
+ array(
897
+ 'label' => 'Announcement Location Image',
898
+ 'id' => 'saswp_special_announcement_location_image_'.$schema_id,
899
+ 'type' => 'media'
900
+ ),
901
+ array(
902
+ 'label' => 'Announcement Location PriceRange',
903
+ 'id' => 'saswp_special_announcement_location_price_range_'.$schema_id,
904
+ 'type' => 'text'
905
+ )
906
+ );
907
+ break;
908
 
909
  case 'Event':
910
 
1854
  'Product' => 'Product',
1855
  'Recipe' => 'Recipe',
1856
  'SoftwareApplication' => 'SoftwareApplication',
1857
+ 'MobileApplication' => 'MobileApplication',
1858
  'VideoGame' => 'VideoGame',
1859
  )
1860
  );
1992
  ),
1993
  );
1994
  break;
1995
+
1996
+ case 'MobileApplication':
1997
+
1998
+ $meta_field = array(
1999
+
2000
+ array(
2001
+ 'label' => 'Name',
2002
+ 'id' => 'saswp_mobile_app_schema_name_'.$schema_id,
2003
+ 'type' => 'text',
2004
+ ),
2005
+ array(
2006
+ 'label' => 'Description',
2007
+ 'id' => 'saswp_mobile_app_schema_description_'.$schema_id,
2008
+ 'type' => 'textarea',
2009
+ ),
2010
+ array(
2011
+ 'label' => 'Image',
2012
+ 'id' => 'saswp_mobile_app_schema_image_'.$schema_id,
2013
+ 'type' => 'media',
2014
+ ),
2015
+ array(
2016
+ 'label' => 'Operating System',
2017
+ 'id' => 'saswp_mobile_app_schema_operating_system_'.$schema_id,
2018
+ 'type' => 'text',
2019
+ ),
2020
+ array(
2021
+ 'label' => 'Application Category',
2022
+ 'id' => 'saswp_mobile_app_schema_application_category_'.$schema_id,
2023
+ 'type' => 'text',
2024
+ ),
2025
+ array(
2026
+ 'label' => 'Price',
2027
+ 'id' => 'saswp_mobile_app_schema_price_'.$schema_id,
2028
+ 'type' => 'text',
2029
+ ),
2030
+ array(
2031
+ 'label' => 'Price Currency',
2032
+ 'id' => 'saswp_mobile_app_schema_price_currency_'.$schema_id,
2033
+ 'type' => 'text',
2034
+ ),
2035
+ array(
2036
+ 'label' => 'Date Published',
2037
+ 'id' => 'saswp_mobile_app_schema_date_published_'.$schema_id,
2038
+ 'type' => 'text',
2039
+ 'default' => get_the_date("Y-m-d")
2040
+ ),
2041
+ array(
2042
+ 'label' => 'Date Modified',
2043
+ 'id' => 'saswp_mobile_app_schema_date_modified_'.$schema_id,
2044
+ 'type' => 'text',
2045
+ 'default' => get_the_modified_date("Y-m-d")
2046
+ ),
2047
+ array(
2048
+ 'label' => 'Aggregate Rating',
2049
+ 'id' => 'saswp_mobile_app_schema_enable_rating_'.$schema_id,
2050
+ 'type' => 'checkbox',
2051
+ ),
2052
+ array(
2053
+ 'label' => 'Rating',
2054
+ 'id' => 'saswp_mobile_app_schema_rating_value_'.$schema_id,
2055
+ 'type' => 'text',
2056
+ ),
2057
+ array(
2058
+ 'label' => 'Rating Count',
2059
+ 'id' => 'saswp_mobile_app_schema_rating_count_'.$schema_id,
2060
+ 'type' => 'text',
2061
+ ),
2062
+ );
2063
+ break;
2064
 
2065
  case 'VideoObject':
2066
 
core/array-list/schemas.php CHANGED
@@ -28,7 +28,9 @@ return array(
28
  'Review' => 'Review',
29
  'Recipe' => 'Recipe',
30
  'TVSeries' => 'TVSeries',
31
- 'SoftwareApplication' => 'SoftwareApplication',
 
 
32
  'TechArticle' => 'TechArticle',
33
  'WebPage' => 'WebPage'
34
  ),
28
  'Review' => 'Review',
29
  'Recipe' => 'Recipe',
30
  'TVSeries' => 'TVSeries',
31
+ 'SoftwareApplication' => 'SoftwareApplication',
32
+ 'SpecialAnnouncement' => 'SpecialAnnouncement',
33
+ 'MobileApplication' => 'MobileApplication',
34
  'TechArticle' => 'TechArticle',
35
  'WebPage' => 'WebPage'
36
  ),
core/global.php CHANGED
@@ -16,7 +16,8 @@ $with_aggregate = array(
16
  'Review',
17
  'Recipe',
18
  'TVSeries',
19
- 'SoftwareApplication',
 
20
  'Event',
21
  'VideoGame',
22
  'AudioObject',
@@ -30,6 +31,7 @@ $without_aggregate = array(
30
  'SingleFamilyResidence',
31
  'Article',
32
  'BlogPosting',
 
33
  'DiscussionForumPosting',
34
  'DataFeed',
35
  'FAQ',
@@ -47,7 +49,8 @@ $without_aggregate = array(
47
  'HinduTemple',
48
  'Church',
49
  'Mosque',
50
- 'Person'
 
51
  );
52
  $translation_labels = array(
53
  'translation-pros' => 'Pros',
@@ -57,10 +60,13 @@ $translation_labels = array(
57
  'translation-tools' => 'Tools',
58
  'translation-materials' => 'Materials',
59
  'translation-time-needed' => 'Time Needed',
60
- 'translation-estimate-cost' => 'Estimate Cost',
61
  'translation-name' => 'Name',
62
  'translation-comment' => 'Comment',
63
  'translation-review-form' => 'Review Form',
 
 
 
64
  );
65
  $saswp_post_reviews = array();
66
  $saswp_elementor_faq = array();
16
  'Review',
17
  'Recipe',
18
  'TVSeries',
19
+ 'SoftwareApplication',
20
+ 'MobileApplication',
21
  'Event',
22
  'VideoGame',
23
  'AudioObject',
31
  'SingleFamilyResidence',
32
  'Article',
33
  'BlogPosting',
34
+ 'Blogposting',
35
  'DiscussionForumPosting',
36
  'DataFeed',
37
  'FAQ',
49
  'HinduTemple',
50
  'Church',
51
  'Mosque',
52
+ 'Person',
53
+ 'SpecialAnnouncement'
54
  );
55
  $translation_labels = array(
56
  'translation-pros' => 'Pros',
60
  'translation-tools' => 'Tools',
61
  'translation-materials' => 'Materials',
62
  'translation-time-needed' => 'Time Needed',
63
+ 'translation-estimate-cost' => 'Estimate Cost',
64
  'translation-name' => 'Name',
65
  'translation-comment' => 'Comment',
66
  'translation-review-form' => 'Review Form',
67
+ 'translation-based-on' => 'Based On',
68
+ 'translation-reviews' => 'Reviews',
69
+ 'translation-self' => 'Self',
70
  );
71
  $saswp_post_reviews = array();
72
  $saswp_elementor_faq = array();
modules/divi-builder/includes/modules/FaqBlock/FaqBlock.php CHANGED
@@ -55,7 +55,10 @@ class SASWP_Divi_FaqBlock extends ET_Builder_Module {
55
  $output .= '<ul>';
56
  $i = 1;
57
  foreach ( $saswp_divi_faq as $item ) {
58
- $output .= '<li '.$style.' class="elementor-repeater-item-' . $i . '">';
 
 
 
59
  $output .= '<h3>';
60
 
61
  if($order_type == 'order_list'){
@@ -63,9 +66,11 @@ class SASWP_Divi_FaqBlock extends ET_Builder_Module {
63
  }
64
  $output .= esc_html($item['faq_question']);
65
  $output .= '</h3>';
66
- $output .= '<p>' . wp_unslash(str_replace(array("%22", ""), array('"', "'"),$item['faq_answer'])) . '</p>';
67
- //
68
  $i++;
 
 
69
  }
70
  $output .= '</ul>';
71
  }
55
  $output .= '<ul>';
56
  $i = 1;
57
  foreach ( $saswp_divi_faq as $item ) {
58
+
59
+ if(isset($item['faq_question'])){
60
+
61
+ $output .= '<li '.$style.' class="elementor-repeater-item-' . $i . '">';
62
  $output .= '<h3>';
63
 
64
  if($order_type == 'order_list'){
66
  }
67
  $output .= esc_html($item['faq_question']);
68
  $output .= '</h3>';
69
+ $output .= '<p>' . wp_unslash(str_replace(array("%22", ""), array('"', "'"),$item['faq_answer'])) . '</p>';
70
+ $output .= '</li>';
71
  $i++;
72
+
73
+ }
74
  }
75
  $output .= '</ul>';
76
  }
modules/divi-builder/includes/modules/FaqBlockChild/FaqBlockChild.php CHANGED
@@ -81,113 +81,110 @@ class SASWP_Divi_FaqBlockChild extends ET_Builder_Module {
81
 
82
 
83
  }
84
- public function get_advanced_fields_config() {
85
- $advanced_fields = $this->advanced_tab_options;
86
-
87
- $advanced_fields['fonts'] = array(
88
- 'main_text' => array(
89
- 'label' => esc_html__( 'Content', 'schema-and-structured-data-for-wp' ),
90
- 'css' => array(
91
- 'main' => "{$this->main_css_element} .saswp_timeline_child_inner",
92
- ),
93
- 'font_size' => array(
94
- 'default' => absint( '14' ) . 'px',
95
- ),
96
- 'line_height' => array(
97
- 'default' => '1.4em',
98
- ),
99
- 'letter_spacing' => array(
100
- 'default' => '0px',
101
- ),
102
- 'toggle_slug' => 'text',
103
- ),
104
- 'header' => array(
105
- 'label' => esc_html__( 'Heading', 'schema-and-structured-data-for-wp' ),
106
- 'css' => array(
107
- 'main' => "{$this->main_css_element} .saswp_timeline_child_inner h1",
108
- ),
109
- 'font_size' => array(
110
- 'default' => absint( et_get_option( 'body_header_size', '30' ) ) . 'px',
111
- ),
112
- 'toggle_slug' => 'header',
113
- 'sub_toggle' => 'h1',
114
- ),
115
- 'header_2' => array(
116
- 'label' => esc_html__( 'Heading 2', 'schema-and-structured-data-for-wp' ),
117
- 'css' => array(
118
- 'main' => "{$this->main_css_element} .saswp_timeline_child_inner h2",
119
- ),
120
- 'font_size' => array(
121
- 'default' => '26px',
122
- ),
123
- 'line_height' => array(
124
- 'default' => '1em',
125
- ),
126
- 'toggle_slug' => 'header',
127
- 'sub_toggle' => 'h2',
128
- ),
129
- 'header_3' => array(
130
- 'label' => esc_html__( 'Heading 3', 'schema-and-structured-data-for-wp' ),
131
- 'css' => array(
132
- 'main' => "{$this->main_css_element} .saswp_timeline_date h3",
133
- ),
134
- 'font_size' => array(
135
- 'default' => '22px',
136
- ),
137
- 'line_height' => array(
138
- 'default' => '1em',
139
- ),
140
- 'toggle_slug' => 'header',
141
- 'sub_toggle' => 'h3',
142
- ),
143
- 'header_4' => array(
144
- 'label' => esc_html__( 'Heading 4', 'schema-and-structured-data-for-wp' ),
145
- 'css' => array(
146
- 'main' => "{$this->main_css_element} h4",
147
- ),
148
- 'font_size' => array(
149
- 'default' => '18px',
150
- ),
151
- 'line_height' => array(
152
- 'default' => '1em',
153
- ),
154
- 'toggle_slug' => 'header',
155
- 'sub_toggle' => 'h4',
156
- ),
157
- 'header_5' => array(
158
- 'label' => esc_html__( 'Heading 5', 'schema-and-structured-data-for-wp' ),
159
- 'css' => array(
160
- 'main' => "{$this->main_css_element} h5",
161
- ),
162
- 'font_size' => array(
163
- 'default' => '16px',
164
- ),
165
- 'line_height' => array(
166
- 'default' => '1em',
167
- ),
168
- 'toggle_slug' => 'header',
169
- 'sub_toggle' => 'h5',
170
- ),
171
- 'header_6' => array(
172
- 'label' => esc_html__( 'Heading 6', 'schema-and-structured-data-for-wp' ),
173
- 'css' => array(
174
- 'main' => "{$this->main_css_element} h6",
175
- ),
176
- 'font_size' => array(
177
- 'default' => '14px',
178
- ),
179
- 'line_height' => array(
180
- 'default' => '1em',
181
- ),
182
- 'toggle_slug' => 'header',
183
- 'sub_toggle' => 'h6',
184
- ),
185
- );
186
-
187
-
188
-
189
- return $advanced_fields;
190
- }
191
 
192
  function render( $attrs, $content = null, $render_slug ) {
193
 
81
 
82
 
83
  }
84
+ // public function get_advanced_fields_config() {
85
+ // $advanced_fields = $this->advanced_tab_options;
86
+
87
+ // $advanced_fields['fonts'] = array(
88
+ // 'main_text' => array(
89
+ // 'label' => esc_html__( 'Content', 'schema-and-structured-data-for-wp' ),
90
+ // 'css' => array(
91
+ // 'main' => "{$this->main_css_element} .saswp_timeline_child_inner",
92
+ // ),
93
+ // 'font_size' => array(
94
+ // 'default' => absint( '14' ) . 'px',
95
+ // ),
96
+ // 'line_height' => array(
97
+ // 'default' => '1.4em',
98
+ // ),
99
+ // 'letter_spacing' => array(
100
+ // 'default' => '0px',
101
+ // ),
102
+ // 'toggle_slug' => 'text',
103
+ // ),
104
+ // 'header' => array(
105
+ // 'label' => esc_html__( 'Heading', 'schema-and-structured-data-for-wp' ),
106
+ // 'css' => array(
107
+ // 'main' => "{$this->main_css_element} .saswp_timeline_child_inner h1",
108
+ // ),
109
+ // 'font_size' => array(
110
+ // 'default' => absint( et_get_option( 'body_header_size', '30' ) ) . 'px',
111
+ // ),
112
+ // 'toggle_slug' => 'header',
113
+ // 'sub_toggle' => 'h1',
114
+ // ),
115
+ // 'header_2' => array(
116
+ // 'label' => esc_html__( 'Heading 2', 'schema-and-structured-data-for-wp' ),
117
+ // 'css' => array(
118
+ // 'main' => "{$this->main_css_element} .saswp_timeline_child_inner h2",
119
+ // ),
120
+ // 'font_size' => array(
121
+ // 'default' => '26px',
122
+ // ),
123
+ // 'line_height' => array(
124
+ // 'default' => '1em',
125
+ // ),
126
+ // 'toggle_slug' => 'header',
127
+ // 'sub_toggle' => 'h2',
128
+ // ),
129
+ // 'header_3' => array(
130
+ // 'label' => esc_html__( 'Heading 3', 'schema-and-structured-data-for-wp' ),
131
+ // 'css' => array(
132
+ // 'main' => "{$this->main_css_element} .saswp_timeline_date h3",
133
+ // ),
134
+ // 'font_size' => array(
135
+ // 'default' => '22px',
136
+ // ),
137
+ // 'line_height' => array(
138
+ // 'default' => '1em',
139
+ // ),
140
+ // 'toggle_slug' => 'header',
141
+ // 'sub_toggle' => 'h3',
142
+ // ),
143
+ // 'header_4' => array(
144
+ // 'label' => esc_html__( 'Heading 4', 'schema-and-structured-data-for-wp' ),
145
+ // 'css' => array(
146
+ // 'main' => "{$this->main_css_element} h4",
147
+ // ),
148
+ // 'font_size' => array(
149
+ // 'default' => '18px',
150
+ // ),
151
+ // 'line_height' => array(
152
+ // 'default' => '1em',
153
+ // ),
154
+ // 'toggle_slug' => 'header',
155
+ // 'sub_toggle' => 'h4',
156
+ // ),
157
+ // 'header_5' => array(
158
+ // 'label' => esc_html__( 'Heading 5', 'schema-and-structured-data-for-wp' ),
159
+ // 'css' => array(
160
+ // 'main' => "{$this->main_css_element} h5",
161
+ // ),
162
+ // 'font_size' => array(
163
+ // 'default' => '16px',
164
+ // ),
165
+ // 'line_height' => array(
166
+ // 'default' => '1em',
167
+ // ),
168
+ // 'toggle_slug' => 'header',
169
+ // 'sub_toggle' => 'h5',
170
+ // ),
171
+ // 'header_6' => array(
172
+ // 'label' => esc_html__( 'Heading 6', 'schema-and-structured-data-for-wp' ),
173
+ // 'css' => array(
174
+ // 'main' => "{$this->main_css_element} h6",
175
+ // ),
176
+ // 'font_size' => array(
177
+ // 'default' => '14px',
178
+ // ),
179
+ // 'line_height' => array(
180
+ // 'default' => '1em',
181
+ // ),
182
+ // 'toggle_slug' => 'header',
183
+ // 'sub_toggle' => 'h6',
184
+ // ),
185
+ // );
186
+ // return $advanced_fields;
187
+ // }
 
 
 
188
 
189
  function render( $attrs, $content = null, $render_slug ) {
190
 
modules/rating-box/frontend.php CHANGED
@@ -91,7 +91,7 @@ Class saswp_rating_box_frontend{
91
  'name' => saswp_get_the_title(),
92
  'url' => get_permalink(),
93
  'description' => saswp_get_the_excerpt(),
94
- 'copyrightYear' => get_the_time( 'Y' ),
95
  'author' => array(
96
  '@type' => 'Person',
97
  'name' => esc_attr($aurthor_name),
91
  'name' => saswp_get_the_title(),
92
  'url' => get_permalink(),
93
  'description' => saswp_get_the_excerpt(),
94
+ 'copyrightYear' => get_the_modified_date('Y'),
95
  'author' => array(
96
  '@type' => 'Person',
97
  'name' => esc_attr($aurthor_name),
modules/reviews/reviews_form.php CHANGED
@@ -71,6 +71,25 @@ class SASWP_Reviews_Form {
71
 
72
 
73
  public function saswp_save_review_form_data(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
  $form_data = $_POST;
76
  $headers = getallheaders();
71
 
72
 
73
  public function saswp_save_review_form_data(){
74
+ /**
75
+ * getallheaders() is supported only in Apache Web Server
76
+ * and not in other popular web servers like NGINX.
77
+ *
78
+ * Create the function if not already present, following the code
79
+ * in https://www.php.net/manual/en/function.getallheaders.php#84262
80
+ */
81
+ if (!function_exists('getallheaders')) {
82
+ function getallheaders()
83
+ {
84
+ $headers = [];
85
+ foreach ($_SERVER as $name => $value) {
86
+ if (substr($name, 0, 5) == 'HTTP_') {
87
+ $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
88
+ }
89
+ }
90
+ return $headers;
91
+ }
92
+ }
93
 
94
  $form_data = $_POST;
95
  $headers = getallheaders();
modules/reviews/reviews_service.php CHANGED
@@ -1032,6 +1032,11 @@ class saswp_reviews_service {
1032
  foreach ($platform_wise as $key => $value){
1033
 
1034
  $platform_name = $value['saswp_review_platform_name'];
 
 
 
 
 
1035
  $platform_icon = $value['saswp_review_platform_icon'];
1036
  $sum_of_rating += $value['saswp_review_rating'];
1037
  $review_count++;
@@ -1062,7 +1067,7 @@ class saswp_reviews_service {
1062
  $html .= '</span>';
1063
  $html .= '</div>';
1064
  $html .= '<span class="saswp-r3-brv">';
1065
- $html .= esc_html__('Based on','schema-and-structured-data-for-wp').' '.esc_attr($review_count).' '.esc_html__('Reviews','schema-and-structured-data-for-wp');
1066
  $html .= '</span>';
1067
  $html .= '</div>';
1068
  $html .= '</a>';
@@ -1089,6 +1094,9 @@ class saswp_reviews_service {
1089
  foreach ($platform_wise as $key => $value){
1090
 
1091
  $platform_name = $value['saswp_review_platform_name'];
 
 
 
1092
  $platform_icon = $value['saswp_review_platform_icon'];
1093
  $sum_of_rating += $value['saswp_review_rating'];
1094
  $review_count++;
@@ -1119,7 +1127,7 @@ class saswp_reviews_service {
1119
  $html .= '</span>';
1120
  $html .= '</div>';
1121
  $html .= '<span class="saswp-r3-brv">';
1122
- $html .= esc_html__('Based on','schema-and-structured-data-for-wp').' '.esc_attr($review_count).' '.esc_html__('Reviews','schema-and-structured-data-for-wp');
1123
  $html .= '</span>';
1124
  $html .= '</div>';
1125
  $html .= '</a>';
1032
  foreach ($platform_wise as $key => $value){
1033
 
1034
  $platform_name = $value['saswp_review_platform_name'];
1035
+
1036
+ if($platform_name == 'Self'){
1037
+ $platform_name = saswp_label_text('translation-self');
1038
+ }
1039
+
1040
  $platform_icon = $value['saswp_review_platform_icon'];
1041
  $sum_of_rating += $value['saswp_review_rating'];
1042
  $review_count++;
1067
  $html .= '</span>';
1068
  $html .= '</div>';
1069
  $html .= '<span class="saswp-r3-brv">';
1070
+ $html .= saswp_label_text('translation-based-on').' '.esc_attr($review_count).' '.saswp_label_text('translation-reviews');
1071
  $html .= '</span>';
1072
  $html .= '</div>';
1073
  $html .= '</a>';
1094
  foreach ($platform_wise as $key => $value){
1095
 
1096
  $platform_name = $value['saswp_review_platform_name'];
1097
+ if($platform_name == 'Self'){
1098
+ $platform_name = saswp_label_text('translation-self');
1099
+ }
1100
  $platform_icon = $value['saswp_review_platform_icon'];
1101
  $sum_of_rating += $value['saswp_review_rating'];
1102
  $review_count++;
1127
  $html .= '</span>';
1128
  $html .= '</div>';
1129
  $html .= '<span class="saswp-r3-brv">';
1130
+ $html .= saswp_label_text('translation-based-on').' '.esc_attr($review_count).' '.saswp_label_text('translation-reviews');
1131
  $html .= '</span>';
1132
  $html .= '</div>';
1133
  $html .= '</a>';
output/compatibility.php CHANGED
@@ -128,6 +128,12 @@ class saswp_output_compatibility{
128
 
129
  }
130
 
 
 
 
 
 
 
131
  public function saswp_soledad_override(){
132
 
133
  saswp_remove_anonymous_object_filter_or_action(
@@ -170,6 +176,11 @@ class saswp_output_compatibility{
170
  }
171
  public function saswp_total_recipe_generator_override(){
172
  }
 
 
 
 
 
173
  public function saswp_testimonial_pro_override(){
174
 
175
  $args = array(
@@ -452,6 +463,12 @@ class saswp_output_compatibility{
452
  public function total_recipe_generator_on_activation(){
453
  $this->saswp_update_option_on_compatibility_activation('saswp-total-recipe-generator');
454
  }
 
 
 
 
 
 
455
  public function saswp_update_option_on_compatibility_activation($opt_name){
456
 
457
  $defaults = get_option('sd_data');
128
 
129
  }
130
 
131
+ public function saswp_reviews_override(){
132
+
133
+
134
+
135
+ }
136
+
137
  public function saswp_soledad_override(){
138
 
139
  saswp_remove_anonymous_object_filter_or_action(
176
  }
177
  public function saswp_total_recipe_generator_override(){
178
  }
179
+ public function saswp_wp_customer_reviews_override(){
180
+ }
181
+ public function saswp_yet_another_stars_rating_override(){
182
+ remove_filter('the_content', 'yasr_add_schema');
183
+ }
184
  public function saswp_testimonial_pro_override(){
185
 
186
  $args = array(
463
  public function total_recipe_generator_on_activation(){
464
  $this->saswp_update_option_on_compatibility_activation('saswp-total-recipe-generator');
465
  }
466
+ public function wp_customer_reviews_on_activation(){
467
+ $this->saswp_update_option_on_compatibility_activation('saswp-wp-customer-reviews');
468
+ }
469
+ public function yet_another_stars_rating_on_activation(){
470
+ $this->saswp_update_option_on_compatibility_activation('saswp-yet-another-stars-rating');
471
+ }
472
  public function saswp_update_option_on_compatibility_activation($opt_name){
473
 
474
  $defaults = get_option('sd_data');
output/function.php CHANGED
@@ -682,6 +682,47 @@ function saswp_extract_taqyeem_ratings(){
682
  return $star_rating;
683
  }
684
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
685
  /**
686
  * Extracting the value of star ratings plugins on current post
687
  * @global type $sd_data
@@ -860,12 +901,12 @@ function saswp_list_items_generator(){
860
  $bc_titles = array();
861
  $bc_links = array();
862
 
863
- if(isset($sd_data['titles'])){
864
  $bc_titles = $sd_data['titles'];
865
  }
866
- if(isset($sd_data['links'])){
867
  $bc_links = $sd_data['links'];
868
- }
869
 
870
  $j = 1;
871
  $i = 0;
@@ -879,17 +920,20 @@ function saswp_list_items_generator(){
879
 
880
  if(array_key_exists($i, $bc_links) && array_key_exists($i, $bc_titles)){
881
 
882
- $breadcrumbslist[] = array(
883
- '@type' => 'ListItem',
884
- 'position' => $j,
885
- 'item' => array(
886
- '@id' => $bc_links[$i],
887
- 'name' => $bc_titles[$i],
888
- ),
889
- );
890
-
891
- $j++;
892
-
 
 
 
893
 
894
  }
895
 
@@ -897,24 +941,28 @@ function saswp_list_items_generator(){
897
 
898
  }
899
 
900
- }
901
  if(is_page()){
902
  if(!empty($bc_titles) && !empty($bc_links)){
903
 
904
  for($i=0;$i<sizeof($bc_titles);$i++){
905
 
906
  if(array_key_exists($i, $bc_links) && array_key_exists($i, $bc_titles)){
907
-
908
- $breadcrumbslist[] = array(
909
- '@type' => 'ListItem',
910
- 'position' => $j,
911
- 'item' => array(
912
- '@id' => $bc_links[$i],
913
- 'name' => $bc_titles[$i],
914
- ),
915
- );
916
-
917
- $j++;
 
 
 
 
918
 
919
  }
920
 
@@ -922,7 +970,7 @@ function saswp_list_items_generator(){
922
  }
923
 
924
 
925
- }
926
  if(is_archive()){
927
 
928
  if(!empty($bc_titles) && !empty($bc_links)){
@@ -931,22 +979,26 @@ function saswp_list_items_generator(){
931
 
932
  if(array_key_exists($i, $bc_links) && array_key_exists($i, $bc_titles)){
933
 
934
- $breadcrumbslist[] = array(
935
- '@type' => 'ListItem',
936
- 'position' => $j,
937
- 'item' => array(
938
- '@id' => $bc_links[$i],
939
- 'name' => $bc_titles[$i],
940
- ),
941
- );
942
- $j++;
 
 
 
 
943
 
944
  }
945
 
946
- }
947
 
948
  }
949
- }
950
 
951
  return $breadcrumbslist;
952
  }
@@ -1004,6 +1056,15 @@ function saswp_remove_microdata($content){
1004
  if(isset($sd_data['saswp-wordpress-news']) && $sd_data['saswp-wordpress-news'] == 1 ){
1005
  $content = preg_replace("/<script type\=\'application\/ld\+json\' class\=\'wpnews-schema-graph(.*?)'\>(.*?)<\/script>/s", "", $content);
1006
  }
 
 
 
 
 
 
 
 
 
1007
 
1008
  if(isset($sd_data['saswp-wp-ultimate-recipe']) && $sd_data['saswp-wp-ultimate-recipe'] == 1 ){
1009
 
@@ -1269,7 +1330,7 @@ function saswp_get_testimonial_data($atts, $matche){
1269
 
1270
  $reviews[] = array(
1271
  '@type' => 'Review',
1272
- 'author' => $author,
1273
  'datePublished' => saswp_format_date_time($value->post_date),
1274
  'description' => $value->post_content,
1275
  'reviewRating' => array(
@@ -1440,7 +1501,7 @@ function saswp_get_testimonial_pro_data($shortcode_data, $testimo_str){
1440
 
1441
  $reviews[] = array(
1442
  '@type' => 'Review',
1443
- 'author' => $author,
1444
  'datePublished' => saswp_format_date_time($value->post_date),
1445
  'description' => $value->post_content,
1446
  'reviewRating' => array(
@@ -1488,7 +1549,7 @@ function saswp_get_strong_testimonials_data($testimonial){
1488
 
1489
  $reviews[] = array(
1490
  '@type' => 'Review',
1491
- 'author' => $author,
1492
  'datePublished' => saswp_format_date_time($value->post_date),
1493
  'description' => $value->post_content,
1494
  'reviewRating' => array(
@@ -1544,7 +1605,7 @@ function saswp_get_bne_testimonials_data($atts, $testimo_str){
1544
 
1545
  $reviews[] = array(
1546
  '@type' => 'Review',
1547
- 'author' => $author,
1548
  'datePublished' => saswp_format_date_time($value->post_date),
1549
  'description' => $value->post_content,
1550
  'reviewRating' => array(
@@ -1977,4 +2038,176 @@ function saswp_explod_by_semicolon($data){
1977
  }
1978
  }
1979
  return $response;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1980
  }
682
  return $star_rating;
683
  }
684
 
685
+ /**
686
+ * Extracting the value of yet another star rating plugins on current post
687
+ * @global type $sd_data
688
+ * @param type $id
689
+ * @return type array
690
+ */
691
+ function saswp_extract_yet_another_stars_rating(){
692
+
693
+ global $sd_data;
694
+ $result = array();
695
+
696
+ if(isset($sd_data['saswp-yet-another-stars-rating']) && $sd_data['saswp-yet-another-stars-rating'] == 1 && method_exists('YasrDatabaseRatings', 'getVisitorVotes') ){
697
+
698
+ $visitor_votes = YasrDatabaseRatings::getVisitorVotes(false);
699
+
700
+ if( $visitor_votes && ($visitor_votes['sum_votes'] != 0 && $visitor_votes['number_of_votes'] != 0) ){
701
+
702
+ $average_rating = $visitor_votes['sum_votes'] / $visitor_votes['number_of_votes'];
703
+ $average_rating = round($average_rating, 1);
704
+
705
+ $result['@type'] = 'AggregateRating';
706
+ $result['ratingCount'] = $visitor_votes['number_of_votes'];
707
+ $result['ratingValue'] = $average_rating;
708
+ $result['bestRating'] = 5;
709
+ $result['worstRating'] = 1;
710
+
711
+ return $result;
712
+
713
+ }else{
714
+
715
+ return array();
716
+
717
+ }
718
+
719
+ }else{
720
+
721
+ return array();
722
+
723
+ }
724
+ }
725
+
726
  /**
727
  * Extracting the value of star ratings plugins on current post
728
  * @global type $sd_data
901
  $bc_titles = array();
902
  $bc_links = array();
903
 
904
+ if(isset($sd_data['titles']) && !empty($sd_data['titles'])){
905
  $bc_titles = $sd_data['titles'];
906
  }
907
+ if(isset($sd_data['links']) && !empty($sd_data['links'])){
908
  $bc_links = $sd_data['links'];
909
+ }
910
 
911
  $j = 1;
912
  $i = 0;
920
 
921
  if(array_key_exists($i, $bc_links) && array_key_exists($i, $bc_titles)){
922
 
923
+ if($bc_links[$i] != '' && $bc_titles[$i] != '' ){
924
+
925
+ $breadcrumbslist[] = array(
926
+ '@type' => 'ListItem',
927
+ 'position' => $j,
928
+ 'item' => array(
929
+ '@id' => $bc_links[$i],
930
+ 'name' => $bc_titles[$i],
931
+ ),
932
+ );
933
+
934
+ $j++;
935
+
936
+ }
937
 
938
  }
939
 
941
 
942
  }
943
 
944
+ }
945
  if(is_page()){
946
  if(!empty($bc_titles) && !empty($bc_links)){
947
 
948
  for($i=0;$i<sizeof($bc_titles);$i++){
949
 
950
  if(array_key_exists($i, $bc_links) && array_key_exists($i, $bc_titles)){
951
+
952
+ if($bc_links[$i] !='' && $bc_titles[$i] != ''){
953
+
954
+ $breadcrumbslist[] = array(
955
+ '@type' => 'ListItem',
956
+ 'position' => $j,
957
+ 'item' => array(
958
+ '@id' => $bc_links[$i],
959
+ 'name' => $bc_titles[$i],
960
+ ),
961
+ );
962
+
963
+ $j++;
964
+
965
+ }
966
 
967
  }
968
 
970
  }
971
 
972
 
973
+ }
974
  if(is_archive()){
975
 
976
  if(!empty($bc_titles) && !empty($bc_links)){
979
 
980
  if(array_key_exists($i, $bc_links) && array_key_exists($i, $bc_titles)){
981
 
982
+ if($bc_links[$i] != '' && $bc_titles[$i] !=''){
983
+
984
+ $breadcrumbslist[] = array(
985
+ '@type' => 'ListItem',
986
+ 'position' => $j,
987
+ 'item' => array(
988
+ '@id' => $bc_links[$i],
989
+ 'name' => $bc_titles[$i],
990
+ ),
991
+ );
992
+ $j++;
993
+
994
+ }
995
 
996
  }
997
 
998
+ }
999
 
1000
  }
1001
+ }
1002
 
1003
  return $breadcrumbslist;
1004
  }
1056
  if(isset($sd_data['saswp-wordpress-news']) && $sd_data['saswp-wordpress-news'] == 1 ){
1057
  $content = preg_replace("/<script type\=\'application\/ld\+json\' class\=\'wpnews-schema-graph(.*?)'\>(.*?)<\/script>/s", "", $content);
1058
  }
1059
+
1060
+
1061
+ if(function_exists('review_child_company_reviews_comments') && isset($sd_data['saswp-wp-theme-reviews']) && $sd_data['saswp-wp-theme-reviews'] == 1){
1062
+
1063
+ $regex = '/<\/section>[\s\n]*<script type=\"application\/ld\+json\">(.*?)<\/script>/s';
1064
+
1065
+ $content = preg_replace($regex, '</section>', $content);
1066
+
1067
+ }
1068
 
1069
  if(isset($sd_data['saswp-wp-ultimate-recipe']) && $sd_data['saswp-wp-ultimate-recipe'] == 1 ){
1070
 
1330
 
1331
  $reviews[] = array(
1332
  '@type' => 'Review',
1333
+ 'author' => array('@type'=> 'Person', 'name' => $author),
1334
  'datePublished' => saswp_format_date_time($value->post_date),
1335
  'description' => $value->post_content,
1336
  'reviewRating' => array(
1501
 
1502
  $reviews[] = array(
1503
  '@type' => 'Review',
1504
+ 'author' => array('@type'=> 'Person', 'name' => $author),
1505
  'datePublished' => saswp_format_date_time($value->post_date),
1506
  'description' => $value->post_content,
1507
  'reviewRating' => array(
1549
 
1550
  $reviews[] = array(
1551
  '@type' => 'Review',
1552
+ 'author' => array('@type'=> 'Person', 'name' => $author),
1553
  'datePublished' => saswp_format_date_time($value->post_date),
1554
  'description' => $value->post_content,
1555
  'reviewRating' => array(
1605
 
1606
  $reviews[] = array(
1607
  '@type' => 'Review',
1608
+ 'author' => array('@type'=> 'Person', 'name' => $author),
1609
  'datePublished' => saswp_format_date_time($value->post_date),
1610
  'description' => $value->post_content,
1611
  'reviewRating' => array(
2038
  }
2039
  }
2040
  return $response;
2041
+ }
2042
+ function saswp_get_wp_customer_reviews(){
2043
+
2044
+ global $post, $sd_data, $response_rv;
2045
+
2046
+ $reviews = array();
2047
+ $ratings = array();
2048
+
2049
+ if(!$response_rv && isset($sd_data['saswp-wp-customer-reviews']) && $sd_data['saswp-wp-customer-reviews'] == 1){
2050
+
2051
+ $queryOpts = array(
2052
+ 'orderby' => 'date',
2053
+ 'order' => 'DESC',
2054
+ 'post_type' => 'wpcr3_review',
2055
+ 'post_status' => 'publish',
2056
+ 'posts_per_page' => -1,
2057
+ );
2058
+
2059
+ if ($post->ID != -1) {
2060
+ // if $postid is not -1 (all reviews from all posts), need to filter by meta value for post id
2061
+ $meta_query = array('relation' => 'AND');
2062
+ $meta_query[] = array(
2063
+ 'key' => "wpcr3_review_post",
2064
+ 'value' => $post->ID,
2065
+ 'compare' => '='
2066
+ );
2067
+ $queryOpts['meta_query'] = $meta_query;
2068
+ }
2069
+
2070
+ $reviews_post = new WP_Query($queryOpts);
2071
+
2072
+ if($reviews_post->posts){
2073
+
2074
+ $sumofrating = 0;
2075
+ $avg_rating = 1;
2076
+
2077
+ foreach ($reviews_post->posts as $value){
2078
+
2079
+ $meta = get_post_custom($value->ID);
2080
+
2081
+ $rating = $meta['wpcr3_review_rating'][0];
2082
+
2083
+ $sumofrating += $rating;
2084
+
2085
+ $reviews[] = array(
2086
+ '@type' => 'Review',
2087
+ 'author' => array('@type'=> 'Person', 'name' => $meta['wpcr3_review_name'][0]),
2088
+ 'datePublished' => saswp_format_date_time($value->post_date),
2089
+ 'description' => $value->post_content,
2090
+ 'reviewRating' => array(
2091
+ '@type' => 'Rating',
2092
+ 'bestRating' => '5',
2093
+ 'ratingValue' => $rating,
2094
+ 'worstRating' => '1',
2095
+ )
2096
+ );
2097
+
2098
+ }
2099
+
2100
+ if($sumofrating> 0){
2101
+ $avg_rating = $sumofrating / count($reviews);
2102
+ }
2103
+
2104
+ $ratings = array(
2105
+ '@type' => 'AggregateRating',
2106
+ 'ratingValue' => $avg_rating,
2107
+ 'reviewCount' => count($reviews)
2108
+ );
2109
+
2110
+ }
2111
+ $response_rv = array('reviews' => $reviews, 'AggregateRating' => $ratings);
2112
+
2113
+ }
2114
+
2115
+ return $response_rv;
2116
+
2117
+ }
2118
+ function saswp_get_reviews_wp_theme(){
2119
+
2120
+ global $post, $sd_data, $response_rv;
2121
+
2122
+ $reviews = array();
2123
+ $ratings = array();
2124
+
2125
+ if(!$response_rv && function_exists('review_child_company_reviews_comments') && isset($sd_data['saswp-wp-theme-reviews']) && $sd_data['saswp-wp-theme-reviews'] == 1){
2126
+
2127
+ $reviews_post = get_approved_comments( $post->ID );
2128
+
2129
+ if($reviews_post){
2130
+
2131
+ $sumofrating = 0;
2132
+ $avg_rating = 1;
2133
+
2134
+ foreach ($reviews_post as $review){
2135
+
2136
+ $comment_meta = get_comment_meta( $review->comment_ID, 'review', true );
2137
+ $comment_meta = explode( ',', $comment_meta );
2138
+
2139
+ $user_overall = 0;
2140
+ $user_rates = 0;
2141
+ $counter = 0;
2142
+
2143
+
2144
+ $criterias = get_post_meta( get_the_ID(), 'reviews_score' );
2145
+ $rate_criterias = array();
2146
+ if( !empty( $criterias ) ){
2147
+ foreach( $criterias as $criteria ){
2148
+ $rate_criterias[] = $criteria['review_criteria'];
2149
+ }
2150
+ }
2151
+
2152
+ for( $i=0; $i<sizeof($comment_meta); $i++ ){
2153
+ if( !empty( $rate_criterias[$i] ) ){
2154
+ $temp = explode( '|', $comment_meta[$i] );
2155
+ $user_overall += $temp[1];
2156
+ $user_rates++;
2157
+
2158
+ }
2159
+ }
2160
+
2161
+ $user_overall = $user_overall / $user_rates;
2162
+ $rating = round( $user_overall, 1 );
2163
+ $sumofrating += round( $user_overall, 1 );
2164
+
2165
+ $reviews[] = array(
2166
+ '@type' => 'Review',
2167
+ 'author' => array('@type'=> 'Person', 'name' => $review->comment_author ? $review->comment_author : 'Anonymous'),
2168
+ 'datePublished' => saswp_format_date_time($review->comment_date),
2169
+ 'description' => $review->comment_content,
2170
+ 'reviewRating' => array(
2171
+ '@type' => 'Rating',
2172
+ 'bestRating' => '5',
2173
+ 'ratingValue' => $rating,
2174
+ 'worstRating' => '1',
2175
+ )
2176
+ );
2177
+
2178
+ }
2179
+
2180
+ if($sumofrating> 0){
2181
+ $avg_rating = $sumofrating / count($reviews);
2182
+ }
2183
+
2184
+ $ratings = array(
2185
+ '@type' => 'AggregateRating',
2186
+ 'ratingValue' => $avg_rating,
2187
+ 'reviewCount' => count($reviews)
2188
+ );
2189
+
2190
+ }
2191
+ $response_rv = array('reviews' => $reviews, 'AggregateRating' => $ratings);
2192
+
2193
+ }
2194
+
2195
+ return $response_rv;
2196
+
2197
+ }
2198
+ add_filter( 'the_content', 'saswp_featured_image_in_feed' );
2199
+
2200
+ function saswp_featured_image_in_feed( $content ) {
2201
+
2202
+ global $post, $sd_data;
2203
+
2204
+ if( is_feed() && isset($sd_data['saswp-rss-feed-image']) && $sd_data['saswp-rss-feed-image'] == 1 ) {
2205
+ if ( has_post_thumbnail( $post->ID ) ){
2206
+ $image = get_the_post_thumbnail( $post->ID, 'full', array( 'style' => 'float:right; margin:0 0 10px 10px;' ) );
2207
+ $content = $image . $content;
2208
+ }
2209
+ }
2210
+
2211
+ return $content;
2212
+
2213
  }
output/markup.php CHANGED
@@ -33,7 +33,7 @@ function saswp_get_reviews_schema_markup($reviews){
33
 
34
  $reviews_arr[] = array(
35
  '@type' => 'Review',
36
- 'author' => $rv['saswp_reviewer_name'],
37
  'datePublished' => $rv['saswp_review_date'],
38
  'description' => $rv['saswp_review_text'],
39
  'reviewRating' => array(
@@ -489,7 +489,51 @@ function saswp_course_schema_markup($schema_id, $schema_post_id, $all_post_meta)
489
  return $input1;
490
 
491
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
492
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
493
  function saswp_software_app_schema_markup($schema_id, $schema_post_id, $all_post_meta){
494
 
495
  $input1 = array();
@@ -2273,6 +2317,123 @@ function saswp_webpage_schema_markup($schema_id, $schema_post_id, $all_post_meta
2273
 
2274
  return $input1;
2275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2276
  }
2277
 
2278
  function saswp_article_schema_markup($schema_id, $schema_post_id, $all_post_meta){
@@ -2788,6 +2949,11 @@ function saswp_review_schema_markup($schema_id, $schema_post_id, $all_post_meta)
2788
  $item_schema = saswp_software_app_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2789
 
2790
  break;
 
 
 
 
 
2791
  case 'VideoGame':
2792
 
2793
  $item_schema = saswp_video_game_schema_markup($schema_id, $schema_post_id, $all_post_meta);
33
 
34
  $reviews_arr[] = array(
35
  '@type' => 'Review',
36
+ 'author' => array('@type'=> 'Person', 'name' => $rv['saswp_reviewer_name']),
37
  'datePublished' => $rv['saswp_review_date'],
38
  'description' => $rv['saswp_review_text'],
39
  'reviewRating' => array(
489
  return $input1;
490
 
491
  }
492
+ function saswp_mobile_app_schema_markup($schema_id, $schema_post_id, $all_post_meta){
493
+
494
+ $input1 = array();
495
+
496
+ $input1 = array(
497
+ '@context' => saswp_context_url(),
498
+ '@type' => 'MobileApplication',
499
+ '@id' => trailingslashit(get_permalink()).'#MobileApplication',
500
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_mobile_app_schema_name_'.$schema_id, 'saswp_array'),
501
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_mobile_app_schema_description_'.$schema_id, 'saswp_array'),
502
+ 'operatingSystem' => saswp_remove_warnings($all_post_meta, 'saswp_mobile_app_schema_operating_system_'.$schema_id, 'saswp_array'),
503
+ 'applicationCategory' => saswp_remove_warnings($all_post_meta, 'saswp_mobile_app_schema_application_category_'.$schema_id, 'saswp_array'),
504
+ 'offers' => array(
505
+ '@type' => 'Offer',
506
+ 'price' => saswp_remove_warnings($all_post_meta, 'saswp_mobile_app_schema_price_'.$schema_id, 'saswp_array'),
507
+ 'priceCurrency' => saswp_remove_warnings($all_post_meta, 'saswp_mobile_app_schema_price_currency_'.$schema_id, 'saswp_array'),
508
+ ),
509
+ 'datePublished' => isset($all_post_meta['saswp_mobile_app_schema_date_published_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_mobile_app_schema_date_published_'.$schema_id][0], get_post_time('h:i:s')) : '',
510
+ 'dateModified' => isset($all_post_meta['saswp_mobile_app_schema_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_mobile_app_schema_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')) : '',
511
+
512
+ );
513
+
514
+ $soft_image = get_post_meta( get_the_ID(), 'saswp_mobile_app_schema_image_'.$schema_id.'_detail',true);
515
 
516
+ if(!(empty($soft_image))){
517
+
518
+ $input1['image']['@type'] = 'ImageObject';
519
+ $input1['image']['url'] = isset($soft_image['thumbnail']) ? esc_url($soft_image['thumbnail']):'';
520
+ $input1['image']['height'] = isset($soft_image['width']) ? esc_attr($soft_image['width']) :'';
521
+ $input1['image']['width'] = isset($soft_image['height']) ? esc_attr($soft_image['height']) :'';
522
+
523
+ }
524
+
525
+ if(saswp_remove_warnings($all_post_meta, 'saswp_mobile_app_schema_enable_rating_'.$schema_id, 'saswp_array') == 1){
526
+
527
+ $input1['aggregateRating'] = array(
528
+ "@type" => "AggregateRating",
529
+ "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_mobile_app_schema_rating_value_'.$schema_id, 'saswp_array'),
530
+ "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_mobile_app_schema_rating_count_'.$schema_id, 'saswp_array')
531
+ );
532
+ }
533
+
534
+ return $input1;
535
+
536
+ }
537
  function saswp_software_app_schema_markup($schema_id, $schema_post_id, $all_post_meta){
538
 
539
  $input1 = array();
2317
 
2318
  return $input1;
2319
 
2320
+ }
2321
+ function saswp_special_announcement_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2322
+
2323
+ $input1 = array();
2324
+
2325
+ $slogo = get_post_meta( get_the_ID(), 'saswp_special_announcement_organization_logo_'.$schema_id.'_detail',true);
2326
+ $location_img = get_post_meta( get_the_ID(), 'saswp_special_announcement_location_image_'.$schema_id.'_detail',true);
2327
+
2328
+ $input1 = array(
2329
+ '@context' => saswp_context_url(),
2330
+ '@type' => 'SpecialAnnouncement',
2331
+ '@id' => trailingslashit(get_permalink()).'#SpecialAnnouncement',
2332
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_url_'.$schema_id, 'saswp_array'),
2333
+ 'inLanguage' => get_bloginfo('language'),
2334
+ 'image' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_image_'.$schema_id, 'saswp_array'),
2335
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_name_'.$schema_id, 'saswp_array'),
2336
+ 'category' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_category_'.$schema_id, 'saswp_array'),
2337
+ 'quarantineGuidelines' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_quarantine_guidelines_'.$schema_id, 'saswp_array'),
2338
+ 'newsUpdatesAndGuidelines' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_newsupdates_and_guidelines_'.$schema_id, 'saswp_array'),
2339
+ 'diseasePreventionInfo' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_disease_prevention_info_'.$schema_id, 'saswp_array'),
2340
+ 'text' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_description_'.$schema_id, 'saswp_array'),
2341
+ 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_keywords_'.$schema_id, 'saswp_array'),
2342
+ 'datePublished' => isset($all_post_meta['saswp_special_announcement_date_published_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_special_announcement_date_published_'.$schema_id][0], get_post_time('h:i:s')):'',
2343
+ 'dateModified' => isset($all_post_meta['saswp_special_announcement_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_special_announcement_date_modified_'.$schema_id][0], get_the_modified_time('h:i:s')):'',
2344
+ 'datePosted' => isset($all_post_meta['saswp_special_announcement_date_published_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_special_announcement_date_posted_'.$schema_id][0], get_post_time('h:i:s')):'',
2345
+ 'expires' => isset($all_post_meta['saswp_special_announcement_date_modified_'.$schema_id][0])? saswp_format_date_time($all_post_meta['saswp_special_announcement_date_expires_'.$schema_id][0], get_the_modified_time('h:i:s')):'',
2346
+ 'author' => array(
2347
+ '@type' => 'Person',
2348
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_author_name_'.$schema_id, 'saswp_array'),
2349
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_author_description_'.$schema_id, 'saswp_array'),
2350
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_author_url_'.$schema_id, 'saswp_array')
2351
+ )
2352
+
2353
+ );
2354
+
2355
+ if(isset($all_post_meta['saswp_special_announcement_organization_logo_'.$schema_id][0]) || isset($all_post_meta['saswp_special_announcement_organization_name_'.$schema_id][0])){
2356
+
2357
+ $input1['publisher']['@type'] = 'Organization';
2358
+ $input1['publisher']['logo']['@type'] = 'ImageObject';
2359
+ $input1['publisher']['logo']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_organization_logo_'.$schema_id, 'saswp_array');
2360
+ $input1['publisher']['logo']['width'] = saswp_remove_warnings($slogo, 'width', 'saswp_string');
2361
+ $input1['publisher']['logo']['height'] = saswp_remove_warnings($slogo, 'height', 'saswp_string');
2362
+ $input1['publisher']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_organization_name_'.$schema_id, 'saswp_array');
2363
+
2364
+ }
2365
+
2366
+ $location = array();
2367
+
2368
+ if(isset($all_post_meta['saswp_special_announcement_location_type_'.$schema_id][0])){
2369
+
2370
+ $loc_imgobject = array();
2371
+
2372
+ if($location_img){
2373
+
2374
+ $loc_imgobject = array(
2375
+ '@type' => 'ImageObject',
2376
+ 'url' => $location_img['thumbnail'],
2377
+ 'width' => $location_img['width'],
2378
+ 'height' => $location_img['height'],
2379
+ );
2380
+
2381
+ }
2382
+
2383
+ $location[] = array(
2384
+ '@type' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_location_type_'.$schema_id, 'saswp_array'),
2385
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_location_name_'.$schema_id, 'saswp_array'),
2386
+ 'image' => $loc_imgobject,
2387
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_location_url_'.$schema_id, 'saswp_array'),
2388
+ 'telephone' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_location_telephone_'.$schema_id, 'saswp_array'),
2389
+ 'priceRange' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_location_price_range_'.$schema_id, 'saswp_array'),
2390
+ 'address' => array(
2391
+ '@type' => 'PostalAddress',
2392
+ 'streetAddress' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_location_street_address_'.$schema_id, 'saswp_array'),
2393
+ 'addressLocality' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_location_address_locality_'.$schema_id, 'saswp_array'),
2394
+ 'addressRegion' => saswp_remove_warnings($all_post_meta, 'saswp_special_announcement_location_address_region_'.$schema_id, 'saswp_array'),
2395
+ ),
2396
+ );
2397
+
2398
+ }
2399
+
2400
+ $supply = get_post_meta($schema_post_id, 'announcement_location_'.$schema_id, true);
2401
+
2402
+ if(!empty($supply)){
2403
+
2404
+ foreach($supply as $val){
2405
+
2406
+ $supply_data = array();
2407
+
2408
+ $supply_data['@type'] = $val['saswp_sp_location_type'];
2409
+ $supply_data['name'] = $val['saswp_sp_location_name'];
2410
+ $supply_data['url'] = $val['saswp_sp_location_url'];
2411
+ $supply_data['telephone'] = $val['saswp_sp_location_telephone'];
2412
+ $supply_data['priceRange'] = $val['saswp_sp_location_price_range'];
2413
+ $supply_data['address']['@type'] = 'PostalAddress';
2414
+ $supply_data['address']['streetAddress'] = $val['saswp_sp_location_street_address'];
2415
+ $supply_data['address']['addressLocality'] = $val['saswp_sp_location_street_locality'];
2416
+ $supply_data['address']['addressRegion'] = $val['saswp_sp_location_street_region'];
2417
+
2418
+
2419
+ if(isset($val['saswp_sp_location_image_id']) && $val['saswp_sp_location_image_id'] !=''){
2420
+
2421
+ $image_details = saswp_get_image_by_id($val['saswp_sp_location_image_id']);
2422
+
2423
+ if($image_details){
2424
+ $supply_data['image'] = $image_details;
2425
+ }
2426
+
2427
+ }
2428
+ $location[] = $supply_data;
2429
+ }
2430
+
2431
+ }
2432
+
2433
+ $input1['announcementLocation'] = $location;
2434
+
2435
+ return $input1;
2436
+
2437
  }
2438
 
2439
  function saswp_article_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2949
  $item_schema = saswp_software_app_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2950
 
2951
  break;
2952
+ case 'MobileApplication':
2953
+
2954
+ $item_schema = saswp_mobile_app_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2955
+
2956
+ break;
2957
  case 'VideoGame':
2958
 
2959
  $item_schema = saswp_video_game_schema_markup($schema_id, $schema_post_id, $all_post_meta);
output/output.php CHANGED
@@ -735,7 +735,7 @@ function saswp_schema_output() {
735
  $input1 = array(
736
  '@context' => saswp_context_url(),
737
  '@type' => 'DiscussionForumPosting' ,
738
- '@id' => trailingslashit(saswp_get_permalink()).'#BlogPosting',
739
  'url' => trailingslashit(saswp_get_permalink()),
740
  'mainEntityOfPage' => saswp_get_permalink(),
741
  'headline' => saswp_get_the_title(),
@@ -932,6 +932,51 @@ function saswp_schema_output() {
932
  }
933
 
934
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
935
 
936
  case 'WebPage':
937
 
@@ -958,6 +1003,24 @@ function saswp_schema_output() {
958
 
959
  break;
960
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
961
  case 'Article':
962
 
963
  $input1 = $service_object->saswp_schema_markup_generator($schema_type);
@@ -1454,6 +1517,15 @@ function saswp_schema_output() {
1454
 
1455
 
1456
  if($schema_type == 'Review'){
 
 
 
 
 
 
 
 
 
1457
 
1458
  //Taqyeem
1459
 
@@ -1462,7 +1534,7 @@ function saswp_schema_output() {
1462
  if(!empty($taqyeem_rating)){
1463
  $input1['itemReviewed']['aggregateRating'] = $taqyeem_rating;
1464
  }
1465
- //kk star rating
1466
 
1467
  $kkstar_aggregateRating = saswp_extract_kk_star_ratings();
1468
 
@@ -1477,9 +1549,36 @@ function saswp_schema_output() {
1477
  if(!empty($wp_post_rating_ar)){
1478
  $input1['itemReviewed']['aggregateRating'] = $wp_post_rating_ar;
1479
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1480
 
1481
  }else{
1482
 
 
 
 
 
 
 
 
 
1483
  //Taqyeem
1484
 
1485
  $taqyeem_rating = saswp_extract_taqyeem_ratings();
@@ -1502,6 +1601,25 @@ function saswp_schema_output() {
1502
  if(!empty($wp_post_rating_ar)){
1503
  $input1['aggregateRating'] = $wp_post_rating_ar;
1504
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1505
 
1506
  }
1507
 
@@ -1564,7 +1682,7 @@ function saswp_schema_output() {
1564
  $input1['review'] = $strong_testimonials['reviews'];
1565
  }
1566
 
1567
- }
1568
 
1569
  }
1570
 
@@ -1726,7 +1844,7 @@ function saswp_woocommerce_category_schema(){
1726
  $list_item = array();
1727
  $term = get_queried_object();
1728
  $service = new saswp_output_service();
1729
- $category_loop = new WP_Query( $query_string );
1730
 
1731
  $current_url = saswp_get_current_url();
1732
 
@@ -1738,7 +1856,7 @@ function saswp_woocommerce_category_schema(){
1738
  $category_posts = array();
1739
  $category_posts['@type'] = 'ListItem';
1740
  $category_posts['position'] = $i;
1741
- $category_posts['item'] = $service->saswp_schema_markup_generator('Product');
1742
 
1743
  $feature_image = $service->saswp_get_fetaure_image();
1744
  $category_posts['item'] = array_merge( $category_posts['item'], $feature_image);
@@ -1761,9 +1879,16 @@ function saswp_woocommerce_category_schema(){
1761
  $item_list_schema = array();
1762
 
1763
  if($list_item){
 
1764
  $item_list_schema['@context'] = saswp_context_url();
1765
- $item_list_schema['@type'] = 'ItemList';
1766
- $item_list_schema['url'] = get_category_link($term->term_id);
 
 
 
 
 
 
1767
  $item_list_schema['itemListElement'] = $list_item;
1768
  }
1769
 
735
  $input1 = array(
736
  '@context' => saswp_context_url(),
737
  '@type' => 'DiscussionForumPosting' ,
738
+ '@id' => trailingslashit(saswp_get_permalink()).'#DiscussionForumPosting',
739
  'url' => trailingslashit(saswp_get_permalink()),
740
  'mainEntityOfPage' => saswp_get_permalink(),
741
  'headline' => saswp_get_the_title(),
932
  }
933
 
934
  break;
935
+
936
+ case 'MobileApplication':
937
+
938
+ $input1 = array(
939
+ '@context' => saswp_context_url(),
940
+ '@type' => $schema_type ,
941
+ '@id' => trailingslashit(saswp_get_permalink()).'#MobileApplication',
942
+ 'datePublished' => esc_html($date),
943
+ 'dateModified' => esc_html($modified_date),
944
+ 'author' => saswp_get_author_details()
945
+ );
946
+
947
+ $woo_markp = $service_object->saswp_schema_markup_generator($schema_type);
948
+
949
+ if($woo_markp){
950
+ $input1 = array_merge($input1, $woo_markp);
951
+ }
952
+
953
+ unset($input1['brand'], $input1['mpn'], $input1['sku'],$input1['gtin8'], $input1['gtin13']);
954
+
955
+ if(!empty($publisher)){
956
+ $input1 = array_merge($input1, $publisher);
957
+ }
958
+ if(!empty($aggregateRating)){
959
+ $input1['aggregateRating'] = $aggregateRating;
960
+ }
961
+ if(!empty($extra_theme_review)){
962
+ $input1 = array_merge($input1, $extra_theme_review);
963
+ }
964
+ if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
965
+ $input1['comment'] = saswp_get_comments(get_the_ID());
966
+ }
967
+
968
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
969
+
970
+ $input1 = apply_filters('saswp_modify_mobile_application_schema_output', $input1 );
971
+
972
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
973
+
974
+ if($modified_schema == 1){
975
+
976
+ $input1 = saswp_mobile_app_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
977
+ }
978
+
979
+ break;
980
 
981
  case 'WebPage':
982
 
1003
 
1004
  break;
1005
 
1006
+ case 'SpecialAnnouncement':
1007
+
1008
+ $input1 = $service_object->saswp_schema_markup_generator($schema_type);
1009
+
1010
+ if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1011
+ $input1['comment'] = saswp_get_comments(get_the_ID());
1012
+ }
1013
+ $input1 = apply_filters('saswp_modify_special_announcement_schema_output', $input1 );
1014
+
1015
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1016
+
1017
+ if($modified_schema == 1){
1018
+
1019
+ $input1 = saswp_special_announcement_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1020
+ }
1021
+
1022
+ break;
1023
+
1024
  case 'Article':
1025
 
1026
  $input1 = $service_object->saswp_schema_markup_generator($schema_type);
1517
 
1518
 
1519
  if($schema_type == 'Review'){
1520
+
1521
+
1522
+ //kk star rating
1523
+
1524
+ $yasr = saswp_extract_yet_another_stars_rating();
1525
+
1526
+ if(!empty($yasr)){
1527
+ $input1['itemReviewed']['aggregateRating'] = $yasr;
1528
+ }
1529
 
1530
  //Taqyeem
1531
 
1534
  if(!empty($taqyeem_rating)){
1535
  $input1['itemReviewed']['aggregateRating'] = $taqyeem_rating;
1536
  }
1537
+ //kk star rating
1538
 
1539
  $kkstar_aggregateRating = saswp_extract_kk_star_ratings();
1540
 
1549
  if(!empty($wp_post_rating_ar)){
1550
  $input1['itemReviewed']['aggregateRating'] = $wp_post_rating_ar;
1551
  }
1552
+
1553
+ // WP Customer Reviews starts here
1554
+ $wp_customer_rv = saswp_get_wp_customer_reviews();
1555
+
1556
+ if($wp_customer_rv){
1557
+ $input1['itemReviewed']['aggregateRating'] = $wp_customer_rv['AggregateRating'];
1558
+ $input1['itemReviewed']['review'] = $wp_customer_rv['reviews'];
1559
+ }
1560
+ // WP Customer Reviews ends here
1561
+
1562
+ //Reviews wp theme starts here
1563
+
1564
+ $reviews_wp_theme = saswp_get_reviews_wp_theme();
1565
+
1566
+ if($reviews_wp_theme){
1567
+ $input1['itemReviewed']['aggregateRating'] = $reviews_wp_theme['AggregateRating'];
1568
+ $input1['itemReviewed']['review'] = $reviews_wp_theme['reviews'];
1569
+ }
1570
+ //Reviews wp theme ends here
1571
 
1572
  }else{
1573
 
1574
+ //yet another star rating
1575
+
1576
+ $yasr = saswp_extract_yet_another_stars_rating();
1577
+
1578
+ if(!empty($yasr)){
1579
+ $input1['aggregateRating'] = $yasr;
1580
+ }
1581
+
1582
  //Taqyeem
1583
 
1584
  $taqyeem_rating = saswp_extract_taqyeem_ratings();
1601
  if(!empty($wp_post_rating_ar)){
1602
  $input1['aggregateRating'] = $wp_post_rating_ar;
1603
  }
1604
+
1605
+ // WP Customer Reviews starts here
1606
+ $wp_customer_rv = saswp_get_wp_customer_reviews();
1607
+
1608
+ if($wp_customer_rv){
1609
+ $input1['aggregateRating'] = $wp_customer_rv['AggregateRating'];
1610
+ $input1['review'] = $wp_customer_rv['reviews'];
1611
+ }
1612
+ // WP Customer Reviews ends here
1613
+
1614
+ //Reviews wp theme starts here
1615
+
1616
+ $reviews_wp_theme = saswp_get_reviews_wp_theme();
1617
+
1618
+ if($reviews_wp_theme){
1619
+ $input1['aggregateRating'] = $reviews_wp_theme['AggregateRating'];
1620
+ $input1['review'] = $reviews_wp_theme['reviews'];
1621
+ }
1622
+ //Reviews wp theme ends here
1623
 
1624
  }
1625
 
1682
  $input1['review'] = $strong_testimonials['reviews'];
1683
  }
1684
 
1685
+ }
1686
 
1687
  }
1688
 
1844
  $list_item = array();
1845
  $term = get_queried_object();
1846
  $service = new saswp_output_service();
1847
+ $category_loop = new WP_Query( $query_string );
1848
 
1849
  $current_url = saswp_get_current_url();
1850
 
1856
  $category_posts = array();
1857
  $category_posts['@type'] = 'ListItem';
1858
  $category_posts['position'] = $i;
1859
+ $category_posts['item'] = $service->saswp_schema_markup_generator('Product');
1860
 
1861
  $feature_image = $service->saswp_get_fetaure_image();
1862
  $category_posts['item'] = array_merge( $category_posts['item'], $feature_image);
1879
  $item_list_schema = array();
1880
 
1881
  if($list_item){
1882
+
1883
  $item_list_schema['@context'] = saswp_context_url();
1884
+ $item_list_schema['@type'] = 'ItemList';
1885
+
1886
+ if(saswp_has_slash($current_url)){
1887
+ $item_list_schema['url'] = trailingslashit(saswp_get_category_link($term->term_id));
1888
+ }else{
1889
+ $item_list_schema['url'] = saswp_remove_slash(saswp_get_category_link($term->term_id));
1890
+ }
1891
+
1892
  $item_list_schema['itemListElement'] = $list_item;
1893
  }
1894
 
output/service.php CHANGED
@@ -140,10 +140,10 @@ Class saswp_output_service{
140
  $response = get_site_url();
141
  break;
142
  case 'post_title':
143
- $response = saswp_get_the_title();
144
  break;
145
  case 'post_content':
146
- $response = saswp_get_the_content();
147
  break;
148
  case 'post_category':
149
  $categories = get_the_category();
@@ -182,8 +182,11 @@ Class saswp_output_service{
182
  $fixed_text = get_post_meta($schema_post_id, 'saswp_fixed_text', true) ;
183
 
184
  if(isset($fixed_text[$key])){
185
-
186
- if (strpos($fixed_text[$key], 'http') !== false) {
 
 
 
187
 
188
  $image_details = @getimagesize($fixed_text[$key]);
189
 
@@ -666,6 +669,83 @@ Class saswp_output_service{
666
  $input1['Publisher']['logo'] = $custom_fields['saswp_article_organization_logo'];
667
  }
668
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
669
 
670
  case 'HowTo':
671
  if(isset($custom_fields['saswp_howto_schema_id'])){
@@ -776,6 +856,7 @@ Class saswp_output_service{
776
  break;
777
 
778
  case 'Blogposting':
 
779
 
780
  if(isset($custom_fields['saswp_blogposting_main_entity_of_page'])){
781
  $input1['mainEntityOfPage'] = $custom_fields['saswp_blogposting_main_entity_of_page'];
@@ -882,16 +963,50 @@ Class saswp_output_service{
882
  if(isset($custom_fields['saswp_software_schema_date_modified'])){
883
  $input1['dateModified'] = $custom_fields['saswp_software_schema_date_modified'];
884
  }
885
- if(isset($custom_fields['saswp_software_rating_value']) && isset($custom_fields['saswp_software_rating_count'])){
886
- $input1['aggregateRating']['@type'] = 'AggregateRating';
887
- $input1['aggregateRating']['worstRating'] = 0;
888
- $input1['aggregateRating']['bestRating'] = 5;
889
- $input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_software_rating_value'];
890
- $input1['aggregateRating']['ratingCount'] = $custom_fields['saswp_software_rating_count'];
891
- }
892
 
893
-
894
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
895
 
896
  case 'NewsArticle':
897
 
@@ -2363,23 +2478,27 @@ Class saswp_output_service{
2363
  if(is_object($product)){
2364
 
2365
  if(is_object($woocommerce)){
2366
-
2367
- if($product->get_type() == 'variable'){
2368
 
2369
- $product_id_some = $woocommerce->product_factory->get_product();
2370
 
2371
- $variations = $product_id_some->get_available_variations();
 
 
 
 
 
 
 
 
 
 
 
 
 
2372
 
2373
- if($variations){
2374
-
2375
- foreach($variations as $value){
2376
-
2377
- $varible_prices[] = $value['display_price'];
2378
-
2379
- }
2380
- }
2381
-
2382
- }
2383
 
2384
  }
2385
 
@@ -2475,12 +2594,18 @@ Class saswp_output_service{
2475
  $product_details['product_availability'] = $product->get_stock_status();
2476
  }
2477
 
2478
- if($product->get_type() == 'variable'){
2479
- $product_details['product_varible_price'] = $varible_prices;
 
 
 
 
 
 
2480
  }else{
2481
- $product_details['product_price'] = $product->get_price();
2482
  }
2483
-
2484
  $product_details['product_sku'] = $product->get_sku() ? $product->get_sku(): get_the_ID();
2485
 
2486
  if(isset($date_on_sale)){
@@ -2547,15 +2672,15 @@ Class saswp_output_service{
2547
 
2548
  $reviews_arr[] = $rv;
2549
 
2550
- }
 
2551
  $product_details['product_review_count'] = count($judge_me_post);
2552
  if($sumofrating > 0){
2553
  $product_details['product_average_rating'] = $sumofrating / count($judge_me_post);
2554
  }
2555
 
2556
  }else if($reviews){
2557
-
2558
-
2559
  foreach($reviews as $review){
2560
 
2561
  $reviews_arr[] = array(
@@ -2674,7 +2799,7 @@ Class saswp_output_service{
2674
 
2675
  $review_data['review'] = array(
2676
  '@type' => 'Review',
2677
- 'author' => get_the_author(),
2678
  'datePublished' => get_the_date("c"),
2679
  'name' => $post_review_title,
2680
  'reviewBody' => $post_review_desc,
@@ -2980,6 +3105,34 @@ Class saswp_output_service{
2980
  );
2981
 
2982
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2983
 
2984
  case 'WebPage':
2985
 
@@ -3032,6 +3185,7 @@ Class saswp_output_service{
3032
 
3033
  case 'Product':
3034
  case 'SoftwareApplication':
 
3035
  case 'Book':
3036
 
3037
  $product_details = $this->saswp_woocommerce_product_details(get_the_ID());
@@ -3301,7 +3455,7 @@ Class saswp_output_service{
3301
 
3302
  }else{
3303
 
3304
- if($attach_images){
3305
 
3306
  foreach($attach_images['image'] as $key => $image){
3307
 
140
  $response = get_site_url();
141
  break;
142
  case 'post_title':
143
+ $response = get_the_title();
144
  break;
145
  case 'post_content':
146
+ $response = get_the_content();
147
  break;
148
  case 'post_category':
149
  $categories = get_the_category();
182
  $fixed_text = get_post_meta($schema_post_id, 'saswp_fixed_text', true) ;
183
 
184
  if(isset($fixed_text[$key])){
185
+
186
+ $explod = @explode('.', $fixed_text[$key]);
187
+ $ext = @strtolower(end($explod));
188
+
189
+ if ($ext == 'jpg' || $ext == 'png' || $ext == 'gif' || $ext == 'jpeg') {
190
 
191
  $image_details = @getimagesize($fixed_text[$key]);
192
 
669
  $input1['Publisher']['logo'] = $custom_fields['saswp_article_organization_logo'];
670
  }
671
  break;
672
+ case 'SpecialAnnouncement':
673
+
674
+ $location = array();
675
+
676
+ if(isset($custom_fields['saswp_special_announcement_location_type'])){
677
+
678
+ $location = array(
679
+ '@type' => $custom_fields['saswp_special_announcement_location_type'],
680
+ 'name' => $custom_fields['saswp_special_announcement_location_name'],
681
+ 'image' => $custom_fields['saswp_special_announcement_location_image'],
682
+ 'url' => $custom_fields['saswp_special_announcement_location_url'],
683
+ 'telephone' => $custom_fields['saswp_special_announcement_location_telephone'],
684
+ 'priceRange' => $custom_fields['saswp_special_announcement_location_price_range'],
685
+ 'address' => array(
686
+ '@type' => 'PostalAddress',
687
+ 'streetAddress' => $custom_fields['saswp_special_announcement_location_street_address'],
688
+ 'addressLocality' => $custom_fields['saswp_special_announcement_location_address_locality'],
689
+ 'addressRegion' => $custom_fields['saswp_special_announcement_location_address_region'],
690
+ ),
691
+ );
692
+
693
+ $input1['announcementLocation'] = $location;
694
+ }
695
+ if(isset($custom_fields['saswp_special_announcement_category'])){
696
+ $input1['category'] = $custom_fields['saswp_special_announcement_category'];
697
+ }
698
+ if(isset($custom_fields['saswp_special_announcement_quarantine_guidelines'])){
699
+ $input1['quarantineGuidelines'] = $custom_fields['saswp_special_announcement_quarantine_guidelines'];
700
+ }
701
+ if(isset($custom_fields['saswp_special_announcement_newsupdates_and_guidelines'])){
702
+ $input1['newsUpdatesAndGuidelines'] = $custom_fields['saswp_special_announcement_newsupdates_and_guidelines'];
703
+ }
704
+ if(isset($custom_fields['saswp_special_announcement_disease_prevention_info'])){
705
+ $input1['diseasePreventionInfo'] = $custom_fields['saswp_special_announcement_disease_prevention_info'];
706
+ }
707
+ if(isset($custom_fields['saswp_special_announcement_image'])){
708
+ $input1['image'] = $custom_fields['saswp_special_announcement_image'];
709
+ }
710
+ if(isset($custom_fields['saswp_special_announcement_url'])){
711
+ $input1['url'] = $custom_fields['saswp_special_announcement_url'];
712
+ }
713
+ if(isset($custom_fields['saswp_special_announcement_keywords'])){
714
+ $input1['keywords'] = $custom_fields['saswp_special_announcement_keywords'];
715
+ }
716
+ if(isset($custom_fields['saswp_special_announcement_name'])){
717
+ $input1['name'] = $custom_fields['saswp_special_announcement_name'];
718
+ }
719
+ if(isset($custom_fields['saswp_special_announcement_description'])){
720
+ $input1['text'] = wp_strip_all_tags(strip_shortcodes( $custom_fields['saswp_special_announcement_description'] ));
721
+ }
722
+ if(isset($custom_fields['saswp_special_announcement_date_published'])){
723
+ $input1['datePublished'] = $custom_fields['saswp_special_announcement_date_published'];
724
+ }
725
+ if(isset($custom_fields['saswp_special_announcement_date_modified'])){
726
+ $input1['dateModified'] = $custom_fields['saswp_special_announcement_date_modified'];
727
+ }
728
+ if(isset($custom_fields['saswp_special_announcement_date_posted'])){
729
+ $input1['datePosted'] = $custom_fields['saswp_special_announcement_date_posted'];
730
+ }
731
+ if(isset($custom_fields['saswp_special_announcement_date_expires'])){
732
+ $input1['expires'] = $custom_fields['saswp_special_announcement_date_expires'];
733
+ }
734
+ if(isset($custom_fields['saswp_special_announcement_author_name'])){
735
+ $input1['author']['name'] = $custom_fields['saswp_special_announcement_author_name'];
736
+ }
737
+ if(isset($custom_fields['saswp_special_announcement_author_description'])){
738
+ $input1['author']['description'] = $custom_fields['saswp_special_announcement_author_description'];
739
+ }
740
+ if(isset($custom_fields['saswp_special_announcement_author_url'])){
741
+ $input1['author']['url'] = $custom_fields['saswp_special_announcement_author_url'];
742
+ }
743
+ if(isset($custom_fields['saswp_special_announcement_organization_logo']) && isset($custom_fields['saswp_special_announcement_organization_name'])){
744
+ $input1['Publisher']['@type'] = 'Organization';
745
+ $input1['Publisher']['name'] = $custom_fields['saswp_special_announcement_organization_name'];
746
+ $input1['Publisher']['logo'] = $custom_fields['saswp_special_announcement_organization_logo'];
747
+ }
748
+ break;
749
 
750
  case 'HowTo':
751
  if(isset($custom_fields['saswp_howto_schema_id'])){
856
  break;
857
 
858
  case 'Blogposting':
859
+ case 'BlogPosting':
860
 
861
  if(isset($custom_fields['saswp_blogposting_main_entity_of_page'])){
862
  $input1['mainEntityOfPage'] = $custom_fields['saswp_blogposting_main_entity_of_page'];
963
  if(isset($custom_fields['saswp_software_schema_date_modified'])){
964
  $input1['dateModified'] = $custom_fields['saswp_software_schema_date_modified'];
965
  }
966
+ if(isset($custom_fields['saswp_software_schema_rating']) && isset($custom_fields['saswp_software_schema_rating_count'])){
967
+ $input1['aggregateRating']['@type'] = 'AggregateRating';
968
+ $input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_software_schema_rating'];
969
+ $input1['aggregateRating']['ratingCount'] = $custom_fields['saswp_software_schema_rating_count'];
970
+ }
971
+
972
+ break;
973
 
974
+ case 'MobileApplication':
975
+
976
+ if(isset($custom_fields['saswp_mobile_app_schema_name'])){
977
+ $input1['name'] = $custom_fields['saswp_mobile_app_schema_name'];
978
+ }
979
+ if(isset($custom_fields['saswp_mobile_app_schema_description'])){
980
+ $input1['description'] = wp_strip_all_tags(strip_shortcodes( $custom_fields['saswp_mobile_app_schema_description'] ));
981
+ }
982
+ if(isset($custom_fields['saswp_mobile_app_schema_image'])){
983
+ $input1['image'] = $custom_fields['saswp_mobile_app_schema_image'];
984
+ }
985
+ if(isset($custom_fields['saswp_mobile_app_schema_operating_system'])){
986
+ $input1['operatingSystem'] = $custom_fields['saswp_mobile_app_schema_operating_system'];
987
+ }
988
+ if(isset($custom_fields['saswp_mobile_app_schema_application_category'])){
989
+ $input1['applicationCategory'] = $custom_fields['saswp_mobile_app_schema_application_category'];
990
+ }
991
+ if(isset($custom_fields['saswp_mobile_app_schema_price'])){
992
+ $input1['offers']['price'] = $custom_fields['saswp_mobile_app_schema_price'];
993
+ }
994
+ if(isset($custom_fields['saswp_mobile_app_schema_price_currency'])){
995
+ $input1['offers']['priceCurrency'] = $custom_fields['saswp_mobile_app_schema_price_currency'];
996
+ }
997
+ if(isset($custom_fields['saswp_mobile_app_schema_date_published'])){
998
+ $input1['datePublished'] = $custom_fields['saswp_mobile_app_schema_date_published'];
999
+ }
1000
+ if(isset($custom_fields['saswp_mobile_app_schema_date_modified'])){
1001
+ $input1['dateModified'] = $custom_fields['saswp_mobile_app_schema_date_modified'];
1002
+ }
1003
+ if(isset($custom_fields['saswp_mobile_app_schema_rating_value']) && isset($custom_fields['saswp_mobile_app_schema_rating_count'])){
1004
+ $input1['aggregateRating']['@type'] = 'AggregateRating';
1005
+ $input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_mobile_app_schema_rating_value'];
1006
+ $input1['aggregateRating']['ratingCount'] = $custom_fields['saswp_mobile_app_schema_rating_count'];
1007
+ }
1008
+
1009
+ break;
1010
 
1011
  case 'NewsArticle':
1012
 
2478
  if(is_object($product)){
2479
 
2480
  if(is_object($woocommerce)){
2481
+
2482
+ if(method_exists('WC_Product_Simple', 'get_type')){
2483
 
2484
+ if($product->get_type() == 'variable'){
2485
 
2486
+ $product_id_some = $woocommerce->product_factory->get_product();
2487
+
2488
+ $variations = $product_id_some->get_available_variations();
2489
+
2490
+ if($variations){
2491
+
2492
+ foreach($variations as $value){
2493
+
2494
+ $varible_prices[] = $value['display_price'];
2495
+
2496
+ }
2497
+ }
2498
+
2499
+ }
2500
 
2501
+ }
 
 
 
 
 
 
 
 
 
2502
 
2503
  }
2504
 
2594
  $product_details['product_availability'] = $product->get_stock_status();
2595
  }
2596
 
2597
+ if(method_exists('WC_Product_Simple', 'get_type')){
2598
+
2599
+ if($product->get_type() == 'variable'){
2600
+ $product_details['product_varible_price'] = $varible_prices;
2601
+ }else{
2602
+ $product_details['product_price'] = $product->get_price();
2603
+ }
2604
+
2605
  }else{
2606
+ $product_details['product_price'] = $product->get_price();
2607
  }
2608
+
2609
  $product_details['product_sku'] = $product->get_sku() ? $product->get_sku(): get_the_ID();
2610
 
2611
  if(isset($date_on_sale)){
2672
 
2673
  $reviews_arr[] = $rv;
2674
 
2675
+ }
2676
+
2677
  $product_details['product_review_count'] = count($judge_me_post);
2678
  if($sumofrating > 0){
2679
  $product_details['product_average_rating'] = $sumofrating / count($judge_me_post);
2680
  }
2681
 
2682
  }else if($reviews){
2683
+
 
2684
  foreach($reviews as $review){
2685
 
2686
  $reviews_arr[] = array(
2799
 
2800
  $review_data['review'] = array(
2801
  '@type' => 'Review',
2802
+ 'author' => array('@type'=> 'Person', 'name' => get_the_author()),
2803
  'datePublished' => get_the_date("c"),
2804
  'name' => $post_review_title,
2805
  'reviewBody' => $post_review_desc,
3105
  );
3106
 
3107
  break;
3108
+ case 'SpecialAnnouncement':
3109
+ $input1 = array(
3110
+ '@context' => saswp_context_url(),
3111
+ '@type' => 'SpecialAnnouncement',
3112
+ '@id' => trailingslashit(saswp_get_permalink()).'#SpecialAnnouncement',
3113
+ 'url' => saswp_get_permalink(),
3114
+ 'inLanguage' => get_bloginfo('language'),
3115
+ 'name' => saswp_get_the_title(),
3116
+ 'text' => saswp_get_the_excerpt(),
3117
+ 'keywords' => saswp_get_the_tags(),
3118
+ 'datePublished' => esc_html($date),
3119
+ 'datePosted' => esc_html($date),
3120
+ 'dateModified' => esc_html($modified_date),
3121
+ 'expires' => esc_html($modified_date),
3122
+ 'author' => saswp_get_author_details(),
3123
+ 'publisher' => array(
3124
+ '@type' => 'Organization',
3125
+ 'logo' => array(
3126
+ '@type' => 'ImageObject',
3127
+ 'url' => esc_url($logo),
3128
+ 'width' => esc_attr($width),
3129
+ 'height' => esc_attr($height),
3130
+ ),
3131
+ 'name' => esc_attr($site_name),
3132
+ ),
3133
+
3134
+ );
3135
+ break;
3136
 
3137
  case 'WebPage':
3138
 
3185
 
3186
  case 'Product':
3187
  case 'SoftwareApplication':
3188
+ case 'MobileApplication':
3189
  case 'Book':
3190
 
3191
  $product_details = $this->saswp_woocommerce_product_details(get_the_ID());
3455
 
3456
  }else{
3457
 
3458
+ if($attach_images && isset($attach_images['image'])){
3459
 
3460
  foreach($attach_images['image'] as $key => $image){
3461
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.4
6
- Stable tag: 1.9.32
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -14,7 +14,7 @@ Schema & Structured Data for WP & AMP adds Google Rich Snippets markup according
14
 
15
  ### Features
16
 
17
- * <strong>Schema Types</strong>: Currently, We have 33 schema types such as Blog Posting, News article, Local Business, Web page, Article, Recipe, Product, and Video Object [view all](https://structured-data-for-wp.com/docs/article/how-many-schema-types-do-we-support/). We are going to add all the schema types in the future. You can request the one you want and we will add it for you!
18
  * <strong>Conditional Display Fields</strong>: Meaning you include or exclude any posts, pages, post types, taxonomies and more!
19
  * <strong>Knowlegde Base Support</strong>: Recognize the content based on the organization or a person via data type option.
20
  * <strong>Full AMP Compatiblity</strong>: Supports the AMP for WP and AMP by Automattic plugins.
@@ -54,6 +54,8 @@ Schema & Structured Data for WP & AMP adds Google Rich Snippets markup according
54
  * Recipe
55
  * TVSeries
56
  * SoftwareApplication
 
 
57
  * TechArticle
58
  * WebPage
59
  * Event
@@ -118,6 +120,27 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
118
 
119
  == Changelog ==
120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  = 1.9.32 (09 Apr 2020) =
122
 
123
  * Added: Property "Transcript" in videoObject schema type #776
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.4
6
+ Stable tag: 1.9.33
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
14
 
15
  ### Features
16
 
17
+ * <strong>Schema Types</strong>: Currently, We have more than 35 schema types such as Blog Posting, News article, Local Business, Web page, Article, Recipe, Product, and Video Object [view all](https://structured-data-for-wp.com/docs/article/how-many-schema-types-do-we-support/). We are going to add all the schema types in the future. You can request the one you want and we will add it for you!
18
  * <strong>Conditional Display Fields</strong>: Meaning you include or exclude any posts, pages, post types, taxonomies and more!
19
  * <strong>Knowlegde Base Support</strong>: Recognize the content based on the organization or a person via data type option.
20
  * <strong>Full AMP Compatiblity</strong>: Supports the AMP for WP and AMP by Automattic plugins.
54
  * Recipe
55
  * TVSeries
56
  * SoftwareApplication
57
+ * MobileApplication
58
+ * SpecialAnnouncement (Related to Coronavirus)
59
  * TechArticle
60
  * WebPage
61
  * Event
120
 
121
  == Changelog ==
122
 
123
+ = 1.9.33 (16 Apr 2020) =
124
+
125
+ * Added: Compatibility with "Yet Another Stars Rating" ( https://wordpress.org/plugins/yet-another-stars-rating/ ) plugin #919
126
+ * Added: Compatibility with "WP Customer Reviews" ( https://wordpress.org/plugins/wp-customer-reviews/ ) plugin #888
127
+ * Added: Compatibility with "Products And Services Review WP Theme" ( https://themeforest.net/item/reviews-products-and-services-review-wp-theme/13004739?s_rank=4 ) plugin #933
128
+ * Added: MobileApplication schema type #757
129
+ * Added: Special Announcement schema type related to Coronavirus #757
130
+ * Added: Translate field for "badge" #924
131
+ * Added: An option as when we enable it the featured image should be passed along with the content to RSS feed #913
132
+ * Fixed: Fatal error: Call to undefined method WC_Product_Simple::get_type() in /plugins/schema-and-structured-data-for-wp/output/service.php on line 2356 #929
133
+ * Fixed: Custom name of the business is not working #928
134
+ * Fixed: Review:- Copyrightyear is not updated accordingly. #694
135
+ * Fixed: Item list error ( All values provided for URL must point to the same page ) on product category pages (Pagination). #758
136
+ * Fixed: breadcrumb navxt compatibility + validation error #876
137
+ * Fixed: Category selection is not working correct in placement #890
138
+ * Fixed: Debug error #939
139
+ * Fixed: Fatal Error with FAQ block #931
140
+ * Fixed: Warning with FAQ block in DIVI builder. #780
141
+ * Fixed: Blogposting: Item reviewed and Aggregate rating error due to Taqyeem compatibility. #926
142
+
143
+
144
  = 1.9.32 (09 Apr 2020) =
145
 
146
  * Added: Property "Transcript" in videoObject schema type #776
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.32
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.32');
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.33
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.33');
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
@@ -177,6 +177,7 @@ function saswp_schema_type_meta_box_callback( $post) {
177
  'Product' => 'Product',
178
  'Recipe' => 'Recipe',
179
  'SoftwareApplication' => 'SoftwareApplication',
 
180
  'VideoGame' => 'VideoGame',
181
  );
182
 
177
  'Product' => 'Product',
178
  'Recipe' => 'Recipe',
179
  'SoftwareApplication' => 'SoftwareApplication',
180
+ 'MobileApplication' => 'MobileApplication',
181
  'VideoGame' => 'VideoGame',
182
  );
183