Schema & Structured Data for WP & AMP - Version 1.9.45

Version Description

(23 July 2020) =

  • Fixed: Fatal error: Uncaught Error: Call to a member function get() on null on activation Arlo training and event management system #1122
  • Fixed: Remove CollectionPage schema on product category page #1080
  • Fixed: Changed the label of Website schema (Global) to Website schema (HomePage) #1121
  • Fixed: Undefined index: saswp_product_reviews_created_date /plugins/schema-and-structured-data-for-wp/output/markup.php on line 885 #1120
  • Added: Compatibility with the Sensei LMS plugin ( https://wordpress.org/plugins/sensei-lms/) in Course Schema pro extension #918
  • Added: Compatibility with classiPress Ads theme #918
  • Added: Compatibility with Stamped.io Product Reviews & UGC for WooCommerce ( https://wordpress.org/plugins/stampedio-product-reviews/ ) #666
  • Added: Compatibility with Wp Product Review ( https://wordpress.org/plugins/wp-product-review/ ) #568
  • Added: Compatibility with Sabai Discuss plugin in Q&A pro extension #1056
  • Added: Compatibility with Geo Directory plugin in Real Estate pro extension #818
  • Added: Compatibility with Featured Video Plus ( https://wordpress.org/support/plugin/featured-video-plus/ ) #576
Download this release

Release Info

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

Code changes from version 1.9.44.1 to 1.9.45

admin_section/common-function.php CHANGED
@@ -2188,9 +2188,12 @@ if ( ! defined('ABSPATH') ) exit;
2188
  global $post;
2189
  global $sd_data;
2190
 
2191
- $title = @get_the_title();
2192
- $c_title = '';
2193
-
 
 
 
2194
  //SEOPress
2195
  if(saswp_remove_warnings($sd_data, 'saswp-squirrly-seo', 'saswp_string') == 1 && class_exists('SQ_Models_Abstract_Seo')){
2196
 
@@ -2943,6 +2946,7 @@ function saswp_get_field_note($pname){
2943
  'yoast_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a>',
2944
  'rank_math' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/seo-by-rank-math/">WordPress SEO Plugin – Rank Math</a>',
2945
  'dw_qna' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/dw-question-answer/">DW Question Answer</a>',
 
2946
  'smart_crawl' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/smartcrawl-seo/">SmartCrawl Seo</a>',
2947
  'the_seo_framework' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/autodescription/">The Seo Framework</a>',
2948
  'seo_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-seopress/">SEOPress</a>',
@@ -2950,6 +2954,8 @@ function saswp_get_field_note($pname){
2950
  'squirrly_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/squirrly-seo/">Squirrly SEO</a>',
2951
  'wp_recipe_maker' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-recipe-maker/">WP Recipe Maker</a>',
2952
  'wpzoom' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/recipe-card-blocks-by-wpzoom">Recipe Card Blocks by WPZOOM</a>',
 
 
2953
  'yotpo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/yotpo-social-reviews-for-woocommerce/">Yotpo: Product & Photo Reviews for WooCommerce</a>',
2954
  'starsrating' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/stars-rating">Stars Rating</a>',
2955
  'ultimate_blocks' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/ultimate-blocks">Ultimate Blocks – Gutenberg Blocks Plugin</a>',
@@ -2959,6 +2965,7 @@ function saswp_get_field_note($pname){
2959
  'learn_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/learnpress/">Learn Press</a>',
2960
  'learn_dash' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.learndash.com/pricing-and-purchase/">Learn Dash</a>',
2961
  'lifter_lms' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/lifterlms/">LifterLMS</a>',
 
2962
  'wplms' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/wplms-learning-management-system/6780226">WPLMS</a>',
2963
  'wp_event_manager' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-event-manager/">WP Event Manager</a>',
2964
  'events_manager' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/events-manager/">Events Manager</a>',
@@ -2975,8 +2982,11 @@ function saswp_get_field_note($pname){
2975
  'realhomes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>',
2976
  'myhome' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://myhometheme.net/">My Home Theme</a>',
2977
  'realestate_5' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://myhometheme.net/">WP Pro Realstate 5</a>',
2978
- 'classipress' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.appthemes.com/themes/classipress/">ClassiPress</a>',
 
2979
  'taqyeem' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/taqyeem-wordpress-review-plugin/4558799">Taqyeem</a>',
 
 
2980
  'soledad' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/soledad-multiconcept-blogmagazine-wp-theme/12945398">Soledad Theme</a>',
2981
  'zip_recipes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/zip-recipes/">Zip Recipes</a>',
2982
  'mediavine_create' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/mediavine-create/">Create by Mediavine</a>',
@@ -3235,17 +3245,20 @@ function saswp_is_date_field($date_str){
3235
 
3236
  }
3237
 
3238
- function saswp_get_video_links(){
3239
-
3240
- global $post;
3241
 
3242
- $response = array();
3243
-
3244
- if(is_object($post)){
3245
-
 
 
 
 
 
3246
  $pattern = get_shortcode_regex();
3247
 
3248
- if ( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches )
3249
  && array_key_exists( 2, $matches )
3250
  && in_array( 'playlist', $matches[2] ) )
3251
  {
@@ -3256,31 +3269,44 @@ function saswp_get_video_links(){
3256
  $mached = ltrim($mached, '[');
3257
  $mached = trim($mached, '[]');
3258
  $attr = shortcode_parse_atts($mached);
3259
- $response[] = wp_get_attachment_url($attr['ids']);
 
3260
 
3261
  }
3262
 
3263
  }
3264
 
3265
- preg_match_all( '/src\=\"(.*?)youtube\.com(.*?)\"/s', $post->post_content, $matches, PREG_SET_ORDER );
3266
 
3267
  if($matches){
3268
 
3269
  foreach($matches as $match){
3270
-
3271
- $response[] = $match[1].'youtube.com'.$match[2];
 
 
 
 
 
 
3272
 
3273
  }
3274
  }
3275
 
3276
- preg_match_all( '/src\=\"(.*?)youtu\.be(.*?)\"/s', $post->post_content, $youtubematches, PREG_SET_ORDER );
3277
 
3278
  if($youtubematches){
3279
 
3280
  foreach($youtubematches as $match){
3281
 
3282
- $response[] = $match[1].'youtu.be'.$match[2];
3283
-
 
 
 
 
 
 
3284
  }
3285
 
3286
  }
@@ -3288,12 +3314,50 @@ function saswp_get_video_links(){
3288
  $attributes = saswp_get_gutenberg_block_data('core-embed/youtube');
3289
 
3290
  if(isset($attributes['attrs']['url'])){
3291
- $response[0] = $attributes['attrs']['url'];
 
 
 
 
 
 
 
3292
  }
3293
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3294
  }
3295
- return $response;
 
 
3296
  }
 
3297
  function saswp_remove_all_images($content){
3298
 
3299
  if($content){
2188
  global $post;
2189
  global $sd_data;
2190
 
2191
+ $title = $c_title = '';
2192
+
2193
+ if(is_object($post)){
2194
+ $title = @get_the_title();
2195
+ }
2196
+
2197
  //SEOPress
2198
  if(saswp_remove_warnings($sd_data, 'saswp-squirrly-seo', 'saswp_string') == 1 && class_exists('SQ_Models_Abstract_Seo')){
2199
 
2946
  'yoast_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a>',
2947
  'rank_math' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/seo-by-rank-math/">WordPress SEO Plugin – Rank Math</a>',
2948
  'dw_qna' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/dw-question-answer/">DW Question Answer</a>',
2949
+ 'sabaidiscuss' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://sabaidiscuss.com">SabaiDiscuss</a>',
2950
  'smart_crawl' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/smartcrawl-seo/">SmartCrawl Seo</a>',
2951
  'the_seo_framework' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/autodescription/">The Seo Framework</a>',
2952
  'seo_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-seopress/">SEOPress</a>',
2954
  'squirrly_seo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/squirrly-seo/">Squirrly SEO</a>',
2955
  'wp_recipe_maker' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-recipe-maker/">WP Recipe Maker</a>',
2956
  'wpzoom' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/recipe-card-blocks-by-wpzoom">Recipe Card Blocks by WPZOOM</a>',
2957
+ 'video_thumbnails' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/video-thumbnails/">Video Thumbnails</a>',
2958
+ 'featured_video_plus' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/featured-video-plus/">Featured Video Plus</a>',
2959
  'yotpo' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/yotpo-social-reviews-for-woocommerce/">Yotpo: Product & Photo Reviews for WooCommerce</a>',
2960
  'starsrating' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/stars-rating">Stars Rating</a>',
2961
  'ultimate_blocks' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/ultimate-blocks">Ultimate Blocks – Gutenberg Blocks Plugin</a>',
2965
  'learn_press' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/learnpress/">Learn Press</a>',
2966
  'learn_dash' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.learndash.com/pricing-and-purchase/">Learn Dash</a>',
2967
  'lifter_lms' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/lifterlms/">LifterLMS</a>',
2968
+ 'senseilms' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/sensei-lms/">Sensei LMS</a>',
2969
  'wplms' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/wplms-learning-management-system/6780226">WPLMS</a>',
2970
  'wp_event_manager' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-event-manager/">WP Event Manager</a>',
2971
  'events_manager' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/events-manager/">Events Manager</a>',
2982
  'realhomes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>',
2983
  'myhome' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://myhometheme.net/">My Home Theme</a>',
2984
  'realestate_5' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://myhometheme.net/">WP Pro Realstate 5</a>',
2985
+ 'geodirectory' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/geodirectory/">GeoDirectory – Business Directory</a>',
2986
+ 'classipress' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.appthemes.com/themes/classipress/">ClassiPress</a>',
2987
  'taqyeem' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/taqyeem-wordpress-review-plugin/4558799">Taqyeem</a>',
2988
+ 'wp_product_review' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-product-review/">WP Product Review</a>',
2989
+ 'stamped' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/stampedio-product-reviews">Stamped.io Product Reviews & UGC for WooCommerce</a>',
2990
  'soledad' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/soledad-multiconcept-blogmagazine-wp-theme/12945398">Soledad Theme</a>',
2991
  'zip_recipes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/zip-recipes/">Zip Recipes</a>',
2992
  'mediavine_create' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/mediavine-create/">Create by Mediavine</a>',
3245
 
3246
  }
3247
 
3248
+ function saswp_get_video_metadata($content = ''){
 
 
3249
 
3250
+ global $post;
3251
+ $response = array();
3252
+
3253
+ if(!$content){
3254
+ if(is_object($post)){
3255
+ $content = $post->post_content;
3256
+ }
3257
+ }
3258
+
3259
  $pattern = get_shortcode_regex();
3260
 
3261
+ if ( preg_match_all( '/'. $pattern .'/s', $content, $matches )
3262
  && array_key_exists( 2, $matches )
3263
  && in_array( 'playlist', $matches[2] ) )
3264
  {
3269
  $mached = ltrim($mached, '[');
3270
  $mached = trim($mached, '[]');
3271
  $attr = shortcode_parse_atts($mached);
3272
+ $vurl = wp_get_attachment_url($attr['ids']);
3273
+ $response[]['video_url'] = $vurl;
3274
 
3275
  }
3276
 
3277
  }
3278
 
3279
+ preg_match_all( '/src\=\"(.*?)youtube\.com(.*?)\"/s', $content, $matches, PREG_SET_ORDER );
3280
 
3281
  if($matches){
3282
 
3283
  foreach($matches as $match){
3284
+
3285
+ $vurl = $match[1].'youtube.com'.$match[2];
3286
+ $rulr = 'https://www.youtube.com/oembed?url='.esc_attr($vurl).'&format=json';
3287
+ $result = @wp_remote_get($rulr);
3288
+ $metadata = json_decode(wp_remote_retrieve_body($result),true);
3289
+
3290
+ $metadata['video_url'] = $vurl;
3291
+ $response[] = $metadata;
3292
 
3293
  }
3294
  }
3295
 
3296
+ preg_match_all( '/src\=\"(.*?)youtu\.be(.*?)\"/s', $content, $youtubematches, PREG_SET_ORDER );
3297
 
3298
  if($youtubematches){
3299
 
3300
  foreach($youtubematches as $match){
3301
 
3302
+ $vurl = $match[1].'youtu.be'.$match[2];
3303
+ $rulr = 'https://www.youtube.com/oembed?url='.esc_attr($vurl).'&format=json';
3304
+ $result = @wp_remote_get($rulr);
3305
+ $metadata = json_decode(wp_remote_retrieve_body($result),true);
3306
+
3307
+ $metadata['video_url'] = $vurl;
3308
+ $response[] = $metadata;
3309
+
3310
  }
3311
 
3312
  }
3314
  $attributes = saswp_get_gutenberg_block_data('core-embed/youtube');
3315
 
3316
  if(isset($attributes['attrs']['url'])){
3317
+
3318
+ $vurl = $attributes['attrs']['url'];
3319
+ $rulr = 'https://www.youtube.com/oembed?url='.esc_attr($vurl).'&format=json';
3320
+ $result = @wp_remote_get($rulr);
3321
+ $metadata = json_decode(wp_remote_retrieve_body($result),true);
3322
+
3323
+ $metadata['video_url'] = $vurl;
3324
+ $response[0] = $metadata;
3325
  }
3326
+
3327
+ return $response;
3328
+ }
3329
+
3330
+ function saswp_get_thumbnail(){
3331
+
3332
+ global $thumbnail, $sd_data;
3333
+
3334
+ if(!$thumbnail){
3335
+
3336
+ $image_id = get_post_thumbnail_id();
3337
+ $image_details = wp_get_attachment_image_src($image_id);
3338
+
3339
+ if( isset($sd_data['saswp-video-thumbnails']) && $sd_data['saswp-video-thumbnails'] == 1 && class_exists('Video_Thumbnails') ){
3340
+
3341
+ $thumbnail = get_video_thumbnail();
3342
+
3343
+ }else if (isset($image_details[0])){
3344
+
3345
+ $thumbnail = $image_details[0];
3346
+
3347
+ }else{
3348
+
3349
+ if(isset($sd_data['sd_default_image']['thumbnail'])){
3350
+ $thumbnail = $sd_data['sd_default_image']['thumbnail'];
3351
+ }
3352
+
3353
+ }
3354
+
3355
  }
3356
+
3357
+ return $thumbnail;
3358
+
3359
  }
3360
+
3361
  function saswp_remove_all_images($content){
3362
 
3363
  if($content){
admin_section/images/question.png ADDED
Binary file
admin_section/js/main-script.js CHANGED
@@ -1045,6 +1045,33 @@ jQuery(document).ready(function($){
1045
  $("#saswp-taqyeem").val(0);
1046
  }
1047
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1048
 
1049
  case 'saswp-the-events-calendar-checkbox':
1050
  saswp_compatibliy_notes(current, id);
@@ -1091,6 +1118,33 @@ jQuery(document).ready(function($){
1091
  }
1092
  break;
1093
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1094
  case 'saswp-classipress-checkbox':
1095
  saswp_compatibliy_notes(current, id);
1096
  if ($(this).is(':checked')) {
@@ -1144,6 +1198,15 @@ jQuery(document).ready(function($){
1144
  $("#saswp-lifter-lms").val(0);
1145
  }
1146
  break;
 
 
 
 
 
 
 
 
 
1147
 
1148
  case 'saswp-wp-event-manager-checkbox':
1149
  saswp_compatibliy_notes(current, id);
1045
  $("#saswp-taqyeem").val(0);
1046
  }
1047
  break;
1048
+
1049
+ case 'saswp-video-thumbnails-checkbox':
1050
+ saswp_compatibliy_notes(current, id);
1051
+ if ($(this).is(':checked')) {
1052
+ $("#saswp-video-thumbnails").val(1);
1053
+ }else{
1054
+ $("#saswp-video-thumbnails").val(0);
1055
+ }
1056
+ break;
1057
+
1058
+ case 'saswp-featured-video-plus-checkbox':
1059
+ saswp_compatibliy_notes(current, id);
1060
+ if ($(this).is(':checked')) {
1061
+ $("#saswp-featured-video-plus").val(1);
1062
+ }else{
1063
+ $("#saswp-featured-video-plus").val(0);
1064
+ }
1065
+ break;
1066
+
1067
+ case 'saswp-wp-product-review-checkbox':
1068
+ saswp_compatibliy_notes(current, id);
1069
+ if ($(this).is(':checked')) {
1070
+ $("#saswp-wp-product-review").val(1);
1071
+ }else{
1072
+ $("#saswp-wp-product-review").val(0);
1073
+ }
1074
+ break;
1075
 
1076
  case 'saswp-the-events-calendar-checkbox':
1077
  saswp_compatibliy_notes(current, id);
1118
  }
1119
  break;
1120
 
1121
+ case 'saswp-stamped-checkbox':
1122
+ saswp_compatibliy_notes(current, id);
1123
+ if ($(this).is(':checked')) {
1124
+ $("#saswp-stamped").val(1);
1125
+ }else{
1126
+ $("#saswp-stamped").val(0);
1127
+ }
1128
+ break;
1129
+
1130
+ case 'saswp-sabaidiscuss-checkbox':
1131
+ saswp_compatibliy_notes(current, id);
1132
+ if ($(this).is(':checked')) {
1133
+ $("#saswp-sabaidiscuss").val(1);
1134
+ }else{
1135
+ $("#saswp-sabaidiscuss").val(0);
1136
+ }
1137
+ break;
1138
+
1139
+ case 'saswp-geodirectory-checkbox':
1140
+ saswp_compatibliy_notes(current, id);
1141
+ if ($(this).is(':checked')) {
1142
+ $("#saswp-geodirectory").val(1);
1143
+ }else{
1144
+ $("#saswp-geodirectory").val(0);
1145
+ }
1146
+ break;
1147
+
1148
  case 'saswp-classipress-checkbox':
1149
  saswp_compatibliy_notes(current, id);
1150
  if ($(this).is(':checked')) {
1198
  $("#saswp-lifter-lms").val(0);
1199
  }
1200
  break;
1201
+
1202
+ case 'saswp-senseilms-checkbox':
1203
+ saswp_compatibliy_notes(current, id);
1204
+ if ($(this).is(':checked')) {
1205
+ $("#saswp-senseilms").val(1);
1206
+ }else{
1207
+ $("#saswp-senseilms").val(0);
1208
+ }
1209
+ break;
1210
 
1211
  case 'saswp-wp-event-manager-checkbox':
1212
  saswp_compatibliy_notes(current, id);
admin_section/js/main-script.min.js CHANGED
@@ -1 +1 @@
1
- var saswp_attached_rv=[],saswp_attached_col=[];jQuery(document).ready(function(s){if(s(document).on("click",".saswp-dismiss-notices",function(){var a=s(this),e=s(this).attr("notice-type");e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_dismiss_notices",notice_type:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status&&a.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 a;a=parseInt(s(this).parent().attr("data-id"));var e=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==e&&saswp_attached_rv.push(a),"collection"==e&&saswp_attached_col.push(a)):("review"==e&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(a),1),"collection"==e&&saswp_attached_col.splice(saswp_attached_col.indexOf(a),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,p="";t>0&&(p+=t+" Reviews, "),i>0&&(p+=i+" Collection"),p||(p=0),s(".saswp-attached-rv-count").text("Attached "+p),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(a){var e=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+e+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),a.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:e,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){if("t"==a.status){var t="";a.result&&(s.each(a.result,function(s,a){var i="";"review"==e&&saswp_attached_rv.includes(parseInt(a.saswp_review_id))&&(i="checked"),"collection"==e&&saswp_attached_col.includes(parseInt(a.saswp_review_id))&&(i="checked"),t+='<div class="saswp-add-rv-loop" data-type="'+e+'" data-id="'+a.saswp_review_id+'">',"review"==e&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+a.saswp_reviewer_name+" ( Rating - "+a.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+a.saswp_review_platform_icon+'"/></span></strong>'),"collection"==e&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+a.saswp_reviewer_name+" </strong>"),t+="</div>"}),s(".saswp-add-rv-automatic-list[data-type="+e+"]").append(t)),a.message&&(s(".saswp-rv-not-found[data-type="+e+"]").removeClass("saswp_hide"),s(".saswp-load-more-rv[data-type="+e+"]").addClass("saswp_hide"))}else alert(a.message);s("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),s(".saswp-modify-schema-toggle").click(function(a){a.preventDefault(),s(".saswp-modify-container").slideToggle("300");var e=s("#saswp_enable_custom_field"),t=e.val();e.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(a){var e="";e=s("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',a.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>'+saswp_localize_data.translable_txt.place_id+'</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>'+saswp_localize_data.translable_txt.reviews+'</strong></td><td style="width:10%;">'+e+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">'+saswp_localize_data.translable_txt.fetch+'</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var a=s(this),e="free";a.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),c=s("#reviews_addon_license_key").val(),o=s("#reviews_addon_license_key_status").val();if("premium"==(e=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert(saswp_localize_data.translable_txt.blocks_zero),a.removeClass("updating-message"),!1;if(0!=i%10)return a.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),a.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),a.removeClass("updating-message"),!1}""!=t&&(c||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:o,reviews_api:c,location:t,blocks:i,g_api:p,premium_status:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(a.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),a.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(a.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),a.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),a.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),""==c&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),a.removeClass("updating-message"))}),saswp_localize_data.do_tour){var a,e="<h3>"+saswp_localize_data.translable_txt.using_schema+"</h3>";e+="<p>"+saswp_localize_data.translable_txt.do_you_want+" <b>"+saswp_localize_data.translable_txt.sd_update+"</b> "+saswp_localize_data.translable_txt.before_others+"</p>",e+='<style type="text/css">',e+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",e+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #saswp_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",e+="</style>",e+='<div id="saswp_mc_embed_signup">',e+='<form method="POST" accept-charset="utf-8" id="saswp-news-letter-form">',e+='<div id="saswp_mc_embed_signup_scroll">',e+='<div class="saswp-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',e+='<input type="text" name="saswp_subscriber_name" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',e+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="saswp_subscriber_email" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',e+='<input type="text" name="saswp_subscriber_website" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',e+='<input type="hidden" name="ml-submit" value="1" />',e+="</div>",e+='<div id="mce-responses">',e+="</div>",e+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',e+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',e+='<p id="saswp-news-letter-status"></p>',e+="</div>",e+="</form>",e+="</div>",s(document).on("submit","#saswp-news-letter-form",function(a){a.preventDefault();var e=s(this),t=e.find('input[name="saswp_subscriber_name"]').val(),i=e.find('input[name="saswp_subscriber_email"]').val();website=e.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(a){a?"Some fields are missing."==a?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid email address."==a?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==a?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Already subscribed."==a?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):(s("#saswp-news-letter-status").text("You're subscribed!"),s("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var t={content:e,position:{edge:"top",align:"left"}};a=function(){s(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},(t=s.extend(t,{buttons:function(s,a){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){a.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){a.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,a){a.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?s(window).bind("load.wp-pointers",a):a()}if(s(".saswp-tabs a").click(function(a){var e=s(this).attr("href"),t=getParameterByName("tab",e);return t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",e),!1}),s(".saswp-schame-type-select").select2(),s(".saswp-schame-type-select").change(function(a){a.preventDefault(),s(".saswp-custom-fields-table").html("");var e=s(this).val();s(".saswp-option-table-class tr").each(function(a,e){a>0&&s(this).hide()}),"TechArticle"==e||"Article"==e||"Blogposting"==e||"NewsArticle"==e||"WebPage"==e?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==e||"Course"==e||"Organization"==e||"CreativeWorkSeries"==e||"MobileApplication"==e||"ImageObject"==e||"HowTo"==e||"MusicPlaylist"==e||"MusicAlbum"==e||"Recipe"==e||"TVSeries"==e||"SoftwareApplication"==e||"Event"==e||"VideoGame"==e||"Service"==e||"AudioObject"==e||"VideoObject"==e||"local_business"==e||"Product"==e||"Review"==e?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==e&&(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"==e&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==e&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==e&&(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"==e?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-itemlist-item-type-list").change()):s(".saswp-schema-modify-section").show(),saswp_enable_rating_review(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:e,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(a),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==e||"local_business"==e||"FAQ"==e?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 a=s(this).val(),e=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(a,e){a>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==e||"Article"==e||"Blogposting"==e||"NewsArticle"==e||"WebPage"==e?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==e||"Course"==e||"Organization"==e||"CreativeWorkSeries"==e||"MobileApplication"==e||"ImageObject"==e||"HowTo"==e||"MusicPlaylist"==e||"MusicAlbum"==e||"Recipe"==e||"TVSeries"==e||"SoftwareApplication"==e||"Event"==e||"VideoGame"==e||"Service"==e||"AudioObject"==e||"VideoObject"==e||"local_business"==e||"Product"==e||"Review"==e?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==e&&(s(".saswp-"+a+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+a+"-tr").find("select").attr("disabled",!1)),"Review"==e&&(s(".saswp-review-text-field-tr").show(),s(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"ItemList"==e?(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"==e&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review()}).change(),s(".saswp-checkbox").change(function(){var a=s(this).attr("id"),e=s(this);switch(a){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(e,a),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(e,a),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-wpzoom").val(1):s("#saswp-wpzoom").val(0);break;case"saswp-yotpo-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-yotpo").val(1):s("#saswp-yotpo").val(0);break;case"saswp-ultimate-blocks-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ultimate-blocks").val(1):s("#saswp-ultimate-blocks").val(0);break;case"saswp-starsrating-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-starsrating").val(1):s("#saswp-starsrating").val(0);break;case"saswp-wptastyrecipe-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wptastyrecipe").val(1):s("#saswp-wptastyrecipe").val(0);break;case"saswp-recipress-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-recipress").val(1):s("#saswp-recipress").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":s(this).is(":checked")?(s("#saswp_kb_contact_1").val(1),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(s("#saswp_kb_contact_1").val(0),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":s(this).is(":checked")?(s("#saswp-logo-dimensions").val(1),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(s("#saswp-logo-dimensions").val(0),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":s(this).is(":checked")?(s("#saswp_archive_schema").val(1),s(".saswp_archive_schema_type_class").parent().parent().show()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_schema").val(1):s("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(e,a),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(e,a),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(e,a),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(e,a),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(e,a),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(e,a),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-myhome").val(1):s("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-realestate-5").val(1):s("#saswp-realestate-5").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-classipress").val(1):s("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wplms").val(1):s("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(e,a),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(e,a),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-modern-events-calendar").val(1):s("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?(s("#saswp-woocommerce-booking").val(1),s("#saswp-woocommerce-booking-main").val(1)):(s("#saswp-woocommerce-booking").val(0),s("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-rss-feed-image-checkbox":s(this).is(":checked")?s("#saswp-rss-feed-image").val(1):s("#saswp-rss-feed-image").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-schemaforfaqs").val(1):s("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),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(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0)}}).change(),s("#saswp_kb_type").change(function(){var a=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"==a&&(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"==a&&(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(a){a.preventDefault();var e=s(this),t=e.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var a=i.state().get("selection").first().toJSON();s("#"+t).val(a.url),s("input[data-id='"+t+"_id']").val(a.id),s("input[data-id='"+t+"_height']").val(a.height),s("input[data-id='"+t+"_width']").val(a.width),s("input[data-id='"+t+"_thumbnail']").val(a.url),"sd_default_image_button"===e.attr("id")&&(s("#sd_default_image_width").val(a.width),s("#sd_default_image_height").val(a.height));var p="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&a.height<1200&&(p='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+a.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+p)}).open()}),s(document).on("click",".saswp_prev_close",function(a){a.preventDefault();var e=s(this).attr("data-id");s(this).parent().remove(),s("#"+e).val(""),s("input[data-id='"+e+"_id']").val(""),s("input[data-id='"+e+"_height']").val(""),s("input[data-id='"+e+"_width']").val(""),s("input[data-id='"+e+"_thumbnail']").val(""),"sd_default_image"===e&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(a){a.preventDefault();var e=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",schema_id:e,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){s(".saswp-post-specific-wrapper[data-id="+e+"] .saswp-post-specific-setting").after(a),s(".saswp_modify_this_schema_hidden_"+e).val(1),s(".saswp-ps-toggle[schema-id="+e+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+e+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+e+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(a){a.preventDefault();var e=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",schema_id:e,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){t.removeClass("updating-message"),"t"==a.status?(s(".saswp_modify_this_schema_hidden_"+e).val(0),s(".saswp-restore-schema[schema-id="+e+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+e+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+e+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(a){var e=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+e).val();if(s(this).is(":checked")){var p=0;s(".saswp-ps-toggle[schema-id="+e+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+e+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+e+"]").parent().addClass("saswp_hide"),s("#saswp_custom_schema_field[schema-id="+e+"]").parent().addClass("saswp_hide")}else{s("#saswp_custom_schema_field[schema-id="+e+"]").parent().removeClass("saswp_hide"),1==i?(s(".saswp-ps-toggle[schema-id="+e+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+e+"]").parent().removeClass("saswp_hide")):(s(".saswp-modify-schema[schema-id="+e+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+e+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+e+"]").parent().addClass("saswp_hide"));p=1}s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:p,schema_id:e,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(a){a.preventDefault(),1==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(a){a.preventDefault();var e=s(this);e.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),p=s("#"+i+"_addon_license_key").val();t&&i&&p?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:p,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){s("#"+i+"_addon_license_key_status").val(a.status),"active"==a.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(a.message)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(a.message)),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(alert("Please enter value license key"),e.removeClass("updating-message"))}),s(".saswp-send-query").on("click",function(a){a.preventDefault();var e=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();console.log(saswpIsEmail(t)),""!=s.trim(e)&&i&&""!=s.trim(t)&&1==saswpIsEmail(t)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",premium_cus:i,message:e,email:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){"t"==a.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(e)&&""==i&&""==s.trim(t)?alert("Please enter the message, email and select customer type"):(""==i&&alert("Select Customer type"),""==s.trim(e)&&alert("Please enter the message"),""==s.trim(t)&&alert("Please enter the email"),0==saswpIsEmail(t)&&alert("Please enter a valid email"))}),s(".saswp-import-plugins").on("click",function(a){a.preventDefault();var e=s(this);e.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(a){"t"==a.status?(s(e).parent().find(".saswp-imported-message").text(a.message),s(e).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(s(e).parent().find(".saswp-imported-message").addClass("saswp-error"),s(e).parent().find(".saswp-imported-message").text(a.message)),e.removeClass("updating-message")},"json")}),s(".saswp-feedback-no-thanks").on("click",function(a){a.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){"t"==a.status&&s(".saswp-feedback-notice").hide()},"json")}),s(".saswp-feedback-remindme").on("click",function(a){a.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){"t"==a.status&&s(".saswp-feedback-notice").hide()},"json")}),s(document).on("change",".saswp-local-business-type-select",function(a){a.preventDefault();var e=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(a){if("t"==a.status){s(".saswp-local-business-name-select").parents("tr").remove();var t=e.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',s.each(a.result,function(s,a){i+='<option value="'+s+'">'+a+"</option>"}),i+="</select></td>",i+="</tr>",e.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(a){a.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(a){a.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(a){a.preventDefault();s(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),s(document).on("click",".saswp-remove-review-item",function(a){a.preventDefault(),s(this).parent().parent("tr").remove()}),s(document).on("focusout",".saswp-review-item-tr input[type=number]",function(a){a.preventDefault();var e=0,t=s(".saswp-review-item-tr input[type=number]").length;s(".saswp-review-item-tr input[type=number]").each(function(a,t){""==s(t).val()?e+=parseFloat(0):e+=parseFloat(s(t).val())});var i=e/t;s("#saswp-review-item-over-all").val(i)}),s("#saswp-review-location").change(function(){var a=s(this).val();s(".saswp-review-shortcode").addClass("saswp_hide"),3==a&&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(a){a.preventDefault();var e=s(this);if(e.addClass("updating-message"),s(".saswp-post-specific-schema-ids").val())var t=JSON.parse(s(".saswp-post-specific-schema-ids").val());s.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?setTimeout(function(){location.reload()},1e3):(alert(s.msg),setTimeout(function(){location.reload()},1e3)),e.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(a){a.preventDefault();var e=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+e).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?s(".saswp-global-container:eq(2)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var a=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("#"+a).show())}),s("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s(".saswp-tools-container:first").show(),s("#saswp-tools-tabs a").click(function(){var a=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-tools-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s("#"+a).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 a=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("#"+a).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 a=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("#"+a).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 a="text",e=s(this).parent().parent("tr"),t=s(this).val();-1==t.indexOf("_image")&&-1==t.indexOf("_logo")||(a="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,a,null,i,t,e)}),s(document).on("click",".saswp-skip-button",function(a){a.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(a){a.preventDefault();var e=s(this);e.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),p=s(this).attr("div_type"),c=s(this).attr("itemlist_sub_type"),o=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div:nth-child("+o+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(e,n,i,p,t,i+"_",c)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-rmv-modify_row",function(a){a.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var a=s(this),e=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),p="",c=e.toLowerCase()+"_"+i,o="saswp_fixed_image["+i+"]";"manual_text"==t?(p+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(p+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),a.parent().parent("tr").find("td:gt(1)").remove(),a.parent().parent("tr").append(p),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,p+=saswp_taxonomy_term_html(s,i),a.parent().parent("tr").find("td:gt(1)").remove(),a.parent().parent("tr").append(p),saswpCustomSelect2())},"json"):"custom_field"==t?(p+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',p+="</select></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"fixed_image"==t?(p+="<td>",p+="<fieldset>",p+='<input data-id="media" style="width: 30%;" class="button" id="'+c+'_button" name="'+c+'_button" type="button" value="Upload" />',p+='<input type="hidden" data-id="'+c+'_height" class="upload-height" name="'+o+'[height]" id="'+c+'_height" value="">',p+='<input type="hidden" data-id="'+c+'_width" class="upload-width" name="'+o+'[width]" id="'+c+'_width" value="">',p+='<input type="hidden" data-id="'+c+'_thumbnail" class="upload-thumbnail" name="'+o+'[thumbnail]" id="'+c+'_thumbnail" value="">',p+='<div class="saswp_image_div_'+c+'">',p+="</div>",p+="</fieldset>",p+="</td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):(p+="<td></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var a=s(this),e=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(e,a,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var a=s(this);a.addClass("updating-message");var e=s("select#schema_type option:selected").val(),t="",i=null;"Review"==e&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var p=s("#post_ID").val();""!=e&&(saswp_meta_list_fields[e]?saswp_get_meta_list(a,"text",saswp_meta_list_fields[e],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:p,schema_type:e,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[e]=s,saswp_get_meta_list(a,"text",saswp_meta_list_fields[e],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var a=s("#saswp_google_place_id").val(),e=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=a&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:a,language:e,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('<tr><td><input type="text" placeholder="https://www.facebook.com/profile" name="sd_data[saswp_social_links][]" value=""></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td></tr>')}),s(document).on("click",".saswp-show-accept-rv-popup",function(){tb_show("Reviews Form","#TB_inline??width=600&height=400&inlineId=saswp-accept-reviews-popup"),s(document).find("#TB_window").width(600).height(400).css({top:"100px","margin-top":"0px"})}),("saswp_reviews"==saswp_localize_data.post_type||"saswp-collections"==saswp_localize_data.post_type)&&"edit.php"==saswp_localize_data.page_now){var i='<div class="saswp-custom-post-tab">';i+='<div style="display:none;" id="saswp-accept-reviews-popup">',i+='<div class="saswp-accept-rv-container">',i+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",i+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',i+='<div class="saswp-show-form-on-tab"><strong>Show form on button tap</strong> <input value="[saswp-reviews-form onbutton=&quot;1&quot;]" type="text" readonly></div>',i+="</div>",i+="</div>",i+='<h2 class="nav-tab-wrapper">',i+="<a href="+saswp_localize_data.reviews_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.reviews_page_url?"saswp-global-selected":"")+'">Reviews</a>',i+="<a href="+saswp_localize_data.collections_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.collections_page_url?"saswp-global-selected":"")+'">Collections</a>',i+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',i+="</h2>",i+="</div>",jQuery(jQuery(".wrap")).prepend(i)}"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&(console.log(saswp_reviews_data.rating_val),s(".saswp-rating-div").rateYo({spacing:"5px",rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(a,e){s(this).next().next().val(a)}}).on("rateyo.change",function(a,e){var t=e.rating;s(this).next().text(t)})),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var a=s(this);a.parent().find(".saswp-phone-validation").remove();var e=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(e)?a.parent().find(".saswp-phone-validation").remove():a.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')}),saswpCollectionSlider(),s(document).on("click",".saswp-grid-page",function(a){a.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(a){a.preventDefault();var e=s(this).attr("platform-id");saswp_collection.splice(e,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 a=s(".saswp-collection-desing").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),"grid"==a&&s(".saswp-grid-options").removeClass("saswp_hide"),"gallery"==a&&s(".saswp-slider-options").removeClass("saswp_hide"),"fomo"==a&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px")),"popup"==a&&s(".saswp-collection-lp").css("height","31px"),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(a){a.preventDefault();var e=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();t&&i>0?(e.addClass("updating-message"),saswp_get_collection_data(i,t,e)):alert("Enter Count")});var p,c,o=s("#saswp_collection_id").val();o&&(s(".spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_collection_platforms",collection_id:o,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){if(a.status){var e=a.message;s.each(e,function(s,a){saswp_get_collection_data(a,s,null)})}s(".spinner").removeClass("is-active")},"json")),(p=document.createElement("div")).style.cssText="position:absolute; background:black; color:white; padding:4px 6px;z-index:10000;border-radius:2px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);opacity:0;transition:opacity 0.3s",p.innerHTML="Copied!",document.body.appendChild(p);var n=document.getElementById("motivatebox");n&&n.addEventListener("mouseup",function(s){var a=(s=s||event).target||s.srcElement;"motivate"==a.className&&(!function(s){var a=document.createRange();a.selectNodeContents(s);var e=window.getSelection();e.removeAllRanges(),e.addRange(a)}(a),function(){var s;try{s=document.execCommand("copy")}catch(a){s=!1}return s}()&&function(s){var a=s||event;clearTimeout(c),p.style.left=a.pageX-10+"px",p.style.top=a.pageY+15+"px",p.style.opacity=1,c=setTimeout(function(){p.style.opacity=0},500)}(s))},!1)});
1
+ var saswp_attached_rv=[],saswp_attached_col=[];jQuery(document).ready(function(s){if(s(document).on("click",".saswp-dismiss-notices",function(){var a=s(this),e=s(this).attr("notice-type");e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_dismiss_notices",notice_type:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status&&a.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 a;a=parseInt(s(this).parent().attr("data-id"));var e=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==e&&saswp_attached_rv.push(a),"collection"==e&&saswp_attached_col.push(a)):("review"==e&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(a),1),"collection"==e&&saswp_attached_col.splice(saswp_attached_col.indexOf(a),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,p="";t>0&&(p+=t+" Reviews, "),i>0&&(p+=i+" Collection"),p||(p=0),s(".saswp-attached-rv-count").text("Attached "+p),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(a){var e=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+e+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),a.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:e,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){if("t"==a.status){var t="";a.result&&(s.each(a.result,function(s,a){var i="";"review"==e&&saswp_attached_rv.includes(parseInt(a.saswp_review_id))&&(i="checked"),"collection"==e&&saswp_attached_col.includes(parseInt(a.saswp_review_id))&&(i="checked"),t+='<div class="saswp-add-rv-loop" data-type="'+e+'" data-id="'+a.saswp_review_id+'">',"review"==e&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+a.saswp_reviewer_name+" ( Rating - "+a.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+a.saswp_review_platform_icon+'"/></span></strong>'),"collection"==e&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+a.saswp_reviewer_name+" </strong>"),t+="</div>"}),s(".saswp-add-rv-automatic-list[data-type="+e+"]").append(t)),a.message&&(s(".saswp-rv-not-found[data-type="+e+"]").removeClass("saswp_hide"),s(".saswp-load-more-rv[data-type="+e+"]").addClass("saswp_hide"))}else alert(a.message);s("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),s(".saswp-modify-schema-toggle").click(function(a){a.preventDefault(),s(".saswp-modify-container").slideToggle("300");var e=s("#saswp_enable_custom_field"),t=e.val();e.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(a){var e="";e=s("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',a.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>'+saswp_localize_data.translable_txt.place_id+'</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>'+saswp_localize_data.translable_txt.reviews+'</strong></td><td style="width:10%;">'+e+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">'+saswp_localize_data.translable_txt.fetch+'</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var a=s(this),e="free";a.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-blocks-field").val(),p=s("#saswp_google_place_api_key").val(),c=s("#reviews_addon_license_key").val(),o=s("#reviews_addon_license_key_status").val();if("premium"==(e=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert(saswp_localize_data.translable_txt.blocks_zero),a.removeClass("updating-message"),!1;if(0!=i%10)return a.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.step_in),a.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),a.removeClass("updating-message"),!1}""!=t&&(c||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:o,reviews_api:c,location:t,blocks:i,g_api:p,premium_status:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(a.parent().parent().find(".saswp-rv-fetched-msg").text(saswp_localize_data.translable_txt.success),a.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(a.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),a.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),a.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),""==c&&alert(saswp_localize_data.translable_txt.enter_rv_api_key),a.removeClass("updating-message"))}),saswp_localize_data.do_tour){var a,e="<h3>"+saswp_localize_data.translable_txt.using_schema+"</h3>";e+="<p>"+saswp_localize_data.translable_txt.do_you_want+" <b>"+saswp_localize_data.translable_txt.sd_update+"</b> "+saswp_localize_data.translable_txt.before_others+"</p>",e+='<style type="text/css">',e+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",e+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #saswp_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",e+="</style>",e+='<div id="saswp_mc_embed_signup">',e+='<form method="POST" accept-charset="utf-8" id="saswp-news-letter-form">',e+='<div id="saswp_mc_embed_signup_scroll">',e+='<div class="saswp-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',e+='<input type="text" name="saswp_subscriber_name" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',e+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="saswp_subscriber_email" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',e+='<input type="text" name="saswp_subscriber_website" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',e+='<input type="hidden" name="ml-submit" value="1" />',e+="</div>",e+='<div id="mce-responses">',e+="</div>",e+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',e+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',e+='<p id="saswp-news-letter-status"></p>',e+="</div>",e+="</form>",e+="</div>",s(document).on("submit","#saswp-news-letter-form",function(a){a.preventDefault();var e=s(this),t=e.find('input[name="saswp_subscriber_name"]').val(),i=e.find('input[name="saswp_subscriber_email"]').val();website=e.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(a){a?"Some fields are missing."==a?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid email address."==a?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Invalid list ID."==a?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):"Already subscribed."==a?(s("#saswp-news-letter-status").text(""),s("#saswp-news-letter-status").css("color","red")):(s("#saswp-news-letter-status").text("You're subscribed!"),s("#saswp-news-letter-status").css("color","green")):alert("Sorry, unable to subscribe. Please try again later!")})});var t={content:e,position:{edge:"top",align:"left"}};a=function(){s(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},(t=s.extend(t,{buttons:function(s,a){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){a.element.pointer("close")}),button_2.on("click",function(){setTimeout(function(){a.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,a){a.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?s(window).bind("load.wp-pointers",a):a()}if(s(".saswp-tabs a").click(function(a){var e=s(this).attr("href"),t=getParameterByName("tab",e);return t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",e),!1}),s(".saswp-schame-type-select").select2(),s(".saswp-schame-type-select").change(function(a){a.preventDefault(),s(".saswp-custom-fields-table").html("");var e=s(this).val();s(".saswp-option-table-class tr").each(function(a,e){a>0&&s(this).hide()}),"TechArticle"==e||"Article"==e||"Blogposting"==e||"NewsArticle"==e||"WebPage"==e?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==e||"Course"==e||"Organization"==e||"CreativeWorkSeries"==e||"MobileApplication"==e||"ImageObject"==e||"HowTo"==e||"MusicPlaylist"==e||"MusicAlbum"==e||"Recipe"==e||"TVSeries"==e||"SoftwareApplication"==e||"Event"==e||"VideoGame"==e||"Service"==e||"AudioObject"==e||"VideoObject"==e||"local_business"==e||"Product"==e||"Review"==e?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==e&&(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"==e&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==e&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==e&&(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"==e?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-itemlist-item-type-list").change()):s(".saswp-schema-modify-section").show(),saswp_enable_rating_review(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:e,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(a),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==e||"local_business"==e||"FAQ"==e?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 a=s(this).val(),e=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(a,e){a>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==e||"Article"==e||"Blogposting"==e||"NewsArticle"==e||"WebPage"==e?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==e||"Course"==e||"Organization"==e||"CreativeWorkSeries"==e||"MobileApplication"==e||"ImageObject"==e||"HowTo"==e||"MusicPlaylist"==e||"MusicAlbum"==e||"Recipe"==e||"TVSeries"==e||"SoftwareApplication"==e||"Event"==e||"VideoGame"==e||"Service"==e||"AudioObject"==e||"VideoObject"==e||"local_business"==e||"Product"==e||"Review"==e?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==e&&(s(".saswp-"+a+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+a+"-tr").find("select").attr("disabled",!1)),"Review"==e&&(s(".saswp-review-text-field-tr").show(),s(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"ItemList"==e?(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"==e&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review()}).change(),s(".saswp-checkbox").change(function(){var a=s(this).attr("id"),e=s(this);switch(a){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(e,a),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(e,a),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-wpzoom").val(1):s("#saswp-wpzoom").val(0);break;case"saswp-yotpo-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-yotpo").val(1):s("#saswp-yotpo").val(0);break;case"saswp-ultimate-blocks-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ultimate-blocks").val(1):s("#saswp-ultimate-blocks").val(0);break;case"saswp-starsrating-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-starsrating").val(1):s("#saswp-starsrating").val(0);break;case"saswp-wptastyrecipe-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wptastyrecipe").val(1):s("#saswp-wptastyrecipe").val(0);break;case"saswp-recipress-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-recipress").val(1):s("#saswp-recipress").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":s(this).is(":checked")?(s("#saswp_kb_contact_1").val(1),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(s("#saswp_kb_contact_1").val(0),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":s(this).is(":checked")?(s("#saswp-logo-dimensions").val(1),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(s("#saswp-logo-dimensions").val(0),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":s(this).is(":checked")?(s("#saswp_archive_schema").val(1),s(".saswp_archive_schema_type_class").parent().parent().show()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_schema").val(1):s("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-soledad-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").val(0);break;case"saswp-wp-theme-reviews-checkbox":saswp_compatibliy_notes(e,a),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(e,a),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(e,a),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(e,a),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-taqyeem-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-taqyeem").val(1):s("#saswp-taqyeem").val(0);break;case"saswp-video-thumbnails-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-wpresidence-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").val(0);break;case"saswp-myhome-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-myhome").val(1):s("#saswp-myhome").val(0);break;case"saswp-realestate-5-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-realestate-5").val(1):s("#saswp-realestate-5").val(0);break;case"saswp-stamped-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-stamped").val(1):s("#saswp-stamped").val(0);break;case"saswp-sabaidiscuss-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-sabaidiscuss").val(1):s("#saswp-sabaidiscuss").val(0);break;case"saswp-geodirectory-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-geodirectory").val(1):s("#saswp-geodirectory").val(0);break;case"saswp-classipress-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-classipress").val(1):s("#saswp-classipress").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-wplms-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wplms").val(1):s("#saswp-wplms").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(e,a),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(e,a),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-senseilms-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-senseilms").val(1):s("#saswp-senseilms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-modern-events-calendar").val(1):s("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?(s("#saswp-woocommerce-booking").val(1),s("#saswp-woocommerce-booking-main").val(1)):(s("#saswp-woocommerce-booking").val(0),s("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-rss-feed-image-checkbox":s(this).is(":checked")?s("#saswp-rss-feed-image").val(1):s("#saswp-rss-feed-image").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-schemaforfaqs-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-schemaforfaqs").val(1):s("#saswp-schemaforfaqs").val(0);break;case"saswp-wp-customer-reviews-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(e,a),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(e,a),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(e,a),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(e,a),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(e,a),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(e,a),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0)}}).change(),s("#saswp_kb_type").change(function(){var a=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"==a&&(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"==a&&(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(a){a.preventDefault();var e=s(this),t=e.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var a=i.state().get("selection").first().toJSON();s("#"+t).val(a.url),s("input[data-id='"+t+"_id']").val(a.id),s("input[data-id='"+t+"_height']").val(a.height),s("input[data-id='"+t+"_width']").val(a.width),s("input[data-id='"+t+"_thumbnail']").val(a.url),"sd_default_image_button"===e.attr("id")&&(s("#sd_default_image_width").val(a.width),s("#sd_default_image_height").val(a.height));var p="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&a.height<1200&&(p='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+a.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+p)}).open()}),s(document).on("click",".saswp_prev_close",function(a){a.preventDefault();var e=s(this).attr("data-id");s(this).parent().remove(),s("#"+e).val(""),s("input[data-id='"+e+"_id']").val(""),s("input[data-id='"+e+"_height']").val(""),s("input[data-id='"+e+"_width']").val(""),s("input[data-id='"+e+"_thumbnail']").val(""),"sd_default_image"===e&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(a){a.preventDefault();var e=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",schema_id:e,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){s(".saswp-post-specific-wrapper[data-id="+e+"] .saswp-post-specific-setting").after(a),s(".saswp_modify_this_schema_hidden_"+e).val(1),s(".saswp-ps-toggle[schema-id="+e+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+e+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+e+"]").parent().addClass("saswp_hide"),t.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_item_reviewed_call()})}),s(document).on("click",".saswp-restore-schema",function(a){a.preventDefault();var e=s(this).attr("schema-id"),t=s(this);t.addClass("updating-message"),s.post(ajaxurl,{action:"saswp_modify_schema_post_restore",schema_id:e,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){t.removeClass("updating-message"),"t"==a.status?(s(".saswp_modify_this_schema_hidden_"+e).val(0),s(".saswp-restore-schema[schema-id="+e+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+e+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+e+"]").remove()):alert("Something went wrong")},"json")}),s(document).on("change",".saswp-schema-type-toggle",function(a){var e=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id"),i=s(".saswp_modify_this_schema_hidden_"+e).val();if(s(this).is(":checked")){var p=0;s(".saswp-ps-toggle[schema-id="+e+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+e+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+e+"]").parent().addClass("saswp_hide"),s("#saswp_custom_schema_field[schema-id="+e+"]").parent().addClass("saswp_hide")}else{s("#saswp_custom_schema_field[schema-id="+e+"]").parent().removeClass("saswp_hide"),1==i?(s(".saswp-ps-toggle[schema-id="+e+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+e+"]").parent().removeClass("saswp_hide")):(s(".saswp-modify-schema[schema-id="+e+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+e+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+e+"]").parent().addClass("saswp_hide"));p=1}s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:p,schema_id:e,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(a){a.preventDefault(),1==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(a){a.preventDefault();var e=s(this);e.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),p=s("#"+i+"_addon_license_key").val();t&&i&&p?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:p,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){s("#"+i+"_addon_license_key_status").val(a.status),"active"==a.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(a.message)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(a.message)),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(alert("Please enter value license key"),e.removeClass("updating-message"))}),s(".saswp-send-query").on("click",function(a){a.preventDefault();var e=s("#saswp_query_message").val(),t=s("#saswp_query_email").val(),i=s("#saswp_query_premium_cus").val();console.log(saswpIsEmail(t)),""!=s.trim(e)&&i&&""!=s.trim(t)&&1==saswpIsEmail(t)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",premium_cus:i,message:e,email:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){"t"==a.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(e)&&""==i&&""==s.trim(t)?alert("Please enter the message, email and select customer type"):(""==i&&alert("Select Customer type"),""==s.trim(e)&&alert("Please enter the message"),""==s.trim(t)&&alert("Please enter the email"),0==saswpIsEmail(t)&&alert("Please enter a valid email"))}),s(".saswp-import-plugins").on("click",function(a){a.preventDefault();var e=s(this);e.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(a){"t"==a.status?(s(e).parent().find(".saswp-imported-message").text(a.message),s(e).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(s(e).parent().find(".saswp-imported-message").addClass("saswp-error"),s(e).parent().find(".saswp-imported-message").text(a.message)),e.removeClass("updating-message")},"json")}),s(".saswp-feedback-no-thanks").on("click",function(a){a.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){"t"==a.status&&s(".saswp-feedback-notice").hide()},"json")}),s(".saswp-feedback-remindme").on("click",function(a){a.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){"t"==a.status&&s(".saswp-feedback-notice").hide()},"json")}),s(document).on("change",".saswp-local-business-type-select",function(a){a.preventDefault();var e=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(a){if("t"==a.status){s(".saswp-local-business-name-select").parents("tr").remove();var t=e.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',s.each(a.result,function(s,a){i+='<option value="'+s+'">'+a+"</option>"}),i+="</select></td>",i+="</tr>",e.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(a){a.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(a){a.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(a){a.preventDefault();s(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),s(document).on("click",".saswp-remove-review-item",function(a){a.preventDefault(),s(this).parent().parent("tr").remove()}),s(document).on("focusout",".saswp-review-item-tr input[type=number]",function(a){a.preventDefault();var e=0,t=s(".saswp-review-item-tr input[type=number]").length;s(".saswp-review-item-tr input[type=number]").each(function(a,t){""==s(t).val()?e+=parseFloat(0):e+=parseFloat(s(t).val())});var i=e/t;s("#saswp-review-item-over-all").val(i)}),s("#saswp-review-location").change(function(){var a=s(this).val();s(".saswp-review-shortcode").addClass("saswp_hide"),3==a&&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(a){a.preventDefault();var e=s(this);if(e.addClass("updating-message"),s(".saswp-post-specific-schema-ids").val())var t=JSON.parse(s(".saswp-post-specific-schema-ids").val());s.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?setTimeout(function(){location.reload()},1e3):(alert(s.msg),setTimeout(function(){location.reload()},1e3)),e.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(a){a.preventDefault();var e=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+e).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?s(".saswp-global-container:eq(2)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var a=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("#"+a).show())}),s("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s(".saswp-tools-container:first").show(),s("#saswp-tools-tabs a").click(function(){var a=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-tools-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s("#"+a).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 a=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("#"+a).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 a=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("#"+a).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 a="text",e=s(this).parent().parent("tr"),t=s(this).val();-1==t.indexOf("_image")&&-1==t.indexOf("_logo")||(a="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,a,null,i,t,e)}),s(document).on("click",".saswp-skip-button",function(a){a.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(a){a.preventDefault();var e=s(this);e.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),p=s(this).attr("div_type"),c=s(this).attr("itemlist_sub_type"),o=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div:nth-child("+o+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(e,n,i,p,t,i+"_",c)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-rmv-modify_row",function(a){a.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var a=s(this),e=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),p="",c=e.toLowerCase()+"_"+i,o="saswp_fixed_image["+i+"]";"manual_text"==t?(p+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(p+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),a.parent().parent("tr").find("td:gt(1)").remove(),a.parent().parent("tr").append(p),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,p+=saswp_taxonomy_term_html(s,i),a.parent().parent("tr").find("td:gt(1)").remove(),a.parent().parent("tr").append(p),saswpCustomSelect2())},"json"):"custom_field"==t?(p+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',p+="</select></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"fixed_image"==t?(p+="<td>",p+="<fieldset>",p+='<input data-id="media" style="width: 30%;" class="button" id="'+c+'_button" name="'+c+'_button" type="button" value="Upload" />',p+='<input type="hidden" data-id="'+c+'_height" class="upload-height" name="'+o+'[height]" id="'+c+'_height" value="">',p+='<input type="hidden" data-id="'+c+'_width" class="upload-width" name="'+o+'[width]" id="'+c+'_width" value="">',p+='<input type="hidden" data-id="'+c+'_thumbnail" class="upload-thumbnail" name="'+o+'[thumbnail]" id="'+c+'_thumbnail" value="">',p+='<div class="saswp_image_div_'+c+'">',p+="</div>",p+="</fieldset>",p+="</td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):(p+="<td></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var a=s(this),e=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(e,a,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var a=s(this);a.addClass("updating-message");var e=s("select#schema_type option:selected").val(),t="",i=null;"Review"==e&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var p=s("#post_ID").val();""!=e&&(saswp_meta_list_fields[e]?saswp_get_meta_list(a,"text",saswp_meta_list_fields[e],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:p,schema_type:e,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[e]=s,saswp_get_meta_list(a,"text",saswp_meta_list_fields[e],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var a=s("#saswp_google_place_id").val(),e=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=a&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:a,language:e,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('<tr><td><input type="text" placeholder="https://www.facebook.com/profile" name="sd_data[saswp_social_links][]" value=""></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td></tr>')}),s(document).on("click",".saswp-show-accept-rv-popup",function(){tb_show("Reviews Form","#TB_inline??width=600&height=400&inlineId=saswp-accept-reviews-popup"),s(document).find("#TB_window").width(600).height(400).css({top:"100px","margin-top":"0px"})}),("saswp_reviews"==saswp_localize_data.post_type||"saswp-collections"==saswp_localize_data.post_type)&&"edit.php"==saswp_localize_data.page_now){var i='<div class="saswp-custom-post-tab">';i+='<div style="display:none;" id="saswp-accept-reviews-popup">',i+='<div class="saswp-accept-rv-container">',i+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",i+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',i+='<div class="saswp-show-form-on-tab"><strong>Show form on button tap</strong> <input value="[saswp-reviews-form onbutton=&quot;1&quot;]" type="text" readonly></div>',i+="</div>",i+="</div>",i+='<h2 class="nav-tab-wrapper">',i+="<a href="+saswp_localize_data.reviews_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.reviews_page_url?"saswp-global-selected":"")+'">Reviews</a>',i+="<a href="+saswp_localize_data.collections_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.collections_page_url?"saswp-global-selected":"")+'">Collections</a>',i+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',i+="</h2>",i+="</div>",jQuery(jQuery(".wrap")).prepend(i)}"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&(console.log(saswp_reviews_data.rating_val),s(".saswp-rating-div").rateYo({spacing:"5px",rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(a,e){s(this).next().next().val(a)}}).on("rateyo.change",function(a,e){var t=e.rating;s(this).next().text(t)})),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var a=s(this);a.parent().find(".saswp-phone-validation").remove();var e=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(e)?a.parent().find(".saswp-phone-validation").remove():a.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')}),saswpCollectionSlider(),s(document).on("click",".saswp-grid-page",function(a){a.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(a){a.preventDefault();var e=s(this).attr("platform-id");saswp_collection.splice(e,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 a=s(".saswp-collection-desing").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),"grid"==a&&s(".saswp-grid-options").removeClass("saswp_hide"),"gallery"==a&&s(".saswp-slider-options").removeClass("saswp_hide"),"fomo"==a&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px")),"popup"==a&&s(".saswp-collection-lp").css("height","31px"),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(a){a.preventDefault();var e=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();t&&i>0?(e.addClass("updating-message"),saswp_get_collection_data(i,t,e)):alert("Enter Count")});var p,c,o=s("#saswp_collection_id").val();o&&(s(".spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_collection_platforms",collection_id:o,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){if(a.status){var e=a.message;s.each(e,function(s,a){saswp_get_collection_data(a,s,null)})}s(".spinner").removeClass("is-active")},"json")),(p=document.createElement("div")).style.cssText="position:absolute; background:black; color:white; padding:4px 6px;z-index:10000;border-radius:2px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);opacity:0;transition:opacity 0.3s",p.innerHTML="Copied!",document.body.appendChild(p);var n=document.getElementById("motivatebox");n&&n.addEventListener("mouseup",function(s){var a=(s=s||event).target||s.srcElement;"motivate"==a.className&&(!function(s){var a=document.createRange();a.selectNodeContents(s);var e=window.getSelection();e.removeAllRanges(),e.addRange(a)}(a),function(){var s;try{s=document.execCommand("copy")}catch(a){s=!1}return s}()&&function(s){var a=s||event;clearTimeout(c),p.style.left=a.pageX-10+"px",p.style.top=a.pageY+15+"px",p.style.opacity=1,c=setTimeout(function(){p.style.opacity=0},500)}(s))},!1)});
admin_section/settings.php CHANGED
@@ -429,6 +429,38 @@ function saswp_premium_features_callback(){ ?>
429
 
430
  </div>
431
  </li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
432
  <li>
433
 
434
  <?php
@@ -708,7 +740,7 @@ function saswp_general_page_callback(){
708
 
709
  $meta_fields_default = array(
710
  array(
711
- 'label' => 'Website Schema (Global)',
712
  'id' => 'saswp_website_schema_checkbox',
713
  'name' => 'saswp_website_schema_checkbox',
714
  'type' => 'checkbox',
@@ -1502,6 +1534,11 @@ function saswp_import_callback(){
1502
 
1503
  $add_on[] = 'Cs';
1504
 
 
 
 
 
 
1505
  }
1506
  if(is_plugin_active('event-schema-for-saswp/event-schema-for-saswp.php')){
1507
 
@@ -1640,6 +1677,14 @@ function saswp_get_license_section_html($on, $license_key, $license_status, $lic
1640
  $response.= '</div>';
1641
 
1642
  }
 
 
 
 
 
 
 
 
1643
 
1644
  if($label == true && $on == 'Rs'){
1645
 
@@ -2030,7 +2075,31 @@ function saswp_compatibility_page_callback(){
2030
  'id' => 'saswp-taqyeem',
2031
  'name' => 'sd_data[saswp-taqyeem]',
2032
  )
2033
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2034
  $smart_crawl = array(
2035
  'label' => 'SmartCrawl Seo',
2036
  'id' => 'saswp-smart-crawl-checkbox',
@@ -2129,7 +2198,20 @@ function saswp_compatibility_page_callback(){
2129
  'id' => 'saswp-realestate-5',
2130
  'name' => 'sd_data[saswp-realestate-5]',
2131
  )
2132
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
2133
 
2134
  $learn_press = array(
2135
  'label' => 'LearnPress',
@@ -2180,7 +2262,21 @@ function saswp_compatibility_page_callback(){
2180
  'id' => 'saswp-lifter-lms',
2181
  'name' => 'sd_data[saswp-lifter-lms]',
2182
  )
2183
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2184
  $wp_event_manager = array(
2185
  'label' => 'WP Event Manager',
2186
  'id' => 'saswp-wp-event-manager-checkbox',
@@ -2308,6 +2404,30 @@ function saswp_compatibility_page_callback(){
2308
  'name' => 'sd_data[saswp-wpzoom]',
2309
  )
2310
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2311
  $yotpo = array(
2312
  'label' => 'Yotpo',
2313
  'id' => 'saswp-yotpo-checkbox',
@@ -2571,6 +2691,18 @@ function saswp_compatibility_page_callback(){
2571
  'name' => 'sd_data[saswp-wp-theme-reviews]',
2572
  )
2573
  );
 
 
 
 
 
 
 
 
 
 
 
 
2574
  $dwquestiton = array(
2575
  'label' => 'DW Question Answer',
2576
  'id' => 'saswp-dw-question-answer-checkbox',
@@ -2716,9 +2848,8 @@ function saswp_compatibility_page_callback(){
2716
  $wpresidence['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
2717
  $myhome['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
2718
  $realestate_5['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
2719
- $classipress['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
2720
-
2721
-
2722
  }
2723
 
2724
  if(!is_plugin_active('course-schema-for-saswp/course-schema-for-saswp.php')){
@@ -2726,9 +2857,14 @@ function saswp_compatibility_page_callback(){
2726
  $learn_press['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/course-schema/">Course Schema Addon</a>';
2727
  $learn_dash['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/course-schema/">Course Schema Addon</a>';
2728
  $lifter_lms['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/course-schema/">Course Schema Addon</a>';
2729
- $wplms['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/course-schema/">Course Schema Addon</a>';
 
2730
 
2731
  }
 
 
 
 
2732
 
2733
  if(!is_plugin_active('event-schema-for-saswp/event-schema-for-saswp.php')){
2734
 
@@ -2779,8 +2915,11 @@ function saswp_compatibility_page_callback(){
2779
  $soledad,
2780
  $reviews_wp_theme,
2781
  $taqyeem,
 
 
2782
  $extratheme,
2783
- $dwquestiton,
 
2784
  $yoast,
2785
  $smart_crawl,
2786
  $seo_press,
@@ -2790,6 +2929,8 @@ function saswp_compatibility_page_callback(){
2790
  $recipe_maker,
2791
  $recipress,
2792
  $wpzoom,
 
 
2793
  $yotpo,
2794
  $starsrating,
2795
  $ultimate_blocks,
@@ -2807,9 +2948,11 @@ function saswp_compatibility_page_callback(){
2807
  $myhome,
2808
  $classipress,
2809
  $realestate_5,
 
2810
  $learn_press,
2811
  $learn_dash,
2812
  $lifter_lms,
 
2813
  $wplms,
2814
  $the_events_calendar,
2815
  $wp_event_manager,
429
 
430
  </div>
431
  </li>
432
+
433
+ <li>
434
+
435
+ <?php
436
+
437
+ $cooked_active_text = '';
438
+
439
+ if(is_plugin_active('qanda-schema-for-saswp/qanda-schema-for-saswp.php')){
440
+ $cooked_active_text = '<label class="saswp-sts-txt">Status :<span style="color:green;">Active</span></label>';
441
+ }else{
442
+ $cooked_active_text .='<label class="saswp-sts-txt">Status :<span>Inactive</span></label>';
443
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">Download</span></a>';
444
+ }
445
+
446
+ ?>
447
+
448
+ <div class="saswp-features-ele">
449
+ <div class="saswp-ele-ic" style="background: #509207;">
450
+ <img src="<?php echo SASWP_PLUGIN_URL; ?>/admin_section/images/question.png">
451
+ </div>
452
+ <div class="saswp-ele-tlt">
453
+ <h3><?php echo esc_html__('Q&A Schema Compatibility','schema-and-structured-data-for-wp') ?></h3>
454
+ <p><?php echo esc_html__('Q&A Schema Compatibility extension is the number one solution to enhance your discussion forum website with the right structured data.','schema-and-structured-data-for-wp') ?></p>
455
+ </div>
456
+ </div>
457
+ <div class="saswp-sts-btn">
458
+
459
+ <?php echo $cooked_active_text; ?>
460
+
461
+ </div>
462
+ </li>
463
+
464
  <li>
465
 
466
  <?php
740
 
741
  $meta_fields_default = array(
742
  array(
743
+ 'label' => 'Website Schema (HomePage)',
744
  'id' => 'saswp_website_schema_checkbox',
745
  'name' => 'saswp_website_schema_checkbox',
746
  'type' => 'checkbox',
1534
 
1535
  $add_on[] = 'Cs';
1536
 
1537
+ }
1538
+ if(is_plugin_active('qanda-schema-for-saswp/qanda-schema-for-saswp.php')){
1539
+
1540
+ $add_on[] = 'qanda';
1541
+
1542
  }
1543
  if(is_plugin_active('event-schema-for-saswp/event-schema-for-saswp.php')){
1544
 
1677
  $response.= '</div>';
1678
 
1679
  }
1680
+
1681
+ if($label == true && $on == 'qanda'){
1682
+
1683
+ $response.= '<div class="" style="display:inline-block">';
1684
+ $response.= '<strong>'.esc_html__('Q&A Schema','schema-and-structured-data-for-wp').'</strong>';
1685
+ $response.= '</div>';
1686
+
1687
+ }
1688
 
1689
  if($label == true && $on == 'Rs'){
1690
 
2075
  'id' => 'saswp-taqyeem',
2076
  'name' => 'sd_data[saswp-taqyeem]',
2077
  )
2078
+ );
2079
+ $wp_product_review = array(
2080
+ 'label' => 'WP Product Review',
2081
+ 'id' => 'saswp-wp-product-review-checkbox',
2082
+ 'name' => 'saswp-wp-product-review-checkbox',
2083
+ 'type' => 'checkbox',
2084
+ 'class' => 'checkbox saswp-checkbox',
2085
+ 'note' => saswp_get_field_note('wp_product_review'),
2086
+ 'hidden' => array(
2087
+ 'id' => 'saswp-wp-product-review',
2088
+ 'name' => 'sd_data[saswp-wp-product-review]',
2089
+ )
2090
+ );
2091
+ $stamped = array(
2092
+ 'label' => 'Stamped.io Product Reviews',
2093
+ 'id' => 'saswp-stamped-checkbox',
2094
+ 'name' => 'saswp-stamped-checkbox',
2095
+ 'type' => 'checkbox',
2096
+ 'class' => 'checkbox saswp-checkbox',
2097
+ 'note' => saswp_get_field_note('stamped'),
2098
+ 'hidden' => array(
2099
+ 'id' => 'saswp-stamped',
2100
+ 'name' => 'sd_data[saswp-stamped]',
2101
+ )
2102
+ );
2103
  $smart_crawl = array(
2104
  'label' => 'SmartCrawl Seo',
2105
  'id' => 'saswp-smart-crawl-checkbox',
2198
  'id' => 'saswp-realestate-5',
2199
  'name' => 'sd_data[saswp-realestate-5]',
2200
  )
2201
+ );
2202
+
2203
+ $geo_directory = array(
2204
+ 'label' => 'GeoDirectory – Business Directory Plugin',
2205
+ 'id' => 'saswp-geodirectory-checkbox',
2206
+ 'name' => 'saswp-geodirectory-checkbox',
2207
+ 'type' => 'checkbox',
2208
+ 'class' => 'checkbox saswp-checkbox',
2209
+ 'note' => saswp_get_field_note('geodirectory'),
2210
+ 'hidden' => array(
2211
+ 'id' => 'saswp-geodirectory',
2212
+ 'name' => 'sd_data[saswp-geodirectory]',
2213
+ )
2214
+ );
2215
 
2216
  $learn_press = array(
2217
  'label' => 'LearnPress',
2262
  'id' => 'saswp-lifter-lms',
2263
  'name' => 'sd_data[saswp-lifter-lms]',
2264
  )
2265
+ );
2266
+
2267
+ $senseilms = array(
2268
+ 'label' => 'Sensei LMS',
2269
+ 'id' => 'saswp-senseilms-checkbox',
2270
+ 'name' => 'saswp-senseilms-checkbox',
2271
+ 'type' => 'checkbox',
2272
+ 'class' => 'checkbox saswp-checkbox',
2273
+ 'note' => saswp_get_field_note('senseilms'),
2274
+ 'hidden' => array(
2275
+ 'id' => 'saswp-senseilms',
2276
+ 'name' => 'sd_data[saswp-senseilms]',
2277
+ )
2278
+ );
2279
+
2280
  $wp_event_manager = array(
2281
  'label' => 'WP Event Manager',
2282
  'id' => 'saswp-wp-event-manager-checkbox',
2404
  'name' => 'sd_data[saswp-wpzoom]',
2405
  )
2406
  );
2407
+ $video_thumbnails = array(
2408
+ 'label' => 'Video Thumbnails',
2409
+ 'id' => 'saswp-video-thumbnails-checkbox',
2410
+ 'name' => 'saswp-video-thumbnails-checkbox',
2411
+ 'type' => 'checkbox',
2412
+ 'class' => 'checkbox saswp-checkbox',
2413
+ 'note' => saswp_get_field_note('video_thumbnails'),
2414
+ 'hidden' => array(
2415
+ 'id' => 'saswp-video-thumbnails',
2416
+ 'name' => 'sd_data[saswp-video-thumbnails]',
2417
+ )
2418
+ );
2419
+ $featured_video_plus = array(
2420
+ 'label' => 'Featured Video Plus',
2421
+ 'id' => 'saswp-featured-video-plus-checkbox',
2422
+ 'name' => 'saswp-featured-video-plus-checkbox',
2423
+ 'type' => 'checkbox',
2424
+ 'class' => 'checkbox saswp-checkbox',
2425
+ 'note' => saswp_get_field_note('featured_video_plus'),
2426
+ 'hidden' => array(
2427
+ 'id' => 'saswp-featured-video-plus',
2428
+ 'name' => 'sd_data[saswp-featured-video-plus]',
2429
+ )
2430
+ );
2431
  $yotpo = array(
2432
  'label' => 'Yotpo',
2433
  'id' => 'saswp-yotpo-checkbox',
2691
  'name' => 'sd_data[saswp-wp-theme-reviews]',
2692
  )
2693
  );
2694
+ $sabaidiscuss = array(
2695
+ 'label' => 'SabaiDiscuss',
2696
+ 'id' => 'saswp-sabaidiscuss-checkbox',
2697
+ 'name' => 'saswp-sabaidiscuss-checkbox',
2698
+ 'type' => 'checkbox',
2699
+ 'class' => 'checkbox saswp-checkbox',
2700
+ 'note' => saswp_get_field_note('sabaidiscuss'),
2701
+ 'hidden' => array(
2702
+ 'id' => 'saswp-sabaidiscuss',
2703
+ 'name' => 'sd_data[saswp-sabaidiscuss]',
2704
+ )
2705
+ );
2706
  $dwquestiton = array(
2707
  'label' => 'DW Question Answer',
2708
  'id' => 'saswp-dw-question-answer-checkbox',
2848
  $wpresidence['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
2849
  $myhome['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
2850
  $realestate_5['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
2851
+ $geo_directory['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/extensions/">Real Estate Schema Addon</a>';
2852
+
 
2853
  }
2854
 
2855
  if(!is_plugin_active('course-schema-for-saswp/course-schema-for-saswp.php')){
2857
  $learn_press['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/course-schema/">Course Schema Addon</a>';
2858
  $learn_dash['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/course-schema/">Course Schema Addon</a>';
2859
  $lifter_lms['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/course-schema/">Course Schema Addon</a>';
2860
+ $wplms['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/course-schema/">Course Schema Addon</a>';
2861
+ $senseilms['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/course-schema/">Course Schema Addon</a>';
2862
 
2863
  }
2864
+ if(!is_plugin_active('qanda-schema-for-saswp/qanda-schema-for-saswp.php')){
2865
+
2866
+ $sabaidiscuss['note'] = esc_html__('This feature requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://structured-data-for-wp.com/qanda-schema/">Q&A Schema Compatibility Addon</a>';
2867
+ }
2868
 
2869
  if(!is_plugin_active('event-schema-for-saswp/event-schema-for-saswp.php')){
2870
 
2915
  $soledad,
2916
  $reviews_wp_theme,
2917
  $taqyeem,
2918
+ $wp_product_review,
2919
+ $stamped,
2920
  $extratheme,
2921
+ $dwquestiton,
2922
+ $sabaidiscuss,
2923
  $yoast,
2924
  $smart_crawl,
2925
  $seo_press,
2929
  $recipe_maker,
2930
  $recipress,
2931
  $wpzoom,
2932
+ $video_thumbnails,
2933
+ $featured_video_plus,
2934
  $yotpo,
2935
  $starsrating,
2936
  $ultimate_blocks,
2948
  $myhome,
2949
  $classipress,
2950
  $realestate_5,
2951
+ $geo_directory,
2952
  $learn_press,
2953
  $learn_dash,
2954
  $lifter_lms,
2955
+ $senseilms,
2956
  $wplms,
2957
  $the_events_calendar,
2958
  $wp_event_manager,
admin_section/structure_admin.php CHANGED
@@ -1646,7 +1646,8 @@ function saswp_license_status($add_on, $license_status, $license_key){
1646
  'res' => 'Real Estate Schema',
1647
  'cs' => 'Course Schema',
1648
  'es' => 'Event Schema',
1649
- 'rs' => 'Recipe Schema'
 
1650
  );
1651
 
1652
  $edd_action = '';
@@ -1658,14 +1659,14 @@ function saswp_license_status($add_on, $license_status, $license_key){
1658
  $edd_action = 'deactivate_license';
1659
  }
1660
  // data to send in our API request
1661
- $api_params = array(
1662
- 'edd_action' => $edd_action,
1663
- 'license' => $license_key,
1664
- 'item_name' => $item_name[strtolower($add_on)],
1665
- 'author' => 'Magazine3',
1666
- 'url' => home_url(),
1667
- 'beta' => false,
1668
- );
1669
 
1670
  $message = '';
1671
  $current_status = '';
1646
  'res' => 'Real Estate Schema',
1647
  'cs' => 'Course Schema',
1648
  'es' => 'Event Schema',
1649
+ 'rs' => 'Recipe Schema',
1650
+ 'qanda' => 'Q&A Schema Compatibility'
1651
  );
1652
 
1653
  $edd_action = '';
1659
  $edd_action = 'deactivate_license';
1660
  }
1661
  // data to send in our API request
1662
+ $api_params = array(
1663
+ 'edd_action' => $edd_action,
1664
+ 'license' => $license_key,
1665
+ 'item_name' => $item_name[strtolower($add_on)],
1666
+ 'author' => 'Magazine3',
1667
+ 'url' => home_url(),
1668
+ 'beta' => false,
1669
+ );
1670
 
1671
  $message = '';
1672
  $current_status = '';
core/array-list/compatibility-list.php CHANGED
@@ -171,6 +171,12 @@ return array(
171
  'opt_name' => 'saswp-lifter-lms',
172
  'part_in' => 'pro',
173
  ),
 
 
 
 
 
 
174
  'wp_post_ratings' => array(
175
  'name' => 'WP-PostRatings',
176
  'free' => 'wp-postratings/wp-postratings.php',
@@ -246,6 +252,12 @@ return array(
246
  'opt_name' => 'saswp-event-calendar-wd',
247
  'part_in' => 'pro',
248
  ),
 
 
 
 
 
 
249
  'dw_qna' => array(
250
  'name' => 'DW Question Answer',
251
  'free' => 'dw-question-answer/dw-question-answer.php',
@@ -371,7 +383,37 @@ return array(
371
  'free' => 'taqyeem/taqyeem.php',
372
  'opt_name' => 'saswp-taqyeem',
373
  'part_in' => 'free',
374
- ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  ),
376
  'themes' => array(
377
  'soledad' => array(
@@ -408,14 +450,14 @@ return array(
408
  'name' => 'ClassiPress',
409
  'free' => 'classipress',
410
  'opt_name' => 'saswp-classipress',
411
- 'part_in' => 'pro',
412
  ),
413
  'realestate_5' => array(
414
  'name' => 'WP Pro Realestate 5',
415
  'free' => 'realestate-5',
416
  'opt_name' => 'saswp-realestate-5',
417
  'part_in' => 'pro',
418
- ),
419
  'saswp_realhomes' => array(
420
  'name' => 'RealHomes Theme',
421
  'free' => 'realhomes',
171
  'opt_name' => 'saswp-lifter-lms',
172
  'part_in' => 'pro',
173
  ),
174
+ 'senseilms' => array(
175
+ 'name' => 'Sensei LMS',
176
+ 'free' => 'sensei-lms/sensei-lms.php',
177
+ 'opt_name' => 'saswp-senseilms',
178
+ 'part_in' => 'pro',
179
+ ),
180
  'wp_post_ratings' => array(
181
  'name' => 'WP-PostRatings',
182
  'free' => 'wp-postratings/wp-postratings.php',
252
  'opt_name' => 'saswp-event-calendar-wd',
253
  'part_in' => 'pro',
254
  ),
255
+ 'sabaidiscuss' => array(
256
+ 'name' => 'SabaiDiscuss',
257
+ 'free' => 'sabai-discuss/sabai-discuss.php',
258
+ 'opt_name' => 'saswp-sabaidiscuss',
259
+ 'part_in' => 'pro',
260
+ ),
261
  'dw_qna' => array(
262
  'name' => 'DW Question Answer',
263
  'free' => 'dw-question-answer/dw-question-answer.php',
383
  'free' => 'taqyeem/taqyeem.php',
384
  'opt_name' => 'saswp-taqyeem',
385
  'part_in' => 'free',
386
+ ),
387
+ 'wp_product_review' => array(
388
+ 'name' => 'WP Product Review',
389
+ 'free' => 'wp-product-review/wp-product-review.php',
390
+ 'opt_name' => 'saswp-wp-product-review',
391
+ 'part_in' => 'free',
392
+ ),
393
+ 'video_thumbnails' => array(
394
+ 'name' => 'Video Thumbnails',
395
+ 'free' => 'video-thumbnails/video-thumbnails.php',
396
+ 'opt_name' => 'saswp-video-thumbnails',
397
+ 'part_in' => 'free',
398
+ ),
399
+ 'featured_video_plus' => array(
400
+ 'name' => 'Featured Video Plus',
401
+ 'free' => 'featured-video-plus/featured-video-plus.php',
402
+ 'opt_name' => 'saswp-featured-video-plus',
403
+ 'part_in' => 'free',
404
+ ),
405
+ 'geodirectory' => array(
406
+ 'name' => 'GeoDirectory – Business Directory Plugin',
407
+ 'free' => 'geodirectory/geodirectory.php',
408
+ 'opt_name' => 'saswp-geodirectory',
409
+ 'part_in' => 'pro',
410
+ ),
411
+ 'stamped' => array(
412
+ 'name' => 'Stamped.io Product Reviews & UGC for WooCommerce',
413
+ 'free' => 'stampedio-product-reviews/woocommerce-stamped-io.php',
414
+ 'opt_name' => 'saswp-stamped',
415
+ 'part_in' => 'free',
416
+ ),
417
  ),
418
  'themes' => array(
419
  'soledad' => array(
450
  'name' => 'ClassiPress',
451
  'free' => 'classipress',
452
  'opt_name' => 'saswp-classipress',
453
+ 'part_in' => 'free',
454
  ),
455
  'realestate_5' => array(
456
  'name' => 'WP Pro Realestate 5',
457
  'free' => 'realestate-5',
458
  'opt_name' => 'saswp-realestate-5',
459
  'part_in' => 'pro',
460
+ ),
461
  'saswp_realhomes' => array(
462
  'name' => 'RealHomes Theme',
463
  'free' => 'realhomes',
core/array-list/pro_extensions.php CHANGED
@@ -38,6 +38,11 @@ return array(
38
  'name' => 'Event Schema',
39
  'path' => 'event-schema-for-saswp/event-schema-for-saswp.php',
40
  ),
 
 
 
 
 
41
  array(
42
  'key' => 'recipe_schema',
43
  'name' => 'Recipe Schema',
38
  'name' => 'Event Schema',
39
  'path' => 'event-schema-for-saswp/event-schema-for-saswp.php',
40
  ),
41
+ array(
42
+ 'key' => 'qanda_schema',
43
+ 'name' => 'Q&A Schema Compatibility',
44
+ 'path' => 'qanda-schema-for-saswp/qanda-schema-for-saswp.php',
45
+ ),
46
  array(
47
  'key' => 'recipe_schema',
48
  'name' => 'Recipe Schema',
core/array-list/schema-properties.php CHANGED
@@ -2855,7 +2855,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
2855
 
2856
  case 'VideoObject':
2857
 
2858
- $video_links = saswp_get_video_links();
2859
 
2860
  $meta_field = array(
2861
  array(
@@ -2926,7 +2926,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
2926
  'label' => 'Embed Url',
2927
  'id' => 'saswp_video_object_embed_url_'.$schema_id,
2928
  'type' => 'text',
2929
- 'default' => isset($video_links[0]) ? $video_links[0] : get_permalink()
2930
  ),
2931
  array(
2932
  'label' => 'Main Entity Id',
2855
 
2856
  case 'VideoObject':
2857
 
2858
+ $video_links = saswp_get_video_metadata();
2859
 
2860
  $meta_field = array(
2861
  array(
2926
  'label' => 'Embed Url',
2927
  'id' => 'saswp_video_object_embed_url_'.$schema_id,
2928
  'type' => 'text',
2929
+ 'default' => isset($video_links[0]['video_url']) ? $video_links[0]['video_url'] : get_permalink()
2930
  ),
2931
  array(
2932
  'label' => 'Main Entity Id',
output/compatibility.php CHANGED
@@ -198,11 +198,23 @@ class saswp_output_compatibility{
198
  remove_filter('tie_taqyeem_after_review_box', 'taqyeem_review_rich_snippet');
199
  }
200
 
 
 
 
 
 
 
 
 
201
  public function saswp_kk_star_ratings_override(){
202
 
203
  remove_action('wp_head', 'Bhittani\StarRating\structured_data');
204
 
205
  }
 
 
 
 
206
 
207
  public function saswp_wp_event_manager_override(){
208
 
@@ -341,6 +353,9 @@ class saswp_output_compatibility{
341
  public function lifter_lms_on_activation(){
342
  $this->saswp_update_option_on_compatibility_activation('saswp-lifter-lms');
343
  }
 
 
 
344
  public function wp_post_ratings_on_activation(){
345
  $this->saswp_update_option_on_compatibility_activation('saswp-wppostratings-raring');
346
  }
@@ -380,6 +395,9 @@ class saswp_output_compatibility{
380
  public function event_calendar_wd_on_activation(){
381
  $this->saswp_update_option_on_compatibility_activation('saswp-event-calendar-wd');
382
  }
 
 
 
383
  public function dw_qna_on_activation(){
384
  $this->saswp_update_option_on_compatibility_activation('saswp-dw-question-answer');
385
  }
@@ -404,6 +422,12 @@ class saswp_output_compatibility{
404
  public function taqyeem_on_activation(){
405
  $this->saswp_update_option_on_compatibility_activation('saswp-taqyeem');
406
  }
 
 
 
 
 
 
407
  public function squirrly_seo_on_activation(){
408
  $this->saswp_update_option_on_compatibility_activation('saswp-squirrly-seo');
409
  }
@@ -416,6 +440,15 @@ class saswp_output_compatibility{
416
  public function ultimate_blocks_on_activation(){
417
  $this->saswp_update_option_on_compatibility_activation('saswp-ultimate-blocks');
418
  }
 
 
 
 
 
 
 
 
 
419
  public function wpzoom_on_activation(){
420
  $this->saswp_update_option_on_compatibility_activation('saswp-wpzoom');
421
  }
198
  remove_filter('tie_taqyeem_after_review_box', 'taqyeem_review_rich_snippet');
199
  }
200
 
201
+ public function saswp_wp_product_review_override(){
202
+
203
+ $wppr_rich = get_option('cwppos_options');
204
+ $wppr_rich['wppr_rich_snippet'] = 'no';
205
+ update_option('cwppos_options', $wppr_rich);
206
+
207
+ }
208
+
209
  public function saswp_kk_star_ratings_override(){
210
 
211
  remove_action('wp_head', 'Bhittani\StarRating\structured_data');
212
 
213
  }
214
+
215
+ public function saswp_geodirectory_override(){
216
+ remove_action( 'wp_head', array( 'GeoDir_Post_Data', 'schema' ), 10 );
217
+ }
218
 
219
  public function saswp_wp_event_manager_override(){
220
 
353
  public function lifter_lms_on_activation(){
354
  $this->saswp_update_option_on_compatibility_activation('saswp-lifter-lms');
355
  }
356
+ public function senseilms_on_activation(){
357
+ $this->saswp_update_option_on_compatibility_activation('saswp-senseilms');
358
+ }
359
  public function wp_post_ratings_on_activation(){
360
  $this->saswp_update_option_on_compatibility_activation('saswp-wppostratings-raring');
361
  }
395
  public function event_calendar_wd_on_activation(){
396
  $this->saswp_update_option_on_compatibility_activation('saswp-event-calendar-wd');
397
  }
398
+ public function sabaidiscuss_on_activation(){
399
+ $this->saswp_update_option_on_compatibility_activation('saswp-sabaidiscuss');
400
+ }
401
  public function dw_qna_on_activation(){
402
  $this->saswp_update_option_on_compatibility_activation('saswp-dw-question-answer');
403
  }
422
  public function taqyeem_on_activation(){
423
  $this->saswp_update_option_on_compatibility_activation('saswp-taqyeem');
424
  }
425
+ public function wp_product_review_on_activation(){
426
+ $this->saswp_update_option_on_compatibility_activation('saswp-wp-product-review');
427
+ }
428
+ public function stamped_on_activation(){
429
+ $this->saswp_update_option_on_compatibility_activation('saswp-stamped');
430
+ }
431
  public function squirrly_seo_on_activation(){
432
  $this->saswp_update_option_on_compatibility_activation('saswp-squirrly-seo');
433
  }
440
  public function ultimate_blocks_on_activation(){
441
  $this->saswp_update_option_on_compatibility_activation('saswp-ultimate-blocks');
442
  }
443
+ public function video_thumbnails_on_activation(){
444
+ $this->saswp_update_option_on_compatibility_activation('saswp-video-thumbnails');
445
+ }
446
+ public function featured_video_plus_on_activation(){
447
+ $this->saswp_update_option_on_compatibility_activation('saswp-featured-video-plus');
448
+ }
449
+ public function geodirectory_on_activation(){
450
+ $this->saswp_update_option_on_compatibility_activation('saswp-geodirectory');
451
+ }
452
  public function wpzoom_on_activation(){
453
  $this->saswp_update_option_on_compatibility_activation('saswp-wpzoom');
454
  }
output/function.php CHANGED
@@ -215,6 +215,7 @@ function saswp_get_all_schema_markup_output() {
215
 
216
  }
217
  $taqeem_schema = saswp_taqyeem_review_rich_snippet();
 
218
  $schema_for_faqs = saswp_schema_for_faqs_schema();
219
  $woo_cat_schema = saswp_woocommerce_category_schema();
220
  $woo_shop_page = saswp_woocommerce_shop_page();
@@ -327,6 +328,12 @@ function saswp_get_all_schema_markup_output() {
327
  $output .= saswp_json_print_format($taqeem_schema);
328
  $output .= ",";
329
  $output .= "\n\n";
 
 
 
 
 
 
330
  }
331
  if(!empty($elementor_faq)){
332
 
@@ -2595,5 +2602,59 @@ function saswp_get_yotpo_reviews($product_id){
2595
 
2596
  }
2597
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2598
  return $response;
2599
  }
215
 
216
  }
217
  $taqeem_schema = saswp_taqyeem_review_rich_snippet();
218
+ $wp_product_rv = saswp_wp_product_review_lite_rich_snippet();
219
  $schema_for_faqs = saswp_schema_for_faqs_schema();
220
  $woo_cat_schema = saswp_woocommerce_category_schema();
221
  $woo_shop_page = saswp_woocommerce_shop_page();
328
  $output .= saswp_json_print_format($taqeem_schema);
329
  $output .= ",";
330
  $output .= "\n\n";
331
+ }
332
+ if(!empty($wp_product_rv)){
333
+
334
+ $output .= saswp_json_print_format($wp_product_rv);
335
+ $output .= ",";
336
+ $output .= "\n\n";
337
  }
338
  if(!empty($elementor_faq)){
339
 
2602
 
2603
  }
2604
 
2605
+ return $response;
2606
+ }
2607
+
2608
+ function saswp_get_stamped_reviews($product_id){
2609
+
2610
+ $public_api = Woo_stamped_api::get_public_keys();
2611
+ $store_url = Woo_stamped_api::get_site_url();
2612
+
2613
+ $response = array();
2614
+
2615
+ if($public_api && $store_url){
2616
+
2617
+ $i = 1;
2618
+ $loop_count = 1;
2619
+
2620
+ do{
2621
+
2622
+ $url = "https://stamped.io/api/widget/reviews?productId={$product_id}&apiKey={$public_api}&storeUrl={$store_url}&per_page=100&page={$i}";
2623
+
2624
+ $result = @wp_remote_get($url);
2625
+
2626
+ if(wp_remote_retrieve_response_code($result) == 200 && wp_remote_retrieve_body($result)){
2627
+
2628
+ $reviews = json_decode(wp_remote_retrieve_body($result),true);
2629
+
2630
+ if($reviews['data']){
2631
+
2632
+ $response['average'] = $reviews['ratingAll'];
2633
+ $response['total'] = $reviews['totalAll'];
2634
+
2635
+ if($response['total'] > 100){
2636
+ $loop_count = ceil($response['total'] / 100);
2637
+ }
2638
+
2639
+ foreach ($reviews['data'] as $value) {
2640
+
2641
+ $response['reviews'][] = array(
2642
+ 'author' => $value['author'],
2643
+ 'datePublished' => $value['dateCreated'],
2644
+ 'description' => $value['reviewMessage'],
2645
+ 'reviewRating' => $value['reviewRating'],
2646
+ ) ;
2647
+
2648
+ }
2649
+
2650
+ }
2651
+ }
2652
+
2653
+ $i++;
2654
+
2655
+ } while ($i <= $loop_count);
2656
+
2657
+ }
2658
+
2659
  return $response;
2660
  }
output/markup.php CHANGED
@@ -882,9 +882,14 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
882
 
883
  $review_fields['@type'] = 'Review';
884
  $review_fields['author'] = esc_attr($review['saswp_product_reviews_reviewer_name']);
885
- $review_fields['datePublished'] = esc_html($review['saswp_product_reviews_created_date']);
886
- $review_fields['description'] = esc_textarea($review['saswp_product_reviews_text']);
887
-
 
 
 
 
 
888
  if(is_int($review['saswp_product_reviews_reviewer_rating'])){
889
 
890
  $review_fields['reviewRating']['@type'] = 'Rating';
882
 
883
  $review_fields['@type'] = 'Review';
884
  $review_fields['author'] = esc_attr($review['saswp_product_reviews_reviewer_name']);
885
+
886
+ if(isset($review['saswp_product_reviews_created_date'])){
887
+ $review_fields['datePublished'] = esc_html($review['saswp_product_reviews_created_date']);
888
+ }
889
+ if(isset($review['saswp_product_reviews_text'])){
890
+ $review_fields['description'] = esc_textarea($review['saswp_product_reviews_text']);
891
+ }
892
+
893
  if(is_int($review['saswp_product_reviews_reviewer_rating'])){
894
 
895
  $review_fields['reviewRating']['@type'] = 'Rating';
output/other-schema.php CHANGED
@@ -57,6 +57,22 @@ function saswp_schema_for_faqs_schema(){
57
  return $input1;
58
  }
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  function saswp_taqyeem_review_rich_snippet(){
61
 
62
  global $post, $sd_data;
@@ -230,3 +246,57 @@ function saswp_wp_tasty_recipe_json_ld(){
230
 
231
  }
232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  return $input1;
58
  }
59
 
60
+ function saswp_wp_product_review_lite_rich_snippet(){
61
+
62
+ global $post, $sd_data;
63
+
64
+ $input1 = array();
65
+
66
+ if( is_object($post) && (isset($sd_data['saswp-wp-product-review']) && $sd_data['saswp-wp-product-review']) && class_exists('WPPR_Review_Model') ){
67
+
68
+ $review_object = new WPPR_Review_Model($post->ID);
69
+ $input1 = $review_object->get_json_ld();
70
+ }
71
+
72
+ return apply_filters('saswp_modify_wp_product_review_lite_default_schema', $input1);
73
+
74
+ }
75
+
76
  function saswp_taqyeem_review_rich_snippet(){
77
 
78
  global $post, $sd_data;
246
 
247
  }
248
 
249
+ add_filter('saswp_modify_video_object_schema_output', 'saswp_featured_video_plus_schema',10,1);
250
+
251
+ function saswp_featured_video_plus_schema($input1){
252
+
253
+ global $sd_data;
254
+
255
+ if( isset($sd_data['saswp-featured-video-plus']) && $sd_data['saswp-featured-video-plus'] == 1 && function_exists('get_the_post_video_url') ){
256
+
257
+ if(has_post_video()){
258
+
259
+ $input1['contentUrl'] = get_the_post_video_url();
260
+ $input1['embedUrl'] = get_the_post_video_url();
261
+ $input1['thumbnailUrl'] = get_the_post_video_image_url();
262
+
263
+ }
264
+
265
+ }
266
+
267
+ return $input1;
268
+ }
269
+
270
+ add_filter('saswp_modify_product_schema_output', 'saswp_classpress_ads_schema',10,1);
271
+
272
+ function saswp_classpress_ads_schema($input1){
273
+
274
+ global $sd_data, $post;
275
+
276
+ if(is_object($post) && $post->post_type == 'ad_listing' && isset($sd_data['saswp-classipress']) && $sd_data['saswp-classipress'] == 1 ){
277
+
278
+ $post_meta = get_post_meta($post->ID, $key='', true);
279
+
280
+ $input1['identifier'] = $post_meta['cp_sys_ad_conf_id'];
281
+
282
+ $input1['url'] = trailingslashit(saswp_get_permalink());
283
+ $input1['name'] = saswp_get_the_title();
284
+ $input1['identifier'] = $post_meta['cp_sys_ad_conf_id'];
285
+ $input1['description'] = saswp_get_the_excerpt();
286
+
287
+ $input1['offers']['@type'] = 'Offer';
288
+ $input1['offers']['url'] = saswp_get_permalink();
289
+ $input1['offers']['price'] = $post_meta['cp_price'][0] ? $post_meta['cp_price'][0] : 0;
290
+ $input1['offers']['priceCurrency'] = 'USD';
291
+ $input1['offers']['availability'] = 'InStock';
292
+ $input1['offers']['validFrom'] = get_the_modified_date('c');
293
+ $input1['offers']['priceValidUntil'] = $post_meta['cp_sys_expire_date'][0];
294
+
295
+ if( $post_meta['cp_ad_sold'][0] == 'yes') {
296
+ $input1['offers']['availability'] = 'OutOfStock';
297
+ }
298
+
299
+ }
300
+
301
+ return $input1;
302
+ }
output/output.php CHANGED
@@ -1609,49 +1609,34 @@ function saswp_schema_output() {
1609
 
1610
  case 'VideoObject':
1611
 
1612
- $video_links = saswp_get_video_links();
1613
-
1614
- $image_details = wp_get_attachment_image_src($image_id);
1615
 
1616
  $description = saswp_get_the_excerpt();
1617
 
1618
  if(!$description){
1619
  $description = get_bloginfo('description');
1620
- }
1621
- $thumbnail = '';
1622
-
1623
- if(isset($image_details[0])){
1624
-
1625
- $thumbnail = $image_details[0];
1626
-
1627
- }else{
1628
-
1629
- if(isset($sd_data['sd_default_image']['thumbnail'])){
1630
- $thumbnail = $sd_data['sd_default_image']['thumbnail'];
1631
- }
1632
-
1633
- }
1634
 
1635
  $input1 = array(
1636
- '@context' => saswp_context_url(),
1637
- '@type' => 'VideoObject',
1638
- '@id' => trailingslashit(saswp_get_permalink()).'#videoobject',
1639
- 'url' => trailingslashit(saswp_get_permalink()),
1640
- 'headline' => saswp_get_the_title(),
1641
- 'datePublished' => esc_html($date),
1642
- 'dateModified' => esc_html($modified_date),
1643
- 'description' => $description,
1644
- 'transcript' => saswp_get_the_content(),
1645
- 'name' => saswp_get_the_title(),
1646
- 'uploadDate' => esc_html($date),
1647
- 'thumbnailUrl' => $thumbnail,
1648
- 'author' => saswp_get_author_details()
1649
  );
1650
 
1651
- if(isset($video_links[0])){
1652
 
1653
- $input1['contentUrl'] = saswp_validate_url($video_links[0]);
1654
- $input1['embedUrl'] = saswp_validate_url($video_links[0]);
1655
 
1656
  }
1657
 
@@ -2295,11 +2280,16 @@ function saswp_archive_output(){
2295
  $item_list = array();
2296
  $collection_page = array();
2297
  $blog_page = array();
2298
- $item_list_schema = array();
2299
-
 
 
 
 
 
2300
  if(isset($sd_data['saswp_archive_schema']) && $sd_data['saswp_archive_schema'] == 1){
2301
 
2302
- if ( is_category() || is_tax() ) {
2303
 
2304
  $i = 1;
2305
  $category_loop = new WP_Query( $query_string );
1609
 
1610
  case 'VideoObject':
1611
 
1612
+ $video_links = saswp_get_video_metadata();
 
 
1613
 
1614
  $description = saswp_get_the_excerpt();
1615
 
1616
  if(!$description){
1617
  $description = get_bloginfo('description');
1618
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
1619
 
1620
  $input1 = array(
1621
+ '@context' => saswp_context_url(),
1622
+ '@type' => 'VideoObject',
1623
+ '@id' => trailingslashit(saswp_get_permalink()).'#videoobject',
1624
+ 'url' => trailingslashit(saswp_get_permalink()),
1625
+ 'headline' => saswp_get_the_title(),
1626
+ 'datePublished' => esc_html($date),
1627
+ 'dateModified' => esc_html($modified_date),
1628
+ 'description' => $description,
1629
+ 'transcript' => saswp_get_the_content(),
1630
+ 'name' => saswp_get_the_title(),
1631
+ 'uploadDate' => esc_html($date),
1632
+ 'thumbnailUrl' => isset($video_links[0]['thumbnail_url'])? $video_links[0]['thumbnail_url'] : saswp_get_thumbnail(),
1633
+ 'author' => saswp_get_author_details()
1634
  );
1635
 
1636
+ if(isset($video_links[0]['video_url'])){
1637
 
1638
+ $input1['contentUrl'] = saswp_validate_url($video_links[0]['video_url']);
1639
+ $input1['embedUrl'] = saswp_validate_url($video_links[0]['video_url']);
1640
 
1641
  }
1642
 
2280
  $item_list = array();
2281
  $collection_page = array();
2282
  $blog_page = array();
2283
+ $item_list_schema = array();
2284
+ $product_cat = false;
2285
+
2286
+ if( function_exists('is_product_category') && is_product_category() ){
2287
+ $product_cat = true;
2288
+ }
2289
+
2290
  if(isset($sd_data['saswp_archive_schema']) && $sd_data['saswp_archive_schema'] == 1){
2291
 
2292
+ if ( (is_category() || is_tax()) && !$product_cat ) {
2293
 
2294
  $i = 1;
2295
  $category_loop = new WP_Query( $query_string );
output/service.php CHANGED
@@ -3452,6 +3452,17 @@ Class saswp_output_service{
3452
  $product_details['product_average_rating'] = $sumofrating / count($judge_me_post);
3453
  }
3454
 
 
 
 
 
 
 
 
 
 
 
 
3455
  } else if(function_exists('wc_yotpo_init') && (isset($sd_data['saswp-yotpo']) && $sd_data['saswp-yotpo'] ==1 )){
3456
 
3457
  $yotpo_reviews = saswp_get_yotpo_reviews($post_id);
3452
  $product_details['product_average_rating'] = $sumofrating / count($judge_me_post);
3453
  }
3454
 
3455
+ } else if(class_exists('Woo_stamped_api') && (isset($sd_data['saswp-stamped']) && $sd_data['saswp-stamped'] == 1)){
3456
+
3457
+ $stamped_reviews = saswp_get_stamped_reviews($post_id);
3458
+
3459
+ if($stamped_reviews){
3460
+ $reviews_arr = $stamped_reviews['reviews'];
3461
+ $product_details['product_review_count'] = $stamped_reviews['total'];
3462
+ $product_details['product_average_rating'] = $stamped_reviews['average'];
3463
+ }
3464
+
3465
+
3466
  } else if(function_exists('wc_yotpo_init') && (isset($sd_data['saswp-yotpo']) && $sd_data['saswp-yotpo'] ==1 )){
3467
 
3468
  $yotpo_reviews = saswp_get_yotpo_reviews($post_id);
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.4
6
- Stable tag: 1.9.44.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -120,6 +120,21 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  = 1.9.44.1 (16 July 2020) =
124
 
125
  * Fixed: Placement for taxonomy(tag) for particular product category is not working #1118
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.4
6
+ Stable tag: 1.9.45
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
120
 
121
  == Changelog ==
122
 
123
+ = 1.9.45 (23 July 2020) =
124
+
125
+ * Fixed: Fatal error: Uncaught Error: Call to a member function get() on null on activation Arlo training and event management system #1122
126
+ * Fixed: Remove CollectionPage schema on product category page #1080
127
+ * Fixed: Changed the label of Website schema (Global) to Website schema (HomePage) #1121
128
+ * Fixed: Undefined index: saswp_product_reviews_created_date /plugins/schema-and-structured-data-for-wp/output/markup.php on line 885 #1120
129
+ * Added: Compatibility with the Sensei LMS plugin ( https://wordpress.org/plugins/sensei-lms/) in Course Schema pro extension #918
130
+ * Added: Compatibility with classiPress Ads theme #918
131
+ * Added: Compatibility with Stamped.io Product Reviews & UGC for WooCommerce ( https://wordpress.org/plugins/stampedio-product-reviews/ ) #666
132
+ * Added: Compatibility with Wp Product Review ( https://wordpress.org/plugins/wp-product-review/ ) #568
133
+ * Added: Compatibility with Sabai Discuss plugin in Q&A pro extension #1056
134
+ * Added: Compatibility with Geo Directory plugin in Real Estate pro extension #818
135
+ * Added: Compatibility with Featured Video Plus ( https://wordpress.org/support/plugin/featured-video-plus/ ) #576
136
+
137
+
138
  = 1.9.44.1 (16 July 2020) =
139
 
140
  * Fixed: Placement for taxonomy(tag) for particular product category is not working #1118
structured-data-for-wp.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Schema & Structured Data for WP & AMP
4
  Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
5
- Version: 1.9.44.1
6
  Text Domain: schema-and-structured-data-for-wp
7
  Domain Path: /languages
8
  Author: Magazine3
@@ -13,7 +13,7 @@ License: GPL2
13
  // Exit if accessed directly.
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
- define('SASWP_VERSION', '1.9.44.1');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
2
  /*
3
  Plugin Name: Schema & Structured Data for WP & AMP
4
  Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
5
+ Version: 1.9.45
6
  Text Domain: schema-and-structured-data-for-wp
7
  Domain Path: /languages
8
  Author: Magazine3
13
  // Exit if accessed directly.
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
+ define('SASWP_VERSION', '1.9.45');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));