From fe5151ad663c8b2a7e465d85116dd7679e2a9cc7 Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Thu, 10 Oct 2024 11:17:04 +0530
Subject: [PATCH 01/18] #2189
---
admin_section/settings.php | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/admin_section/settings.php b/admin_section/settings.php
index 39608e6a..004ec8f1 100644
--- a/admin_section/settings.php
+++ b/admin_section/settings.php
@@ -5099,4 +5099,22 @@ function saswp_pre_update_settings($value, $old_value, $option){
return $value;
}
-add_filter( 'pre_update_option_sd_data', 'saswp_pre_update_settings',10,3);
\ No newline at end of file
+add_filter( 'pre_update_option_sd_data', 'saswp_pre_update_settings',10,3);
+
+/**
+ * Add protection to schema post meta fields
+ * @param $protected Boolean
+ * @param $meta_key String
+ * @param $meta_type String
+ * @return $protected Boolean
+ * @since 1.38
+ * */
+add_filter( 'is_protected_meta', 'saswp_add_protection_schema_meta', 10, 3 );
+
+function saswp_add_protection_schema_meta( $protected, $meta_key, $meta_type ){
+ // Allow fields starting with underscore to be displayed
+ if ( strpos( $meta_key, 'saswp_' ) === 0 ) {
+ return true;
+ }
+ return $protected;
+}
\ No newline at end of file
From c38596a95f898cb49ab651e22ca4216682f0048d Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Thu, 10 Oct 2024 11:57:37 +0530
Subject: [PATCH 02/18] #2195
---
admin_section/settings.php | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/admin_section/settings.php b/admin_section/settings.php
index 004ec8f1..e72e2d6a 100644
--- a/admin_section/settings.php
+++ b/admin_section/settings.php
@@ -5003,8 +5003,9 @@ function saswp_enqueue_saswp_select2_js( $hook ) {
// If ACF is active then dequeue timepicker script on posts and pages
$current_screen = get_current_screen();
- if( is_object( $current_screen ) && ! empty( $current_screen->base ) ) {
- if( class_exists( 'acf' ) && ( $current_screen->base == 'post' || $current_screen->base == 'page' ) ) {
+ $post_types = saswp_post_type_generator();
+ if ( is_object( $current_screen ) && ! empty( $current_screen->post_type ) ) {
+ if ( class_exists( 'acf' ) && ( is_array( $post_types ) && in_array( $current_screen->post_type, $post_types ) ) ) {
wp_dequeue_script('saswp-timepicker-js');
}
}
From 3130c4066f94668f7bb5a0d79cd1e09b500810a2 Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Thu, 10 Oct 2024 12:27:16 +0530
Subject: [PATCH 03/18] #2194
---
admin_section/structure-admin.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/admin_section/structure-admin.php b/admin_section/structure-admin.php
index dedfc89e..41104b92 100644
--- a/admin_section/structure-admin.php
+++ b/admin_section/structure-admin.php
@@ -430,7 +430,10 @@ function saswp_comparison_logic_checker($input, $post){
case 'author_name':
- $get_author = get_post_field('post_author',$post->ID);
+ $get_author = '';
+ if ( is_object( $post ) && isset( $post->ID ) ) {
+ $get_author = get_post_field( 'post_author',$post->ID );
+ }
if ( $comparison == 'equal' ) {
if ( $get_author == $data ) {
From 7ff88e32556e75cfc294a9ea21d050bb7e02a13b Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Sat, 19 Oct 2024 18:10:59 +0530
Subject: [PATCH 04/18] #2171
---
modules/elementor/widgets/class-faq-block.php | 22 +++++++++++++++----
output/elementor.php | 4 ++--
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/modules/elementor/widgets/class-faq-block.php b/modules/elementor/widgets/class-faq-block.php
index e3147169..a355dfcb 100644
--- a/modules/elementor/widgets/class-faq-block.php
+++ b/modules/elementor/widgets/class-faq-block.php
@@ -85,6 +85,18 @@ protected function register_controls() {
'title_field' => '{{{ faq_question }}}',
]
);
+
+ $this->add_control(
+ '_saswp_el_faq_schema',
+ [
+ 'label' => __( 'FAQ Schema', 'schema-and-structured-data-for-wp' ),
+ 'type' => Controls_Manager::SWITCHER,
+ 'label_on' => __( 'Yes', 'schema-and-structured-data-for-wp' ),
+ 'label_off' => __( 'No', 'schema-and-structured-data-for-wp' ),
+ 'return_value' => 'yes',
+ 'default' => 'yes',
+ ]
+ );
$this->end_controls_section();
@@ -92,11 +104,13 @@ protected function register_controls() {
protected function render() {
- global $saswp_elementor_faq;
-
- $settings = $this->get_settings_for_display();
- $order_type = $settings['order_type'];
+ global $saswp_elementor_faq, $saswp_elementor_faq_switch;
+
+ $settings = $this->get_settings_for_display();
+ $order_type = $settings['order_type'];
+ $saswp_elementor_faq_switch = isset( $settings['_saswp_el_faq_schema'] ) ? esc_html( $settings['_saswp_el_faq_schema'] ) : 'yes';
+
if ( $settings['list'] ) {
$saswp_elementor_faq = $settings['list'];
diff --git a/output/elementor.php b/output/elementor.php
index a4ff5b3a..b04beb08 100644
--- a/output/elementor.php
+++ b/output/elementor.php
@@ -108,9 +108,9 @@ function saswp_elementor_faq_schema() {
$input1 = array();
- global $post, $saswp_elementor_faq;
+ global $post, $saswp_elementor_faq, $saswp_elementor_faq_switch;
- if($saswp_elementor_faq){
+ if ( $saswp_elementor_faq && $saswp_elementor_faq_switch == 'yes' ){
$input1['@context'] = saswp_context_url();
$input1['@type'] = 'FAQPage';
From a8fad1737d83deb12e69a1653fe167464f7f8a8f Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Sat, 19 Oct 2024 18:43:07 +0530
Subject: [PATCH 05/18] #2171
---
modules/elementor/widgets/class-faq-block.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/elementor/widgets/class-faq-block.php b/modules/elementor/widgets/class-faq-block.php
index a355dfcb..62226c29 100644
--- a/modules/elementor/widgets/class-faq-block.php
+++ b/modules/elementor/widgets/class-faq-block.php
@@ -89,7 +89,7 @@ protected function register_controls() {
$this->add_control(
'_saswp_el_faq_schema',
[
- 'label' => __( 'FAQ Schema', 'schema-and-structured-data-for-wp' ),
+ 'label' => __( 'Add Schema', 'schema-and-structured-data-for-wp' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => __( 'Yes', 'schema-and-structured-data-for-wp' ),
'label_off' => __( 'No', 'schema-and-structured-data-for-wp' ),
From 15647962600dd11a1e14a853ef2050c6b02d0aef Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Mon, 21 Oct 2024 11:32:55 +0530
Subject: [PATCH 06/18] #2201
---
output/class-saswp-output-service.php | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/output/class-saswp-output-service.php b/output/class-saswp-output-service.php
index 0d1ed757..f41d551a 100644
--- a/output/class-saswp-output-service.php
+++ b/output/class-saswp-output-service.php
@@ -399,6 +399,33 @@ public function saswp_get_meta_list_value($key, $field, $schema_post_id, $schema
}
+ }elseif ( strpos( $cus_field[$key], "rank_math_" ) !== false && class_exists('RankMath\Helper') ) {
+
+ $column_name = str_replace('rank_math_', '', $cus_field[$key]);
+ $term_id = '';
+ $term_taxonomy = '';
+ if ( is_category() || is_tag() || is_product_category() ) {
+ $query_obj = get_queried_object();
+ if ( ! empty( $query_obj ) && is_object( $query_obj ) && ! empty( $query_obj->term_id ) ) {
+ $term_id = $query_obj->term_id;
+ $term_taxonomy = $query_obj->taxonomy;
+ }
+ }
+
+ if( ( is_category() || is_tag() || is_product_category() ) && $term_id > 0 ) {
+ $response = get_term_meta( $term_id, $cus_field[$key], true );
+ $rank_data = RankMath\Helper::replace_vars( $response, get_term( $term_id, $term_taxonomy ) );
+ if ( ! empty( $rank_data ) && is_string( $rank_data ) ) {
+ $response = $rank_data;
+ }
+ }else{
+ $response = get_post_meta($post->ID, $cus_field[$key], true);
+ $rank_data = RankMath\Helper::replace_vars( $response, get_post( $post->ID ) );
+ if ( ! empty( $rank_data ) && is_string( $rank_data ) ) {
+ $response = $rank_data;
+ }
+ }
+
}elseif(strpos($key, "global_mapping") === true && $key == "saswp_webpage_reviewed_by"){
if($key == "saswp_webpage_reviewed_by"){
From e7461a0e42056ca9c59b1500e79194d46dfeb8ed Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Mon, 21 Oct 2024 15:24:34 +0530
Subject: [PATCH 07/18] #2199
---
output/function.php | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/output/function.php b/output/function.php
index 7d9f3105..0ee753ac 100644
--- a/output/function.php
+++ b/output/function.php
@@ -1299,6 +1299,19 @@ function saswp_extract_wp_post_ratings() {
*/
function saswp_get_comments($post_id){
+ /**
+ * If Display comment on post is disabled in amp settings for amp post then don't add comments to schema markup
+ * https://github.com/ahmedkaludi/schema-and-structured-data-for-wp/issues/2199
+ * @since 1.38
+ * */
+ if ( ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) || function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
+
+ if ( ( function_exists( 'ampforwp_get_setting' ) && false == ampforwp_get_setting( 'ampforwp-display-on-posts' ) ) ) {
+ return array();
+ }
+
+ }
+
global $sd_data;
$wpdiscuz = false;
From ebd22e9fdf47eebbf065d44c1c1d931eb8c81920 Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Wed, 23 Oct 2024 10:42:26 +0530
Subject: [PATCH 08/18] #2200
---
admin_section/common-function.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/admin_section/common-function.php b/admin_section/common-function.php
index 3e39b530..59584314 100644
--- a/admin_section/common-function.php
+++ b/admin_section/common-function.php
@@ -2138,7 +2138,7 @@ function saswp_defaultSettings() {
$sd_data = get_option( 'sd_data', saswp_default_settings_array());
// If data is not set for custom schema option then set default data to 1
- if(!array_key_exists('saswp-for-cschema', $sd_data) ) {
+ if ( is_array( $sd_data ) && ! array_key_exists( 'saswp-for-cschema', $sd_data ) ) {
$sd_data['saswp-for-cschema'] = 1;
}
From a8667320dd5c96c53040f3392fb2d5ee446f7656 Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Thu, 24 Oct 2024 17:03:21 +0530
Subject: [PATCH 09/18] #2204
---
admin_section/common-function.php | 1 +
admin_section/js/main-script.js | 9 +++
admin_section/js/main-script.min.js | 2 +-
admin_section/settings.php | 14 +++++
core/array-list/compatibility-list.php | 6 ++
output/class-saswp-output-compatibility.php | 3 +
output/output.php | 66 ++++++++++++++-------
7 files changed, 77 insertions(+), 24 deletions(-)
diff --git a/admin_section/common-function.php b/admin_section/common-function.php
index 59584314..7eb945ea 100644
--- a/admin_section/common-function.php
+++ b/admin_section/common-function.php
@@ -3542,6 +3542,7 @@ function saswp_get_field_note($pname){
'simple_author_box' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' Simple Author Box ',
'wp_post_ratings' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' WP-PostRatings ',
'bb_press' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' bbPress ',
+ 'wpforo' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' wpForo Forum ',
'woocommerce' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' Woocommerce ',
'cooked' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' Cooked ',
'the_events_calendar' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' The Events Calendar ',
diff --git a/admin_section/js/main-script.js b/admin_section/js/main-script.js
index 6cf7d1dd..ee4659e8 100644
--- a/admin_section/js/main-script.js
+++ b/admin_section/js/main-script.js
@@ -1826,6 +1826,15 @@ jQuery(document).ready(function($){
}
break;
+ case 'saswp-wpforo-checkbox':
+ saswp_compatibliy_notes(current, id);
+ if ($(this).is(':checked')) {
+ $("#saswp-wpforo").val(1);
+ }else{
+ $("#saswp-wpforo").val(0);
+ }
+ break;
+
case 'saswp-microdata-cleanup-checkbox':
if ($(this).is(':checked')) {
diff --git a/admin_section/js/main-script.min.js b/admin_section/js/main-script.min.js
index 846d3b95..6fe27855 100644
--- a/admin_section/js/main-script.min.js
+++ b/admin_section/js/main-script.min.js
@@ -1 +1 @@
-var saswp_attached_rv=[],saswp_attached_col=[],rmv_boolean=!1,rmv_html="";jQuery(document).ready(function(s){jQuery(".saswpforwp-colorpicker").wpColorPicker(),jQuery(".saswp-onclick-show").hide(),"local_business"==s("#schema_type").find(":selected").val()&&s(document).ready(function(){s(".saswp-business-type-tr").show()});var e=s("#saswp_breadcrumb_home_page_title").val();if(s("#saswp_breadcrumb_home_page_title_text").val(e),s("#saswp_breadcrumb_home_page_title_text").bind("keydown keyup",function(){var e=s(this).val();s("#saswp_breadcrumb_home_page_title").val(e)}),s(document).on("click","#saswp_loc_display_on_front",function(){s(this).is(":checked")?s(".saswp-front-location-inst").removeClass("saswp_hide"):s(".saswp-front-location-inst").addClass("saswp_hide")}),s(document).on("change",".saswp-collection-where",function(){s(this);var e,a=s(this).val();a&&(e=a)&&s.ajax({url:ajaxurl,method:"GET",data:{action:"saswp_get_select2_data",type:e,q:"",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},beforeSend:function(){},success:function(e){if(e){var a="";s.each(e,function(s,e){a+=''+e.text+" "}),s(".saswp-collection-where-data").html(""),s(".saswp-collection-where-data").append(a),saswp_select2()}},error:function(s){console.log("Failed Ajax Request"),console.log(s)}})}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?(s(".saswp-coll-where").addClass("saswp_hide"),s("#saswp-motivatebox").css("display","block")):(s(".saswp-coll-where").removeClass("saswp_hide"),s("#saswp-motivatebox").css("display","none"))}).change(),s(document).on("click",".saswp-dismiss-notices",function(){var e=s(this),a=s(this).attr("notice-type");a&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_dismiss_notices",notice_type:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status&&e.parent().parent().hide()},error:function(s){console.log(s)}})}),saswp_select2(),s(".saswp-upgrade-to-pro").parent().attr({href:"https://structured-data-for-wp.com/pricing/",target:"_blank"}),s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show(saswp_localize_data.translable_txt.attach_review,"#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e=null;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,c="";t>0&&(c+=t+" Reviews, "),i>0&&(c+=i+" Collection"),c||(c=0),s(".saswp-attached-rv-count").text("Attached "+c),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='
"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),i>=10&&s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"),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?' ':' ',e.preventDefault();var t="";(t+=''+saswp_localize_data.translable_txt.place_id+' '+saswp_localize_data.translable_txt.language+' '+saswp_localize_data.translable_txt.reviews+' '+a+' '+saswp_localize_data.translable_txt.fetch+' x
')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-language-field").val(),c=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),r=s("#reviews_addon_license_key").val(),n=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(c>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=c%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(r||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:n,reviews_api:r,location:t,language:i,blocks:c,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert(saswp_localize_data.translable_txt.enter_place_id),""==p&&alert(saswp_localize_data.translable_txt.enter_api_key),""==r&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var a,t,i,c=""+saswp_localize_data.translable_txt.using_schema+" ";c+=""+saswp_localize_data.translable_txt.do_you_want+" "+saswp_localize_data.translable_txt.sd_update+" "+saswp_localize_data.translable_txt.before_others+"
",c+='",c+='",s(document).on("submit","#saswp-news-letter-form",function(e){e.preventDefault();var a=s(this),t=a.find('input[name="saswp_subscriber_name"]').val(),i=a.find('input[name="saswp_subscriber_email"]').val();website=a.find('input[name="saswp_subscriber_website"]').val(),s.post(saswp_localize_data.ajax_url,{action:"saswp_subscribe_to_news_letter",saswp_security_nonce:saswp_localize_data.saswp_security_nonce,name:t,email:i,website:website},function(e){e?"Some fields are missing."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid email address."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Already subscribed."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):(s("#saswp-news-letter-status").text("You're subscribed!"),s("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var p={content:c,position:{edge:"top",align:"left"}};p=s.extend(p,{buttons:function(s,e){return button=jQuery(''+saswp_localize_data.button1+" "),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){e.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){e.element.pointer("close")},3e3)}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}}),i=function(){s(saswp_localize_data.displayID).pointer(p).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after(''+saswp_localize_data.button2+" "),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"})}))},p.position&&p.position.defer_loading?s(window).bind("load.wp-pointers",i):i()}s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);if(t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),"premium_features"!=t||"yes"!=jQuery(this).attr("data-extmgr"))return s(".saswp-settings-form-wrap").find(".saswp-"+t).siblings().hide(),s(".saswp-settings-form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1;window.location.href="edit.php?post_type=saswp&page=saswp-extension-manager"}),s(".saswp-schame-type-select").select2(),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"ScholarlyArticle"==a||"Blogposting"==a||"NewsArticle"==a||"AnalysisNewsArticle"==a||"AskPublicNewsArticle"==a||"BackgroundNewsArticle"==a||"OpinionNewsArticle"==a||"ReportageNewsArticle"==a||"ReviewNewsArticle"==a||"WebPage"==a||"ItemPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s("#saswp_location_meta_box").removeClass("saswp_hide"),s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),("Review"==a||"ReviewNewsArticle"==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(),"BreadCrumbs"==a?s(".saswp-schema-modify-section").hide():s(".saswp-schema-modify-section").show(),"FAQ"==a?s(".saswp-enable-faq-markup-class").parent().parent().show():s(".saswp-enable-faq-markup-class").parent().parent().hide(),"Organization"==a&&(s(".saswp-organization-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"WebPage"==a&&(s(".saswp-webpage-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a||"Service"==a||"qanda"==a||"Course"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").select2(),s(".saswp-local-sub-type-2").select2(),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"ScholarlyArticle"==a||"Blogposting"==a||"NewsArticle"==a||"AnalysisNewsArticle"==a||"AskPublicNewsArticle"==a||"BackgroundNewsArticle"==a||"OpinionNewsArticle"==a||"ReportageNewsArticle"==a||"ReviewNewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1),s("#saswp_location_meta_box").removeClass("saswp_hide")),("Review"==a||"ReviewNewsArticle"==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)),"BreadCrumbs"==a?s(".saswp-schema-modify-section").hide():s(".saswp-schema-modify-section").show(),"FAQ"==a?s(".saswp-enable-faq-markup-class").parent().parent().show():s(".saswp-enable-faq-markup-class").parent().parent().hide(),"Organization"==a&&(s(".saswp-organization-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"WebPage"==a&&(s(".saswp-webpage-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpzoom-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpzoom").val(1):s("#saswp-wpzoom").val(0);break;case"saswp-yotpo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yotpo").val(1):s("#saswp-yotpo").val(0);break;case"saswp-ryviu-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ryviu").val(1):s("#saswp-ryviu").val(0);break;case"saswp-ultimate-blocks-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimate-blocks").val(1):s("#saswp-ultimate-blocks").val(0);break;case"saswp-starsrating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-starsrating").val(1):s("#saswp-starsrating").val(0);break;case"saswp-wptastyrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wptastyrecipe").val(1):s("#saswp-wptastyrecipe").val(0);break;case"saswp-recipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-recipress").val(1):s("#saswp-recipress").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp-for-cschema-checkbox":s(this).is(":checked")?s("#saswp-for-cschema").val(1):s("#saswp-for-cschema").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_list_type_class").parent().parent().show(),"ItemList"==s(".saswp_archive_list_type_class").val()&&s(".saswp_archive_schema_type_class").parent().parent().hide()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide(),s(".saswp_archive_list_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_remove_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_remove_cat").val(1):s("#saswp_breadcrumb_remove_cat").val(0);break;case"saswp_breadcrumb_exclude_shop_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_exclude_shop").val(1):s("#saswp_breadcrumb_exclude_shop").val(0);break;case"saswp_breadcrumb_include_parent_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_include_parent_cat").val(1):s("#saswp_breadcrumb_include_parent_cat").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?(s("#saswp_breadcrumb_schema").val(1),s("#saswp_breadcrumb_remove_cat").parent().parent().show(),s("#saswp_breadcrumb_exclude_shop").parent().parent().show(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().show(),s("#saswp_breadcrumb_home_page_title_text").parent().parent().show()):(s("#saswp_breadcrumb_schema").val(0),s("#saswp_breadcrumb_remove_cat").parent().parent().hide(),s("#saswp_breadcrumb_exclude_shop").parent().parent().hide(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().hide(),s("#saswp_breadcrumb_home_page_title_text").parent().parent().hide());break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp_remove_version_tag_checkbox":s(this).is(":checked")?s("#saswp_remove_version_tag").val(1):s("#saswp_remove_version_tag").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-rating-box-app-fields").removeClass("saswp_hide"),s("#saswp-rtb-link").removeClass("saswp_hide")):(s("#saswp-review-module").val(0),s(".saswp-rating-box-app-fields").addClass("saswp_hide"),s("#saswp-rtb-link").addClass("saswp_hide"));break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s(this).parent().parent().next().removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(this).parent().parent().next().addClass("saswp_hide"),s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-rmprating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rmprating").val(1):s("#saswp-rmprating").val(0);break;case"saswp-ratingform-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratingform").val(1):s("#saswp-ratingform").val(0);break;case"saswp-wpdiscuz-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpdiscuz").val(1):s("#saswp-wpdiscuz").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yet-another-stars-rating").val(1):s("#saswp-yet-another-stars-rating").val(0);break;case"saswp-simple-author-box-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simple-author-box").val(1):s("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp_woocommerce_archive_checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp_woocommerce_archive").val(1),s(".saswp_woocommerce_archive_list_type_class").parent().parent().show()):(s("#saswp_woocommerce_archive").val(0),s(".saswp_woocommerce_archive_list_type_class").parent().parent().hide());break;case"saswp-wpecommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpecommerce").val(1):s("#saswp-wpecommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-single-price-product-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-single-price-product").val(1),s(".saswp-single-price-opt").parent().parent().show()):(s("#saswp-single-price-product").val(0),s(".saswp-single-price-opt").parent().parent().hide());break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-enfold-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-enfold").val(1):s("#saswp-enfold").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-theme-reviews").val(1):s("#saswp-wp-theme-reviews").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wpqa-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpqa").val(1):s("#saswp-wpqa").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-polylang-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-polylang").val(1):s("#saswp-polylang").val(0);break;case"saswp-autolistings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-autolistings").val(1):s("#saswp-autolistings").val(0);break;case"saswp-wpml-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpml").val(1):s("#saswp-wpml").val(0);break;case"saswp-metatagmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-metatagmanager").val(1):s("#saswp-metatagmanager").val(0);break;case"saswp-slimseo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-slimseo").val(1):s("#saswp-slimseo").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-video-thumbnails-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-video-thumbnails").val(1):s("#saswp-video-thumbnails").val(0);break;case"saswp-featured-video-plus-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-featured-video-plus").val(1):s("#saswp-featured-video-plus").val(0);break;case"saswp-wp-product-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-product-review").val(1):s("#saswp-wp-product-review").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-ratency-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratency").val(1):s("#saswp-ratency").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-myhome").val(1):s("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-5").val(1):s("#saswp-realestate-5").val(0);break;case"saswp-realestate-7-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-7").val(1):s("#saswp-realestate-7").val(0);break;case"saswp-stamped-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stamped").val(1):s("#saswp-stamped").val(0);break;case"saswp-sabaidiscuss-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-sabaidiscuss").val(1):s("#saswp-sabaidiscuss").val(0);break;case"saswp-geodirectory-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-geodirectory").val(1):s("#saswp-geodirectory").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-classipress").val(1):s("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wplms").val(1):s("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-senseilms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-senseilms").val(1):s("#saswp-senseilms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-wp-event-solution-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-solution").val(1):s("#saswp-wp-event-solution").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-event-prime-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-prime").val(1):s("#saswp-event-prime").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-woo-discount-rules-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-discount-rules").val(1):s("#saswp-woo-discount-rules").val(0);break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking-main").val(1),s("#saswp-woocommerce-booking").val(1)):(s("#saswp-woocommerce-booking-main").val(0),s("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce-membership").val(1):s("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":s(this).is(":checked")?s("#saswp-defragment").val(1):s("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-shopper-approved-review").val(1),s(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-shopper-approved-review").val(0),s(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":s(this).is(":checked")?(s("#saswp-google-review").val(1),s("#saswp-google-rv-free-checkbox").length?(s("#saswp-google-review-free").parent().parent().show(),s("#saswp-google-rv-free-checkbox").is(":checked")?s("#saswp_google_place_api_key").parent().parent().show():s("#saswp_google_place_api_key").parent().parent().hide()):s("#saswp_google_place_api_key").parent().parent().show(),s(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-google-review").val(0),s("#saswp_google_place_api_key").parent().parent().hide(),s(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),s("#saswp-google-rv-free-checkbox").length&&s("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":s("#saswp-google-review-checkbox").is(":checked")&&s(this).is(":checked")?(s("#saswp-google-review-free").val(1),s("#saswp_google_place_api_key").parent().parent().show()):(s("#saswp-google-review-free").val(0),s("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":s(this).is(":checked")?s("#saswp-markup-footer").val(1):s("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":s(this).is(":checked")?s("#saswp-pretty-print").val(1):s("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-full-heading-checkbox":s(this).is(":checked")?s("#saswp-full-heading").val(1):s("#saswp-full-heading").val(0);break;case"saswp-truncate-product-description-checkbox":s(this).is(":checked")?s("#saswp-truncate-product-description").val(1):s("#saswp-truncate-product-description").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-default-videoobject-checkbox":s(this).is(":checked")?s("#saswp-default-videoobject").val(1):s("#saswp-default-videoobject").val(0);break;case"saswp-image-resizing-checkbox":s(this).is(":checked")?s("#saswp-image-resizing").val(1):s("#saswp-image-resizing").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-brb-checkbox":s(this).is(":checked")?s("#saswp-brb").val(1):s("#saswp-brb").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-bunyadamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bunyadamp").val(1):s("#saswp-bunyadamp").val(0);break;case"saswp-wpreviewslider-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewslider").val(1):s("#saswp-wpreviewslider").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-cmp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cmp").val(1):s("#saswp-cmp").val(0);break;case"saswp-wpreviewpro-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewpro").val(1):s("#saswp-wpreviewpro").val(0);break;case"saswp-webstories-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webstories").val(1):s("#saswp-webstories").val(0);break;case"saswp-resized-image-folder-checkbox":var t=s("#saswp-resized-image-folder-checkbox");s(this).is(":checked")?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_create_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s("#saswp-resized-image-folder").val(1),s("#saswp-resized-image-folder-checkbox").after('Clear Images ')):(t.prop("checked",!1),t.next().text(e.message),t.next().css("color","red"))},error:function(s){t.prop("checked",!1),t.next().text(s),t.next().css("color","red")}}):(s("#saswp-resized-image-folder").val(0),s(".saswp-clear-images").remove());break;case"saswp-elementor-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-elementor").val(1):s("#saswp-elementor").val(0);break;case"saswp-rannarecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rannarecipe").val(1):s("#saswp-rannarecipe").val(0);break;case"saswp-jetpackrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jetpackrecipe").val(1):s("#saswp-jetpackrecipe").val(0);break;case"saswp-quickandeasyfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-quickandeasyfaq").val(1):s("#saswp-quickandeasyfaq").val(0);break;case"saswp-ultimatefaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatefaqs").val(1):s("#saswp-ultimatefaqs").val(0);break;case"saswp-ultimatemember-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatemember").val(1):s("#saswp-ultimatemember").val(0);break;case"saswp-showcaseidx-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-showcaseidx").val(1):s("#saswp-showcaseidx").val(0);break;case"saswp-arconixfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-arconixfaq").val(1):s("#saswp-arconixfaq").val(0);break;case"saswp-faqconcertina-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqconcertina").val(1):s("#saswp-faqconcertina").val(0);break;case"saswp-wpjobmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobmanager").val(1):s("#saswp-wpjobmanager").val(0);break;case"saswp-simplejobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simplejobboard").val(1):s("#saswp-simplejobboard").val(0);break;case"saswp-wpjobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobboard").val(1):s("#saswp-wpjobboard").val(0);break;case"saswp-wpjobopenings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobopenings").val(1):s("#saswp-wpjobopenings").val(0);break;case"saswp-webfaq10-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webfaq10").val(1):s("#saswp-webfaq10").val(0);break;case"saswp-wpfaqschemamarkup-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpfaqschemamarkup").val(1):s("#saswp-wpfaqschemamarkup").val(0);break;case"saswp-faqschemaforpost-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqschemaforpost").val(1):s("#saswp-faqschemaforpost").val(0);break;case"saswp-masteraccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-masteraccordion").val(1):s("#saswp-masteraccordion").val(0);break;case"saswp-easyfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyfaqs").val(1):s("#saswp-easyfaqs").val(0);break;case"saswp-accordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordion").val(1):s("#saswp-accordion").val(0);break;case"saswp-html5responsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-html5responsivefaq").val(1):s("#saswp-html5responsivefaq").val(0);break;case"saswp-wpresponsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresponsivefaq").val(1):s("#saswp-wpresponsivefaq").val(0);break;case"saswp-jolifaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jolifaq").val(1):s("#saswp-jolifaq").val(0);break;case"saswp-ameliabooking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ameliabooking").val(1):s("#saswp-ameliabooking").val(0);break;case"saswp-easyaccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyaccordion").val(1):s("#saswp-easyaccordion").val(0);break;case"saswp-helpiefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-helpiefaq").val(1):s("#saswp-helpiefaq").val(0);break;case"saswp-mooberrybm-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mooberrybm").val(1):s("#saswp-mooberrybm").val(0);break;case"saswp-novelist-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-novelist").val(1):s("#saswp-novelist").val(0);break;case"saswp-accordionfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordionfaq").val(1):s("#saswp-accordionfaq").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-schemaforfaqs").val(1):s("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-customer-reviews").val(1):s("#saswp-wp-customer-reviews").val(0);break;case"saswp-total-recipe-generator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-total-recipe-generator").val(1):s("#saswp-total-recipe-generator").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-timetable-event-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-timetable-event").val(1):s("#saswp-timetable-event").val(0);break;case"saswp-xo-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-xo-event-calendar").val(1):s("#saswp-xo-event-calendar").val(0);break;case"saswp-vs-event-list-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-vs-event-list").val(1):s("#saswp-vs-event-list").val(0);break;case"saswp-calendarize-it-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-calendarize-it").val(1):s("#saswp-calendarize-it").val(0);break;case"saswp-events-schedule-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-schedule").val(1):s("#saswp-events-schedule").val(0);break;case"saswp-woo-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-event-manager").val(1):s("#saswp-woo-event-manager").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stachethemes-event-calendar").val(1):s("#saswp-stachethemes-event-calendar").val(0);break;case"saswp-all-in-one-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-all-in-one-event-calendar").val(1):s("#saswp-all-in-one-event-calendar").val(0);break;case"saswp-event-on-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-on").val(1):s("#saswp-event-on").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0);break;case"saswp-publish-press-authors-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-publish-press-authors").val(1):s("#saswp-publish-press-authors").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var c="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(c='Image size is smaller than recommended size
'),s(".saswp_image_div_"+t).html(''+c),"saswp_collection_image"==t&&(s(".saswp_image_div_"+t).html(' '+c),s(".saswp-r1-aimg").each(function(a,t){s(this).children("img").attr("src");0==s(this).children("img").attr("data-is-default-img")&&s(this).children("img").attr("src",e.url)}),s(".saswp-rc-a").each(function(a,t){s(this).children("img").attr("src");0==s(this).children("img").attr("data-is-default-img")&&s(this).children("img").attr("src",e.url)}))}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-post-specific-wrapper[data-id="+a+"] .saswp-post-specific-setting").after(e),s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){t.removeClass("updating-message"),"t"==e.status?(s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+a).val(),c=s(this).attr("data-schema-name");if(s(this).is(":checked")){var p=0;s("."+c).empty(),s("."+c).text("Enable "+c+" on this page"),s(".custom").empty(),s(".custom").text("Enable custom schema on this page"),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"),s(".custom").empty(),s(".custom").text("Disable custom schema on this page"),1==i?(s("."+c).empty(),s("."+c).text("Disable "+c+" on this page"),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s("."+c).empty(),s("."+c).text("Disable "+c+" on this page"),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"));var 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,req_from:saswp_localize_data.req_from,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),!0==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),c=s("#"+i+"_addon_license_key").val();t&&i&&c?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status&&e.days_remaining<0?(s("span.saswp_inactive_status_reviews").text("Expired"),s("span.saswp_inactive_status_reviews").css({color:"red","font-weight":"400"})):"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s("span.addon-activated_reviews").css({color:"green","margin-left":"8px","font-weight":"400"}),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.inactive_status_"+i).text("Active"),s("span.inactive_status_"+i).css({color:"green","margin-left":"8px","font-weight":"400"}),s("span.inactive_status_"+i).removeClass("inactive_status_"+i).addClass("addon-activated_"+i)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.addon-activated_"+i).text("Inactive"),s("span.addon-activated_"+i).css("color","#bebfc0"),s("span.addon-activated_"+i).removeClass("addon-activated_"+i).addClass("inactive_status_"+i),s("span.saswp-limit-span").css("display","none")),a.removeClass("updating-message"),s(".saswp-note-p").text(e.message)},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),jQuery(document).on("click",".user_refresh_single_addon",function(s){var e=jQuery(this);s.preventDefault();var a=e.attr("add-on"),t=e.attr("remaining_days_org"),i=jQuery("#"+a+"_addon_license_key").val();document.getElementById("user_refresh_"+a).classList.add("spin");var c=new Date,p=function s(e){for(var a=e+"=",t=document.cookie.split(";"),i=0;i1||o<1?(document.cookie="saswp_addon_refresh_check="+c,jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:i,license_status:"active",add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){jQuery("#"+a+"_addon_license_key_status").val(s.status),document.getElementById("user_refresh_"+a).classList.remove("spin"),e.removeClass("updating-message")},error:function(s){console.log(s)}})):(setTimeout(function(){jQuery(".dashicons").removeClass("spin")},0),alert("Please try after "+(p=Math.abs(p.getDate()+1)+"/"+Math.abs(p.getMonth()+1)+"/"+p.getFullYear()+" "+p.getHours()+":"+p.getMinutes()+":"+p.getSeconds())))});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#refresh_license_icon_top-").trigger("click")},0),jQuery(document).on("click","#refresh_license_icon_top-",function(e){document.getElementById("refresh_license_icon_top").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_license_icon_top").classList.remove("spin");var a=e.days_remaining;a>=0&&a<=7&&s("span.saswp-addon-alert").text("expiring in "+a+" days ")}else document.getElementsByClassName("saswp-addon-alert")[0].style.color="green",document.getElementsByClassName("renewal-license")[0].style.display="none",document.getElementById("refresh_license_icon_top").classList.remove("spin"),s("span.pro_warning").css("display","none")}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#user_refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#user_refresh_expired_addon-",function(e){document.getElementById("user_refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("user_refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?(s("span#exp").text("Expired"),location.reload()):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message"))});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");setTimeout(function(){jQuery("#refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#refresh_expired_addon-",function(e){document.getElementById("refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?s("span#exp").text("Expired"):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_expired_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();""!=s.trim(a)&&i&&""!=s.trim(t)&&!0==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"),!1==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='Sub Business Type ';i+='',s.each(e.result,function(s,e){i+=''+e+" "}),i+=" ",i+=" ",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();var a='';a+="Review Item Feature ",a+=' ',a+="Rating ",a+=' ',a+='x ',a+=" ",s(".saswp-review-item-list-table").append(a)}),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||alert(s.msg),setTimeout(function(){location.reload()},1e3),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review(),saswp_enable_rating_automate()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide();var o=window.location.hash;if("#saswp-default-container"==o?s(".saswp-global-container:eq(2)").show():"#saswp-knowledge-container"==o?s(".saswp-global-container:eq(1)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();(-1!=t.indexOf("_image")||-1!=t.indexOf("_logo"))&&(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),c=s(this).attr("div_type"),p=s(this).attr("itemlist_sub_type"),r=s("#saswp_specific_"+t).find(".saswp-"+c+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div:nth-child("+r+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,c,t,i+"_",p)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-table-close-new",function(){s(this).closest(".saswp-dynamic-properties").remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),c="",p=a.toLowerCase()+"_"+i,r="saswp_fixed_image["+i+"]";"manual_text"==t?(c+=' ',c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(c+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,c+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2())},"json"):"custom_field"==t?(c+='',c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"fixed_image"==t?(c+="",c+="",c+=' ',c+=' ',c+=' ',c+=' ',c+='',c+="
",c+=" ",c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):(c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var c=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:c,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_enable_rating_automate(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('X ')}),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){let l="",w="saswp_hide";saswp_localize_data.saswp_enable_gcaptcha&&1==saswp_localize_data.saswp_enable_gcaptcha&&(l="checked",w="");var d='",jQuery(jQuery(".wrap")).prepend(d)}jQuery(document).on("click",".saswp-clear-images",function(e){e.preventDefault();var a=s(this);!0==confirm("Are you sure? It will remove all the resized images")&&(a.addClass("updating-message"),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_clear_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){a.removeClass("updating-message"),"t"!=s.status&&alert("something went wrong")},error:function(s){console.log(s)}}))}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("Settings "),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({spacing:"5px",rtl:saswp_localize_data.is_rtl,rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().next().val(e)}}).on("rateyo.change",function(e,a){var t=a.rating;s(this).next().text(t)}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('Invalid Phone Number ')}),saswpCollectionSlider(),s(document).on("click",".saswp-add-rv-btn",function(){s(".saswp-dynamic-platforms").toggle()}),s(".saswp-rmv-coll-rv").on("click",function(){if(rmv_boolean=!rmv_boolean,saswp_on_collection_design_change(),jQuery(jQuery(".saswp-add-dynamic-section")).remove(),rmv_boolean){var s="";s+='',s+='
',s+=' ',s+="
",s+='
',s+='Choose Platform '+jQuery("#saswp-plaftorm-list").html()+" ",s+="
",s+="
",jQuery(jQuery(".saswp-collection-preview")[0]).after(s)}}),s(document).on("change","#saswp_dynamic_platforms",function(){var e=s(this).val(),a="";a+='',a+=" ",a+='Add ',s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after(a);var t=ajaxurl+"?action=saswp_add_reviews_to_select2&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&platform_id="+e;s("#saswp_dynamic_reviews_list").select2({ajax:{url:t,dataType:"json",processResults:function(s){if(s.status)return{results:s.message}}}})}),s(document).on("click",".saswp-add-single-rv",function(e){e.preventDefault();var a=s("#saswp_dynamic_reviews_list").val(),t=s("#saswp_dynamic_platforms").val();a&&saswp_get_collection_data(null,t,null,a,!0)}),s(document).on("click",".saswp-remove-coll-rv",function(){var e=s(this).attr("data-id"),a=s(this).attr("platform-id");if(a){var t=saswp_collection[a].filter(function(s){return s.saswp_review_id!=e});saswp_collection[a]=t,saswp_on_collection_design_change()}}),s(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val(),a=s(".saswp-collection-sorting").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),s(".saswp-rmv-coll-rv").hide(),s(".saswp-add-dynamic-section").hide(),"grid"==e&&(s(".saswp-grid-options").removeClass("saswp_hide"),s(".saswp-rmv-coll-rv").show(),s(".saswp-add-dynamic-section").show(),s(".saswp-coll-review-wrapper").removeClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"gallery"==e&&(s(".saswp-slider-options").removeClass("saswp_hide"),s(".saswp-coll-review-wrapper").removeClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px"),s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"popup"==e&&(s(".saswp-collection-lp").css("height","31px"),s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"badge"==e&&(s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").removeClass("saswp_hide")),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide"),"recent"==a?(s("#saswp_collection_specific_rating").parent().parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")):(s("#saswp_collection_specific_rating").parent().parent().addClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();let c=s("#saswp-review-platform-places").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a,null,null,c)):alert("Enter Count")});var h=s("#saswp_total_reviews_list").val();h&&saswp_get_collection_data(null,null,null,null,h);let v=s("#saswp-plaftorm-list").find("option:first-child").val();saswp_get_platform_place_list(v),(a=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",a.innerHTML="Copied!",document.body.appendChild(a);var m=document.getElementById("saswp-motivatebox");m&&m.addEventListener("mouseup",function(s){var e,i,c,p,r,s=s||event,n=s.target||s.srcElement;"motivate"==n.className&&(e=n,(i=document.createRange()).selectNodeContents(e),(c=window.getSelection()).removeAllRanges(),c.addRange(i),function s(){var e;try{e=document.execCommand("copy")}catch(a){e=!1}return e}()&&(r=(p=s)||event,clearTimeout(t),a.style.left=r.pageX-10+"px",a.style.top=r.pageY+15+"px",a.style.opacity=1,t=setTimeout(function(){a.style.opacity=0},500)))},!1),s(document).on("change","#saswp-plaftorm-list",function(e){e.preventDefault();let a=s(this).val();saswp_get_platform_place_list(a)}),s(document).on("change",".saswp_archive_list_type_class",function(e){e.preventDefault(),"ItemList"==s(this).val()?s(".saswp_archive_schema_type_class").parent().parent().hide():s(".saswp_archive_schema_type_class").parent().parent().show()}),s(document).on("change",".saswp-custom-fields-name, .saswp-custom-meta-list",function(e){e.preventDefault();let a=s(".saswp-custom-fields-name").val(),t=s(".saswp-custom-meta-list").val(),i=s(this).attr("class");if("saswp-custom-fields-name"==i&&(a=s(this).val(),t=s(this).parent().next().find("select").val()),"saswp-custom-meta-list"==i&&(t=s(this).val(),a=s(this).closest("tr").find(".saswp-custom-fields-name").val()),"saswp_faq_main_entity"==a&&"saswp_repeater_mapping"==t){let c=s(".saswp-itemlist-item-type-list").attr("data-id");0==s(".saswp-add-faq-repeat-que").length&&s(this).closest("tr").after('Add Faq Question '),0==s(".saswp-faq-repeater-tr").length&&s(this).closest("tr").after(' ')}else{let p=0;s(".saswp-custom-meta-list").each(function(e){"saswp_repeater_mapping"==s(this).val()&&(p=1)}),0==p&&(s(".saswp-faq-repeater-tr").remove(),s(".saswp-faq-question").remove(),s(".saswp-add-faq-repeat-que").remove())}}),s("#saswp-rating-module-css-app").change(function(e){s(this).is(":checked")?s(".saswp-rbcc-fields").removeClass("saswp_hide"):s(".saswp-rbcc-fields").addClass("saswp_hide")}).change(),s(document).on("click","#saswp-rtb-link",function(e){s("#saswp-appearance-modal").fadeIn()}),s(document).on("click","#saswp-appearance-modal-close",function(e){s("#saswp-appearance-modal").fadeOut()}),s("#saswp-rbcc-review-bg-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-preview-head").css("background",t),s(".saswp-rbcc-rvs span").css("background",t)}}),s("#saswp-rbcc-review-f-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-preview-head").css("color",t),s(".saswp-rbcc-rvs span").css("color",t)}}),s("#saswp-rbcc-review-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-review-f-unit").val();a<=0&&(a=15),s(".saswp-rbcc-preview-head, .saswp-rbcc-rvs span").css("font-size",a+t)}),s("#saswp-rbcc-review-f-unit").change(function(e){var a=s("#saswp-rbcc-review-f-size").val(),t=s(this).val();s(".saswp-rbcc-preview-head, .saswp-rbcc-rvs span").css("font-size",a+t)}).change(),s("#saswp-rbcc-if-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-rif").css("color",t)}}),s("#saswp-rbcc-if-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-if-f-unit").val();a<=0&&(a=15),s(".saswp-rbcc-rif").css("font-size",a+t)}),s("#saswp-rbcc-if-f-unit").change(function(e){var a=s("#saswp-rbcc-if-f-size").val(),t=s(this).val();s(".saswp-rbcc-rif").css("font-size",a+t)}).change(),s("#saswp-rbcc-stars-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp_star_color .saswp_star").attr("stop-color",t)}}),s("#saswp-rbcc-stars-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val();a<=0&&(a=18),s(".saswp-rvw-str .saswp_star_color svg").css("width",a+"px")}),s("#saswp-rbcc-ar-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-rvar").css("color",t)}}),s("#saswp-rbcc-ar-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-ar-f-unit").val();a<=0&&(a=48),s(".saswp-rbcc-rvar").css("font-size",a+t)}),s("#saswp-rbcc-ar-f-unit").change(function(e){var a=s("#saswp-rbcc-ar-f-size").val(),t=s(this).val();s(".saswp-rbcc-rvar").css("font-size",a+t)}).change(),s(document).on("change","#saswp_review_custom_chk_box",function(e){s(this).is(":checked")?s("#saswp-review-cccc").show():s("#saswp-review-cccc").hide()}),s(document).on("click","#saswp-rbcc-reset",function(e){e.preventDefault(),d_css={background:"#000",color:"#fff","font-size":"15px"},s(".saswp-rbcc-preview-head").css(d_css),s(".saswp-rbcc-rvs span").css(d_css),d_css={color:"#000","font-size":"18px"},s(".saswp-rbcc-rif").css(d_css),s(".saswp_star_color .saswp_star").attr("stop-color","#000"),s(".saswp-rvw-str .saswp_star_color svg").css("width","18px"),d_css={color:"#000","font-size":"48px"},s(".saswp-rbcc-rvar").css(d_css),bg_color="#000",font_color="#fff",s("#saswp-rbcc-review-bg-color, #saswp-rbcc-if-color, #saswp-rbcc-stars-color, #saswp-rbcc-ar-color").val(bg_color),s("#saswp-rbcc-review-f-color").val(font_color),s("#saswp-rbcc-review-f-size").val("15"),s("#saswp-rbcc-review-f-unit").val("px"),s("#saswp-rbcc-if-f-size").val("18"),s("#saswp-rbcc-if-f-unit").val("px"),s("#saswp-rbcc-ar-f-size").val("48"),s("#saswp-rbcc-ar-f-unit").val("px"),s("#saswp-rbcc-stars-f-size").val("18"),s("#saswp-rbcc-stars-f-unit").val("px"),s(".saswp-rbcc-font-color .wp-color-result").css("background-color","#fff"),s(".saswp-rbcc-bg-color .wp-color-result").css("background-color",bg_color),s(".saswp-rbcc-bg-color .wp-color-result").css("color",font_color),s(".saswp-rbcc-dc .wp-color-result").css("background-color",bg_color)}),s(document).on("change","#saswp_enable_gcaptcha",function(e){s(this).is(":checked")?s("#saswp-gkey-captcha-wrapper").removeClass("saswp_hide"):s("#saswp-gkey-captcha-wrapper").addClass("saswp_hide")}),s(document).on("click","#saswp-ar-form-btn",function(e){let a=s("#saswp_g_site_key").val(),t=s("#saswp_g_secret_key").val(),i=0,c={};c=s("#saswp_enable_gcaptcha").is(":checked")?{action:"saswp_update_google_captch_keys",captcha_enable:i=1,gsitekey:a,gsecretkey:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce}:{action:"saswp_update_google_captch_keys",captcha_enable:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},s.ajax({url:ajaxurl,method:"POST",data:c,success:function(s){location.reload()}})})});
\ No newline at end of file
+var saswp_attached_rv=[],saswp_attached_col=[],rmv_boolean=!1,rmv_html="";jQuery(document).ready(function(s){jQuery(".saswpforwp-colorpicker").wpColorPicker(),jQuery(".saswp-onclick-show").hide(),"local_business"==s("#schema_type").find(":selected").val()&&s(document).ready(function(){s(".saswp-business-type-tr").show()});var e=s("#saswp_breadcrumb_home_page_title").val();if(s("#saswp_breadcrumb_home_page_title_text").val(e),s("#saswp_breadcrumb_home_page_title_text").bind("keydown keyup",function(){var e=s(this).val();s("#saswp_breadcrumb_home_page_title").val(e)}),s(document).on("click","#saswp_loc_display_on_front",function(){s(this).is(":checked")?s(".saswp-front-location-inst").removeClass("saswp_hide"):s(".saswp-front-location-inst").addClass("saswp_hide")}),s(document).on("change",".saswp-collection-where",function(){s(this);var e,a=s(this).val();a&&(e=a)&&s.ajax({url:ajaxurl,method:"GET",data:{action:"saswp_get_select2_data",type:e,q:"",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},beforeSend:function(){},success:function(e){if(e){var a="";s.each(e,function(s,e){a+=''+e.text+" "}),s(".saswp-collection-where-data").html(""),s(".saswp-collection-where-data").append(a),saswp_select2()}},error:function(s){console.log("Failed Ajax Request"),console.log(s)}})}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?(s(".saswp-coll-where").addClass("saswp_hide"),s("#saswp-motivatebox").css("display","block")):(s(".saswp-coll-where").removeClass("saswp_hide"),s("#saswp-motivatebox").css("display","none"))}).change(),s(document).on("click",".saswp-dismiss-notices",function(){var e=s(this),a=s(this).attr("notice-type");a&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_dismiss_notices",notice_type:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status&&e.parent().parent().hide()},error:function(s){console.log(s)}})}),saswp_select2(),s(".saswp-upgrade-to-pro").parent().attr({href:"https://structured-data-for-wp.com/pricing/",target:"_blank"}),s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show(saswp_localize_data.translable_txt.attach_review,"#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e=null;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,c="";t>0&&(c+=t+" Reviews, "),i>0&&(c+=i+" Collection"),c||(c=0),s(".saswp-attached-rv-count").text("Attached "+c),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),i>=10&&s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"),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?' ':' ',e.preventDefault();var t="";(t+=''+saswp_localize_data.translable_txt.place_id+' '+saswp_localize_data.translable_txt.language+' '+saswp_localize_data.translable_txt.reviews+' '+a+' '+saswp_localize_data.translable_txt.fetch+' x
')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-language-field").val(),c=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),r=s("#reviews_addon_license_key").val(),n=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(c>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=c%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(r||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:n,reviews_api:r,location:t,language:i,blocks:c,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert(saswp_localize_data.translable_txt.enter_place_id),""==p&&alert(saswp_localize_data.translable_txt.enter_api_key),""==r&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var a,t,i,c=""+saswp_localize_data.translable_txt.using_schema+" ";c+=""+saswp_localize_data.translable_txt.do_you_want+" "+saswp_localize_data.translable_txt.sd_update+" "+saswp_localize_data.translable_txt.before_others+"
",c+='",c+='",s(document).on("submit","#saswp-news-letter-form",function(e){e.preventDefault();var a=s(this),t=a.find('input[name="saswp_subscriber_name"]').val(),i=a.find('input[name="saswp_subscriber_email"]').val();website=a.find('input[name="saswp_subscriber_website"]').val(),s.post(saswp_localize_data.ajax_url,{action:"saswp_subscribe_to_news_letter",saswp_security_nonce:saswp_localize_data.saswp_security_nonce,name:t,email:i,website:website},function(e){e?"Some fields are missing."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid email address."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Already subscribed."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):(s("#saswp-news-letter-status").text("You're subscribed!"),s("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var p={content:c,position:{edge:"top",align:"left"}};p=s.extend(p,{buttons:function(s,e){return button=jQuery(''+saswp_localize_data.button1+" "),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){e.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){e.element.pointer("close")},3e3)}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}}),i=function(){s(saswp_localize_data.displayID).pointer(p).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after(''+saswp_localize_data.button2+" "),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"})}))},p.position&&p.position.defer_loading?s(window).bind("load.wp-pointers",i):i()}s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);if(t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),"premium_features"!=t||"yes"!=jQuery(this).attr("data-extmgr"))return s(".saswp-settings-form-wrap").find(".saswp-"+t).siblings().hide(),s(".saswp-settings-form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1;window.location.href="edit.php?post_type=saswp&page=saswp-extension-manager"}),s(".saswp-schame-type-select").select2(),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"ScholarlyArticle"==a||"Blogposting"==a||"NewsArticle"==a||"AnalysisNewsArticle"==a||"AskPublicNewsArticle"==a||"BackgroundNewsArticle"==a||"OpinionNewsArticle"==a||"ReportageNewsArticle"==a||"ReviewNewsArticle"==a||"WebPage"==a||"ItemPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s("#saswp_location_meta_box").removeClass("saswp_hide"),s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),("Review"==a||"ReviewNewsArticle"==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(),"BreadCrumbs"==a?s(".saswp-schema-modify-section").hide():s(".saswp-schema-modify-section").show(),"FAQ"==a?s(".saswp-enable-faq-markup-class").parent().parent().show():s(".saswp-enable-faq-markup-class").parent().parent().hide(),"Organization"==a&&(s(".saswp-organization-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"WebPage"==a&&(s(".saswp-webpage-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a||"Service"==a||"qanda"==a||"Course"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").select2(),s(".saswp-local-sub-type-2").select2(),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"ScholarlyArticle"==a||"Blogposting"==a||"NewsArticle"==a||"AnalysisNewsArticle"==a||"AskPublicNewsArticle"==a||"BackgroundNewsArticle"==a||"OpinionNewsArticle"==a||"ReportageNewsArticle"==a||"ReviewNewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1),s("#saswp_location_meta_box").removeClass("saswp_hide")),("Review"==a||"ReviewNewsArticle"==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)),"BreadCrumbs"==a?s(".saswp-schema-modify-section").hide():s(".saswp-schema-modify-section").show(),"FAQ"==a?s(".saswp-enable-faq-markup-class").parent().parent().show():s(".saswp-enable-faq-markup-class").parent().parent().hide(),"Organization"==a&&(s(".saswp-organization-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"WebPage"==a&&(s(".saswp-webpage-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpzoom-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpzoom").val(1):s("#saswp-wpzoom").val(0);break;case"saswp-yotpo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yotpo").val(1):s("#saswp-yotpo").val(0);break;case"saswp-ryviu-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ryviu").val(1):s("#saswp-ryviu").val(0);break;case"saswp-ultimate-blocks-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimate-blocks").val(1):s("#saswp-ultimate-blocks").val(0);break;case"saswp-starsrating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-starsrating").val(1):s("#saswp-starsrating").val(0);break;case"saswp-wptastyrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wptastyrecipe").val(1):s("#saswp-wptastyrecipe").val(0);break;case"saswp-recipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-recipress").val(1):s("#saswp-recipress").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp-for-cschema-checkbox":s(this).is(":checked")?s("#saswp-for-cschema").val(1):s("#saswp-for-cschema").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_list_type_class").parent().parent().show(),"ItemList"==s(".saswp_archive_list_type_class").val()&&s(".saswp_archive_schema_type_class").parent().parent().hide()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide(),s(".saswp_archive_list_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_remove_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_remove_cat").val(1):s("#saswp_breadcrumb_remove_cat").val(0);break;case"saswp_breadcrumb_exclude_shop_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_exclude_shop").val(1):s("#saswp_breadcrumb_exclude_shop").val(0);break;case"saswp_breadcrumb_include_parent_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_include_parent_cat").val(1):s("#saswp_breadcrumb_include_parent_cat").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?(s("#saswp_breadcrumb_schema").val(1),s("#saswp_breadcrumb_remove_cat").parent().parent().show(),s("#saswp_breadcrumb_exclude_shop").parent().parent().show(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().show(),s("#saswp_breadcrumb_home_page_title_text").parent().parent().show()):(s("#saswp_breadcrumb_schema").val(0),s("#saswp_breadcrumb_remove_cat").parent().parent().hide(),s("#saswp_breadcrumb_exclude_shop").parent().parent().hide(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().hide(),s("#saswp_breadcrumb_home_page_title_text").parent().parent().hide());break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp_remove_version_tag_checkbox":s(this).is(":checked")?s("#saswp_remove_version_tag").val(1):s("#saswp_remove_version_tag").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-rating-box-app-fields").removeClass("saswp_hide"),s("#saswp-rtb-link").removeClass("saswp_hide")):(s("#saswp-review-module").val(0),s(".saswp-rating-box-app-fields").addClass("saswp_hide"),s("#saswp-rtb-link").addClass("saswp_hide"));break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s(this).parent().parent().next().removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(this).parent().parent().next().addClass("saswp_hide"),s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-rmprating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rmprating").val(1):s("#saswp-rmprating").val(0);break;case"saswp-ratingform-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratingform").val(1):s("#saswp-ratingform").val(0);break;case"saswp-wpdiscuz-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpdiscuz").val(1):s("#saswp-wpdiscuz").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yet-another-stars-rating").val(1):s("#saswp-yet-another-stars-rating").val(0);break;case"saswp-simple-author-box-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simple-author-box").val(1):s("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp_woocommerce_archive_checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp_woocommerce_archive").val(1),s(".saswp_woocommerce_archive_list_type_class").parent().parent().show()):(s("#saswp_woocommerce_archive").val(0),s(".saswp_woocommerce_archive_list_type_class").parent().parent().hide());break;case"saswp-wpecommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpecommerce").val(1):s("#saswp-wpecommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-single-price-product-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-single-price-product").val(1),s(".saswp-single-price-opt").parent().parent().show()):(s("#saswp-single-price-product").val(0),s(".saswp-single-price-opt").parent().parent().hide());break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-enfold-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-enfold").val(1):s("#saswp-enfold").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-theme-reviews").val(1):s("#saswp-wp-theme-reviews").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wpqa-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpqa").val(1):s("#saswp-wpqa").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-polylang-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-polylang").val(1):s("#saswp-polylang").val(0);break;case"saswp-autolistings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-autolistings").val(1):s("#saswp-autolistings").val(0);break;case"saswp-wpml-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpml").val(1):s("#saswp-wpml").val(0);break;case"saswp-metatagmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-metatagmanager").val(1):s("#saswp-metatagmanager").val(0);break;case"saswp-slimseo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-slimseo").val(1):s("#saswp-slimseo").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-video-thumbnails-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-video-thumbnails").val(1):s("#saswp-video-thumbnails").val(0);break;case"saswp-featured-video-plus-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-featured-video-plus").val(1):s("#saswp-featured-video-plus").val(0);break;case"saswp-wp-product-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-product-review").val(1):s("#saswp-wp-product-review").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-ratency-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratency").val(1):s("#saswp-ratency").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-myhome").val(1):s("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-5").val(1):s("#saswp-realestate-5").val(0);break;case"saswp-realestate-7-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-7").val(1):s("#saswp-realestate-7").val(0);break;case"saswp-stamped-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stamped").val(1):s("#saswp-stamped").val(0);break;case"saswp-sabaidiscuss-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-sabaidiscuss").val(1):s("#saswp-sabaidiscuss").val(0);break;case"saswp-geodirectory-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-geodirectory").val(1):s("#saswp-geodirectory").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-classipress").val(1):s("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wplms").val(1):s("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-senseilms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-senseilms").val(1):s("#saswp-senseilms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-wp-event-solution-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-solution").val(1):s("#saswp-wp-event-solution").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-event-prime-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-prime").val(1):s("#saswp-event-prime").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-woo-discount-rules-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-discount-rules").val(1):s("#saswp-woo-discount-rules").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-wpforo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpforo").val(1):s("#saswp-wpforo").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-full-heading-checkbox":s(this).is(":checked")?s("#saswp-full-heading").val(1):s("#saswp-full-heading").val(0);break;case"saswp-truncate-product-description-checkbox":s(this).is(":checked")?s("#saswp-truncate-product-description").val(1):s("#saswp-truncate-product-description").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-default-videoobject-checkbox":s(this).is(":checked")?s("#saswp-default-videoobject").val(1):s("#saswp-default-videoobject").val(0);break;case"saswp-image-resizing-checkbox":s(this).is(":checked")?s("#saswp-image-resizing").val(1):s("#saswp-image-resizing").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-brb-checkbox":s(this).is(":checked")?s("#saswp-brb").val(1):s("#saswp-brb").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-bunyadamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bunyadamp").val(1):s("#saswp-bunyadamp").val(0);break;case"saswp-wpreviewslider-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewslider").val(1):s("#saswp-wpreviewslider").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-cmp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cmp").val(1):s("#saswp-cmp").val(0);break;case"saswp-wpreviewpro-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewpro").val(1):s("#saswp-wpreviewpro").val(0);break;case"saswp-webstories-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webstories").val(1):s("#saswp-webstories").val(0);break;case"saswp-resized-image-folder-checkbox":var t=s("#saswp-resized-image-folder-checkbox");s(this).is(":checked")?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_create_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s("#saswp-resized-image-folder").val(1),s("#saswp-resized-image-folder-checkbox").after('Clear Images ')):(t.prop("checked",!1),t.next().text(e.message),t.next().css("color","red"))},error:function(s){t.prop("checked",!1),t.next().text(s),t.next().css("color","red")}}):(s("#saswp-resized-image-folder").val(0),s(".saswp-clear-images").remove());break;case"saswp-elementor-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-elementor").val(1):s("#saswp-elementor").val(0);break;case"saswp-rannarecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rannarecipe").val(1):s("#saswp-rannarecipe").val(0);break;case"saswp-jetpackrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jetpackrecipe").val(1):s("#saswp-jetpackrecipe").val(0);break;case"saswp-quickandeasyfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-quickandeasyfaq").val(1):s("#saswp-quickandeasyfaq").val(0);break;case"saswp-ultimatefaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatefaqs").val(1):s("#saswp-ultimatefaqs").val(0);break;case"saswp-ultimatemember-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatemember").val(1):s("#saswp-ultimatemember").val(0);break;case"saswp-showcaseidx-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-showcaseidx").val(1):s("#saswp-showcaseidx").val(0);break;case"saswp-arconixfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-arconixfaq").val(1):s("#saswp-arconixfaq").val(0);break;case"saswp-faqconcertina-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqconcertina").val(1):s("#saswp-faqconcertina").val(0);break;case"saswp-wpjobmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobmanager").val(1):s("#saswp-wpjobmanager").val(0);break;case"saswp-simplejobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simplejobboard").val(1):s("#saswp-simplejobboard").val(0);break;case"saswp-wpjobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobboard").val(1):s("#saswp-wpjobboard").val(0);break;case"saswp-wpjobopenings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobopenings").val(1):s("#saswp-wpjobopenings").val(0);break;case"saswp-webfaq10-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webfaq10").val(1):s("#saswp-webfaq10").val(0);break;case"saswp-wpfaqschemamarkup-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpfaqschemamarkup").val(1):s("#saswp-wpfaqschemamarkup").val(0);break;case"saswp-faqschemaforpost-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqschemaforpost").val(1):s("#saswp-faqschemaforpost").val(0);break;case"saswp-masteraccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-masteraccordion").val(1):s("#saswp-masteraccordion").val(0);break;case"saswp-easyfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyfaqs").val(1):s("#saswp-easyfaqs").val(0);break;case"saswp-accordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordion").val(1):s("#saswp-accordion").val(0);break;case"saswp-html5responsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-html5responsivefaq").val(1):s("#saswp-html5responsivefaq").val(0);break;case"saswp-wpresponsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresponsivefaq").val(1):s("#saswp-wpresponsivefaq").val(0);break;case"saswp-jolifaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jolifaq").val(1):s("#saswp-jolifaq").val(0);break;case"saswp-ameliabooking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ameliabooking").val(1):s("#saswp-ameliabooking").val(0);break;case"saswp-easyaccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyaccordion").val(1):s("#saswp-easyaccordion").val(0);break;case"saswp-helpiefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-helpiefaq").val(1):s("#saswp-helpiefaq").val(0);break;case"saswp-mooberrybm-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mooberrybm").val(1):s("#saswp-mooberrybm").val(0);break;case"saswp-novelist-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-novelist").val(1):s("#saswp-novelist").val(0);break;case"saswp-accordionfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordionfaq").val(1):s("#saswp-accordionfaq").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-schemaforfaqs").val(1):s("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-customer-reviews").val(1):s("#saswp-wp-customer-reviews").val(0);break;case"saswp-total-recipe-generator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-total-recipe-generator").val(1):s("#saswp-total-recipe-generator").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-timetable-event-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-timetable-event").val(1):s("#saswp-timetable-event").val(0);break;case"saswp-xo-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-xo-event-calendar").val(1):s("#saswp-xo-event-calendar").val(0);break;case"saswp-vs-event-list-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-vs-event-list").val(1):s("#saswp-vs-event-list").val(0);break;case"saswp-calendarize-it-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-calendarize-it").val(1):s("#saswp-calendarize-it").val(0);break;case"saswp-events-schedule-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-schedule").val(1):s("#saswp-events-schedule").val(0);break;case"saswp-woo-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-event-manager").val(1):s("#saswp-woo-event-manager").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stachethemes-event-calendar").val(1):s("#saswp-stachethemes-event-calendar").val(0);break;case"saswp-all-in-one-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-all-in-one-event-calendar").val(1):s("#saswp-all-in-one-event-calendar").val(0);break;case"saswp-event-on-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-on").val(1):s("#saswp-event-on").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0);break;case"saswp-publish-press-authors-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-publish-press-authors").val(1):s("#saswp-publish-press-authors").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var c="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(c='Image size is smaller than recommended size
'),s(".saswp_image_div_"+t).html(''+c),"saswp_collection_image"==t&&(s(".saswp_image_div_"+t).html(' '+c),s(".saswp-r1-aimg").each(function(a,t){s(this).children("img").attr("src");0==s(this).children("img").attr("data-is-default-img")&&s(this).children("img").attr("src",e.url)}),s(".saswp-rc-a").each(function(a,t){s(this).children("img").attr("src");0==s(this).children("img").attr("data-is-default-img")&&s(this).children("img").attr("src",e.url)}))}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-post-specific-wrapper[data-id="+a+"] .saswp-post-specific-setting").after(e),s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){t.removeClass("updating-message"),"t"==e.status?(s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+a).val(),c=s(this).attr("data-schema-name");if(s(this).is(":checked")){var p=0;s("."+c).empty(),s("."+c).text("Enable "+c+" on this page"),s(".custom").empty(),s(".custom").text("Enable custom schema on this page"),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"),s(".custom").empty(),s(".custom").text("Disable custom schema on this page"),1==i?(s("."+c).empty(),s("."+c).text("Disable "+c+" on this page"),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s("."+c).empty(),s("."+c).text("Disable "+c+" on this page"),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"));var 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,req_from:saswp_localize_data.req_from,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),!0==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),c=s("#"+i+"_addon_license_key").val();t&&i&&c?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status&&e.days_remaining<0?(s("span.saswp_inactive_status_reviews").text("Expired"),s("span.saswp_inactive_status_reviews").css({color:"red","font-weight":"400"})):"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s("span.addon-activated_reviews").css({color:"green","margin-left":"8px","font-weight":"400"}),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.inactive_status_"+i).text("Active"),s("span.inactive_status_"+i).css({color:"green","margin-left":"8px","font-weight":"400"}),s("span.inactive_status_"+i).removeClass("inactive_status_"+i).addClass("addon-activated_"+i)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.addon-activated_"+i).text("Inactive"),s("span.addon-activated_"+i).css("color","#bebfc0"),s("span.addon-activated_"+i).removeClass("addon-activated_"+i).addClass("inactive_status_"+i),s("span.saswp-limit-span").css("display","none")),a.removeClass("updating-message"),s(".saswp-note-p").text(e.message)},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),jQuery(document).on("click",".user_refresh_single_addon",function(s){var e=jQuery(this);s.preventDefault();var a=e.attr("add-on"),t=e.attr("remaining_days_org"),i=jQuery("#"+a+"_addon_license_key").val();document.getElementById("user_refresh_"+a).classList.add("spin");var c=new Date,p=function s(e){for(var a=e+"=",t=document.cookie.split(";"),i=0;i1||o<1?(document.cookie="saswp_addon_refresh_check="+c,jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:i,license_status:"active",add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){jQuery("#"+a+"_addon_license_key_status").val(s.status),document.getElementById("user_refresh_"+a).classList.remove("spin"),e.removeClass("updating-message")},error:function(s){console.log(s)}})):(setTimeout(function(){jQuery(".dashicons").removeClass("spin")},0),alert("Please try after "+(p=Math.abs(p.getDate()+1)+"/"+Math.abs(p.getMonth()+1)+"/"+p.getFullYear()+" "+p.getHours()+":"+p.getMinutes()+":"+p.getSeconds())))});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#refresh_license_icon_top-").trigger("click")},0),jQuery(document).on("click","#refresh_license_icon_top-",function(e){document.getElementById("refresh_license_icon_top").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_license_icon_top").classList.remove("spin");var a=e.days_remaining;a>=0&&a<=7&&s("span.saswp-addon-alert").text("expiring in "+a+" days ")}else document.getElementsByClassName("saswp-addon-alert")[0].style.color="green",document.getElementsByClassName("renewal-license")[0].style.display="none",document.getElementById("refresh_license_icon_top").classList.remove("spin"),s("span.pro_warning").css("display","none")}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#user_refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#user_refresh_expired_addon-",function(e){document.getElementById("user_refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("user_refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?(s("span#exp").text("Expired"),location.reload()):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message"))});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");setTimeout(function(){jQuery("#refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#refresh_expired_addon-",function(e){document.getElementById("refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?s("span#exp").text("Expired"):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_expired_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();""!=s.trim(a)&&i&&""!=s.trim(t)&&!0==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"),!1==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='Sub Business Type ';i+='',s.each(e.result,function(s,e){i+=''+e+" "}),i+=" ",i+=" ",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();var a='';a+="Review Item Feature ",a+=' ',a+="Rating ",a+=' ',a+='x ',a+=" ",s(".saswp-review-item-list-table").append(a)}),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||alert(s.msg),setTimeout(function(){location.reload()},1e3),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review(),saswp_enable_rating_automate()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide();var o=window.location.hash;if("#saswp-default-container"==o?s(".saswp-global-container:eq(2)").show():"#saswp-knowledge-container"==o?s(".saswp-global-container:eq(1)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();(-1!=t.indexOf("_image")||-1!=t.indexOf("_logo"))&&(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),c=s(this).attr("div_type"),p=s(this).attr("itemlist_sub_type"),r=s("#saswp_specific_"+t).find(".saswp-"+c+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div:nth-child("+r+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,c,t,i+"_",p)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-table-close-new",function(){s(this).closest(".saswp-dynamic-properties").remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),c="",p=a.toLowerCase()+"_"+i,r="saswp_fixed_image["+i+"]";"manual_text"==t?(c+=' ',c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(c+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,c+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2())},"json"):"custom_field"==t?(c+='',c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"fixed_image"==t?(c+="",c+="",c+=' ',c+=' ',c+=' ',c+=' ',c+='',c+="
",c+=" ",c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):(c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var c=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:c,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_enable_rating_automate(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('X ')}),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){let l="",w="saswp_hide";saswp_localize_data.saswp_enable_gcaptcha&&1==saswp_localize_data.saswp_enable_gcaptcha&&(l="checked",w="");var d='",jQuery(jQuery(".wrap")).prepend(d)}jQuery(document).on("click",".saswp-clear-images",function(e){e.preventDefault();var a=s(this);!0==confirm("Are you sure? It will remove all the resized images")&&(a.addClass("updating-message"),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_clear_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){a.removeClass("updating-message"),"t"!=s.status&&alert("something went wrong")},error:function(s){console.log(s)}}))}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("Settings "),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({spacing:"5px",rtl:saswp_localize_data.is_rtl,rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().next().val(e)}}).on("rateyo.change",function(e,a){var t=a.rating;s(this).next().text(t)}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('Invalid Phone Number ')}),saswpCollectionSlider(),s(document).on("click",".saswp-add-rv-btn",function(){s(".saswp-dynamic-platforms").toggle()}),s(".saswp-rmv-coll-rv").on("click",function(){if(rmv_boolean=!rmv_boolean,saswp_on_collection_design_change(),jQuery(jQuery(".saswp-add-dynamic-section")).remove(),rmv_boolean){var s="";s+='',s+='
',s+=' ',s+="
",s+='
',s+='Choose Platform '+jQuery("#saswp-plaftorm-list").html()+" ",s+="
",s+="
",jQuery(jQuery(".saswp-collection-preview")[0]).after(s)}}),s(document).on("change","#saswp_dynamic_platforms",function(){var e=s(this).val(),a="";a+='',a+=" ",a+='Add ',s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after(a);var t=ajaxurl+"?action=saswp_add_reviews_to_select2&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&platform_id="+e;s("#saswp_dynamic_reviews_list").select2({ajax:{url:t,dataType:"json",processResults:function(s){if(s.status)return{results:s.message}}}})}),s(document).on("click",".saswp-add-single-rv",function(e){e.preventDefault();var a=s("#saswp_dynamic_reviews_list").val(),t=s("#saswp_dynamic_platforms").val();a&&saswp_get_collection_data(null,t,null,a,!0)}),s(document).on("click",".saswp-remove-coll-rv",function(){var e=s(this).attr("data-id"),a=s(this).attr("platform-id");if(a){var t=saswp_collection[a].filter(function(s){return s.saswp_review_id!=e});saswp_collection[a]=t,saswp_on_collection_design_change()}}),s(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val(),a=s(".saswp-collection-sorting").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),s(".saswp-rmv-coll-rv").hide(),s(".saswp-add-dynamic-section").hide(),"grid"==e&&(s(".saswp-grid-options").removeClass("saswp_hide"),s(".saswp-rmv-coll-rv").show(),s(".saswp-add-dynamic-section").show(),s(".saswp-coll-review-wrapper").removeClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"gallery"==e&&(s(".saswp-slider-options").removeClass("saswp_hide"),s(".saswp-coll-review-wrapper").removeClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px"),s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"popup"==e&&(s(".saswp-collection-lp").css("height","31px"),s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"badge"==e&&(s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").removeClass("saswp_hide")),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide"),"recent"==a?(s("#saswp_collection_specific_rating").parent().parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")):(s("#saswp_collection_specific_rating").parent().parent().addClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();let c=s("#saswp-review-platform-places").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a,null,null,c)):alert("Enter Count")});var h=s("#saswp_total_reviews_list").val();h&&saswp_get_collection_data(null,null,null,null,h);let v=s("#saswp-plaftorm-list").find("option:first-child").val();saswp_get_platform_place_list(v),(a=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",a.innerHTML="Copied!",document.body.appendChild(a);var m=document.getElementById("saswp-motivatebox");m&&m.addEventListener("mouseup",function(s){var e,i,c,p,r,s=s||event,n=s.target||s.srcElement;"motivate"==n.className&&(e=n,(i=document.createRange()).selectNodeContents(e),(c=window.getSelection()).removeAllRanges(),c.addRange(i),function s(){var e;try{e=document.execCommand("copy")}catch(a){e=!1}return e}()&&(r=(p=s)||event,clearTimeout(t),a.style.left=r.pageX-10+"px",a.style.top=r.pageY+15+"px",a.style.opacity=1,t=setTimeout(function(){a.style.opacity=0},500)))},!1),s(document).on("change","#saswp-plaftorm-list",function(e){e.preventDefault();let a=s(this).val();saswp_get_platform_place_list(a)}),s(document).on("change",".saswp_archive_list_type_class",function(e){e.preventDefault(),"ItemList"==s(this).val()?s(".saswp_archive_schema_type_class").parent().parent().hide():s(".saswp_archive_schema_type_class").parent().parent().show()}),s(document).on("change",".saswp-custom-fields-name, .saswp-custom-meta-list",function(e){e.preventDefault();let a=s(".saswp-custom-fields-name").val(),t=s(".saswp-custom-meta-list").val(),i=s(this).attr("class");if("saswp-custom-fields-name"==i&&(a=s(this).val(),t=s(this).parent().next().find("select").val()),"saswp-custom-meta-list"==i&&(t=s(this).val(),a=s(this).closest("tr").find(".saswp-custom-fields-name").val()),"saswp_faq_main_entity"==a&&"saswp_repeater_mapping"==t){let c=s(".saswp-itemlist-item-type-list").attr("data-id");0==s(".saswp-add-faq-repeat-que").length&&s(this).closest("tr").after('Add Faq Question '),0==s(".saswp-faq-repeater-tr").length&&s(this).closest("tr").after(' ')}else{let p=0;s(".saswp-custom-meta-list").each(function(e){"saswp_repeater_mapping"==s(this).val()&&(p=1)}),0==p&&(s(".saswp-faq-repeater-tr").remove(),s(".saswp-faq-question").remove(),s(".saswp-add-faq-repeat-que").remove())}}),s("#saswp-rating-module-css-app").change(function(e){s(this).is(":checked")?s(".saswp-rbcc-fields").removeClass("saswp_hide"):s(".saswp-rbcc-fields").addClass("saswp_hide")}).change(),s(document).on("click","#saswp-rtb-link",function(e){s("#saswp-appearance-modal").fadeIn()}),s(document).on("click","#saswp-appearance-modal-close",function(e){s("#saswp-appearance-modal").fadeOut()}),s("#saswp-rbcc-review-bg-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-preview-head").css("background",t),s(".saswp-rbcc-rvs span").css("background",t)}}),s("#saswp-rbcc-review-f-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-preview-head").css("color",t),s(".saswp-rbcc-rvs span").css("color",t)}}),s("#saswp-rbcc-review-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-review-f-unit").val();a<=0&&(a=15),s(".saswp-rbcc-preview-head, .saswp-rbcc-rvs span").css("font-size",a+t)}),s("#saswp-rbcc-review-f-unit").change(function(e){var a=s("#saswp-rbcc-review-f-size").val(),t=s(this).val();s(".saswp-rbcc-preview-head, .saswp-rbcc-rvs span").css("font-size",a+t)}).change(),s("#saswp-rbcc-if-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-rif").css("color",t)}}),s("#saswp-rbcc-if-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-if-f-unit").val();a<=0&&(a=15),s(".saswp-rbcc-rif").css("font-size",a+t)}),s("#saswp-rbcc-if-f-unit").change(function(e){var a=s("#saswp-rbcc-if-f-size").val(),t=s(this).val();s(".saswp-rbcc-rif").css("font-size",a+t)}).change(),s("#saswp-rbcc-stars-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp_star_color .saswp_star").attr("stop-color",t)}}),s("#saswp-rbcc-stars-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val();a<=0&&(a=18),s(".saswp-rvw-str .saswp_star_color svg").css("width",a+"px")}),s("#saswp-rbcc-ar-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-rvar").css("color",t)}}),s("#saswp-rbcc-ar-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-ar-f-unit").val();a<=0&&(a=48),s(".saswp-rbcc-rvar").css("font-size",a+t)}),s("#saswp-rbcc-ar-f-unit").change(function(e){var a=s("#saswp-rbcc-ar-f-size").val(),t=s(this).val();s(".saswp-rbcc-rvar").css("font-size",a+t)}).change(),s(document).on("change","#saswp_review_custom_chk_box",function(e){s(this).is(":checked")?s("#saswp-review-cccc").show():s("#saswp-review-cccc").hide()}),s(document).on("click","#saswp-rbcc-reset",function(e){e.preventDefault(),d_css={background:"#000",color:"#fff","font-size":"15px"},s(".saswp-rbcc-preview-head").css(d_css),s(".saswp-rbcc-rvs span").css(d_css),d_css={color:"#000","font-size":"18px"},s(".saswp-rbcc-rif").css(d_css),s(".saswp_star_color .saswp_star").attr("stop-color","#000"),s(".saswp-rvw-str .saswp_star_color svg").css("width","18px"),d_css={color:"#000","font-size":"48px"},s(".saswp-rbcc-rvar").css(d_css),bg_color="#000",font_color="#fff",s("#saswp-rbcc-review-bg-color, #saswp-rbcc-if-color, #saswp-rbcc-stars-color, #saswp-rbcc-ar-color").val(bg_color),s("#saswp-rbcc-review-f-color").val(font_color),s("#saswp-rbcc-review-f-size").val("15"),s("#saswp-rbcc-review-f-unit").val("px"),s("#saswp-rbcc-if-f-size").val("18"),s("#saswp-rbcc-if-f-unit").val("px"),s("#saswp-rbcc-ar-f-size").val("48"),s("#saswp-rbcc-ar-f-unit").val("px"),s("#saswp-rbcc-stars-f-size").val("18"),s("#saswp-rbcc-stars-f-unit").val("px"),s(".saswp-rbcc-font-color .wp-color-result").css("background-color","#fff"),s(".saswp-rbcc-bg-color .wp-color-result").css("background-color",bg_color),s(".saswp-rbcc-bg-color .wp-color-result").css("color",font_color),s(".saswp-rbcc-dc .wp-color-result").css("background-color",bg_color)}),s(document).on("change","#saswp_enable_gcaptcha",function(e){s(this).is(":checked")?s("#saswp-gkey-captcha-wrapper").removeClass("saswp_hide"):s("#saswp-gkey-captcha-wrapper").addClass("saswp_hide")}),s(document).on("click","#saswp-ar-form-btn",function(e){let a=s("#saswp_g_site_key").val(),t=s("#saswp_g_secret_key").val(),i=0,c={};c=s("#saswp_enable_gcaptcha").is(":checked")?{action:"saswp_update_google_captch_keys",captcha_enable:i=1,gsitekey:a,gsecretkey:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce}:{action:"saswp_update_google_captch_keys",captcha_enable:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},s.ajax({url:ajaxurl,method:"POST",data:c,success:function(s){location.reload()}})})});
\ No newline at end of file
diff --git a/admin_section/settings.php b/admin_section/settings.php
index e72e2d6a..d066bc7f 100644
--- a/admin_section/settings.php
+++ b/admin_section/settings.php
@@ -4210,6 +4210,19 @@ function saswp_compatibility_page_callback() {
'name' => 'sd_data[saswp-bbpress]',
)
);
+
+ $wpforo = array(
+ 'label' => 'wpForo Forum',
+ 'id' => 'saswp-wpforo-checkbox',
+ 'name' => 'saswp-wpforo-checkbox',
+ 'type' => 'checkbox',
+ 'class' => 'checkbox saswp-checkbox',
+ 'note' => saswp_get_field_note('wpforo'),
+ 'hidden' => array(
+ 'id' => 'saswp-wpforo',
+ 'name' => 'sd_data[saswp-wpforo]',
+ )
+ );
$yoast = array(
'label' => 'Yoast SEO Plugin',
@@ -4512,6 +4525,7 @@ function saswp_compatibility_page_callback() {
$wppostratings,
$wpreviewpro,
$bbpress,
+ $wpforo,
$webstories,
$wpecommerce,
$woocommerce,
diff --git a/core/array-list/compatibility-list.php b/core/array-list/compatibility-list.php
index ed4be653..80aee7de 100644
--- a/core/array-list/compatibility-list.php
+++ b/core/array-list/compatibility-list.php
@@ -469,6 +469,12 @@
'opt_name' => 'saswp-bbpress',
'part_in' => 'free',
),
+ 'wpforo' => array(
+ 'name' => 'wpForo Forum',
+ 'free' => 'wpforo/wpforo.php',
+ 'opt_name' => 'saswp-wpforo',
+ 'part_in' => 'free',
+ ),
'woocommerce' => array(
'name' => 'Woocommerce',
'free' => 'woocommerce/woocommerce.php',
diff --git a/output/class-saswp-output-compatibility.php b/output/class-saswp-output-compatibility.php
index 7df052aa..ca4002fb 100644
--- a/output/class-saswp-output-compatibility.php
+++ b/output/class-saswp-output-compatibility.php
@@ -404,6 +404,9 @@ public function wp_post_ratings_on_activation() {
public function bb_press_on_activation() {
$this->saswp_update_option_on_compatibility_activation('saswp-bbpress');
}
+ public function wpforo_on_activation() {
+ $this->saswp_update_option_on_compatibility_activation('saswp-wpforo');
+ }
public function woocommerce_on_activation() {
$this->saswp_update_option_on_compatibility_activation('saswp-woocommerce');
}
diff --git a/output/output.php b/output/output.php
index 25b89018..0fbc6482 100644
--- a/output/output.php
+++ b/output/output.php
@@ -779,48 +779,68 @@ function saswp_schema_output() {
)
);
- }else{
-
- $input1 = array(
- '@context' => saswp_context_url(),
- '@type' => 'DiscussionForumPosting' ,
- '@id' => saswp_get_permalink().'#DiscussionForumPosting',
- 'url' => saswp_get_permalink(),
- 'mainEntityOfPage' => saswp_get_permalink(),
- 'headline' => saswp_get_the_title(),
- 'description' => saswp_get_the_excerpt(),
- 'datePublished' => esc_html( $date),
- 'dateModified' => esc_html( $modified_date),
- 'author' => saswp_get_author_details()
- );
-
+ }elseif ( isset( $sd_data['saswp-wpforo']) && $sd_data['saswp-wpforo'] == 1 && is_plugin_active('wpforo/wpforo.php') ) {
+
/**
* Check if current topic is created through wpforo plugin
- * @since 1.36
+ * @since 1.38
* */
- if( function_exists( 'is_wpforo_url' ) && is_wpforo_url() ) {
+ if ( function_exists( 'is_wpforo_url' ) && is_wpforo_url() ) {
$topicid = '';
if( isset( WPF()->current_object['topicid'] ) ) {
$topicid = WPF()->current_object['topicid'];
}
- if( ! empty( $topicid ) && function_exists('wpforo_topic') ) {
- $topic_array = wpforo_topic($topicid);
- if( ! empty( $topic_array ) && is_array( $topic_array ) ) {
+ if ( ! empty( $topicid ) && function_exists('wpforo_topic') ) {
+
+ $topic_array = wpforo_topic( $topicid );
+ $wpforo_post = wpforo_post( $topicid );
+
+ if ( ! empty( $topic_array ) && is_array( $topic_array ) ) {
- if( ! empty( $topic_array['url'] ) ) {
- $input1['@id'] = $topic_array['url'].'#DiscussionForumPosting';
+ if ( ! empty( $topic_array['url'] ) ) {
+ $input1['@context'] = saswp_context_url();
+ $input1['@type'] = 'DiscussionForumPosting';
+ $input1['@id'] = $topic_array['url'].'#DiscussionForumPosting';
$input1['url'] = $topic_array['url'];
$input1['mainEntityOfPage'] = $topic_array['url'];
+ $input1['description'] = isset( $wpforo_post['body'] ) ? esc_html( $wpforo_post['body'] ) : saswp_get_the_excerpt();
}
- if( ! empty( $topic_array['title'] ) ) {
+ if ( ! empty( $topic_array['title'] ) ) {
$input1['headline'] = $topic_array['title'];
}
+ if ( $forum = WPF()->current_object['forum'] ) {
+ $input1['articleSection'] = wpforo_forum_title( $forum );
+ }
+
+ $input1['articleBody'] = isset( $wpforo_post['body'] ) ? esc_html( $wpforo_post['body'] ) : saswp_get_the_content();
+ $input1['datePublished'] = isset( $topic_array['created'] ) ? saswp_format_date_time( date('Y-m-d', strtotime( $topic_array['created'] ) ), date('H:i:s', strtotime( $topic_array['created'] ) ) ) : get_post_time( DATE_ATOM, false, get_the_ID(), true );
+ $input1['dateModified'] = isset( $topic_array['modified'] ) ? saswp_format_date_time( date('Y-m-d', strtotime( $topic_array['modified'] ) ), date('H:i:s', strtotime( $topic_array['modified'] ) ) ) : esc_html( $modified_date);
+ $input1['author'] = saswp_get_author_details();
+ $input1['interactionStatistic']['@type'] = 'InteractionCounter';
+ $input1['interactionStatistic']['interactionType'] = saswp_context_url().'/CommentAction';
+ $input1['interactionStatistic']['userInteractionCount'] = $topic_array['posts'] - 1;
+
}
}
}
+
+ }else{
+
+ $input1 = array(
+ '@context' => saswp_context_url(),
+ '@type' => 'DiscussionForumPosting' ,
+ '@id' => saswp_get_permalink().'#DiscussionForumPosting',
+ 'url' => saswp_get_permalink(),
+ 'mainEntityOfPage' => saswp_get_permalink(),
+ 'headline' => saswp_get_the_title(),
+ 'description' => saswp_get_the_excerpt(),
+ 'datePublished' => esc_html( $date),
+ 'dateModified' => esc_html( $modified_date),
+ 'author' => saswp_get_author_details()
+ );
}
if ( ! empty( $publisher) ) {
From bebd7020b0f5931daf3af3ad5f38d4b81162f49b Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Thu, 24 Oct 2024 18:36:27 +0530
Subject: [PATCH 10/18] #2199
---
output/function.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/output/function.php b/output/function.php
index 0ee753ac..0d363d6f 100644
--- a/output/function.php
+++ b/output/function.php
@@ -1306,7 +1306,7 @@ function saswp_get_comments($post_id){
* */
if ( ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) || function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
- if ( ( function_exists( 'ampforwp_get_setting' ) && false == ampforwp_get_setting( 'ampforwp-display-on-posts' ) ) ) {
+ if ( ( function_exists( 'ampforwp_get_setting' ) && false == ampforwp_get_setting( 'ampforwp-display-on-posts' ) ) || ( function_exists( 'amp_is_legacy' ) && amp_is_legacy() ) ) {
return array();
}
From 37eef2ebd12caf8316a6b47167bfc7654995325a Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Fri, 25 Oct 2024 18:34:44 +0530
Subject: [PATCH 11/18] #2206
---
admin_section/common-function.php | 1 +
admin_section/js/main-script.js | 9 +++++++++
admin_section/js/main-script.min.js | 2 +-
admin_section/settings.php | 15 +++++++++++++++
core/array-list/compatibility-list.php | 6 ++++++
output/class-saswp-output-compatibility.php | 3 +++
6 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/admin_section/common-function.php b/admin_section/common-function.php
index 7eb945ea..86fa0e2c 100644
--- a/admin_section/common-function.php
+++ b/admin_section/common-function.php
@@ -3507,6 +3507,7 @@ function saswp_get_field_note($pname){
'ultimatefaqs' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' Ultimate FAQs ',
'ultimatemember' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' Ultimate Member ',
'showcaseidx' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' Showcaseidx ',
+ 'realtypress' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' RealtyPress Premium ',
'easyaccordion' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' Easy Accordion ',
'wpresponsivefaq' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' WP responsive FAQ with category plugin ',
'arconixfaq' => esc_html__( 'Requires', 'schema-and-structured-data-for-wp' ) .' Arconix FAQ ',
diff --git a/admin_section/js/main-script.js b/admin_section/js/main-script.js
index ee4659e8..d8f6387d 100644
--- a/admin_section/js/main-script.js
+++ b/admin_section/js/main-script.js
@@ -2131,6 +2131,15 @@ jQuery(document).ready(function($){
$("#saswp-showcaseidx").val(0);
}
+ break;
+ case 'saswp-realtypress-checkbox':
+ saswp_compatibliy_notes(current, id);
+ if ($(this).is(':checked')) {
+ $("#saswp-realtypress").val(1);
+ }else{
+ $("#saswp-realtypress").val(0);
+ }
+
break;
case 'saswp-arconixfaq-checkbox':
diff --git a/admin_section/js/main-script.min.js b/admin_section/js/main-script.min.js
index 6fe27855..210000e4 100644
--- a/admin_section/js/main-script.min.js
+++ b/admin_section/js/main-script.min.js
@@ -1 +1 @@
-var saswp_attached_rv=[],saswp_attached_col=[],rmv_boolean=!1,rmv_html="";jQuery(document).ready(function(s){jQuery(".saswpforwp-colorpicker").wpColorPicker(),jQuery(".saswp-onclick-show").hide(),"local_business"==s("#schema_type").find(":selected").val()&&s(document).ready(function(){s(".saswp-business-type-tr").show()});var e=s("#saswp_breadcrumb_home_page_title").val();if(s("#saswp_breadcrumb_home_page_title_text").val(e),s("#saswp_breadcrumb_home_page_title_text").bind("keydown keyup",function(){var e=s(this).val();s("#saswp_breadcrumb_home_page_title").val(e)}),s(document).on("click","#saswp_loc_display_on_front",function(){s(this).is(":checked")?s(".saswp-front-location-inst").removeClass("saswp_hide"):s(".saswp-front-location-inst").addClass("saswp_hide")}),s(document).on("change",".saswp-collection-where",function(){s(this);var e,a=s(this).val();a&&(e=a)&&s.ajax({url:ajaxurl,method:"GET",data:{action:"saswp_get_select2_data",type:e,q:"",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},beforeSend:function(){},success:function(e){if(e){var a="";s.each(e,function(s,e){a+=''+e.text+" "}),s(".saswp-collection-where-data").html(""),s(".saswp-collection-where-data").append(a),saswp_select2()}},error:function(s){console.log("Failed Ajax Request"),console.log(s)}})}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?(s(".saswp-coll-where").addClass("saswp_hide"),s("#saswp-motivatebox").css("display","block")):(s(".saswp-coll-where").removeClass("saswp_hide"),s("#saswp-motivatebox").css("display","none"))}).change(),s(document).on("click",".saswp-dismiss-notices",function(){var e=s(this),a=s(this).attr("notice-type");a&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_dismiss_notices",notice_type:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status&&e.parent().parent().hide()},error:function(s){console.log(s)}})}),saswp_select2(),s(".saswp-upgrade-to-pro").parent().attr({href:"https://structured-data-for-wp.com/pricing/",target:"_blank"}),s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show(saswp_localize_data.translable_txt.attach_review,"#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e=null;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,c="";t>0&&(c+=t+" Reviews, "),i>0&&(c+=i+" Collection"),c||(c=0),s(".saswp-attached-rv-count").text("Attached "+c),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),i>=10&&s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"),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?' ':' ',e.preventDefault();var t="";(t+=''+saswp_localize_data.translable_txt.place_id+' '+saswp_localize_data.translable_txt.language+' '+saswp_localize_data.translable_txt.reviews+' '+a+' '+saswp_localize_data.translable_txt.fetch+' x
')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-language-field").val(),c=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),r=s("#reviews_addon_license_key").val(),n=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(c>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=c%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(r||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:n,reviews_api:r,location:t,language:i,blocks:c,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert(saswp_localize_data.translable_txt.enter_place_id),""==p&&alert(saswp_localize_data.translable_txt.enter_api_key),""==r&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var a,t,i,c=""+saswp_localize_data.translable_txt.using_schema+" ";c+=""+saswp_localize_data.translable_txt.do_you_want+" "+saswp_localize_data.translable_txt.sd_update+" "+saswp_localize_data.translable_txt.before_others+"
",c+='",c+='",s(document).on("submit","#saswp-news-letter-form",function(e){e.preventDefault();var a=s(this),t=a.find('input[name="saswp_subscriber_name"]').val(),i=a.find('input[name="saswp_subscriber_email"]').val();website=a.find('input[name="saswp_subscriber_website"]').val(),s.post(saswp_localize_data.ajax_url,{action:"saswp_subscribe_to_news_letter",saswp_security_nonce:saswp_localize_data.saswp_security_nonce,name:t,email:i,website:website},function(e){e?"Some fields are missing."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid email address."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Already subscribed."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):(s("#saswp-news-letter-status").text("You're subscribed!"),s("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var p={content:c,position:{edge:"top",align:"left"}};p=s.extend(p,{buttons:function(s,e){return button=jQuery(''+saswp_localize_data.button1+" "),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){e.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){e.element.pointer("close")},3e3)}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}}),i=function(){s(saswp_localize_data.displayID).pointer(p).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after(''+saswp_localize_data.button2+" "),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"})}))},p.position&&p.position.defer_loading?s(window).bind("load.wp-pointers",i):i()}s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);if(t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),"premium_features"!=t||"yes"!=jQuery(this).attr("data-extmgr"))return s(".saswp-settings-form-wrap").find(".saswp-"+t).siblings().hide(),s(".saswp-settings-form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1;window.location.href="edit.php?post_type=saswp&page=saswp-extension-manager"}),s(".saswp-schame-type-select").select2(),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"ScholarlyArticle"==a||"Blogposting"==a||"NewsArticle"==a||"AnalysisNewsArticle"==a||"AskPublicNewsArticle"==a||"BackgroundNewsArticle"==a||"OpinionNewsArticle"==a||"ReportageNewsArticle"==a||"ReviewNewsArticle"==a||"WebPage"==a||"ItemPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s("#saswp_location_meta_box").removeClass("saswp_hide"),s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),("Review"==a||"ReviewNewsArticle"==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(),"BreadCrumbs"==a?s(".saswp-schema-modify-section").hide():s(".saswp-schema-modify-section").show(),"FAQ"==a?s(".saswp-enable-faq-markup-class").parent().parent().show():s(".saswp-enable-faq-markup-class").parent().parent().hide(),"Organization"==a&&(s(".saswp-organization-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"WebPage"==a&&(s(".saswp-webpage-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a||"Service"==a||"qanda"==a||"Course"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").select2(),s(".saswp-local-sub-type-2").select2(),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"ScholarlyArticle"==a||"Blogposting"==a||"NewsArticle"==a||"AnalysisNewsArticle"==a||"AskPublicNewsArticle"==a||"BackgroundNewsArticle"==a||"OpinionNewsArticle"==a||"ReportageNewsArticle"==a||"ReviewNewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1),s("#saswp_location_meta_box").removeClass("saswp_hide")),("Review"==a||"ReviewNewsArticle"==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)),"BreadCrumbs"==a?s(".saswp-schema-modify-section").hide():s(".saswp-schema-modify-section").show(),"FAQ"==a?s(".saswp-enable-faq-markup-class").parent().parent().show():s(".saswp-enable-faq-markup-class").parent().parent().hide(),"Organization"==a&&(s(".saswp-organization-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"WebPage"==a&&(s(".saswp-webpage-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpzoom-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpzoom").val(1):s("#saswp-wpzoom").val(0);break;case"saswp-yotpo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yotpo").val(1):s("#saswp-yotpo").val(0);break;case"saswp-ryviu-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ryviu").val(1):s("#saswp-ryviu").val(0);break;case"saswp-ultimate-blocks-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimate-blocks").val(1):s("#saswp-ultimate-blocks").val(0);break;case"saswp-starsrating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-starsrating").val(1):s("#saswp-starsrating").val(0);break;case"saswp-wptastyrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wptastyrecipe").val(1):s("#saswp-wptastyrecipe").val(0);break;case"saswp-recipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-recipress").val(1):s("#saswp-recipress").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp-for-cschema-checkbox":s(this).is(":checked")?s("#saswp-for-cschema").val(1):s("#saswp-for-cschema").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_list_type_class").parent().parent().show(),"ItemList"==s(".saswp_archive_list_type_class").val()&&s(".saswp_archive_schema_type_class").parent().parent().hide()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide(),s(".saswp_archive_list_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_remove_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_remove_cat").val(1):s("#saswp_breadcrumb_remove_cat").val(0);break;case"saswp_breadcrumb_exclude_shop_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_exclude_shop").val(1):s("#saswp_breadcrumb_exclude_shop").val(0);break;case"saswp_breadcrumb_include_parent_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_include_parent_cat").val(1):s("#saswp_breadcrumb_include_parent_cat").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?(s("#saswp_breadcrumb_schema").val(1),s("#saswp_breadcrumb_remove_cat").parent().parent().show(),s("#saswp_breadcrumb_exclude_shop").parent().parent().show(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().show(),s("#saswp_breadcrumb_home_page_title_text").parent().parent().show()):(s("#saswp_breadcrumb_schema").val(0),s("#saswp_breadcrumb_remove_cat").parent().parent().hide(),s("#saswp_breadcrumb_exclude_shop").parent().parent().hide(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().hide(),s("#saswp_breadcrumb_home_page_title_text").parent().parent().hide());break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp_remove_version_tag_checkbox":s(this).is(":checked")?s("#saswp_remove_version_tag").val(1):s("#saswp_remove_version_tag").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-rating-box-app-fields").removeClass("saswp_hide"),s("#saswp-rtb-link").removeClass("saswp_hide")):(s("#saswp-review-module").val(0),s(".saswp-rating-box-app-fields").addClass("saswp_hide"),s("#saswp-rtb-link").addClass("saswp_hide"));break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s(this).parent().parent().next().removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(this).parent().parent().next().addClass("saswp_hide"),s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-rmprating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rmprating").val(1):s("#saswp-rmprating").val(0);break;case"saswp-ratingform-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratingform").val(1):s("#saswp-ratingform").val(0);break;case"saswp-wpdiscuz-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpdiscuz").val(1):s("#saswp-wpdiscuz").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yet-another-stars-rating").val(1):s("#saswp-yet-another-stars-rating").val(0);break;case"saswp-simple-author-box-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simple-author-box").val(1):s("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp_woocommerce_archive_checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp_woocommerce_archive").val(1),s(".saswp_woocommerce_archive_list_type_class").parent().parent().show()):(s("#saswp_woocommerce_archive").val(0),s(".saswp_woocommerce_archive_list_type_class").parent().parent().hide());break;case"saswp-wpecommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpecommerce").val(1):s("#saswp-wpecommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-single-price-product-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-single-price-product").val(1),s(".saswp-single-price-opt").parent().parent().show()):(s("#saswp-single-price-product").val(0),s(".saswp-single-price-opt").parent().parent().hide());break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-enfold-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-enfold").val(1):s("#saswp-enfold").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-theme-reviews").val(1):s("#saswp-wp-theme-reviews").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wpqa-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpqa").val(1):s("#saswp-wpqa").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-polylang-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-polylang").val(1):s("#saswp-polylang").val(0);break;case"saswp-autolistings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-autolistings").val(1):s("#saswp-autolistings").val(0);break;case"saswp-wpml-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpml").val(1):s("#saswp-wpml").val(0);break;case"saswp-metatagmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-metatagmanager").val(1):s("#saswp-metatagmanager").val(0);break;case"saswp-slimseo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-slimseo").val(1):s("#saswp-slimseo").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-video-thumbnails-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-video-thumbnails").val(1):s("#saswp-video-thumbnails").val(0);break;case"saswp-featured-video-plus-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-featured-video-plus").val(1):s("#saswp-featured-video-plus").val(0);break;case"saswp-wp-product-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-product-review").val(1):s("#saswp-wp-product-review").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-ratency-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratency").val(1):s("#saswp-ratency").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-myhome").val(1):s("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-5").val(1):s("#saswp-realestate-5").val(0);break;case"saswp-realestate-7-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-7").val(1):s("#saswp-realestate-7").val(0);break;case"saswp-stamped-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stamped").val(1):s("#saswp-stamped").val(0);break;case"saswp-sabaidiscuss-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-sabaidiscuss").val(1):s("#saswp-sabaidiscuss").val(0);break;case"saswp-geodirectory-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-geodirectory").val(1):s("#saswp-geodirectory").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-classipress").val(1):s("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wplms").val(1):s("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-senseilms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-senseilms").val(1):s("#saswp-senseilms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-wp-event-solution-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-solution").val(1):s("#saswp-wp-event-solution").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-event-prime-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-prime").val(1):s("#saswp-event-prime").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-woo-discount-rules-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-discount-rules").val(1):s("#saswp-woo-discount-rules").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-wpforo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpforo").val(1):s("#saswp-wpforo").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-full-heading-checkbox":s(this).is(":checked")?s("#saswp-full-heading").val(1):s("#saswp-full-heading").val(0);break;case"saswp-truncate-product-description-checkbox":s(this).is(":checked")?s("#saswp-truncate-product-description").val(1):s("#saswp-truncate-product-description").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-default-videoobject-checkbox":s(this).is(":checked")?s("#saswp-default-videoobject").val(1):s("#saswp-default-videoobject").val(0);break;case"saswp-image-resizing-checkbox":s(this).is(":checked")?s("#saswp-image-resizing").val(1):s("#saswp-image-resizing").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-brb-checkbox":s(this).is(":checked")?s("#saswp-brb").val(1):s("#saswp-brb").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-bunyadamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bunyadamp").val(1):s("#saswp-bunyadamp").val(0);break;case"saswp-wpreviewslider-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewslider").val(1):s("#saswp-wpreviewslider").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-cmp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cmp").val(1):s("#saswp-cmp").val(0);break;case"saswp-wpreviewpro-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewpro").val(1):s("#saswp-wpreviewpro").val(0);break;case"saswp-webstories-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webstories").val(1):s("#saswp-webstories").val(0);break;case"saswp-resized-image-folder-checkbox":var t=s("#saswp-resized-image-folder-checkbox");s(this).is(":checked")?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_create_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s("#saswp-resized-image-folder").val(1),s("#saswp-resized-image-folder-checkbox").after('Clear Images ')):(t.prop("checked",!1),t.next().text(e.message),t.next().css("color","red"))},error:function(s){t.prop("checked",!1),t.next().text(s),t.next().css("color","red")}}):(s("#saswp-resized-image-folder").val(0),s(".saswp-clear-images").remove());break;case"saswp-elementor-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-elementor").val(1):s("#saswp-elementor").val(0);break;case"saswp-rannarecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rannarecipe").val(1):s("#saswp-rannarecipe").val(0);break;case"saswp-jetpackrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jetpackrecipe").val(1):s("#saswp-jetpackrecipe").val(0);break;case"saswp-quickandeasyfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-quickandeasyfaq").val(1):s("#saswp-quickandeasyfaq").val(0);break;case"saswp-ultimatefaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatefaqs").val(1):s("#saswp-ultimatefaqs").val(0);break;case"saswp-ultimatemember-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatemember").val(1):s("#saswp-ultimatemember").val(0);break;case"saswp-showcaseidx-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-showcaseidx").val(1):s("#saswp-showcaseidx").val(0);break;case"saswp-arconixfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-arconixfaq").val(1):s("#saswp-arconixfaq").val(0);break;case"saswp-faqconcertina-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqconcertina").val(1):s("#saswp-faqconcertina").val(0);break;case"saswp-wpjobmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobmanager").val(1):s("#saswp-wpjobmanager").val(0);break;case"saswp-simplejobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simplejobboard").val(1):s("#saswp-simplejobboard").val(0);break;case"saswp-wpjobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobboard").val(1):s("#saswp-wpjobboard").val(0);break;case"saswp-wpjobopenings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobopenings").val(1):s("#saswp-wpjobopenings").val(0);break;case"saswp-webfaq10-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webfaq10").val(1):s("#saswp-webfaq10").val(0);break;case"saswp-wpfaqschemamarkup-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpfaqschemamarkup").val(1):s("#saswp-wpfaqschemamarkup").val(0);break;case"saswp-faqschemaforpost-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqschemaforpost").val(1):s("#saswp-faqschemaforpost").val(0);break;case"saswp-masteraccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-masteraccordion").val(1):s("#saswp-masteraccordion").val(0);break;case"saswp-easyfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyfaqs").val(1):s("#saswp-easyfaqs").val(0);break;case"saswp-accordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordion").val(1):s("#saswp-accordion").val(0);break;case"saswp-html5responsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-html5responsivefaq").val(1):s("#saswp-html5responsivefaq").val(0);break;case"saswp-wpresponsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresponsivefaq").val(1):s("#saswp-wpresponsivefaq").val(0);break;case"saswp-jolifaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jolifaq").val(1):s("#saswp-jolifaq").val(0);break;case"saswp-ameliabooking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ameliabooking").val(1):s("#saswp-ameliabooking").val(0);break;case"saswp-easyaccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyaccordion").val(1):s("#saswp-easyaccordion").val(0);break;case"saswp-helpiefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-helpiefaq").val(1):s("#saswp-helpiefaq").val(0);break;case"saswp-mooberrybm-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mooberrybm").val(1):s("#saswp-mooberrybm").val(0);break;case"saswp-novelist-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-novelist").val(1):s("#saswp-novelist").val(0);break;case"saswp-accordionfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordionfaq").val(1):s("#saswp-accordionfaq").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-schemaforfaqs").val(1):s("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-customer-reviews").val(1):s("#saswp-wp-customer-reviews").val(0);break;case"saswp-total-recipe-generator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-total-recipe-generator").val(1):s("#saswp-total-recipe-generator").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-timetable-event-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-timetable-event").val(1):s("#saswp-timetable-event").val(0);break;case"saswp-xo-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-xo-event-calendar").val(1):s("#saswp-xo-event-calendar").val(0);break;case"saswp-vs-event-list-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-vs-event-list").val(1):s("#saswp-vs-event-list").val(0);break;case"saswp-calendarize-it-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-calendarize-it").val(1):s("#saswp-calendarize-it").val(0);break;case"saswp-events-schedule-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-schedule").val(1):s("#saswp-events-schedule").val(0);break;case"saswp-woo-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-event-manager").val(1):s("#saswp-woo-event-manager").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stachethemes-event-calendar").val(1):s("#saswp-stachethemes-event-calendar").val(0);break;case"saswp-all-in-one-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-all-in-one-event-calendar").val(1):s("#saswp-all-in-one-event-calendar").val(0);break;case"saswp-event-on-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-on").val(1):s("#saswp-event-on").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0);break;case"saswp-publish-press-authors-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-publish-press-authors").val(1):s("#saswp-publish-press-authors").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var c="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(c='Image size is smaller than recommended size
'),s(".saswp_image_div_"+t).html(''+c),"saswp_collection_image"==t&&(s(".saswp_image_div_"+t).html(' '+c),s(".saswp-r1-aimg").each(function(a,t){s(this).children("img").attr("src");0==s(this).children("img").attr("data-is-default-img")&&s(this).children("img").attr("src",e.url)}),s(".saswp-rc-a").each(function(a,t){s(this).children("img").attr("src");0==s(this).children("img").attr("data-is-default-img")&&s(this).children("img").attr("src",e.url)}))}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-post-specific-wrapper[data-id="+a+"] .saswp-post-specific-setting").after(e),s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){t.removeClass("updating-message"),"t"==e.status?(s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+a).val(),c=s(this).attr("data-schema-name");if(s(this).is(":checked")){var p=0;s("."+c).empty(),s("."+c).text("Enable "+c+" on this page"),s(".custom").empty(),s(".custom").text("Enable custom schema on this page"),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"),s(".custom").empty(),s(".custom").text("Disable custom schema on this page"),1==i?(s("."+c).empty(),s("."+c).text("Disable "+c+" on this page"),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s("."+c).empty(),s("."+c).text("Disable "+c+" on this page"),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"));var 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,req_from:saswp_localize_data.req_from,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),!0==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),c=s("#"+i+"_addon_license_key").val();t&&i&&c?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status&&e.days_remaining<0?(s("span.saswp_inactive_status_reviews").text("Expired"),s("span.saswp_inactive_status_reviews").css({color:"red","font-weight":"400"})):"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s("span.addon-activated_reviews").css({color:"green","margin-left":"8px","font-weight":"400"}),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.inactive_status_"+i).text("Active"),s("span.inactive_status_"+i).css({color:"green","margin-left":"8px","font-weight":"400"}),s("span.inactive_status_"+i).removeClass("inactive_status_"+i).addClass("addon-activated_"+i)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.addon-activated_"+i).text("Inactive"),s("span.addon-activated_"+i).css("color","#bebfc0"),s("span.addon-activated_"+i).removeClass("addon-activated_"+i).addClass("inactive_status_"+i),s("span.saswp-limit-span").css("display","none")),a.removeClass("updating-message"),s(".saswp-note-p").text(e.message)},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),jQuery(document).on("click",".user_refresh_single_addon",function(s){var e=jQuery(this);s.preventDefault();var a=e.attr("add-on"),t=e.attr("remaining_days_org"),i=jQuery("#"+a+"_addon_license_key").val();document.getElementById("user_refresh_"+a).classList.add("spin");var c=new Date,p=function s(e){for(var a=e+"=",t=document.cookie.split(";"),i=0;i1||o<1?(document.cookie="saswp_addon_refresh_check="+c,jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:i,license_status:"active",add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){jQuery("#"+a+"_addon_license_key_status").val(s.status),document.getElementById("user_refresh_"+a).classList.remove("spin"),e.removeClass("updating-message")},error:function(s){console.log(s)}})):(setTimeout(function(){jQuery(".dashicons").removeClass("spin")},0),alert("Please try after "+(p=Math.abs(p.getDate()+1)+"/"+Math.abs(p.getMonth()+1)+"/"+p.getFullYear()+" "+p.getHours()+":"+p.getMinutes()+":"+p.getSeconds())))});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#refresh_license_icon_top-").trigger("click")},0),jQuery(document).on("click","#refresh_license_icon_top-",function(e){document.getElementById("refresh_license_icon_top").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_license_icon_top").classList.remove("spin");var a=e.days_remaining;a>=0&&a<=7&&s("span.saswp-addon-alert").text("expiring in "+a+" days ")}else document.getElementsByClassName("saswp-addon-alert")[0].style.color="green",document.getElementsByClassName("renewal-license")[0].style.display="none",document.getElementById("refresh_license_icon_top").classList.remove("spin"),s("span.pro_warning").css("display","none")}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#user_refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#user_refresh_expired_addon-",function(e){document.getElementById("user_refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("user_refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?(s("span#exp").text("Expired"),location.reload()):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message"))});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");setTimeout(function(){jQuery("#refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#refresh_expired_addon-",function(e){document.getElementById("refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?s("span#exp").text("Expired"):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_expired_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();""!=s.trim(a)&&i&&""!=s.trim(t)&&!0==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"),!1==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='Sub Business Type ';i+='',s.each(e.result,function(s,e){i+=''+e+" "}),i+=" ",i+=" ",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();var a='';a+="Review Item Feature ",a+=' ',a+="Rating ",a+=' ',a+='x ',a+=" ",s(".saswp-review-item-list-table").append(a)}),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||alert(s.msg),setTimeout(function(){location.reload()},1e3),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review(),saswp_enable_rating_automate()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide();var o=window.location.hash;if("#saswp-default-container"==o?s(".saswp-global-container:eq(2)").show():"#saswp-knowledge-container"==o?s(".saswp-global-container:eq(1)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();(-1!=t.indexOf("_image")||-1!=t.indexOf("_logo"))&&(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),c=s(this).attr("div_type"),p=s(this).attr("itemlist_sub_type"),r=s("#saswp_specific_"+t).find(".saswp-"+c+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div:nth-child("+r+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,c,t,i+"_",p)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-table-close-new",function(){s(this).closest(".saswp-dynamic-properties").remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),c="",p=a.toLowerCase()+"_"+i,r="saswp_fixed_image["+i+"]";"manual_text"==t?(c+=' ',c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(c+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,c+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2())},"json"):"custom_field"==t?(c+='',c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"fixed_image"==t?(c+="",c+="",c+=' ',c+=' ',c+=' ',c+=' ',c+='',c+="
",c+=" ",c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):(c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var c=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:c,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_enable_rating_automate(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('X ')}),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){let l="",w="saswp_hide";saswp_localize_data.saswp_enable_gcaptcha&&1==saswp_localize_data.saswp_enable_gcaptcha&&(l="checked",w="");var d='",jQuery(jQuery(".wrap")).prepend(d)}jQuery(document).on("click",".saswp-clear-images",function(e){e.preventDefault();var a=s(this);!0==confirm("Are you sure? It will remove all the resized images")&&(a.addClass("updating-message"),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_clear_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){a.removeClass("updating-message"),"t"!=s.status&&alert("something went wrong")},error:function(s){console.log(s)}}))}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("Settings "),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({spacing:"5px",rtl:saswp_localize_data.is_rtl,rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().next().val(e)}}).on("rateyo.change",function(e,a){var t=a.rating;s(this).next().text(t)}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('Invalid Phone Number ')}),saswpCollectionSlider(),s(document).on("click",".saswp-add-rv-btn",function(){s(".saswp-dynamic-platforms").toggle()}),s(".saswp-rmv-coll-rv").on("click",function(){if(rmv_boolean=!rmv_boolean,saswp_on_collection_design_change(),jQuery(jQuery(".saswp-add-dynamic-section")).remove(),rmv_boolean){var s="";s+='',s+='
',s+=' ',s+="
",s+='
',s+='Choose Platform '+jQuery("#saswp-plaftorm-list").html()+" ",s+="
",s+="
",jQuery(jQuery(".saswp-collection-preview")[0]).after(s)}}),s(document).on("change","#saswp_dynamic_platforms",function(){var e=s(this).val(),a="";a+='',a+=" ",a+='Add ',s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after(a);var t=ajaxurl+"?action=saswp_add_reviews_to_select2&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&platform_id="+e;s("#saswp_dynamic_reviews_list").select2({ajax:{url:t,dataType:"json",processResults:function(s){if(s.status)return{results:s.message}}}})}),s(document).on("click",".saswp-add-single-rv",function(e){e.preventDefault();var a=s("#saswp_dynamic_reviews_list").val(),t=s("#saswp_dynamic_platforms").val();a&&saswp_get_collection_data(null,t,null,a,!0)}),s(document).on("click",".saswp-remove-coll-rv",function(){var e=s(this).attr("data-id"),a=s(this).attr("platform-id");if(a){var t=saswp_collection[a].filter(function(s){return s.saswp_review_id!=e});saswp_collection[a]=t,saswp_on_collection_design_change()}}),s(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val(),a=s(".saswp-collection-sorting").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),s(".saswp-rmv-coll-rv").hide(),s(".saswp-add-dynamic-section").hide(),"grid"==e&&(s(".saswp-grid-options").removeClass("saswp_hide"),s(".saswp-rmv-coll-rv").show(),s(".saswp-add-dynamic-section").show(),s(".saswp-coll-review-wrapper").removeClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"gallery"==e&&(s(".saswp-slider-options").removeClass("saswp_hide"),s(".saswp-coll-review-wrapper").removeClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px"),s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"popup"==e&&(s(".saswp-collection-lp").css("height","31px"),s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"badge"==e&&(s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").removeClass("saswp_hide")),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide"),"recent"==a?(s("#saswp_collection_specific_rating").parent().parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")):(s("#saswp_collection_specific_rating").parent().parent().addClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();let c=s("#saswp-review-platform-places").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a,null,null,c)):alert("Enter Count")});var h=s("#saswp_total_reviews_list").val();h&&saswp_get_collection_data(null,null,null,null,h);let v=s("#saswp-plaftorm-list").find("option:first-child").val();saswp_get_platform_place_list(v),(a=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",a.innerHTML="Copied!",document.body.appendChild(a);var m=document.getElementById("saswp-motivatebox");m&&m.addEventListener("mouseup",function(s){var e,i,c,p,r,s=s||event,n=s.target||s.srcElement;"motivate"==n.className&&(e=n,(i=document.createRange()).selectNodeContents(e),(c=window.getSelection()).removeAllRanges(),c.addRange(i),function s(){var e;try{e=document.execCommand("copy")}catch(a){e=!1}return e}()&&(r=(p=s)||event,clearTimeout(t),a.style.left=r.pageX-10+"px",a.style.top=r.pageY+15+"px",a.style.opacity=1,t=setTimeout(function(){a.style.opacity=0},500)))},!1),s(document).on("change","#saswp-plaftorm-list",function(e){e.preventDefault();let a=s(this).val();saswp_get_platform_place_list(a)}),s(document).on("change",".saswp_archive_list_type_class",function(e){e.preventDefault(),"ItemList"==s(this).val()?s(".saswp_archive_schema_type_class").parent().parent().hide():s(".saswp_archive_schema_type_class").parent().parent().show()}),s(document).on("change",".saswp-custom-fields-name, .saswp-custom-meta-list",function(e){e.preventDefault();let a=s(".saswp-custom-fields-name").val(),t=s(".saswp-custom-meta-list").val(),i=s(this).attr("class");if("saswp-custom-fields-name"==i&&(a=s(this).val(),t=s(this).parent().next().find("select").val()),"saswp-custom-meta-list"==i&&(t=s(this).val(),a=s(this).closest("tr").find(".saswp-custom-fields-name").val()),"saswp_faq_main_entity"==a&&"saswp_repeater_mapping"==t){let c=s(".saswp-itemlist-item-type-list").attr("data-id");0==s(".saswp-add-faq-repeat-que").length&&s(this).closest("tr").after('Add Faq Question '),0==s(".saswp-faq-repeater-tr").length&&s(this).closest("tr").after(' ')}else{let p=0;s(".saswp-custom-meta-list").each(function(e){"saswp_repeater_mapping"==s(this).val()&&(p=1)}),0==p&&(s(".saswp-faq-repeater-tr").remove(),s(".saswp-faq-question").remove(),s(".saswp-add-faq-repeat-que").remove())}}),s("#saswp-rating-module-css-app").change(function(e){s(this).is(":checked")?s(".saswp-rbcc-fields").removeClass("saswp_hide"):s(".saswp-rbcc-fields").addClass("saswp_hide")}).change(),s(document).on("click","#saswp-rtb-link",function(e){s("#saswp-appearance-modal").fadeIn()}),s(document).on("click","#saswp-appearance-modal-close",function(e){s("#saswp-appearance-modal").fadeOut()}),s("#saswp-rbcc-review-bg-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-preview-head").css("background",t),s(".saswp-rbcc-rvs span").css("background",t)}}),s("#saswp-rbcc-review-f-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-preview-head").css("color",t),s(".saswp-rbcc-rvs span").css("color",t)}}),s("#saswp-rbcc-review-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-review-f-unit").val();a<=0&&(a=15),s(".saswp-rbcc-preview-head, .saswp-rbcc-rvs span").css("font-size",a+t)}),s("#saswp-rbcc-review-f-unit").change(function(e){var a=s("#saswp-rbcc-review-f-size").val(),t=s(this).val();s(".saswp-rbcc-preview-head, .saswp-rbcc-rvs span").css("font-size",a+t)}).change(),s("#saswp-rbcc-if-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-rif").css("color",t)}}),s("#saswp-rbcc-if-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-if-f-unit").val();a<=0&&(a=15),s(".saswp-rbcc-rif").css("font-size",a+t)}),s("#saswp-rbcc-if-f-unit").change(function(e){var a=s("#saswp-rbcc-if-f-size").val(),t=s(this).val();s(".saswp-rbcc-rif").css("font-size",a+t)}).change(),s("#saswp-rbcc-stars-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp_star_color .saswp_star").attr("stop-color",t)}}),s("#saswp-rbcc-stars-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val();a<=0&&(a=18),s(".saswp-rvw-str .saswp_star_color svg").css("width",a+"px")}),s("#saswp-rbcc-ar-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-rvar").css("color",t)}}),s("#saswp-rbcc-ar-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-ar-f-unit").val();a<=0&&(a=48),s(".saswp-rbcc-rvar").css("font-size",a+t)}),s("#saswp-rbcc-ar-f-unit").change(function(e){var a=s("#saswp-rbcc-ar-f-size").val(),t=s(this).val();s(".saswp-rbcc-rvar").css("font-size",a+t)}).change(),s(document).on("change","#saswp_review_custom_chk_box",function(e){s(this).is(":checked")?s("#saswp-review-cccc").show():s("#saswp-review-cccc").hide()}),s(document).on("click","#saswp-rbcc-reset",function(e){e.preventDefault(),d_css={background:"#000",color:"#fff","font-size":"15px"},s(".saswp-rbcc-preview-head").css(d_css),s(".saswp-rbcc-rvs span").css(d_css),d_css={color:"#000","font-size":"18px"},s(".saswp-rbcc-rif").css(d_css),s(".saswp_star_color .saswp_star").attr("stop-color","#000"),s(".saswp-rvw-str .saswp_star_color svg").css("width","18px"),d_css={color:"#000","font-size":"48px"},s(".saswp-rbcc-rvar").css(d_css),bg_color="#000",font_color="#fff",s("#saswp-rbcc-review-bg-color, #saswp-rbcc-if-color, #saswp-rbcc-stars-color, #saswp-rbcc-ar-color").val(bg_color),s("#saswp-rbcc-review-f-color").val(font_color),s("#saswp-rbcc-review-f-size").val("15"),s("#saswp-rbcc-review-f-unit").val("px"),s("#saswp-rbcc-if-f-size").val("18"),s("#saswp-rbcc-if-f-unit").val("px"),s("#saswp-rbcc-ar-f-size").val("48"),s("#saswp-rbcc-ar-f-unit").val("px"),s("#saswp-rbcc-stars-f-size").val("18"),s("#saswp-rbcc-stars-f-unit").val("px"),s(".saswp-rbcc-font-color .wp-color-result").css("background-color","#fff"),s(".saswp-rbcc-bg-color .wp-color-result").css("background-color",bg_color),s(".saswp-rbcc-bg-color .wp-color-result").css("color",font_color),s(".saswp-rbcc-dc .wp-color-result").css("background-color",bg_color)}),s(document).on("change","#saswp_enable_gcaptcha",function(e){s(this).is(":checked")?s("#saswp-gkey-captcha-wrapper").removeClass("saswp_hide"):s("#saswp-gkey-captcha-wrapper").addClass("saswp_hide")}),s(document).on("click","#saswp-ar-form-btn",function(e){let a=s("#saswp_g_site_key").val(),t=s("#saswp_g_secret_key").val(),i=0,c={};c=s("#saswp_enable_gcaptcha").is(":checked")?{action:"saswp_update_google_captch_keys",captcha_enable:i=1,gsitekey:a,gsecretkey:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce}:{action:"saswp_update_google_captch_keys",captcha_enable:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},s.ajax({url:ajaxurl,method:"POST",data:c,success:function(s){location.reload()}})})});
\ No newline at end of file
+var saswp_attached_rv=[],saswp_attached_col=[],rmv_boolean=!1,rmv_html="";jQuery(document).ready(function(s){jQuery(".saswpforwp-colorpicker").wpColorPicker(),jQuery(".saswp-onclick-show").hide(),"local_business"==s("#schema_type").find(":selected").val()&&s(document).ready(function(){s(".saswp-business-type-tr").show()});var e=s("#saswp_breadcrumb_home_page_title").val();if(s("#saswp_breadcrumb_home_page_title_text").val(e),s("#saswp_breadcrumb_home_page_title_text").bind("keydown keyup",function(){var e=s(this).val();s("#saswp_breadcrumb_home_page_title").val(e)}),s(document).on("click","#saswp_loc_display_on_front",function(){s(this).is(":checked")?s(".saswp-front-location-inst").removeClass("saswp_hide"):s(".saswp-front-location-inst").addClass("saswp_hide")}),s(document).on("change",".saswp-collection-where",function(){s(this);var e,a=s(this).val();a&&(e=a)&&s.ajax({url:ajaxurl,method:"GET",data:{action:"saswp_get_select2_data",type:e,q:"",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},beforeSend:function(){},success:function(e){if(e){var a="";s.each(e,function(s,e){a+=''+e.text+" "}),s(".saswp-collection-where-data").html(""),s(".saswp-collection-where-data").append(a),saswp_select2()}},error:function(s){console.log("Failed Ajax Request"),console.log(s)}})}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?(s(".saswp-coll-where").addClass("saswp_hide"),s("#saswp-motivatebox").css("display","block")):(s(".saswp-coll-where").removeClass("saswp_hide"),s("#saswp-motivatebox").css("display","none"))}).change(),s(document).on("click",".saswp-dismiss-notices",function(){var e=s(this),a=s(this).attr("notice-type");a&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_dismiss_notices",notice_type:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status&&e.parent().parent().hide()},error:function(s){console.log(s)}})}),saswp_select2(),s(".saswp-upgrade-to-pro").parent().attr({href:"https://structured-data-for-wp.com/pricing/",target:"_blank"}),s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show(saswp_localize_data.translable_txt.attach_review,"#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e=null;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,c="";t>0&&(c+=t+" Reviews, "),i>0&&(c+=i+" Collection"),c||(c=0),s(".saswp-attached-rv-count").text("Attached "+c),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),i>=10&&s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"),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?' ':' ',e.preventDefault();var t="";(t+=''+saswp_localize_data.translable_txt.place_id+' '+saswp_localize_data.translable_txt.language+' '+saswp_localize_data.translable_txt.reviews+' '+a+' '+saswp_localize_data.translable_txt.fetch+' x
')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-language-field").val(),c=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),r=s("#reviews_addon_license_key").val(),n=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(c>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=c%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(r||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:n,reviews_api:r,location:t,language:i,blocks:c,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert(saswp_localize_data.translable_txt.enter_place_id),""==p&&alert(saswp_localize_data.translable_txt.enter_api_key),""==r&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var a,t,i,c=""+saswp_localize_data.translable_txt.using_schema+" ";c+=""+saswp_localize_data.translable_txt.do_you_want+" "+saswp_localize_data.translable_txt.sd_update+" "+saswp_localize_data.translable_txt.before_others+"
",c+='",c+='",s(document).on("submit","#saswp-news-letter-form",function(e){e.preventDefault();var a=s(this),t=a.find('input[name="saswp_subscriber_name"]').val(),i=a.find('input[name="saswp_subscriber_email"]').val();website=a.find('input[name="saswp_subscriber_website"]').val(),s.post(saswp_localize_data.ajax_url,{action:"saswp_subscribe_to_news_letter",saswp_security_nonce:saswp_localize_data.saswp_security_nonce,name:t,email:i,website:website},function(e){e?"Some fields are missing."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid email address."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Already subscribed."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):(s("#saswp-news-letter-status").text("You're subscribed!"),s("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var p={content:c,position:{edge:"top",align:"left"}};p=s.extend(p,{buttons:function(s,e){return button=jQuery(''+saswp_localize_data.button1+" "),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){e.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){e.element.pointer("close")},3e3)}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}}),i=function(){s(saswp_localize_data.displayID).pointer(p).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after(''+saswp_localize_data.button2+" "),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"})}))},p.position&&p.position.defer_loading?s(window).bind("load.wp-pointers",i):i()}s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);if(t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),"premium_features"!=t||"yes"!=jQuery(this).attr("data-extmgr"))return s(".saswp-settings-form-wrap").find(".saswp-"+t).siblings().hide(),s(".saswp-settings-form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1;window.location.href="edit.php?post_type=saswp&page=saswp-extension-manager"}),s(".saswp-schame-type-select").select2(),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"ScholarlyArticle"==a||"Blogposting"==a||"NewsArticle"==a||"AnalysisNewsArticle"==a||"AskPublicNewsArticle"==a||"BackgroundNewsArticle"==a||"OpinionNewsArticle"==a||"ReportageNewsArticle"==a||"ReviewNewsArticle"==a||"WebPage"==a||"ItemPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s("#saswp_location_meta_box").removeClass("saswp_hide"),s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),("Review"==a||"ReviewNewsArticle"==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(),"BreadCrumbs"==a?s(".saswp-schema-modify-section").hide():s(".saswp-schema-modify-section").show(),"FAQ"==a?s(".saswp-enable-faq-markup-class").parent().parent().show():s(".saswp-enable-faq-markup-class").parent().parent().hide(),"Organization"==a&&(s(".saswp-organization-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"WebPage"==a&&(s(".saswp-webpage-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a||"Service"==a||"qanda"==a||"Course"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").select2(),s(".saswp-local-sub-type-2").select2(),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"ScholarlyArticle"==a||"Blogposting"==a||"NewsArticle"==a||"AnalysisNewsArticle"==a||"AskPublicNewsArticle"==a||"BackgroundNewsArticle"==a||"OpinionNewsArticle"==a||"ReportageNewsArticle"==a||"ReviewNewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1),s("#saswp_location_meta_box").removeClass("saswp_hide")),("Review"==a||"ReviewNewsArticle"==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)),"BreadCrumbs"==a?s(".saswp-schema-modify-section").hide():s(".saswp-schema-modify-section").show(),"FAQ"==a?s(".saswp-enable-faq-markup-class").parent().parent().show():s(".saswp-enable-faq-markup-class").parent().parent().hide(),"Organization"==a&&(s(".saswp-organization-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"WebPage"==a&&(s(".saswp-webpage-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpzoom-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpzoom").val(1):s("#saswp-wpzoom").val(0);break;case"saswp-yotpo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yotpo").val(1):s("#saswp-yotpo").val(0);break;case"saswp-ryviu-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ryviu").val(1):s("#saswp-ryviu").val(0);break;case"saswp-ultimate-blocks-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimate-blocks").val(1):s("#saswp-ultimate-blocks").val(0);break;case"saswp-starsrating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-starsrating").val(1):s("#saswp-starsrating").val(0);break;case"saswp-wptastyrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wptastyrecipe").val(1):s("#saswp-wptastyrecipe").val(0);break;case"saswp-recipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-recipress").val(1):s("#saswp-recipress").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp-for-cschema-checkbox":s(this).is(":checked")?s("#saswp-for-cschema").val(1):s("#saswp-for-cschema").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_list_type_class").parent().parent().show(),"ItemList"==s(".saswp_archive_list_type_class").val()&&s(".saswp_archive_schema_type_class").parent().parent().hide()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide(),s(".saswp_archive_list_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_remove_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_remove_cat").val(1):s("#saswp_breadcrumb_remove_cat").val(0);break;case"saswp_breadcrumb_exclude_shop_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_exclude_shop").val(1):s("#saswp_breadcrumb_exclude_shop").val(0);break;case"saswp_breadcrumb_include_parent_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_include_parent_cat").val(1):s("#saswp_breadcrumb_include_parent_cat").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?(s("#saswp_breadcrumb_schema").val(1),s("#saswp_breadcrumb_remove_cat").parent().parent().show(),s("#saswp_breadcrumb_exclude_shop").parent().parent().show(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().show(),s("#saswp_breadcrumb_home_page_title_text").parent().parent().show()):(s("#saswp_breadcrumb_schema").val(0),s("#saswp_breadcrumb_remove_cat").parent().parent().hide(),s("#saswp_breadcrumb_exclude_shop").parent().parent().hide(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().hide(),s("#saswp_breadcrumb_home_page_title_text").parent().parent().hide());break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp_remove_version_tag_checkbox":s(this).is(":checked")?s("#saswp_remove_version_tag").val(1):s("#saswp_remove_version_tag").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-rating-box-app-fields").removeClass("saswp_hide"),s("#saswp-rtb-link").removeClass("saswp_hide")):(s("#saswp-review-module").val(0),s(".saswp-rating-box-app-fields").addClass("saswp_hide"),s("#saswp-rtb-link").addClass("saswp_hide"));break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s(this).parent().parent().next().removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(this).parent().parent().next().addClass("saswp_hide"),s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-rmprating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rmprating").val(1):s("#saswp-rmprating").val(0);break;case"saswp-ratingform-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratingform").val(1):s("#saswp-ratingform").val(0);break;case"saswp-wpdiscuz-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpdiscuz").val(1):s("#saswp-wpdiscuz").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yet-another-stars-rating").val(1):s("#saswp-yet-another-stars-rating").val(0);break;case"saswp-simple-author-box-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simple-author-box").val(1):s("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp_woocommerce_archive_checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp_woocommerce_archive").val(1),s(".saswp_woocommerce_archive_list_type_class").parent().parent().show()):(s("#saswp_woocommerce_archive").val(0),s(".saswp_woocommerce_archive_list_type_class").parent().parent().hide());break;case"saswp-wpecommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpecommerce").val(1):s("#saswp-wpecommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-single-price-product-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-single-price-product").val(1),s(".saswp-single-price-opt").parent().parent().show()):(s("#saswp-single-price-product").val(0),s(".saswp-single-price-opt").parent().parent().hide());break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-enfold-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-enfold").val(1):s("#saswp-enfold").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-theme-reviews").val(1):s("#saswp-wp-theme-reviews").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wpqa-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpqa").val(1):s("#saswp-wpqa").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-polylang-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-polylang").val(1):s("#saswp-polylang").val(0);break;case"saswp-autolistings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-autolistings").val(1):s("#saswp-autolistings").val(0);break;case"saswp-wpml-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpml").val(1):s("#saswp-wpml").val(0);break;case"saswp-metatagmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-metatagmanager").val(1):s("#saswp-metatagmanager").val(0);break;case"saswp-slimseo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-slimseo").val(1):s("#saswp-slimseo").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-video-thumbnails-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-video-thumbnails").val(1):s("#saswp-video-thumbnails").val(0);break;case"saswp-featured-video-plus-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-featured-video-plus").val(1):s("#saswp-featured-video-plus").val(0);break;case"saswp-wp-product-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-product-review").val(1):s("#saswp-wp-product-review").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-ratency-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratency").val(1):s("#saswp-ratency").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-myhome").val(1):s("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-5").val(1):s("#saswp-realestate-5").val(0);break;case"saswp-realestate-7-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-7").val(1):s("#saswp-realestate-7").val(0);break;case"saswp-stamped-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stamped").val(1):s("#saswp-stamped").val(0);break;case"saswp-sabaidiscuss-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-sabaidiscuss").val(1):s("#saswp-sabaidiscuss").val(0);break;case"saswp-geodirectory-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-geodirectory").val(1):s("#saswp-geodirectory").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-classipress").val(1):s("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wplms").val(1):s("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-senseilms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-senseilms").val(1):s("#saswp-senseilms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-wp-event-solution-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-solution").val(1):s("#saswp-wp-event-solution").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-event-prime-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-prime").val(1):s("#saswp-event-prime").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-woo-discount-rules-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-discount-rules").val(1):s("#saswp-woo-discount-rules").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-wpforo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpforo").val(1):s("#saswp-wpforo").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-full-heading-checkbox":s(this).is(":checked")?s("#saswp-full-heading").val(1):s("#saswp-full-heading").val(0);break;case"saswp-truncate-product-description-checkbox":s(this).is(":checked")?s("#saswp-truncate-product-description").val(1):s("#saswp-truncate-product-description").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-default-videoobject-checkbox":s(this).is(":checked")?s("#saswp-default-videoobject").val(1):s("#saswp-default-videoobject").val(0);break;case"saswp-image-resizing-checkbox":s(this).is(":checked")?s("#saswp-image-resizing").val(1):s("#saswp-image-resizing").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-brb-checkbox":s(this).is(":checked")?s("#saswp-brb").val(1):s("#saswp-brb").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-bunyadamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bunyadamp").val(1):s("#saswp-bunyadamp").val(0);break;case"saswp-wpreviewslider-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewslider").val(1):s("#saswp-wpreviewslider").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-cmp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cmp").val(1):s("#saswp-cmp").val(0);break;case"saswp-wpreviewpro-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewpro").val(1):s("#saswp-wpreviewpro").val(0);break;case"saswp-webstories-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webstories").val(1):s("#saswp-webstories").val(0);break;case"saswp-resized-image-folder-checkbox":var t=s("#saswp-resized-image-folder-checkbox");s(this).is(":checked")?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_create_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s("#saswp-resized-image-folder").val(1),s("#saswp-resized-image-folder-checkbox").after('Clear Images ')):(t.prop("checked",!1),t.next().text(e.message),t.next().css("color","red"))},error:function(s){t.prop("checked",!1),t.next().text(s),t.next().css("color","red")}}):(s("#saswp-resized-image-folder").val(0),s(".saswp-clear-images").remove());break;case"saswp-elementor-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-elementor").val(1):s("#saswp-elementor").val(0);break;case"saswp-rannarecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rannarecipe").val(1):s("#saswp-rannarecipe").val(0);break;case"saswp-jetpackrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jetpackrecipe").val(1):s("#saswp-jetpackrecipe").val(0);break;case"saswp-quickandeasyfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-quickandeasyfaq").val(1):s("#saswp-quickandeasyfaq").val(0);break;case"saswp-ultimatefaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatefaqs").val(1):s("#saswp-ultimatefaqs").val(0);break;case"saswp-ultimatemember-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatemember").val(1):s("#saswp-ultimatemember").val(0);break;case"saswp-showcaseidx-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-showcaseidx").val(1):s("#saswp-showcaseidx").val(0);break;case"saswp-realtypress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realtypress").val(1):s("#saswp-realtypress").val(0);break;case"saswp-arconixfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-arconixfaq").val(1):s("#saswp-arconixfaq").val(0);break;case"saswp-faqconcertina-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqconcertina").val(1):s("#saswp-faqconcertina").val(0);break;case"saswp-wpjobmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobmanager").val(1):s("#saswp-wpjobmanager").val(0);break;case"saswp-simplejobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simplejobboard").val(1):s("#saswp-simplejobboard").val(0);break;case"saswp-wpjobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobboard").val(1):s("#saswp-wpjobboard").val(0);break;case"saswp-wpjobopenings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobopenings").val(1):s("#saswp-wpjobopenings").val(0);break;case"saswp-webfaq10-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webfaq10").val(1):s("#saswp-webfaq10").val(0);break;case"saswp-wpfaqschemamarkup-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpfaqschemamarkup").val(1):s("#saswp-wpfaqschemamarkup").val(0);break;case"saswp-faqschemaforpost-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqschemaforpost").val(1):s("#saswp-faqschemaforpost").val(0);break;case"saswp-masteraccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-masteraccordion").val(1):s("#saswp-masteraccordion").val(0);break;case"saswp-easyfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyfaqs").val(1):s("#saswp-easyfaqs").val(0);break;case"saswp-accordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordion").val(1):s("#saswp-accordion").val(0);break;case"saswp-html5responsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-html5responsivefaq").val(1):s("#saswp-html5responsivefaq").val(0);break;case"saswp-wpresponsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresponsivefaq").val(1):s("#saswp-wpresponsivefaq").val(0);break;case"saswp-jolifaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jolifaq").val(1):s("#saswp-jolifaq").val(0);break;case"saswp-ameliabooking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ameliabooking").val(1):s("#saswp-ameliabooking").val(0);break;case"saswp-easyaccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyaccordion").val(1):s("#saswp-easyaccordion").val(0);break;case"saswp-helpiefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-helpiefaq").val(1):s("#saswp-helpiefaq").val(0);break;case"saswp-mooberrybm-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mooberrybm").val(1):s("#saswp-mooberrybm").val(0);break;case"saswp-novelist-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-novelist").val(1):s("#saswp-novelist").val(0);break;case"saswp-accordionfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordionfaq").val(1):s("#saswp-accordionfaq").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-schemaforfaqs").val(1):s("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-customer-reviews").val(1):s("#saswp-wp-customer-reviews").val(0);break;case"saswp-total-recipe-generator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-total-recipe-generator").val(1):s("#saswp-total-recipe-generator").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-timetable-event-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-timetable-event").val(1):s("#saswp-timetable-event").val(0);break;case"saswp-xo-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-xo-event-calendar").val(1):s("#saswp-xo-event-calendar").val(0);break;case"saswp-vs-event-list-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-vs-event-list").val(1):s("#saswp-vs-event-list").val(0);break;case"saswp-calendarize-it-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-calendarize-it").val(1):s("#saswp-calendarize-it").val(0);break;case"saswp-events-schedule-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-schedule").val(1):s("#saswp-events-schedule").val(0);break;case"saswp-woo-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-event-manager").val(1):s("#saswp-woo-event-manager").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stachethemes-event-calendar").val(1):s("#saswp-stachethemes-event-calendar").val(0);break;case"saswp-all-in-one-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-all-in-one-event-calendar").val(1):s("#saswp-all-in-one-event-calendar").val(0);break;case"saswp-event-on-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-on").val(1):s("#saswp-event-on").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0);break;case"saswp-publish-press-authors-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-publish-press-authors").val(1):s("#saswp-publish-press-authors").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var c="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(c='Image size is smaller than recommended size
'),s(".saswp_image_div_"+t).html(''+c),"saswp_collection_image"==t&&(s(".saswp_image_div_"+t).html(' '+c),s(".saswp-r1-aimg").each(function(a,t){s(this).children("img").attr("src");0==s(this).children("img").attr("data-is-default-img")&&s(this).children("img").attr("src",e.url)}),s(".saswp-rc-a").each(function(a,t){s(this).children("img").attr("src");0==s(this).children("img").attr("data-is-default-img")&&s(this).children("img").attr("src",e.url)}))}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-post-specific-wrapper[data-id="+a+"] .saswp-post-specific-setting").after(e),s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){t.removeClass("updating-message"),"t"==e.status?(s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+a).val(),c=s(this).attr("data-schema-name");if(s(this).is(":checked")){var p=0;s("."+c).empty(),s("."+c).text("Enable "+c+" on this page"),s(".custom").empty(),s(".custom").text("Enable custom schema on this page"),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"),s(".custom").empty(),s(".custom").text("Disable custom schema on this page"),1==i?(s("."+c).empty(),s("."+c).text("Disable "+c+" on this page"),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s("."+c).empty(),s("."+c).text("Disable "+c+" on this page"),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"));var 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,req_from:saswp_localize_data.req_from,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),!0==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),c=s("#"+i+"_addon_license_key").val();t&&i&&c?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status&&e.days_remaining<0?(s("span.saswp_inactive_status_reviews").text("Expired"),s("span.saswp_inactive_status_reviews").css({color:"red","font-weight":"400"})):"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s("span.addon-activated_reviews").css({color:"green","margin-left":"8px","font-weight":"400"}),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.inactive_status_"+i).text("Active"),s("span.inactive_status_"+i).css({color:"green","margin-left":"8px","font-weight":"400"}),s("span.inactive_status_"+i).removeClass("inactive_status_"+i).addClass("addon-activated_"+i)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.addon-activated_"+i).text("Inactive"),s("span.addon-activated_"+i).css("color","#bebfc0"),s("span.addon-activated_"+i).removeClass("addon-activated_"+i).addClass("inactive_status_"+i),s("span.saswp-limit-span").css("display","none")),a.removeClass("updating-message"),s(".saswp-note-p").text(e.message)},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),jQuery(document).on("click",".user_refresh_single_addon",function(s){var e=jQuery(this);s.preventDefault();var a=e.attr("add-on"),t=e.attr("remaining_days_org"),i=jQuery("#"+a+"_addon_license_key").val();document.getElementById("user_refresh_"+a).classList.add("spin");var c=new Date,p=function s(e){for(var a=e+"=",t=document.cookie.split(";"),i=0;i1||o<1?(document.cookie="saswp_addon_refresh_check="+c,jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:i,license_status:"active",add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){jQuery("#"+a+"_addon_license_key_status").val(s.status),document.getElementById("user_refresh_"+a).classList.remove("spin"),e.removeClass("updating-message")},error:function(s){console.log(s)}})):(setTimeout(function(){jQuery(".dashicons").removeClass("spin")},0),alert("Please try after "+(p=Math.abs(p.getDate()+1)+"/"+Math.abs(p.getMonth()+1)+"/"+p.getFullYear()+" "+p.getHours()+":"+p.getMinutes()+":"+p.getSeconds())))});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#refresh_license_icon_top-").trigger("click")},0),jQuery(document).on("click","#refresh_license_icon_top-",function(e){document.getElementById("refresh_license_icon_top").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_license_icon_top").classList.remove("spin");var a=e.days_remaining;a>=0&&a<=7&&s("span.saswp-addon-alert").text("expiring in "+a+" days ")}else document.getElementsByClassName("saswp-addon-alert")[0].style.color="green",document.getElementsByClassName("renewal-license")[0].style.display="none",document.getElementById("refresh_license_icon_top").classList.remove("spin"),s("span.pro_warning").css("display","none")}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#user_refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#user_refresh_expired_addon-",function(e){document.getElementById("user_refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("user_refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?(s("span#exp").text("Expired"),location.reload()):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message"))});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");setTimeout(function(){jQuery("#refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#refresh_expired_addon-",function(e){document.getElementById("refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?s("span#exp").text("Expired"):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_expired_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();""!=s.trim(a)&&i&&""!=s.trim(t)&&!0==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"),!1==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='Sub Business Type ';i+='',s.each(e.result,function(s,e){i+=''+e+" "}),i+=" ",i+=" ",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();var a='';a+="Review Item Feature ",a+=' ',a+="Rating ",a+=' ',a+='x ',a+=" ",s(".saswp-review-item-list-table").append(a)}),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||alert(s.msg),setTimeout(function(){location.reload()},1e3),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review(),saswp_enable_rating_automate()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide();var o=window.location.hash;if("#saswp-default-container"==o?s(".saswp-global-container:eq(2)").show():"#saswp-knowledge-container"==o?s(".saswp-global-container:eq(1)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();(-1!=t.indexOf("_image")||-1!=t.indexOf("_logo"))&&(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),c=s(this).attr("div_type"),p=s(this).attr("itemlist_sub_type"),r=s("#saswp_specific_"+t).find(".saswp-"+c+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div:nth-child("+r+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,c,t,i+"_",p)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-table-close-new",function(){s(this).closest(".saswp-dynamic-properties").remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),c="",p=a.toLowerCase()+"_"+i,r="saswp_fixed_image["+i+"]";"manual_text"==t?(c+=' ',c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(c+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,c+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2())},"json"):"custom_field"==t?(c+='',c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"fixed_image"==t?(c+="",c+="",c+=' ',c+=' ',c+=' ',c+=' ',c+='',c+="
",c+=" ",c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):(c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var c=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:c,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_enable_rating_automate(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('X ')}),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){let l="",w="saswp_hide";saswp_localize_data.saswp_enable_gcaptcha&&1==saswp_localize_data.saswp_enable_gcaptcha&&(l="checked",w="");var d='",jQuery(jQuery(".wrap")).prepend(d)}jQuery(document).on("click",".saswp-clear-images",function(e){e.preventDefault();var a=s(this);!0==confirm("Are you sure? It will remove all the resized images")&&(a.addClass("updating-message"),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_clear_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){a.removeClass("updating-message"),"t"!=s.status&&alert("something went wrong")},error:function(s){console.log(s)}}))}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("Settings "),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({spacing:"5px",rtl:saswp_localize_data.is_rtl,rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().next().val(e)}}).on("rateyo.change",function(e,a){var t=a.rating;s(this).next().text(t)}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('Invalid Phone Number ')}),saswpCollectionSlider(),s(document).on("click",".saswp-add-rv-btn",function(){s(".saswp-dynamic-platforms").toggle()}),s(".saswp-rmv-coll-rv").on("click",function(){if(rmv_boolean=!rmv_boolean,saswp_on_collection_design_change(),jQuery(jQuery(".saswp-add-dynamic-section")).remove(),rmv_boolean){var s="";s+='',s+='
',s+=' ',s+="
",s+='
',s+='Choose Platform '+jQuery("#saswp-plaftorm-list").html()+" ",s+="
",s+="
",jQuery(jQuery(".saswp-collection-preview")[0]).after(s)}}),s(document).on("change","#saswp_dynamic_platforms",function(){var e=s(this).val(),a="";a+='',a+=" ",a+='Add ',s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after(a);var t=ajaxurl+"?action=saswp_add_reviews_to_select2&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&platform_id="+e;s("#saswp_dynamic_reviews_list").select2({ajax:{url:t,dataType:"json",processResults:function(s){if(s.status)return{results:s.message}}}})}),s(document).on("click",".saswp-add-single-rv",function(e){e.preventDefault();var a=s("#saswp_dynamic_reviews_list").val(),t=s("#saswp_dynamic_platforms").val();a&&saswp_get_collection_data(null,t,null,a,!0)}),s(document).on("click",".saswp-remove-coll-rv",function(){var e=s(this).attr("data-id"),a=s(this).attr("platform-id");if(a){var t=saswp_collection[a].filter(function(s){return s.saswp_review_id!=e});saswp_collection[a]=t,saswp_on_collection_design_change()}}),s(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val(),a=s(".saswp-collection-sorting").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),s(".saswp-rmv-coll-rv").hide(),s(".saswp-add-dynamic-section").hide(),"grid"==e&&(s(".saswp-grid-options").removeClass("saswp_hide"),s(".saswp-rmv-coll-rv").show(),s(".saswp-add-dynamic-section").show(),s(".saswp-coll-review-wrapper").removeClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"gallery"==e&&(s(".saswp-slider-options").removeClass("saswp_hide"),s(".saswp-coll-review-wrapper").removeClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px"),s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"popup"==e&&(s(".saswp-collection-lp").css("height","31px"),s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"badge"==e&&(s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").removeClass("saswp_hide")),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide"),"recent"==a?(s("#saswp_collection_specific_rating").parent().parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")):(s("#saswp_collection_specific_rating").parent().parent().addClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();let c=s("#saswp-review-platform-places").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a,null,null,c)):alert("Enter Count")});var h=s("#saswp_total_reviews_list").val();h&&saswp_get_collection_data(null,null,null,null,h);let v=s("#saswp-plaftorm-list").find("option:first-child").val();saswp_get_platform_place_list(v),(a=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",a.innerHTML="Copied!",document.body.appendChild(a);var m=document.getElementById("saswp-motivatebox");m&&m.addEventListener("mouseup",function(s){var e,i,c,p,r,s=s||event,n=s.target||s.srcElement;"motivate"==n.className&&(e=n,(i=document.createRange()).selectNodeContents(e),(c=window.getSelection()).removeAllRanges(),c.addRange(i),function s(){var e;try{e=document.execCommand("copy")}catch(a){e=!1}return e}()&&(r=(p=s)||event,clearTimeout(t),a.style.left=r.pageX-10+"px",a.style.top=r.pageY+15+"px",a.style.opacity=1,t=setTimeout(function(){a.style.opacity=0},500)))},!1),s(document).on("change","#saswp-plaftorm-list",function(e){e.preventDefault();let a=s(this).val();saswp_get_platform_place_list(a)}),s(document).on("change",".saswp_archive_list_type_class",function(e){e.preventDefault(),"ItemList"==s(this).val()?s(".saswp_archive_schema_type_class").parent().parent().hide():s(".saswp_archive_schema_type_class").parent().parent().show()}),s(document).on("change",".saswp-custom-fields-name, .saswp-custom-meta-list",function(e){e.preventDefault();let a=s(".saswp-custom-fields-name").val(),t=s(".saswp-custom-meta-list").val(),i=s(this).attr("class");if("saswp-custom-fields-name"==i&&(a=s(this).val(),t=s(this).parent().next().find("select").val()),"saswp-custom-meta-list"==i&&(t=s(this).val(),a=s(this).closest("tr").find(".saswp-custom-fields-name").val()),"saswp_faq_main_entity"==a&&"saswp_repeater_mapping"==t){let c=s(".saswp-itemlist-item-type-list").attr("data-id");0==s(".saswp-add-faq-repeat-que").length&&s(this).closest("tr").after('Add Faq Question '),0==s(".saswp-faq-repeater-tr").length&&s(this).closest("tr").after(' ')}else{let p=0;s(".saswp-custom-meta-list").each(function(e){"saswp_repeater_mapping"==s(this).val()&&(p=1)}),0==p&&(s(".saswp-faq-repeater-tr").remove(),s(".saswp-faq-question").remove(),s(".saswp-add-faq-repeat-que").remove())}}),s("#saswp-rating-module-css-app").change(function(e){s(this).is(":checked")?s(".saswp-rbcc-fields").removeClass("saswp_hide"):s(".saswp-rbcc-fields").addClass("saswp_hide")}).change(),s(document).on("click","#saswp-rtb-link",function(e){s("#saswp-appearance-modal").fadeIn()}),s(document).on("click","#saswp-appearance-modal-close",function(e){s("#saswp-appearance-modal").fadeOut()}),s("#saswp-rbcc-review-bg-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-preview-head").css("background",t),s(".saswp-rbcc-rvs span").css("background",t)}}),s("#saswp-rbcc-review-f-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-preview-head").css("color",t),s(".saswp-rbcc-rvs span").css("color",t)}}),s("#saswp-rbcc-review-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-review-f-unit").val();a<=0&&(a=15),s(".saswp-rbcc-preview-head, .saswp-rbcc-rvs span").css("font-size",a+t)}),s("#saswp-rbcc-review-f-unit").change(function(e){var a=s("#saswp-rbcc-review-f-size").val(),t=s(this).val();s(".saswp-rbcc-preview-head, .saswp-rbcc-rvs span").css("font-size",a+t)}).change(),s("#saswp-rbcc-if-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-rif").css("color",t)}}),s("#saswp-rbcc-if-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-if-f-unit").val();a<=0&&(a=15),s(".saswp-rbcc-rif").css("font-size",a+t)}),s("#saswp-rbcc-if-f-unit").change(function(e){var a=s("#saswp-rbcc-if-f-size").val(),t=s(this).val();s(".saswp-rbcc-rif").css("font-size",a+t)}).change(),s("#saswp-rbcc-stars-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp_star_color .saswp_star").attr("stop-color",t)}}),s("#saswp-rbcc-stars-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val();a<=0&&(a=18),s(".saswp-rvw-str .saswp_star_color svg").css("width",a+"px")}),s("#saswp-rbcc-ar-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-rvar").css("color",t)}}),s("#saswp-rbcc-ar-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-ar-f-unit").val();a<=0&&(a=48),s(".saswp-rbcc-rvar").css("font-size",a+t)}),s("#saswp-rbcc-ar-f-unit").change(function(e){var a=s("#saswp-rbcc-ar-f-size").val(),t=s(this).val();s(".saswp-rbcc-rvar").css("font-size",a+t)}).change(),s(document).on("change","#saswp_review_custom_chk_box",function(e){s(this).is(":checked")?s("#saswp-review-cccc").show():s("#saswp-review-cccc").hide()}),s(document).on("click","#saswp-rbcc-reset",function(e){e.preventDefault(),d_css={background:"#000",color:"#fff","font-size":"15px"},s(".saswp-rbcc-preview-head").css(d_css),s(".saswp-rbcc-rvs span").css(d_css),d_css={color:"#000","font-size":"18px"},s(".saswp-rbcc-rif").css(d_css),s(".saswp_star_color .saswp_star").attr("stop-color","#000"),s(".saswp-rvw-str .saswp_star_color svg").css("width","18px"),d_css={color:"#000","font-size":"48px"},s(".saswp-rbcc-rvar").css(d_css),bg_color="#000",font_color="#fff",s("#saswp-rbcc-review-bg-color, #saswp-rbcc-if-color, #saswp-rbcc-stars-color, #saswp-rbcc-ar-color").val(bg_color),s("#saswp-rbcc-review-f-color").val(font_color),s("#saswp-rbcc-review-f-size").val("15"),s("#saswp-rbcc-review-f-unit").val("px"),s("#saswp-rbcc-if-f-size").val("18"),s("#saswp-rbcc-if-f-unit").val("px"),s("#saswp-rbcc-ar-f-size").val("48"),s("#saswp-rbcc-ar-f-unit").val("px"),s("#saswp-rbcc-stars-f-size").val("18"),s("#saswp-rbcc-stars-f-unit").val("px"),s(".saswp-rbcc-font-color .wp-color-result").css("background-color","#fff"),s(".saswp-rbcc-bg-color .wp-color-result").css("background-color",bg_color),s(".saswp-rbcc-bg-color .wp-color-result").css("color",font_color),s(".saswp-rbcc-dc .wp-color-result").css("background-color",bg_color)}),s(document).on("change","#saswp_enable_gcaptcha",function(e){s(this).is(":checked")?s("#saswp-gkey-captcha-wrapper").removeClass("saswp_hide"):s("#saswp-gkey-captcha-wrapper").addClass("saswp_hide")}),s(document).on("click","#saswp-ar-form-btn",function(e){let a=s("#saswp_g_site_key").val(),t=s("#saswp_g_secret_key").val(),i=0,c={};c=s("#saswp_enable_gcaptcha").is(":checked")?{action:"saswp_update_google_captch_keys",captcha_enable:i=1,gsitekey:a,gsecretkey:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce}:{action:"saswp_update_google_captch_keys",captcha_enable:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},s.ajax({url:ajaxurl,method:"POST",data:c,success:function(s){location.reload()}})})});
\ No newline at end of file
diff --git a/admin_section/settings.php b/admin_section/settings.php
index d066bc7f..69fee75a 100644
--- a/admin_section/settings.php
+++ b/admin_section/settings.php
@@ -3001,6 +3001,19 @@ function saswp_compatibility_page_callback() {
'name' => 'sd_data[saswp-showcaseidx]',
)
);
+
+ $realtypress = array(
+ 'label' => 'RealtyPress Premium',
+ 'id' => 'saswp-realtypress-checkbox',
+ 'name' => 'saswp-realtypress-checkbox',
+ 'type' => 'checkbox',
+ 'class' => 'checkbox saswp-checkbox',
+ 'note' => saswp_get_field_note('realtypress'),
+ 'hidden' => array(
+ 'id' => 'saswp-realtypress',
+ 'name' => 'sd_data[saswp-realtypress]',
+ )
+ );
$arconixfaq = array(
'label' => 'Arconix FAQ',
@@ -4387,6 +4400,7 @@ function saswp_compatibility_page_callback() {
$realestate_7['note'] = $real_addon_req;
$geo_directory['note'] = $real_addon_req;
$showcaseidx['note'] = $real_addon_req;
+ $realtypress['note'] = $real_addon_req;
}
@@ -4623,6 +4637,7 @@ function saswp_compatibility_page_callback() {
$ultimatefaqs,
$ultimatemember,
$showcaseidx,
+ $realtypress,
$arconixfaq,
$faqconcertina,
$faqschemaforpost,
diff --git a/core/array-list/compatibility-list.php b/core/array-list/compatibility-list.php
index 80aee7de..486b3807 100644
--- a/core/array-list/compatibility-list.php
+++ b/core/array-list/compatibility-list.php
@@ -148,6 +148,12 @@
'opt_name' => 'saswp-showcaseidx',
'part_in' => 'pro',
),
+ 'realtypress' => array(
+ 'name' => 'RealtyPress Premium',
+ 'free' => 'realtypress-premium/realtypress.php',
+ 'opt_name' => 'saswp-realtypress',
+ 'part_in' => 'pro',
+ ),
'easyaccordion' => array(
'name' => 'Easy Accordion',
'free' => 'easy-accordion-free/plugin-main.php',
diff --git a/output/class-saswp-output-compatibility.php b/output/class-saswp-output-compatibility.php
index ca4002fb..add2e47b 100644
--- a/output/class-saswp-output-compatibility.php
+++ b/output/class-saswp-output-compatibility.php
@@ -632,6 +632,9 @@ public function ultimatemember_on_activation() {
public function showcaseidx_on_activation() {
$this->saswp_update_option_on_compatibility_activation('saswp-showcaseidx');
}
+ public function realtypress_on_activation() {
+ $this->saswp_update_option_on_compatibility_activation('saswp-realtypress');
+ }
public function easyaccordion_on_activation() {
$this->saswp_update_option_on_compatibility_activation('saswp-easyaccordion');
}
From fe4a71f6ce23500133034810bddd58d14a3992b0 Mon Sep 17 00:00:00 2001
From: Sanjeev Kumar
Date: Tue, 29 Oct 2024 14:07:28 +0530
Subject: [PATCH 12/18] #2205
---
core/3rd-party/class-saswp-youtube.php | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/core/3rd-party/class-saswp-youtube.php b/core/3rd-party/class-saswp-youtube.php
index b1e7e6ce..32f5409f 100644
--- a/core/3rd-party/class-saswp-youtube.php
+++ b/core/3rd-party/class-saswp-youtube.php
@@ -39,9 +39,12 @@ public static function getVideoInfo($vid, $api_key)
if($result['items'][0]['snippet']['description']){ $vinfo['description'] = $result['items'][0]['snippet']['description']; }
if($result['items'][0]['statistics']['viewCount']){ $vinfo['viewCount'] = $result['items'][0]['statistics']['viewCount']; }
+ if ( isset( $vinfo['duration'] ) && $vinfo['duration'] != 'P0D' ) {
- $interval = new DateInterval($vinfo['duration']);
- $vinfo['duration_sec'] = $interval->h * 3600 + $interval->i * 60 + $interval->s;
+ $interval = new DateInterval($vinfo['duration']);
+ $vinfo['duration_sec'] = $interval->h * 3600 + $interval->i * 60 + $interval->s;
+
+ }
$vinfo['thumbnail']['default'] = self::$thumbnail_base . $vid . '/default.jpg';
$vinfo['thumbnail']['mqDefault'] = self::$thumbnail_base . $vid . '/mqdefault.jpg';
From bd55ffff3bb891de0e1f6cdd991e2e35ff520fdd Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Tue, 29 Oct 2024 15:38:48 +0530
Subject: [PATCH 13/18] #2071
---
core/array-list/repeater-fields.php | 88 ++++++-
core/array-list/schema-properties.php | 340 ++++++++++++++++++++++++++
core/array-list/schemas.php | 1 +
core/global.php | 3 +-
output/class-saswp-output-service.php | 209 ++++++++++++++++
output/function.php | 7 +
output/markup.php | 222 +++++++++++++++--
output/output.php | 21 ++
view/schema-type.php | 2 +-
9 files changed, 865 insertions(+), 28 deletions(-)
diff --git a/core/array-list/repeater-fields.php b/core/array-list/repeater-fields.php
index 0275600e..7d26489e 100644
--- a/core/array-list/repeater-fields.php
+++ b/core/array-list/repeater-fields.php
@@ -53,11 +53,14 @@
'product_pros' => 'product_pros',
'product_cons' => 'product_cons',
),
- 'SoftwareApplication' => array(
- 'product_reviews' => 'product_reviews',
- 'product_pros' => 'product_pros',
- 'product_cons' => 'product_cons',
- ),
+ 'ProductGroup' => array(
+ 'product_group_has_varient' => 'product_group_has_varient',
+ ),
+ 'SoftwareApplication' => array(
+ 'product_reviews' => 'product_reviews',
+ 'product_pros' => 'product_pros',
+ 'product_cons' => 'product_cons',
+ ),
'DataFeed' => array(
'feed_element' => 'feed_element',
),
@@ -306,6 +309,81 @@
'type' => 'text',
),
),
+ 'product_group_has_varient' => array(
+ array(
+ 'label' => 'Sku',
+ 'name' => 'saswp_product_grp_sku',
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'GTIN14',
+ 'name' => 'saswp_product_grp_gtin14',
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'Image',
+ 'name' => 'saswp_product_grp_img',
+ 'type' => 'media',
+ ),
+ array(
+ 'label' => 'Name',
+ 'name' => 'saswp_product_grp_name',
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'Description',
+ 'name' => 'saswp_product_grp_description',
+ 'type' => 'textarea',
+ ),
+ array(
+ 'label' => 'Offer URL',
+ 'name' => 'saswp_product_grp_offer_url',
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'Offer Currency',
+ 'name' => 'saswp_product_grp_offer_currency',
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'Offer Price',
+ 'name' => 'saswp_product_grp_offer_price',
+ 'type' => 'number',
+ ),
+ array(
+ 'label' => 'Price Valid Until',
+ 'name' => 'saswp_product_grp_schema_priceValidUntil',
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'Offer Item Condition',
+ 'name' => 'saswp_product_grp_offer_icondition',
+ 'type' => 'select',
+ 'options' => array(
+ 'NewCondition' => 'New Condition',
+ 'RefurbishedCondition' => 'Refurbished Condition',
+ 'UsedCondition' => 'Used Condition',
+ ),
+ ),
+ array(
+ 'label' => 'Offer Availability',
+ 'name' => 'saswp_product_grp_offer_avail',
+ 'type' => 'select',
+ 'options' => array(
+ 'InStock' => 'In Stock',
+ 'BackOrder' => 'Back Order',
+ 'Discontinued' => 'Discontinued',
+ 'Discontinued' => 'Discontinued',
+ 'InStoreOnly' => 'In Store Only',
+ 'LimitedAvailability' => 'Limited Availability',
+ 'OnlineOnly' => 'Online Only',
+ 'OutOfStock' => 'Out Of Stock',
+ 'PreOrder' => 'Pre Order',
+ 'PreSale' => 'Pre Sale',
+ 'SoldOut' => 'Sold Out',
+ ),
+ ),
+ ),
'feed_element' => array(
array(
'label' => 'Date Created',
diff --git a/core/array-list/schema-properties.php b/core/array-list/schema-properties.php
index 81304a42..5b6f2e8b 100644
--- a/core/array-list/schema-properties.php
+++ b/core/array-list/schema-properties.php
@@ -6401,6 +6401,346 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
);
break;
+
+ case 'ProductGroup':
+
+ $product_details = array();
+
+ if($manual == null && $post_id){
+
+ $service = new SASWP_Output_Service();
+ $product_details = $service->saswp_woocommerce_product_details($post_id);
+
+ }
+
+ $meta_field = array(
+ array(
+ 'label' => 'Name',
+ 'id' => 'saswp_product_grp_schema_name_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_remove_warnings($product_details, 'product_name', 'saswp_string')
+ ),
+ array(
+ 'label' => 'ID',
+ 'id' => 'saswp_product_grp_schema_id_'.$schema_id,
+ 'type' => 'text'
+ ),
+ array(
+ 'label' => 'URL',
+ 'id' => 'saswp_product_grp_schema_url_'.$schema_id,
+ 'type' => 'text',
+ 'default' => get_permalink()
+ ),
+ array(
+ 'label' => 'Description',
+ 'id' => 'saswp_product_grp_schema_description_'.$schema_id,
+ 'type' => 'textarea',
+ 'default' => saswp_remove_warnings($product_details, 'product_description', 'saswp_string')
+ ),
+ array(
+ 'label' => 'Image',
+ 'id' => 'saswp_product_grp_schema_image_'.$schema_id,
+ 'type' => 'media',
+ ),
+ array(
+ 'label' => 'Brand Name',
+ 'id' => 'saswp_product_grp_schema_brand_name_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_remove_warnings($product_details, 'product_brand', 'saswp_string')
+ ),
+ array(
+ 'label' => 'Product Group ID',
+ 'id' => 'saswp_product_grp_schema_group_id_'.$schema_id,
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'Varies By',
+ 'id' => 'saswp_product_grp_schema_varies_by_'.$schema_id,
+ 'type' => 'text',
+ 'note' => 'Note: Enter all the varies name in comma separated',
+ ),
+ array(
+ 'label' => 'Price',
+ 'id' => 'saswp_product_grp_schema_price_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string')
+ ),
+ array(
+ 'label' => 'High Price',
+ 'id' => 'saswp_product_grp_schema_high_price_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string')
+ ),
+ array(
+ 'label' => 'Low Price',
+ 'id' => 'saswp_product_grp_schema_low_price_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string')
+ ),
+ array(
+ 'label' => 'Offer Count',
+ 'id' => 'saswp_product_grp_schema_offer_count_'.$schema_id,
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'Price Valid Until',
+ 'id' => 'saswp_product_grp_schema_priceValidUntil_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_remove_warnings($product_details, 'product_priceValidUntil', 'saswp_string')
+ ),
+ array(
+ 'label' => 'Currency',
+ 'id' => 'saswp_product_grp_schema_currency_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_remove_warnings($product_details, 'product_currency', 'saswp_string')
+ ),
+ array(
+ 'label' => 'Availability',
+ 'id' => 'saswp_product_grp_schema_availability_'.$schema_id,
+ 'type' => 'select',
+ 'options' => array(
+ 'InStock' => 'In Stock',
+ 'BackOrder' => 'Back Order',
+ 'Discontinued' => 'Discontinued',
+ 'Discontinued' => 'Discontinued',
+ 'InStoreOnly' => 'In Store Only',
+ 'LimitedAvailability' => 'Limited Availability',
+ 'OnlineOnly' => 'Online Only',
+ 'OutOfStock' => 'Out Of Stock',
+ 'PreOrder' => 'Pre Order',
+ 'PreSale' => 'Pre Sale',
+ ),
+ 'default' => saswp_remove_warnings($product_details, 'product_availability', 'saswp_string')
+ ),
+ array(
+ 'label' => 'Condition',
+ 'id' => 'saswp_product_grp_schema_condition_'.$schema_id,
+ 'type' => 'select',
+ 'options' => array(
+ 'NewCondition' => 'New',
+ 'UsedCondition' => 'Used',
+ 'RefurbishedCondition' => 'Refurbished',
+ 'DamagedCondition' => 'Damaged',
+ ),
+ ),
+ array(
+ 'label' => 'SKU',
+ 'id' => 'saswp_product_grp_schema_sku_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_remove_warnings($product_details, 'product_sku', 'saswp_string')
+ ),
+ array(
+ 'label' => 'MPN',
+ 'id' => 'saswp_product_grp_schema_mpn_'.$schema_id,
+ 'type' => 'text',
+ 'note' => 'OR',
+ 'default' => saswp_remove_warnings($product_details, 'product_mpn', 'saswp_string')
+ ),
+ array(
+ 'label' => 'GTIN8',
+ 'id' => 'saswp_product_grp_schema_gtin8_'.$schema_id,
+ 'type' => 'text',
+ 'note' => 'OR',
+ 'default' => saswp_remove_warnings($product_details, 'product_gtin8', 'saswp_string')
+ ),
+ array(
+ 'label' => 'GTIN13',
+ 'id' => 'saswp_product_grp_schema_gtin13_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_remove_warnings($product_details, 'product_gtin13', 'saswp_string')
+ ),
+ array(
+ 'label' => 'GTIN12',
+ 'id' => 'saswp_product_grp_schema_gtin12_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_remove_warnings($product_details, 'product_gtin12', 'saswp_string')
+ ),
+ array(
+ 'label' => 'Seller Organization',
+ 'id' => 'saswp_product_grp_schema_seller_'.$schema_id,
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'Additional Type',
+ 'id' => 'saswp_product_grp_additional_type_'.$schema_id,
+ 'type' => 'text',
+ ),
+ array(
+ 'label' => 'Return Policy Applicable Country Code',
+ 'id' => 'saswp_product_grp_schema_rp_country_code_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'US'
+ ),
+ ),
+ array(
+ 'label' => 'Return Policy Category',
+ 'id' => 'saswp_product_grp_schema_rp_category_'.$schema_id,
+ 'type' => 'select',
+ 'options' => array(
+ '' => 'Select Return Policy Category',
+ 'MerchantReturnFiniteReturnWindow' => 'MerchantReturnFiniteReturnWindow',
+ 'MerchantReturnNotPermitted' => 'MerchantReturnNotPermitted',
+ 'MerchantReturnUnlimitedWindow' => 'MerchantReturnUnlimitedWindow',
+ 'MerchantReturnUnspecified' => 'MerchantReturnUnspecified',
+ )
+ ),
+ array(
+ 'label' => 'Return Policy Merchant Return Days',
+ 'id' => 'saswp_product_grp_schema_rp_return_days_'.$schema_id,
+ 'type' => 'number',
+ 'attributes' => array(
+ 'placeholder' => '5'
+ ),
+ ),
+ array(
+ 'label' => 'Return Policy Return Method',
+ 'id' => 'saswp_product_grp_schema_rp_return_method_'.$schema_id,
+ 'type' => 'select',
+ 'options' => array(
+ '' => 'Select Return Policy Method',
+ 'ReturnAtKiosk' => 'ReturnAtKiosk',
+ 'ReturnByMail' => 'ReturnByMail',
+ 'ReturnInStore' => 'ReturnInStore',
+ )
+ ),
+ array(
+ 'label' => 'Return Policy Return Fees',
+ 'id' => 'saswp_product_grp_schema_rp_return_fees_'.$schema_id,
+ 'type' => 'select',
+ 'options' => array(
+ '' => 'Select Return Policy Fees',
+ 'FreeReturn' => 'FreeReturn',
+ 'ReturnFeesCustomerResponsibility' => 'ReturnFeesCustomerResponsibility',
+ 'ReturnShippingFees' => 'ReturnShippingFees',
+ )
+ ),
+ array(
+ 'label' => 'Shipping Rate Value',
+ 'id' => 'saswp_product_grp_schema_sr_value_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => '3.8'
+ ),
+ ),
+ array(
+ 'label' => 'Shipping Rate Currency',
+ 'id' => 'saswp_product_grp_schema_sr_currency_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'USD'
+ ),
+ ),
+ array(
+ 'label' => 'Shipping Destination Locality',
+ 'id' => 'saswp_product_grp_schema_sa_locality_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'New York'
+ ),
+ ),
+ array(
+ 'label' => 'Shipping Destination Region',
+ 'id' => 'saswp_product_grp_schema_sa_region_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'NY'
+ ),
+ ),
+ array(
+ 'label' => 'Shipping Destination Postal Code',
+ 'id' => 'saswp_product_grp_schema_sa_postal_code_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => '10019'
+ ),
+ ),
+ array(
+ 'label' => 'Shipping Destination Street Address',
+ 'id' => 'saswp_product_grp_schema_sa_address_'.$schema_id,
+ 'type' => 'textarea',
+ 'attributes' => array(
+ 'placeholder' => '148 W 51st St'
+ ),
+ ),
+ array(
+ 'label' => 'Shipping Destination Country',
+ 'id' => 'saswp_product_grp_schema_sa_country_'.$schema_id,
+ 'type' => 'text',
+ 'attributes' => array(
+ 'placeholder' => 'US'
+ ),
+ ),
+ array(
+ 'label' => 'Shipping Handling Time Min Value',
+ 'id' => 'saswp_product_grp_schema_sdh_minval_'.$schema_id,
+ 'type' => 'number',
+ 'attributes' => array(
+ 'placeholder' => '0'
+ ),
+ ),
+ array(
+ 'label' => 'Shipping Handling Time Max Value',
+ 'id' => 'saswp_product_grp_schema_sdh_maxval_'.$schema_id,
+ 'type' => 'number',
+ 'attributes' => array(
+ 'placeholder' => '1'
+ ),
+ ),
+ array(
+ 'label' => 'Shipping Handling Time Unit Code',
+ 'id' => 'saswp_product_grp_schema_sdh_unitcode_'.$schema_id,
+ 'type' => 'text',
+ 'note' => 'Note: Enter unit code as DAY',
+ 'attributes' => array(
+ 'placeholder' => 'DAY'
+ ),
+ ),
+ array(
+ 'label' => 'Shipping Transit Time Min Value',
+ 'id' => 'saswp_product_grp_schema_sdt_minval_'.$schema_id,
+ 'type' => 'number',
+ 'attributes' => array(
+ 'placeholder' => '2'
+ ),
+ ),
+ array(
+ 'label' => 'Shipping Transit Time Max Value',
+ 'id' => 'saswp_product_grp_schema_sdt_maxval_'.$schema_id,
+ 'type' => 'number',
+ 'attributes' => array(
+ 'placeholder' => '5'
+ ),
+ ),
+ array(
+ 'label' => 'Shipping Transit Time Unit Code',
+ 'id' => 'saswp_product_grp_schema_sdt_unitcode_'.$schema_id,
+ 'type' => 'text',
+ 'note' => 'Note: Enter unit code as DAY',
+ 'attributes' => array(
+ 'placeholder' => 'DAY'
+ ),
+ ),
+ array(
+ 'label' => 'Aggregate Rating',
+ 'id' => 'saswp_product_srp_schema_enable_rating_'.$schema_id,
+ 'type' => 'checkbox',
+ ),
+ array(
+ 'label' => 'Rating',
+ 'id' => 'saswp_product_grp_srp_schema_rating_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_remove_warnings($product_details, 'product_average_rating', 'saswp_string')
+ ),
+ array(
+ 'label' => 'Number of Reviews',
+ 'id' => 'saswp_product_grp_srp_schema_review_count_'.$schema_id,
+ 'type' => 'text',
+ 'default' => saswp_remove_warnings($product_details, 'product_review_count', 'saswp_string')
+ ),
+ );
+
+ break;
case 'Service':
diff --git a/core/array-list/schemas.php b/core/array-list/schemas.php
index 85b88314..d5511ed6 100644
--- a/core/array-list/schemas.php
+++ b/core/array-list/schemas.php
@@ -81,6 +81,7 @@
),
'Product' => array(
'Product' => 'Product',
+ 'ProductGroup' => 'ProductGroup',
'Car' => 'Car',
'Vehicle' => 'Vehicle'
),
diff --git a/core/global.php b/core/global.php
index c0c9c437..71be7cf6 100644
--- a/core/global.php
+++ b/core/global.php
@@ -28,7 +28,8 @@
'local_business',
'Organization',
'project',
- 'Product'
+ 'Product',
+ 'ProductGroup'
);
$without_aggregate = array(
'Apartment',
diff --git a/output/class-saswp-output-service.php b/output/class-saswp-output-service.php
index f41d551a..dd7ee6b2 100644
--- a/output/class-saswp-output-service.php
+++ b/output/class-saswp-output-service.php
@@ -5684,6 +5684,214 @@ public function saswp_replace_with_custom_fields_value($input1, $schema_post_id)
}
break;
+
+ case 'ProductGroup':
+
+ if ( isset( $custom_fields['saswp_product_grp_schema_id']) ) {
+ $input1['@id'] = get_permalink().$custom_fields['product_grp'];
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_url']) ) {
+ $input1['url'] = saswp_validate_url($custom_fields['saswp_product_grp_schema_url']);
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_name']) ) {
+ $input1['name'] = $custom_fields['saswp_product_grp_schema_name'];
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_brand_name']) ) {
+ $input1['brand']['@type'] = 'Brand';
+ $input1['brand']['name'] = $custom_fields['saswp_product_grp_schema_brand_name'];
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_description']) ) {
+ $input1['description'] = wp_strip_all_tags(strip_shortcodes( $custom_fields['saswp_product_grp_schema_description'] ));
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_image']) ) {
+ $input1['image'] = $custom_fields['saswp_product_grp_schema_image'];
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_group_id']) ) {
+ $input1['productGroupID'] = $custom_fields['saswp_product_grp_schema_group_id'];
+ }
+ if ( ! empty( $custom_fields['saswp_product_grp_schema_varies_by']) ) {
+ $explode_varies = explode( ',', $custom_fields['saswp_product_grp_schema_varies_by'] );
+ if ( is_array( $explode_varies ) ) {
+ foreach ($explode_varies as $vkey => $varies) {
+ $input1['variesBy'][] = saswp_context_url() . $varies;
+ }
+ }
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_mpn']) ) {
+ $input1['mpn'] = $custom_fields['saswp_product_grp_schema_mpn'];
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_sku']) ) {
+ $input1['sku'] = $custom_fields['saswp_product_grp_schema_sku'];
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_gtin8']) ) {
+ $input1['gtin8'] = $custom_fields['saswp_product_grp_schema_gtin8'];
+ }
+ if ( isset( $custom_fields['saswp_product_schema_grp_gtin13']) ) {
+ $input1['gtin13'] = $custom_fields['saswp_product_grp_schema_gtin13'];
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_gtin12']) ) {
+ $input1['gtin12'] = $custom_fields['saswp_product_grp_schema_gtin12'];
+ }
+ if ( isset( $custom_fields['saswp_product_grp_additional_type']) ) {
+ $input1['additionalType'] = $custom_fields['saswp_product_grp_additional_type'];
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_availability']) ) {
+ $input1['offers']['availability'] = $custom_fields['saswp_product_grp_schema_availability'];
+ if ( isset( $custom_fields['saswp_product_grp_schema_url']) ) {
+ $input1['offers']['url'] = $custom_fields['saswp_product_grp_schema_url'];
+ }
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_price']) ) {
+ $input1['offers']['price'] = $custom_fields['saswp_product_grp_schema_price'];
+
+ if ( isset( $custom_fields['saswp_grp_product_schema_url']) ) {
+ $input1['offers']['url'] = $custom_fields['saswp_product_grp_schema_url'];
+ }
+
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_currency']) ) {
+ $input1['offers']['priceCurrency'] = saswp_modify_currency_code($custom_fields['saswp_product_grp_schema_currency']);
+ if ( isset( $custom_fields['saswp_product_grp_schema_url']) ) {
+ $input1['offers']['url'] = $custom_fields['saswp_product_grp_schema_url'];
+ }
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_priceValidUntil']) ) {
+ $input1['offers']['priceValidUntil'] = $custom_fields['saswp_product_grp_schema_priceValidUntil'];
+
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_condition']) ) {
+ $input1['offers']['itemCondition'] = $custom_fields['saswp_product_grp_schema_condition'];
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_seller']) ) {
+ $input1['offers']['seller']['@type'] = 'Organization';
+ $input1['offers']['seller']['name'] = $custom_fields['saswp_product_grp_schema_seller'];
+ }
+
+ if( isset($custom_fields['saswp_product_grp_schema_high_price']) && isset($custom_fields['saswp_product_grp_schema_low_price']) ){
+
+ $input1['offers']['@type'] = 'AggregateOffer';
+ $input1['offers']['highPrice'] = $custom_fields['saswp_product_grp_schema_high_price'];
+ $input1['offers']['lowPrice'] = $custom_fields['saswp_product_grp_schema_low_price'];
+
+ if ( isset( $custom_fields['saswp_product_schema_offer_count']) ) {
+ $input1['offers']['offerCount'] = $custom_fields['saswp_product_grp_schema_offer_count'];
+ }
+ }
+ // Changes since version 1.15
+ if ( ( isset( $custom_fields['saswp_product_grp_schema_rp_country_code'] ) &&
+ !empty( $custom_fields['saswp_product_grp_schema_rp_country_code'] ) ) ||
+ ( isset( $custom_fields['saswp_product_grp_grp_schema_rp_category'] ) &&
+ !empty( $custom_fields['saswp_product_grp_schema_rp_category'] ) ) ||
+ ( isset( $custom_fields['saswp_product_grp_schema_rp_return_days'] ) &&
+ !empty( $custom_fields['saswp_product_grp_schema_rp_return_days'] ) ) ||
+ ( isset( $custom_fields['saswp_product_grp_grp_schema_rp_return_method'] ) &&
+ !empty( $custom_fields['saswp_product_grp_schema_rp_return_method'] ) ) ||
+ ( isset( $custom_fields['saswp_product_grp_schema_rp_return_fees'] ) &&
+ !empty( $custom_fields['saswp_product_grp_schema_rp_return_method'] ) ) ) {
+ $input1['offers']['hasMerchantReturnPolicy']['@type'] = 'MerchantReturnPolicy';
+ if ( ! empty( $custom_fields['saswp_product_grp_schema_rp_country_code']) ) {
+ $input1['offers']['hasMerchantReturnPolicy']['applicableCountry'] = esc_attr( $custom_fields['saswp_product_grp_schema_rp_country_code']);
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_rp_category']) && !empty($custom_fields['saswp_product_grp_schema_rp_category']) ) {
+ $rp_category = array('MerchantReturnFiniteReturnWindow','MerchantReturnNotPermitted','MerchantReturnUnlimitedWindow','MerchantReturnUnspecified');
+ if(in_array($custom_fields['saswp_product_grp_schema_rp_category'], $rp_category) ) {
+ $input1['offers']['hasMerchantReturnPolicy']['returnPolicyCategory'] = esc_attr( $custom_fields['saswp_product_grp_schema_rp_category']);
+ }
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_rp_return_days']) && !empty($custom_fields['saswp_product_grp_schema_rp_return_days']) ) {
+ $input1['offers']['hasMerchantReturnPolicy']['merchantReturnDays'] = esc_attr( $custom_fields['saswp_product_grp_schema_rp_return_days']);
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_rp_return_method']) && !empty($custom_fields['saswp_product_grp_schema_rp_return_method']) ) {
+ $rm_category = array('ReturnAtKiosk','ReturnByMail','ReturnInStore');
+ if(in_array($custom_fields['saswp_product_grp_schema_rp_return_method'], $rm_category) ) {
+ $input1['offers']['hasMerchantReturnPolicy']['returnMethod'] = esc_attr( $custom_fields['saswp_product_grp_schema_rp_return_method']);
+ }
+ }
+ if((isset($custom_fields['saswp_product_grp_schema_rsf_name']) && !empty($custom_fields['saswp_product_grp_schema_rsf_name'])) || (isset($custom_fields['saswp_product_grp_schema_rsf_value']) && !empty($custom_fields['saswp_product_grp_schema_rsf_value'])) || (isset($custom_fields['saswp_product_grp_schema_rsf_currency']) && !empty($custom_fields['saswp_product_grp_schema_rsf_currency'])) ) {
+ $input1['offers']['hasMerchantReturnPolicy']['returnShippingFeesAmount']['@type'] = 'MonetaryAmount';
+ if ( isset( $custom_fields['saswp_product_grp_schema_rsf_name']) ) {
+ $input1['offers']['hasMerchantReturnPolicy']['returnShippingFeesAmount']['name'] = esc_attr( $custom_fields['saswp_product_schema_rsf_name']);
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_rsf_value']) ) {
+ $input1['offers']['hasMerchantReturnPolicy']['returnShippingFeesAmount']['value'] = esc_attr( $custom_fields['saswp_product_grp_schema_rsf_value']);
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_rsf_currency']) ) {
+ $input1['offers']['hasMerchantReturnPolicy']['returnShippingFeesAmount']['currency'] = esc_attr( $custom_fields['saswp_product_grp_schema_rsf_currency']);
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_rp_return_fees']) ) {
+ $rf_category = array('FreeReturn','OriginalShippingFees','RestockingFees','ReturnFeesCustomerResponsibility','ReturnShippingFees');
+ $input1['offers']['hasMerchantReturnPolicy']['returnFees'] = 'ReturnShippingFees';
+ }
+ }else{
+ if ( isset( $custom_fields['saswp_product_grp_schema_rp_return_fees']) && !empty($custom_fields['saswp_product_grp_schema_rp_return_fees']) ) {
+ $rf_category = array('FreeReturn','OriginalShippingFees','RestockingFees','ReturnFeesCustomerResponsibility','ReturnShippingFees');
+ $input1['offers']['hasMerchantReturnPolicy']['returnFees'] = esc_attr( $custom_fields['saswp_product_grp_schema_rp_return_fees']);
+ }
+
+ }
+ }
+
+ if ( isset( $custom_fields['saswp_product_grp_schema_sr_value']) && !empty($custom_fields['saswp_product_grp_schema_sr_value']) ) {
+ $input1['offers']['shippingDetails']['@type'] = 'OfferShippingDetails';
+ $input1['offers']['shippingDetails']['shippingRate']['@type'] = 'MonetaryAmount';
+ $input1['offers']['shippingDetails']['shippingRate']['value'] = esc_attr( $custom_fields['saswp_product_grp_schema_sr_value']);
+ if ( isset( $custom_fields['saswp_product_grp_schema_sr_currency']) && !empty($custom_fields['saswp_product_grp_schema_sr_currency']) ) {
+ $input1['offers']['shippingDetails']['shippingRate']['currency'] = esc_attr( $custom_fields['saswp_product_grp_schema_sr_currency']);
+ }
+ if ( ( isset($custom_fields['saswp_product_grp_schema_sa_locality'] ) &&
+ !empty( $custom_fields['saswp_product_grp_schema_sa_locality'] ) ) ||
+ ( isset( $custom_fields['saswp_product_grp_schema_sa_region'] ) &&
+ !empty( $custom_fields['saswp_product_grp_schema_sa_region'] ) ) ||
+ ( isset( $custom_fields['saswp_product_grp_schema_sa_postal_code'] ) &&
+ !empty( $custom_fields['saswp_product_grp_schema_sa_postal_code'] ) ) ||
+ ( isset( $custom_fields['saswp_product_grp_schema_sa_address'] ) &&
+ !empty( $custom_fields['saswp_product_grp_schema_sa_address'] ) ) ||
+ ( isset( $custom_fields['saswp_product_grp_schema_sa_country'] ) &&
+ !empty( $custom_fields['saswp_product_grp_schema_sa_country'] ) ) ) {
+ $input1['offers']['shippingDetails']['shippingDestination']['@type'] = 'DefinedRegion';
+ if ( isset( $custom_fields['saswp_product_grp_schema_sa_locality']) && !empty($custom_fields['saswp_product_schema_sa_locality']) ) {
+ $input1['offers']['shippingDetails']['shippingDestination']['addressLocality'] = esc_attr( $custom_fields['saswp_product_grp_schema_sa_locality']);
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_sa_region']) && !empty($custom_fields['saswp_product_grp_schema_sa_region']) ) {
+ $input1['offers']['shippingDetails']['shippingDestination']['addressRegion'] = esc_attr( $custom_fields['saswp_product_grp_schema_sa_region']);
+ }
+ if ( isset( $custom_fields['saswp_product_schema_sa_postal_code']) && !empty($custom_fields['saswp_product_schema_sa_postal_code']) ) {
+ $input1['offers']['shippingDetails']['shippingDestination']['postalCode'] = esc_attr( $custom_fields['saswp_product_schema_sa_postal_code']);
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_sa_address']) && !empty($custom_fields['saswp_product_grp_schema_sa_address']) ) {
+ $input1['offers']['shippingDetails']['shippingDestination']['streetAddress'] = esc_attr( $custom_fields['saswp_product_grp_schema_sa_address']);
+ }
+ if ( isset( $custom_fields['saswp_product_grp_schema_sa_country']) && !empty($custom_fields['saswp_product_grp_schema_sa_country']) ) {
+ $input1['offers']['shippingDetails']['shippingDestination']['addressCountry'] = esc_attr( $custom_fields['saswp_product_grp_schema_sa_country']);
+ }
+ }
+ if((isset($custom_fields['saswp_product_grp_schema_sdh_minval']) && !empty($custom_fields['saswp_product_grp_schema_sdh_minval'])) && (isset($custom_fields['saswp_product_grp_schema_sdh_maxval']) && !empty($custom_fields['saswp_product_grp_schema_sdh_maxval'])) && (isset($custom_fields['saswp_product_grp_schema_sdh_unitcode']) && !empty($custom_fields['saswp_product_grp_schema_sdh_unitcode'])) ) {
+ $input1['offers']['shippingDetails']['deliveryTime']['@type'] = 'ShippingDeliveryTime';
+ $input1['offers']['shippingDetails']['deliveryTime']['handlingTime']['@type'] = 'QuantitativeValue';
+ $input1['offers']['shippingDetails']['deliveryTime']['handlingTime']['minValue'] = esc_attr( $custom_fields['saswp_product_grp_schema_sdh_minval']);
+ $input1['offers']['shippingDetails']['deliveryTime']['handlingTime']['maxValue'] = esc_attr( $custom_fields['saswp_product_grp_schema_sdh_maxval']);
+ $input1['offers']['shippingDetails']['deliveryTime']['handlingTime']['unitCode'] = esc_attr( $custom_fields['saswp_product_grp_schema_sdh_unitcode']);
+ }
+ if ( ( isset($custom_fields['saswp_product_grp_schema_sdt_minval'] ) &&
+ !empty($custom_fields['saswp_product_grp_schema_sdt_minval'] ) ) &&
+ ( isset( $custom_fields['saswp_product_grp_schema_sdt_maxval'] ) &&
+ !empty( $custom_fields['saswp_product_grp_schema_sdt_maxval'] ) ) &&
+ ( isset( $custom_fields['saswp_product_grp_schema_sdt_unitcode'] ) &&
+ !empty($custom_fields['saswp_product_grp_schema_sdt_unitcode'] ) ) ) {
+ $input1['offers']['shippingDetails']['deliveryTime']['transitTime']['@type'] = 'QuantitativeValue';
+ $input1['offers']['shippingDetails']['deliveryTime']['transitTime']['minValue'] = esc_attr( $custom_fields['saswp_product_grp_schema_sdt_minval']);
+ $input1['offers']['shippingDetails']['deliveryTime']['transitTime']['maxValue'] = esc_attr( $custom_fields['saswp_product_grp_schema_sdt_maxval']);
+ $input1['offers']['shippingDetails']['deliveryTime']['transitTime']['unitCode'] = esc_attr( $custom_fields['saswp_product_grp_schema_sdt_unitcode']);
+ }
+ }
+
+ if ( isset( $custom_fields['saswp_product_grp_srp_schema_rating']) && isset($custom_fields['saswp_product_grp_srp_schema_review_count']) ) {
+ $input1['aggregateRating']['@type'] = 'aggregateRating';
+ $input1['aggregateRating']['ratingValue'] = $custom_fields['saswp_product_grp_srp_schema_rating'];
+ $input1['aggregateRating']['reviewCount'] = $custom_fields['saswp_product_grp_srp_schema_review_count'];
+ }
+
+ break;
case 'Car':
if ( isset( $custom_fields['saswp_car_schema_id']) ) {
@@ -8714,6 +8922,7 @@ public function saswp_schema_markup_generator( $schema_type, $schema_post_id = n
break;
case 'Product':
+ case 'ProductGroup':
case 'SoftwareApplication':
case 'MobileApplication':
case 'Book':
diff --git a/output/function.php b/output/function.php
index 0d363d6f..74ab4911 100644
--- a/output/function.php
+++ b/output/function.php
@@ -2953,6 +2953,13 @@ function saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $sche
break;
+ case 'ProductGroup':
+
+ $data = saswp_product_group_schema_markup($schema_post_id, $schema_post_id, $all_post_meta);
+ $input1 = array_merge($input1, $data);
+
+ break;
+
default:
break;
}
diff --git a/output/markup.php b/output/markup.php
index 9bd45830..bf150635 100644
--- a/output/markup.php
+++ b/output/markup.php
@@ -1609,36 +1609,216 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
}
-function saswp_rent_action_schema_markup($schema_id, $schema_post_id, $all_post_meta){
-
- $checkIdPro = ((isset($all_post_meta['saswp_rent_action_id_'.$schema_id][0]) && $all_post_meta['saswp_rent_action_id_'.$schema_id][0] !='') ? get_permalink().'#'.$all_post_meta['saswp_rent_action_id_'.$schema_id][0] : '');
- $input1 = array(
- '@context' => saswp_context_url(),
- '@type' => 'RentAction',
- '@id' => $checkIdPro,
- 'url' => get_permalink(),
- );
+/**
+ * Modify Product Group Schema Markup
+ * https://github.com/ahmedkaludi/schema-and-structured-data-for-wp/issues/2071
+ * @param $schema_id Integer
+ * @param $schema_post_id Integer
+ * @param $all_post_meta Array
+ * @return $input1 Array
+ * @since 1.38
+ * */
+function saswp_product_group_schema_markup( $schema_id, $schema_post_id, $all_post_meta ) {
+
+ $input1 = array();
+ $pgrp_id = saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_id_'.$schema_id, 'saswp_array' );
+ $brand_name = saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_brand_name_'.$schema_id, 'saswp_array' );
+ $group_id = saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_group_id_'.$schema_id, 'saswp_array' );
+ $varies_by = saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_varies_by_'.$schema_id, 'saswp_array' );
+ $varients = $itinerary = get_post_meta($schema_post_id, 'product_group_has_varient_'.$schema_id, true);
+ $return_policy = array();
+
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_rp_country_code_'.$schema_id, 'saswp_array') )
+ || ! empty ( saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_rp_category_'.$schema_id, 'saswp_array') )
+ || ! empty ( saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_rp_return_days_'.$schema_id, 'saswp_array') )
+ || ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_rp_return_method_'.$schema_id, 'saswp_array') )
+ || ! empty ( saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_rp_return_fees_'.$schema_id, 'saswp_array') ) )
+ {
+
+ $return_policy['hasMerchantReturnPolicy']['@type'] = 'MerchantReturnPolicy';
+
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_rp_country_code_'.$schema_id, 'saswp_array') ) ) {
+ $return_policy['hasMerchantReturnPolicy']['applicableCountry'] = saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_rp_country_code_'.$schema_id, 'saswp_array' );
+ }
- if(empty($input1['@id']) ) {
- unset($input1['@id']);
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_rp_category_'.$schema_id, 'saswp_array') ) ) {
+ $return_policy['hasMerchantReturnPolicy']['returnPolicyCategory'] = saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_rp_category_'.$schema_id, 'saswp_array');
+ }
+
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_rp_return_days_'.$schema_id, 'saswp_array') ) ) {
+ $return_policy['hasMerchantReturnPolicy']['merchantReturnDays'] = saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_rp_return_days_'.$schema_id, 'saswp_array' );
+ }
+
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_rp_return_method_'.$schema_id, 'saswp_array') ) ) {
+ $return_policy['hasMerchantReturnPolicy']['returnMethod'] = saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_rp_return_method_'.$schema_id, 'saswp_array');
+ }
+
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_rp_return_fees_'.$schema_id, 'saswp_array') ) ) {
+ $return_policy['hasMerchantReturnPolicy']['returnFees'] = saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_rp_return_fees_'.$schema_id, 'saswp_array');
+ }
+ }
+
+ $shipping_details = array();
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sr_value_'.$schema_id, 'saswp_array') ) ) {
+
+ $shipping_details['@type'] = 'OfferShippingDetails';
+ $shipping_details['shippingRate']['@type'] = 'MonetaryAmount';
+ $shipping_details['shippingRate']['value'] = esc_attr( $all_post_meta['saswp_product_grp_schema_sr_value_'.$schema_id][0]);
+
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sr_currency_'.$schema_id, 'saswp_array') ) ) {
+ $shipping_details['shippingRate']['currency'] = esc_attr( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sr_currency_'.$schema_id, 'saswp_array') );
}
- if ( isset( $all_post_meta['saswp_rent_action_agent_name_'.$schema_id][0]) ) {
- $input1['agent']['@type'] = 'Person';
- $input1['agent']['name'] = $all_post_meta['saswp_rent_action_agent_name_'.$schema_id][0];
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_locality_'.$schema_id, 'saswp_array') )||
+ ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_region_'.$schema_id, 'saswp_array') ) ||
+ ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_postal_code_'.$schema_id, 'saswp_array') )||
+ ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_address_'.$schema_id, 'saswp_array') ) ||
+ ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_country_'.$schema_id, 'saswp_array') ) )
+ {
+ $shipping_details['shippingDestination']['@type'] = 'DefinedRegion';
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_locality_'.$schema_id, 'saswp_array') ) ) {
+ $shipping_details['shippingDestination']['addressLocality'] = esc_attr( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_locality_'.$schema_id, 'saswp_array') );
+ }
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_region_'.$schema_id, 'saswp_array') ) ) {
+ $shipping_details['shippingDestination']['addressRegion'] = esc_attr( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_region_'.$schema_id, 'saswp_array') );;
+ }
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_postal_code_'.$schema_id, 'saswp_array') ) ) {
+ $shipping_details['shippingDestination']['postalCode'] = esc_attr( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_postal_code_'.$schema_id, 'saswp_array') );
+ }
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_address_'.$schema_id, 'saswp_array') ) ) {
+ $shipping_details['shippingDestination']['streetAddress'] = saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_address_'.$schema_id, 'saswp_array');
+ }
+ if ( ! empty ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_country_'.$schema_id, 'saswp_array') ) ) {
+ $shipping_details['shippingDestination']['addressCountry'] = esc_attr( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sa_country_'.$schema_id, 'saswp_array') );
+ }
}
+
+ if ( ! empty ( saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_sdh_unitcode_'.$schema_id, 'saswp_array') ) )
+ {
+ $shipping_details['deliveryTime']['@type'] = 'ShippingDeliveryTime';
+ $shipping_details['deliveryTime']['handlingTime']['@type'] = 'QuantitativeValue';
+ $shipping_details['deliveryTime']['handlingTime']['minValue'] = esc_attr( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sdh_minval_'.$schema_id, 'saswp_array') );
+ $shipping_details['deliveryTime']['handlingTime']['maxValue'] = esc_attr( saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_sdh_maxval_'.$schema_id, 'saswp_array') );
+ $shipping_details['deliveryTime']['handlingTime']['unitCode'] = esc_attr( saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_sdh_unitcode_'.$schema_id, 'saswp_array') );
+ }
+
+ if ( ! empty ( saswp_remove_warnings( $all_post_meta, 'saswp_product_grp_schema_sdt_unitcode_'.$schema_id, 'saswp_array') ) )
+ {
+ $shipping_details['deliveryTime']['transitTime']['@type'] = 'QuantitativeValue';
+ $shipping_details['deliveryTime']['transitTime']['minValue'] = esc_attr( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sdt_minval_'.$schema_id, 'saswp_array') );
+ $shipping_details['deliveryTime']['transitTime']['maxValue'] = esc_attr( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sdt_maxval_'.$schema_id, 'saswp_array') );
+ $shipping_details['deliveryTime']['transitTime']['unitCode'] = esc_attr( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_sdt_unitcode_'.$schema_id, 'saswp_array') );
+ }
+ }
+
+
+ $input1['@context'] = saswp_context_url();
+ $input1['@type'] = 'ProductGroup';
+
+ if ( ! empty( $pgrp_id ) ) {
+ $input1['@id'] = $pgrp_id;
+ }else{
+ $input1['@id'] = get_permalink().'#productgroup';
+ }
+
+ $input1['url'] = get_permalink();
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_name_'.$schema_id, 'saswp_array');
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_product_grp_schema_description_'.$schema_id, 'saswp_array');
+
+ if ( ! empty( $brand_name ) ) {
+ $input1['brand']['@type'] = 'Brand';
+ $input1['brand']['name'] = $brand_name;
+ }
+
+ if ( ! empty( $group_id ) ) {
+ $input1['productGroupID'] = $group_id;
+ }
+
+ if ( ! empty( $varies_by ) ) {
- if ( isset( $all_post_meta['saswp_rent_action_land_lord_name_'.$schema_id][0]) ) {
- $input1['landlord']['@type'] = 'Person';
- $input1['landlord']['name'] = $all_post_meta['saswp_rent_action_land_lord_name_'.$schema_id][0];
+ $explode_varies = explode( ',', $varies_by );
+ if ( is_array( $explode_varies ) ) {
+ foreach ($explode_varies as $vkey => $varies) {
+ $input1['variesBy'][] = saswp_context_url() . $varies;
+ }
}
+
+ }
+
+ if ( ! empty( $varients ) && is_array( $varients ) ) {
+
+ foreach ($varients as $vkey => $varient ) {
+
+ $data = array();
+ $data['@type'] = 'Product';
+ if ( ! empty( $varient['saswp_product_grp_sku'] ) ) {
+ $data['sku'] = $varient['saswp_product_grp_sku'];
+ }
+ if ( ! empty( $varient['saswp_product_grp_gtin14'] ) ) {
+ $data['gtin14'] = $varient['saswp_product_grp_gtin14'];
+ }
+ if ( ! empty( $varient['saswp_product_grp_img_id'] ) && $varient['saswp_product_grp_img_id'] > 0 ) {
+ $image = saswp_get_image_by_id( $varient['saswp_product_grp_img_id'] );
+ if ( is_array( $image ) && ! empty( $image['url'] ) ) {
+ $data['image'] = $image;
+ }
+ }
+ if ( ! empty( $varient['saswp_product_grp_name'] ) ) {
+ $data['name'] = $varient['saswp_product_grp_name'];
+ }
+ if ( ! empty( $varient['saswp_product_grp_description'] ) ) {
+ $data['description'] = $varient['saswp_product_grp_description'];
+ }
+ if ( ! empty( $varient['saswp_product_grp_offer_price'] ) ) {
+
+ $data['offers']['@type'] = 'Offer';
+ if ( ! empty( $varient['saswp_product_grp_offer_url'] ) ) {
+ $data['offers']['url'] = $varient['saswp_product_grp_offer_url'];
+ }
+ if ( ! empty( $varient['saswp_product_grp_offer_currency'] ) ) {
+ $data['offers']['priceCurrency'] = $varient['saswp_product_grp_offer_currency'];
+ }
+ if ( ! empty( $varient['saswp_product_grp_offer_price'] ) ) {
+ $data['offers']['price'] = $varient['saswp_product_grp_offer_price'];
+ }
+ if ( ! empty( $varient['saswp_product_grp_schema_priceValidUntil'] ) ) {
+ $data['offers']['priceValidUntil'] = $varient['saswp_product_grp_schema_priceValidUntil'];
+ }
+ if ( ! empty( $varient['saswp_product_grp_offer_icondition'] ) ) {
+ $data['offers']['itemCondition'] = $varient['saswp_product_grp_offer_icondition'];
+ }
+ if ( ! empty( $varient['saswp_product_grp_offer_avail'] ) ) {
+ $data['offers']['availability'] = $varient['saswp_product_grp_offer_avail'];
+ }
+ if ( ! empty( $shipping_details ) && ! empty( $shipping_details['@type'] ) ) {
+ $data['offers']['shippingDetails'] = $shipping_details;
+ }
+ if ( ! empty( $return_policy['hasMerchantReturnPolicy'] ) && ! empty( $return_policy['hasMerchantReturnPolicy']['@type'] ) ) {
+ $data['offers']['hasMerchantReturnPolicy'] = $return_policy['hasMerchantReturnPolicy'];
+ }
+
+ }
- if ( isset( $all_post_meta['saswp_rent_action_object_name_'.$schema_id][0]) ) {
- $input1['object']['@type'] = 'Residence';
- $input1['object']['name'] = $all_post_meta['saswp_rent_action_object_name_'.$schema_id][0];
+ if ( ! empty( $data ) ) {
+ $input1['hasVariant'][] = $data;
+ }
+
}
- return $input1;
+ }
+
+ if ( saswp_remove_warnings($all_post_meta, 'saswp_product_grp_srp_schema_enable_rating_'.$schema_id, 'saswp_array') == 1 &&
+ saswp_remove_warnings($all_post_meta, 'saswp_product_grp_srp_schema_rating_'.$schema_id, 'saswp_array') &&
+ saswp_remove_warnings($all_post_meta, 'saswp_product_grp_srp_schema_review_count_'.$schema_id, 'saswp_array') ) {
+
+ $input1['aggregateRating'] = array(
+ "@type" => "AggregateRating",
+ "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_product_grp_srp_schema_rating_'.$schema_id, 'saswp_array'),
+ "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_product_grp_srp_schema_review_count_'.$schema_id, 'saswp_array')
+ );
+ }
+
+ return $input1;
}
function saswp_real_estate_listing_schema_markup($schema_id, $schema_post_id, $all_post_meta){
diff --git a/output/output.php b/output/output.php
index 0fbc6482..0dce8cee 100644
--- a/output/output.php
+++ b/output/output.php
@@ -1765,6 +1765,27 @@ function saswp_schema_output() {
}
+ break;
+
+ case 'ProductGroup':
+
+ $input1 = $service_object->saswp_schema_markup_generator($schema_type);
+
+ if ( isset( $input1['offers'] ) ) {
+ unset( $input1['offers'] );
+ }
+
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
+
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
+
+ $input1 = apply_filters('saswp_modify_product_group_schema_output', $input1 );
+
+ if($modified_schema == 1){
+
+ $input1 = saswp_product_group_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
+ }
+
break;
case 'NewsArticle':
diff --git a/view/schema-type.php b/view/schema-type.php
index a7c5d00d..30c43bc2 100644
--- a/view/schema-type.php
+++ b/view/schema-type.php
@@ -1100,7 +1100,7 @@ function saswp_schema_type_meta_box_callback( $post) {
';
}else{
$allowed_manaul = true;
From 6ce37329c5b34e43a165891bbff9f12fb2280399 Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Tue, 29 Oct 2024 18:11:29 +0530
Subject: [PATCH 14/18] #2071
---
output/output.php | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/output/output.php b/output/output.php
index 0dce8cee..b178024f 100644
--- a/output/output.php
+++ b/output/output.php
@@ -1764,6 +1764,7 @@ function saswp_schema_output() {
$input1 = saswp_product_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
}
+ $input1 = apply_filters( 'saswp_modify_product_schema_varient_output', $input1 );
break;
@@ -1777,14 +1778,16 @@ function saswp_schema_output() {
$input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
-
$input1 = apply_filters('saswp_modify_product_group_schema_output', $input1 );
+
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
if($modified_schema == 1){
$input1 = saswp_product_group_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
}
+
+ $input1 = apply_filters( 'saswp_modify_product_schema_varient_output', $input1 );
break;
From 8a1350cbd9b1c19a63b711794245acf413b4b113 Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Tue, 29 Oct 2024 18:18:36 +0530
Subject: [PATCH 15/18] #2189
---
admin_section/settings.php | 20 +-------------------
admin_section/structure-admin.php | 20 +++++++++++++++++++-
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/admin_section/settings.php b/admin_section/settings.php
index 69fee75a..dd60c1d6 100644
--- a/admin_section/settings.php
+++ b/admin_section/settings.php
@@ -5129,22 +5129,4 @@ function saswp_pre_update_settings($value, $old_value, $option){
return $value;
}
-add_filter( 'pre_update_option_sd_data', 'saswp_pre_update_settings',10,3);
-
-/**
- * Add protection to schema post meta fields
- * @param $protected Boolean
- * @param $meta_key String
- * @param $meta_type String
- * @return $protected Boolean
- * @since 1.38
- * */
-add_filter( 'is_protected_meta', 'saswp_add_protection_schema_meta', 10, 3 );
-
-function saswp_add_protection_schema_meta( $protected, $meta_key, $meta_type ){
- // Allow fields starting with underscore to be displayed
- if ( strpos( $meta_key, 'saswp_' ) === 0 ) {
- return true;
- }
- return $protected;
-}
\ No newline at end of file
+add_filter( 'pre_update_option_sd_data', 'saswp_pre_update_settings',10,3);
\ No newline at end of file
diff --git a/admin_section/structure-admin.php b/admin_section/structure-admin.php
index 41104b92..46f282cd 100644
--- a/admin_section/structure-admin.php
+++ b/admin_section/structure-admin.php
@@ -2559,4 +2559,22 @@ function save_extra_user_profile_fields( $user_id ) {
}
}
-//user Custom Schema filed save end
\ No newline at end of file
+//user Custom Schema filed save end
+
+/**
+ * Add protection to schema post meta fields
+ * @param $protected Boolean
+ * @param $meta_key String
+ * @param $meta_type String
+ * @return $protected Boolean
+ * @since 1.38
+ * */
+add_filter( 'is_protected_meta', 'saswp_add_protection_schema_meta', 10, 3 );
+
+function saswp_add_protection_schema_meta( $protected, $meta_key, $meta_type ){
+ // Allow fields starting with underscore to be displayed
+ if ( strpos( $meta_key, 'saswp_' ) === 0 ) {
+ return true;
+ }
+ return $protected;
+}
\ No newline at end of file
From 05a36b054327d25375b54f40c0a6e21820147ac8 Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Wed, 30 Oct 2024 10:05:07 +0530
Subject: [PATCH 16/18] #2071
---
core/array-list/schema-properties.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/array-list/schema-properties.php b/core/array-list/schema-properties.php
index 5b6f2e8b..13c9a672 100644
--- a/core/array-list/schema-properties.php
+++ b/core/array-list/schema-properties.php
@@ -6723,7 +6723,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
),
array(
'label' => 'Aggregate Rating',
- 'id' => 'saswp_product_srp_schema_enable_rating_'.$schema_id,
+ 'id' => 'saswp_product_grp_srp_schema_enable_rating_'.$schema_id,
'type' => 'checkbox',
),
array(
From 6c5a0c123d8e97664663fb64f9211f176d0d8cc7 Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Wed, 30 Oct 2024 18:43:38 +0530
Subject: [PATCH 17/18] #2188
---
admin_section/common-function.php | 1 +
admin_section/js/main-script.js | 10 ++++++++++
admin_section/js/main-script.min.js | 2 +-
admin_section/settings.php | 12 ++++++++++++
output/class-saswp-output-service.php | 24 +++++++++++++++++++++---
5 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/admin_section/common-function.php b/admin_section/common-function.php
index 86fa0e2c..cb33e6b5 100644
--- a/admin_section/common-function.php
+++ b/admin_section/common-function.php
@@ -2071,6 +2071,7 @@ function saswp_fields_and_type($data_type = 'value'){
'saswp-pretty-print' => array('type' => 'checkbox', 'value' => 0),
'saswp-microdata-cleanup' => array('type' => 'checkbox', 'value' => 1),
'saswp-other-images' => array('type' => 'checkbox', 'value' => 1),
+ 'saswp-archive-images' => array('type' => 'checkbox', 'value' => 0),
'saswp-image-resizing' => array('type' => 'checkbox', 'value' => 1),
'saswp-multiple-size-image' => array('type' => 'checkbox', 'value' => 1),
'saswp-resized-image-folder' => array('type' => 'checkbox', 'value' => 0),
diff --git a/admin_section/js/main-script.js b/admin_section/js/main-script.js
index d8f6387d..9bb7946a 100644
--- a/admin_section/js/main-script.js
+++ b/admin_section/js/main-script.js
@@ -1853,6 +1853,16 @@ jQuery(document).ready(function($){
}
break;
+
+ case 'saswp-archive-images-checkbox':
+
+ if ($(this).is(':checked')) {
+ $("#saswp-archive-images").val(1);
+ }else{
+ $("#saswp-archive-images").val(0);
+ }
+
+ break;
case 'saswp-full-heading-checkbox':
diff --git a/admin_section/js/main-script.min.js b/admin_section/js/main-script.min.js
index 210000e4..64b0bde2 100644
--- a/admin_section/js/main-script.min.js
+++ b/admin_section/js/main-script.min.js
@@ -1 +1 @@
-var saswp_attached_rv=[],saswp_attached_col=[],rmv_boolean=!1,rmv_html="";jQuery(document).ready(function(s){jQuery(".saswpforwp-colorpicker").wpColorPicker(),jQuery(".saswp-onclick-show").hide(),"local_business"==s("#schema_type").find(":selected").val()&&s(document).ready(function(){s(".saswp-business-type-tr").show()});var e=s("#saswp_breadcrumb_home_page_title").val();if(s("#saswp_breadcrumb_home_page_title_text").val(e),s("#saswp_breadcrumb_home_page_title_text").bind("keydown keyup",function(){var e=s(this).val();s("#saswp_breadcrumb_home_page_title").val(e)}),s(document).on("click","#saswp_loc_display_on_front",function(){s(this).is(":checked")?s(".saswp-front-location-inst").removeClass("saswp_hide"):s(".saswp-front-location-inst").addClass("saswp_hide")}),s(document).on("change",".saswp-collection-where",function(){s(this);var e,a=s(this).val();a&&(e=a)&&s.ajax({url:ajaxurl,method:"GET",data:{action:"saswp_get_select2_data",type:e,q:"",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},beforeSend:function(){},success:function(e){if(e){var a="";s.each(e,function(s,e){a+=''+e.text+" "}),s(".saswp-collection-where-data").html(""),s(".saswp-collection-where-data").append(a),saswp_select2()}},error:function(s){console.log("Failed Ajax Request"),console.log(s)}})}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?(s(".saswp-coll-where").addClass("saswp_hide"),s("#saswp-motivatebox").css("display","block")):(s(".saswp-coll-where").removeClass("saswp_hide"),s("#saswp-motivatebox").css("display","none"))}).change(),s(document).on("click",".saswp-dismiss-notices",function(){var e=s(this),a=s(this).attr("notice-type");a&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_dismiss_notices",notice_type:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status&&e.parent().parent().hide()},error:function(s){console.log(s)}})}),saswp_select2(),s(".saswp-upgrade-to-pro").parent().attr({href:"https://structured-data-for-wp.com/pricing/",target:"_blank"}),s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show(saswp_localize_data.translable_txt.attach_review,"#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e=null;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,c="";t>0&&(c+=t+" Reviews, "),i>0&&(c+=i+" Collection"),c||(c=0),s(".saswp-attached-rv-count").text("Attached "+c),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),i>=10&&s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"),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?' ':' ',e.preventDefault();var t="";(t+=''+saswp_localize_data.translable_txt.place_id+' '+saswp_localize_data.translable_txt.language+' '+saswp_localize_data.translable_txt.reviews+' '+a+' '+saswp_localize_data.translable_txt.fetch+' x
')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-language-field").val(),c=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),r=s("#reviews_addon_license_key").val(),n=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(c>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=c%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(r||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:n,reviews_api:r,location:t,language:i,blocks:c,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert(saswp_localize_data.translable_txt.enter_place_id),""==p&&alert(saswp_localize_data.translable_txt.enter_api_key),""==r&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var a,t,i,c=""+saswp_localize_data.translable_txt.using_schema+" ";c+=""+saswp_localize_data.translable_txt.do_you_want+" "+saswp_localize_data.translable_txt.sd_update+" "+saswp_localize_data.translable_txt.before_others+"
",c+='",c+='",s(document).on("submit","#saswp-news-letter-form",function(e){e.preventDefault();var a=s(this),t=a.find('input[name="saswp_subscriber_name"]').val(),i=a.find('input[name="saswp_subscriber_email"]').val();website=a.find('input[name="saswp_subscriber_website"]').val(),s.post(saswp_localize_data.ajax_url,{action:"saswp_subscribe_to_news_letter",saswp_security_nonce:saswp_localize_data.saswp_security_nonce,name:t,email:i,website:website},function(e){e?"Some fields are missing."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid email address."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Already subscribed."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):(s("#saswp-news-letter-status").text("You're subscribed!"),s("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var p={content:c,position:{edge:"top",align:"left"}};p=s.extend(p,{buttons:function(s,e){return button=jQuery(''+saswp_localize_data.button1+" "),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){e.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){e.element.pointer("close")},3e3)}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}}),i=function(){s(saswp_localize_data.displayID).pointer(p).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after(''+saswp_localize_data.button2+" "),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"})}))},p.position&&p.position.defer_loading?s(window).bind("load.wp-pointers",i):i()}s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);if(t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),"premium_features"!=t||"yes"!=jQuery(this).attr("data-extmgr"))return s(".saswp-settings-form-wrap").find(".saswp-"+t).siblings().hide(),s(".saswp-settings-form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1;window.location.href="edit.php?post_type=saswp&page=saswp-extension-manager"}),s(".saswp-schame-type-select").select2(),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"ScholarlyArticle"==a||"Blogposting"==a||"NewsArticle"==a||"AnalysisNewsArticle"==a||"AskPublicNewsArticle"==a||"BackgroundNewsArticle"==a||"OpinionNewsArticle"==a||"ReportageNewsArticle"==a||"ReviewNewsArticle"==a||"WebPage"==a||"ItemPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s("#saswp_location_meta_box").removeClass("saswp_hide"),s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),("Review"==a||"ReviewNewsArticle"==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(),"BreadCrumbs"==a?s(".saswp-schema-modify-section").hide():s(".saswp-schema-modify-section").show(),"FAQ"==a?s(".saswp-enable-faq-markup-class").parent().parent().show():s(".saswp-enable-faq-markup-class").parent().parent().hide(),"Organization"==a&&(s(".saswp-organization-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"WebPage"==a&&(s(".saswp-webpage-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a||"Service"==a||"qanda"==a||"Course"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").select2(),s(".saswp-local-sub-type-2").select2(),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"ScholarlyArticle"==a||"Blogposting"==a||"NewsArticle"==a||"AnalysisNewsArticle"==a||"AskPublicNewsArticle"==a||"BackgroundNewsArticle"==a||"OpinionNewsArticle"==a||"ReportageNewsArticle"==a||"ReviewNewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1),s("#saswp_location_meta_box").removeClass("saswp_hide")),("Review"==a||"ReviewNewsArticle"==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)),"BreadCrumbs"==a?s(".saswp-schema-modify-section").hide():s(".saswp-schema-modify-section").show(),"FAQ"==a?s(".saswp-enable-faq-markup-class").parent().parent().show():s(".saswp-enable-faq-markup-class").parent().parent().hide(),"Organization"==a&&(s(".saswp-organization-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"WebPage"==a&&(s(".saswp-webpage-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpzoom-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpzoom").val(1):s("#saswp-wpzoom").val(0);break;case"saswp-yotpo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yotpo").val(1):s("#saswp-yotpo").val(0);break;case"saswp-ryviu-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ryviu").val(1):s("#saswp-ryviu").val(0);break;case"saswp-ultimate-blocks-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimate-blocks").val(1):s("#saswp-ultimate-blocks").val(0);break;case"saswp-starsrating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-starsrating").val(1):s("#saswp-starsrating").val(0);break;case"saswp-wptastyrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wptastyrecipe").val(1):s("#saswp-wptastyrecipe").val(0);break;case"saswp-recipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-recipress").val(1):s("#saswp-recipress").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp-for-cschema-checkbox":s(this).is(":checked")?s("#saswp-for-cschema").val(1):s("#saswp-for-cschema").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_list_type_class").parent().parent().show(),"ItemList"==s(".saswp_archive_list_type_class").val()&&s(".saswp_archive_schema_type_class").parent().parent().hide()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide(),s(".saswp_archive_list_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_remove_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_remove_cat").val(1):s("#saswp_breadcrumb_remove_cat").val(0);break;case"saswp_breadcrumb_exclude_shop_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_exclude_shop").val(1):s("#saswp_breadcrumb_exclude_shop").val(0);break;case"saswp_breadcrumb_include_parent_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_include_parent_cat").val(1):s("#saswp_breadcrumb_include_parent_cat").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?(s("#saswp_breadcrumb_schema").val(1),s("#saswp_breadcrumb_remove_cat").parent().parent().show(),s("#saswp_breadcrumb_exclude_shop").parent().parent().show(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().show(),s("#saswp_breadcrumb_home_page_title_text").parent().parent().show()):(s("#saswp_breadcrumb_schema").val(0),s("#saswp_breadcrumb_remove_cat").parent().parent().hide(),s("#saswp_breadcrumb_exclude_shop").parent().parent().hide(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().hide(),s("#saswp_breadcrumb_home_page_title_text").parent().parent().hide());break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp_remove_version_tag_checkbox":s(this).is(":checked")?s("#saswp_remove_version_tag").val(1):s("#saswp_remove_version_tag").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-rating-box-app-fields").removeClass("saswp_hide"),s("#saswp-rtb-link").removeClass("saswp_hide")):(s("#saswp-review-module").val(0),s(".saswp-rating-box-app-fields").addClass("saswp_hide"),s("#saswp-rtb-link").addClass("saswp_hide"));break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s(this).parent().parent().next().removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(this).parent().parent().next().addClass("saswp_hide"),s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-rmprating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rmprating").val(1):s("#saswp-rmprating").val(0);break;case"saswp-ratingform-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratingform").val(1):s("#saswp-ratingform").val(0);break;case"saswp-wpdiscuz-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpdiscuz").val(1):s("#saswp-wpdiscuz").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yet-another-stars-rating").val(1):s("#saswp-yet-another-stars-rating").val(0);break;case"saswp-simple-author-box-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simple-author-box").val(1):s("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp_woocommerce_archive_checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp_woocommerce_archive").val(1),s(".saswp_woocommerce_archive_list_type_class").parent().parent().show()):(s("#saswp_woocommerce_archive").val(0),s(".saswp_woocommerce_archive_list_type_class").parent().parent().hide());break;case"saswp-wpecommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpecommerce").val(1):s("#saswp-wpecommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-single-price-product-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-single-price-product").val(1),s(".saswp-single-price-opt").parent().parent().show()):(s("#saswp-single-price-product").val(0),s(".saswp-single-price-opt").parent().parent().hide());break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-enfold-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-enfold").val(1):s("#saswp-enfold").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-theme-reviews").val(1):s("#saswp-wp-theme-reviews").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wpqa-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpqa").val(1):s("#saswp-wpqa").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-polylang-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-polylang").val(1):s("#saswp-polylang").val(0);break;case"saswp-autolistings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-autolistings").val(1):s("#saswp-autolistings").val(0);break;case"saswp-wpml-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpml").val(1):s("#saswp-wpml").val(0);break;case"saswp-metatagmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-metatagmanager").val(1):s("#saswp-metatagmanager").val(0);break;case"saswp-slimseo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-slimseo").val(1):s("#saswp-slimseo").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-video-thumbnails-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-video-thumbnails").val(1):s("#saswp-video-thumbnails").val(0);break;case"saswp-featured-video-plus-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-featured-video-plus").val(1):s("#saswp-featured-video-plus").val(0);break;case"saswp-wp-product-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-product-review").val(1):s("#saswp-wp-product-review").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-ratency-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratency").val(1):s("#saswp-ratency").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-myhome").val(1):s("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-5").val(1):s("#saswp-realestate-5").val(0);break;case"saswp-realestate-7-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-7").val(1):s("#saswp-realestate-7").val(0);break;case"saswp-stamped-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stamped").val(1):s("#saswp-stamped").val(0);break;case"saswp-sabaidiscuss-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-sabaidiscuss").val(1):s("#saswp-sabaidiscuss").val(0);break;case"saswp-geodirectory-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-geodirectory").val(1):s("#saswp-geodirectory").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-classipress").val(1):s("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wplms").val(1):s("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-senseilms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-senseilms").val(1):s("#saswp-senseilms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-wp-event-solution-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-solution").val(1):s("#saswp-wp-event-solution").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-event-prime-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-prime").val(1):s("#saswp-event-prime").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-woo-discount-rules-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-discount-rules").val(1):s("#saswp-woo-discount-rules").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-wpforo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpforo").val(1):s("#saswp-wpforo").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-full-heading-checkbox":s(this).is(":checked")?s("#saswp-full-heading").val(1):s("#saswp-full-heading").val(0);break;case"saswp-truncate-product-description-checkbox":s(this).is(":checked")?s("#saswp-truncate-product-description").val(1):s("#saswp-truncate-product-description").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-default-videoobject-checkbox":s(this).is(":checked")?s("#saswp-default-videoobject").val(1):s("#saswp-default-videoobject").val(0);break;case"saswp-image-resizing-checkbox":s(this).is(":checked")?s("#saswp-image-resizing").val(1):s("#saswp-image-resizing").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-brb-checkbox":s(this).is(":checked")?s("#saswp-brb").val(1):s("#saswp-brb").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-bunyadamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bunyadamp").val(1):s("#saswp-bunyadamp").val(0);break;case"saswp-wpreviewslider-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewslider").val(1):s("#saswp-wpreviewslider").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-cmp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cmp").val(1):s("#saswp-cmp").val(0);break;case"saswp-wpreviewpro-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewpro").val(1):s("#saswp-wpreviewpro").val(0);break;case"saswp-webstories-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webstories").val(1):s("#saswp-webstories").val(0);break;case"saswp-resized-image-folder-checkbox":var t=s("#saswp-resized-image-folder-checkbox");s(this).is(":checked")?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_create_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s("#saswp-resized-image-folder").val(1),s("#saswp-resized-image-folder-checkbox").after('Clear Images ')):(t.prop("checked",!1),t.next().text(e.message),t.next().css("color","red"))},error:function(s){t.prop("checked",!1),t.next().text(s),t.next().css("color","red")}}):(s("#saswp-resized-image-folder").val(0),s(".saswp-clear-images").remove());break;case"saswp-elementor-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-elementor").val(1):s("#saswp-elementor").val(0);break;case"saswp-rannarecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rannarecipe").val(1):s("#saswp-rannarecipe").val(0);break;case"saswp-jetpackrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jetpackrecipe").val(1):s("#saswp-jetpackrecipe").val(0);break;case"saswp-quickandeasyfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-quickandeasyfaq").val(1):s("#saswp-quickandeasyfaq").val(0);break;case"saswp-ultimatefaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatefaqs").val(1):s("#saswp-ultimatefaqs").val(0);break;case"saswp-ultimatemember-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatemember").val(1):s("#saswp-ultimatemember").val(0);break;case"saswp-showcaseidx-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-showcaseidx").val(1):s("#saswp-showcaseidx").val(0);break;case"saswp-realtypress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realtypress").val(1):s("#saswp-realtypress").val(0);break;case"saswp-arconixfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-arconixfaq").val(1):s("#saswp-arconixfaq").val(0);break;case"saswp-faqconcertina-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqconcertina").val(1):s("#saswp-faqconcertina").val(0);break;case"saswp-wpjobmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobmanager").val(1):s("#saswp-wpjobmanager").val(0);break;case"saswp-simplejobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simplejobboard").val(1):s("#saswp-simplejobboard").val(0);break;case"saswp-wpjobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobboard").val(1):s("#saswp-wpjobboard").val(0);break;case"saswp-wpjobopenings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobopenings").val(1):s("#saswp-wpjobopenings").val(0);break;case"saswp-webfaq10-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webfaq10").val(1):s("#saswp-webfaq10").val(0);break;case"saswp-wpfaqschemamarkup-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpfaqschemamarkup").val(1):s("#saswp-wpfaqschemamarkup").val(0);break;case"saswp-faqschemaforpost-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqschemaforpost").val(1):s("#saswp-faqschemaforpost").val(0);break;case"saswp-masteraccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-masteraccordion").val(1):s("#saswp-masteraccordion").val(0);break;case"saswp-easyfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyfaqs").val(1):s("#saswp-easyfaqs").val(0);break;case"saswp-accordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordion").val(1):s("#saswp-accordion").val(0);break;case"saswp-html5responsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-html5responsivefaq").val(1):s("#saswp-html5responsivefaq").val(0);break;case"saswp-wpresponsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresponsivefaq").val(1):s("#saswp-wpresponsivefaq").val(0);break;case"saswp-jolifaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jolifaq").val(1):s("#saswp-jolifaq").val(0);break;case"saswp-ameliabooking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ameliabooking").val(1):s("#saswp-ameliabooking").val(0);break;case"saswp-easyaccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyaccordion").val(1):s("#saswp-easyaccordion").val(0);break;case"saswp-helpiefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-helpiefaq").val(1):s("#saswp-helpiefaq").val(0);break;case"saswp-mooberrybm-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mooberrybm").val(1):s("#saswp-mooberrybm").val(0);break;case"saswp-novelist-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-novelist").val(1):s("#saswp-novelist").val(0);break;case"saswp-accordionfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordionfaq").val(1):s("#saswp-accordionfaq").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-schemaforfaqs").val(1):s("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-customer-reviews").val(1):s("#saswp-wp-customer-reviews").val(0);break;case"saswp-total-recipe-generator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-total-recipe-generator").val(1):s("#saswp-total-recipe-generator").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-timetable-event-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-timetable-event").val(1):s("#saswp-timetable-event").val(0);break;case"saswp-xo-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-xo-event-calendar").val(1):s("#saswp-xo-event-calendar").val(0);break;case"saswp-vs-event-list-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-vs-event-list").val(1):s("#saswp-vs-event-list").val(0);break;case"saswp-calendarize-it-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-calendarize-it").val(1):s("#saswp-calendarize-it").val(0);break;case"saswp-events-schedule-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-schedule").val(1):s("#saswp-events-schedule").val(0);break;case"saswp-woo-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-event-manager").val(1):s("#saswp-woo-event-manager").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stachethemes-event-calendar").val(1):s("#saswp-stachethemes-event-calendar").val(0);break;case"saswp-all-in-one-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-all-in-one-event-calendar").val(1):s("#saswp-all-in-one-event-calendar").val(0);break;case"saswp-event-on-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-on").val(1):s("#saswp-event-on").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0);break;case"saswp-publish-press-authors-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-publish-press-authors").val(1):s("#saswp-publish-press-authors").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var c="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(c='Image size is smaller than recommended size
'),s(".saswp_image_div_"+t).html(''+c),"saswp_collection_image"==t&&(s(".saswp_image_div_"+t).html(' '+c),s(".saswp-r1-aimg").each(function(a,t){s(this).children("img").attr("src");0==s(this).children("img").attr("data-is-default-img")&&s(this).children("img").attr("src",e.url)}),s(".saswp-rc-a").each(function(a,t){s(this).children("img").attr("src");0==s(this).children("img").attr("data-is-default-img")&&s(this).children("img").attr("src",e.url)}))}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-post-specific-wrapper[data-id="+a+"] .saswp-post-specific-setting").after(e),s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){t.removeClass("updating-message"),"t"==e.status?(s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+a).val(),c=s(this).attr("data-schema-name");if(s(this).is(":checked")){var p=0;s("."+c).empty(),s("."+c).text("Enable "+c+" on this page"),s(".custom").empty(),s(".custom").text("Enable custom schema on this page"),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"),s(".custom").empty(),s(".custom").text("Disable custom schema on this page"),1==i?(s("."+c).empty(),s("."+c).text("Disable "+c+" on this page"),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s("."+c).empty(),s("."+c).text("Disable "+c+" on this page"),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"));var 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,req_from:saswp_localize_data.req_from,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),!0==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),c=s("#"+i+"_addon_license_key").val();t&&i&&c?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status&&e.days_remaining<0?(s("span.saswp_inactive_status_reviews").text("Expired"),s("span.saswp_inactive_status_reviews").css({color:"red","font-weight":"400"})):"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s("span.addon-activated_reviews").css({color:"green","margin-left":"8px","font-weight":"400"}),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.inactive_status_"+i).text("Active"),s("span.inactive_status_"+i).css({color:"green","margin-left":"8px","font-weight":"400"}),s("span.inactive_status_"+i).removeClass("inactive_status_"+i).addClass("addon-activated_"+i)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.addon-activated_"+i).text("Inactive"),s("span.addon-activated_"+i).css("color","#bebfc0"),s("span.addon-activated_"+i).removeClass("addon-activated_"+i).addClass("inactive_status_"+i),s("span.saswp-limit-span").css("display","none")),a.removeClass("updating-message"),s(".saswp-note-p").text(e.message)},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),jQuery(document).on("click",".user_refresh_single_addon",function(s){var e=jQuery(this);s.preventDefault();var a=e.attr("add-on"),t=e.attr("remaining_days_org"),i=jQuery("#"+a+"_addon_license_key").val();document.getElementById("user_refresh_"+a).classList.add("spin");var c=new Date,p=function s(e){for(var a=e+"=",t=document.cookie.split(";"),i=0;i1||o<1?(document.cookie="saswp_addon_refresh_check="+c,jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:i,license_status:"active",add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){jQuery("#"+a+"_addon_license_key_status").val(s.status),document.getElementById("user_refresh_"+a).classList.remove("spin"),e.removeClass("updating-message")},error:function(s){console.log(s)}})):(setTimeout(function(){jQuery(".dashicons").removeClass("spin")},0),alert("Please try after "+(p=Math.abs(p.getDate()+1)+"/"+Math.abs(p.getMonth()+1)+"/"+p.getFullYear()+" "+p.getHours()+":"+p.getMinutes()+":"+p.getSeconds())))});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#refresh_license_icon_top-").trigger("click")},0),jQuery(document).on("click","#refresh_license_icon_top-",function(e){document.getElementById("refresh_license_icon_top").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_license_icon_top").classList.remove("spin");var a=e.days_remaining;a>=0&&a<=7&&s("span.saswp-addon-alert").text("expiring in "+a+" days ")}else document.getElementsByClassName("saswp-addon-alert")[0].style.color="green",document.getElementsByClassName("renewal-license")[0].style.display="none",document.getElementById("refresh_license_icon_top").classList.remove("spin"),s("span.pro_warning").css("display","none")}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#user_refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#user_refresh_expired_addon-",function(e){document.getElementById("user_refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("user_refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?(s("span#exp").text("Expired"),location.reload()):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message"))});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");setTimeout(function(){jQuery("#refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#refresh_expired_addon-",function(e){document.getElementById("refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?s("span#exp").text("Expired"):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_expired_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();""!=s.trim(a)&&i&&""!=s.trim(t)&&!0==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"),!1==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='Sub Business Type ';i+='',s.each(e.result,function(s,e){i+=''+e+" "}),i+=" ",i+=" ",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();var a='';a+="Review Item Feature ",a+=' ',a+="Rating ",a+=' ',a+='x ',a+=" ",s(".saswp-review-item-list-table").append(a)}),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||alert(s.msg),setTimeout(function(){location.reload()},1e3),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review(),saswp_enable_rating_automate()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide();var o=window.location.hash;if("#saswp-default-container"==o?s(".saswp-global-container:eq(2)").show():"#saswp-knowledge-container"==o?s(".saswp-global-container:eq(1)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();(-1!=t.indexOf("_image")||-1!=t.indexOf("_logo"))&&(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),c=s(this).attr("div_type"),p=s(this).attr("itemlist_sub_type"),r=s("#saswp_specific_"+t).find(".saswp-"+c+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div:nth-child("+r+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,c,t,i+"_",p)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-table-close-new",function(){s(this).closest(".saswp-dynamic-properties").remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),c="",p=a.toLowerCase()+"_"+i,r="saswp_fixed_image["+i+"]";"manual_text"==t?(c+=' ',c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(c+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,c+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2())},"json"):"custom_field"==t?(c+='',c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"fixed_image"==t?(c+="",c+="",c+=' ',c+=' ',c+=' ',c+=' ',c+='',c+="
",c+=" ",c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):(c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var c=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:c,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_enable_rating_automate(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('X ')}),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){let l="",w="saswp_hide";saswp_localize_data.saswp_enable_gcaptcha&&1==saswp_localize_data.saswp_enable_gcaptcha&&(l="checked",w="");var d='",jQuery(jQuery(".wrap")).prepend(d)}jQuery(document).on("click",".saswp-clear-images",function(e){e.preventDefault();var a=s(this);!0==confirm("Are you sure? It will remove all the resized images")&&(a.addClass("updating-message"),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_clear_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){a.removeClass("updating-message"),"t"!=s.status&&alert("something went wrong")},error:function(s){console.log(s)}}))}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("Settings "),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({spacing:"5px",rtl:saswp_localize_data.is_rtl,rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().next().val(e)}}).on("rateyo.change",function(e,a){var t=a.rating;s(this).next().text(t)}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('Invalid Phone Number ')}),saswpCollectionSlider(),s(document).on("click",".saswp-add-rv-btn",function(){s(".saswp-dynamic-platforms").toggle()}),s(".saswp-rmv-coll-rv").on("click",function(){if(rmv_boolean=!rmv_boolean,saswp_on_collection_design_change(),jQuery(jQuery(".saswp-add-dynamic-section")).remove(),rmv_boolean){var s="";s+='',s+='
',s+=' ',s+="
",s+='
',s+='Choose Platform '+jQuery("#saswp-plaftorm-list").html()+" ",s+="
",s+="
",jQuery(jQuery(".saswp-collection-preview")[0]).after(s)}}),s(document).on("change","#saswp_dynamic_platforms",function(){var e=s(this).val(),a="";a+='',a+=" ",a+='Add ',s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after(a);var t=ajaxurl+"?action=saswp_add_reviews_to_select2&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&platform_id="+e;s("#saswp_dynamic_reviews_list").select2({ajax:{url:t,dataType:"json",processResults:function(s){if(s.status)return{results:s.message}}}})}),s(document).on("click",".saswp-add-single-rv",function(e){e.preventDefault();var a=s("#saswp_dynamic_reviews_list").val(),t=s("#saswp_dynamic_platforms").val();a&&saswp_get_collection_data(null,t,null,a,!0)}),s(document).on("click",".saswp-remove-coll-rv",function(){var e=s(this).attr("data-id"),a=s(this).attr("platform-id");if(a){var t=saswp_collection[a].filter(function(s){return s.saswp_review_id!=e});saswp_collection[a]=t,saswp_on_collection_design_change()}}),s(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val(),a=s(".saswp-collection-sorting").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),s(".saswp-rmv-coll-rv").hide(),s(".saswp-add-dynamic-section").hide(),"grid"==e&&(s(".saswp-grid-options").removeClass("saswp_hide"),s(".saswp-rmv-coll-rv").show(),s(".saswp-add-dynamic-section").show(),s(".saswp-coll-review-wrapper").removeClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"gallery"==e&&(s(".saswp-slider-options").removeClass("saswp_hide"),s(".saswp-coll-review-wrapper").removeClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px"),s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"popup"==e&&(s(".saswp-collection-lp").css("height","31px"),s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"badge"==e&&(s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").removeClass("saswp_hide")),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide"),"recent"==a?(s("#saswp_collection_specific_rating").parent().parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")):(s("#saswp_collection_specific_rating").parent().parent().addClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();let c=s("#saswp-review-platform-places").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a,null,null,c)):alert("Enter Count")});var h=s("#saswp_total_reviews_list").val();h&&saswp_get_collection_data(null,null,null,null,h);let v=s("#saswp-plaftorm-list").find("option:first-child").val();saswp_get_platform_place_list(v),(a=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",a.innerHTML="Copied!",document.body.appendChild(a);var m=document.getElementById("saswp-motivatebox");m&&m.addEventListener("mouseup",function(s){var e,i,c,p,r,s=s||event,n=s.target||s.srcElement;"motivate"==n.className&&(e=n,(i=document.createRange()).selectNodeContents(e),(c=window.getSelection()).removeAllRanges(),c.addRange(i),function s(){var e;try{e=document.execCommand("copy")}catch(a){e=!1}return e}()&&(r=(p=s)||event,clearTimeout(t),a.style.left=r.pageX-10+"px",a.style.top=r.pageY+15+"px",a.style.opacity=1,t=setTimeout(function(){a.style.opacity=0},500)))},!1),s(document).on("change","#saswp-plaftorm-list",function(e){e.preventDefault();let a=s(this).val();saswp_get_platform_place_list(a)}),s(document).on("change",".saswp_archive_list_type_class",function(e){e.preventDefault(),"ItemList"==s(this).val()?s(".saswp_archive_schema_type_class").parent().parent().hide():s(".saswp_archive_schema_type_class").parent().parent().show()}),s(document).on("change",".saswp-custom-fields-name, .saswp-custom-meta-list",function(e){e.preventDefault();let a=s(".saswp-custom-fields-name").val(),t=s(".saswp-custom-meta-list").val(),i=s(this).attr("class");if("saswp-custom-fields-name"==i&&(a=s(this).val(),t=s(this).parent().next().find("select").val()),"saswp-custom-meta-list"==i&&(t=s(this).val(),a=s(this).closest("tr").find(".saswp-custom-fields-name").val()),"saswp_faq_main_entity"==a&&"saswp_repeater_mapping"==t){let c=s(".saswp-itemlist-item-type-list").attr("data-id");0==s(".saswp-add-faq-repeat-que").length&&s(this).closest("tr").after('Add Faq Question '),0==s(".saswp-faq-repeater-tr").length&&s(this).closest("tr").after(' ')}else{let p=0;s(".saswp-custom-meta-list").each(function(e){"saswp_repeater_mapping"==s(this).val()&&(p=1)}),0==p&&(s(".saswp-faq-repeater-tr").remove(),s(".saswp-faq-question").remove(),s(".saswp-add-faq-repeat-que").remove())}}),s("#saswp-rating-module-css-app").change(function(e){s(this).is(":checked")?s(".saswp-rbcc-fields").removeClass("saswp_hide"):s(".saswp-rbcc-fields").addClass("saswp_hide")}).change(),s(document).on("click","#saswp-rtb-link",function(e){s("#saswp-appearance-modal").fadeIn()}),s(document).on("click","#saswp-appearance-modal-close",function(e){s("#saswp-appearance-modal").fadeOut()}),s("#saswp-rbcc-review-bg-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-preview-head").css("background",t),s(".saswp-rbcc-rvs span").css("background",t)}}),s("#saswp-rbcc-review-f-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-preview-head").css("color",t),s(".saswp-rbcc-rvs span").css("color",t)}}),s("#saswp-rbcc-review-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-review-f-unit").val();a<=0&&(a=15),s(".saswp-rbcc-preview-head, .saswp-rbcc-rvs span").css("font-size",a+t)}),s("#saswp-rbcc-review-f-unit").change(function(e){var a=s("#saswp-rbcc-review-f-size").val(),t=s(this).val();s(".saswp-rbcc-preview-head, .saswp-rbcc-rvs span").css("font-size",a+t)}).change(),s("#saswp-rbcc-if-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-rif").css("color",t)}}),s("#saswp-rbcc-if-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-if-f-unit").val();a<=0&&(a=15),s(".saswp-rbcc-rif").css("font-size",a+t)}),s("#saswp-rbcc-if-f-unit").change(function(e){var a=s("#saswp-rbcc-if-f-size").val(),t=s(this).val();s(".saswp-rbcc-rif").css("font-size",a+t)}).change(),s("#saswp-rbcc-stars-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp_star_color .saswp_star").attr("stop-color",t)}}),s("#saswp-rbcc-stars-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val();a<=0&&(a=18),s(".saswp-rvw-str .saswp_star_color svg").css("width",a+"px")}),s("#saswp-rbcc-ar-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-rvar").css("color",t)}}),s("#saswp-rbcc-ar-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-ar-f-unit").val();a<=0&&(a=48),s(".saswp-rbcc-rvar").css("font-size",a+t)}),s("#saswp-rbcc-ar-f-unit").change(function(e){var a=s("#saswp-rbcc-ar-f-size").val(),t=s(this).val();s(".saswp-rbcc-rvar").css("font-size",a+t)}).change(),s(document).on("change","#saswp_review_custom_chk_box",function(e){s(this).is(":checked")?s("#saswp-review-cccc").show():s("#saswp-review-cccc").hide()}),s(document).on("click","#saswp-rbcc-reset",function(e){e.preventDefault(),d_css={background:"#000",color:"#fff","font-size":"15px"},s(".saswp-rbcc-preview-head").css(d_css),s(".saswp-rbcc-rvs span").css(d_css),d_css={color:"#000","font-size":"18px"},s(".saswp-rbcc-rif").css(d_css),s(".saswp_star_color .saswp_star").attr("stop-color","#000"),s(".saswp-rvw-str .saswp_star_color svg").css("width","18px"),d_css={color:"#000","font-size":"48px"},s(".saswp-rbcc-rvar").css(d_css),bg_color="#000",font_color="#fff",s("#saswp-rbcc-review-bg-color, #saswp-rbcc-if-color, #saswp-rbcc-stars-color, #saswp-rbcc-ar-color").val(bg_color),s("#saswp-rbcc-review-f-color").val(font_color),s("#saswp-rbcc-review-f-size").val("15"),s("#saswp-rbcc-review-f-unit").val("px"),s("#saswp-rbcc-if-f-size").val("18"),s("#saswp-rbcc-if-f-unit").val("px"),s("#saswp-rbcc-ar-f-size").val("48"),s("#saswp-rbcc-ar-f-unit").val("px"),s("#saswp-rbcc-stars-f-size").val("18"),s("#saswp-rbcc-stars-f-unit").val("px"),s(".saswp-rbcc-font-color .wp-color-result").css("background-color","#fff"),s(".saswp-rbcc-bg-color .wp-color-result").css("background-color",bg_color),s(".saswp-rbcc-bg-color .wp-color-result").css("color",font_color),s(".saswp-rbcc-dc .wp-color-result").css("background-color",bg_color)}),s(document).on("change","#saswp_enable_gcaptcha",function(e){s(this).is(":checked")?s("#saswp-gkey-captcha-wrapper").removeClass("saswp_hide"):s("#saswp-gkey-captcha-wrapper").addClass("saswp_hide")}),s(document).on("click","#saswp-ar-form-btn",function(e){let a=s("#saswp_g_site_key").val(),t=s("#saswp_g_secret_key").val(),i=0,c={};c=s("#saswp_enable_gcaptcha").is(":checked")?{action:"saswp_update_google_captch_keys",captcha_enable:i=1,gsitekey:a,gsecretkey:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce}:{action:"saswp_update_google_captch_keys",captcha_enable:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},s.ajax({url:ajaxurl,method:"POST",data:c,success:function(s){location.reload()}})})});
\ No newline at end of file
+var saswp_attached_rv=[],saswp_attached_col=[],rmv_boolean=!1,rmv_html="";jQuery(document).ready(function(s){jQuery(".saswpforwp-colorpicker").wpColorPicker(),jQuery(".saswp-onclick-show").hide(),"local_business"==s("#schema_type").find(":selected").val()&&s(document).ready(function(){s(".saswp-business-type-tr").show()});var e=s("#saswp_breadcrumb_home_page_title").val();if(s("#saswp_breadcrumb_home_page_title_text").val(e),s("#saswp_breadcrumb_home_page_title_text").bind("keydown keyup",function(){var e=s(this).val();s("#saswp_breadcrumb_home_page_title").val(e)}),s(document).on("click","#saswp_loc_display_on_front",function(){s(this).is(":checked")?s(".saswp-front-location-inst").removeClass("saswp_hide"):s(".saswp-front-location-inst").addClass("saswp_hide")}),s(document).on("change",".saswp-collection-where",function(){s(this);var e,a=s(this).val();a&&(e=a)&&s.ajax({url:ajaxurl,method:"GET",data:{action:"saswp_get_select2_data",type:e,q:"",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},beforeSend:function(){},success:function(e){if(e){var a="";s.each(e,function(s,e){a+=''+e.text+" "}),s(".saswp-collection-where-data").html(""),s(".saswp-collection-where-data").append(a),saswp_select2()}},error:function(s){console.log("Failed Ajax Request"),console.log(s)}})}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?(s(".saswp-coll-where").addClass("saswp_hide"),s("#saswp-motivatebox").css("display","block")):(s(".saswp-coll-where").removeClass("saswp_hide"),s("#saswp-motivatebox").css("display","none"))}).change(),s(document).on("click",".saswp-dismiss-notices",function(){var e=s(this),a=s(this).attr("notice-type");a&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_dismiss_notices",notice_type:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status&&e.parent().parent().hide()},error:function(s){console.log(s)}})}),saswp_select2(),s(".saswp-upgrade-to-pro").parent().attr({href:"https://structured-data-for-wp.com/pricing/",target:"_blank"}),s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show(saswp_localize_data.translable_txt.attach_review,"#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e=null;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,c="";t>0&&(c+=t+" Reviews, "),i>0&&(c+=i+" Collection"),c||(c=0),s(".saswp-attached-rv-count").text("Attached "+c),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),i>=10&&s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"),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?' ':' ',e.preventDefault();var t="";(t+=''+saswp_localize_data.translable_txt.place_id+' '+saswp_localize_data.translable_txt.language+' '+saswp_localize_data.translable_txt.reviews+' '+a+' '+saswp_localize_data.translable_txt.fetch+' x
')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-language-field").val(),c=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),r=s("#reviews_addon_license_key").val(),n=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(c>0))return alert(saswp_localize_data.translable_txt.blocks_zero),e.removeClass("updating-message"),!1;if(0!=c%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(r||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:n,reviews_api:r,location:t,language:i,blocks:c,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert(saswp_localize_data.translable_txt.enter_place_id),""==p&&alert(saswp_localize_data.translable_txt.enter_api_key),""==r&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var a,t,i,c=""+saswp_localize_data.translable_txt.using_schema+" ";c+=""+saswp_localize_data.translable_txt.do_you_want+" "+saswp_localize_data.translable_txt.sd_update+" "+saswp_localize_data.translable_txt.before_others+"
",c+='",c+='",s(document).on("submit","#saswp-news-letter-form",function(e){e.preventDefault();var a=s(this),t=a.find('input[name="saswp_subscriber_name"]').val(),i=a.find('input[name="saswp_subscriber_email"]').val();website=a.find('input[name="saswp_subscriber_website"]').val(),s.post(saswp_localize_data.ajax_url,{action:"saswp_subscribe_to_news_letter",saswp_security_nonce:saswp_localize_data.saswp_security_nonce,name:t,email:i,website:website},function(e){e?"Some fields are missing."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid email address."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Already subscribed."==e?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):(s("#saswp-news-letter-status").text("You're subscribed!"),s("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var p={content:c,position:{edge:"top",align:"left"}};p=s.extend(p,{buttons:function(s,e){return button=jQuery(''+saswp_localize_data.button1+" "),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){e.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){e.element.pointer("close")},3e3)}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}}),i=function(){s(saswp_localize_data.displayID).pointer(p).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after(''+saswp_localize_data.button2+" "),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"})}))},p.position&&p.position.defer_loading?s(window).bind("load.wp-pointers",i):i()}s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);if(t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),"premium_features"!=t||"yes"!=jQuery(this).attr("data-extmgr"))return s(".saswp-settings-form-wrap").find(".saswp-"+t).siblings().hide(),s(".saswp-settings-form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1;window.location.href="edit.php?post_type=saswp&page=saswp-extension-manager"}),s(".saswp-schame-type-select").select2(),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"ScholarlyArticle"==a||"Blogposting"==a||"NewsArticle"==a||"AnalysisNewsArticle"==a||"AskPublicNewsArticle"==a||"BackgroundNewsArticle"==a||"OpinionNewsArticle"==a||"ReportageNewsArticle"==a||"ReviewNewsArticle"==a||"WebPage"==a||"ItemPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s("#saswp_location_meta_box").removeClass("saswp_hide"),s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),("Review"==a||"ReviewNewsArticle"==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(),"BreadCrumbs"==a?s(".saswp-schema-modify-section").hide():s(".saswp-schema-modify-section").show(),"FAQ"==a?s(".saswp-enable-faq-markup-class").parent().parent().show():s(".saswp-enable-faq-markup-class").parent().parent().hide(),"Organization"==a&&(s(".saswp-organization-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"WebPage"==a&&(s(".saswp-webpage-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a||"Service"==a||"qanda"==a||"Course"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").select2(),s(".saswp-local-sub-type-2").select2(),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"ScholarlyArticle"==a||"Blogposting"==a||"NewsArticle"==a||"AnalysisNewsArticle"==a||"AskPublicNewsArticle"==a||"BackgroundNewsArticle"==a||"OpinionNewsArticle"==a||"ReportageNewsArticle"==a||"ReviewNewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"Organization"==a||"CreativeWorkSeries"==a||"MobileApplication"==a||"ImageObject"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a||"Review"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"VideoObject"==a?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1),s("#saswp_location_meta_box").removeClass("saswp_hide")),("Review"==a||"ReviewNewsArticle"==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)),"BreadCrumbs"==a?s(".saswp-schema-modify-section").hide():s(".saswp-schema-modify-section").show(),"FAQ"==a?s(".saswp-enable-faq-markup-class").parent().parent().show():s(".saswp-enable-faq-markup-class").parent().parent().hide(),"Organization"==a&&(s(".saswp-organization-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"WebPage"==a&&(s(".saswp-webpage-type-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review(),saswp_enable_rating_automate()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wpzoom-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpzoom").val(1):s("#saswp-wpzoom").val(0);break;case"saswp-yotpo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yotpo").val(1):s("#saswp-yotpo").val(0);break;case"saswp-ryviu-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ryviu").val(1):s("#saswp-ryviu").val(0);break;case"saswp-ultimate-blocks-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimate-blocks").val(1):s("#saswp-ultimate-blocks").val(0);break;case"saswp-starsrating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-starsrating").val(1):s("#saswp-starsrating").val(0);break;case"saswp-wptastyrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wptastyrecipe").val(1):s("#saswp-wptastyrecipe").val(0);break;case"saswp-recipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-recipress").val(1):s("#saswp-recipress").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp-for-cschema-checkbox":s(this).is(":checked")?s("#saswp-for-cschema").val(1):s("#saswp-for-cschema").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_list_type_class").parent().parent().show(),"ItemList"==s(".saswp_archive_list_type_class").val()&&s(".saswp_archive_schema_type_class").parent().parent().hide()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide(),s(".saswp_archive_list_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_remove_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_remove_cat").val(1):s("#saswp_breadcrumb_remove_cat").val(0);break;case"saswp_breadcrumb_exclude_shop_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_exclude_shop").val(1):s("#saswp_breadcrumb_exclude_shop").val(0);break;case"saswp_breadcrumb_include_parent_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_include_parent_cat").val(1):s("#saswp_breadcrumb_include_parent_cat").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?(s("#saswp_breadcrumb_schema").val(1),s("#saswp_breadcrumb_remove_cat").parent().parent().show(),s("#saswp_breadcrumb_exclude_shop").parent().parent().show(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().show(),s("#saswp_breadcrumb_home_page_title_text").parent().parent().show()):(s("#saswp_breadcrumb_schema").val(0),s("#saswp_breadcrumb_remove_cat").parent().parent().hide(),s("#saswp_breadcrumb_exclude_shop").parent().parent().hide(),s("#saswp_breadcrumb_include_parent_cat").parent().parent().hide(),s("#saswp_breadcrumb_home_page_title_text").parent().parent().hide());break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp_remove_version_tag_checkbox":s(this).is(":checked")?s("#saswp_remove_version_tag").val(1):s("#saswp_remove_version_tag").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-rating-box-app-fields").removeClass("saswp_hide"),s("#saswp-rtb-link").removeClass("saswp_hide")):(s("#saswp-review-module").val(0),s(".saswp-rating-box-app-fields").addClass("saswp_hide"),s("#saswp-rtb-link").addClass("saswp_hide"));break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s(this).parent().parent().next().removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(this).parent().parent().next().addClass("saswp_hide"),s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-rmprating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rmprating").val(1):s("#saswp-rmprating").val(0);break;case"saswp-ratingform-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratingform").val(1):s("#saswp-ratingform").val(0);break;case"saswp-wpdiscuz-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpdiscuz").val(1):s("#saswp-wpdiscuz").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yet-another-stars-rating").val(1):s("#saswp-yet-another-stars-rating").val(0);break;case"saswp-simple-author-box-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simple-author-box").val(1):s("#saswp-simple-author-box").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp_woocommerce_archive_checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp_woocommerce_archive").val(1),s(".saswp_woocommerce_archive_list_type_class").parent().parent().show()):(s("#saswp_woocommerce_archive").val(0),s(".saswp_woocommerce_archive_list_type_class").parent().parent().hide());break;case"saswp-wpecommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpecommerce").val(1):s("#saswp-wpecommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-single-price-product-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-single-price-product").val(1),s(".saswp-single-price-opt").parent().parent().show()):(s("#saswp-single-price-product").val(0),s(".saswp-single-price-opt").parent().parent().hide());break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-enfold-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-enfold").val(1):s("#saswp-enfold").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-theme-reviews").val(1):s("#saswp-wp-theme-reviews").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wpqa-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpqa").val(1):s("#saswp-wpqa").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-polylang-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-polylang").val(1):s("#saswp-polylang").val(0);break;case"saswp-autolistings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-autolistings").val(1):s("#saswp-autolistings").val(0);break;case"saswp-wpml-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpml").val(1):s("#saswp-wpml").val(0);break;case"saswp-metatagmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-metatagmanager").val(1):s("#saswp-metatagmanager").val(0);break;case"saswp-slimseo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-slimseo").val(1):s("#saswp-slimseo").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-video-thumbnails-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-video-thumbnails").val(1):s("#saswp-video-thumbnails").val(0);break;case"saswp-featured-video-plus-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-featured-video-plus").val(1):s("#saswp-featured-video-plus").val(0);break;case"saswp-wp-product-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-product-review").val(1):s("#saswp-wp-product-review").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-ratency-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ratency").val(1):s("#saswp-ratency").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-myhome").val(1):s("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-5").val(1):s("#saswp-realestate-5").val(0);break;case"saswp-realestate-7-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realestate-7").val(1):s("#saswp-realestate-7").val(0);break;case"saswp-stamped-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stamped").val(1):s("#saswp-stamped").val(0);break;case"saswp-sabaidiscuss-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-sabaidiscuss").val(1):s("#saswp-sabaidiscuss").val(0);break;case"saswp-geodirectory-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-geodirectory").val(1):s("#saswp-geodirectory").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-classipress").val(1):s("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wplms").val(1):s("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-senseilms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-senseilms").val(1):s("#saswp-senseilms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-wp-event-solution-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-solution").val(1):s("#saswp-wp-event-solution").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-event-prime-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-prime").val(1):s("#saswp-event-prime").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-woo-discount-rules-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-discount-rules").val(1):s("#saswp-woo-discount-rules").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-wpforo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpforo").val(1):s("#saswp-wpforo").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-archive-images-checkbox":s(this).is(":checked")?s("#saswp-archive-images").val(1):s("#saswp-archive-images").val(0);break;case"saswp-full-heading-checkbox":s(this).is(":checked")?s("#saswp-full-heading").val(1):s("#saswp-full-heading").val(0);break;case"saswp-truncate-product-description-checkbox":s(this).is(":checked")?s("#saswp-truncate-product-description").val(1):s("#saswp-truncate-product-description").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-default-videoobject-checkbox":s(this).is(":checked")?s("#saswp-default-videoobject").val(1):s("#saswp-default-videoobject").val(0);break;case"saswp-image-resizing-checkbox":s(this).is(":checked")?s("#saswp-image-resizing").val(1):s("#saswp-image-resizing").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-brb-checkbox":s(this).is(":checked")?s("#saswp-brb").val(1):s("#saswp-brb").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-bunyadamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bunyadamp").val(1):s("#saswp-bunyadamp").val(0);break;case"saswp-wpreviewslider-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewslider").val(1):s("#saswp-wpreviewslider").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-cmp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cmp").val(1):s("#saswp-cmp").val(0);break;case"saswp-wpreviewpro-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpreviewpro").val(1):s("#saswp-wpreviewpro").val(0);break;case"saswp-webstories-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webstories").val(1):s("#saswp-webstories").val(0);break;case"saswp-resized-image-folder-checkbox":var t=s("#saswp-resized-image-folder-checkbox");s(this).is(":checked")?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_create_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s("#saswp-resized-image-folder").val(1),s("#saswp-resized-image-folder-checkbox").after('Clear Images ')):(t.prop("checked",!1),t.next().text(e.message),t.next().css("color","red"))},error:function(s){t.prop("checked",!1),t.next().text(s),t.next().css("color","red")}}):(s("#saswp-resized-image-folder").val(0),s(".saswp-clear-images").remove());break;case"saswp-elementor-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-elementor").val(1):s("#saswp-elementor").val(0);break;case"saswp-rannarecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rannarecipe").val(1):s("#saswp-rannarecipe").val(0);break;case"saswp-jetpackrecipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jetpackrecipe").val(1):s("#saswp-jetpackrecipe").val(0);break;case"saswp-quickandeasyfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-quickandeasyfaq").val(1):s("#saswp-quickandeasyfaq").val(0);break;case"saswp-ultimatefaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatefaqs").val(1):s("#saswp-ultimatefaqs").val(0);break;case"saswp-ultimatemember-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ultimatemember").val(1):s("#saswp-ultimatemember").val(0);break;case"saswp-showcaseidx-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-showcaseidx").val(1):s("#saswp-showcaseidx").val(0);break;case"saswp-realtypress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realtypress").val(1):s("#saswp-realtypress").val(0);break;case"saswp-arconixfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-arconixfaq").val(1):s("#saswp-arconixfaq").val(0);break;case"saswp-faqconcertina-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqconcertina").val(1):s("#saswp-faqconcertina").val(0);break;case"saswp-wpjobmanager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobmanager").val(1):s("#saswp-wpjobmanager").val(0);break;case"saswp-simplejobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-simplejobboard").val(1):s("#saswp-simplejobboard").val(0);break;case"saswp-wpjobboard-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobboard").val(1):s("#saswp-wpjobboard").val(0);break;case"saswp-wpjobopenings-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpjobopenings").val(1):s("#saswp-wpjobopenings").val(0);break;case"saswp-webfaq10-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-webfaq10").val(1):s("#saswp-webfaq10").val(0);break;case"saswp-wpfaqschemamarkup-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpfaqschemamarkup").val(1):s("#saswp-wpfaqschemamarkup").val(0);break;case"saswp-faqschemaforpost-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-faqschemaforpost").val(1):s("#saswp-faqschemaforpost").val(0);break;case"saswp-masteraccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-masteraccordion").val(1):s("#saswp-masteraccordion").val(0);break;case"saswp-easyfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyfaqs").val(1):s("#saswp-easyfaqs").val(0);break;case"saswp-accordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordion").val(1):s("#saswp-accordion").val(0);break;case"saswp-html5responsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-html5responsivefaq").val(1):s("#saswp-html5responsivefaq").val(0);break;case"saswp-wpresponsivefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresponsivefaq").val(1):s("#saswp-wpresponsivefaq").val(0);break;case"saswp-jolifaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-jolifaq").val(1):s("#saswp-jolifaq").val(0);break;case"saswp-ameliabooking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ameliabooking").val(1):s("#saswp-ameliabooking").val(0);break;case"saswp-easyaccordion-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easyaccordion").val(1):s("#saswp-easyaccordion").val(0);break;case"saswp-helpiefaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-helpiefaq").val(1):s("#saswp-helpiefaq").val(0);break;case"saswp-mooberrybm-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mooberrybm").val(1):s("#saswp-mooberrybm").val(0);break;case"saswp-novelist-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-novelist").val(1):s("#saswp-novelist").val(0);break;case"saswp-accordionfaq-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-accordionfaq").val(1):s("#saswp-accordionfaq").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-schemaforfaqs").val(1):s("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-customer-reviews").val(1):s("#saswp-wp-customer-reviews").val(0);break;case"saswp-total-recipe-generator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-total-recipe-generator").val(1):s("#saswp-total-recipe-generator").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-timetable-event-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-timetable-event").val(1):s("#saswp-timetable-event").val(0);break;case"saswp-xo-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-xo-event-calendar").val(1):s("#saswp-xo-event-calendar").val(0);break;case"saswp-vs-event-list-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-vs-event-list").val(1):s("#saswp-vs-event-list").val(0);break;case"saswp-calendarize-it-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-calendarize-it").val(1):s("#saswp-calendarize-it").val(0);break;case"saswp-events-schedule-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-schedule").val(1):s("#saswp-events-schedule").val(0);break;case"saswp-woo-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woo-event-manager").val(1):s("#saswp-woo-event-manager").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-stachethemes-event-calendar").val(1):s("#saswp-stachethemes-event-calendar").val(0);break;case"saswp-all-in-one-event-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-all-in-one-event-calendar").val(1):s("#saswp-all-in-one-event-calendar").val(0);break;case"saswp-event-on-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-on").val(1):s("#saswp-event-on").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0);break;case"saswp-publish-press-authors-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-publish-press-authors").val(1):s("#saswp-publish-press-authors").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var c="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(c='Image size is smaller than recommended size
'),s(".saswp_image_div_"+t).html(''+c),"saswp_collection_image"==t&&(s(".saswp_image_div_"+t).html(' '+c),s(".saswp-r1-aimg").each(function(a,t){s(this).children("img").attr("src");0==s(this).children("img").attr("data-is-default-img")&&s(this).children("img").attr("src",e.url)}),s(".saswp-rc-a").each(function(a,t){s(this).children("img").attr("src");0==s(this).children("img").attr("data-is-default-img")&&s(this).children("img").attr("src",e.url)}))}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-post-specific-wrapper[data-id="+a+"] .saswp-post-specific-setting").after(e),s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",tag_ID:saswp_localize_data.tag_ID,schema_id:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){t.removeClass("updating-message"),"t"==e.status?(s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+a).val(),c=s(this).attr("data-schema-name");if(s(this).is(":checked")){var p=0;s("."+c).empty(),s("."+c).text("Enable "+c+" on this page"),s(".custom").empty(),s(".custom").text("Enable custom schema on this page"),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"),s(".custom").empty(),s(".custom").text("Disable custom schema on this page"),1==i?(s("."+c).empty(),s("."+c).text("Disable "+c+" on this page"),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s("."+c).empty(),s("."+c).text("Disable "+c+" on this page"),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"));var 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,req_from:saswp_localize_data.req_from,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),!0==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),c=s("#"+i+"_addon_license_key").val();t&&i&&c?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status&&e.days_remaining<0?(s("span.saswp_inactive_status_reviews").text("Expired"),s("span.saswp_inactive_status_reviews").css({color:"red","font-weight":"400"})):"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s("span.addon-activated_reviews").css({color:"green","margin-left":"8px","font-weight":"400"}),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.inactive_status_"+i).text("Active"),s("span.inactive_status_"+i).css({color:"green","margin-left":"8px","font-weight":"400"}),s("span.inactive_status_"+i).removeClass("inactive_status_"+i).addClass("addon-activated_"+i)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message),s("span.addon-activated_"+i).text("Inactive"),s("span.addon-activated_"+i).css("color","#bebfc0"),s("span.addon-activated_"+i).removeClass("addon-activated_"+i).addClass("inactive_status_"+i),s("span.saswp-limit-span").css("display","none")),a.removeClass("updating-message"),s(".saswp-note-p").text(e.message)},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),jQuery(document).on("click",".user_refresh_single_addon",function(s){var e=jQuery(this);s.preventDefault();var a=e.attr("add-on"),t=e.attr("remaining_days_org"),i=jQuery("#"+a+"_addon_license_key").val();document.getElementById("user_refresh_"+a).classList.add("spin");var c=new Date,p=function s(e){for(var a=e+"=",t=document.cookie.split(";"),i=0;i1||o<1?(document.cookie="saswp_addon_refresh_check="+c,jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:i,license_status:"active",add_on:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){jQuery("#"+a+"_addon_license_key_status").val(s.status),document.getElementById("user_refresh_"+a).classList.remove("spin"),e.removeClass("updating-message")},error:function(s){console.log(s)}})):(setTimeout(function(){jQuery(".dashicons").removeClass("spin")},0),alert("Please try after "+(p=Math.abs(p.getDate()+1)+"/"+Math.abs(p.getMonth()+1)+"/"+p.getFullYear()+" "+p.getHours()+":"+p.getMinutes()+":"+p.getSeconds())))});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#refresh_license_icon_top-").trigger("click")},0),jQuery(document).on("click","#refresh_license_icon_top-",function(e){document.getElementById("refresh_license_icon_top").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_license_icon_top").classList.remove("spin");var a=e.days_remaining;a>=0&&a<=7&&s("span.saswp-addon-alert").text("expiring in "+a+" days ")}else document.getElementsByClassName("saswp-addon-alert")[0].style.color="green",document.getElementsByClassName("renewal-license")[0].style.display="none",document.getElementById("refresh_license_icon_top").classList.remove("spin"),s("span.pro_warning").css("display","none")}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");n>=0&&n<=7&&setTimeout(function(){jQuery("#user_refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#user_refresh_expired_addon-",function(e){document.getElementById("user_refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("user_refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?(s("span#exp").text("Expired"),location.reload()):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message"))});var r=document.getElementById("activated-plugins-days_remaining");if(r)var n=r.getAttribute("days_remaining");setTimeout(function(){jQuery("#refresh_expired_addon-").trigger("click")},0),jQuery(document).on("click","#refresh_expired_addon-",function(e){document.getElementById("refresh_expired_addon").classList.add("spin"),jQuery(this);var a=s(this),t=s(this).attr("licensestatusinternal"),i=s(this).attr("add-on");s(this).attr("data-attr"),s(this).attr("add-onname");var c=s("#"+i+"_addon_license_key").val();i?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){if("active"==s("#"+i+"_addon_license_key_status").val()){document.getElementById("refresh_expired_addon").classList.remove("spin");var a=e.days_remaining;a<0?s("span#exp").text("Expired"):a>7&&(s("span.inner_span").text(""),s("span.saswp_addon_inactive").text(""),s("span.expiredinner_span").text("Your License is Active"),s("span.expiredinner_span").css("color","green"),s(".renewal-license").css("display","none"),s(".saswp_addon_icon").css("display","none"))}}}):(alert("Please enter value license key"),a.removeClass("updating-message")),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_expired_license_transient",license_key:c,license_key:c,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){JSON.parse(s)}})}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();""!=s.trim(a)&&i&&""!=s.trim(t)&&!0==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"),!1==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='Sub Business Type ';i+='',s.each(e.result,function(s,e){i+=''+e+" "}),i+=" ",i+=" ",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();var a='';a+="Review Item Feature ",a+=' ',a+="Rating ",a+=' ',a+='x ',a+=" ",s(".saswp-review-item-list-table").append(a)}),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||alert(s.msg),setTimeout(function(){location.reload()},1e3),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review(),saswp_enable_rating_automate()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide();var o=window.location.hash;if("#saswp-default-container"==o?s(".saswp-global-container:eq(2)").show():"#saswp-knowledge-container"==o?s(".saswp-global-container:eq(1)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();(-1!=t.indexOf("_image")||-1!=t.indexOf("_logo"))&&(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),c=s(this).attr("div_type"),p=s(this).attr("itemlist_sub_type"),r=s("#saswp_specific_"+t).find(".saswp-"+c+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div:nth-child("+r+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,c,t,i+"_",p)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-table-close-new",function(){s(this).closest(".saswp-dynamic-properties").remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),c="",p=a.toLowerCase()+"_"+i,r="saswp_fixed_image["+i+"]";"manual_text"==t?(c+=' ',c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(c+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,c+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(c),saswpCustomSelect2())},"json"):"custom_field"==t?(c+='',c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"fixed_image"==t?(c+="",c+="",c+=' ',c+=' ',c+=' ',c+=' ',c+='',c+="
",c+=" ",c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):(c+=" ",c+='X ',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var c=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:c,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),saswp_enable_rating_automate(),saswp_enable_rating_automate(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('X ')}),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){let l="",w="saswp_hide";saswp_localize_data.saswp_enable_gcaptcha&&1==saswp_localize_data.saswp_enable_gcaptcha&&(l="checked",w="");var d='",jQuery(jQuery(".wrap")).prepend(d)}jQuery(document).on("click",".saswp-clear-images",function(e){e.preventDefault();var a=s(this);!0==confirm("Are you sure? It will remove all the resized images")&&(a.addClass("updating-message"),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_clear_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){a.removeClass("updating-message"),"t"!=s.status&&alert("something went wrong")},error:function(s){console.log(s)}}))}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("Settings "),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({spacing:"5px",rtl:saswp_localize_data.is_rtl,rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().next().val(e)}}).on("rateyo.change",function(e,a){var t=a.rating;s(this).next().text(t)}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('Invalid Phone Number ')}),saswpCollectionSlider(),s(document).on("click",".saswp-add-rv-btn",function(){s(".saswp-dynamic-platforms").toggle()}),s(".saswp-rmv-coll-rv").on("click",function(){if(rmv_boolean=!rmv_boolean,saswp_on_collection_design_change(),jQuery(jQuery(".saswp-add-dynamic-section")).remove(),rmv_boolean){var s="";s+='',s+='
',s+=' ',s+="
",s+='
',s+='Choose Platform '+jQuery("#saswp-plaftorm-list").html()+" ",s+="
",s+="
",jQuery(jQuery(".saswp-collection-preview")[0]).after(s)}}),s(document).on("change","#saswp_dynamic_platforms",function(){var e=s(this).val(),a="";a+='',a+=" ",a+='Add ',s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after(a);var t=ajaxurl+"?action=saswp_add_reviews_to_select2&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&platform_id="+e;s("#saswp_dynamic_reviews_list").select2({ajax:{url:t,dataType:"json",processResults:function(s){if(s.status)return{results:s.message}}}})}),s(document).on("click",".saswp-add-single-rv",function(e){e.preventDefault();var a=s("#saswp_dynamic_reviews_list").val(),t=s("#saswp_dynamic_platforms").val();a&&saswp_get_collection_data(null,t,null,a,!0)}),s(document).on("click",".saswp-remove-coll-rv",function(){var e=s(this).attr("data-id"),a=s(this).attr("platform-id");if(a){var t=saswp_collection[a].filter(function(s){return s.saswp_review_id!=e});saswp_collection[a]=t,saswp_on_collection_design_change()}}),s(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val(),a=s(".saswp-collection-sorting").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),s(".saswp-rmv-coll-rv").hide(),s(".saswp-add-dynamic-section").hide(),"grid"==e&&(s(".saswp-grid-options").removeClass("saswp_hide"),s(".saswp-rmv-coll-rv").show(),s(".saswp-add-dynamic-section").show(),s(".saswp-coll-review-wrapper").removeClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"gallery"==e&&(s(".saswp-slider-options").removeClass("saswp_hide"),s(".saswp-coll-review-wrapper").removeClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px"),s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"popup"==e&&(s(".saswp-collection-lp").css("height","31px"),s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").addClass("saswp_hide")),"badge"==e&&(s(".saswp-coll-review-wrapper").addClass("saswp_hide"),s(".saswp-badge-options").removeClass("saswp_hide")),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide"),"recent"==a?(s("#saswp_collection_specific_rating").parent().parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"),s("#saswp_collection_specific_rating").is(":checked")?s("#saswp_collection_specific_rating_sel").parent().removeClass("saswp_hide"):s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")):(s("#saswp_collection_specific_rating").parent().parent().addClass("saswp_hide"),s("#saswp_collection_specific_rating_sel").parent().addClass("saswp_hide")),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();let c=s("#saswp-review-platform-places").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a,null,null,c)):alert("Enter Count")});var h=s("#saswp_total_reviews_list").val();h&&saswp_get_collection_data(null,null,null,null,h);let v=s("#saswp-plaftorm-list").find("option:first-child").val();saswp_get_platform_place_list(v),(a=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",a.innerHTML="Copied!",document.body.appendChild(a);var m=document.getElementById("saswp-motivatebox");m&&m.addEventListener("mouseup",function(s){var e,i,c,p,r,s=s||event,n=s.target||s.srcElement;"motivate"==n.className&&(e=n,(i=document.createRange()).selectNodeContents(e),(c=window.getSelection()).removeAllRanges(),c.addRange(i),function s(){var e;try{e=document.execCommand("copy")}catch(a){e=!1}return e}()&&(r=(p=s)||event,clearTimeout(t),a.style.left=r.pageX-10+"px",a.style.top=r.pageY+15+"px",a.style.opacity=1,t=setTimeout(function(){a.style.opacity=0},500)))},!1),s(document).on("change","#saswp-plaftorm-list",function(e){e.preventDefault();let a=s(this).val();saswp_get_platform_place_list(a)}),s(document).on("change",".saswp_archive_list_type_class",function(e){e.preventDefault(),"ItemList"==s(this).val()?s(".saswp_archive_schema_type_class").parent().parent().hide():s(".saswp_archive_schema_type_class").parent().parent().show()}),s(document).on("change",".saswp-custom-fields-name, .saswp-custom-meta-list",function(e){e.preventDefault();let a=s(".saswp-custom-fields-name").val(),t=s(".saswp-custom-meta-list").val(),i=s(this).attr("class");if("saswp-custom-fields-name"==i&&(a=s(this).val(),t=s(this).parent().next().find("select").val()),"saswp-custom-meta-list"==i&&(t=s(this).val(),a=s(this).closest("tr").find(".saswp-custom-fields-name").val()),"saswp_faq_main_entity"==a&&"saswp_repeater_mapping"==t){let c=s(".saswp-itemlist-item-type-list").attr("data-id");0==s(".saswp-add-faq-repeat-que").length&&s(this).closest("tr").after('Add Faq Question '),0==s(".saswp-faq-repeater-tr").length&&s(this).closest("tr").after(' ')}else{let p=0;s(".saswp-custom-meta-list").each(function(e){"saswp_repeater_mapping"==s(this).val()&&(p=1)}),0==p&&(s(".saswp-faq-repeater-tr").remove(),s(".saswp-faq-question").remove(),s(".saswp-add-faq-repeat-que").remove())}}),s("#saswp-rating-module-css-app").change(function(e){s(this).is(":checked")?s(".saswp-rbcc-fields").removeClass("saswp_hide"):s(".saswp-rbcc-fields").addClass("saswp_hide")}).change(),s(document).on("click","#saswp-rtb-link",function(e){s("#saswp-appearance-modal").fadeIn()}),s(document).on("click","#saswp-appearance-modal-close",function(e){s("#saswp-appearance-modal").fadeOut()}),s("#saswp-rbcc-review-bg-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-preview-head").css("background",t),s(".saswp-rbcc-rvs span").css("background",t)}}),s("#saswp-rbcc-review-f-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-preview-head").css("color",t),s(".saswp-rbcc-rvs span").css("color",t)}}),s("#saswp-rbcc-review-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-review-f-unit").val();a<=0&&(a=15),s(".saswp-rbcc-preview-head, .saswp-rbcc-rvs span").css("font-size",a+t)}),s("#saswp-rbcc-review-f-unit").change(function(e){var a=s("#saswp-rbcc-review-f-size").val(),t=s(this).val();s(".saswp-rbcc-preview-head, .saswp-rbcc-rvs span").css("font-size",a+t)}).change(),s("#saswp-rbcc-if-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-rif").css("color",t)}}),s("#saswp-rbcc-if-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-if-f-unit").val();a<=0&&(a=15),s(".saswp-rbcc-rif").css("font-size",a+t)}),s("#saswp-rbcc-if-f-unit").change(function(e){var a=s("#saswp-rbcc-if-f-size").val(),t=s(this).val();s(".saswp-rbcc-rif").css("font-size",a+t)}).change(),s("#saswp-rbcc-stars-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp_star_color .saswp_star").attr("stop-color",t)}}),s("#saswp-rbcc-stars-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val();a<=0&&(a=18),s(".saswp-rvw-str .saswp_star_color svg").css("width",a+"px")}),s("#saswp-rbcc-ar-color").wpColorPicker({change:function(e,a){e.target;var t=a.color.toString();s(".saswp-rbcc-rvar").css("color",t)}}),s("#saswp-rbcc-ar-f-size").on("keyup",function(e){e.preventDefault();var a=s(this).val(),t=s("#saswp-rbcc-ar-f-unit").val();a<=0&&(a=48),s(".saswp-rbcc-rvar").css("font-size",a+t)}),s("#saswp-rbcc-ar-f-unit").change(function(e){var a=s("#saswp-rbcc-ar-f-size").val(),t=s(this).val();s(".saswp-rbcc-rvar").css("font-size",a+t)}).change(),s(document).on("change","#saswp_review_custom_chk_box",function(e){s(this).is(":checked")?s("#saswp-review-cccc").show():s("#saswp-review-cccc").hide()}),s(document).on("click","#saswp-rbcc-reset",function(e){e.preventDefault(),d_css={background:"#000",color:"#fff","font-size":"15px"},s(".saswp-rbcc-preview-head").css(d_css),s(".saswp-rbcc-rvs span").css(d_css),d_css={color:"#000","font-size":"18px"},s(".saswp-rbcc-rif").css(d_css),s(".saswp_star_color .saswp_star").attr("stop-color","#000"),s(".saswp-rvw-str .saswp_star_color svg").css("width","18px"),d_css={color:"#000","font-size":"48px"},s(".saswp-rbcc-rvar").css(d_css),bg_color="#000",font_color="#fff",s("#saswp-rbcc-review-bg-color, #saswp-rbcc-if-color, #saswp-rbcc-stars-color, #saswp-rbcc-ar-color").val(bg_color),s("#saswp-rbcc-review-f-color").val(font_color),s("#saswp-rbcc-review-f-size").val("15"),s("#saswp-rbcc-review-f-unit").val("px"),s("#saswp-rbcc-if-f-size").val("18"),s("#saswp-rbcc-if-f-unit").val("px"),s("#saswp-rbcc-ar-f-size").val("48"),s("#saswp-rbcc-ar-f-unit").val("px"),s("#saswp-rbcc-stars-f-size").val("18"),s("#saswp-rbcc-stars-f-unit").val("px"),s(".saswp-rbcc-font-color .wp-color-result").css("background-color","#fff"),s(".saswp-rbcc-bg-color .wp-color-result").css("background-color",bg_color),s(".saswp-rbcc-bg-color .wp-color-result").css("color",font_color),s(".saswp-rbcc-dc .wp-color-result").css("background-color",bg_color)}),s(document).on("change","#saswp_enable_gcaptcha",function(e){s(this).is(":checked")?s("#saswp-gkey-captcha-wrapper").removeClass("saswp_hide"):s("#saswp-gkey-captcha-wrapper").addClass("saswp_hide")}),s(document).on("click","#saswp-ar-form-btn",function(e){let a=s("#saswp_g_site_key").val(),t=s("#saswp_g_secret_key").val(),i=0,c={};c=s("#saswp_enable_gcaptcha").is(":checked")?{action:"saswp_update_google_captch_keys",captcha_enable:i=1,gsitekey:a,gsecretkey:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce}:{action:"saswp_update_google_captch_keys",captcha_enable:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},s.ajax({url:ajaxurl,method:"POST",data:c,success:function(s){location.reload()}})})});
\ No newline at end of file
diff --git a/admin_section/settings.php b/admin_section/settings.php
index dd60c1d6..e61bb827 100644
--- a/admin_section/settings.php
+++ b/admin_section/settings.php
@@ -1731,6 +1731,18 @@ function saswp_import_callback() {
'id' => 'saswp-other-images',
'name' => 'sd_data[saswp-other-images]',
)
+ ),
+ array(
+ 'label' => 'Add All Available Images Of Tags & Categories',
+ 'id' => 'saswp-archive-images-checkbox',
+ 'name' => 'saswp-archive-images-checkbox',
+ 'type' => 'checkbox',
+ 'class' => 'checkbox saswp-checkbox',
+ 'note' => 'It adds all the available images on tags and categories to schema markup. Learn More ',
+ 'hidden' => array(
+ 'id' => 'saswp-archive-images',
+ 'name' => 'sd_data[saswp-archive-images]',
+ )
),
array(
'label' => 'Allow Image Resizing',
diff --git a/output/class-saswp-output-service.php b/output/class-saswp-output-service.php
index dd7ee6b2..d1d0a22a 100644
--- a/output/class-saswp-output-service.php
+++ b/output/class-saswp-output-service.php
@@ -9081,6 +9081,7 @@ public function saswp_get_featured_image() {
$image_details = array();
$image_resize = false;
$multiple_size = false;
+ $term_id = 0;
if( (isset($sd_data['saswp-image-resizing']) && $sd_data['saswp-image-resizing'] == 1) || !isset($sd_data['saswp-image-resizing']) ) {
$image_resize = true;
@@ -9254,9 +9255,21 @@ public function saswp_get_featured_image() {
//Get All the images available on post
- if( (isset($sd_data['saswp-other-images']) && $sd_data['saswp-other-images'] == 1) || !isset($sd_data['saswp-other-images']) ){
+ if( (isset($sd_data['saswp-other-images']) && $sd_data['saswp-other-images'] == 1) || !isset($sd_data['saswp-other-images']) || ! empty( $sd_data['saswp-archive-images'] ) ){
- $content = get_the_content(null, false, $post);
+ $content = '';
+ $queried_object = get_queried_object();
+ if ( ! empty( $sd_data['saswp-archive-images'] ) ) {
+ if ( is_object( $queried_object ) && ! empty( $queried_object->term_id ) && ! empty( $queried_object->description ) ) {
+ $content = $queried_object->description;
+ $input2 = array();
+ $term_id = $queried_object->term_id;
+ }
+ }
+
+ if ( ( isset( $sd_data['saswp-other-images'] ) && $sd_data['saswp-other-images'] == 1 ) || ! isset( $sd_data['saswp-other-images'] ) ) {
+ $content = get_the_content(null, false, $post);
+ }
if($content){
@@ -9332,7 +9345,12 @@ public function saswp_get_featured_image() {
}
}
- $attach_images['image'][$key]['@id'] = saswp_get_permalink().'#primaryimage';
+
+ if ( $term_id > 0 ){
+ $attach_images['image'][$key]['@id'] = get_term_link( $term_id ).'#primaryimage';
+ }else {
+ $attach_images['image'][$key]['@id'] = saswp_get_permalink().'#primaryimage';
+ }
}
}
From e411720b8b0f2f84f8ee498eff31332577684253 Mon Sep 17 00:00:00 2001
From: shridhamdeveloper <38998323+shridhamdeveloper@users.noreply.github.com>
Date: Sat, 2 Nov 2024 18:20:19 +0530
Subject: [PATCH 18/18] Change log for version 1.38
---
readme.txt | 32 ++++++++++++++++----------------
structured-data-for-wp.php | 4 ++--
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/readme.txt b/readme.txt
index be76697a..8d822738 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Tags: Schema, Structured Data, Rich Snippets, SEO, AMP
Requires at least: 4.5
Tested up to: 6.6
Requires PHP: 5.6.20
-Stable tag: 1.37
+Stable tag: 1.38
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO.
@@ -121,6 +121,21 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
== Changelog ==
+= 1.38 (02 November 2024) =
+* Feature: Added ProductGroup Schema Type #2071
+* Feature: Added ption to show/hide schema markup inside elementor widget #2171
+* Enhancement: Fixed issue of correct image in ImageObject schema #2188
+* Enhancement: Schema meta fields should not be appeared inside custom fields. #2189
+* Feature: Automated the faqs data added manually in classic editor #2193
+* Fixed: Code improvement #2194
+* Fixed: ACF time picker conflict issue in block editor #2195
+* Enhancement: Schema markup shown for the AMP pages showing the same markup as non-AMP #2199
+* Enhancement: Rankmath keyword issue with Category and Tag for WebPage schema #2201
+* Enhancement: Added FAQ compatibility with Elementor accordian #2202
+* Feature: Added Compatibility with wpForo plugin #2204
+* Enhancement: Issue with adding a live YouTube video to post #2205
+* Feature: Added compatibility with the plugin RealtyPress Premium #2206
+
= 1.37 (09 October 2024) =
* Fixed: Avatars are disabled still they are being added to the schema markup #2184
* Feature: Added compatibility with Discout Rules plugin #2190
@@ -274,19 +289,4 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
* Fixed: Test with wordpress v6.4 #2040
* Fixed: PHP warning in query monitor "Undefined array key 1" #2043
-
-= 1.22 (6 Nov 2023) =
-
-* Feature: Added few new fields in creativework schema #2015
-* Enhancement: Added support for newer social networks on the 'sameAs' field #2019
-* Fixed: A PHP warning shown in the schema markup #2020
-* Fixed: Classic Editor FAQ issue in schema markup #2022
-* Fixed: Issue with modify option in Recipe schema #2024
-* Feature: Added new feature (FAQ schema should be crawled from individual ACF fields step by step) #2026
-* Fixed: Fatal Error Call to undefined function wp_getimagesize() #2027
-* Fixed: Errors from schema pro extensions #2029
-* Enhancement: Added option to add or remove shop page url from Breadcrumbs #2034
-* Fixed: Conflict issue with FOXIZ CORE plugin which causes fatal error #2035
-* Fixed: Warning in debug log #2036
-
All changelog available on [GitHub](https://github.com/ahmedkaludi/schema-and-structured-data-for-wp/releases).
\ No newline at end of file
diff --git a/structured-data-for-wp.php b/structured-data-for-wp.php
index 6a27590a..a2ef5386 100644
--- a/structured-data-for-wp.php
+++ b/structured-data-for-wp.php
@@ -2,7 +2,7 @@
/*
Plugin Name: Schema & Structured Data for WP & AMP
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
-Version: 1.37
+Version: 1.38
Text Domain: schema-and-structured-data-for-wp
Domain Path: /languages
Author: Magazine3
@@ -13,7 +13,7 @@
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) exit;
-define( 'SASWP_VERSION', '1.37' );
+define( 'SASWP_VERSION', '1.38' );
define( 'SASWP_DIR_NAME_FILE', __FILE__ );
define( 'SASWP_DIR_NAME', dirname( __FILE__ ) );
define( 'SASWP_DIR_URI', plugin_dir_url( __FILE__ ) );