Schema & Structured Data for WP & AMP - Version 1.9.82

Version Description

(15 July 2021) =

  • Added: Option to show LocalBusiness as page content using shortcode, Gutenberg block and widget.
  • Added: Job Training Schema type #503
  • Added: Recipe Schema Block #164
  • Added: Support for structure data on taxonomies page #983
  • Added: Author type option for accepted answer and suggested answer in the Q&A schema #1469
  • Added: The support of ACF repeater fields for HowTo and FAQ schema #1163.
  • Fixed: Conflict Issue with Popup maker plugin #1478
  • Fixed: Debug Warnings #1471
  • Fixed: Improve pagination for the review widget #1042
Download this release

Release Info

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

Code changes from version 1.9.81 to 1.9.82

Files changed (48) hide show
  1. admin_section/add-schema/add_new.php +3 -3
  2. admin_section/common-function.php +119 -42
  3. admin_section/css/main-style.css +15 -1
  4. admin_section/css/main-style.min.css +1 -1
  5. admin_section/fields-generator.php +3 -3
  6. admin_section/js/collection-front.js +22 -1
  7. admin_section/js/collection-front.min.js +1 -1
  8. admin_section/js/functions-list.js +14 -3
  9. admin_section/js/functions-list.min.js +1 -1
  10. admin_section/js/main-script.js +17 -6
  11. admin_section/js/main-script.min.js +1 -1
  12. admin_section/plugin-installer/install.php +5 -4
  13. admin_section/settings.php +22 -14
  14. admin_section/structure_admin.php +30 -14
  15. core/array-list/repeater-fields.php +75 -24
  16. core/array-list/schema-properties.php +284 -15
  17. core/array-list/schemas.php +7 -6
  18. core/global.php +1 -0
  19. modules/gutenberg/assets/blocks/location.js +64 -0
  20. modules/gutenberg/assets/blocks/recipe.js +542 -0
  21. modules/gutenberg/assets/css/amp/recipe.css +0 -0
  22. modules/gutenberg/assets/css/editor.css +149 -1
  23. modules/gutenberg/assets/css/recipe.css +151 -0
  24. modules/gutenberg/includes/class-gutenberg.php +74 -0
  25. modules/gutenberg/includes/render.php +119 -0
  26. modules/rating-box/backend.php +9 -9
  27. modules/rating-box/frontend.php +8 -8
  28. modules/reviews/comments.php +1 -1
  29. modules/reviews/reviews_admin.php +5 -5
  30. modules/reviews/reviews_collection.php +6 -6
  31. modules/reviews/reviews_service.php +24 -16
  32. modules/reviews/reviews_setup.php +9 -9
  33. output/compatibility.php +1 -1
  34. output/function.php +38 -37
  35. output/gutenberg.php +100 -17
  36. output/location.php +265 -0
  37. output/markup.php +207 -72
  38. output/other-schema.php +6 -6
  39. output/output.php +119 -99
  40. output/service.php +201 -49
  41. readme.txt +19 -7
  42. structured-data-for-wp.php +6 -4
  43. view/common.php +29 -24
  44. view/help.php +25 -1
  45. view/paywall.php +8 -8
  46. view/post_specific.php +77 -20
  47. view/schema_type.php +64 -52
  48. view/taxonomy.php +0 -98
admin_section/add-schema/add_new.php CHANGED
@@ -422,14 +422,14 @@ $saswp_add_data_type_config = array(
422
  )
423
  )
424
  );
425
- update_post_meta( $post_id, 'data_group_array', $post_data_array);
426
  }
427
 
428
  set_transient('saswp_last_post_id', json_encode(array('post_id'=>$post_id)));
429
 
430
  }
431
  if(isset($_POST['saswp_review_item_reviewed_'])){
432
- update_post_meta(
433
  $post_id,
434
  'saswp_review_item_reviewed_'.$post_id,
435
  sanitize_text_field($_POST['saswp_review_item_reviewed_'])
@@ -472,7 +472,7 @@ $saswp_add_data_type_config = array(
472
 
473
  $post_data_group_array = saswp_sanitize_multi_array($post_data_group_array, 'data_array');
474
 
475
- update_post_meta(
476
  $post_id,
477
  'data_group_array',
478
  $post_data_group_array
422
  )
423
  )
424
  );
425
+ saswp_update_post_meta( $post_id, 'data_group_array', $post_data_array);
426
  }
427
 
428
  set_transient('saswp_last_post_id', json_encode(array('post_id'=>$post_id)));
429
 
430
  }
431
  if(isset($_POST['saswp_review_item_reviewed_'])){
432
+ saswp_update_post_meta(
433
  $post_id,
434
  'saswp_review_item_reviewed_'.$post_id,
435
  sanitize_text_field($_POST['saswp_review_item_reviewed_'])
472
 
473
  $post_data_group_array = saswp_sanitize_multi_array($post_data_group_array, 'data_array');
474
 
475
+ saswp_update_post_meta(
476
  $post_id,
477
  'data_group_array',
478
  $post_data_group_array
admin_section/common-function.php CHANGED
@@ -124,10 +124,10 @@ if ( ! defined('ABSPATH') ) exit;
124
  if(is_array($meta)){
125
 
126
  $meta = wp_unslash($meta);
127
- update_post_meta($post_id, $key, $meta);
128
 
129
  }else{
130
- update_post_meta($post_id, $key, sanitize_text_field($meta));
131
  }
132
 
133
  }
@@ -243,7 +243,7 @@ if ( ! defined('ABSPATH') ) exit;
243
  foreach($all_schema_post as $schema){
244
 
245
  $export_data[$schema->ID]['post'] = (array)$schema;
246
- $post_meta = get_post_meta($schema->ID);
247
 
248
  if($post_meta){
249
 
@@ -337,8 +337,8 @@ if ( ! defined('ABSPATH') ) exit;
337
  $guid = get_option('siteurl') .'/?post_type=saswp&p='.$post_id;
338
  $wpdb->query("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
339
 
340
- $schema_post_meta = get_post_meta($schema->ID);
341
- $schema_post_types = get_post_meta($schema->ID, $key='_schema_post_types', true );
342
 
343
  $data_group_array = array();
344
 
@@ -373,7 +373,7 @@ if ( ! defined('ABSPATH') ) exit;
373
  );
374
 
375
  foreach ($saswp_meta_key as $key => $val){
376
- update_post_meta($post_id, $key, $val);
377
  }
378
  if(is_wp_error($result)){
379
  $errorDesc[] = $result->get_error_message();
@@ -504,7 +504,7 @@ if ( ! defined('ABSPATH') ) exit;
504
 
505
  foreach ($post_ids as $id) {
506
 
507
- $schema_for_faqs = get_post_meta($id, 'schema_faqs_ques_ans_data', true);
508
 
509
  if($schema_for_faqs){
510
 
@@ -527,13 +527,13 @@ if ( ! defined('ABSPATH') ) exit;
527
  }
528
  }
529
  //array is sanitize above
530
- update_post_meta($id, 'faq_question_'.$schema_id, $saswp_faq);
531
- update_post_meta($id, 'saswp_modify_this_schema_'.$schema_id, 1);
532
 
533
  }else{
534
  $schema_enable = array();
535
  $schema_enable[$schema_id] = 0;
536
- update_post_meta($id, 'saswp_enable_disable_schema', $schema_enable);
537
  }
538
  }
539
 
@@ -579,7 +579,7 @@ if ( ! defined('ABSPATH') ) exit;
579
  $review_post['post_type'] = 'saswp_reviews';
580
  $post_id = wp_insert_post($review_post);
581
 
582
- $wp_post_meta = get_post_meta($wp_post_id, '', true);
583
 
584
  $term = get_term_by( 'slug','google', 'platform' );
585
 
@@ -607,7 +607,7 @@ if ( ! defined('ABSPATH') ) exit;
607
  if($post_id && !empty($review_meta) && is_array($review_meta)){
608
 
609
  foreach ($review_meta as $key => $val){
610
- update_post_meta($post_id, $key, $val);
611
  }
612
 
613
  }
@@ -675,7 +675,7 @@ if ( ! defined('ABSPATH') ) exit;
675
  $wpdb->query("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
676
 
677
  foreach ($saswp_meta_key as $key => $val){
678
- update_post_meta($post_id, $key, $val);
679
  }
680
 
681
  $schema_options = array();
@@ -762,9 +762,9 @@ if ( ! defined('ABSPATH') ) exit;
762
  break;
763
  }
764
 
765
- update_post_meta( $post_id, 'schema_options', $schema_options);
766
- update_post_meta( $post_id, 'saswp_meta_list_val', $meta_list);
767
- update_post_meta( $post_id, 'saswp_fixed_text', $fixed_text);
768
 
769
  }
770
 
@@ -865,7 +865,7 @@ if ( ! defined('ABSPATH') ) exit;
865
  $wpdb->query("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
866
 
867
  foreach ($saswp_meta_key as $key => $val){
868
- update_post_meta($post_id, $key, $val);
869
  }
870
 
871
  if ( count($errorDesc) ){
@@ -1040,7 +1040,7 @@ if ( ! defined('ABSPATH') ) exit;
1040
  );
1041
 
1042
  foreach ($saswp_meta_key as $key => $val){
1043
- update_post_meta($post_id, $key, $val);
1044
  }
1045
  if(is_wp_error($result)){
1046
  $errorDesc[] = $result->get_error_message();
@@ -1146,7 +1146,7 @@ if ( ! defined('ABSPATH') ) exit;
1146
  );
1147
 
1148
  foreach ($saswp_meta_key as $key => $val){
1149
- update_post_meta($post_id, $key, $val);
1150
  }
1151
  if(is_wp_error($result)){
1152
  $errorDesc[] = $result->get_error_message();
@@ -1265,10 +1265,10 @@ if ( ! defined('ABSPATH') ) exit;
1265
  $guid = get_option('siteurl') .'/?post_type=saswp&p='.$post_id;
1266
  $wpdb->get_results("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
1267
 
1268
- $schema_post_types = get_post_meta($schema->ID, $key='bsf-aiosrs-schema-type', true );
1269
- $schema_post_meta_box = get_post_meta($schema->ID, $key='bsf-aiosrs-'.$schema_post_types, true );
1270
- $schema_enable_location = get_post_meta($schema->ID, $key='bsf-aiosrs-schema-location', true );
1271
- $schema_exclude_location = get_post_meta($schema->ID, $key='bsf-aiosrs-schema-exclusion', true );
1272
 
1273
  $data_array = array();
1274
 
@@ -1512,7 +1512,7 @@ if ( ! defined('ABSPATH') ) exit;
1512
 
1513
  foreach ($saswp_meta_key as $key => $val){
1514
 
1515
- update_post_meta($post_id, $key, $val);
1516
 
1517
  }
1518
  if(is_wp_error($result)){
@@ -1839,7 +1839,7 @@ if ( ! defined('ABSPATH') ) exit;
1839
 
1840
  if(isset($sd_data['saswp-review-module']) && $sd_data['saswp-review-module'] == 1){
1841
 
1842
- $review_details = esc_sql ( get_post_meta(get_the_ID(), 'saswp_review_details', true));
1843
 
1844
  if(isset($review_details['saswp-review-item-enable'])){
1845
 
@@ -1864,7 +1864,7 @@ if ( ! defined('ABSPATH') ) exit;
1864
 
1865
  global $sd_data;
1866
 
1867
- $saswp_review_details = esc_sql ( get_post_meta(get_the_ID(), 'saswp_review_details', true));
1868
 
1869
  $saswp_rv_item_enable = 0;
1870
 
@@ -1929,7 +1929,7 @@ if ( ! defined('ABSPATH') ) exit;
1929
 
1930
  if(!$aurthor_name){
1931
 
1932
- $author_id = get_post_field ('post_author', get_the_ID());
1933
  $aurthor_name = get_the_author_meta( 'display_name' , $author_id );
1934
 
1935
  }
@@ -2070,7 +2070,7 @@ if ( ! defined('ABSPATH') ) exit;
2070
 
2071
  if(saswp_remove_warnings($sd_data, 'saswp-slimseo', 'saswp_string') == 1){
2072
 
2073
- $slim_seo = get_post_meta( $post->ID, 'slim_seo', true );
2074
 
2075
  if(isset($slim_seo['description']) && $slim_seo['description'] != ''){
2076
  $excerpt = $slim_seo['description'];
@@ -2142,7 +2142,7 @@ if ( ! defined('ABSPATH') ) exit;
2142
 
2143
  if(saswp_remove_warnings($sd_data, 'saswp-the-seo-framework', 'saswp_string') == 1){
2144
 
2145
- $c_excerpt = get_post_meta($post->ID, '_genesis_description', true);
2146
 
2147
  if($c_excerpt){
2148
  $excerpt = $c_excerpt;
@@ -2162,7 +2162,7 @@ if ( ! defined('ABSPATH') ) exit;
2162
 
2163
  if( isset($sd_data['saswp-metatagmanager']) && $sd_data['saswp-metatagmanager'] == 1 && class_exists('Meta_Tag_Manager') ){
2164
 
2165
- $post_meta = get_post_meta($post->ID, 'mtm_data', true);
2166
 
2167
  if(is_array($post_meta)){
2168
 
@@ -2317,7 +2317,7 @@ if ( ! defined('ABSPATH') ) exit;
2317
  if(saswp_remove_warnings($sd_data, 'saswp-slimseo', 'saswp_string') == 1){
2318
 
2319
 
2320
- $slim_seo = get_post_meta( get_the_ID(), 'slim_seo', true );
2321
 
2322
  if(isset($slim_seo['title']) && $slim_seo['title'] != ''){
2323
  $title = $slim_seo['title'];
@@ -2330,7 +2330,7 @@ if ( ! defined('ABSPATH') ) exit;
2330
 
2331
  if(is_object($post)){
2332
 
2333
- $c_title = get_post_meta($post->ID, '_genesis_title', true);
2334
 
2335
  if($c_title){
2336
  $title = $c_title;
@@ -2894,11 +2894,10 @@ function saswp_admin_notice(){
2894
  $date2 = new DateTime($current_date);
2895
  $diff = $date1->diff($date2);
2896
 
2897
- $notice_msg = ( ($diff->y > 0 ) ? $diff->y. ' years, ' : ''). ( ($diff->m > 0 ) ? $diff->m. ' month, ' : ''). ( ($diff->d > 0 ) ? floor($diff->d / 7). ' Week, ' : '');
2898
-
2899
  }
2900
 
2901
- if(($next_days < $current_date) && $activation_never !='never' ){
2902
  ?>
2903
  <div class="updated notice message notice notice-alt saswp-feedback-notice">
2904
  <p class="saswp-notice-p">
@@ -3640,7 +3639,7 @@ function saswp_update_global_post(){
3640
 
3641
  if( (function_exists('ampforwp_is_front_page') && ampforwp_is_front_page()) && (function_exists('ampforwp_is_amp_endpoint') && ampforwp_is_amp_endpoint()) ){
3642
 
3643
- $page_id = ampforwp_get_the_ID();
3644
 
3645
  if($page_id){
3646
 
@@ -3699,9 +3698,9 @@ function saswp_insert_schema_type($title){
3699
  );
3700
 
3701
  $schema_options_array = array('isAccessibleForFree'=>False,'notAccessibleForFree'=>0,'paywall_class_name'=>'');
3702
- update_post_meta( $insertedPageId, 'data_group_array', $post_data_array);
3703
- update_post_meta( $insertedPageId, 'schema_type', 'FAQ');
3704
- update_post_meta( $insertedPageId, 'schema_options', $schema_options_array);
3705
 
3706
  }
3707
 
@@ -3721,11 +3720,11 @@ function saswp_get_posts_by_arg($arg){
3721
  $post_meta = array();
3722
  while($meta_query->have_posts()) {
3723
  $meta_query->the_post();
3724
- $data['post_id'] = get_the_ID();
3725
  $data['post_title'] = get_the_title();
3726
  $data['post_status'] = get_post_status();
3727
  $data['post_modified'] = get_the_date('M, d Y');
3728
- $post_meta = get_post_meta(get_the_ID(), '', true);
3729
  if($post_meta){
3730
  foreach($post_meta as $key => $val ){
3731
  $post_meta[$key] = $val[0];
@@ -3780,7 +3779,7 @@ function saswp_get_condition_list($condition, $search = '', $saved_data = ''){
3780
  $args['name'] = $saved_data;
3781
  }
3782
  $choices = get_post_types( $args, 'names');
3783
- unset($choices['attachment'], $choices['amp_acf'], $choices['quads-ads']);
3784
 
3785
  if($choices){
3786
  foreach($choices as $key =>$value){
@@ -4283,4 +4282,82 @@ function saswp_prepend_schema_org( $short_str ){
4283
  }
4284
 
4285
  return $response;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4286
  }
124
  if(is_array($meta)){
125
 
126
  $meta = wp_unslash($meta);
127
+ saswp_update_post_meta($post_id, $key, $meta);
128
 
129
  }else{
130
+ saswp_update_post_meta($post_id, $key, sanitize_text_field($meta));
131
  }
132
 
133
  }
243
  foreach($all_schema_post as $schema){
244
 
245
  $export_data[$schema->ID]['post'] = (array)$schema;
246
+ $post_meta = saswp_get_post_meta($schema->ID);
247
 
248
  if($post_meta){
249
 
337
  $guid = get_option('siteurl') .'/?post_type=saswp&p='.$post_id;
338
  $wpdb->query("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
339
 
340
+ $schema_post_meta = saswp_get_post_meta($schema->ID);
341
+ $schema_post_types = saswp_get_post_meta($schema->ID, $key='_schema_post_types', true );
342
 
343
  $data_group_array = array();
344
 
373
  );
374
 
375
  foreach ($saswp_meta_key as $key => $val){
376
+ saswp_update_post_meta($post_id, $key, $val);
377
  }
378
  if(is_wp_error($result)){
379
  $errorDesc[] = $result->get_error_message();
504
 
505
  foreach ($post_ids as $id) {
506
 
507
+ $schema_for_faqs = saswp_get_post_meta($id, 'schema_faqs_ques_ans_data', true);
508
 
509
  if($schema_for_faqs){
510
 
527
  }
528
  }
529
  //array is sanitize above
530
+ saswp_update_post_meta($id, 'faq_question_'.$schema_id, $saswp_faq);
531
+ saswp_update_post_meta($id, 'saswp_modify_this_schema_'.$schema_id, 1);
532
 
533
  }else{
534
  $schema_enable = array();
535
  $schema_enable[$schema_id] = 0;
536
+ saswp_update_post_meta($id, 'saswp_enable_disable_schema', $schema_enable);
537
  }
538
  }
539
 
579
  $review_post['post_type'] = 'saswp_reviews';
580
  $post_id = wp_insert_post($review_post);
581
 
582
+ $wp_post_meta = saswp_get_post_meta($wp_post_id, '', true);
583
 
584
  $term = get_term_by( 'slug','google', 'platform' );
585
 
607
  if($post_id && !empty($review_meta) && is_array($review_meta)){
608
 
609
  foreach ($review_meta as $key => $val){
610
+ saswp_update_post_meta($post_id, $key, $val);
611
  }
612
 
613
  }
675
  $wpdb->query("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
676
 
677
  foreach ($saswp_meta_key as $key => $val){
678
+ saswp_update_post_meta($post_id, $key, $val);
679
  }
680
 
681
  $schema_options = array();
762
  break;
763
  }
764
 
765
+ saswp_update_post_meta( $post_id, 'schema_options', $schema_options);
766
+ saswp_update_post_meta( $post_id, 'saswp_meta_list_val', $meta_list);
767
+ saswp_update_post_meta( $post_id, 'saswp_fixed_text', $fixed_text);
768
 
769
  }
770
 
865
  $wpdb->query("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
866
 
867
  foreach ($saswp_meta_key as $key => $val){
868
+ saswp_update_post_meta($post_id, $key, $val);
869
  }
870
 
871
  if ( count($errorDesc) ){
1040
  );
1041
 
1042
  foreach ($saswp_meta_key as $key => $val){
1043
+ saswp_update_post_meta($post_id, $key, $val);
1044
  }
1045
  if(is_wp_error($result)){
1046
  $errorDesc[] = $result->get_error_message();
1146
  );
1147
 
1148
  foreach ($saswp_meta_key as $key => $val){
1149
+ saswp_update_post_meta($post_id, $key, $val);
1150
  }
1151
  if(is_wp_error($result)){
1152
  $errorDesc[] = $result->get_error_message();
1265
  $guid = get_option('siteurl') .'/?post_type=saswp&p='.$post_id;
1266
  $wpdb->get_results("UPDATE ".$wpdb->prefix."posts SET guid ='".esc_sql($guid)."' WHERE ID ='".esc_sql($post_id)."'");
1267
 
1268
+ $schema_post_types = saswp_get_post_meta($schema->ID, $key='bsf-aiosrs-schema-type', true );
1269
+ $schema_post_meta_box = saswp_get_post_meta($schema->ID, $key='bsf-aiosrs-'.$schema_post_types, true );
1270
+ $schema_enable_location = saswp_get_post_meta($schema->ID, $key='bsf-aiosrs-schema-location', true );
1271
+ $schema_exclude_location = saswp_get_post_meta($schema->ID, $key='bsf-aiosrs-schema-exclusion', true );
1272
 
1273
  $data_array = array();
1274
 
1512
 
1513
  foreach ($saswp_meta_key as $key => $val){
1514
 
1515
+ saswp_update_post_meta($post_id, $key, $val);
1516
 
1517
  }
1518
  if(is_wp_error($result)){
1839
 
1840
  if(isset($sd_data['saswp-review-module']) && $sd_data['saswp-review-module'] == 1){
1841
 
1842
+ $review_details = esc_sql ( saswp_get_post_meta(saswp_get_the_ID(), 'saswp_review_details', true));
1843
 
1844
  if(isset($review_details['saswp-review-item-enable'])){
1845
 
1864
 
1865
  global $sd_data;
1866
 
1867
+ $saswp_review_details = esc_sql ( saswp_get_post_meta(saswp_get_the_ID(), 'saswp_review_details', true));
1868
 
1869
  $saswp_rv_item_enable = 0;
1870
 
1929
 
1930
  if(!$aurthor_name){
1931
 
1932
+ $author_id = get_post_field ('post_author', saswp_get_the_ID());
1933
  $aurthor_name = get_the_author_meta( 'display_name' , $author_id );
1934
 
1935
  }
2070
 
2071
  if(saswp_remove_warnings($sd_data, 'saswp-slimseo', 'saswp_string') == 1){
2072
 
2073
+ $slim_seo = saswp_get_post_meta( $post->ID, 'slim_seo', true );
2074
 
2075
  if(isset($slim_seo['description']) && $slim_seo['description'] != ''){
2076
  $excerpt = $slim_seo['description'];
2142
 
2143
  if(saswp_remove_warnings($sd_data, 'saswp-the-seo-framework', 'saswp_string') == 1){
2144
 
2145
+ $c_excerpt = saswp_get_post_meta($post->ID, '_genesis_description', true);
2146
 
2147
  if($c_excerpt){
2148
  $excerpt = $c_excerpt;
2162
 
2163
  if( isset($sd_data['saswp-metatagmanager']) && $sd_data['saswp-metatagmanager'] == 1 && class_exists('Meta_Tag_Manager') ){
2164
 
2165
+ $post_meta = saswp_get_post_meta($post->ID, 'mtm_data', true);
2166
 
2167
  if(is_array($post_meta)){
2168
 
2317
  if(saswp_remove_warnings($sd_data, 'saswp-slimseo', 'saswp_string') == 1){
2318
 
2319
 
2320
+ $slim_seo = saswp_get_post_meta( saswp_get_the_ID(), 'slim_seo', true );
2321
 
2322
  if(isset($slim_seo['title']) && $slim_seo['title'] != ''){
2323
  $title = $slim_seo['title'];
2330
 
2331
  if(is_object($post)){
2332
 
2333
+ $c_title = saswp_get_post_meta($post->ID, '_genesis_title', true);
2334
 
2335
  if($c_title){
2336
  $title = $c_title;
2894
  $date2 = new DateTime($current_date);
2895
  $diff = $date1->diff($date2);
2896
 
2897
+ $notice_msg = ( ($diff->y > 0 ) ? $diff->y. ' years, ' : ''). ( ($diff->m > 0 ) ? $diff->m. ' month, ' : ''). ( ($diff->d > 0 ) ? floor($diff->d / 7). ' Week, ' : '');
 
2898
  }
2899
 
2900
+ if(($next_days < $current_date) && $activation_never !='never' && $notice_msg ){
2901
  ?>
2902
  <div class="updated notice message notice notice-alt saswp-feedback-notice">
2903
  <p class="saswp-notice-p">
3639
 
3640
  if( (function_exists('ampforwp_is_front_page') && ampforwp_is_front_page()) && (function_exists('ampforwp_is_amp_endpoint') && ampforwp_is_amp_endpoint()) ){
3641
 
3642
+ $page_id = ampforwp_saswp_get_the_ID();
3643
 
3644
  if($page_id){
3645
 
3698
  );
3699
 
3700
  $schema_options_array = array('isAccessibleForFree'=>False,'notAccessibleForFree'=>0,'paywall_class_name'=>'');
3701
+ saswp_update_post_meta( $insertedPageId, 'data_group_array', $post_data_array);
3702
+ saswp_update_post_meta( $insertedPageId, 'schema_type', 'FAQ');
3703
+ saswp_update_post_meta( $insertedPageId, 'schema_options', $schema_options_array);
3704
 
3705
  }
3706
 
3720
  $post_meta = array();
3721
  while($meta_query->have_posts()) {
3722
  $meta_query->the_post();
3723
+ $data['post_id'] = saswp_get_the_ID();
3724
  $data['post_title'] = get_the_title();
3725
  $data['post_status'] = get_post_status();
3726
  $data['post_modified'] = get_the_date('M, d Y');
3727
+ $post_meta = saswp_get_post_meta(saswp_get_the_ID(), '', true);
3728
  if($post_meta){
3729
  foreach($post_meta as $key => $val ){
3730
  $post_meta[$key] = $val[0];
3779
  $args['name'] = $saved_data;
3780
  }
3781
  $choices = get_post_types( $args, 'names');
3782
+ unset($choices['attachment'], $choices['amp_acf'], $choices['saswp-collections'], $choices['saswp_reviews'], $choices['saswp_reviews_server'], $choices['saswp'] );
3783
 
3784
  if($choices){
3785
  foreach($choices as $key =>$value){
4282
  }
4283
 
4284
  return $response;
4285
+ }
4286
+
4287
+ function saswp_update_post_meta( $post_id, $meta_key, $meta_value ){
4288
+
4289
+ if($post_id){
4290
+
4291
+ if(saswp_post_exists($post_id)){
4292
+ return update_post_meta($post_id, $meta_key, $meta_value);
4293
+ }else{
4294
+ return update_term_meta($post_id, $meta_key, $meta_value);
4295
+ }
4296
+
4297
+ }
4298
+
4299
+ }
4300
+ function saswp_get_post_meta( $post_id, $key=null, $single = null ){
4301
+
4302
+ if($post_id){
4303
+
4304
+ if(saswp_post_exists($post_id)){
4305
+ return get_post_meta($post_id, $key, $single);
4306
+ }else{
4307
+ return get_term_meta($post_id, $key, $single);
4308
+ }
4309
+
4310
+ }
4311
+
4312
+ }
4313
+
4314
+ function saswp_delete_post_meta( $post_id, $meta_key, $meta_value = null ){
4315
+
4316
+ if($post_id){
4317
+
4318
+ if(saswp_post_exists($post_id)){
4319
+ return delete_post_meta( $post_id, $meta_key, $meta_value );
4320
+ }else{
4321
+ return delete_term_meta( $post_id, $meta_key, $meta_value );
4322
+ }
4323
+
4324
+ }
4325
+
4326
+ }
4327
+ function saswp_get_the_ID(){
4328
+
4329
+ $id = get_the_ID();
4330
+
4331
+ if( is_tax() || is_category() ){
4332
+ $id = get_queried_object_id();
4333
+ }
4334
+
4335
+ if( isset($_GET['tag_ID'] ) && is_admin() ){
4336
+ $id = intval($_GET['tag_ID']);
4337
+ }
4338
+
4339
+ return $id;
4340
+ }
4341
+
4342
+ function saswp_get_page_range($current, $max, $total_pages = 5) {
4343
+
4344
+ $desired_pages = $max < $total_pages ? $max : $total_pages;
4345
+
4346
+ $middle = ceil($desired_pages/2);
4347
+ if ($current <= $middle){
4348
+ return [1, $desired_pages];
4349
+ }
4350
+ if ($current > $middle && $current <= ($max - $middle)) {
4351
+ return [
4352
+ $current - $middle,
4353
+ $current + $middle
4354
+ ];
4355
+ }
4356
+ if ($current <= $max ) {
4357
+ return [
4358
+ $current - ($desired_pages - 1),
4359
+ $max
4360
+ ];
4361
+ }
4362
+
4363
  }
admin_section/css/main-style.css CHANGED
@@ -2484,7 +2484,21 @@ span.saswp-mines{
2484
  .saswp-stars-post-table td{
2485
  padding: 2px;
2486
  }
2487
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2488
  /* Offer Banner Starts Here */
2489
  /* .saswp-offer-banner{
2490
  background: #ca4a1f;
2484
  .saswp-stars-post-table td{
2485
  padding: 2px;
2486
  }
2487
+ .saswp-modify-schema-on-taxonomy td{
2488
+ background: #fff;
2489
+ }
2490
+ .saswp-modify-schema-on-taxonomy .form-table th{
2491
+ width: auto !important;
2492
+ }
2493
+ .saswp-modify-schema-on-taxonomy #saswp_specific_custom textarea{
2494
+ width: 100% !important;
2495
+ }
2496
+ .saswp-modify-schema-on-taxonomy .form-table fieldset input[type="text"]{
2497
+ width: 75% !important;
2498
+ }
2499
+ .saswp-modify-schema-on-taxonomy .form-table fieldset input[type="button"]{
2500
+ width: 24% !important;
2501
+ }
2502
  /* Offer Banner Starts Here */
2503
  /* .saswp-offer-banner{
2504
  background: #ca4a1f;
admin_section/css/main-style.min.css CHANGED
@@ -1 +1 @@
1
- #saswp-default-rating{width:100px!important}.saswp-settings-container .nav-tab-wrapper{display:flex}.saswp_review_form_toggle_check{margin:10px!important}.saswp-show-form-on-tab{padding:5px;display:inline-block;width:100%}.saswp-show-form-on-tab strong{display:inline-block;width:30%}.saswp-show-form-on-tab input{width:45%;text-align:center}.saswp-disable-btn-container{float:right;padding:10px}.saswp-disable-label{padding:10px;color:#999}.saswp-setup-schema-btn{margin:5px!important}.saswp-static-container .spinner{padding:5px;float:none;margin:0 auto;display:block}.saswp-item-list-div{display:flex;width:100%;align-items:center}.saswp-enable-modify-schema{padding-top:10px;padding-left:10px}.saswp-enable-modify-schema strong{margin-right:10px}.saswp-item-list-div{display:flex;width:100%;align-items:center}#saswp_item_list_tags{width:100%;margin-left:10px}#saswp_item_list_custom{width:100%;margin-left:10px}.saswp_warning{color:#ef6c00!important}.saswp_hide_imp{display:none!important}.saswp_hide{display:none}.saswp-general table th{width:auto;font-weight:600;padding:0}.saswp-general table{margin-top:0}.saswp-general table td{padding:5px}.saswp-knowledge table th{width:auto;padding:0}.saswp-knowledge table{margin-top:0}.saswp-knowledge table td{padding:5px}.saswp-schema table th{width:auto;padding:0}.saswp-schema table{margin-top:0}.saswp-schema table td{padding:5px}.saswp-amp table th{width:auto;padding:0}.saswp-amp table{margin-top:0}.saswp-amp table td{padding:5px}.saswp-help table th{width:auto;padding:0}.saswp-support table th{width:auto;padding:0}.saswp-review table th{width:auto;padding:0}.saswp-help table{margin-top:0}.saswp-help table td{padding:5px}.saswp-settings-list{display:inline-block;width:100%}.saswp-settings-list li{padding-left:0}.saswp-settings-list li div label{font-weight:600}.saswp-general h2{margin-bottom:0}.saswp-knowledge h2{margin-bottom:0}.saswp-schema h2{margin-bottom:0}.saswp-help h2{margin-bottom:0}.saswp-settings-form p.submit{margin-top:0}.saswp_qanda_p{font-weight:500}.saswp-display-none{display:none!important}.saswp-placement-groups{border:1px solid #e5e5e5}.saswp-query-success{color:#060}.saswp-query-error{color:#bf3322}.saswp-tools table th{width:auto;padding:0}.saswp-tools table{margin-top:0}.saswp-tools table td{padding:5px}.saswp-tools-field-title strong{padding-right:130px}.saswp-tools .saswp-tooltip{width:230px}.saswp-tools .saswp-knowledge-label{float:left}.saswp-error{color:red!important}.saswp-tooltip{position:relative;display:inline-block}.saswp-tooltip .saswp-tooltiptext{visibility:hidden;width:200px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:100%;left:50%;margin-left:-25px}.saswp-tooltiptext::after{content:"";position:absolute;top:100%;left:10%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}.saswp-knowledge-base .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-knowledge-base .saswp-knowledge-field{width:75%;float:right}.saswp-social-fileds ul{display:grid;grid-template-columns:26.5% 1fr}.saswp-social-fileds li{display:flex}.saswp-social-fileds .saswp-knowledge-field{width:100%;margin-left:10px}.saswp-social-fileds .saswp-knowledge-field input{float:right;margin:inherit}.saswp-schema-type-fields .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-schema-type-fields .saswp-knowledge-field{width:75%;float:right}.saswp-settings-first-div{width:75%}.saswp-settings-container{display:inline-flex;width:100%}.saswp-settings-second-div{float:right;position:relative;top:20px;margin-right:0;margin-top:37px}.saswp-feedback-panel{height:200px;width:280px;background:#fff;position:relative}.saswp-start-quck-setup{position:relative;float:inherit;top:7px;left:15px}.saswp-feedback-panel ul{list-style-type:circle;list-style:decimal;padding-left:30px;font-size:15px}.saswp-feedback-panel a{text-decoration:none}.saswp-feedback-panel h2{text-align:center;padding-top:18px}.saswp-social-sharing-buttons{text-align:center;padding-top:20px}.saswp-facebook-share{background:#3b5998;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-right:5px}.saswp-social-sharing-buttons a{text-align:center;padding:8px}.twitter-share-button{background:#1b95e0!important;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-left:5px}.saswp-placement-button{padding:3px 10px;color:#0d0d0d;font-size:14px;border:1px solid #aaa;border-radius:2px;background:linear-gradient(#ededed,#fff)}.saswp-placement-table td{padding:5px 10px!important}.saswp-archive-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-archive-div .saswp-knowledge-label{float:left;clear:both}label[for=saswp_archive_schema_type]{padding-left:10px}.saswp-amp .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-amp .saswp-knowledge-label{float:left;clear:both}.saswp-review .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-review .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-compativility-div .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div li{display:inline-flex}.saswp-seller-div .saswp-knowledge-label{float:left;clear:both}.saswp-seller-div .saswp-knowledge-field{float:left;width:70%}.saswp-post-specific-tab-wrapper{display:inline-block;width:25%;vertical-align:top;box-sizing:border-box}.saswp-post-specific-container{display:inline-block;width:calc(75% - 1px);border-left:1px solid #eee}.saswp-post-specific-wrapper{padding:10px}.saswp-tab a.selected{color:#555;background-color:#fff}.saswp-tab-links{display:block;padding:12px 14px;outline:0;text-align:left;cursor:pointer;transition:.3s;font-size:15px;width:100%;overflow:hidden;box-shadow:none;text-decoration:none;line-height:20px!important;border-bottom:1px solid #eee}#post_specific .inside{padding:0;margin:0}.saswp-star-rating{cursor:pointer}.saswp-post-specific-wrapper select{width:100%}.saswp-review-tables{width:100%}.saswp-over-all-raring{float:right}.saswp-review-pros-and-cons{position:relative;clear:both}.saswp-review-pros-and-cons>div:first{padding-left:10px}.saswp-review-pros-and-cons>div{width:49%;display:inline-block}.saswp-review-pros-and-cons>div:nth-child(2){padding-left:12px}.saswp-wp-ediot-desc{margin-bottom:-23px;display:block}.saswp-review-description{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saswp-review-pros-and-cons{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saspw-review-item-list{margin-top:20px;border-top:1px solid #eee}.saswp-review-item-list-table{padding-bottom:10px}#sasw-review input[type=text]{width:180px}#sasw-review input[type=number]{width:180px}#saswp-review-item-enable{width:10px}.saswp-enable-review-on-post{padding-bottom:10px}.saswp-enable-review-on-post label{font-weight:500}.saswp-compatibility table th{width:auto;padding:0}.saswp-compatibility .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-field{float:right;width:69%;padding-bottom:30px}.saswp_kg_logo,.saswp_person_fields{background-color:#fff!important}.saswp-license-label{display:inline-block;width:400px}.saswp-clear-images{margin-left:10px!important}.saswp_image_thumbnail{padding-top:5px;display:inline-block}.saswp-compatibility .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-job-posting-note,.saswp-schem-type-note{color:#d2691e}.saswp-custom-fields-name{border:1px solid #aaa;border-radius:4px}.saswp-option-table-class p{margin:auto;font-style:italic;color:#666}.saswp-switch{position:relative;display:inline-block;width:30px;height:16px;border:20px}.saswp-switch input{opacity:0;width:0;height:0}.saswp-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#b5b5b5;transition:.4s;border-radius:20px}.saswp-slider:before{position:absolute;content:"";height:10px;width:10px;left:2px;bottom:3px;background-color:#fff;transition:.4s;border-radius:20px}input:checked+.saswp-slider{background-color:#00a0d2;border-radius:30px}input:focus+.saswp-slider{box-shadow:0 0 1px #2196f3}input:checked+.saswp-slider:before{transform:translateX(15px)}.saswp-slider.saswp-round{border-radius:34px}.saswp-slider.saswp-round:before{border-radius:50%}.saswp-tab-nav{background-color:#f9f9f9;margin-top:0}.saswp-tab-nav li{display:flex;align-items:center;justify-content:space-between;margin-bottom:0}.saswp-tab-nav .selected{width:100.5%;z-index:9999}.saswp-single-post-restore .saswp-switch{height:28px}.saswp-single-post-restore .saswp-slider:before{height:20px}.option-table-class{width:100%}.option-table-class tr td{padding:10px 10px 10px 10px}.option-table-class tr>td{width:30%}.option-table-class tr td:last-child{width:60%}.saswp-custom-fields-table{width:100%}.saswp-custom-fields-table input{width:100%}.saswp-custom-fields-table tr td{padding:10px 10px 10px 10px}.saswp-custom-fields-table td{width:30%;vertical-align:top}.saswp-option-table-class input[type=text],.saswp-option-table-class select{width:100%}.saswp-paywall-table-class input[type=text],.saswp-paywall-table-class select{width:100%}.saswp-email_schema table th{width:auto;padding:0}.saswp-email_schema .saswp-knowledge-label{float:left;clear:both}.saswp-email_schema .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-add-on-plugin label{margin-top:10px}.saswp-add-on-plugin span{width:250px;display:inline-block}.saswp-knowledge-label label[for=saswp_search_box_schema_checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp_breadcrumb_remove_cat_checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-booking-checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-membership-checkbox]{padding-left:10px}.saswp-global-selected{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#000;font-weight:500;margin-bottom:-1px}#saswp-global-tabs a{cursor:pointer}#saswp-global-tabs{padding-left:5px}#saswp-tools-tabs a{cursor:pointer}#saswp-review-tabs a{cursor:pointer}#saswp-tools-tabs{padding-left:5px}.saswp-need-help{padding-left:60px}.saswp-heading{display:inline-flex;align-items:baseline}.saswp-heading h2{margin-bottom:0}.saswp-view-docs a{margin-right:5px!important;margin-top:10px!important;float:right}.saswp-tabs .nav-tab{margin-left:4px}.saswp-panel{padding:7px 18px;background-color:#fff;box-shadow:0 0 20px 1px #d2cccc}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-input-fields select{width:100%}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-str{display:inline-block;width:100%;vertical-align:middle}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700;display:inline-block;vertical-align:middle}.saswp-r5-rng .saswp-rvw-str{display:inline-block;vertical-align:middle;padding-left:10px;width:auto}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px;border-radius:100%}.saswp-premium_features table th,.saswp-services table th{width:auto;padding:0}.saswp-features-blocks{display:inline-grid;grid-template-columns:1fr 1fr;grid-gap:20px}.saswp-features-blocks li{background:#fff;padding:25px;border:1px solid #d8d8d8}.saswp-features-blocks li a{text-decoration:none}.saswp-ele-ic{border-radius:256px;display:inline-block;padding:8px 10px 8px 10px;width:70px;margin-right:20px;height:70px;float:left}.saswp-ele-ic img{width:80%;left:10%;position:relative;top:9%}.saswp-ele-1{background:#96588a}.saswp-ele-2{background:#00a97e}.saswp-ele-3{background:#cacaca}.saswp-ele-4{background:#9c56cc}.saswp-ele-tlt h3{margin:0;font-size:18px;line-height:1.4}.saswp-ele-tlt p{margin-top:10px}.saswp-sts-btn{box-sizing:border-box;height:52px;margin-top:20px;padding:6px 15px;border:1px solid #e5e5e5;border-radius:3px;display:flex;align-items:center;justify-content:space-between}.saswp-d-btn{background:#d2150a;padding:6px 18px;border-radius:30px;font-size:14px;color:#fff}.form-wrap .saswp-sts-txt{font-size:16px;color:#000}.saswp-sts-txt span{color:#bebfc0;padding-left:5px}.saswp_review_platform .saswp-g-plus{float:left}.saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%;margin-top:5px}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px;width:100%}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px;width:25px;height:25px}.saswp-g-plus img{max-width:100%}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px}.saswp-g-review-header div{margin-top:10px}.saswp-upgrade-pro{background:#fff;padding:25px;border:1px solid #d8d8d8;display:inline-block;margin-top:10px;width:100%;box-sizing:border-box}.saswp-upgrade-pro h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:14px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro ul li:before{content:"\f147";background-repeat:no-repeat;font-family:dashicons;position:absolute;color:#46b450;font-size:25px;left:0;line-height:1;top:0}.saswp-upgrade-pro a{background:#d2150a;padding:10px 0;display:block;text-align:center;color:#fff;text-decoration:none;font-size:16px;font-weight:600;letter-spacing:1px;border-radius:5px}.saswp_image_prev{max-width:200px;max-height:200px;float:left;padding-left:2px}.saswp_prev_close{position:relative;width:30px;height:30px;top:12px;font-size:20px;top:-5px;text-decoration:none}.saswp-add-custom-schema-div{margin-top:10px;border-top:1px solid #eee;padding-top:5px}.saswp-nav-menu-list label{padding-left:10px}.saswp-dynamic-properties{border:1px solid #aaa;margin-top:5px;margin-bottom:5px}.saswp-table-close{float:right;cursor:pointer}.saswp-table-create-onajax table td,.saswp-table-create-onajax table th{padding:5px}.saswp-table-create-onajax select{width:98%}.saswp-g-reviews-settings-table input{width:100%}.saswp-s-reviews-settings-table input{width:100%}.saswp_rv_module_pro_notice{border:1px solid #d8d8d8;background:#fff}.saswp-settings-list .saswp-rev-mod{width:100%;display:inline-block;margin-top:20px}.saswp-rev-mod .saswp-knowledge-label{width:100%;display:inline-block;padding:10px 16px;font-weight:600;font-size:16px;color:#333;background:#f9f9f9;border:1px solid #d8d8d8;border-bottom:none;box-sizing:border-box}.saswp-rev-mod .saswp-knowledge-field{width:100%;display:inline-block}.saswp-rev-mod .saswp_rv_module_pro_notice{padding:20px}.saswp_cmpny_lst{width:100%;display:inline-block;margin-top:30px}.saswp_rv_module_pro_notice ul{margin:15px 0 20px 0;width:100%;display:inline-grid;grid-template-columns:1fr 1fr 1fr;grid-gap:20px;border-bottom:1px solid #eee;padding-bottom:20px}.saswp_rv_module_pro_notice ul li{position:relative;font-size:15px;line-height:1.5;color:#444;margin:0}.saswp_rv_module_pro_notice ul li span{padding-left:3px}.saswp_rv_module_pro_notice h2{text-align:center;font-size:31px}.saswp_rv_module_pro_notice .saswp_desc{text-align:center;font-size:18px;font-style:normal;color:#000}.saswp_rv_module_pro_notice .saswp_desc a{font-style:italic}.saswp_rv_module_pro_notice .saswp_lst{color:grey;font-family:georgia;font-style:italic;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice .saswp_avlbl{color:#2a902e;font-family:georgia;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice ul li img{width:20px;height:20px;position:relative;top:4px}.saswp-rev-btn{width:100%;display:inline-block;margin-top:20px;text-align:center}.saswp-rev-btn span{display:block;font-size:13px;margin-bottom:15px}.saswp-rev-btn a{padding:12px 18px;display:inline-block;text-decoration:none;border-radius:5px;background:#0085ba;color:#fff;font-weight:600;font-size:18px}.select2-container{width:100%!important}.saswp-schema-modify-section{margin-top:15px;border-top:1px solid #eee;padding-top:15px}.saswp-custom-meta-list{border:1px solid #aaa;border-radius:4px}.saswp-custom-fields-table tr td:nth-child(3n+3) input{border:1px solid #aaa;border-radius:4px}.updated.notice p{width:100%;align-items:center}.updated.notice .dashicons-thumbs-up{margin-right:10px}a.saswp-feedback-no-thanks,a.saswp-feedback-remindme{cursor:pointer}a.saswp-revws-lnk{display:inline-block;background:#0085ba;padding:12px 20px;color:#fff;text-decoration:none;border-radius:3px;margin-left:20px;font-size:14px;line-height:.6;cursor:pointer}.saswp-update-notice-btns{display:inline-block;width:100%;margin-bottom:5px}.saswp-update-notice-btns ul{list-style:inside;margin:0 10px 20px 20px}.saswp-notice-p{font-size:16px;color:#28672d}.saswp-update-notice-btns li a{text-decoration:underline}.saswp-update-notice-btns li{font-size:14px;font-weight:700;line-height:20px}.saswp-about-contact-page{width:75%;float:right}.saswp-about-contact-page-tooltip{float:left;clear:both}.saswp-quick-setup{float:left}.saswp_add_schema_fields_on_fly{margin-bottom:5px!important}.saswp-custom-fields-table .saswp_image_prev{max-width:62px!important}.saswp-custom-fields-table .saswp_prev_close{font-size:15px}.saswp-review-content-table td:nth-child(2){width:50%;float:left}.saswp-review-content-table input{width:100%}.saswp-review-content-table select{width:100%}.saswp-review-content-table textarea{width:100%}.saswp-social-links-table{width:100%}.saswp-social-links-table input{width:100%}.saswp-add-social-links{margin:3px!important}.saswp-social-links-table td{padding-left:0!important}#saswp-compatibility-tabs a{cursor:pointer}.saswp-add-dynamic-section{padding:0 30px}.saswp-add-dynamic-btn{text-align:center;margin-bottom:10px}.saswp-add-single-rv{margin-left:10px!important}.saswp-dynamic-platforms{display:flex;width:100%}.saswp-dynamic-platforms select{margin-right:10px;width:40%}.saswp-add-rv-btn{font-size:25px;margin-left:-8px;padding-top:15px;cursor:pointer}.saswp-remove-coll-rv{position:absolute;top:2;top:0;right:0}.saswp-rmv-coll-rv{padding:3px;cursor:pointer}.saswp-collection-placement-post{width:-webkit-fill-available}.saswp-collection-placement-post td{vertical-align:top;width:-webkit-fill-available}.saswp-grid-pagination{display:inline-block;padding:20px}.saswp-grid-pagination a{color:#000;float:left;padding:8px 16px;text-decoration:none}.saswp-grid-pagination a.active{background-color:#4caf50;color:#fff}.saswp-grid-pagination a:hover:not(.active){background-color:#ddd}.saswp-collection-body{width:100%;display:flex;flex-wrap:wrap}.saswp-collection-lp{flex:1 0 68%;margin-right:20px;width:68%;background:#fff;border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);padding-bottom:22px}.saswp-collection-settings{flex:1 0 27%;height:100%;width:28%}.saswp-collection-container{margin-top:60px;width:100%;display:inline-block;padding-right:20px;box-sizing:border-box}.saswp-collection-preview-table{width:100%}.saswp-collection-preview-table td{width:30%}.saswp-platform-added-list{display:inline-block;width:100%;margin-top:10px}.saswp-collection-title input{width:96%;padding:3px 8px;font-size:15px;line-height:2;height:1.7em;outline:0;margin:0 0 3px;background-color:#fff;color:#32373c}.saswp-collection-title{margin-bottom:10px;padding:10px;background:#f5f5f5;border-bottom:1px solid #ddd}.saswp-collection-preview{padding:0 30px}.saswp-r1{margin-bottom:50px;text-align:center}.saswp-r1 ul{padding:0;list-style-type:none;display:grid;width:100%;grid-template-columns:1fr 1fr 1fr;grid-gap:15px;margin:0}.saswp-r1 li{padding:20px;position:relative;color:#777;border:1px solid #ededed;background-color:#fafafa;border-radius:4px;margin:0}.saswp-rc{display:flex;width:100%;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;position:relative}.saswp-r1 .saswp-rc-lg{position:absolute;right:-5px}.saswp-r1-aimg img{float:left;max-width:56px;min-height:56px;max-height:56px;border-radius:100px}.saswp-rc-a>img{max-width:56px;min-height:56px;max-height:56px;margin-right:10px;border-radius:100px}.saswp-rc-lg img{width:25px;height:25px;border-radius:100px}.saswp-rc-nm a{text-decoration:none;color:#427fed;font-size:16px;font-weight:600;display:inline-block;line-height:1.1;letter-spacing:0;width:80%;text-align:left}.saswp-rc-dt{margin-top:5px;font-size:12px;line-height:1.2;color:#999;display:block}.saswp-rc-a{flex:1 0 85%;display:flex;justify-content:flex-start}.saswp-rc-nm{width:100%;margin-left:10px;text-align:initial}.saswp_reviewer_image .saswp-rv-img span{vertical-align:top}.saswp-rc-cnt{position:static;height:80px;overflow-y:auto;font-size:14px;line-height:1.6;text-align:left;padding:0 2px 0 0;margin:10px 0 0}.saswp-r2-strs{text-align:center}.saswp-rc-cnt p{margin:0}.saswp-rc-cnt::-webkit-scrollbar{width:4px;display:inline-block}.saswp-rc-cnt::-webkit-scrollbar-thumb{-webkit-border-radius:10px;border-radius:10px;background:#ccc;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.5)}.saswp-rc-cnt::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);-webkit-border-radius:4px;border-radius:4px}.saswp-collection-settings{border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04)}.saswp-collection-settings ul{margin:0;padding:0}.saswp-collection-settings ul li{border-bottom:1px solid #ddd;margin:0;position:relative}.saswp-dp-dsg{display:inline-grid;grid-template-columns:1fr 2fr;width:100%;grid-gap:0 5px;align-items:center;color:#666;padding-bottom:8px}.saswp-dp-dtm{margin-top:13px}.saswp-slider-display{margin-top:15px}.wp-admin .saswp-collection-settings select{margin:0;min-height:30px;max-height:30px;max-width:100%}.saswp-slider-display span{width:30%;display:inline-block}.saswp-collection-settings ul li a{padding:12px 15px;background:#fff;color:#23282d;cursor:pointer;width:100%;border:none;text-align:left;font-size:14px;line-height:1.5;font-weight:600;transition:all .5s ease-in-out 0s;display:block;box-sizing:border-box;position:relative}.saswp-collection-settings ul li input{width:100%}.saswp-collection-settings ul li input[type=checkbox]{width:16px}.saswp-collection-settings ul li a.active,.saswp-collection-settings ul li a:hover{background:#f5f5f5}.saswp-accordion.active+.saswp-accordion-panel{border-top:1px solid #ddd}.saswp-plf-lst-rv-cnt{display:inline-grid;width:100%;flex-wrap:wrap;grid-template-columns:180px 57px 1fr;grid-gap:5px}.saswp-accordion-panel{padding:15px 18px;display:none;background-color:#fff;overflow:hidden;border-top:1px solid #ddd}.saswp-collection-settings a.saswp-add-to-collection{text-align:center;height:30px;font-weight:400;position:relative;top:1px;line-height:27px}.wp-core-ui a.button.saswp-remove-platform{background:0 0;border:none;padding:0;margin-left:6px;min-height:0}.wp-core-ui a.button.saswp-remove-platform:hover{color:#c00}.wp-core-ui a.button.saswp-remove-platform:after{content:"\f153";display:block;font:normal 16px/20px dashicons}.cancel-btn{margin-right:10px;margin-bottom:5px;float:left;display:inline-flex}.wp-admin .saswp-accordion-panel select.saswp-collection-desing{width:100%}.saswp-slider-display.saswp-desing-options{margin-top:10px}.saswp-slider-display.saswp-desing-options span{margin-right:10px;display:inline-block}.saswp-collection-settings li a.saswp-accordion:after{content:"\f140";font:normal 20px/1 dashicons;speak:none;display:block;position:absolute;color:#72777c;top:13px;right:18px}.saswp-collection-settings li a.saswp-accordion.active:after{content:"\f142";top:13px}.saswp-sv-btn{background:#f5f5f5;padding:8px 10px;text-align:right;width:100%;box-sizing:border-box}.saswp-collection-settings .button-primary{width:89px;margin:0;display:inline-block;padding:2px 0}.saswp-collection-shortcode{color:#555;margin-top:10px;padding:4px;background:#f1f1f1;display:inline-block;border:1px solid #ddd;margin-left:75px}.saswp-rd3-warp ul{padding:0;display:grid;grid-template-columns:1fr 1fr 1fr 1fr;grid-gap:30px;list-style-type:none;margin:0;justify-content:center}.saswp-rd3-warp li{box-shadow:0 2px 5px 0 rgba(0,0,0,.26);margin:0}.saswp-rd3-warp li a{text-decoration:none}.saswp-r3-lg{background:#ededed;display:flex;align-items:center;justify-content:center;width:100%;padding:6px 8px;box-sizing:border-box}.saswp-r3-lg span img{width:18px;height:18px;margin-right:10px}.saswp-r3-lg span{line-height:0}.saswp-r3-lg .saswp-r3-tlt{font-size:12px;line-height:1.4;text-transform:uppercase;color:#555;font-weight:400}.saswp-lg{line-height:0}.saswp-r3-rtng{padding:13px 10px 10px 10px;background:#fff;border-radius:0 0 3px 3px;text-align:center}.saswp-r3-rtxt{display:flex;align-items:center;line-height:0;width:100%;margin-bottom:10px;justify-content:center}.saswp-r3-rtxt .saswp-r3-num{color:#23282d;margin-right:5px;font-size:22px;font-weight:500;position:relative;top:2px;word-break:normal}.saswp-rd3-warp .saswp-rvw-str .df-clr,.saswp-rd3-warp .saswp-rvw-str .half-str,.saswp-rd3-warp .saswp-rvw-str .str-ic{display:inline-block;width:22px;height:22px;background-repeat:no-repeat;background-size:22px;margin-right:3px}.saswp-r3-brv{color:#666;font-size:13px;line-height:1}.saswp-r5{position:fixed;bottom:20px;width:calc(100% - 20px);max-width:325px;border-radius:12px;background:#fff;border:1px solid #e6e6e6;box-shadow:0 0 8px 0 rgba(0,0,0,.05);transition:all .3s ease-in;display:none}.saswp-r5 .saswp-rvw-str .df-clr,.saswp-r5 .saswp-rvw-str .half-str,.saswp-r5 .saswp-rvw-str .str-ic{display:inline-block;width:23px;height:20px;background-repeat:no-repeat;background-size:20px}.saswp-r5-r .saswp-r5-rng .saswp-rvw-str{padding-left:0;margin-bottom:3px}.saswp-r5-r{display:flex;flex-wrap:wrap;width:100%;align-items:center;height:80px}.saswp-r5-rng{flex:1 0 60%;padding-left:15px}.saswp-r5-lg{width:80px;height:100%;border-right:1px solid #ddd;box-sizing:border-box;background:linear-gradient(to bottom,#fefefe 0,#f2f2f2 100%);position:relative;display:flex;align-items:center;border-radius:12px 0 0 12px}.saswp-r5-r .saswp-r5-lg span{border-radius:10px 0 0 10px}.saswp-r5-r .saswp-r5-lg img{position:relative;max-width:40px;max-height:40px;left:20PX;border-radius:10px 0 0 10px;top:2px}.saswp-r5-txrng{font-size:12px;line-height:1.2;color:#444;display:flex;margin-bottom:5px}.saswp-r5-txrng span{font-weight:600;color:#666;margin-right:5px}.saswp-r5-rng span.saswp-r5-dt{display:block;font-size:11px;color:#ababab;font-weight:400}.saswp-r5 a{text-decoration:none}.saswp-popup-btn{position:fixed;top:auto;bottom:0;font-family:Arial,sans-serif;z-index:9;box-shadow:0 20px 40px 8px rgba(0,0,0,.25);width:300px;background:#fff;border:none;padding:0}.saswp-open-class.saswp-popup-btn{width:300px}#saswp-reviews-cntn{display:none}#saswp-sticky-review .saswp-open-class #saswp-reviews-cntn{width:100%}.saswp-opn-cls-btn{display:flex;height:50px;justify-content:space-between;align-items:center;background:#fba306;width:100%;padding:0 15px;border-radius:4px 4px 0 0;cursor:pointer;box-sizing:border-box}.saswp-opn-cls-btn svg path{fill:#fff}.saswp-opn-cls-btn span{font-size:15px;font-weight:600;color:#fff}.saswp-onclick-hide,.saswp-onclick-show{display:flex;justify-content:space-between;width:100%}.saswp-r4-info ul{list-style-type:none;padding:0;margin:0;text-align:left;height:350px;overflow-y:scroll}.saswp-r4-info ul li{border-bottom:1px solid #e4e4e4;padding:20px}.saswp-r4-b{display:flex;align-items:center;justify-content:flex-start;width:100%}.saswp-r4-b .saswp-r4-str{margin-right:10px}.saswp-r4-b span.saswp-r4-tx{font-size:14px;color:#444}.saswp-r4-b span.saswp-r4-nm:after{content:"-";display:inline-block;margin:0 10px}.saswp-r4-info .saswp-rvw-str .df-clr,.saswp-r4-info .saswp-rvw-str .half-str,.saswp-r4-info .saswp-rvw-str .str-ic{display:inline-block;width:22px;height:20px;background-repeat:no-repeat;background-size:18px}.saswp-r4-cnt h3{margin:10px 0 8px 0!important;font-size:18px;color:#333;font-weight:500}.saswp-r4-cnt p{font-size:13px;line-height:1.5;margin:0;color:#333}.saswp-r4-info ul li.saswp-r4-r{display:flex;width:100%;align-items:center;text-align:center;justify-content:center;box-sizing:border-box}.saswp-r4-info ul li span.saswp-r4-rnm{margin-left:10px;font-size:18px;color:#666}.btn .saswp-onclick-hide,.btn.saswp-open-class .saswp-onclick-show{display:flex;justify-content:space-between;width:100%}.btn .saswp-onclick-show,.btn.saswp-open-class .saswp-onclick-hide{display:none}span.saswp-mines{line-height:0}.saswp-mines:before{content:"";display:inline-block;width:20px;height:4px;background:#fff;position:relative;top:5px}.saswp-rd2-warp{width:100%;display:inline-block;margin-bottom:50px}.saswp-rd2-warp div{width:350px;margin-right:25px}.saswp-rd2-warp .saswp-rc-cnt{white-space:initial}.saswp-rd2-warp .saswp-r2-b{position:relative;color:#777;border:1px solid #ededed;background-color:#fafafa;border-radius:4px}.saswp-rd2-warp .saswp-rc-cnt{height:150px;margin:20px 20px 20px 40px}.saswp-rd2-warp .saswp-rc{padding:20px}.saswp-r2-b .saswp-r2-s{display:inline-block}.saswp-r2-b .saswp-rc-cnt p{display:inline}.saswp-r2-b .saswp-rc-lg{line-height:0;position:absolute;right:13px;top:13px;background:#fafafa}.saswp-r2-q svg{width:20px;fill:#bbb;position:absolute;height:30px;top:15px;left:12px}.saswp-rd2-warp .saswp-r2-b:before{position:absolute;bottom:-8px;left:35px;display:block;width:14px;height:14px;border:1px solid #ededed;border-top:none;border-left:none;background-color:#fafafa;content:"";-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.carousel-preview{text-align:center}.carousel-preview button{width:12px;height:12px;border-radius:100px;border:none;margin:0 5px;cursor:pointer}.carousel-preview button.saswp-active{background:#427fed}.saswp-cst .saswp-cs{width:100%;max-width:640px;margin:0 auto;overflow:hidden;position:relative}.saswp-r2-b{padding:20px 40px 20px 40px;background-color:#fafafa;position:relative;color:#777;border:1px solid #ededed;border-radius:4px;box-sizing:border-box}.saswp-cst .saswp-rc{padding:20px;box-sizing:border-box}.saswp-si .saswp-r2-b:before{position:absolute;bottom:-8px;left:35px;display:block;width:14px;height:14px;border:1px solid #ededed;border-top:none;border-left:none;background-color:#fafafa;content:"";-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.saswp-si .saswp-rc-cnt{margin:0}.saswp-cs .saswp-slider-controls{width:100%;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;z-index:9;position:relative;top:10px}.saswp-slider-controls a.saswp-slider-prev-btn{position:absolute;left:10px;bottom:0;background:rgba(0,0,0,.5);line-height:0;border-radius:100px;width:30px;height:30px}.saswp-slider-controls a.saswp-slider-prev-btn:before{content:"";display:inline-block;width:6px;height:6px;border:2px solid #fff;border-top:none;border-left:none;transform:rotate(135deg);position:relative;top:11px;left:12px}.saswp-slider-controls a.saswp-slider-next-btn{position:absolute;right:10px;bottom:0;background:rgba(0,0,0,.5);line-height:0;border-radius:100px;width:30px;height:30px}.saswp-slider-controls a.saswp-slider-next-btn:after{content:"";display:inline-block;width:6px;height:6px;border:2px solid #fff;border-top:none;border-left:none;transform:rotate(135deg);transform:rotate(-45deg);position:relative;top:11px;right:-9px}.saswp-si .saswp-rc-lg img{width:25px;height:25px}.saswp-cs .saswp-slider-dots .saswp-dot{width:10px;height:10px;background:#ccc;transition:.15s ease-in-out;border-radius:8px;cursor:pointer;margin:0 12px}.saswp-cs .saswp-slider-dots .saswp-dot.saswp-active{background:#0071a1}.saswp-cst .saswp-sic .saswp-si{width:100vw;max-width:640px;display:block}.spinner.saswp-spinner{float:none;margin:0 auto;display:block}.saswp-cct .saswp-cs{width:100%;max-width:800px;margin:0 auto;overflow:hidden;position:relative}.saswp-cct .saswp-sic .saswp-si{width:100%;max-width:800px;display:flex}.saswp-cct .saswp-r2-sli{width:100%;margin-right:20px;max-width:40%}.saswp-cct .saswp-rc{padding:20px 10px;box-sizing:border-box}.saswp-cct .saswp-rc-cnt{height:120px}.saswp-cs .saswp-sic{display:flex;flex-wrap:wrap;height:auto;transition:transform .35s ease-in-out}.saswp-cs .saswp-slider-controls a{color:#333;text-decoration:none;transition:.15s ease-in-out}.saswp-cs .saswp-slider-controls a:hover{color:#888}.saswp-cs .saswp-slider-dots{width:100%;display:flex;justify-content:center;margin:0 auto;position:relative;top:-10px}.saswp-onclick-show{display:none}.saswp-dp-dsg.saswp_hide{display:none}@media(max-width:1200px){.saswp-plf-lst-rv-cnt{grid-template-columns:1fr}}@media(max-width:767px){.saswp-collection-lp{flex:1 0 100%;margin-right:0;width:100%}.saswp-collection-settings{flex:1 0 100%;height:100%;width:100%}.wp-admin .saswp-collection-settings select{max-width:100%}}.saswp-upgrade-pro h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:14px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro a{background:#d2150a;padding:10px 0;display:block;text-align:center;color:#fff;text-decoration:none;font-size:16px;font-weight:600;letter-spacing:1px;border-radius:5px}.saswp-settings-second-div .saswp-upgrade-pro.promo-cpn{display:block}.saswp-upgrade-pro.promo-cpn{border:1px solid #558b2f}.saswp-hide{display:none}.saswp-settings-second-div .saswp-upgrade-pro.promo-cpn{display:block;margin:0}.saswp-upgrade-pro.promo-cpn{border:1px solid #558b2f;border-radius:8px}.saswp-upgrade-pro.promo-cpn h2{color:#2e7d32;font-size:24px;text-align:center;margin:0 0 20px 0}.saswp-upgrade-pro.promo-cpn span{text-align:center;font-size:14px;display:inline-block;color:#777;padding:0 20px;box-sizing:border-box;line-height:1.4;font-weight:400}.saswp-promo{font-size:20px;margin-top:15px;width:100%;text-align:center}.saswp-upgrade-pro.promo-cpn .prm-txt{display:block;line-height:1}.saswp-upgrade-pro.promo-cpn .saswp-promo .prm-cpn{border:1px dashed #1b5e20;border-radius:100px;margin-top:5px;color:#388e3c;font-size:20px;padding:2px 15px 2px 15px}.saswp-upgrade-pro a{background:#43a047}.saswp-upgrade-pro{border-radius:8px}.saswp-settings-second-div a{text-decoration:none}.saswp-thick-box-container{width:580px}#saswp-add-rv-manual{padding:10px}#saswp-add-rv-automatic,#saswp-add-rv-collection{padding:10px;box-sizing:border-box;width:100%;overflow-y:scroll;height:260px}.saswp-add-collection-loop,.saswp-add-rv-loop{padding-bottom:10px}.saswp-add-rv-title{padding:10px}.close-attached-reviews-popup{float:right;margin-right:20px!important}.saswp-add-rv-note{padding-bottom:10px}.saswp-accept-rv-container{margin-right:20px}.saswp-post-specific-setting{border-bottom:1px solid #eee;text-align:center;padding-bottom:10px}.saswp-ps-text{padding:20px 5px}.saswp-ps-text span{font-weight:600}.saswp-ps-toggle{padding:10px}.saswp-stars-post-table td{padding:2px}
1
+ #saswp-default-rating{width:100px!important}.saswp-settings-container .nav-tab-wrapper{display:flex}.saswp_review_form_toggle_check{margin:10px!important}.saswp-show-form-on-tab{padding:5px;display:inline-block;width:100%}.saswp-show-form-on-tab strong{display:inline-block;width:30%}.saswp-show-form-on-tab input{width:45%;text-align:center}.saswp-disable-btn-container{float:right;padding:10px}.saswp-disable-label{padding:10px;color:#999}.saswp-setup-schema-btn{margin:5px!important}.saswp-static-container .spinner{padding:5px;float:none;margin:0 auto;display:block}.saswp-item-list-div{display:flex;width:100%;align-items:center}.saswp-enable-modify-schema{padding-top:10px;padding-left:10px}.saswp-enable-modify-schema strong{margin-right:10px}.saswp-item-list-div{display:flex;width:100%;align-items:center}#saswp_item_list_tags{width:100%;margin-left:10px}#saswp_item_list_custom{width:100%;margin-left:10px}.saswp_warning{color:#ef6c00!important}.saswp_hide_imp{display:none!important}.saswp_hide{display:none}.saswp-general table th{width:auto;font-weight:600;padding:0}.saswp-general table{margin-top:0}.saswp-general table td{padding:5px}.saswp-knowledge table th{width:auto;padding:0}.saswp-knowledge table{margin-top:0}.saswp-knowledge table td{padding:5px}.saswp-schema table th{width:auto;padding:0}.saswp-schema table{margin-top:0}.saswp-schema table td{padding:5px}.saswp-amp table th{width:auto;padding:0}.saswp-amp table{margin-top:0}.saswp-amp table td{padding:5px}.saswp-help table th{width:auto;padding:0}.saswp-support table th{width:auto;padding:0}.saswp-review table th{width:auto;padding:0}.saswp-help table{margin-top:0}.saswp-help table td{padding:5px}.saswp-settings-list{display:inline-block;width:100%}.saswp-settings-list li{padding-left:0}.saswp-settings-list li div label{font-weight:600}.saswp-general h2{margin-bottom:0}.saswp-knowledge h2{margin-bottom:0}.saswp-schema h2{margin-bottom:0}.saswp-help h2{margin-bottom:0}.saswp-settings-form p.submit{margin-top:0}.saswp_qanda_p{font-weight:500}.saswp-display-none{display:none!important}.saswp-placement-groups{border:1px solid #e5e5e5}.saswp-query-success{color:#060}.saswp-query-error{color:#bf3322}.saswp-tools table th{width:auto;padding:0}.saswp-tools table{margin-top:0}.saswp-tools table td{padding:5px}.saswp-tools-field-title strong{padding-right:130px}.saswp-tools .saswp-tooltip{width:230px}.saswp-tools .saswp-knowledge-label{float:left}.saswp-error{color:red!important}.saswp-tooltip{position:relative;display:inline-block}.saswp-tooltip .saswp-tooltiptext{visibility:hidden;width:200px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:100%;left:50%;margin-left:-25px}.saswp-tooltiptext::after{content:"";position:absolute;top:100%;left:10%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}.saswp-knowledge-base .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-knowledge-base .saswp-knowledge-field{width:75%;float:right}.saswp-social-fileds ul{display:grid;grid-template-columns:26.5% 1fr}.saswp-social-fileds li{display:flex}.saswp-social-fileds .saswp-knowledge-field{width:100%;margin-left:10px}.saswp-social-fileds .saswp-knowledge-field input{float:right;margin:inherit}.saswp-schema-type-fields .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-schema-type-fields .saswp-knowledge-field{width:75%;float:right}.saswp-settings-first-div{width:75%}.saswp-settings-container{display:inline-flex;width:100%}.saswp-settings-second-div{float:right;position:relative;top:20px;margin-right:0;margin-top:37px}.saswp-feedback-panel{height:200px;width:280px;background:#fff;position:relative}.saswp-start-quck-setup{position:relative;float:inherit;top:7px;left:15px}.saswp-feedback-panel ul{list-style-type:circle;list-style:decimal;padding-left:30px;font-size:15px}.saswp-feedback-panel a{text-decoration:none}.saswp-feedback-panel h2{text-align:center;padding-top:18px}.saswp-social-sharing-buttons{text-align:center;padding-top:20px}.saswp-facebook-share{background:#3b5998;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-right:5px}.saswp-social-sharing-buttons a{text-align:center;padding:8px}.twitter-share-button{background:#1b95e0!important;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-left:5px}.saswp-placement-button{padding:3px 10px;color:#0d0d0d;font-size:14px;border:1px solid #aaa;border-radius:2px;background:linear-gradient(#ededed,#fff)}.saswp-placement-table td{padding:5px 10px!important}.saswp-archive-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-archive-div .saswp-knowledge-label{float:left;clear:both}label[for=saswp_archive_schema_type]{padding-left:10px}.saswp-amp .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-amp .saswp-knowledge-label{float:left;clear:both}.saswp-review .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-review .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-compativility-div .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div li{display:inline-flex}.saswp-seller-div .saswp-knowledge-label{float:left;clear:both}.saswp-seller-div .saswp-knowledge-field{float:left;width:70%}.saswp-post-specific-tab-wrapper{display:inline-block;width:25%;vertical-align:top;box-sizing:border-box}.saswp-post-specific-container{display:inline-block;width:calc(75% - 1px);border-left:1px solid #eee}.saswp-post-specific-wrapper{padding:10px}.saswp-tab a.selected{color:#555;background-color:#fff}.saswp-tab-links{display:block;padding:12px 14px;outline:0;text-align:left;cursor:pointer;transition:.3s;font-size:15px;width:100%;overflow:hidden;box-shadow:none;text-decoration:none;line-height:20px!important;border-bottom:1px solid #eee}#post_specific .inside{padding:0;margin:0}.saswp-star-rating{cursor:pointer}.saswp-post-specific-wrapper select{width:100%}.saswp-review-tables{width:100%}.saswp-over-all-raring{float:right}.saswp-review-pros-and-cons{position:relative;clear:both}.saswp-review-pros-and-cons>div:first{padding-left:10px}.saswp-review-pros-and-cons>div{width:49%;display:inline-block}.saswp-review-pros-and-cons>div:nth-child(2){padding-left:12px}.saswp-wp-ediot-desc{margin-bottom:-23px;display:block}.saswp-review-description{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saswp-review-pros-and-cons{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saspw-review-item-list{margin-top:20px;border-top:1px solid #eee}.saswp-review-item-list-table{padding-bottom:10px}#sasw-review input[type=text]{width:180px}#sasw-review input[type=number]{width:180px}#saswp-review-item-enable{width:10px}.saswp-enable-review-on-post{padding-bottom:10px}.saswp-enable-review-on-post label{font-weight:500}.saswp-compatibility table th{width:auto;padding:0}.saswp-compatibility .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-field{float:right;width:69%;padding-bottom:30px}.saswp_kg_logo,.saswp_person_fields{background-color:#fff!important}.saswp-license-label{display:inline-block;width:400px}.saswp-clear-images{margin-left:10px!important}.saswp_image_thumbnail{padding-top:5px;display:inline-block}.saswp-compatibility .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-job-posting-note,.saswp-schem-type-note{color:#d2691e}.saswp-custom-fields-name{border:1px solid #aaa;border-radius:4px}.saswp-option-table-class p{margin:auto;font-style:italic;color:#666}.saswp-switch{position:relative;display:inline-block;width:30px;height:16px;border:20px}.saswp-switch input{opacity:0;width:0;height:0}.saswp-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#b5b5b5;transition:.4s;border-radius:20px}.saswp-slider:before{position:absolute;content:"";height:10px;width:10px;left:2px;bottom:3px;background-color:#fff;transition:.4s;border-radius:20px}input:checked+.saswp-slider{background-color:#00a0d2;border-radius:30px}input:focus+.saswp-slider{box-shadow:0 0 1px #2196f3}input:checked+.saswp-slider:before{transform:translateX(15px)}.saswp-slider.saswp-round{border-radius:34px}.saswp-slider.saswp-round:before{border-radius:50%}.saswp-tab-nav{background-color:#f9f9f9;margin-top:0}.saswp-tab-nav li{display:flex;align-items:center;justify-content:space-between;margin-bottom:0}.saswp-tab-nav .selected{width:100.5%;z-index:9999}.saswp-single-post-restore .saswp-switch{height:28px}.saswp-single-post-restore .saswp-slider:before{height:20px}.option-table-class{width:100%}.option-table-class tr td{padding:10px 10px 10px 10px}.option-table-class tr>td{width:30%}.option-table-class tr td:last-child{width:60%}.saswp-custom-fields-table{width:100%}.saswp-custom-fields-table input{width:100%}.saswp-custom-fields-table tr td{padding:10px 10px 10px 10px}.saswp-custom-fields-table td{width:30%;vertical-align:top}.saswp-option-table-class input[type=text],.saswp-option-table-class select{width:100%}.saswp-paywall-table-class input[type=text],.saswp-paywall-table-class select{width:100%}.saswp-email_schema table th{width:auto;padding:0}.saswp-email_schema .saswp-knowledge-label{float:left;clear:both}.saswp-email_schema .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-add-on-plugin label{margin-top:10px}.saswp-add-on-plugin span{width:250px;display:inline-block}.saswp-knowledge-label label[for=saswp_search_box_schema_checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp_breadcrumb_remove_cat_checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-booking-checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-membership-checkbox]{padding-left:10px}.saswp-global-selected{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#000;font-weight:500;margin-bottom:-1px}#saswp-global-tabs a{cursor:pointer}#saswp-global-tabs{padding-left:5px}#saswp-tools-tabs a{cursor:pointer}#saswp-review-tabs a{cursor:pointer}#saswp-tools-tabs{padding-left:5px}.saswp-need-help{padding-left:60px}.saswp-heading{display:inline-flex;align-items:baseline}.saswp-heading h2{margin-bottom:0}.saswp-view-docs a{margin-right:5px!important;margin-top:10px!important;float:right}.saswp-tabs .nav-tab{margin-left:4px}.saswp-panel{padding:7px 18px;background-color:#fff;box-shadow:0 0 20px 1px #d2cccc}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-input-fields select{width:100%}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-str{display:inline-block;width:100%;vertical-align:middle}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700;display:inline-block;vertical-align:middle}.saswp-r5-rng .saswp-rvw-str{display:inline-block;vertical-align:middle;padding-left:10px;width:auto}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px;border-radius:100%}.saswp-premium_features table th,.saswp-services table th{width:auto;padding:0}.saswp-features-blocks{display:inline-grid;grid-template-columns:1fr 1fr;grid-gap:20px}.saswp-features-blocks li{background:#fff;padding:25px;border:1px solid #d8d8d8}.saswp-features-blocks li a{text-decoration:none}.saswp-ele-ic{border-radius:256px;display:inline-block;padding:8px 10px 8px 10px;width:70px;margin-right:20px;height:70px;float:left}.saswp-ele-ic img{width:80%;left:10%;position:relative;top:9%}.saswp-ele-1{background:#96588a}.saswp-ele-2{background:#00a97e}.saswp-ele-3{background:#cacaca}.saswp-ele-4{background:#9c56cc}.saswp-ele-tlt h3{margin:0;font-size:18px;line-height:1.4}.saswp-ele-tlt p{margin-top:10px}.saswp-sts-btn{box-sizing:border-box;height:52px;margin-top:20px;padding:6px 15px;border:1px solid #e5e5e5;border-radius:3px;display:flex;align-items:center;justify-content:space-between}.saswp-d-btn{background:#d2150a;padding:6px 18px;border-radius:30px;font-size:14px;color:#fff}.form-wrap .saswp-sts-txt{font-size:16px;color:#000}.saswp-sts-txt span{color:#bebfc0;padding-left:5px}.saswp_review_platform .saswp-g-plus{float:left}.saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%;margin-top:5px}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px;width:100%}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px;width:25px;height:25px}.saswp-g-plus img{max-width:100%}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px}.saswp-g-review-header div{margin-top:10px}.saswp-upgrade-pro{background:#fff;padding:25px;border:1px solid #d8d8d8;display:inline-block;margin-top:10px;width:100%;box-sizing:border-box}.saswp-upgrade-pro h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:14px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro ul li:before{content:"\f147";background-repeat:no-repeat;font-family:dashicons;position:absolute;color:#46b450;font-size:25px;left:0;line-height:1;top:0}.saswp-upgrade-pro a{background:#d2150a;padding:10px 0;display:block;text-align:center;color:#fff;text-decoration:none;font-size:16px;font-weight:600;letter-spacing:1px;border-radius:5px}.saswp_image_prev{max-width:200px;max-height:200px;float:left;padding-left:2px}.saswp_prev_close{position:relative;width:30px;height:30px;top:12px;font-size:20px;top:-5px;text-decoration:none}.saswp-add-custom-schema-div{margin-top:10px;border-top:1px solid #eee;padding-top:5px}.saswp-nav-menu-list label{padding-left:10px}.saswp-dynamic-properties{border:1px solid #aaa;margin-top:5px;margin-bottom:5px}.saswp-table-close{float:right;cursor:pointer}.saswp-table-create-onajax table td,.saswp-table-create-onajax table th{padding:5px}.saswp-table-create-onajax select{width:98%}.saswp-g-reviews-settings-table input{width:100%}.saswp-s-reviews-settings-table input{width:100%}.saswp_rv_module_pro_notice{border:1px solid #d8d8d8;background:#fff}.saswp-settings-list .saswp-rev-mod{width:100%;display:inline-block;margin-top:20px}.saswp-rev-mod .saswp-knowledge-label{width:100%;display:inline-block;padding:10px 16px;font-weight:600;font-size:16px;color:#333;background:#f9f9f9;border:1px solid #d8d8d8;border-bottom:none;box-sizing:border-box}.saswp-rev-mod .saswp-knowledge-field{width:100%;display:inline-block}.saswp-rev-mod .saswp_rv_module_pro_notice{padding:20px}.saswp_cmpny_lst{width:100%;display:inline-block;margin-top:30px}.saswp_rv_module_pro_notice ul{margin:15px 0 20px 0;width:100%;display:inline-grid;grid-template-columns:1fr 1fr 1fr;grid-gap:20px;border-bottom:1px solid #eee;padding-bottom:20px}.saswp_rv_module_pro_notice ul li{position:relative;font-size:15px;line-height:1.5;color:#444;margin:0}.saswp_rv_module_pro_notice ul li span{padding-left:3px}.saswp_rv_module_pro_notice h2{text-align:center;font-size:31px}.saswp_rv_module_pro_notice .saswp_desc{text-align:center;font-size:18px;font-style:normal;color:#000}.saswp_rv_module_pro_notice .saswp_desc a{font-style:italic}.saswp_rv_module_pro_notice .saswp_lst{color:grey;font-family:georgia;font-style:italic;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice .saswp_avlbl{color:#2a902e;font-family:georgia;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice ul li img{width:20px;height:20px;position:relative;top:4px}.saswp-rev-btn{width:100%;display:inline-block;margin-top:20px;text-align:center}.saswp-rev-btn span{display:block;font-size:13px;margin-bottom:15px}.saswp-rev-btn a{padding:12px 18px;display:inline-block;text-decoration:none;border-radius:5px;background:#0085ba;color:#fff;font-weight:600;font-size:18px}.select2-container{width:100%!important}.saswp-schema-modify-section{margin-top:15px;border-top:1px solid #eee;padding-top:15px}.saswp-custom-meta-list{border:1px solid #aaa;border-radius:4px}.saswp-custom-fields-table tr td:nth-child(3n+3) input{border:1px solid #aaa;border-radius:4px}.updated.notice p{width:100%;align-items:center}.updated.notice .dashicons-thumbs-up{margin-right:10px}a.saswp-feedback-no-thanks,a.saswp-feedback-remindme{cursor:pointer}a.saswp-revws-lnk{display:inline-block;background:#0085ba;padding:12px 20px;color:#fff;text-decoration:none;border-radius:3px;margin-left:20px;font-size:14px;line-height:.6;cursor:pointer}.saswp-update-notice-btns{display:inline-block;width:100%;margin-bottom:5px}.saswp-update-notice-btns ul{list-style:inside;margin:0 10px 20px 20px}.saswp-notice-p{font-size:16px;color:#28672d}.saswp-update-notice-btns li a{text-decoration:underline}.saswp-update-notice-btns li{font-size:14px;font-weight:700;line-height:20px}.saswp-about-contact-page{width:75%;float:right}.saswp-about-contact-page-tooltip{float:left;clear:both}.saswp-quick-setup{float:left}.saswp_add_schema_fields_on_fly{margin-bottom:5px!important}.saswp-custom-fields-table .saswp_image_prev{max-width:62px!important}.saswp-custom-fields-table .saswp_prev_close{font-size:15px}.saswp-review-content-table td:nth-child(2){width:50%;float:left}.saswp-review-content-table input{width:100%}.saswp-review-content-table select{width:100%}.saswp-review-content-table textarea{width:100%}.saswp-social-links-table{width:100%}.saswp-social-links-table input{width:100%}.saswp-add-social-links{margin:3px!important}.saswp-social-links-table td{padding-left:0!important}#saswp-compatibility-tabs a{cursor:pointer}.saswp-add-dynamic-section{padding:0 30px}.saswp-add-dynamic-btn{text-align:center;margin-bottom:10px}.saswp-add-single-rv{margin-left:10px!important}.saswp-dynamic-platforms{display:flex;width:100%}.saswp-dynamic-platforms select{margin-right:10px;width:40%}.saswp-add-rv-btn{font-size:25px;margin-left:-8px;padding-top:15px;cursor:pointer}.saswp-remove-coll-rv{position:absolute;top:2;top:0;right:0}.saswp-rmv-coll-rv{padding:3px;cursor:pointer}.saswp-collection-placement-post{width:-webkit-fill-available}.saswp-collection-placement-post td{vertical-align:top;width:-webkit-fill-available}.saswp-grid-pagination{display:inline-block;padding:20px}.saswp-grid-pagination a{color:#000;float:left;padding:8px 16px;text-decoration:none}.saswp-grid-pagination a.active{background-color:#4caf50;color:#fff}.saswp-grid-pagination a:hover:not(.active){background-color:#ddd}.saswp-collection-body{width:100%;display:flex;flex-wrap:wrap}.saswp-collection-lp{flex:1 0 68%;margin-right:20px;width:68%;background:#fff;border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);padding-bottom:22px}.saswp-collection-settings{flex:1 0 27%;height:100%;width:28%}.saswp-collection-container{margin-top:60px;width:100%;display:inline-block;padding-right:20px;box-sizing:border-box}.saswp-collection-preview-table{width:100%}.saswp-collection-preview-table td{width:30%}.saswp-platform-added-list{display:inline-block;width:100%;margin-top:10px}.saswp-collection-title input{width:96%;padding:3px 8px;font-size:15px;line-height:2;height:1.7em;outline:0;margin:0 0 3px;background-color:#fff;color:#32373c}.saswp-collection-title{margin-bottom:10px;padding:10px;background:#f5f5f5;border-bottom:1px solid #ddd}.saswp-collection-preview{padding:0 30px}.saswp-r1{margin-bottom:50px;text-align:center}.saswp-r1 ul{padding:0;list-style-type:none;display:grid;width:100%;grid-template-columns:1fr 1fr 1fr;grid-gap:15px;margin:0}.saswp-r1 li{padding:20px;position:relative;color:#777;border:1px solid #ededed;background-color:#fafafa;border-radius:4px;margin:0}.saswp-rc{display:flex;width:100%;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;position:relative}.saswp-r1 .saswp-rc-lg{position:absolute;right:-5px}.saswp-r1-aimg img{float:left;max-width:56px;min-height:56px;max-height:56px;border-radius:100px}.saswp-rc-a>img{max-width:56px;min-height:56px;max-height:56px;margin-right:10px;border-radius:100px}.saswp-rc-lg img{width:25px;height:25px;border-radius:100px}.saswp-rc-nm a{text-decoration:none;color:#427fed;font-size:16px;font-weight:600;display:inline-block;line-height:1.1;letter-spacing:0;width:80%;text-align:left}.saswp-rc-dt{margin-top:5px;font-size:12px;line-height:1.2;color:#999;display:block}.saswp-rc-a{flex:1 0 85%;display:flex;justify-content:flex-start}.saswp-rc-nm{width:100%;margin-left:10px;text-align:initial}.saswp_reviewer_image .saswp-rv-img span{vertical-align:top}.saswp-rc-cnt{position:static;height:80px;overflow-y:auto;font-size:14px;line-height:1.6;text-align:left;padding:0 2px 0 0;margin:10px 0 0}.saswp-r2-strs{text-align:center}.saswp-rc-cnt p{margin:0}.saswp-rc-cnt::-webkit-scrollbar{width:4px;display:inline-block}.saswp-rc-cnt::-webkit-scrollbar-thumb{-webkit-border-radius:10px;border-radius:10px;background:#ccc;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.5)}.saswp-rc-cnt::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);-webkit-border-radius:4px;border-radius:4px}.saswp-collection-settings{border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04)}.saswp-collection-settings ul{margin:0;padding:0}.saswp-collection-settings ul li{border-bottom:1px solid #ddd;margin:0;position:relative}.saswp-dp-dsg{display:inline-grid;grid-template-columns:1fr 2fr;width:100%;grid-gap:0 5px;align-items:center;color:#666;padding-bottom:8px}.saswp-dp-dtm{margin-top:13px}.saswp-slider-display{margin-top:15px}.wp-admin .saswp-collection-settings select{margin:0;min-height:30px;max-height:30px;max-width:100%}.saswp-slider-display span{width:30%;display:inline-block}.saswp-collection-settings ul li a{padding:12px 15px;background:#fff;color:#23282d;cursor:pointer;width:100%;border:none;text-align:left;font-size:14px;line-height:1.5;font-weight:600;transition:all .5s ease-in-out 0s;display:block;box-sizing:border-box;position:relative}.saswp-collection-settings ul li input{width:100%}.saswp-collection-settings ul li input[type=checkbox]{width:16px}.saswp-collection-settings ul li a.active,.saswp-collection-settings ul li a:hover{background:#f5f5f5}.saswp-accordion.active+.saswp-accordion-panel{border-top:1px solid #ddd}.saswp-plf-lst-rv-cnt{display:inline-grid;width:100%;flex-wrap:wrap;grid-template-columns:180px 57px 1fr;grid-gap:5px}.saswp-accordion-panel{padding:15px 18px;display:none;background-color:#fff;overflow:hidden;border-top:1px solid #ddd}.saswp-collection-settings a.saswp-add-to-collection{text-align:center;height:30px;font-weight:400;position:relative;top:1px;line-height:27px}.wp-core-ui a.button.saswp-remove-platform{background:0 0;border:none;padding:0;margin-left:6px;min-height:0}.wp-core-ui a.button.saswp-remove-platform:hover{color:#c00}.wp-core-ui a.button.saswp-remove-platform:after{content:"\f153";display:block;font:normal 16px/20px dashicons}.cancel-btn{margin-right:10px;margin-bottom:5px;float:left;display:inline-flex}.wp-admin .saswp-accordion-panel select.saswp-collection-desing{width:100%}.saswp-slider-display.saswp-desing-options{margin-top:10px}.saswp-slider-display.saswp-desing-options span{margin-right:10px;display:inline-block}.saswp-collection-settings li a.saswp-accordion:after{content:"\f140";font:normal 20px/1 dashicons;speak:none;display:block;position:absolute;color:#72777c;top:13px;right:18px}.saswp-collection-settings li a.saswp-accordion.active:after{content:"\f142";top:13px}.saswp-sv-btn{background:#f5f5f5;padding:8px 10px;text-align:right;width:100%;box-sizing:border-box}.saswp-collection-settings .button-primary{width:89px;margin:0;display:inline-block;padding:2px 0}.saswp-collection-shortcode{color:#555;margin-top:10px;padding:4px;background:#f1f1f1;display:inline-block;border:1px solid #ddd;margin-left:75px}.saswp-rd3-warp ul{padding:0;display:grid;grid-template-columns:1fr 1fr 1fr 1fr;grid-gap:30px;list-style-type:none;margin:0;justify-content:center}.saswp-rd3-warp li{box-shadow:0 2px 5px 0 rgba(0,0,0,.26);margin:0}.saswp-rd3-warp li a{text-decoration:none}.saswp-r3-lg{background:#ededed;display:flex;align-items:center;justify-content:center;width:100%;padding:6px 8px;box-sizing:border-box}.saswp-r3-lg span img{width:18px;height:18px;margin-right:10px}.saswp-r3-lg span{line-height:0}.saswp-r3-lg .saswp-r3-tlt{font-size:12px;line-height:1.4;text-transform:uppercase;color:#555;font-weight:400}.saswp-lg{line-height:0}.saswp-r3-rtng{padding:13px 10px 10px 10px;background:#fff;border-radius:0 0 3px 3px;text-align:center}.saswp-r3-rtxt{display:flex;align-items:center;line-height:0;width:100%;margin-bottom:10px;justify-content:center}.saswp-r3-rtxt .saswp-r3-num{color:#23282d;margin-right:5px;font-size:22px;font-weight:500;position:relative;top:2px;word-break:normal}.saswp-rd3-warp .saswp-rvw-str .df-clr,.saswp-rd3-warp .saswp-rvw-str .half-str,.saswp-rd3-warp .saswp-rvw-str .str-ic{display:inline-block;width:22px;height:22px;background-repeat:no-repeat;background-size:22px;margin-right:3px}.saswp-r3-brv{color:#666;font-size:13px;line-height:1}.saswp-r5{position:fixed;bottom:20px;width:calc(100% - 20px);max-width:325px;border-radius:12px;background:#fff;border:1px solid #e6e6e6;box-shadow:0 0 8px 0 rgba(0,0,0,.05);transition:all .3s ease-in;display:none}.saswp-r5 .saswp-rvw-str .df-clr,.saswp-r5 .saswp-rvw-str .half-str,.saswp-r5 .saswp-rvw-str .str-ic{display:inline-block;width:23px;height:20px;background-repeat:no-repeat;background-size:20px}.saswp-r5-r .saswp-r5-rng .saswp-rvw-str{padding-left:0;margin-bottom:3px}.saswp-r5-r{display:flex;flex-wrap:wrap;width:100%;align-items:center;height:80px}.saswp-r5-rng{flex:1 0 60%;padding-left:15px}.saswp-r5-lg{width:80px;height:100%;border-right:1px solid #ddd;box-sizing:border-box;background:linear-gradient(to bottom,#fefefe 0,#f2f2f2 100%);position:relative;display:flex;align-items:center;border-radius:12px 0 0 12px}.saswp-r5-r .saswp-r5-lg span{border-radius:10px 0 0 10px}.saswp-r5-r .saswp-r5-lg img{position:relative;max-width:40px;max-height:40px;left:20PX;border-radius:10px 0 0 10px;top:2px}.saswp-r5-txrng{font-size:12px;line-height:1.2;color:#444;display:flex;margin-bottom:5px}.saswp-r5-txrng span{font-weight:600;color:#666;margin-right:5px}.saswp-r5-rng span.saswp-r5-dt{display:block;font-size:11px;color:#ababab;font-weight:400}.saswp-r5 a{text-decoration:none}.saswp-popup-btn{position:fixed;top:auto;bottom:0;font-family:Arial,sans-serif;z-index:9;box-shadow:0 20px 40px 8px rgba(0,0,0,.25);width:300px;background:#fff;border:none;padding:0}.saswp-open-class.saswp-popup-btn{width:300px}#saswp-reviews-cntn{display:none}#saswp-sticky-review .saswp-open-class #saswp-reviews-cntn{width:100%}.saswp-opn-cls-btn{display:flex;height:50px;justify-content:space-between;align-items:center;background:#fba306;width:100%;padding:0 15px;border-radius:4px 4px 0 0;cursor:pointer;box-sizing:border-box}.saswp-opn-cls-btn svg path{fill:#fff}.saswp-opn-cls-btn span{font-size:15px;font-weight:600;color:#fff}.saswp-onclick-hide,.saswp-onclick-show{display:flex;justify-content:space-between;width:100%}.saswp-r4-info ul{list-style-type:none;padding:0;margin:0;text-align:left;height:350px;overflow-y:scroll}.saswp-r4-info ul li{border-bottom:1px solid #e4e4e4;padding:20px}.saswp-r4-b{display:flex;align-items:center;justify-content:flex-start;width:100%}.saswp-r4-b .saswp-r4-str{margin-right:10px}.saswp-r4-b span.saswp-r4-tx{font-size:14px;color:#444}.saswp-r4-b span.saswp-r4-nm:after{content:"-";display:inline-block;margin:0 10px}.saswp-r4-info .saswp-rvw-str .df-clr,.saswp-r4-info .saswp-rvw-str .half-str,.saswp-r4-info .saswp-rvw-str .str-ic{display:inline-block;width:22px;height:20px;background-repeat:no-repeat;background-size:18px}.saswp-r4-cnt h3{margin:10px 0 8px 0!important;font-size:18px;color:#333;font-weight:500}.saswp-r4-cnt p{font-size:13px;line-height:1.5;margin:0;color:#333}.saswp-r4-info ul li.saswp-r4-r{display:flex;width:100%;align-items:center;text-align:center;justify-content:center;box-sizing:border-box}.saswp-r4-info ul li span.saswp-r4-rnm{margin-left:10px;font-size:18px;color:#666}.btn .saswp-onclick-hide,.btn.saswp-open-class .saswp-onclick-show{display:flex;justify-content:space-between;width:100%}.btn .saswp-onclick-show,.btn.saswp-open-class .saswp-onclick-hide{display:none}span.saswp-mines{line-height:0}.saswp-mines:before{content:"";display:inline-block;width:20px;height:4px;background:#fff;position:relative;top:5px}.saswp-rd2-warp{width:100%;display:inline-block;margin-bottom:50px}.saswp-rd2-warp div{width:350px;margin-right:25px}.saswp-rd2-warp .saswp-rc-cnt{white-space:initial}.saswp-rd2-warp .saswp-r2-b{position:relative;color:#777;border:1px solid #ededed;background-color:#fafafa;border-radius:4px}.saswp-rd2-warp .saswp-rc-cnt{height:150px;margin:20px 20px 20px 40px}.saswp-rd2-warp .saswp-rc{padding:20px}.saswp-r2-b .saswp-r2-s{display:inline-block}.saswp-r2-b .saswp-rc-cnt p{display:inline}.saswp-r2-b .saswp-rc-lg{line-height:0;position:absolute;right:13px;top:13px;background:#fafafa}.saswp-r2-q svg{width:20px;fill:#bbb;position:absolute;height:30px;top:15px;left:12px}.saswp-rd2-warp .saswp-r2-b:before{position:absolute;bottom:-8px;left:35px;display:block;width:14px;height:14px;border:1px solid #ededed;border-top:none;border-left:none;background-color:#fafafa;content:"";-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.carousel-preview{text-align:center}.carousel-preview button{width:12px;height:12px;border-radius:100px;border:none;margin:0 5px;cursor:pointer}.carousel-preview button.saswp-active{background:#427fed}.saswp-cst .saswp-cs{width:100%;max-width:640px;margin:0 auto;overflow:hidden;position:relative}.saswp-r2-b{padding:20px 40px 20px 40px;background-color:#fafafa;position:relative;color:#777;border:1px solid #ededed;border-radius:4px;box-sizing:border-box}.saswp-cst .saswp-rc{padding:20px;box-sizing:border-box}.saswp-si .saswp-r2-b:before{position:absolute;bottom:-8px;left:35px;display:block;width:14px;height:14px;border:1px solid #ededed;border-top:none;border-left:none;background-color:#fafafa;content:"";-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.saswp-si .saswp-rc-cnt{margin:0}.saswp-cs .saswp-slider-controls{width:100%;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;z-index:9;position:relative;top:10px}.saswp-slider-controls a.saswp-slider-prev-btn{position:absolute;left:10px;bottom:0;background:rgba(0,0,0,.5);line-height:0;border-radius:100px;width:30px;height:30px}.saswp-slider-controls a.saswp-slider-prev-btn:before{content:"";display:inline-block;width:6px;height:6px;border:2px solid #fff;border-top:none;border-left:none;transform:rotate(135deg);position:relative;top:11px;left:12px}.saswp-slider-controls a.saswp-slider-next-btn{position:absolute;right:10px;bottom:0;background:rgba(0,0,0,.5);line-height:0;border-radius:100px;width:30px;height:30px}.saswp-slider-controls a.saswp-slider-next-btn:after{content:"";display:inline-block;width:6px;height:6px;border:2px solid #fff;border-top:none;border-left:none;transform:rotate(135deg);transform:rotate(-45deg);position:relative;top:11px;right:-9px}.saswp-si .saswp-rc-lg img{width:25px;height:25px}.saswp-cs .saswp-slider-dots .saswp-dot{width:10px;height:10px;background:#ccc;transition:.15s ease-in-out;border-radius:8px;cursor:pointer;margin:0 12px}.saswp-cs .saswp-slider-dots .saswp-dot.saswp-active{background:#0071a1}.saswp-cst .saswp-sic .saswp-si{width:100vw;max-width:640px;display:block}.spinner.saswp-spinner{float:none;margin:0 auto;display:block}.saswp-cct .saswp-cs{width:100%;max-width:800px;margin:0 auto;overflow:hidden;position:relative}.saswp-cct .saswp-sic .saswp-si{width:100%;max-width:800px;display:flex}.saswp-cct .saswp-r2-sli{width:100%;margin-right:20px;max-width:40%}.saswp-cct .saswp-rc{padding:20px 10px;box-sizing:border-box}.saswp-cct .saswp-rc-cnt{height:120px}.saswp-cs .saswp-sic{display:flex;flex-wrap:wrap;height:auto;transition:transform .35s ease-in-out}.saswp-cs .saswp-slider-controls a{color:#333;text-decoration:none;transition:.15s ease-in-out}.saswp-cs .saswp-slider-controls a:hover{color:#888}.saswp-cs .saswp-slider-dots{width:100%;display:flex;justify-content:center;margin:0 auto;position:relative;top:-10px}.saswp-onclick-show{display:none}.saswp-dp-dsg.saswp_hide{display:none}@media(max-width:1200px){.saswp-plf-lst-rv-cnt{grid-template-columns:1fr}}@media(max-width:767px){.saswp-collection-lp{flex:1 0 100%;margin-right:0;width:100%}.saswp-collection-settings{flex:1 0 100%;height:100%;width:100%}.wp-admin .saswp-collection-settings select{max-width:100%}}.saswp-upgrade-pro h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:14px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro a{background:#d2150a;padding:10px 0;display:block;text-align:center;color:#fff;text-decoration:none;font-size:16px;font-weight:600;letter-spacing:1px;border-radius:5px}.saswp-settings-second-div .saswp-upgrade-pro.promo-cpn{display:block}.saswp-upgrade-pro.promo-cpn{border:1px solid #558b2f}.saswp-hide{display:none}.saswp-settings-second-div .saswp-upgrade-pro.promo-cpn{display:block;margin:0}.saswp-upgrade-pro.promo-cpn{border:1px solid #558b2f;border-radius:8px}.saswp-upgrade-pro.promo-cpn h2{color:#2e7d32;font-size:24px;text-align:center;margin:0 0 20px 0}.saswp-upgrade-pro.promo-cpn span{text-align:center;font-size:14px;display:inline-block;color:#777;padding:0 20px;box-sizing:border-box;line-height:1.4;font-weight:400}.saswp-promo{font-size:20px;margin-top:15px;width:100%;text-align:center}.saswp-upgrade-pro.promo-cpn .prm-txt{display:block;line-height:1}.saswp-upgrade-pro.promo-cpn .saswp-promo .prm-cpn{border:1px dashed #1b5e20;border-radius:100px;margin-top:5px;color:#388e3c;font-size:20px;padding:2px 15px 2px 15px}.saswp-upgrade-pro a{background:#43a047}.saswp-upgrade-pro{border-radius:8px}.saswp-settings-second-div a{text-decoration:none}.saswp-thick-box-container{width:580px}#saswp-add-rv-manual{padding:10px}#saswp-add-rv-automatic,#saswp-add-rv-collection{padding:10px;box-sizing:border-box;width:100%;overflow-y:scroll;height:260px}.saswp-add-collection-loop,.saswp-add-rv-loop{padding-bottom:10px}.saswp-add-rv-title{padding:10px}.close-attached-reviews-popup{float:right;margin-right:20px!important}.saswp-add-rv-note{padding-bottom:10px}.saswp-accept-rv-container{margin-right:20px}.saswp-post-specific-setting{border-bottom:1px solid #eee;text-align:center;padding-bottom:10px}.saswp-ps-text{padding:20px 5px}.saswp-ps-text span{font-weight:600}.saswp-ps-toggle{padding:10px}.saswp-stars-post-table td{padding:2px}.saswp-modify-schema-on-taxonomy td{background:#fff}.saswp-modify-schema-on-taxonomy .form-table th{width:auto!important}.saswp-modify-schema-on-taxonomy #saswp_specific_custom textarea{width:100%!important}.saswp-modify-schema-on-taxonomy .form-table fieldset input[type=text]{width:75%!important}.saswp-modify-schema-on-taxonomy .form-table fieldset input[type=button]{width:24%!important}
admin_section/fields-generator.php CHANGED
@@ -20,9 +20,9 @@ class saswp_fields_generator {
20
  array(
21
  "image" => "/admin_section/images/reviews_platform_icon/google-1-img.png",
22
  "name" => "Google Reviews"),
23
- array(
24
- "image" => "/admin_section/images/reviews_platform_icon/google-1-img.png",
25
- "name" => "Google Shopping Reviews"),
26
  array(
27
  "image" => "/admin_section/images/reviews_platform_icon/shopper-approved-img.png",
28
  "name" => "Shopper Approved"),
20
  array(
21
  "image" => "/admin_section/images/reviews_platform_icon/google-1-img.png",
22
  "name" => "Google Reviews"),
23
+ array(
24
+ "image" => "/admin_section/images/reviews_platform_icon/google-1-img.png",
25
+ "name" => "Google Shopping Reviews"),
26
  array(
27
  "image" => "/admin_section/images/reviews_platform_icon/shopper-approved-img.png",
28
  "name" => "Shopper Approved"),
admin_section/js/collection-front.js CHANGED
@@ -175,6 +175,27 @@ jQuery(document).ready(function($){
175
 
176
  });
177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  $(".saswp-grid-wpr .saswp-grid-page").on("click", function(e){
179
  e.preventDefault();
180
 
@@ -185,7 +206,7 @@ jQuery(document).ready(function($){
185
  }
186
 
187
  var data_id = $(this).attr('data-id');
188
-
189
  $('.saswp-r1 li').addClass('saswp_grid_dp_none');
190
  $('.saswp-r1 li[data-id="'+data_id+'"]').removeClass('saswp_grid_dp_none');
191
 
175
 
176
  });
177
 
178
+
179
+ function saswp_show_page(page){
180
+
181
+ $(".saswp-grid-page").hide();
182
+ $(".saswp-pagination-first-last").show();
183
+
184
+ var min = (parseInt(page) - 3);
185
+ var max = (parseInt(page) + 3);
186
+
187
+ $(".saswp-grid-wpr a").each(function(n) {
188
+
189
+ if (n > min && n < max){
190
+ $(this).show();
191
+ }
192
+
193
+ });
194
+
195
+ }
196
+
197
+ saswp_show_page(1);
198
+
199
  $(".saswp-grid-wpr .saswp-grid-page").on("click", function(e){
200
  e.preventDefault();
201
 
206
  }
207
 
208
  var data_id = $(this).attr('data-id');
209
+ saswp_show_page(data_id);
210
  $('.saswp-r1 li').addClass('saswp_grid_dp_none');
211
  $('.saswp-r1 li[data-id="'+data_id+'"]').removeClass('saswp_grid_dp_none');
212
 
admin_section/js/collection-front.min.js CHANGED
@@ -1 +1 @@
1
- function saswpCollectionSlider(){jQuery(".saswp-cs").each(function(){var s=jQuery(this),a=s.find(".saswp-sic");function e(){var s=0;jQuery(a).find(".saswp-si").each(function(){s+=jQuery(this).outerWidth()}),a.width(s)}function n(){if(jQuery(".saswp-si.saswp-active").length>0){var s=a.find(".saswp-si.saswp-active").offset().left-a.offset().left;a.css({transform:"translate( -"+s+"px, 0px)"})}}0==a.find(".saswp-si.saswp-active").length&&a.find(".saswp-si").first().addClass("saswp-active"),e(),n(),function(){var e=a.find(".saswp-si.saswp-active").index(),n=a.find(".saswp-si").length;for(i=0;i<n;i++)s.find(".saswp-sd").append("<div class='saswp-dot'></div>");s.find(".saswp-sd").find(".saswp-dot").eq(e).addClass("saswp-active")}(),jQuery(window).load(function(){e(),n()}),jQuery(window).resize(function(){e(),n()});var t=s.find(".saswp-slider-controls").find(".saswp-slider-next-btn"),d=s.find(".saswp-slider-controls").find(".saswp-slider-prev-btn");t.on("click",function(i){i.preventDefault(),function(){var i=a.find(".saswp-si.saswp-active").index(),e=0;e=i+1>a.find(".saswp-si").length-1?0:i+1;var n=a.find(".saswp-si").eq(e),t=a.offset().left,d=n.offset().left-t;a.find(".saswp-si.saswp-active").removeClass("saswp-active"),n.addClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").eq(e).addClass("saswp-active"),a.css({transform:"translate( -"+d+"px, 0px)"})}()}),d.on("click",function(i){i.preventDefault(),function(){var i=a.find(".saswp-si.saswp-active").index(),e=a.find(".saswp-si").length,n=0;n=i-1<0?e-1:i-1;var t=a.find(".saswp-si").eq(n),d=a.offset().left,p=t.offset().left-d;a.find(".saswp-si.saswp-active").removeClass("saswp-active"),t.addClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").eq(n).addClass("saswp-active"),a.css({transform:"translate( -"+p+"px, 0px)"})}()}),s.find(".saswp-sd").find(".saswp-dot").on("click",function(i){var e=jQuery(this).index(),n=a.find(".saswp-si").eq(e).offset().left-a.offset().left;a.find(".saswp-si.saswp-active").removeClass("saswp-active"),a.find(".saswp-si").eq(e).addClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").removeClass("saswp-active"),jQuery(this).addClass("saswp-active"),a.css({transform:"translate( -"+n+"px, 0px)"})})})}jQuery(document).ready(function(s){saswpCollectionSlider();var a=jQuery("#saswp_fomo_interval").val(),i=s(".saswp-r5"),e=1;!function n(t){e>i.length-1&&(e=0);s(t).fadeIn(300).delay(1e3*a).fadeOut(300,function(){n(i[e++])})}(i[0]),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").hide(),s(".saswp-onclick-hide").css("display","flex"),s(".saswp-open-class").css("width","300px"))}),s(".saswp-grid-wpr .saswp-grid-page").on("click",function(a){a.preventDefault(),s(".saswp-grid-page").removeClass("active"),s(this).hasClass("active")||s(this).addClass("active");var i=s(this).attr("data-id");s(".saswp-r1 li").addClass("saswp_grid_dp_none"),s('.saswp-r1 li[data-id="'+i+'"]').removeClass("saswp_grid_dp_none")})});
1
+ function saswpCollectionSlider(){jQuery(".saswp-cs").each(function(){var s=jQuery(this),a=s.find(".saswp-sic");function e(){var s=0;jQuery(a).find(".saswp-si").each(function(){s+=jQuery(this).outerWidth()}),a.width(s)}function n(){if(jQuery(".saswp-si.saswp-active").length>0){var s=a.find(".saswp-si.saswp-active").offset().left-a.offset().left;a.css({transform:"translate( -"+s+"px, 0px)"})}}0==a.find(".saswp-si.saswp-active").length&&a.find(".saswp-si").first().addClass("saswp-active"),e(),n(),function(){var e=a.find(".saswp-si.saswp-active").index(),n=a.find(".saswp-si").length;for(i=0;i<n;i++)s.find(".saswp-sd").append("<div class='saswp-dot'></div>");s.find(".saswp-sd").find(".saswp-dot").eq(e).addClass("saswp-active")}(),jQuery(window).load(function(){e(),n()}),jQuery(window).resize(function(){e(),n()});var t=s.find(".saswp-slider-controls").find(".saswp-slider-next-btn"),d=s.find(".saswp-slider-controls").find(".saswp-slider-prev-btn");t.on("click",function(i){i.preventDefault(),function(){var i=a.find(".saswp-si.saswp-active").index(),e=0;e=i+1>a.find(".saswp-si").length-1?0:i+1;var n=a.find(".saswp-si").eq(e),t=a.offset().left,d=n.offset().left-t;a.find(".saswp-si.saswp-active").removeClass("saswp-active"),n.addClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").eq(e).addClass("saswp-active"),a.css({transform:"translate( -"+d+"px, 0px)"})}()}),d.on("click",function(i){i.preventDefault(),function(){var i=a.find(".saswp-si.saswp-active").index(),e=a.find(".saswp-si").length,n=0;n=i-1<0?e-1:i-1;var t=a.find(".saswp-si").eq(n),d=a.offset().left,p=t.offset().left-d;a.find(".saswp-si.saswp-active").removeClass("saswp-active"),t.addClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").eq(n).addClass("saswp-active"),a.css({transform:"translate( -"+p+"px, 0px)"})}()}),s.find(".saswp-sd").find(".saswp-dot").on("click",function(i){var e=jQuery(this).index(),n=a.find(".saswp-si").eq(e).offset().left-a.offset().left;a.find(".saswp-si.saswp-active").removeClass("saswp-active"),a.find(".saswp-si").eq(e).addClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").removeClass("saswp-active"),jQuery(this).addClass("saswp-active"),a.css({transform:"translate( -"+n+"px, 0px)"})})})}jQuery(document).ready(function(s){saswpCollectionSlider();var a=jQuery("#saswp_fomo_interval").val(),i=s(".saswp-r5"),e=1;function n(a){s(".saswp-grid-page").hide(),s(".saswp-pagination-first-last").show();var i=parseInt(a)-3,e=parseInt(a)+3;s(".saswp-grid-wpr a").each(function(a){a>i&&a<e&&s(this).show()})}!function n(t){e>i.length-1&&(e=0);s(t).fadeIn(300).delay(1e3*a).fadeOut(300,function(){n(i[e++])})}(i[0]),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").hide(),s(".saswp-onclick-hide").css("display","flex"),s(".saswp-open-class").css("width","300px"))}),n(1),s(".saswp-grid-wpr .saswp-grid-page").on("click",function(a){a.preventDefault(),s(".saswp-grid-page").removeClass("active"),s(this).hasClass("active")||s(this).addClass("active");var i=s(this).attr("data-id");n(i),s(".saswp-r1 li").addClass("saswp_grid_dp_none"),s('.saswp-r1 li[data-id="'+i+'"]').removeClass("saswp_grid_dp_none")})});
admin_section/js/functions-list.js CHANGED
@@ -1102,7 +1102,8 @@
1102
  }
1103
 
1104
  }
1105
-
 
1106
  function saswp_create_collection_grid(cols, pagination, perpage, offset, nextpage){
1107
 
1108
  var html = '';
@@ -1183,12 +1184,21 @@
1183
  html += '<div class="saswp-grid-pagination">';
1184
  html += '<a class="saswp-grid-page" data-id="1" href="#">&laquo;</a>';
1185
 
 
 
 
1186
  for(var i=1; i <= page_count; i++){
 
 
 
 
 
 
1187
 
1188
  if(i == saswp_grid_page){
1189
- html += '<a class="active saswp-grid-page" data-id="'+i+'" href="#">'+i+'</a>';
1190
  }else{
1191
- html += '<a class="saswp-grid-page" data-id="'+i+'" href="#">'+i+'</a>';
1192
  }
1193
 
1194
  }
@@ -1204,6 +1214,7 @@
1204
  }
1205
  jQuery(".saswp-collection-preview").html('');
1206
  jQuery(".saswp-collection-preview").append(html);
 
1207
 
1208
  }
1209
 
1102
  }
1103
 
1104
  }
1105
+
1106
+
1107
  function saswp_create_collection_grid(cols, pagination, perpage, offset, nextpage){
1108
 
1109
  var html = '';
1184
  html += '<div class="saswp-grid-pagination">';
1185
  html += '<a class="saswp-grid-page" data-id="1" href="#">&laquo;</a>';
1186
 
1187
+ var min = (parseInt(saswp_grid_page) - 3);
1188
+ var max = (parseInt(saswp_grid_page) + 3);
1189
+
1190
  for(var i=1; i <= page_count; i++){
1191
+
1192
+ var hide_class = 'saswp_hide';
1193
+
1194
+ if (i > min && i < max){
1195
+ hide_class = '';
1196
+ }
1197
 
1198
  if(i == saswp_grid_page){
1199
+ html += '<a class="active saswp-grid-page '+hide_class+'" data-id="'+i+'" href="#">'+i+'</a>';
1200
  }else{
1201
+ html += '<a class="saswp-grid-page '+hide_class+'" data-id="'+i+'" href="#">'+i+'</a>';
1202
  }
1203
 
1204
  }
1214
  }
1215
  jQuery(".saswp-collection-preview").html('');
1216
  jQuery(".saswp-collection-preview").append(html);
1217
+
1218
 
1219
  }
1220
 
admin_section/js/functions-list.min.js CHANGED
@@ -1 +1 @@
1
- var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[],saswp_taxonomy_term=[],saswp_collection=[],saswp_total_collection=[],saswp_total_reviews=[],saswp_coll_json=null,saswp_grid_page=1;function saswp_convert_datetostring(s){var e={};if(s){var a=new Date(s),t=a.getDate(),i=a.getMonth();i+=1;var n=a.getFullYear(),p=a.toLocaleDateString(),r=jQuery(".saswp-collection-date-format").val();r&&"Y-m-d"==r&&(p=n+"-"+i+"-"+t),r&&"d-m-Y"==r&&(p=t+"-"+i+"-"+n),e={time:a.toLocaleTimeString(),date:p}}else e={time:"",date:""};return e}function saswp_taxonomy_term_html(s,e){var a="";return a+="<td>",a+='<select name="saswp_taxonomy_term['+e+']">',jQuery.each(s,function(s,e){a+='<option value="'+s+'">'+e+"</option>"}),a+="</select>",a+="</td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'}function saswp_enable_rating_review(){var s="";jQuery("select#schema_type option:selected").val()&&(s=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&jQuery(".saswp-enable-rating-review-"+s.toLowerCase()).change(function(){jQuery(this).is(":checked")?jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).show():jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).hide()}).change()}function getParameterByName(s,e){e||(e=window.location.href),s=s.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+s+"(=([^&#]*)|&|#|$)").exec(e);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswpCustomSelect2(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||!jQuery(".saswp-custom-fields-select2").length||jQuery(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(s){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:s.term,action:"saswp_get_custom_meta_fields"}},processResults:function(s){return{results:s}},cache:!0},minimumInputLength:2})}function saswp_reviews_datepicker(){jQuery(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_timepicker(){jQuery(".saswp-timepicker").timepicker({timeFormat:"H:i:s"})}function saswp_item_reviewed_ajax(s,e,a=null){var t=e.val(),i=saswp_localize_data.post_id,n=jQuery(e).attr("data-id"),p=jQuery(e).attr("post-specific"),r=jQuery(".saswp_modify_this_schema_hidden_"+n).val();append_id=null==a?jQuery("#saswp_specific_"+n):jQuery(".saswp-manual-modification"),jQuery.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",modify_this:r,schema_type:s,schema_id:n,post_specific:p,item:t,post_id:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){jQuery(append_id).find(".saswp-table-create-onajax").remove();var e=jQuery(append_id).find(".saswp-table-create-onload");jQuery.each(e,function(s,e){0!=s&&jQuery(this).remove()}),jQuery(append_id).append(s),saswp_schema_datepicker(),saswp_schema_timepicker()})}function saswp_item_reviewed_call(){jQuery(".saswp-item-reviewed").change(function(s){s.preventDefault();var e="";(jQuery("select#schema_type option:selected").val()&&(e=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(e=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===e)&&saswp_item_reviewed_ajax(e,jQuery(this))}).change()}function saswp_compatibliy_notes(s,e){var a=e.replace("-checkbox",""),t=jQuery("#"+a).next("p").text();s.is(":checked")&&""!==t?jQuery("#"+a).next("p").removeClass("saswp_hide"):1==jQuery("#"+a).next("p").attr("data-id")?jQuery("#"+a).next("p").text("This feature is only available in pro version"):jQuery("#"+a).next("p").addClass("saswp_hide")}function saswp_meta_list_html(s,e,a,t,i,n){var p=t;null==p&&(p=Object.keys(a)[0]);var r="";if(r+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+p+']">',jQuery.each(e,function(s,e){r+='<optgroup label="'+e.label+'">',jQuery.each(e["meta-list"],function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),r+="</optgroup>"}),r+="</select>",a){var l=jQuery("select#schema_type option:selected").val(),c="";"Review"==l&&(c=jQuery("select.saswp-item-reivewed-list option:selected").val());var o="<tr>";o+="<td>",o+='<select class="saswp-custom-fields-name">',"Review"==l&&(o+='<optgroup label="Review">',o+='<option value="saswp_review_name">Review Name</option>',o+='<option value="saswp_review_description">Review Description</option>',o+='<option value="saswp_review_author">Review Author</option>',o+='<option value="saswp_review_author_url">Review Author Profile URL</option>',o+='<option value="saswp_review_publisher">Review Publisher</option>',o+='<option value="saswp_review_publisher_url">Review Publisher URL</option>',o+='<option value="saswp_review_rating_value">Review Rating Value</option>',o+='<option value="saswp_review_date_published">Review Published Date</option>',o+='<option value="saswp_review_date_modified">Review Modified Date</option>',o+='<option value="saswp_review_url">Review URL</option>',o+="</optgroup>"),"Review"==l&&(o+='<optgroup label="'+c+'">'),jQuery.each(a,function(s,e){o+='<option value="'+s+'">'+e+"</option>"}),"Review"==l&&(o+="</optgroup>"),o+="</select>",o+="</td>",o+="<td>",o+=r,o+="</td>",o+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',o+="</tr>",jQuery(".saswp-custom-fields-table").append(o),null!=s&&s.removeClass("updating-message")}else jQuery(i).html(r),null!=s&&s.removeClass("updating-message")}function saswp_get_meta_list(s,e,a,t,i,n){saswp_meta_list[e]?saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(p){saswp_meta_list[e]=p[e],saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n)},"json")}function saswp_get_post_specific_schema_fields(s,e,a,t,i,n,p){if(saswp_meta_fields[n]){var r=saswp_fields_html_generator(e,i,n,t,saswp_meta_fields[n]);r&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(r),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",schema_id:i,schema_type:p,meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[n]=a;var p=saswp_fields_html_generator(e,i,n,t,a);p&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(p),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(s,e,a,t,i){var n="";return n+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+s+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var p="";switch((i.name.indexOf("published_date")>-1||i.name.indexOf("date_created")>-1||i.name.indexOf("created_date")>-1||i.name.indexOf("modified_date")>-1||i.name.indexOf("date_published")>-1||i.name.indexOf("date_modified")>-1)&&(p="saswp-datepicker-picker"),i.type){case"number":case"text":n+="<tr><th>"+i.label+'</th><td><input class="'+p+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']"></td></tr>';break;case"textarea":n+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var r="";jQuery.each(i.options,function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),n+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']">'+r+"</select></td></tr>";break;case"media":n+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+s+"_"+e+'" name="'+i.name+"_"+s+"_"+e+'"><input type="hidden" data-id="'+i.name+"_"+s+"_"+e+'_id" name="'+a+e+"["+s+"]["+i.name+'_id]" id="'+i.name+"_"+s+"_"+e+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+s+"_"+e+'_button" name="'+i.name+"_"+s+"_"+e+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+s+"_"+e+'"></div></fieldset></td></tr>'}}),n+="</table></div>"}function saswp_create_total_collection(){var s="";for(var e in saswp_total_collection=[],saswp_collection)saswp_collection[e]&&(jQuery.each(saswp_collection[e],function(s,e){rmv_boolean?e.is_remove=!0:e.is_remove=!1,saswp_total_collection.push(e)}),s+=saswp_function_added_platform(e,saswp_collection[e].length));jQuery(".saswp-platform-added-list").html(""),jQuery(".saswp-platform-added-list").append(s)}function saswp_create_rating_html_by_value(s){var e="";e+='<div class="saswp-rvw-str">';for(var a=0;a<5;a++)if(s>a){var t=s.split(".");t[1]?a<t[0]?e+='<span class="str-ic"></span>':e+='<span class="half-str"></span>':e+='<span class="str-ic"></span>'}else e+='<span class="df-clr"></span>';return e+="</div>"}function saswpChunkArray(s,e){for(var a=JSON.parse(JSON.stringify(s)),t=[];a.length;)t.push(a.splice(0,e));return t}function saswp_function_added_platform(s,e){var a="";return e>0&&(a+='<div class="cancel-btn">',a+="<span>"+jQuery("#saswp-plaftorm-list option[value="+s+"]").text()+"</span><span>("+e+")</span>",a+='<input type="hidden" name="saswp_platform_ids['+s+']" value="'+e+'">',a+='<a platform-id="'+s+'" class="button button-default saswp-remove-platform"></a>',a+="</div>"),a}function saswpCollectionSlider(){jQuery(".saswp-cs").each(function(){var s=jQuery(this),e=s.find(".saswp-sic");function a(){var s=0;jQuery(e).find(".saswp-si").each(function(){s+=jQuery(this).outerWidth()}),e.width(s)}function t(){if(jQuery(".saswp-si.saswp-active").length>0){var s=e.find(".saswp-si.saswp-active").offset().left-e.offset().left;e.css({transform:"translate( -"+s+"px, 0px)"})}}0==e.find(".saswp-si.saswp-active").length&&e.find(".saswp-si").first().addClass("saswp-active"),a(),t(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length;for(i=0;i<t;i++)s.find(".saswp-slider-dots").append("<div class='saswp-dot'></div>");s.find(".saswp-slider-dots").find(".saswp-dot").eq(a).addClass("saswp-active")}(),jQuery(document).ready(function(){a(),t()}),jQuery(window).resize(function(){a(),t()});var n=s.find(".saswp-slider-controls").find(".saswp-slider-next-btn"),p=s.find(".saswp-slider-controls").find(".saswp-slider-prev-btn");n.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=0;t=a+1>e.find(".saswp-si").length-1?0:a+1;var i=e.find(".saswp-si").eq(t),n=e.offset().left,p=i.offset().left-n;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),i.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(t).addClass("saswp-active"),e.css({transform:"translate( -"+p+"px, 0px)"})}()}),p.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length,i=0;i=a-1<0?t-1:a-1;var n=e.find(".saswp-si").eq(i),p=e.offset().left,r=n.offset().left-p;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),n.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(i).addClass("saswp-active"),e.css({transform:"translate( -"+r+"px, 0px)"})}()}),s.find(".saswp-slider-dots").find(".saswp-dot").on("click",function(a){var t=jQuery(this).index(),i=e.find(".saswp-si").eq(t).offset().left-e.offset().left;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),e.find(".saswp-si").eq(t).addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),jQuery(this).addClass("saswp-active"),e.css({transform:"translate( -"+i+"px, 0px)"})})})}function saswp_review_desing_for_slider(s){var e=saswp_convert_datetostring(s.saswp_review_date),a="";return a+='<div class="saswp-r2-sli">',a+='<div class="saswp-r2-b">',a+='<div class="saswp-r2-q">',a+='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="95.333px" height="95.332px" viewBox="0 0 95.333 95.332" style="enable-background:new 0 0 95.333 95.332;" xml:space="preserve"><path d="M30.512,43.939c-2.348-0.676-4.696-1.019-6.98-1.019c-3.527,0-6.47,0.806-8.752,1.793 c2.2-8.054,7.485-21.951,18.013-23.516c0.975-0.145,1.774-0.85,2.04-1.799l2.301-8.23c0.194-0.696,0.079-1.441-0.318-2.045 s-1.035-1.007-1.75-1.105c-0.777-0.106-1.569-0.16-2.354-0.16c-12.637,0-25.152,13.19-30.433,32.076 c-3.1,11.08-4.009,27.738,3.627,38.223c4.273,5.867,10.507,9,18.529,9.313c0.033,0.001,0.065,0.002,0.098,0.002 c9.898,0,18.675-6.666,21.345-16.209c1.595-5.705,0.874-11.688-2.032-16.851C40.971,49.307,36.236,45.586,30.512,43.939z"></path><path d="M92.471,54.413c-2.875-5.106-7.61-8.827-13.334-10.474c-2.348-0.676-4.696-1.019-6.979-1.019 c-3.527,0-6.471,0.806-8.753,1.793c2.2-8.054,7.485-21.951,18.014-23.516c0.975-0.145,1.773-0.85,2.04-1.799l2.301-8.23 c0.194-0.696,0.079-1.441-0.318-2.045c-0.396-0.604-1.034-1.007-1.75-1.105c-0.776-0.106-1.568-0.16-2.354-0.16 c-12.637,0-25.152,13.19-30.434,32.076c-3.099,11.08-4.008,27.738,3.629,38.225c4.272,5.866,10.507,9,18.528,9.312 c0.033,0.001,0.065,0.002,0.099,0.002c9.897,0,18.675-6.666,21.345-16.209C96.098,65.559,95.376,59.575,92.471,54.413z"></path></svg>',a+="</div>",a+='<div class="saswp-rc-cnt">',a+="<p>",a+=s.saswp_review_text,a+="</p>",a+="</div>",a+='<div class="saswp-r2-strs">',a+='<span class="saswp-r2-s">',a+=saswp_create_rating_html_by_value(s.saswp_review_rating),a+="</span>",a+="</div>",a+="</div>",a+='<div class="saswp-rc">',a+='<div class="saswp-rc-a">',a+='<img src="'+s.saswp_reviewer_image+'"/>',a+='<div class="saswp-rc-nm">',a+='<a href="#">'+s.saswp_reviewer_name+"</a>",a+='<span class="saswp-rc-dt">'+e.date+"</span>",a+="</div>",a+='<div class="saswp-rc-lg">',a+='<img src="'+s.saswp_review_platform_icon+'"/>',a+="</div>",a+="</div>",a+="</div>",a+="</div>"}function saswp_create_collection_slider(s,e,a){var t="";if(saswp_total_collection.length>0){if(t+="slider"==s?'<div class="saswp-cst">':'<div class="saswp-cct">',t+='<div class="saswp-cs">',t+='<div class="saswp-sic">',"slider"==s&&jQuery.each(saswp_total_collection,function(s,e){t+='<div class="saswp-si">',t+=saswp_review_desing_for_slider(e),t+="</div>"}),"carousel"==s){var i=saswpChunkArray(saswp_total_collection,3);i&&jQuery.each(i,function(s,e){t+='<div class="saswp-si">',jQuery.each(e,function(s,e){t+=saswp_review_desing_for_slider(e)}),t+="</div>"})}t+="</div>",e&&(t+='<div class="saswp-slider-controls">',t+='<a href="#" class="saswp-slider-prev-btn"></a>',t+='<a href="#" class="saswp-slider-next-btn"></a>',t+="</div>"),a&&(t+='<div class="saswp-slider-dots">',t+="</div>"),t+="</div>",t+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(t),saswpCollectionSlider()}function saswp_create_collection_badge(){var s="";if(saswp_total_collection.length>0){for(var e in s+='<div class="saswp-rd3-warp">',s+="<ul>",saswp_collection){var a="",t="",i=0,n=0,p=1,r="";jQuery.each(saswp_collection[e],function(s,e){r=e.saswp_review_location_id,a=e.saswp_review_platform_icon,"Self"==(t=e.saswp_review_platform_name)&&(t=saswp_localize_data.trans_self),n+=parseFloat(e.saswp_review_rating),i++}),n>0&&(p=n/i),saswp_collection[e]&&(s+="<li>",s+='<a target="_blank" href="'+r+'">',s+='<div class="saswp-r3-lg">',s+="<span>",s+='<img src="'+a+'"/>',s+="</span>",s+='<span class="saswp-r3-tlt">'+t+'</span">',s+="</div>",s+='<div class="saswp-r3-rtng">',s+='<div class="saswp-r3-rtxt">',s+='<span class="saswp-r3-num">',s+=p.toFixed(1),s+="</span>",s+='<span class="saswp-stars">',s+=saswp_create_rating_html_by_value(p.toString()),s+="</span>",s+="</div>",s+='<span class="saswp-r3-brv">',s+=saswp_localize_data.trans_based_on+" "+i+" "+saswp_localize_data.trans_reviews,s+="</span>",s+="</div>",s+="</a>",s+="</li>")}s+="</ul>",s+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_popup(){var s="",e="";if(saswp_total_collection.length>0){var a=0,t=0,i=1;jQuery.each(saswp_total_collection,function(s,i){platform_icon=i.saswp_review_platform_icon,t+=parseFloat(i.saswp_review_rating),a++;var n=saswp_convert_datetostring(i.saswp_review_date);e+="<li>",e+='<div class="saswp-r4-b">',e+='<span class="saswp-r4-str">',e+=saswp_create_rating_html_by_value(i.saswp_review_rating),e+="</span>",e+='<span class="saswp-r4-tx">'+n.date+"</span>",e+="</div>",e+='<div class="saswp-r4-cnt">',e+="<h3>"+i.saswp_reviewer_name+"</h3>",e+="<p>"+i.saswp_review_text+"</p>",e+="</div>",e+="</li>"}),t>0&&(i=t/a),a>0&&(s+='<div id="saswp-sticky-review">',s+='<div class="saswp-open-class saswp-popup-btn">',s+='<div class="saswp-opn-cls-btn">',s+='<div class="saswp-onclick-hide">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</div>",s+='<div class="saswp-onclick-show">',s+="<span>Ratings and reviews</span>",s+='<span class="saswp-mines"></span>',s+="</div>",s+="</div>",s+='<div id="saswp-reviews-cntn">',s+='<div class="saswp-r4-info">',s+="<ul>",s+='<li class="saswp-r4-r">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</li>",s+=e,s+="</ul>",s+="</div>",s+="</div>",s+="</div>",s+="</div>")}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_fomo(s,e){var a="";saswp_total_collection.length>0&&jQuery.each(saswp_total_collection,function(s,e){var t=saswp_convert_datetostring(e.saswp_review_date);a+='<div id="'+s+'" class="saswp-r5">',a+='<div class="saswp-r5-r">',a+='<div class="saswp-r5-lg">',a+="<span>",a+='<img height="70" width="70" src="'+e.saswp_review_platform_icon+'"/>',a+="</span>",a+="</div>",a+='<div class="saswp-r5-rng">',a+=saswp_create_rating_html_by_value(e.saswp_review_rating),a+='<div class="saswp-r5-txrng">',a+="<span>"+e.saswp_review_rating+" Stars</span>",a+="<span>by</span>",a+="<span>"+e.saswp_reviewer_name+"</span>",a+="</div>",a+='<span class="saswp-r5-dt">'+t.date+"</span>",a+="</div>",a+="</div>",a+="</div>"}),jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(a),saswp_fomo_slide(s,e)}function saswp_fomo_slide(s,e){var a=jQuery(".saswp-collection-preview .saswp-r5"),t=a.length,i=0;!function s(){a.eq(i%t).fadeIn(6e3,function(){a.eq(i%t).fadeOut(3e3,s),i++})}()}function saswp_collection_sorting(s){if(saswp_total_collection.length>0)switch(s){case"lowest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating});break;case"highest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating}),saswp_total_collection.reverse();break;case"newest":case"recent":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)}),saswp_total_collection.reverse();break;case"oldest":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)});break;case"random":saswp_total_collection.sort(function(s,e){return.5-Math.random()})}}function saswp_collection_total_reviews_id(){if(saswp_total_collection.length>0){saswp_total_reviews=[],jQuery.each(saswp_total_collection,function(s,e){saswp_total_reviews.push(e.saswp_review_id)});var s='<input type="hidden" id="saswp_total_reviews_list" name="saswp_total_reviews" value="'+JSON.stringify(saswp_total_reviews)+'">';jQuery(".saswp-total-reviews-list").html(""),jQuery(".saswp-total-reviews-list").append(s)}}function saswp_create_collection_grid(s,e,a,t,i){var n="",p="",r=0;if(saswp_total_collection.length>0){r=Math.ceil(saswp_total_collection.length/a),n+='<div class="saswp-r1">';for(var l=1;l<=s;l++)p+=" 1fr";if(s.length>3?n+='<ul style="grid-template-columns:'+p+';overflow-y: scroll;">':n+='<ul style="grid-template-columns:'+p+';overflow-y:hidden;">',saswp_total_collection){var c=saswp_total_collection;e&&a>0&&(c=c.slice(t,i)),jQuery.each(c,function(s,e){var a=saswp_convert_datetostring(e.saswp_review_date);n+="<li>",n+='<div class="saswp-rc">',n+='<div class="saswp-rc-a">',n+='<div class="saswp-r1-aimg">',n+='<img src="'+e.saswp_reviewer_image+'" width="56" height="56"/>',n+="</div>",n+='<div class="saswp-rc-nm">',n+='<a href="#">'+e.saswp_reviewer_name+"</a>",n+=saswp_create_rating_html_by_value(e.saswp_review_rating),a.date&&(n+='<span class="saswp-rc-dt">'+a.date+"</span>"),n+="</div>",n+="</div>",n+='<div class="saswp-rc-lg">',n+='<img src="'+e.saswp_review_platform_icon+'"/>',n+="</div>",n+="</div>",n+='<div class="saswp-rc-cnt">',n+="<p>"+e.saswp_review_text+"</p>",n+="</div>",e.is_remove&&(n+='<span platform-id="'+e.saswp_review_platform+'" data-id="'+e.saswp_review_id+'" class="dashicons dashicons-remove saswp-remove-coll-rv"></span>'),n+="</li>"})}if(n+="</ul>",r>0&&e){n+='<div class="saswp-grid-pagination">',n+='<a class="saswp-grid-page" data-id="1" href="#">&laquo;</a>';for(l=1;l<=r;l++)n+=l==saswp_grid_page?'<a class="active saswp-grid-page" data-id="'+l+'" href="#">'+l+"</a>":'<a class="saswp-grid-page" data-id="'+l+'" href="#">'+l+"</a>";n+='<a class="saswp-grid-page" data-id="'+r+'" href="#">&raquo;</a>',n+="</div>"}n+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(n)}function saswp_create_collection_by_design(s,e,a,t,i,n,p,r,l,c,o){switch(s){case"grid":saswp_create_collection_grid(e,r,l,c,o);break;case"gallery":saswp_create_collection_slider(a,t,i);break;case"badge":saswp_create_collection_badge();break;case"popup":saswp_create_collection_popup();break;case"fomo":saswp_create_collection_fomo(n,p)}}function saswp_on_collection_design_change(){var s=jQuery(".saswp-collection-sorting").val(),e=jQuery(".saswp-collection-desing").val(),a=jQuery("#saswp-collection-cols").val(),t=jQuery(".saswp-slider-type").val(),i=jQuery("#saswp_fomo_interval").val(),n=parseInt(jQuery("#saswp-coll-per-page").val()),p=!1,r=0,l=n;if(jQuery("#saswp-coll-pagination").is(":checked")){p=!0;saswp_grid_page>0&&(l=saswp_grid_page*n),r=l-n}if(jQuery("#saswp_gallery_arrow").is(":checked"))var c=!0;else c=!1;if(jQuery("#saswp_gallery_dots").is(":checked"))var o=!0;else o=!1;saswp_create_total_collection(),saswp_collection_sorting(s),saswp_collection_total_reviews_id(),saswp_create_collection_by_design(e,a,t,c,o,i,i,p,n,r,l)}function saswp_get_collection_data(s,e,a=null,t=null,i=null){jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:s,reviews_ids:i,review_id:t,platform_id:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s.status&&(jQuery.each(s.message,function(s,e){var a=JSON.parse(e.saswp_review_platform),t=[];if(t.push(e),void 0===saswp_collection[a])saswp_collection[a]=t;else{var i=[...new Set([...saswp_collection[a],...t])];saswp_collection[a]=i}}),saswp_on_collection_design_change()),a&&a.removeClass("updating-message")},"json")}function saswpIsEmail(s){return/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(s)}function saswp_select2(){var s=jQuery(".saswp-select2");s.length>0&&jQuery(s).each(function(s,e){var a=jQuery(this),t=jQuery("option[value]:not([selected])",a),i=[];t.each(function(){var s=jQuery(this);i.push({id:s.attr("value"),text:s.text()})});var n=a.attr("data-type"),p=ajaxurl+"?action=saswp_get_select2_data&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&type="+n;a.select2({ajax:{url:p,delay:250,cache:!1},minimumInputLength:2,minimumResultsForSearch:50,dataAdapter:jQuery.fn.select2.amd.require("select2/data/extended-ajax"),defaultResults:i})})}
1
+ var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[],saswp_taxonomy_term=[],saswp_collection=[],saswp_total_collection=[],saswp_total_reviews=[],saswp_coll_json=null,saswp_grid_page=1;function saswp_convert_datetostring(s){var e={};if(s){var a=new Date(s),t=a.getDate(),i=a.getMonth();i+=1;var n=a.getFullYear(),p=a.toLocaleDateString(),r=jQuery(".saswp-collection-date-format").val();r&&"Y-m-d"==r&&(p=n+"-"+i+"-"+t),r&&"d-m-Y"==r&&(p=t+"-"+i+"-"+n),e={time:a.toLocaleTimeString(),date:p}}else e={time:"",date:""};return e}function saswp_taxonomy_term_html(s,e){var a="";return a+="<td>",a+='<select name="saswp_taxonomy_term['+e+']">',jQuery.each(s,function(s,e){a+='<option value="'+s+'">'+e+"</option>"}),a+="</select>",a+="</td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'}function saswp_enable_rating_review(){var s="";jQuery("select#schema_type option:selected").val()&&(s=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&jQuery(".saswp-enable-rating-review-"+s.toLowerCase()).change(function(){jQuery(this).is(":checked")?jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).show():jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).hide()}).change()}function getParameterByName(s,e){e||(e=window.location.href),s=s.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+s+"(=([^&#]*)|&|#|$)").exec(e);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswpCustomSelect2(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||!jQuery(".saswp-custom-fields-select2").length||jQuery(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(s){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:s.term,action:"saswp_get_custom_meta_fields"}},processResults:function(s){return{results:s}},cache:!0},minimumInputLength:2})}function saswp_reviews_datepicker(){jQuery(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_timepicker(){jQuery(".saswp-timepicker").timepicker({timeFormat:"H:i:s"})}function saswp_item_reviewed_ajax(s,e,a=null){var t=e.val(),i=saswp_localize_data.post_id,n=jQuery(e).attr("data-id"),p=jQuery(e).attr("post-specific"),r=jQuery(".saswp_modify_this_schema_hidden_"+n).val();append_id=null==a?jQuery("#saswp_specific_"+n):jQuery(".saswp-manual-modification"),jQuery.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",modify_this:r,schema_type:s,schema_id:n,post_specific:p,item:t,post_id:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){jQuery(append_id).find(".saswp-table-create-onajax").remove();var e=jQuery(append_id).find(".saswp-table-create-onload");jQuery.each(e,function(s,e){0!=s&&jQuery(this).remove()}),jQuery(append_id).append(s),saswp_schema_datepicker(),saswp_schema_timepicker()})}function saswp_item_reviewed_call(){jQuery(".saswp-item-reviewed").change(function(s){s.preventDefault();var e="";(jQuery("select#schema_type option:selected").val()&&(e=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(e=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===e)&&saswp_item_reviewed_ajax(e,jQuery(this))}).change()}function saswp_compatibliy_notes(s,e){var a=e.replace("-checkbox",""),t=jQuery("#"+a).next("p").text();s.is(":checked")&&""!==t?jQuery("#"+a).next("p").removeClass("saswp_hide"):1==jQuery("#"+a).next("p").attr("data-id")?jQuery("#"+a).next("p").text("This feature is only available in pro version"):jQuery("#"+a).next("p").addClass("saswp_hide")}function saswp_meta_list_html(s,e,a,t,i,n){var p=t;null==p&&(p=Object.keys(a)[0]);var r="";if(r+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+p+']">',jQuery.each(e,function(s,e){r+='<optgroup label="'+e.label+'">',jQuery.each(e["meta-list"],function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),r+="</optgroup>"}),r+="</select>",a){var l=jQuery("select#schema_type option:selected").val(),c="";"Review"==l&&(c=jQuery("select.saswp-item-reivewed-list option:selected").val());var o="<tr>";o+="<td>",o+='<select class="saswp-custom-fields-name">',"Review"==l&&(o+='<optgroup label="Review">',o+='<option value="saswp_review_name">Review Name</option>',o+='<option value="saswp_review_description">Review Description</option>',o+='<option value="saswp_review_author">Review Author</option>',o+='<option value="saswp_review_author_url">Review Author Profile URL</option>',o+='<option value="saswp_review_publisher">Review Publisher</option>',o+='<option value="saswp_review_publisher_url">Review Publisher URL</option>',o+='<option value="saswp_review_rating_value">Review Rating Value</option>',o+='<option value="saswp_review_date_published">Review Published Date</option>',o+='<option value="saswp_review_date_modified">Review Modified Date</option>',o+='<option value="saswp_review_url">Review URL</option>',o+="</optgroup>"),"Review"==l&&(o+='<optgroup label="'+c+'">'),jQuery.each(a,function(s,e){o+='<option value="'+s+'">'+e+"</option>"}),"Review"==l&&(o+="</optgroup>"),o+="</select>",o+="</td>",o+="<td>",o+=r,o+="</td>",o+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',o+="</tr>",jQuery(".saswp-custom-fields-table").append(o),null!=s&&s.removeClass("updating-message")}else jQuery(i).html(r),null!=s&&s.removeClass("updating-message")}function saswp_get_meta_list(s,e,a,t,i,n){saswp_meta_list[e]?saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(p){saswp_meta_list[e]=p[e],saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n)},"json")}function saswp_get_post_specific_schema_fields(s,e,a,t,i,n,p){if(saswp_meta_fields[n]){var r=saswp_fields_html_generator(e,i,n,t,saswp_meta_fields[n]);r&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(r),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",schema_id:i,schema_type:p,meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[n]=a;var p=saswp_fields_html_generator(e,i,n,t,a);p&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(p),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(s,e,a,t,i){var n="";return n+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+s+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var p="";switch((i.name.indexOf("published_date")>-1||i.name.indexOf("date_created")>-1||i.name.indexOf("created_date")>-1||i.name.indexOf("modified_date")>-1||i.name.indexOf("date_published")>-1||i.name.indexOf("date_modified")>-1)&&(p="saswp-datepicker-picker"),i.type){case"number":case"text":n+="<tr><th>"+i.label+'</th><td><input class="'+p+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']"></td></tr>';break;case"textarea":n+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var r="";jQuery.each(i.options,function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),n+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']">'+r+"</select></td></tr>";break;case"media":n+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+s+"_"+e+'" name="'+i.name+"_"+s+"_"+e+'"><input type="hidden" data-id="'+i.name+"_"+s+"_"+e+'_id" name="'+a+e+"["+s+"]["+i.name+'_id]" id="'+i.name+"_"+s+"_"+e+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+s+"_"+e+'_button" name="'+i.name+"_"+s+"_"+e+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+s+"_"+e+'"></div></fieldset></td></tr>'}}),n+="</table></div>"}function saswp_create_total_collection(){var s="";for(var e in saswp_total_collection=[],saswp_collection)saswp_collection[e]&&(jQuery.each(saswp_collection[e],function(s,e){rmv_boolean?e.is_remove=!0:e.is_remove=!1,saswp_total_collection.push(e)}),s+=saswp_function_added_platform(e,saswp_collection[e].length));jQuery(".saswp-platform-added-list").html(""),jQuery(".saswp-platform-added-list").append(s)}function saswp_create_rating_html_by_value(s){var e="";e+='<div class="saswp-rvw-str">';for(var a=0;a<5;a++)if(s>a){var t=s.split(".");t[1]?a<t[0]?e+='<span class="str-ic"></span>':e+='<span class="half-str"></span>':e+='<span class="str-ic"></span>'}else e+='<span class="df-clr"></span>';return e+="</div>"}function saswpChunkArray(s,e){for(var a=JSON.parse(JSON.stringify(s)),t=[];a.length;)t.push(a.splice(0,e));return t}function saswp_function_added_platform(s,e){var a="";return e>0&&(a+='<div class="cancel-btn">',a+="<span>"+jQuery("#saswp-plaftorm-list option[value="+s+"]").text()+"</span><span>("+e+")</span>",a+='<input type="hidden" name="saswp_platform_ids['+s+']" value="'+e+'">',a+='<a platform-id="'+s+'" class="button button-default saswp-remove-platform"></a>',a+="</div>"),a}function saswpCollectionSlider(){jQuery(".saswp-cs").each(function(){var s=jQuery(this),e=s.find(".saswp-sic");function a(){var s=0;jQuery(e).find(".saswp-si").each(function(){s+=jQuery(this).outerWidth()}),e.width(s)}function t(){if(jQuery(".saswp-si.saswp-active").length>0){var s=e.find(".saswp-si.saswp-active").offset().left-e.offset().left;e.css({transform:"translate( -"+s+"px, 0px)"})}}0==e.find(".saswp-si.saswp-active").length&&e.find(".saswp-si").first().addClass("saswp-active"),a(),t(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length;for(i=0;i<t;i++)s.find(".saswp-slider-dots").append("<div class='saswp-dot'></div>");s.find(".saswp-slider-dots").find(".saswp-dot").eq(a).addClass("saswp-active")}(),jQuery(document).ready(function(){a(),t()}),jQuery(window).resize(function(){a(),t()});var n=s.find(".saswp-slider-controls").find(".saswp-slider-next-btn"),p=s.find(".saswp-slider-controls").find(".saswp-slider-prev-btn");n.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=0;t=a+1>e.find(".saswp-si").length-1?0:a+1;var i=e.find(".saswp-si").eq(t),n=e.offset().left,p=i.offset().left-n;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),i.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(t).addClass("saswp-active"),e.css({transform:"translate( -"+p+"px, 0px)"})}()}),p.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length,i=0;i=a-1<0?t-1:a-1;var n=e.find(".saswp-si").eq(i),p=e.offset().left,r=n.offset().left-p;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),n.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(i).addClass("saswp-active"),e.css({transform:"translate( -"+r+"px, 0px)"})}()}),s.find(".saswp-slider-dots").find(".saswp-dot").on("click",function(a){var t=jQuery(this).index(),i=e.find(".saswp-si").eq(t).offset().left-e.offset().left;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),e.find(".saswp-si").eq(t).addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),jQuery(this).addClass("saswp-active"),e.css({transform:"translate( -"+i+"px, 0px)"})})})}function saswp_review_desing_for_slider(s){var e=saswp_convert_datetostring(s.saswp_review_date),a="";return a+='<div class="saswp-r2-sli">',a+='<div class="saswp-r2-b">',a+='<div class="saswp-r2-q">',a+='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="95.333px" height="95.332px" viewBox="0 0 95.333 95.332" style="enable-background:new 0 0 95.333 95.332;" xml:space="preserve"><path d="M30.512,43.939c-2.348-0.676-4.696-1.019-6.98-1.019c-3.527,0-6.47,0.806-8.752,1.793 c2.2-8.054,7.485-21.951,18.013-23.516c0.975-0.145,1.774-0.85,2.04-1.799l2.301-8.23c0.194-0.696,0.079-1.441-0.318-2.045 s-1.035-1.007-1.75-1.105c-0.777-0.106-1.569-0.16-2.354-0.16c-12.637,0-25.152,13.19-30.433,32.076 c-3.1,11.08-4.009,27.738,3.627,38.223c4.273,5.867,10.507,9,18.529,9.313c0.033,0.001,0.065,0.002,0.098,0.002 c9.898,0,18.675-6.666,21.345-16.209c1.595-5.705,0.874-11.688-2.032-16.851C40.971,49.307,36.236,45.586,30.512,43.939z"></path><path d="M92.471,54.413c-2.875-5.106-7.61-8.827-13.334-10.474c-2.348-0.676-4.696-1.019-6.979-1.019 c-3.527,0-6.471,0.806-8.753,1.793c2.2-8.054,7.485-21.951,18.014-23.516c0.975-0.145,1.773-0.85,2.04-1.799l2.301-8.23 c0.194-0.696,0.079-1.441-0.318-2.045c-0.396-0.604-1.034-1.007-1.75-1.105c-0.776-0.106-1.568-0.16-2.354-0.16 c-12.637,0-25.152,13.19-30.434,32.076c-3.099,11.08-4.008,27.738,3.629,38.225c4.272,5.866,10.507,9,18.528,9.312 c0.033,0.001,0.065,0.002,0.099,0.002c9.897,0,18.675-6.666,21.345-16.209C96.098,65.559,95.376,59.575,92.471,54.413z"></path></svg>',a+="</div>",a+='<div class="saswp-rc-cnt">',a+="<p>",a+=s.saswp_review_text,a+="</p>",a+="</div>",a+='<div class="saswp-r2-strs">',a+='<span class="saswp-r2-s">',a+=saswp_create_rating_html_by_value(s.saswp_review_rating),a+="</span>",a+="</div>",a+="</div>",a+='<div class="saswp-rc">',a+='<div class="saswp-rc-a">',a+='<img src="'+s.saswp_reviewer_image+'"/>',a+='<div class="saswp-rc-nm">',a+='<a href="#">'+s.saswp_reviewer_name+"</a>",a+='<span class="saswp-rc-dt">'+e.date+"</span>",a+="</div>",a+='<div class="saswp-rc-lg">',a+='<img src="'+s.saswp_review_platform_icon+'"/>',a+="</div>",a+="</div>",a+="</div>",a+="</div>"}function saswp_create_collection_slider(s,e,a){var t="";if(saswp_total_collection.length>0){if(t+="slider"==s?'<div class="saswp-cst">':'<div class="saswp-cct">',t+='<div class="saswp-cs">',t+='<div class="saswp-sic">',"slider"==s&&jQuery.each(saswp_total_collection,function(s,e){t+='<div class="saswp-si">',t+=saswp_review_desing_for_slider(e),t+="</div>"}),"carousel"==s){var i=saswpChunkArray(saswp_total_collection,3);i&&jQuery.each(i,function(s,e){t+='<div class="saswp-si">',jQuery.each(e,function(s,e){t+=saswp_review_desing_for_slider(e)}),t+="</div>"})}t+="</div>",e&&(t+='<div class="saswp-slider-controls">',t+='<a href="#" class="saswp-slider-prev-btn"></a>',t+='<a href="#" class="saswp-slider-next-btn"></a>',t+="</div>"),a&&(t+='<div class="saswp-slider-dots">',t+="</div>"),t+="</div>",t+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(t),saswpCollectionSlider()}function saswp_create_collection_badge(){var s="";if(saswp_total_collection.length>0){for(var e in s+='<div class="saswp-rd3-warp">',s+="<ul>",saswp_collection){var a="",t="",i=0,n=0,p=1,r="";jQuery.each(saswp_collection[e],function(s,e){r=e.saswp_review_location_id,a=e.saswp_review_platform_icon,"Self"==(t=e.saswp_review_platform_name)&&(t=saswp_localize_data.trans_self),n+=parseFloat(e.saswp_review_rating),i++}),n>0&&(p=n/i),saswp_collection[e]&&(s+="<li>",s+='<a target="_blank" href="'+r+'">',s+='<div class="saswp-r3-lg">',s+="<span>",s+='<img src="'+a+'"/>',s+="</span>",s+='<span class="saswp-r3-tlt">'+t+'</span">',s+="</div>",s+='<div class="saswp-r3-rtng">',s+='<div class="saswp-r3-rtxt">',s+='<span class="saswp-r3-num">',s+=p.toFixed(1),s+="</span>",s+='<span class="saswp-stars">',s+=saswp_create_rating_html_by_value(p.toString()),s+="</span>",s+="</div>",s+='<span class="saswp-r3-brv">',s+=saswp_localize_data.trans_based_on+" "+i+" "+saswp_localize_data.trans_reviews,s+="</span>",s+="</div>",s+="</a>",s+="</li>")}s+="</ul>",s+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_popup(){var s="",e="";if(saswp_total_collection.length>0){var a=0,t=0,i=1;jQuery.each(saswp_total_collection,function(s,i){platform_icon=i.saswp_review_platform_icon,t+=parseFloat(i.saswp_review_rating),a++;var n=saswp_convert_datetostring(i.saswp_review_date);e+="<li>",e+='<div class="saswp-r4-b">',e+='<span class="saswp-r4-str">',e+=saswp_create_rating_html_by_value(i.saswp_review_rating),e+="</span>",e+='<span class="saswp-r4-tx">'+n.date+"</span>",e+="</div>",e+='<div class="saswp-r4-cnt">',e+="<h3>"+i.saswp_reviewer_name+"</h3>",e+="<p>"+i.saswp_review_text+"</p>",e+="</div>",e+="</li>"}),t>0&&(i=t/a),a>0&&(s+='<div id="saswp-sticky-review">',s+='<div class="saswp-open-class saswp-popup-btn">',s+='<div class="saswp-opn-cls-btn">',s+='<div class="saswp-onclick-hide">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</div>",s+='<div class="saswp-onclick-show">',s+="<span>Ratings and reviews</span>",s+='<span class="saswp-mines"></span>',s+="</div>",s+="</div>",s+='<div id="saswp-reviews-cntn">',s+='<div class="saswp-r4-info">',s+="<ul>",s+='<li class="saswp-r4-r">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</li>",s+=e,s+="</ul>",s+="</div>",s+="</div>",s+="</div>",s+="</div>")}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_fomo(s,e){var a="";saswp_total_collection.length>0&&jQuery.each(saswp_total_collection,function(s,e){var t=saswp_convert_datetostring(e.saswp_review_date);a+='<div id="'+s+'" class="saswp-r5">',a+='<div class="saswp-r5-r">',a+='<div class="saswp-r5-lg">',a+="<span>",a+='<img height="70" width="70" src="'+e.saswp_review_platform_icon+'"/>',a+="</span>",a+="</div>",a+='<div class="saswp-r5-rng">',a+=saswp_create_rating_html_by_value(e.saswp_review_rating),a+='<div class="saswp-r5-txrng">',a+="<span>"+e.saswp_review_rating+" Stars</span>",a+="<span>by</span>",a+="<span>"+e.saswp_reviewer_name+"</span>",a+="</div>",a+='<span class="saswp-r5-dt">'+t.date+"</span>",a+="</div>",a+="</div>",a+="</div>"}),jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(a),saswp_fomo_slide(s,e)}function saswp_fomo_slide(s,e){var a=jQuery(".saswp-collection-preview .saswp-r5"),t=a.length,i=0;!function s(){a.eq(i%t).fadeIn(6e3,function(){a.eq(i%t).fadeOut(3e3,s),i++})}()}function saswp_collection_sorting(s){if(saswp_total_collection.length>0)switch(s){case"lowest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating});break;case"highest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating}),saswp_total_collection.reverse();break;case"newest":case"recent":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)}),saswp_total_collection.reverse();break;case"oldest":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)});break;case"random":saswp_total_collection.sort(function(s,e){return.5-Math.random()})}}function saswp_collection_total_reviews_id(){if(saswp_total_collection.length>0){saswp_total_reviews=[],jQuery.each(saswp_total_collection,function(s,e){saswp_total_reviews.push(e.saswp_review_id)});var s='<input type="hidden" id="saswp_total_reviews_list" name="saswp_total_reviews" value="'+JSON.stringify(saswp_total_reviews)+'">';jQuery(".saswp-total-reviews-list").html(""),jQuery(".saswp-total-reviews-list").append(s)}}function saswp_create_collection_grid(s,e,a,t,i){var n="",p="",r=0;if(saswp_total_collection.length>0){r=Math.ceil(saswp_total_collection.length/a),n+='<div class="saswp-r1">';for(var l=1;l<=s;l++)p+=" 1fr";if(s.length>3?n+='<ul style="grid-template-columns:'+p+';overflow-y: scroll;">':n+='<ul style="grid-template-columns:'+p+';overflow-y:hidden;">',saswp_total_collection){var c=saswp_total_collection;e&&a>0&&(c=c.slice(t,i)),jQuery.each(c,function(s,e){var a=saswp_convert_datetostring(e.saswp_review_date);n+="<li>",n+='<div class="saswp-rc">',n+='<div class="saswp-rc-a">',n+='<div class="saswp-r1-aimg">',n+='<img src="'+e.saswp_reviewer_image+'" width="56" height="56"/>',n+="</div>",n+='<div class="saswp-rc-nm">',n+='<a href="#">'+e.saswp_reviewer_name+"</a>",n+=saswp_create_rating_html_by_value(e.saswp_review_rating),a.date&&(n+='<span class="saswp-rc-dt">'+a.date+"</span>"),n+="</div>",n+="</div>",n+='<div class="saswp-rc-lg">',n+='<img src="'+e.saswp_review_platform_icon+'"/>',n+="</div>",n+="</div>",n+='<div class="saswp-rc-cnt">',n+="<p>"+e.saswp_review_text+"</p>",n+="</div>",e.is_remove&&(n+='<span platform-id="'+e.saswp_review_platform+'" data-id="'+e.saswp_review_id+'" class="dashicons dashicons-remove saswp-remove-coll-rv"></span>'),n+="</li>"})}if(n+="</ul>",r>0&&e){n+='<div class="saswp-grid-pagination">',n+='<a class="saswp-grid-page" data-id="1" href="#">&laquo;</a>';var o=parseInt(saswp_grid_page)-3,_=parseInt(saswp_grid_page)+3;for(l=1;l<=r;l++){var w="saswp_hide";l>o&&l<_&&(w=""),n+=l==saswp_grid_page?'<a class="active saswp-grid-page '+w+'" data-id="'+l+'" href="#">'+l+"</a>":'<a class="saswp-grid-page '+w+'" data-id="'+l+'" href="#">'+l+"</a>"}n+='<a class="saswp-grid-page" data-id="'+r+'" href="#">&raquo;</a>',n+="</div>"}n+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(n)}function saswp_create_collection_by_design(s,e,a,t,i,n,p,r,l,c,o){switch(s){case"grid":saswp_create_collection_grid(e,r,l,c,o);break;case"gallery":saswp_create_collection_slider(a,t,i);break;case"badge":saswp_create_collection_badge();break;case"popup":saswp_create_collection_popup();break;case"fomo":saswp_create_collection_fomo(n,p)}}function saswp_on_collection_design_change(){var s=jQuery(".saswp-collection-sorting").val(),e=jQuery(".saswp-collection-desing").val(),a=jQuery("#saswp-collection-cols").val(),t=jQuery(".saswp-slider-type").val(),i=jQuery("#saswp_fomo_interval").val(),n=parseInt(jQuery("#saswp-coll-per-page").val()),p=!1,r=0,l=n;if(jQuery("#saswp-coll-pagination").is(":checked")){p=!0;saswp_grid_page>0&&(l=saswp_grid_page*n),r=l-n}if(jQuery("#saswp_gallery_arrow").is(":checked"))var c=!0;else c=!1;if(jQuery("#saswp_gallery_dots").is(":checked"))var o=!0;else o=!1;saswp_create_total_collection(),saswp_collection_sorting(s),saswp_collection_total_reviews_id(),saswp_create_collection_by_design(e,a,t,c,o,i,i,p,n,r,l)}function saswp_get_collection_data(s,e,a=null,t=null,i=null){jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:s,reviews_ids:i,review_id:t,platform_id:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s.status&&(jQuery.each(s.message,function(s,e){var a=JSON.parse(e.saswp_review_platform),t=[];if(t.push(e),void 0===saswp_collection[a])saswp_collection[a]=t;else{var i=[...new Set([...saswp_collection[a],...t])];saswp_collection[a]=i}}),saswp_on_collection_design_change()),a&&a.removeClass("updating-message")},"json")}function saswpIsEmail(s){return/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(s)}function saswp_select2(){var s=jQuery(".saswp-select2");s.length>0&&jQuery(s).each(function(s,e){var a=jQuery(this),t=jQuery("option[value]:not([selected])",a),i=[];t.each(function(){var s=jQuery(this);i.push({id:s.attr("value"),text:s.text()})});var n=a.attr("data-type"),p=ajaxurl+"?action=saswp_get_select2_data&saswp_security_nonce="+saswp_localize_data.saswp_security_nonce+"&type="+n;a.select2({ajax:{url:p,delay:250,cache:!1},minimumInputLength:2,minimumResultsForSearch:50,dataAdapter:jQuery.fn.select2.amd.require("select2/data/extended-ajax"),defaultResults:i})})}
admin_section/js/main-script.js CHANGED
@@ -4,6 +4,16 @@ var rmv_boolean = false;
4
  var rmv_html = '';
5
  jQuery(document).ready(function($){
6
 
 
 
 
 
 
 
 
 
 
 
7
  function saswp_get_collection_condition_list_ajax(condition){
8
 
9
  if(condition){
@@ -597,8 +607,9 @@ jQuery(document).ready(function($){
597
  }else{
598
  $(".saswp-enable-markup-class").parent().parent().hide();
599
  }
600
-
601
  if(schematype == 'local_business'){
 
602
  $(".saswp-option-table-class tr").eq(1).show();
603
  $(".saswp-business-text-field-tr").show();
604
  $(".saswp-option-table-class tr").find('select').attr('disabled', false);
@@ -710,11 +721,12 @@ jQuery(document).ready(function($){
710
  }else{
711
  $(".saswp-enable-markup-class").parent().parent().hide();
712
  }
713
-
714
  if(schematype == 'local_business'){
715
  $(".saswp-"+businesstype+'-tr').show();
716
  $(".saswp-business-text-field-tr").show();
717
- $(".saswp-"+businesstype+'-tr').find('select').attr('disabled', false);
 
718
  }
719
 
720
  if(schematype == 'Review'){
@@ -3345,7 +3357,7 @@ jQuery(document).ready(function($){
3345
 
3346
  $(document).on("click", ".saswp-grid-page", function(e){
3347
  e.preventDefault();
3348
- saswp_grid_page = $(this).attr('data-id');
3349
  saswp_on_collection_design_change();
3350
  });
3351
 
@@ -3467,8 +3479,7 @@ jQuery(document).ready(function($){
3467
 
3468
  saswp_get_collection_data(null, null, null, null, reviews_list);
3469
 
3470
- }
3471
-
3472
  //Collection js ends here
3473
 
3474
 
4
  var rmv_html = '';
5
  jQuery(document).ready(function($){
6
 
7
+ $(document).on("click", '#saswp_loc_display_on_front', function(){
8
+
9
+ if( $(this).is(":checked") ){
10
+ $(".saswp-front-location-inst").removeClass('saswp_hide');
11
+ }else{
12
+ $(".saswp-front-location-inst").addClass('saswp_hide');
13
+ }
14
+
15
+ });
16
+
17
  function saswp_get_collection_condition_list_ajax(condition){
18
 
19
  if(condition){
607
  }else{
608
  $(".saswp-enable-markup-class").parent().parent().hide();
609
  }
610
+ $("#saswp_location_meta_box").addClass('saswp_hide');
611
  if(schematype == 'local_business'){
612
+ $("#saswp_location_meta_box").removeClass('saswp_hide');
613
  $(".saswp-option-table-class tr").eq(1).show();
614
  $(".saswp-business-text-field-tr").show();
615
  $(".saswp-option-table-class tr").find('select').attr('disabled', false);
721
  }else{
722
  $(".saswp-enable-markup-class").parent().parent().hide();
723
  }
724
+ $("#saswp_location_meta_box").addClass('saswp_hide');
725
  if(schematype == 'local_business'){
726
  $(".saswp-"+businesstype+'-tr').show();
727
  $(".saswp-business-text-field-tr").show();
728
+ $(".saswp-"+businesstype+'-tr').find('select').attr('disabled', false);
729
+ $("#saswp_location_meta_box").removeClass('saswp_hide');
730
  }
731
 
732
  if(schematype == 'Review'){
3357
 
3358
  $(document).on("click", ".saswp-grid-page", function(e){
3359
  e.preventDefault();
3360
+ saswp_grid_page = $(this).attr('data-id');
3361
  saswp_on_collection_design_change();
3362
  });
3363
 
3479
 
3480
  saswp_get_collection_data(null, null, null, null, reviews_list);
3481
 
3482
+ }
 
3483
  //Collection js ends here
3484
 
3485
 
admin_section/js/main-script.min.js CHANGED
@@ -1 +1 @@
1
- var saswp_attached_rv=[],saswp_attached_col=[],rmv_boolean=!1,rmv_html="";jQuery(document).ready(function(s){if(s(document).on("change",".saswp-collection-where",function(){s(this);var a=s(this).val();a&&function(a){a&&s.ajax({url:ajaxurl,method:"GET",data:{action:"saswp_get_select2_data",type:a,q:"",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},beforeSend:function(){},success:function(a){if(a){var e="";s.each(a,function(s,a){e+='<option value="'+a.id+'">'+a.text+"</option>"}),s(".saswp-collection-where-data").html(""),s(".saswp-collection-where-data").append(e),saswp_select2()}},error:function(s){console.log("Failed Ajax Request"),console.log(s)}})}(a)}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?(s(".saswp-coll-where").addClass("saswp_hide"),s("#saswp-motivatebox").css("display","block")):(s(".saswp-coll-where").removeClass("saswp_hide"),s("#saswp-motivatebox").css("display","none"))}).change(),s(document).on("click",".saswp-dismiss-notices",function(){var 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,c="";t>0&&(c+=t+" Reviews, "),i>0&&(c+=i+" Collection"),c||(c=0),s(".saswp-attached-rv-count").text("Attached "+c),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(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(),c=s("#saswp_google_place_api_key").val(),p=s("#reviews_addon_license_key").val(),o=s("#reviews_addon_license_key_status").val();if("premium"==(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&&(p||c)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:o,reviews_api:p,location:t,blocks:i,g_api:c,premium_status: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),""==c&&alert(saswp_localize_data.translable_txt.enter_api_key),""==p&&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()}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(),"VideoObject"==e?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").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(),"VideoObject"==e?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").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-ryviu-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ryviu").val(1):s("#saswp-ryviu").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_remove_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_remove_cat").val(1):s("#saswp_breadcrumb_remove_cat").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?(s("#saswp_breadcrumb_schema").val(1),s("#saswp_breadcrumb_remove_cat").parent().parent().show()):(s("#saswp_breadcrumb_schema").val(0),s("#saswp_breadcrumb_remove_cat").parent().parent().hide());break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s(this).parent().parent().next().removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(this).parent().parent().next().addClass("saswp_hide"),s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-rmprating-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-rmprating").val(1):s("#saswp-rmprating").val(0);break;case"saswp-ratingform-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ratingform").val(1):s("#saswp-ratingform").val(0);break;case"saswp-wpdiscuz-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpdiscuz").val(1):s("#saswp-wpdiscuz").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(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_woocommerce_archive_checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp_woocommerce_archive").val(1):s("#saswp_woocommerce_archive").val(0);break;case"saswp-wpecommerce-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpecommerce").val(1):s("#saswp-wpecommerce").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-wpqa-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpqa").val(1):s("#saswp-wpqa").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-polylang-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-polylang").val(1):s("#saswp-polylang").val(0);break;case"saswp-wpml-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpml").val(1):s("#saswp-wpml").val(0);break;case"saswp-metatagmanager-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-metatagmanager").val(1):s("#saswp-metatagmanager").val(0);break;case"saswp-slimseo-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-slimseo").val(1):s("#saswp-slimseo").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-ratency-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ratency").val(1):s("#saswp-ratency").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-image-resizing-checkbox":s(this).is(":checked")?s("#saswp-image-resizing").val(1):s("#saswp-image-resizing").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-brb-checkbox":s(this).is(":checked")?s("#saswp-brb").val(1):s("#saswp-brb").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-wpreviewslider-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpreviewslider").val(1):s("#saswp-wpreviewslider").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-cmp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-cmp").val(1):s("#saswp-cmp").val(0);break;case"saswp-wpreviewpro-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpreviewpro").val(1):s("#saswp-wpreviewpro").val(0);break;case"saswp-webstories-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-webstories").val(1):s("#saswp-webstories").val(0);break;case"saswp-resized-image-folder-checkbox":var t=s("#saswp-resized-image-folder-checkbox");s(this).is(":checked")?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_create_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){"t"==a.status?(s("#saswp-resized-image-folder").val(1),s("#saswp-resized-image-folder-checkbox").after('<a class="saswp-clear-images button button-default">Clear Images</a>')):(t.prop("checked",!1),t.next().text(a.message),t.next().css("color","red"))},error:function(s){t.prop("checked",!1),t.next().text(s),t.next().css("color","red")}}):(s("#saswp-resized-image-folder").val(0),s(".saswp-clear-images").remove());break;case"saswp-elementor-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-elementor").val(1):s("#saswp-elementor").val(0);break;case"saswp-rannarecipe-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-rannarecipe").val(1):s("#saswp-rannarecipe").val(0);break;case"saswp-jetpackrecipe-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-jetpackrecipe").val(1):s("#saswp-jetpackrecipe").val(0);break;case"saswp-quickandeasyfaq-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-quickandeasyfaq").val(1):s("#saswp-quickandeasyfaq").val(0);break;case"saswp-ultimatefaqs-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ultimatefaqs").val(1):s("#saswp-ultimatefaqs").val(0);break;case"saswp-arconixfaq-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-arconixfaq").val(1):s("#saswp-arconixfaq").val(0);break;case"saswp-faqconcertina-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-faqconcertina").val(1):s("#saswp-faqconcertina").val(0);break;case"saswp-wpjobmanager-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpjobmanager").val(1):s("#saswp-wpjobmanager").val(0);break;case"saswp-simplejobboard-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-simplejobboard").val(1):s("#saswp-simplejobboard").val(0);break;case"saswp-wpjobopenings-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpjobopenings").val(1):s("#saswp-wpjobopenings").val(0);break;case"saswp-webfaq10-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-webfaq10").val(1):s("#saswp-webfaq10").val(0);break;case"saswp-wpfaqschemamarkup-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpfaqschemamarkup").val(1):s("#saswp-wpfaqschemamarkup").val(0);break;case"saswp-faqschemaforpost-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-faqschemaforpost").val(1):s("#saswp-faqschemaforpost").val(0);break;case"saswp-masteraccordion-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-masteraccordion").val(1):s("#saswp-masteraccordion").val(0);break;case"saswp-easyfaqs-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-easyfaqs").val(1):s("#saswp-easyfaqs").val(0);break;case"saswp-accordion-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-accordion").val(1):s("#saswp-accordion").val(0);break;case"saswp-html5responsivefaq-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-html5responsivefaq").val(1):s("#saswp-html5responsivefaq").val(0);break;case"saswp-wpresponsivefaq-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpresponsivefaq").val(1):s("#saswp-wpresponsivefaq").val(0);break;case"saswp-easyaccordion-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-easyaccordion").val(1):s("#saswp-easyaccordion").val(0);break;case"saswp-helpiefaq-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-helpiefaq").val(1):s("#saswp-helpiefaq").val(0);break;case"saswp-mooberrybm-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-mooberrybm").val(1):s("#saswp-mooberrybm").val(0);break;case"saswp-novelist-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-novelist").val(1):s("#saswp-novelist").val(0);break;case"saswp-accordionfaq-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-accordionfaq").val(1):s("#saswp-accordionfaq").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-timetable-event-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-timetable-event").val(1):s("#saswp-timetable-event").val(0);break;case"saswp-xo-event-calendar-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-xo-event-calendar").val(1):s("#saswp-xo-event-calendar").val(0);break;case"saswp-vs-event-list-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-vs-event-list").val(1):s("#saswp-vs-event-list").val(0);break;case"saswp-calendarize-it-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-calendarize-it").val(1):s("#saswp-calendarize-it").val(0);break;case"saswp-events-schedule-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-events-schedule").val(1):s("#saswp-events-schedule").val(0);break;case"saswp-woo-event-manager-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-woo-event-manager").val(1):s("#saswp-woo-event-manager").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(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 c="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&a.height<1200&&(c='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+a.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+c)}).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 c=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"));c=1}s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:c,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"),c=s("#"+i+"_addon_license_key").val();t&&i&&c?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(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();""!=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();var i=window.location.hash;if("#saswp-default-container"==i?s(".saswp-global-container:eq(2)").show():"#saswp-knowledge-container"==i?s(".saswp-global-container:eq(1)").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-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"),c=s(this).attr("div_type"),p=s(this).attr("itemlist_sub_type"),o=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div").length,l=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div:nth-child("+o+")").attr("data-id");(l=++l)||(l=0),saswp_get_post_specific_schema_fields(e,l,i,c,t,i+"_",p)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-rmv-modify_row",function(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(),c="",p=e.toLowerCase()+"_"+i,o="saswp_fixed_image["+i+"]";"manual_text"==t?(c+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(c+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),a.parent().parent("tr").find("td:gt(1)").remove(),a.parent().parent("tr").append(c),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,c+=saswp_taxonomy_term_html(s,i),a.parent().parent("tr").find("td:gt(1)").remove(),a.parent().parent("tr").append(c),saswpCustomSelect2())},"json"):"custom_field"==t?(c+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',c+="</select></td>",c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"fixed_image"==t?(c+="<td>",c+="<fieldset>",c+='<input data-id="media" style="width: 30%;" class="button" id="'+p+'_button" name="'+p+'_button" type="button" value="Upload" />',c+='<input type="hidden" data-id="'+p+'_height" class="upload-height" name="'+o+'[height]" id="'+p+'_height" value="">',c+='<input type="hidden" data-id="'+p+'_width" class="upload-width" name="'+o+'[width]" id="'+p+'_width" value="">',c+='<input type="hidden" data-id="'+p+'_thumbnail" class="upload-thumbnail" name="'+o+'[thumbnail]" id="'+p+'_thumbnail" value="">',c+='<div class="saswp_image_div_'+p+'">',c+="</div>",c+="</fieldset>",c+="</td>",c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):(c+="<td></td>",c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var 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 c=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:c,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 c='<div class="saswp-custom-post-tab">';c+='<div style="display:none;" id="saswp-accept-reviews-popup">',c+='<div class="saswp-accept-rv-container">',c+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",c+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',c+='<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>',c+='<p><strong>Note:</strong> To enable google reCAPTCHA v2 add SITE KEY & SECRET KEY respectively as parameters in above shortcode. Eg <input value="[saswp-reviews-form site_key=&quot;your key&quot; secret_key=&quot;your key&quot;]" type="text" readonly>. To get keys <a target="_blank" href="https://www.google.com/recaptcha/admin/create">Click here.</a> You must choose reCAPTCHA type v2 </p>',c+="</div>",c+="</div>",c+='<h2 class="nav-tab-wrapper">',c+="<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>',c+="<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>',c+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',c+="</h2>",c+="</div>",jQuery(jQuery(".wrap")).prepend(c)}jQuery(document).on("click",".saswp-clear-images",function(a){a.preventDefault();var e=s(this);1==confirm("Are you sure? It will remove all the resized images")&&(e.addClass("updating-message"),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_clear_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){e.removeClass("updating-message"),"t"!=s.status&&alert("something went wrong")},error:function(s){console.log(s)}}))}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({spacing:"5px",rtl:saswp_localize_data.is_rtl,rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(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-add-rv-btn",function(){s(".saswp-dynamic-platforms").toggle()}),s(".saswp-rmv-coll-rv").on("click",function(){if(rmv_boolean=!rmv_boolean,saswp_on_collection_design_change(),jQuery(jQuery(".saswp-add-dynamic-section")).remove(),rmv_boolean){var s="";s+='<div class="saswp-add-dynamic-section">',s+='<div class="saswp-add-dynamic-btn">',s+='<span class="dashicons dashicons-plus-alt saswp-add-rv-btn"></span>',s+="</div>",s+='<div class="saswp-dynamic-platforms" style="display:none;">',s+='<select name="saswp_dynamic_platforms" id="saswp_dynamic_platforms"><option value="">Choose Platform</option>'+jQuery("#saswp-plaftorm-list").html()+"</select>",s+="</div>",s+="</div>",jQuery(jQuery(".saswp-collection-preview")[0]).after(s)}}),s(document).on("change","#saswp_dynamic_platforms",function(){var a=s(this).val();a&&jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:"",platform_id:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){if(a.status&&a.message){var e="";if(s.each(a.message,function(s,a){e+='<option value="'+a.saswp_review_id+'">'+a.saswp_reviewer_name+" ( "+a.saswp_review_rating+" ) </option>"}),e){var t="";t+='<select id="saswp_dynamic_reviews_list" class="saswp-select2">',t+=e,t+="</select>",t+='<a class="button button-default saswp-add-single-rv">Add</a>',s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after(t),saswp_select2()}}},"json")}),s(document).on("click",".saswp-add-single-rv",function(a){a.preventDefault();var e=s("#saswp_dynamic_reviews_list").val(),t=s("#saswp_dynamic_platforms").val();e&&saswp_get_collection_data(null,t,null,e,!0)}),s(document).on("click",".saswp-remove-coll-rv",function(){var a=s(this).attr("data-id"),e=s(this).attr("platform-id");if(e){var t=saswp_collection[e].filter(function(s){return s.saswp_review_id!=a});saswp_collection[e]=t,saswp_on_collection_design_change()}}),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"),s(".saswp-rmv-coll-rv").hide(),s(".saswp-add-dynamic-section").hide(),"grid"==a&&(s(".saswp-grid-options").removeClass("saswp_hide"),s(".saswp-rmv-coll-rv").show(),s(".saswp-add-dynamic-section").show()),"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,null)):alert("Enter Count")});var p,o,l=s("#saswp_total_reviews_list").val();l&&saswp_get_collection_data(null,null,null,null,l),(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("saswp-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(o),p.style.left=a.pageX-10+"px",p.style.top=a.pageY+15+"px",p.style.opacity=1,o=setTimeout(function(){p.style.opacity=0},500)}(s))},!1)});
1
+ var saswp_attached_rv=[],saswp_attached_col=[],rmv_boolean=!1,rmv_html="";jQuery(document).ready(function(s){if(s(document).on("click","#saswp_loc_display_on_front",function(){s(this).is(":checked")?s(".saswp-front-location-inst").removeClass("saswp_hide"):s(".saswp-front-location-inst").addClass("saswp_hide")}),s(document).on("change",".saswp-collection-where",function(){s(this);var a=s(this).val();a&&function(a){a&&s.ajax({url:ajaxurl,method:"GET",data:{action:"saswp_get_select2_data",type:a,q:"",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},beforeSend:function(){},success:function(a){if(a){var e="";s.each(a,function(s,a){e+='<option value="'+a.id+'">'+a.text+"</option>"}),s(".saswp-collection-where-data").html(""),s(".saswp-collection-where-data").append(e),saswp_select2()}},error:function(s){console.log("Failed Ajax Request"),console.log(s)}})}(a)}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?(s(".saswp-coll-where").addClass("saswp_hide"),s("#saswp-motivatebox").css("display","block")):(s(".saswp-coll-where").removeClass("saswp_hide"),s("#saswp-motivatebox").css("display","none"))}).change(),s(document).on("click",".saswp-dismiss-notices",function(){var 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,c="";t>0&&(c+=t+" Reviews, "),i>0&&(c+=i+" Collection"),c||(c=0),s(".saswp-attached-rv-count").text("Attached "+c),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(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(),c=s("#saswp_google_place_api_key").val(),p=s("#reviews_addon_license_key").val(),o=s("#reviews_addon_license_key_status").val();if("premium"==(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&&(p||c)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:o,reviews_api:p,location:t,blocks:i,g_api:c,premium_status: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),""==c&&alert(saswp_localize_data.translable_txt.enter_api_key),""==p&&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()}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(),"VideoObject"==e?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==e&&(s("#saswp_location_meta_box").removeClass("saswp_hide"),s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==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(),"VideoObject"==e?s(".saswp-enable-markup-class").parent().parent().show():s(".saswp-enable-markup-class").parent().parent().hide(),s("#saswp_location_meta_box").addClass("saswp_hide"),"local_business"==e&&(s(".saswp-"+a+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+a+"-tr").find("select").attr("disabled",!1),s("#saswp_location_meta_box").removeClass("saswp_hide")),"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-ryviu-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ryviu").val(1):s("#saswp-ryviu").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_remove_cat_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_remove_cat").val(1):s("#saswp_breadcrumb_remove_cat").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?(s("#saswp_breadcrumb_schema").val(1),s("#saswp_breadcrumb_remove_cat").parent().parent().show()):(s("#saswp_breadcrumb_schema").val(0),s("#saswp_breadcrumb_remove_cat").parent().parent().hide());break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-stars-rating-checkbox":s(this).is(":checked")?(s(".saswp-stars-post-table").removeClass("saswp_hide"),s(this).parent().parent().next().removeClass("saswp_hide"),s("#saswp-stars-rating").val(1)):(s(this).parent().parent().next().addClass("saswp_hide"),s(".saswp-stars-post-table").addClass("saswp_hide"),s("#saswp-stars-rating").val(0));break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-rmprating-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-rmprating").val(1):s("#saswp-rmprating").val(0);break;case"saswp-ratingform-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ratingform").val(1):s("#saswp-ratingform").val(0);break;case"saswp-wpdiscuz-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpdiscuz").val(1):s("#saswp-wpdiscuz").val(0);break;case"saswp-yet-another-stars-rating-checkbox":saswp_compatibliy_notes(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_woocommerce_archive_checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp_woocommerce_archive").val(1):s("#saswp_woocommerce_archive").val(0);break;case"saswp-wpecommerce-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpecommerce").val(1):s("#saswp-wpecommerce").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-wpqa-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpqa").val(1):s("#saswp-wpqa").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-polylang-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-polylang").val(1):s("#saswp-polylang").val(0);break;case"saswp-wpml-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpml").val(1):s("#saswp-wpml").val(0);break;case"saswp-metatagmanager-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-metatagmanager").val(1):s("#saswp-metatagmanager").val(0);break;case"saswp-slimseo-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-slimseo").val(1):s("#saswp-slimseo").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-ratency-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ratency").val(1):s("#saswp-ratency").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-image-resizing-checkbox":s(this).is(":checked")?s("#saswp-image-resizing").val(1):s("#saswp-image-resizing").val(0);break;case"saswp-multiple-size-image-checkbox":s(this).is(":checked")?s("#saswp-multiple-size-image").val(1):s("#saswp-multiple-size-image").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-brb-checkbox":s(this).is(":checked")?s("#saswp-brb").val(1):s("#saswp-brb").val(0);break;case"saswp-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-wpreviewslider-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpreviewslider").val(1):s("#saswp-wpreviewslider").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-cmp-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-cmp").val(1):s("#saswp-cmp").val(0);break;case"saswp-wpreviewpro-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpreviewpro").val(1):s("#saswp-wpreviewpro").val(0);break;case"saswp-webstories-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-webstories").val(1):s("#saswp-webstories").val(0);break;case"saswp-resized-image-folder-checkbox":var t=s("#saswp-resized-image-folder-checkbox");s(this).is(":checked")?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_create_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(a){"t"==a.status?(s("#saswp-resized-image-folder").val(1),s("#saswp-resized-image-folder-checkbox").after('<a class="saswp-clear-images button button-default">Clear Images</a>')):(t.prop("checked",!1),t.next().text(a.message),t.next().css("color","red"))},error:function(s){t.prop("checked",!1),t.next().text(s),t.next().css("color","red")}}):(s("#saswp-resized-image-folder").val(0),s(".saswp-clear-images").remove());break;case"saswp-elementor-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-elementor").val(1):s("#saswp-elementor").val(0);break;case"saswp-rannarecipe-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-rannarecipe").val(1):s("#saswp-rannarecipe").val(0);break;case"saswp-jetpackrecipe-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-jetpackrecipe").val(1):s("#saswp-jetpackrecipe").val(0);break;case"saswp-quickandeasyfaq-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-quickandeasyfaq").val(1):s("#saswp-quickandeasyfaq").val(0);break;case"saswp-ultimatefaqs-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-ultimatefaqs").val(1):s("#saswp-ultimatefaqs").val(0);break;case"saswp-arconixfaq-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-arconixfaq").val(1):s("#saswp-arconixfaq").val(0);break;case"saswp-faqconcertina-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-faqconcertina").val(1):s("#saswp-faqconcertina").val(0);break;case"saswp-wpjobmanager-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpjobmanager").val(1):s("#saswp-wpjobmanager").val(0);break;case"saswp-simplejobboard-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-simplejobboard").val(1):s("#saswp-simplejobboard").val(0);break;case"saswp-wpjobopenings-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpjobopenings").val(1):s("#saswp-wpjobopenings").val(0);break;case"saswp-webfaq10-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-webfaq10").val(1):s("#saswp-webfaq10").val(0);break;case"saswp-wpfaqschemamarkup-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpfaqschemamarkup").val(1):s("#saswp-wpfaqschemamarkup").val(0);break;case"saswp-faqschemaforpost-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-faqschemaforpost").val(1):s("#saswp-faqschemaforpost").val(0);break;case"saswp-masteraccordion-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-masteraccordion").val(1):s("#saswp-masteraccordion").val(0);break;case"saswp-easyfaqs-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-easyfaqs").val(1):s("#saswp-easyfaqs").val(0);break;case"saswp-accordion-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-accordion").val(1):s("#saswp-accordion").val(0);break;case"saswp-html5responsivefaq-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-html5responsivefaq").val(1):s("#saswp-html5responsivefaq").val(0);break;case"saswp-wpresponsivefaq-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-wpresponsivefaq").val(1):s("#saswp-wpresponsivefaq").val(0);break;case"saswp-easyaccordion-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-easyaccordion").val(1):s("#saswp-easyaccordion").val(0);break;case"saswp-helpiefaq-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-helpiefaq").val(1):s("#saswp-helpiefaq").val(0);break;case"saswp-mooberrybm-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-mooberrybm").val(1):s("#saswp-mooberrybm").val(0);break;case"saswp-novelist-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-novelist").val(1):s("#saswp-novelist").val(0);break;case"saswp-accordionfaq-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-accordionfaq").val(1):s("#saswp-accordionfaq").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-timetable-event-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-timetable-event").val(1):s("#saswp-timetable-event").val(0);break;case"saswp-xo-event-calendar-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-xo-event-calendar").val(1):s("#saswp-xo-event-calendar").val(0);break;case"saswp-vs-event-list-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-vs-event-list").val(1):s("#saswp-vs-event-list").val(0);break;case"saswp-calendarize-it-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-calendarize-it").val(1):s("#saswp-calendarize-it").val(0);break;case"saswp-events-schedule-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-events-schedule").val(1):s("#saswp-events-schedule").val(0);break;case"saswp-woo-event-manager-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-woo-event-manager").val(1):s("#saswp-woo-event-manager").val(0);break;case"saswp-stachethemes-event-calendar-checkbox":saswp_compatibliy_notes(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 c="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&a.height<1200&&(c='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+a.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+c)}).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 c=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"));c=1}s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:c,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"),c=s("#"+i+"_addon_license_key").val();t&&i&&c?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:c,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(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();""!=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();var i=window.location.hash;if("#saswp-default-container"==i?s(".saswp-global-container:eq(2)").show():"#saswp-knowledge-container"==i?s(".saswp-global-container:eq(1)").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-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"),c=s(this).attr("div_type"),p=s(this).attr("itemlist_sub_type"),o=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div").length,l=s("saswp_specific_"+t+" , .saswp-"+c+"-table-div:nth-child("+o+")").attr("data-id");(l=++l)||(l=0),saswp_get_post_specific_schema_fields(e,l,i,c,t,i+"_",p)}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-rmv-modify_row",function(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(),c="",p=e.toLowerCase()+"_"+i,o="saswp_fixed_image["+i+"]";"manual_text"==t?(c+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(c+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),a.parent().parent("tr").find("td:gt(1)").remove(),a.parent().parent("tr").append(c),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,c+=saswp_taxonomy_term_html(s,i),a.parent().parent("tr").find("td:gt(1)").remove(),a.parent().parent("tr").append(c),saswpCustomSelect2())},"json"):"custom_field"==t?(c+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',c+="</select></td>",c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):"fixed_image"==t?(c+="<td>",c+="<fieldset>",c+='<input data-id="media" style="width: 30%;" class="button" id="'+p+'_button" name="'+p+'_button" type="button" value="Upload" />',c+='<input type="hidden" data-id="'+p+'_height" class="upload-height" name="'+o+'[height]" id="'+p+'_height" value="">',c+='<input type="hidden" data-id="'+p+'_width" class="upload-width" name="'+o+'[width]" id="'+p+'_width" value="">',c+='<input type="hidden" data-id="'+p+'_thumbnail" class="upload-thumbnail" name="'+o+'[thumbnail]" id="'+p+'_thumbnail" value="">',c+='<div class="saswp_image_div_'+p+'">',c+="</div>",c+="</fieldset>",c+="</td>",c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2()):(c+="<td></td>",c+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(c),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var 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 c=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:c,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 c='<div class="saswp-custom-post-tab">';c+='<div style="display:none;" id="saswp-accept-reviews-popup">',c+='<div class="saswp-accept-rv-container">',c+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",c+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',c+='<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>',c+='<p><strong>Note:</strong> To enable google reCAPTCHA v2 add SITE KEY & SECRET KEY respectively as parameters in above shortcode. Eg <input value="[saswp-reviews-form site_key=&quot;your key&quot; secret_key=&quot;your key&quot;]" type="text" readonly>. To get keys <a target="_blank" href="https://www.google.com/recaptcha/admin/create">Click here.</a> You must choose reCAPTCHA type v2 </p>',c+="</div>",c+="</div>",c+='<h2 class="nav-tab-wrapper">',c+="<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>',c+="<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>',c+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',c+="</h2>",c+="</div>",jQuery(jQuery(".wrap")).prepend(c)}jQuery(document).on("click",".saswp-clear-images",function(a){a.preventDefault();var e=s(this);1==confirm("Are you sure? It will remove all the resized images")&&(e.addClass("updating-message"),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_clear_resized_image_folder",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){e.removeClass("updating-message"),"t"!=s.status&&alert("something went wrong")},error:function(s){console.log(s)}}))}),"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({spacing:"5px",rtl:saswp_localize_data.is_rtl,rating:saswp_reviews_data.rating_val,readOnly:saswp_reviews_data.readonly,onSet:function(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-add-rv-btn",function(){s(".saswp-dynamic-platforms").toggle()}),s(".saswp-rmv-coll-rv").on("click",function(){if(rmv_boolean=!rmv_boolean,saswp_on_collection_design_change(),jQuery(jQuery(".saswp-add-dynamic-section")).remove(),rmv_boolean){var s="";s+='<div class="saswp-add-dynamic-section">',s+='<div class="saswp-add-dynamic-btn">',s+='<span class="dashicons dashicons-plus-alt saswp-add-rv-btn"></span>',s+="</div>",s+='<div class="saswp-dynamic-platforms" style="display:none;">',s+='<select name="saswp_dynamic_platforms" id="saswp_dynamic_platforms"><option value="">Choose Platform</option>'+jQuery("#saswp-plaftorm-list").html()+"</select>",s+="</div>",s+="</div>",jQuery(jQuery(".saswp-collection-preview")[0]).after(s)}}),s(document).on("change","#saswp_dynamic_platforms",function(){var a=s(this).val();a&&jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:"",platform_id:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){if(a.status&&a.message){var e="";if(s.each(a.message,function(s,a){e+='<option value="'+a.saswp_review_id+'">'+a.saswp_reviewer_name+" ( "+a.saswp_review_rating+" ) </option>"}),e){var t="";t+='<select id="saswp_dynamic_reviews_list" class="saswp-select2">',t+=e,t+="</select>",t+='<a class="button button-default saswp-add-single-rv">Add</a>',s("#saswp_dynamic_platforms").nextAll().remove(),s("#saswp_dynamic_platforms").after(t),saswp_select2()}}},"json")}),s(document).on("click",".saswp-add-single-rv",function(a){a.preventDefault();var e=s("#saswp_dynamic_reviews_list").val(),t=s("#saswp_dynamic_platforms").val();e&&saswp_get_collection_data(null,t,null,e,!0)}),s(document).on("click",".saswp-remove-coll-rv",function(){var a=s(this).attr("data-id"),e=s(this).attr("platform-id");if(e){var t=saswp_collection[e].filter(function(s){return s.saswp_review_id!=a});saswp_collection[e]=t,saswp_on_collection_design_change()}}),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"),s(".saswp-rmv-coll-rv").hide(),s(".saswp-add-dynamic-section").hide(),"grid"==a&&(s(".saswp-grid-options").removeClass("saswp_hide"),s(".saswp-rmv-coll-rv").show(),s(".saswp-add-dynamic-section").show()),"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,null)):alert("Enter Count")});var p,o,l=s("#saswp_total_reviews_list").val();l&&saswp_get_collection_data(null,null,null,null,l),(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("saswp-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(o),p.style.left=a.pageX-10+"px",p.style.top=a.pageY+15+"px",p.style.opacity=1,o=setTimeout(function(){p.style.opacity=0},500)}(s))},!1)});
admin_section/plugin-installer/install.php CHANGED
@@ -421,9 +421,9 @@
421
  );
422
  $data_group_array = saswp_sanitize_multi_array($data_group_array, 'data_array');
423
  $schema_options_array = array('isAccessibleForFree'=>False,'notAccessibleForFree'=>0,'paywall_class_name'=>'');
424
- update_post_meta( $insertedPageId, 'data_group_array', $data_group_array);
425
- update_post_meta( $insertedPageId, 'schema_type', $schemaType);
426
- update_post_meta( $insertedPageId, 'schema_options', $schema_options_array);
427
 
428
  }
429
  }
@@ -771,7 +771,8 @@ function saswp_select_schema_fields_callback(){
771
  $returnHtml = $post_types = '';
772
  $post_types = get_post_types( array( 'public' => true ), 'names' );
773
  // Remove Unsupported Post types
774
- unset($post_types['attachment'], $post_types['amp_acf'], $post_types['saswp']);
 
775
  $option = '';
776
 
777
  if(count($post_types)>0){
421
  );
422
  $data_group_array = saswp_sanitize_multi_array($data_group_array, 'data_array');
423
  $schema_options_array = array('isAccessibleForFree'=>False,'notAccessibleForFree'=>0,'paywall_class_name'=>'');
424
+ saswp_update_post_meta( $insertedPageId, 'data_group_array', $data_group_array);
425
+ saswp_update_post_meta( $insertedPageId, 'schema_type', $schemaType);
426
+ saswp_update_post_meta( $insertedPageId, 'schema_options', $schema_options_array);
427
 
428
  }
429
  }
771
  $returnHtml = $post_types = '';
772
  $post_types = get_post_types( array( 'public' => true ), 'names' );
773
  // Remove Unsupported Post types
774
+
775
+ unset($post_types['attachment'], $post_types['amp_acf'], $post_types['saswp-collections'], $post_types['saswp_reviews'], $post_types['saswp_reviews_server'], $post_types['saswp'] );
776
  $option = '';
777
 
778
  if(count($post_types)>0){
admin_section/settings.php CHANGED
@@ -1434,7 +1434,7 @@ function saswp_import_callback(){
1434
  'name' => 'saswp-markup-footer-checkbox',
1435
  'type' => 'checkbox',
1436
  'class' => 'checkbox saswp-checkbox',
1437
- 'note' => 'By default schema markup will be added in header section',
1438
  'hidden' => array(
1439
  'id' => 'saswp-markup-footer',
1440
  'name' => 'sd_data[saswp-markup-footer]',
@@ -1446,7 +1446,7 @@ function saswp_import_callback(){
1446
  'name' => 'saswp-pretty-print-checkbox',
1447
  'type' => 'checkbox',
1448
  'class' => 'checkbox saswp-checkbox',
1449
- 'note' => 'By default schema markup will be minified format',
1450
  'hidden' => array(
1451
  'id' => 'saswp-pretty-print',
1452
  'name' => 'sd_data[saswp-pretty-print]',
@@ -1458,7 +1458,7 @@ function saswp_import_callback(){
1458
  'name' => 'saswp-microdata-cleanup-checkbox',
1459
  'type' => 'checkbox',
1460
  'class' => 'checkbox saswp-checkbox',
1461
- 'note' => 'It removes all the microdata generated by third party plugins which cause validation error on google testing tool',
1462
  'hidden' => array(
1463
  'id' => 'saswp-microdata-cleanup',
1464
  'name' => 'sd_data[saswp-microdata-cleanup]',
@@ -1470,7 +1470,7 @@ function saswp_import_callback(){
1470
  'name' => 'saswp-other-images-checkbox',
1471
  'type' => 'checkbox',
1472
  'class' => 'checkbox saswp-checkbox',
1473
- 'note' => 'It adds all the available images on a post to schema markup',
1474
  'hidden' => array(
1475
  'id' => 'saswp-other-images',
1476
  'name' => 'sd_data[saswp-other-images]',
@@ -1482,7 +1482,7 @@ function saswp_import_callback(){
1482
  'name' => 'saswp-image-resizing-checkbox',
1483
  'type' => 'checkbox',
1484
  'class' => 'checkbox saswp-checkbox',
1485
- 'note' => 'If the featured image do not match with google image guidlines. This option creates a copy of the image and resize it as per google guidlines',
1486
  'hidden' => array(
1487
  'id' => 'saswp-image-resizing',
1488
  'name' => 'sd_data[saswp-image-resizing]',
@@ -1494,7 +1494,7 @@ function saswp_import_callback(){
1494
  'name' => 'saswp-multiple-size-image-checkbox',
1495
  'type' => 'checkbox',
1496
  'class' => 'checkbox saswp-checkbox',
1497
- 'note' => 'According to Google, For best results, multiple high-resolution images with the following aspect ratios: 16x9, 4x3, and 1x1 should be there',
1498
  'hidden' => array(
1499
  'id' => 'saswp-multiple-size-image',
1500
  'name' => 'sd_data[saswp-multiple-size-image]',
@@ -1506,7 +1506,7 @@ function saswp_import_callback(){
1506
  'name' => 'saswp-resized-image-folder-checkbox',
1507
  'type' => 'checkbox',
1508
  'class' => 'checkbox saswp-checkbox',
1509
- 'note' => 'Store all resized images by SASWP in a separate folder "schema-and-structured-data-for-wp" for better management and optimization of images',
1510
  'hidden' => array(
1511
  'id' => 'saswp-resized-image-folder',
1512
  'name' => 'sd_data[saswp-resized-image-folder]',
@@ -1518,7 +1518,7 @@ function saswp_import_callback(){
1518
  'name' => 'sd_data[saswp-youtube-api]',
1519
  'class' => 'regular-text',
1520
  'type' => 'text',
1521
- 'note' => 'This option only works with VideoObject schema. 1.) Create a new project here: <a href="https://console.developers.google.com/project" target="_blank">Click here.</a> 2.) Enable "YouTube Data API" under "APIs & auth" -> APIs. 3.) Create a new server key under "APIs & auth" -> Credentials.',
1522
  'attributes' => array(
1523
  'placeholder' => 'AIzaSyB_WQM0iHROprml62RQj1rEYqDyUC6ddfe'
1524
  )
@@ -1529,7 +1529,7 @@ function saswp_import_callback(){
1529
  'name' => 'saswp-rss-feed-image-checkbox',
1530
  'type' => 'checkbox',
1531
  'class' => 'checkbox saswp-checkbox',
1532
- 'note' => 'Showing images alongside news/blogs if your website or blog appears in Google News',
1533
  'hidden' => array(
1534
  'id' => 'saswp-rss-feed-image',
1535
  'name' => 'sd_data[saswp-rss-feed-image]',
@@ -4165,7 +4165,7 @@ function saswp_support_page_callback(){
4165
  * Enqueue CSS and JS
4166
  */
4167
  function saswp_enqueue_style_js( $hook ) {
4168
-
4169
  global $saswp_metaboxes;
4170
 
4171
  $translable_txt = array(
@@ -4199,7 +4199,7 @@ function saswp_enqueue_style_js( $hook ) {
4199
  $post_type = $current_screen->post_type;
4200
  }
4201
 
4202
- if($saswp_metaboxes || $post_type == 'saswp' || $post_type == 'saswp-collections' || $post_type == 'saswp_reviews' || $hook == 'saswp_page_structured_data_options' || $hook == 'saswp_page_collection' ){
4203
 
4204
  $all_schema_array = array();
4205
 
@@ -4209,9 +4209,15 @@ function saswp_enqueue_style_js( $hook ) {
4209
  $all_schema_array = include $mappings_file;
4210
  }
4211
 
 
 
 
 
 
 
4212
  $data = array(
4213
  'current_url' => saswp_get_current_url(),
4214
- 'post_id' => get_the_ID(),
4215
  'ajax_url' => admin_url( 'admin-ajax.php' ),
4216
  'saswp_security_nonce' => wp_create_nonce('saswp_ajax_check_nonce'),
4217
  'new_url_selector' => esc_url(admin_url()).'post-new.php?post_type=saswp',
@@ -4264,7 +4270,6 @@ function saswp_enqueue_style_js( $hook ) {
4264
 
4265
  wp_style_add_data( 'saswp-main-css', 'rtl', 'replace' );
4266
 
4267
-
4268
  apply_filters('saswp_wp_enqueue_more_script', '');
4269
 
4270
  }
@@ -4283,7 +4288,7 @@ function saswp_enqueue_saswp_select2_js( $hook ) {
4283
  $post_type = $current_screen->post_type;
4284
  }
4285
 
4286
- if($saswp_metaboxes || $post_type == 'saswp' || $post_type == 'saswp-collections' || $post_type == 'saswp_reviews' || $hook == 'saswp_page_structured_data_options' || $hook == 'saswp_page_collection' ){
4287
 
4288
  //DIGINEX theme compatibility starts
4289
  wp_dequeue_script( 'select2-js' );
@@ -4297,6 +4302,9 @@ function saswp_enqueue_saswp_select2_js( $hook ) {
4297
 
4298
  wp_dequeue_script( 'wds-shared-ui' );
4299
  wp_deregister_script( 'wds-shared-ui' );
 
 
 
4300
 
4301
  wp_enqueue_style('saswp-select2-style', SASWP_PLUGIN_URL. 'admin_section/css/select2.min.css' , false, SASWP_VERSION);
4302
  wp_enqueue_script('select2', SASWP_PLUGIN_URL. 'admin_section/js/select2.min.js', array( 'jquery'), SASWP_VERSION, true);
1434
  'name' => 'saswp-markup-footer-checkbox',
1435
  'type' => 'checkbox',
1436
  'class' => 'checkbox saswp-checkbox',
1437
+ 'note' => 'By default schema markup will be added in header section. <a target="_blank" href="https://structured-data-for-wp.com/docs/article/what-is-add-schema-markup-in-footer-in-schema-structured-data-for-wp-amp">Learn More</a>',
1438
  'hidden' => array(
1439
  'id' => 'saswp-markup-footer',
1440
  'name' => 'sd_data[saswp-markup-footer]',
1446
  'name' => 'saswp-pretty-print-checkbox',
1447
  'type' => 'checkbox',
1448
  'class' => 'checkbox saswp-checkbox',
1449
+ 'note' => 'By default schema markup will be minified format. <a target="_blank" href="https://structured-data-for-wp.com/docs/article/what-is-pretty-print-schema-markup-in-schema-structured-data-for-wp-amp">Learn More</a>',
1450
  'hidden' => array(
1451
  'id' => 'saswp-pretty-print',
1452
  'name' => 'sd_data[saswp-pretty-print]',
1458
  'name' => 'saswp-microdata-cleanup-checkbox',
1459
  'type' => 'checkbox',
1460
  'class' => 'checkbox saswp-checkbox',
1461
+ 'note' => 'It removes all the microdata generated by third party plugins which cause validation error on google testing tool. <a target="_blank" href="https://structured-data-for-wp.com/docs/article/microdata-cleanup/">Learn More</a>',
1462
  'hidden' => array(
1463
  'id' => 'saswp-microdata-cleanup',
1464
  'name' => 'sd_data[saswp-microdata-cleanup]',
1470
  'name' => 'saswp-other-images-checkbox',
1471
  'type' => 'checkbox',
1472
  'class' => 'checkbox saswp-checkbox',
1473
+ 'note' => 'It adds all the available images on a post to schema markup. <a target="_blank" href="https://structured-data-for-wp.com/docs/article/what-is-add-all-available-images-on-post-in-schema-structured-data-for-wp-amp">Learn More</a>',
1474
  'hidden' => array(
1475
  'id' => 'saswp-other-images',
1476
  'name' => 'sd_data[saswp-other-images]',
1482
  'name' => 'saswp-image-resizing-checkbox',
1483
  'type' => 'checkbox',
1484
  'class' => 'checkbox saswp-checkbox',
1485
+ 'note' => 'If the featured image do not match with google image guidlines. This option creates a copy of the image and resize it as per google guidlines. <a target="_blank" href="https://structured-data-for-wp.com/docs/article/what-is-allow-image-resizing-in-schema-structured-data-for-wp-amp">Learn More</a>',
1486
  'hidden' => array(
1487
  'id' => 'saswp-image-resizing',
1488
  'name' => 'sd_data[saswp-image-resizing]',
1494
  'name' => 'saswp-multiple-size-image-checkbox',
1495
  'type' => 'checkbox',
1496
  'class' => 'checkbox saswp-checkbox',
1497
+ 'note' => 'According to Google, For best results, multiple high-resolution images with the following aspect ratios: 16x9, 4x3, and 1x1 should be there. <a target="_blank" href="https://structured-data-for-wp.com/docs/article/what-is-allow-multiple-size-image-creation-in-schema-structured-data-for-wp-amp">Learn More</a>',
1498
  'hidden' => array(
1499
  'id' => 'saswp-multiple-size-image',
1500
  'name' => 'sd_data[saswp-multiple-size-image]',
1506
  'name' => 'saswp-resized-image-folder-checkbox',
1507
  'type' => 'checkbox',
1508
  'class' => 'checkbox saswp-checkbox',
1509
+ 'note' => 'Store all resized images by SASWP in a separate folder "schema-and-structured-data-for-wp" for better management and optimization of images. <a target="_blank" href="https://structured-data-for-wp.com/docs/article/what-is-resized-images-in-separate-folder-in-schema-structured-data-for-wp-amp/">Learn More</a>',
1510
  'hidden' => array(
1511
  'id' => 'saswp-resized-image-folder',
1512
  'name' => 'sd_data[saswp-resized-image-folder]',
1518
  'name' => 'sd_data[saswp-youtube-api]',
1519
  'class' => 'regular-text',
1520
  'type' => 'text',
1521
+ 'note' => 'This option only works with VideoObject schema. 1.) Create a new project here: <a href="https://console.developers.google.com/project" target="_blank">Click here.</a> 2.) Enable "YouTube Data API" under "APIs & auth" -> APIs. 3.) Create a new server key under "APIs & auth" -> Credentials. <a target="_blank" href="https://structured-data-for-wp.com/docs/article/what-is-youtube-api-key-in-schema-structured-data-for-wp-amp/">Learn More</a>',
1522
  'attributes' => array(
1523
  'placeholder' => 'AIzaSyB_WQM0iHROprml62RQj1rEYqDyUC6ddfe'
1524
  )
1529
  'name' => 'saswp-rss-feed-image-checkbox',
1530
  'type' => 'checkbox',
1531
  'class' => 'checkbox saswp-checkbox',
1532
+ 'note' => 'Showing images alongside news/blogs if your website or blog appears in Google News. <a target="_blank" href="https://structured-data-for-wp.com/docs/article/what-is-add-featured-image-in-rss-feed-in-schema-structured-data-for-wp-amp/">Learn More</a>',
1533
  'hidden' => array(
1534
  'id' => 'saswp-rss-feed-image',
1535
  'name' => 'sd_data[saswp-rss-feed-image]',
4165
  * Enqueue CSS and JS
4166
  */
4167
  function saswp_enqueue_style_js( $hook ) {
4168
+
4169
  global $saswp_metaboxes;
4170
 
4171
  $translable_txt = array(
4199
  $post_type = $current_screen->post_type;
4200
  }
4201
 
4202
+ if($saswp_metaboxes || $post_type == 'saswp' || $post_type == 'saswp-collections' || $post_type == 'saswp_reviews' || $hook == 'saswp_page_structured_data_options' || $hook == 'saswp_page_collection' || $hook == 'term.php' ){
4203
 
4204
  $all_schema_array = array();
4205
 
4209
  $all_schema_array = include $mappings_file;
4210
  }
4211
 
4212
+ $post_id = saswp_get_the_ID();
4213
+
4214
+ if(isset($_GET['tag_ID'])){
4215
+ $post_id = intval($_GET['tag_ID']);
4216
+ }
4217
+
4218
  $data = array(
4219
  'current_url' => saswp_get_current_url(),
4220
+ 'post_id' => $post_id,
4221
  'ajax_url' => admin_url( 'admin-ajax.php' ),
4222
  'saswp_security_nonce' => wp_create_nonce('saswp_ajax_check_nonce'),
4223
  'new_url_selector' => esc_url(admin_url()).'post-new.php?post_type=saswp',
4270
 
4271
  wp_style_add_data( 'saswp-main-css', 'rtl', 'replace' );
4272
 
 
4273
  apply_filters('saswp_wp_enqueue_more_script', '');
4274
 
4275
  }
4288
  $post_type = $current_screen->post_type;
4289
  }
4290
 
4291
+ if($saswp_metaboxes || $post_type == 'saswp' || $post_type == 'saswp-collections' || $post_type == 'saswp_reviews' || $hook == 'saswp_page_structured_data_options' || $hook == 'saswp_page_collection' || $hook == 'term.php' ){
4292
 
4293
  //DIGINEX theme compatibility starts
4294
  wp_dequeue_script( 'select2-js' );
4302
 
4303
  wp_dequeue_script( 'wds-shared-ui' );
4304
  wp_deregister_script( 'wds-shared-ui' );
4305
+
4306
+ wp_dequeue_script( 'pum-admin-general' );
4307
+ wp_deregister_script( 'pum-admin-general' );
4308
 
4309
  wp_enqueue_style('saswp-select2-style', SASWP_PLUGIN_URL. 'admin_section/css/select2.min.css' , false, SASWP_VERSION);
4310
  wp_enqueue_script('select2', SASWP_PLUGIN_URL. 'admin_section/js/select2.min.js', array( 'jquery'), SASWP_VERSION, true);
admin_section/structure_admin.php CHANGED
@@ -227,7 +227,7 @@ function saswp_get_all_schema_posts(){
227
 
228
  $conditions = array();
229
 
230
- $data_group_array = get_post_meta( $post_id, 'data_group_array', true);
231
 
232
  if(isset($data_group_array['group-0'])){
233
 
@@ -249,8 +249,8 @@ function saswp_get_all_schema_posts(){
249
  }
250
 
251
  $returnData[] = array(
252
- 'schema_type' => get_post_meta( $post_id, 'schema_type', true),
253
- 'schema_options' => get_post_meta( $post_id, 'schema_options', true),
254
  'conditions' => $conditions,
255
  'post_id' => $post_id,
256
  );
@@ -269,7 +269,7 @@ function saswp_get_all_schema_posts(){
269
 
270
  function saswp_generate_field_data( $post_id, $post ){
271
 
272
- $data_group_array = get_post_meta( $post_id, 'data_group_array', true);
273
 
274
  $output = array();
275
 
@@ -484,7 +484,11 @@ function saswp_comparison_logic_checker($input, $post){
484
  case 'post_category':
485
 
486
  global $cat_id_obj;
487
- $cat_id_arr = array();
 
 
 
 
488
 
489
  if(is_object($post)){
490
 
@@ -648,6 +652,11 @@ function saswp_comparison_logic_checker($input, $post){
648
  $queried_obj = get_queried_object();
649
  $termChoices[] = $queried_obj->slug;
650
 
 
 
 
 
 
651
  }else{
652
 
653
  if( is_object($post) ) {
@@ -686,6 +695,13 @@ function saswp_comparison_logic_checker($input, $post){
686
  }
687
 
688
  }else{
 
 
 
 
 
 
 
689
 
690
  if( isset($input['key_4']) && $input['key_4'] == 'all' ) {
691
 
@@ -795,7 +811,7 @@ if(is_admin()){
795
 
796
  function saswp_select_callback($post) {
797
 
798
- $data_group_array = get_post_meta($post->ID, 'data_group_array', true );
799
 
800
  $data_group_array = is_array($data_group_array)? array_values($data_group_array): array();
801
 
@@ -1059,7 +1075,7 @@ function saswp_dequeue_script() {
1059
 
1060
  $post_data_group_array = saswp_sanitize_multi_array($post_data_group_array, 'data_array');
1061
 
1062
- update_post_meta(
1063
  $post_id,
1064
  'data_group_array',
1065
  $post_data_group_array
@@ -1079,7 +1095,7 @@ function saswp_post_type_generator(){
1079
  $post_types = get_post_types( array( 'public' => true ), 'names' );
1080
 
1081
  // Remove Unsupported Post types
1082
- unset($post_types['attachment'], $post_types['amp_acf']);
1083
 
1084
  return $post_types;
1085
  }
@@ -1218,7 +1234,7 @@ function saswp_custom_breadcrumbs() {
1218
 
1219
  if ( class_exists('WPSEO_Primary_Term') && ( isset($sd_data['saswp-yoast']) && $sd_data['saswp-yoast'] == 1 ) ) {
1220
 
1221
- $wpseo_primary_term = new WPSEO_Primary_Term( 'category', get_the_id() );
1222
  $wpseo_primary_term = $wpseo_primary_term->get_primary_term();
1223
  $term_yoast = get_term( $wpseo_primary_term );
1224
 
@@ -1403,13 +1419,13 @@ function saswp_custom_column_set( $column, $post_id ) {
1403
 
1404
  case 'saswp_schema_type' :
1405
 
1406
- $schema_type = get_post_meta( $post_id, $key='schema_type', true);
1407
  $url = admin_url( 'post.php?post='.$post_id.'&action=edit' );
1408
 
1409
  if($schema_type == 'local_business'){
1410
 
1411
- $business_type = get_post_meta($post_id, 'saswp_business_type', true);
1412
- $business_name = get_post_meta($post_id, 'saswp_business_name', true);
1413
 
1414
  if($business_name){
1415
  echo '<strong><a class="row-title" href="'.esc_url($url).'">LocalBusiness ('.esc_html($business_name).')</a></strong>';
@@ -1431,7 +1447,7 @@ function saswp_custom_column_set( $column, $post_id ) {
1431
 
1432
  $enabled ='';
1433
  $exclude ='';
1434
- $data_group_array = get_post_meta( $post_id, $key='data_group_array', true);
1435
 
1436
 
1437
  if($data_group_array){
@@ -1986,7 +2002,7 @@ function saswp_review_module_upgradation(){
1986
 
1987
  foreach($posts_list as $list){
1988
 
1989
- $g_place_id = get_post_meta($list->ID, $key='saswp_google_place_id', true);
1990
 
1991
  if($g_place_id){
1992
  $service->saswp_get_free_reviews_data($g_place_id, $g_review_api);
227
 
228
  $conditions = array();
229
 
230
+ $data_group_array = saswp_get_post_meta( $post_id, 'data_group_array', true);
231
 
232
  if(isset($data_group_array['group-0'])){
233
 
249
  }
250
 
251
  $returnData[] = array(
252
+ 'schema_type' => saswp_get_post_meta( $post_id, 'schema_type', true),
253
+ 'schema_options' => saswp_get_post_meta( $post_id, 'schema_options', true),
254
  'conditions' => $conditions,
255
  'post_id' => $post_id,
256
  );
269
 
270
  function saswp_generate_field_data( $post_id, $post ){
271
 
272
+ $data_group_array = saswp_get_post_meta( $post_id, 'data_group_array', true);
273
 
274
  $output = array();
275
 
484
  case 'post_category':
485
 
486
  global $cat_id_obj;
487
+ $cat_id_arr = array();
488
+
489
+ if(isset($_GET['tag_ID'] ) && is_admin()){
490
+ $cat_id_arr[] = intval($_GET['tag_ID'] );
491
+ }
492
 
493
  if(is_object($post)){
494
 
652
  $queried_obj = get_queried_object();
653
  $termChoices[] = $queried_obj->slug;
654
 
655
+ }else if( isset($_GET['tag_ID'] ) && is_admin() ){
656
+
657
+ $term_object = get_term( intval($_GET['tag_ID']) );
658
+ $termChoices[] = $term_object->slug;
659
+
660
  }else{
661
 
662
  if( is_object($post) ) {
695
  }
696
 
697
  }else{
698
+
699
+ if( isset($_GET['tag_ID'] ) && is_admin() ){
700
+
701
+ $term_object = get_term( intval($_GET['tag_ID']) );
702
+ $post_terms[] = $term_object->slug;
703
+
704
+ }
705
 
706
  if( isset($input['key_4']) && $input['key_4'] == 'all' ) {
707
 
811
 
812
  function saswp_select_callback($post) {
813
 
814
+ $data_group_array = saswp_get_post_meta($post->ID, 'data_group_array', true );
815
 
816
  $data_group_array = is_array($data_group_array)? array_values($data_group_array): array();
817
 
1075
 
1076
  $post_data_group_array = saswp_sanitize_multi_array($post_data_group_array, 'data_array');
1077
 
1078
+ saswp_update_post_meta(
1079
  $post_id,
1080
  'data_group_array',
1081
  $post_data_group_array
1095
  $post_types = get_post_types( array( 'public' => true ), 'names' );
1096
 
1097
  // Remove Unsupported Post types
1098
+ unset($post_types['attachment'], $post_types['amp_acf'], $post_types['saswp-collections'], $post_types['saswp_reviews'], $post_types['saswp_reviews_server'], $post_types['saswp'] );
1099
 
1100
  return $post_types;
1101
  }
1234
 
1235
  if ( class_exists('WPSEO_Primary_Term') && ( isset($sd_data['saswp-yoast']) && $sd_data['saswp-yoast'] == 1 ) ) {
1236
 
1237
+ $wpseo_primary_term = new WPSEO_Primary_Term( 'category', saswp_get_the_ID() );
1238
  $wpseo_primary_term = $wpseo_primary_term->get_primary_term();
1239
  $term_yoast = get_term( $wpseo_primary_term );
1240
 
1419
 
1420
  case 'saswp_schema_type' :
1421
 
1422
+ $schema_type = saswp_get_post_meta( $post_id, $key='schema_type', true);
1423
  $url = admin_url( 'post.php?post='.$post_id.'&action=edit' );
1424
 
1425
  if($schema_type == 'local_business'){
1426
 
1427
+ $business_type = saswp_get_post_meta($post_id, 'saswp_business_type', true);
1428
+ $business_name = saswp_get_post_meta($post_id, 'saswp_business_name', true);
1429
 
1430
  if($business_name){
1431
  echo '<strong><a class="row-title" href="'.esc_url($url).'">LocalBusiness ('.esc_html($business_name).')</a></strong>';
1447
 
1448
  $enabled ='';
1449
  $exclude ='';
1450
+ $data_group_array = saswp_get_post_meta( $post_id, $key='data_group_array', true);
1451
 
1452
 
1453
  if($data_group_array){
2002
 
2003
  foreach($posts_list as $list){
2004
 
2005
+ $g_place_id = saswp_get_post_meta($list->ID, $key='saswp_google_place_id', true);
2006
 
2007
  if($g_place_id){
2008
  $service->saswp_get_free_reviews_data($g_place_id, $g_review_api);
core/array-list/repeater-fields.php CHANGED
@@ -40,6 +40,10 @@ return array( 'schema_type_element' => array(
40
  'performer' => 'performer',
41
  'organizer' => 'organizer',
42
  ),
 
 
 
 
43
  'JobPosting' => array(
44
  'joblocation' => 'joblocation'
45
  ),
@@ -71,8 +75,7 @@ return array( 'schema_type_element' => array(
71
  ),
72
  'MedicalCondition' => array(
73
  'mc-symptom' => 'mc_symptom',
74
- 'mc-risk_factor' => 'mc_risk_factor',
75
-
76
  ),
77
  'TVSeries' => array(
78
  'tvseries-actor' => 'tvseries_actor',
@@ -87,6 +90,36 @@ return array( 'schema_type_element' => array(
87
 
88
  ),
89
  'meta_name' => array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  'movie_actor' => array(
91
  array(
92
  'label' => 'Name',
@@ -191,26 +224,26 @@ return array( 'schema_type_element' => array(
191
  )
192
  ),
193
  'performer' => array(
194
- array(
195
- 'label' => 'Performer Type',
196
- 'name' => 'saswp_event_performer_type',
197
- 'type' => 'select',
198
- 'options' => array(
199
- 'Person' => 'Person',
200
- 'Organization' => 'Organization',
201
- 'MusicGroup' => 'MusicGroup'
202
- )
203
- ),
204
- array(
205
- 'label' => 'Performer Name',
206
- 'name' => 'saswp_event_performer_name',
207
- 'type' => 'text',
208
- ),
209
- array(
210
- 'label' => 'Performer URL',
211
- 'name' => 'saswp_event_performer_url',
212
- 'type' => 'text',
213
- )
214
  ),
215
 
216
  'organizer' => array(
@@ -311,6 +344,15 @@ return array( 'schema_type_element' => array(
311
  'name' => 'saswp_qa_accepted_answer_url',
312
  'type' => 'text',
313
  ),
 
 
 
 
 
 
 
 
 
314
  array(
315
  'label' => 'Accepted Answer Author Name',
316
  'name' => 'saswp_qa_accepted_author_name',
@@ -338,11 +380,20 @@ return array( 'schema_type_element' => array(
338
  'name' => 'saswp_qa_suggested_answer_url',
339
  'type' => 'text',
340
  ),
 
 
 
 
 
 
 
 
 
341
  array(
342
  'label' => 'suggested Answer Author Name',
343
  'name' => 'saswp_qa_suggested_author_name',
344
  'type' => 'text',
345
- )
346
  ),
347
  'howto_tool' => array(
348
  array(
@@ -464,7 +515,7 @@ return array( 'schema_type_element' => array(
464
  'name' => 'saswp_mc_risk_factor_name',
465
  'type' => 'text',
466
  )
467
- ),
468
  'tvseries_actor' => array(
469
  array(
470
  'label' => 'Actor Name',
40
  'performer' => 'performer',
41
  'organizer' => 'organizer',
42
  ),
43
+ 'EducationalOccupationalProgram' => array(
44
+ 'eopidentifier' => 'eopidentifier',
45
+ 'eopoffer' => 'eopoffer',
46
+ ),
47
  'JobPosting' => array(
48
  'joblocation' => 'joblocation'
49
  ),
75
  ),
76
  'MedicalCondition' => array(
77
  'mc-symptom' => 'mc_symptom',
78
+ 'mc-risk_factor' => 'mc_risk_factor'
 
79
  ),
80
  'TVSeries' => array(
81
  'tvseries-actor' => 'tvseries_actor',
90
 
91
  ),
92
  'meta_name' => array(
93
+ 'eopidentifier' => array(
94
+ array(
95
+ 'label' => 'Property ID',
96
+ 'name' => 'saswp_eopidentifier_property_id',
97
+ 'type' => 'text',
98
+ ),
99
+ array(
100
+ 'label' => 'Value',
101
+ 'name' => 'saswp_eopidentifier_property_value',
102
+ 'type' => 'text',
103
+ )
104
+ ),
105
+ 'eopoffer' => array(
106
+ array(
107
+ 'label' => 'Category',
108
+ 'name' => 'saswp_eopoffer_category',
109
+ 'type' => 'text',
110
+ ),
111
+ array(
112
+ 'label' => 'Price',
113
+ 'name' => 'saswp_eopoffer_price',
114
+ 'type' => 'text',
115
+ ),
116
+ array(
117
+ 'label' => 'Price Currency',
118
+ 'name' => 'saswp_eopoffer_price_currency',
119
+ 'type' => 'text',
120
+ )
121
+
122
+ ),
123
  'movie_actor' => array(
124
  array(
125
  'label' => 'Name',
224
  )
225
  ),
226
  'performer' => array(
227
+ array(
228
+ 'label' => 'Performer Type',
229
+ 'name' => 'saswp_event_performer_type',
230
+ 'type' => 'select',
231
+ 'options' => array(
232
+ 'Person' => 'Person',
233
+ 'Organization' => 'Organization',
234
+ 'MusicGroup' => 'MusicGroup'
235
+ )
236
+ ),
237
+ array(
238
+ 'label' => 'Performer Name',
239
+ 'name' => 'saswp_event_performer_name',
240
+ 'type' => 'text',
241
+ ),
242
+ array(
243
+ 'label' => 'Performer URL',
244
+ 'name' => 'saswp_event_performer_url',
245
+ 'type' => 'text',
246
+ )
247
  ),
248
 
249
  'organizer' => array(
344
  'name' => 'saswp_qa_accepted_answer_url',
345
  'type' => 'text',
346
  ),
347
+ array(
348
+ 'label' => 'Accepted Answer Author Type',
349
+ 'name' => 'saswp_qa_accepted_author_type',
350
+ 'type' => 'select',
351
+ 'options' => array(
352
+ 'Person' => 'Person',
353
+ 'Organization' => 'Organization'
354
+ )
355
+ ),
356
  array(
357
  'label' => 'Accepted Answer Author Name',
358
  'name' => 'saswp_qa_accepted_author_name',
380
  'name' => 'saswp_qa_suggested_answer_url',
381
  'type' => 'text',
382
  ),
383
+ array(
384
+ 'label' => 'Accepted Answer Author Type',
385
+ 'name' => 'saswp_qa_suggested_author_type',
386
+ 'type' => 'select',
387
+ 'options' => array(
388
+ 'Person' => 'Person',
389
+ 'Organization' => 'Organization'
390
+ )
391
+ ),
392
  array(
393
  'label' => 'suggested Answer Author Name',
394
  'name' => 'saswp_qa_suggested_author_name',
395
  'type' => 'text',
396
+ )
397
  ),
398
  'howto_tool' => array(
399
  array(
515
  'name' => 'saswp_mc_risk_factor_name',
516
  'type' => 'text',
517
  )
518
+ ),
519
  'tvseries_actor' => array(
520
  array(
521
  'label' => 'Actor Name',
core/array-list/schema-properties.php CHANGED
@@ -24,7 +24,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
24
  if($review_type){
25
  $schema_type = $review_type;
26
  }else{
27
- $schema_type = get_post_meta($schema_id, 'schema_type', true);
28
  }
29
 
30
  if($manual == null){
@@ -45,11 +45,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
45
  $author_details = get_avatar_data($current_user->ID);
46
  }
47
 
48
- $business_type = get_post_meta($schema_id, 'saswp_business_type', true);
49
- $business_name = get_post_meta($schema_id, 'saswp_business_name', true);
50
  $saswp_business_type_key = 'saswp_business_type_'.$schema_id;
51
- $saved_business_type = get_post_meta( $post_id, $saswp_business_type_key, true );
52
- $saved_saswp_business_name = get_post_meta( $post_id, 'saswp_business_name_'.$schema_id, true );
53
 
54
  if($saved_business_type){
55
  $business_type = $saved_business_type;
@@ -445,7 +445,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
445
 
446
  case 'NewsArticle':
447
 
448
- $category_detail=get_the_category(get_the_ID());//$post->ID
449
  $article_section = '';
450
 
451
  foreach($category_detail as $cd){
@@ -1042,6 +1042,251 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
1042
  );
1043
  break;
1044
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1045
  case 'CreativeWork':
1046
  $meta_field = array(
1047
  array(
@@ -1159,7 +1404,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
1159
 
1160
  case 'SpecialAnnouncement':
1161
 
1162
- $category_detail =get_the_category(get_the_ID());//$post->ID
1163
  $article_section = '';
1164
 
1165
  if($category_detail){
@@ -1343,7 +1588,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
1343
 
1344
  case 'Event':
1345
 
1346
- $event_type = get_post_meta($schema_id, 'saswp_event_type', true);
1347
 
1348
  $meta_field = array(
1349
  array(
@@ -3864,7 +4109,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
3864
  array(
3865
  'label' => 'Question Upvote Count',
3866
  'id' => 'saswp_qa_upvote_count_'.$schema_id,
3867
- 'type' => 'text',
3868
  ),
3869
  array(
3870
  'label' => 'Question Date Created',
@@ -3874,7 +4119,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
3874
  array(
3875
  'label' => 'Author Type',
3876
  'id' => 'saswp_qa_question_author_type_'.$schema_id,
3877
- 'type' => 'text',
 
 
 
 
3878
  ),
3879
  array(
3880
  'label' => 'Author Name',
@@ -3884,7 +4133,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
3884
  array(
3885
  'label' => 'Answer Count',
3886
  'id' => 'saswp_qa_answer_count_'.$schema_id,
3887
- 'type' => 'text',
3888
  )
3889
 
3890
  );
@@ -3947,10 +4196,25 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
3947
  'type' => 'text',
3948
 
3949
  ),
3950
- array(
3951
- 'label' => 'Date Modified',
3952
- 'id' => 'saswp_howto_ec_schema_date_modified_'.$schema_id,
3953
- 'type' => 'text',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3954
  )
3955
  );
3956
  break;
@@ -5351,6 +5615,11 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
5351
  'id' => 'saswp_faq_date_modified_'.$schema_id,
5352
  'type' => 'text',
5353
  'default' => get_the_modified_date("Y-m-d")
 
 
 
 
 
5354
  )
5355
  );
5356
 
24
  if($review_type){
25
  $schema_type = $review_type;
26
  }else{
27
+ $schema_type = saswp_get_post_meta($schema_id, 'schema_type', true);
28
  }
29
 
30
  if($manual == null){
45
  $author_details = get_avatar_data($current_user->ID);
46
  }
47
 
48
+ $business_type = saswp_get_post_meta($schema_id, 'saswp_business_type', true);
49
+ $business_name = saswp_get_post_meta($schema_id, 'saswp_business_name', true);
50
  $saswp_business_type_key = 'saswp_business_type_'.$schema_id;
51
+ $saved_business_type = saswp_get_post_meta( $post_id, $saswp_business_type_key, true );
52
+ $saved_saswp_business_name = saswp_get_post_meta( $post_id, 'saswp_business_name_'.$schema_id, true );
53
 
54
  if($saved_business_type){
55
  $business_type = $saved_business_type;
445
 
446
  case 'NewsArticle':
447
 
448
+ $category_detail=get_the_category(saswp_get_the_ID());//$post->ID
449
  $article_section = '';
450
 
451
  foreach($category_detail as $cd){
1042
  );
1043
  break;
1044
 
1045
+ case 'EducationalOccupationalProgram':
1046
+ $meta_field = array(
1047
+ array(
1048
+ 'label' => 'Name',
1049
+ 'id' => 'saswp_eop_name_'.$schema_id,
1050
+ 'type' => 'text',
1051
+ 'default' => saswp_strip_all_tags(get_the_excerpt())
1052
+ ),
1053
+ array(
1054
+ 'label' => 'Description',
1055
+ 'id' => 'saswp_eop_description_'.$schema_id,
1056
+ 'type' => 'textarea',
1057
+ 'default' => saswp_strip_all_tags(get_the_excerpt())
1058
+ ),
1059
+ array(
1060
+ 'label' => 'URL',
1061
+ 'id' => 'saswp_eop_url_'.$schema_id,
1062
+ 'type' => 'text',
1063
+ 'default' => get_permalink(),
1064
+ ),
1065
+ array(
1066
+ 'label' => 'Image',
1067
+ 'id' => 'saswp_eop_image_'.$schema_id,
1068
+ 'type' => 'media'
1069
+ ),
1070
+ array(
1071
+ 'label' => 'Time To Complete',
1072
+ 'id' => 'saswp_eop_time_to_complete_'.$schema_id,
1073
+ 'type' => 'text',
1074
+ 'attributes' => array(
1075
+ 'placeholder' => 'P2Y'
1076
+ ),
1077
+ 'default' => ''
1078
+ ),
1079
+ array(
1080
+ 'label' => 'Occupational Category',
1081
+ 'id' => 'saswp_eop_occupational_category_'.$schema_id,
1082
+ 'type' => 'textarea',
1083
+ 'attributes' => array(
1084
+ 'placeholder' => '15-1111, 15-1121, 15-1122, 15-1131'
1085
+ ),
1086
+ 'default' => ''
1087
+ ),
1088
+ array(
1089
+ 'label' => 'Occupational Credential Awarded',
1090
+ 'id' => 'saswp_eop_occupational_credential_awarded_'.$schema_id,
1091
+ 'type' => 'text',
1092
+ 'attributes' => array(
1093
+ 'placeholder' => 'Associate Degree'
1094
+ ),
1095
+ 'default' => ''
1096
+ ),
1097
+ array(
1098
+ 'label' => 'Program Prerequisites',
1099
+ 'id' => 'saswp_eop_program_prerequisites_'.$schema_id,
1100
+ 'type' => 'text',
1101
+ 'attributes' => array(
1102
+ 'placeholder' => 'HighSchool'
1103
+ ),
1104
+ 'default' => ''
1105
+ ),
1106
+ array(
1107
+ 'label' => 'Application StartDate',
1108
+ 'id' => 'saswp_eop_application_start_date_'.$schema_id,
1109
+ 'type' => 'text',
1110
+ 'attributes' => array(
1111
+ 'placeholder' => '2019-05-14'
1112
+ ),
1113
+ 'default' => ''
1114
+ ),
1115
+ array(
1116
+ 'label' => 'Application Deadline',
1117
+ 'id' => 'saswp_eop_application_deadline_'.$schema_id,
1118
+ 'type' => 'text',
1119
+ 'attributes' => array(
1120
+ 'placeholder' => '2019-09-14'
1121
+ ),
1122
+ 'default' => ''
1123
+ ),
1124
+ array(
1125
+ 'label' => 'Start Date',
1126
+ 'id' => 'saswp_eop_start_date_'.$schema_id,
1127
+ 'type' => 'text',
1128
+ 'attributes' => array(
1129
+ 'placeholder' => '2019-10-01'
1130
+ ),
1131
+ 'default' => ''
1132
+ ),
1133
+ array(
1134
+ 'label' => 'End Date',
1135
+ 'id' => 'saswp_eop_end_date_'.$schema_id,
1136
+ 'type' => 'text',
1137
+ 'attributes' => array(
1138
+ 'placeholder' => '2021-10-01'
1139
+ ),
1140
+ 'default' => ''
1141
+ ),
1142
+ array(
1143
+ 'label' => 'Day Of Week',
1144
+ 'id' => 'saswp_eop_day_of_week_'.$schema_id,
1145
+ 'type' => 'textarea',
1146
+ 'attributes' => array(
1147
+ 'placeholder' => 'Wednesday, Thursday'
1148
+ ),
1149
+ 'note' => 'Note: Separate it by comma ( , )' ,
1150
+ 'default' => ''
1151
+ ),
1152
+ array(
1153
+ 'label' => 'Time Of Day',
1154
+ 'id' => 'saswp_eop_time_of_day_'.$schema_id,
1155
+ 'type' => 'text',
1156
+ 'attributes' => array(
1157
+ 'placeholder' => 'Morning'
1158
+ ),
1159
+ 'default' => ''
1160
+ ),
1161
+ array(
1162
+ 'label' => 'Number Of Credits',
1163
+ 'id' => 'saswp_eop_number_of_credits_'.$schema_id,
1164
+ 'type' => 'text',
1165
+ 'attributes' => array(
1166
+ 'placeholder' => '30'
1167
+ ),
1168
+ 'default' => ''
1169
+ ),
1170
+ array(
1171
+ 'label' => 'Typical Credits PerTerm',
1172
+ 'id' => 'saswp_eop_typical_credits_per_term_'.$schema_id,
1173
+ 'type' => 'text',
1174
+ 'attributes' => array(
1175
+ 'placeholder' => '12'
1176
+ ),
1177
+ 'default' => ''
1178
+ ),
1179
+ array(
1180
+ 'label' => 'Term Duration',
1181
+ 'id' => 'saswp_eop_term_duration_'.$schema_id,
1182
+ 'type' => 'text',
1183
+ 'attributes' => array(
1184
+ 'placeholder' => 'P4M'
1185
+ ),
1186
+ 'default' => ''
1187
+ ),
1188
+ array(
1189
+ 'label' => 'Terms PerYear',
1190
+ 'id' => 'saswp_eop_terms_per_year_'.$schema_id,
1191
+ 'type' => 'text',
1192
+ 'attributes' => array(
1193
+ 'placeholder' => '2'
1194
+ ),
1195
+ 'default' => ''
1196
+ ),
1197
+ array(
1198
+ 'label' => 'Maximum Enrollment',
1199
+ 'id' => 'saswp_eop_maximum_enrollment_'.$schema_id,
1200
+ 'type' => 'text',
1201
+ 'attributes' => array(
1202
+ 'placeholder' => '30'
1203
+ ),
1204
+ 'default' => ''
1205
+ ),
1206
+ array(
1207
+ 'label' => 'Educational Program Mode',
1208
+ 'id' => 'saswp_eop_educational_program_mode_'.$schema_id,
1209
+ 'type' => 'text',
1210
+ 'attributes' => array(
1211
+ 'placeholder' => 'IN_PERSON'
1212
+ ),
1213
+ 'default' => ''
1214
+ ),
1215
+ array(
1216
+ 'label' => 'Financial Aid Eligible',
1217
+ 'id' => 'saswp_eop_financial_aid_eligible_'.$schema_id,
1218
+ 'type' => 'text',
1219
+ 'attributes' => array(
1220
+ 'placeholder' => 'PUBLIC_AID'
1221
+ ),
1222
+ 'default' => ''
1223
+ ),
1224
+ array(
1225
+ 'label' => 'Provider Name',
1226
+ 'id' => 'saswp_eop_provider_name_'.$schema_id,
1227
+ 'type' => 'text',
1228
+ 'attributes' => array(
1229
+ 'placeholder' => 'ACME Community College'
1230
+ ),
1231
+ 'default' => ''
1232
+ ),
1233
+ array(
1234
+ 'label' => 'Provider Street Address',
1235
+ 'id' => 'saswp_eop_provider_street_address_'.$schema_id,
1236
+ 'type' => 'text',
1237
+ 'attributes' => array(
1238
+ 'placeholder' => '123 Main Street'
1239
+ ),
1240
+ 'default' => ''
1241
+ ),
1242
+ array(
1243
+ 'label' => 'Provider Address Locality',
1244
+ 'id' => 'saswp_eop_provider_address_locality_'.$schema_id,
1245
+ 'type' => 'text',
1246
+ 'attributes' => array(
1247
+ 'placeholder' => 'Boston'
1248
+ ),
1249
+ 'default' => ''
1250
+ ),
1251
+ array(
1252
+ 'label' => 'Provider Address Region',
1253
+ 'id' => 'saswp_eop_provider_address_region_'.$schema_id,
1254
+ 'type' => 'text',
1255
+ 'attributes' => array(
1256
+ 'placeholder' => 'MA'
1257
+ ),
1258
+ 'default' => ''
1259
+ ),
1260
+ array(
1261
+ 'label' => 'Provider Address Country',
1262
+ 'id' => 'saswp_eop_provider_address_country_'.$schema_id,
1263
+ 'type' => 'text',
1264
+ 'attributes' => array(
1265
+ 'placeholder' => 'US'
1266
+ ),
1267
+ 'default' => ''
1268
+ ),
1269
+ array(
1270
+ 'label' => 'Provider postalCode',
1271
+ 'id' => 'saswp_eop_provider_postal_code_'.$schema_id,
1272
+ 'type' => 'text',
1273
+ 'attributes' => array(
1274
+ 'placeholder' => '02134'
1275
+ ),
1276
+ 'default' => ''
1277
+ ),
1278
+ array(
1279
+ 'label' => 'Provider Telephone',
1280
+ 'id' => 'saswp_eop_provider_telephone_'.$schema_id,
1281
+ 'type' => 'text',
1282
+ 'attributes' => array(
1283
+ 'placeholder' => '+1-555-123-4567'
1284
+ ),
1285
+ 'default' => ''
1286
+ )
1287
+ );
1288
+ break;
1289
+
1290
  case 'CreativeWork':
1291
  $meta_field = array(
1292
  array(
1404
 
1405
  case 'SpecialAnnouncement':
1406
 
1407
+ $category_detail =get_the_category(saswp_get_the_ID());//$post->ID
1408
  $article_section = '';
1409
 
1410
  if($category_detail){
1588
 
1589
  case 'Event':
1590
 
1591
+ $event_type = saswp_get_post_meta($schema_id, 'saswp_event_type', true);
1592
 
1593
  $meta_field = array(
1594
  array(
4109
  array(
4110
  'label' => 'Question Upvote Count',
4111
  'id' => 'saswp_qa_upvote_count_'.$schema_id,
4112
+ 'type' => 'number',
4113
  ),
4114
  array(
4115
  'label' => 'Question Date Created',
4119
  array(
4120
  'label' => 'Author Type',
4121
  'id' => 'saswp_qa_question_author_type_'.$schema_id,
4122
+ 'type' => 'select',
4123
+ 'options' => array(
4124
+ 'Person' => 'Person',
4125
+ 'Organization' => 'Organization'
4126
+ )
4127
  ),
4128
  array(
4129
  'label' => 'Author Name',
4133
  array(
4134
  'label' => 'Answer Count',
4135
  'id' => 'saswp_qa_answer_count_'.$schema_id,
4136
+ 'type' => 'number',
4137
  )
4138
 
4139
  );
4196
  'type' => 'text',
4197
 
4198
  ),
4199
+ array(
4200
+ 'label' => 'Date Modified',
4201
+ 'id' => 'saswp_howto_ec_schema_date_modified_'.$schema_id,
4202
+ 'type' => 'text',
4203
+ ),
4204
+ array(
4205
+ 'label' => 'Supplies',
4206
+ 'id' => 'saswp_howto_schema_supplies_'.$schema_id,
4207
+ 'type' => 'repeater'
4208
+ ),
4209
+ array(
4210
+ 'label' => 'Tools',
4211
+ 'id' => 'saswp_howto_schema_tools_'.$schema_id,
4212
+ 'type' => 'repeater'
4213
+ ),
4214
+ array(
4215
+ 'label' => 'Steps',
4216
+ 'id' => 'saswp_howto_schema_steps_'.$schema_id,
4217
+ 'type' => 'repeater'
4218
  )
4219
  );
4220
  break;
5615
  'id' => 'saswp_faq_date_modified_'.$schema_id,
5616
  'type' => 'text',
5617
  'default' => get_the_modified_date("Y-m-d")
5618
+ ),
5619
+ array(
5620
+ 'label' => 'MainEntity (Questions & Answers) ',
5621
+ 'id' => 'saswp_faq_main_entity_'.$schema_id,
5622
+ 'type' => 'repeater'
5623
  )
5624
  );
5625
 
core/array-list/schemas.php CHANGED
@@ -49,12 +49,13 @@ return array(
49
  'VideoGame' => 'VideoGame'
50
  ),
51
  'Intangible' => array(
52
- 'ItemList' => 'ItemList',
53
- 'JobPosting' => 'JobPosting',
54
- 'Service' => 'Service',
55
- 'TaxiService' => 'TaxiService',
56
- 'Trip' => 'Trip',
57
- 'BoatTrip' => 'BoatTrip',
 
58
  ),
59
  'Media' => array(
60
  'AudioObject' => 'AudioObject',
49
  'VideoGame' => 'VideoGame'
50
  ),
51
  'Intangible' => array(
52
+ 'ItemList' => 'ItemList',
53
+ 'JobPosting' => 'JobPosting',
54
+ 'Service' => 'Service',
55
+ 'TaxiService' => 'TaxiService',
56
+ 'Trip' => 'Trip',
57
+ 'BoatTrip' => 'BoatTrip',
58
+ 'EducationalOccupationalProgram' => 'EducationalOccupationalProgram',
59
  ),
60
  'Media' => array(
61
  'AudioObject' => 'AudioObject',
core/global.php CHANGED
@@ -63,6 +63,7 @@ $without_aggregate = array(
63
  'TouristAttraction',
64
  'TouristDestination',
65
  'LandmarksOrHistoricalBuildings',
 
66
  'PsychologicalTreatment',
67
  'RentAction',
68
  'HinduTemple',
63
  'TouristAttraction',
64
  'TouristDestination',
65
  'LandmarksOrHistoricalBuildings',
66
+ 'EducationalOccupationalProgram',
67
  'PsychologicalTreatment',
68
  'RentAction',
69
  'HinduTemple',
modules/gutenberg/assets/blocks/location.js ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ( function( blocks, element, editor, components, i18n ) {
3
+
4
+ const el = element.createElement;
5
+ const { __ } = i18n;
6
+ const {SelectControl } = components;
7
+
8
+ blocks.registerBlockType( 'saswp/location-block', {
9
+ title: __('Location (SASWP)', 'schema-and-structured-data-for-wp'),
10
+ icon: 'dashicons dashicons-location',
11
+ category: 'saswp-blocks',
12
+ keywords: ['schema', 'structured data', 'Location', 'location'],
13
+
14
+ attributes:{
15
+ id: {
16
+ type: 'integer'
17
+ }
18
+ },
19
+ supports: {
20
+ multiple: true
21
+ },
22
+ edit: function( props ) {
23
+
24
+ var collection = '';
25
+
26
+ if(saswpGutenbergLocation.location){
27
+ collection = el(SelectControl,{
28
+ className:'saswp-rv-collection-list',
29
+ value: props.attributes.id,
30
+ options:saswpGutenbergLocation.location,
31
+ onChange: function(value){
32
+
33
+ props.setAttributes( { id: parseInt(value) } );
34
+ }
35
+ }
36
+ );
37
+ }
38
+ if(saswpGutenbergLocation.location_not_found){
39
+
40
+ collection = el('div',{className:'saswp-collection-not-found'},
41
+ __('Location not found ', 'schema-and-structured-data-for-wp'),
42
+ el('a',{
43
+ href:saswpGutenbergLocation.location_url
44
+ },
45
+ __('Create One', 'schema-and-structured-data-for-wp'),
46
+ )
47
+ );
48
+
49
+ }
50
+
51
+ return collection;
52
+ },
53
+ save: function( props ) {
54
+ return null;
55
+ }
56
+ } );
57
+ }(
58
+ window.wp.blocks,
59
+ window.wp.element,
60
+ window.wp.blockEditor,
61
+ window.wp.components,
62
+ window.wp.i18n
63
+ ) );
64
+
modules/gutenberg/assets/blocks/recipe.js ADDED
@@ -0,0 +1,542 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ( function( blocks, element, editor, components, i18n) {
3
+
4
+ const el = element.createElement;
5
+ const { __ } = i18n;
6
+ const { RichText, MediaUpload } = editor;
7
+ const {Button, TextControl} = components;
8
+
9
+ blocks.registerBlockType( 'saswp/recipe-block', {
10
+ title: __('Recipe (SASWP)', 'schema-and-structured-data-for-wp'),
11
+ icon: 'dashicons dashicons-food',
12
+ category: 'saswp-blocks',
13
+ keywords: ['schema', 'structured data', 'Recipe', 'recipe'],
14
+
15
+ supports: {
16
+ multiple: true
17
+ },
18
+
19
+ attributes: {
20
+ servings: {
21
+ type: 'string'
22
+ },
23
+ cook_time: {
24
+ type: 'string'
25
+ },
26
+ pre_time: {
27
+ type: 'string'
28
+ },
29
+ calories: {
30
+ type: 'string'
31
+ },
32
+ banner_id: {
33
+ type: 'integer'
34
+ },
35
+ banner_url: {
36
+ type: 'string'
37
+ },
38
+ video_id: {
39
+ type: 'integer'
40
+ },
41
+ video_url: {
42
+ type: 'string'
43
+ },
44
+ notes_label: {
45
+ type: 'string',
46
+ default: 'NOTES'
47
+ },
48
+ title: {
49
+ type: 'string',
50
+ default: 'Recipe Block'
51
+ },
52
+ direction_label: {
53
+ type: 'string',
54
+ default: 'DIRECTION'
55
+ },
56
+ ingredients_label: {
57
+ type: 'string',
58
+ default: 'INGREDIENTS '
59
+ },
60
+ author: {
61
+ type: 'string',
62
+ },
63
+ course: {
64
+ type: 'string'
65
+ },
66
+ cuisine: {
67
+ type: 'string'
68
+ },
69
+ difficulty: {
70
+ type: 'string'
71
+ },
72
+ notes: {
73
+ default: [{index: 0, text:''}],
74
+ query: {
75
+
76
+ index: {
77
+ type: 'number',
78
+ attribute: 'data-index'
79
+ },
80
+ text: {
81
+ type: 'string'
82
+ }
83
+
84
+ }
85
+ },
86
+ ingredients: {
87
+ default: [{index: 0,name:''}],
88
+ query: {
89
+ index: {
90
+ type: 'number',
91
+ attribute: 'data-index'
92
+ },
93
+ name: {
94
+ type: 'string',
95
+ }
96
+ }
97
+ },
98
+ directions: {
99
+ default: [{index: 0, name:'', text:''}],
100
+ query: {
101
+ index: {
102
+ type: 'number',
103
+ attribute: 'data-index'
104
+ },
105
+ name: {
106
+ type: 'string',
107
+ selector: '.name'
108
+ },
109
+ text: {
110
+ type: 'string',
111
+ selector: '.text'
112
+ }
113
+ }
114
+ }
115
+ },
116
+ edit: function( props ){
117
+
118
+ const attributes = props.attributes;
119
+
120
+ function _cloneArray(arr) {
121
+ if (Array.isArray(arr)) {
122
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
123
+ arr2[i] = arr[i];
124
+ }
125
+ return arr2;
126
+ } else {
127
+ return Array.from(arr);
128
+ }
129
+ }
130
+
131
+ var banner_section = el('div',{
132
+ className: 'saswp-recipe-field-banner'
133
+ },
134
+
135
+ attributes.banner_url ?
136
+ el('div',{className:'saswp-book-banner-div'},
137
+ el('span',{
138
+ className:'dashicons dashicons-trash',
139
+ onClick: function(){
140
+ props.setAttributes( { banner_id: null, banner_url: '' } );
141
+ }
142
+ }),
143
+ el('img',{
144
+ src: attributes.banner_url,
145
+ })
146
+ )
147
+
148
+ :
149
+ el(
150
+ MediaUpload,{
151
+ onSelect: function(media){
152
+ props.setAttributes( { banner_id: media.id, banner_url: media.url } );
153
+ },
154
+ allowedTypes:[ "image" ],
155
+ value: attributes.banner_id,
156
+ render:function(obj){
157
+ return el( Button, {
158
+ className: 'button button-primary',
159
+ onClick: obj.open
160
+ },
161
+ __('Add Image', 'schema-and-structured-data-for-wp')
162
+ )
163
+ }
164
+ },
165
+ )
166
+
167
+ );
168
+
169
+ var heading_section = el(
170
+ 'div',{
171
+ className: 'saswp-recipe-block-heading'
172
+ },
173
+ el( RichText, {
174
+ tagName: 'h4',
175
+ placeholder: __('Recipe Block', 'schema-and-structured-data-for-wp'),
176
+ value: attributes.title,
177
+ autoFocus: true,
178
+ onChange: function( newContent ) {
179
+ props.setAttributes( { title: newContent } );
180
+ }
181
+ }),
182
+ el('span',{className: 'saswp-recipe-block-author'},'Recipe By ',
183
+ el(TextControl,{
184
+ className:'',
185
+ placeholder: __('author name', 'schema-and-structured-data-for-wp'),
186
+ value: attributes.author,
187
+ onChange: function(newContent){
188
+ props.setAttributes({author: newContent})
189
+ }
190
+ })
191
+ ),
192
+ el('div',{className:'saswp-r-course-section'},
193
+ el('span',{className: 'saswp-recipe-block-course'},'Course: ',el('strong',{},
194
+ el(TextControl,{
195
+ className:'',placeholder: __('Starter', 'schema-and-structured-data-for-wp'),
196
+ value: attributes.course,
197
+ onChange: function( newContent ) {
198
+ props.setAttributes( { course: newContent } );
199
+ }
200
+ },
201
+ )
202
+ )),
203
+ el('span',{className: 'saswp-recipe-block-cuisine'},'Cusine: ',el('strong',{},
204
+ el(TextControl,{
205
+ className:'',placeholder: __('American', 'schema-and-structured-data-for-wp'),
206
+ value: attributes.cuisine,
207
+ onChange: function( newContent ) {
208
+ props.setAttributes( { cuisine: newContent } );
209
+ }
210
+ })
211
+ )),
212
+ el('span',{className: 'saswp-recipe-block-difficulty'},'Difficulty: ',el('strong',{},
213
+ el(TextControl,
214
+ {
215
+ className:'',
216
+ placeholder: __('Easy', 'schema-and-structured-data-for-wp'),
217
+ value: attributes.difficulty,
218
+ onChange: function( newContent ) {
219
+ props.setAttributes( { difficulty: newContent } );
220
+ }
221
+ }
222
+ )
223
+ ))
224
+ )
225
+
226
+
227
+ );
228
+
229
+ var details_section = el(
230
+ 'div',{
231
+ className: 'saswp-recipe-block-details'
232
+ },
233
+ el('div',{className:'saswp-recipe-block-details-items'},
234
+
235
+ el('div', {className:'saswp-recipe-block-details-item'},
236
+
237
+ el('p', {className:'saswp-r-b-label'}, 'Servings'),
238
+ el(TextControl,{
239
+ className:'saswp-r-b-input',
240
+ value : attributes.servings,
241
+ placeholder: __('30', 'schema-and-structured-data-for-wp'),
242
+ onChange:function(newContent){
243
+ props.setAttributes( { servings: newContent } );
244
+ }
245
+ }),
246
+ el('p', {className:'saswp-r-b-unit'}, 'minutes'),
247
+ ),
248
+
249
+ el('div', {className:'saswp-recipe-block-details-item'},
250
+
251
+ el('p', {className:'saswp-r-b-label'}, 'Prep Time'),
252
+ el(TextControl,{
253
+ className:'saswp-r-b-input',
254
+ value : attributes.pre_time,
255
+ placeholder: __('30', 'schema-and-structured-data-for-wp'),
256
+ onChange:function(newContent){
257
+ props.setAttributes( { pre_time: newContent } );
258
+ }
259
+ }),
260
+ el('p', {className:'saswp-r-b-unit'}, 'minutes'),
261
+ ),
262
+
263
+ el('div', {className:'saswp-recipe-block-details-item'},
264
+
265
+ el('p', {className:'saswp-r-b-label'}, 'Cooking Time'),
266
+ el(TextControl,{
267
+ className:'saswp-r-b-input',
268
+ value : attributes.cook_time,
269
+ placeholder: __('20', 'schema-and-structured-data-for-wp'),
270
+ onChange:function(newContent){
271
+ props.setAttributes( { cook_time: newContent } );
272
+ }
273
+ }),
274
+ el('p', {className:'saswp-r-b-unit'}, 'minutes'),
275
+ ),
276
+
277
+ el('div', {className:'saswp-recipe-block-details-item'},
278
+
279
+ el('p', {className:'saswp-r-b-label'}, 'Calories'),
280
+ el(TextControl,{
281
+ className:'saswp-r-b-input',
282
+ value : attributes.calories,
283
+ placeholder: __('300', 'schema-and-structured-data-for-wp'),
284
+ onChange:function(newContent){
285
+ props.setAttributes( { calories: newContent } );
286
+ }
287
+ }),
288
+ el('p', {className:'saswp-r-b-unit'}, 'kcal'),
289
+ )
290
+
291
+ )
292
+ );
293
+
294
+ var ingredients_loop = attributes.ingredients.sort(function(a, b){
295
+ return a.index - b.index;
296
+ }).map(function(item, i){
297
+
298
+ return el('li',{className:'saswp-r-b-direction-item'},
299
+ el(Button,{
300
+ icon:'trash',
301
+ 'data-id': i,
302
+ className: 'saswp-remove-repeater',
303
+ onClick: function(e){
304
+
305
+ let data_id = e.currentTarget.dataset.id;
306
+ let clonedata = [...attributes.ingredients];
307
+ clonedata.splice(data_id, 1);
308
+ props.setAttributes( { ingredients: clonedata } );
309
+
310
+ }
311
+ }),
312
+ el(RichText,{
313
+ tagName: 'p',
314
+ className: "saswp-recipe-b-directions",
315
+ placeholder: __('Enter ingredients name', 'schema-and-structured-data-for-wp'),
316
+ value: item.name,
317
+ autoFocus: true,
318
+ onChange: function( value ) {
319
+ var newObject = Object.assign({}, item, {
320
+ name: value
321
+ });
322
+
323
+ return props.setAttributes({
324
+ ingredients: [].concat(_cloneArray(props.attributes.ingredients.filter(function (itemFilter) {
325
+ return itemFilter.index != item.index;
326
+ })), [newObject])
327
+ });
328
+ }
329
+ })
330
+ );
331
+
332
+ });
333
+
334
+ var ingredients_section = el(
335
+ 'div',{
336
+ className: 'saswp-recipe-block-ingredients'
337
+ },
338
+ el( RichText, {
339
+ tagName: 'h5',
340
+ placeholder: __('INGREDIENTS', 'schema-and-structured-data-for-wp'),
341
+ value: attributes.ingredients_label,
342
+ autoFocus: true,
343
+ onChange: function( newContent ) {
344
+ props.setAttributes( { ingredients_label: newContent } );
345
+ }
346
+ }),
347
+ el('ol',{className:'saswp-dirction-ul'},ingredients_loop),
348
+ el(Button,
349
+ {className:'saswp-org-repeater',
350
+ isSecondary: true,
351
+ isLarge : true,
352
+ onClick: function() {
353
+ return props.setAttributes({
354
+ ingredients: [].concat(_cloneArray(props.attributes.ingredients), [{
355
+ index: props.attributes.ingredients.length
356
+ }])
357
+ });
358
+ }
359
+ },
360
+ __('Add More Ingredients', 'schema-and-structured-data-for-wp')
361
+ )
362
+ );
363
+
364
+
365
+ var directions_loop = attributes.directions.sort(function(a, b){
366
+ return a.index - b.index;
367
+ }).map(function(item, i){
368
+
369
+ return el('li',{className:'saswp-r-b-direction-item'},
370
+ el(Button,{
371
+ icon:'trash',
372
+ 'data-id': i,
373
+ className: 'saswp-remove-repeater',
374
+ onClick: function(e){
375
+
376
+ let data_id = e.currentTarget.dataset.id;
377
+ let clonedata = [...attributes.directions];
378
+ clonedata.splice(data_id, 1);
379
+ props.setAttributes( { directions: clonedata } );
380
+
381
+ }
382
+ }),
383
+ el(RichText,{
384
+ tagName: 'p',
385
+ className: "saswp-recipe-b-directions",
386
+ placeholder: __('Enter direction name', 'schema-and-structured-data-for-wp'),
387
+ value: item.name,
388
+ onChange: function( value ) {
389
+ var newObject = Object.assign({}, item, {
390
+ name: value
391
+ });
392
+
393
+ return props.setAttributes({
394
+ directions: [].concat(_cloneArray(props.attributes.directions.filter(function (itemFilter) {
395
+ return itemFilter.index != item.index;
396
+ })), [newObject])
397
+ });
398
+ }
399
+ }),
400
+ el(RichText,{
401
+ tagName: 'p',
402
+ className: "saswp-recipe-b-directions",
403
+ value: item.text,
404
+ placeholder: __('Enter direction text', 'schema-and-structured-data-for-wp'),
405
+ onChange: function( value ) {
406
+ var newObject = Object.assign({}, item, {
407
+ text: value
408
+ });
409
+
410
+ return props.setAttributes({
411
+ directions: [].concat(_cloneArray(props.attributes.directions.filter(function (itemFilter) {
412
+ return itemFilter.index != item.index;
413
+ })), [newObject])
414
+ });
415
+ }
416
+ }),
417
+ );
418
+
419
+ });
420
+
421
+ var direction_section = el(
422
+ 'div',{
423
+ className: 'saswp-recipe-block-direction'
424
+ },
425
+ el( RichText, {
426
+ tagName: 'h5',
427
+ placeholder: __('DIRECTION', 'schema-and-structured-data-for-wp'),
428
+ value: attributes.direction_label,
429
+ autoFocus: true,
430
+ onChange: function( newContent ) {
431
+ props.setAttributes( { direction_label: newContent } );
432
+ }
433
+ }),
434
+ el('ol',{className:'saswp-dirction-ul'},directions_loop),
435
+ el(Button,
436
+ {className:'saswp-org-repeater',
437
+ isSecondary: true,
438
+ isLarge : true,
439
+ onClick: function() {
440
+ return props.setAttributes({
441
+ directions: [].concat(_cloneArray(props.attributes.directions), [{
442
+ index: props.attributes.directions.length
443
+ }])
444
+ });
445
+ }
446
+ },
447
+ __('Add More Direction', 'schema-and-structured-data-for-wp')
448
+ )
449
+ );
450
+
451
+ var notes_loop = attributes.notes.sort(function(a, b){
452
+ return a.index - b.index;
453
+ }).map(function(item, i){
454
+
455
+ return el('div',{className:'saswp-event-performers'},
456
+ el(Button,{
457
+ icon:'trash',
458
+ 'data-id': i,
459
+ className: 'saswp-remove-repeater',
460
+ onClick: function(e){
461
+
462
+ let data_id = e.currentTarget.dataset.id;
463
+ let clonedata = [...attributes.notes];
464
+ clonedata.splice(data_id, 1);
465
+ props.setAttributes( { notes: clonedata } );
466
+
467
+ }
468
+ }),
469
+ el(RichText,{
470
+ tagName: 'p',
471
+ className: "saswp-recipe-b-notes",
472
+ value: item.text,
473
+ onChange: function( value ) {
474
+ var newObject = Object.assign({}, item, {
475
+ text: value
476
+ });
477
+
478
+ return props.setAttributes({
479
+ notes: [].concat(_cloneArray(props.attributes.notes.filter(function (itemFilter) {
480
+ return itemFilter.index != item.index;
481
+ })), [newObject])
482
+ });
483
+ }
484
+ })
485
+ );
486
+
487
+ });
488
+
489
+ var notes_section = el('div',
490
+ {
491
+ className: 'saswp-recipe-block-notes'
492
+ },
493
+ el( RichText, {
494
+ tagName: 'h5',
495
+ placeholder: __('NOTES', 'schema-and-structured-data-for-wp'),
496
+ value: attributes.notes_label,
497
+ autoFocus: true,
498
+ onChange: function( newContent ) {
499
+ props.setAttributes( { notes_label: newContent } );
500
+ }
501
+ }),
502
+ notes_loop,
503
+ el(Button,
504
+ {className:'saswp-org-repeater',
505
+ isSecondary: true,
506
+ isLarge : true,
507
+ onClick: function() {
508
+ return props.setAttributes({
509
+ notes: [].concat(_cloneArray(props.attributes.notes), [{
510
+ index: props.attributes.notes.length
511
+ }])
512
+ });
513
+ }
514
+ },
515
+ __('Add More Notes', 'schema-and-structured-data-for-wp')
516
+ )
517
+ )
518
+
519
+ return (
520
+ el('div', {className: 'saswp-recipe-block-container'},
521
+ banner_section,
522
+ heading_section,
523
+ details_section,
524
+ ingredients_section,
525
+ direction_section,
526
+ notes_section
527
+ )
528
+ );
529
+
530
+ },
531
+ save: function( props ) {
532
+ return null
533
+ }
534
+ });
535
+ }(
536
+ window.wp.blocks,
537
+ window.wp.element,
538
+ window.wp.blockEditor,
539
+ window.wp.components,
540
+ window.wp.i18n,
541
+ ) );
542
+
modules/gutenberg/assets/css/amp/recipe.css ADDED
File without changes
modules/gutenberg/assets/css/editor.css CHANGED
@@ -209,4 +209,152 @@ and open the template in the editor.
209
  }
210
  .saswp-how-to-image-dimension{
211
  margin: 3px;
212
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  }
210
  .saswp-how-to-image-dimension{
211
  margin: 3px;
212
+ }
213
+ /*
214
+ Recipe Block css starst here
215
+ */
216
+ .saswp-recipe-block-container{
217
+ padding: 20px 25px 30px;
218
+ margin-top: 50px;
219
+ margin-bottom: 50px;
220
+ background: #ffffff;
221
+ border: 1px solid rgba(0,0,0,0.1);
222
+ -webkit-box-shadow: 0 0px 15px rgb(0 0 0 / 10%);
223
+ box-shadow: 0 0px 15px rgb(0 0 0 / 10%);
224
+ border-radius: 5px 5px 0 0;
225
+ }
226
+ .saswp-recipe-block-author{
227
+ display: block;
228
+ color: #5b5d61;
229
+ font-size: 14px;
230
+ font-weight: normal;
231
+ margin: 0 0 12px;
232
+ padding: 0 0 12px;
233
+ border-bottom: 1px dashed rgba(0,0,0,0.1);
234
+ }
235
+ .saswp-recipe-block-course{
236
+ font-size: 14px;
237
+ color: #5b5d61;
238
+ }
239
+ .saswp-recipe-block-cuisine::before{
240
+ content: " | ";
241
+ color: #B6BABB;
242
+ margin: 0 12px;
243
+ font-style: normal;
244
+ opacity: .5;
245
+ }
246
+ .saswp-recipe-block-cuisine{
247
+ font-size: 14px;
248
+ color: #5b5d61;
249
+ }
250
+ .saswp-recipe-block-difficulty::before{
251
+ content: " | ";
252
+ color: #B6BABB;
253
+ margin: 0 12px;
254
+ font-style: normal;
255
+ opacity: .5;
256
+ }
257
+ .saswp-recipe-block-difficulty{
258
+ font-size: 14px;
259
+ color: #5b5d61;
260
+ }
261
+ .saswp-recipe-block-details{
262
+ margin-bottom: 15px;
263
+ clear: both;
264
+ }
265
+ .saswp-recipe-block-details-items{
266
+ font-size: 0;
267
+ border-left: 1px dashed rgba(0,0,0,0.1);
268
+ border-top: 1px dashed rgba(0,0,0,0.1);
269
+ text-align: center;
270
+ display: -ms-flexbox;
271
+ display: flex;
272
+ -ms-flex-wrap: wrap;
273
+ flex-wrap: wrap;
274
+ }
275
+ .saswp-recipe-block-details-item{
276
+ flex: 1 0 25%;
277
+ padding: 10px 1.5%;
278
+ position: relative;
279
+ -webkit-box-sizing: border-box;
280
+ box-sizing: border-box;
281
+ border-right: 1px dashed rgba(0,0,0,0.1);
282
+ border-bottom: 1px dashed rgba(0,0,0,0.1);
283
+ }
284
+ .saswp-r-b-icon{
285
+ opacity: .7;
286
+ margin: 0 auto;
287
+ height: 35px;
288
+ line-height: 35px;
289
+ font-size: 16px;
290
+ color: #6d767f;
291
+ }
292
+ .saswp-r-b-label{
293
+ margin-top: 0 !important;
294
+ margin-bottom: 0 !important;
295
+ font-size: 14px !important;
296
+ font-weight: 600 !important ;
297
+ }
298
+ .saswp-r-b-input{
299
+ margin-top: 0;
300
+ margin-bottom: 0;
301
+ margin-right: 5px;
302
+ display: inline-block;
303
+ line-height: 1.4;
304
+ width: 50px;
305
+ font-size: 13px;
306
+ }
307
+ .saswp-r-b-unit{
308
+ margin-top: 0 !important;
309
+ margin-bottom: 0 !important;
310
+ display: inline-block;
311
+ line-height: 1.4;
312
+ font-size: 14px !important;
313
+ }
314
+ .saswp-recipe-b-notes{
315
+ background: #fbf9e7;
316
+ }
317
+ .saswp-r-b-direction-item{
318
+ border-bottom: 1px solid #e9e5c9;
319
+ position: relative;
320
+ }
321
+
322
+ .saswp-recipe-field-banner img{
323
+ width: 100%;
324
+
325
+ }
326
+ .saswp-recipe-field-banner .components-button{
327
+ margin-top: 85px !important;
328
+ }
329
+ .saswp-recipe-field-banner{
330
+ min-height: 200px;
331
+ background: #ccc;
332
+ text-align: center;
333
+ justify-content: center;
334
+ align-items: center;
335
+ }
336
+ .saswp-recipe-block-author{
337
+ display: flex;
338
+ }
339
+ .saswp-recipe-block-author input{
340
+ margin-left: 3px;
341
+ }
342
+ .saswp-r-course-section{
343
+ display: flex;
344
+ }
345
+ .saswp-r-course-section input{
346
+ width: 120px !important;
347
+ margin-left: 8px !important;
348
+ }
349
+ .saswp-recipe-block-course{
350
+ display: flex;
351
+ }
352
+ .saswp-recipe-block-cuisine{
353
+ display: flex;
354
+ }
355
+ .saswp-recipe-block-difficulty{
356
+ display: flex;
357
+ }
358
+ /*
359
+ Recipe Block css ens here
360
+ */
modules/gutenberg/assets/css/recipe.css ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Recipe Block css starst here
3
+ */
4
+ .saswp-recipe-block-container{
5
+ padding: 20px 25px 30px;
6
+ margin-top: 50px;
7
+ margin-bottom: 50px;
8
+ background: #ffffff;
9
+ border: 1px solid rgba(0,0,0,0.1);
10
+ -webkit-box-shadow: 0 0px 15px rgb(0 0 0 / 10%);
11
+ box-shadow: 0 0px 15px rgb(0 0 0 / 10%);
12
+ border-radius: 5px 5px 0 0;
13
+ }
14
+ .saswp-recipe-block-author{
15
+ display: block;
16
+ color: #5b5d61;
17
+ font-size: 14px;
18
+ font-weight: normal;
19
+ margin: 0 0 12px;
20
+ padding: 0 0 12px;
21
+ border-bottom: 1px dashed rgba(0,0,0,0.1);
22
+ }
23
+ .saswp-recipe-block-course{
24
+ font-size: 14px;
25
+ color: #5b5d61;
26
+ }
27
+ .saswp-r-course-section strong{
28
+ margin-left: 8px;
29
+ }
30
+ .saswp-recipe-block-cuisine::before{
31
+ content: " | ";
32
+ color: #B6BABB;
33
+ margin: 0 12px;
34
+ font-style: normal;
35
+ opacity: .5;
36
+ }
37
+ .saswp-recipe-block-cuisine{
38
+ font-size: 14px;
39
+ color: #5b5d61;
40
+ }
41
+ .saswp-recipe-block-difficulty::before{
42
+ content: " | ";
43
+ color: #B6BABB;
44
+ margin: 0 12px;
45
+ font-style: normal;
46
+ opacity: .5;
47
+ }
48
+ .saswp-recipe-block-difficulty{
49
+ font-size: 14px;
50
+ color: #5b5d61;
51
+ }
52
+ .saswp-recipe-block-details{
53
+ margin-bottom: 15px;
54
+ clear: both;
55
+ }
56
+ .saswp-recipe-block-details-items{
57
+ font-size: 0;
58
+ border-left: 1px dashed rgba(0,0,0,0.1);
59
+ border-top: 1px dashed rgba(0,0,0,0.1);
60
+ text-align: center;
61
+ display: -ms-flexbox;
62
+ display: flex;
63
+ -ms-flex-wrap: wrap;
64
+ flex-wrap: wrap;
65
+ }
66
+ .saswp-recipe-block-details-item{
67
+ flex: 1 0 25%;
68
+ padding: 10px 1.5%;
69
+ position: relative;
70
+ -webkit-box-sizing: border-box;
71
+ box-sizing: border-box;
72
+ border-right: 1px dashed rgba(0,0,0,0.1);
73
+ border-bottom: 1px dashed rgba(0,0,0,0.1);
74
+ }
75
+ .saswp-r-b-icon{
76
+ opacity: .7;
77
+ margin: 0 auto;
78
+ height: 35px;
79
+ line-height: 35px;
80
+ font-size: 16px;
81
+ color: #6d767f;
82
+ }
83
+ .saswp-r-b-label{
84
+ margin-top: 0 !important;
85
+ margin-bottom: 0 !important;
86
+ font-size: 14px !important;
87
+ font-weight: 600 !important ;
88
+ }
89
+ .saswp-r-b-input{
90
+ margin-top: 0;
91
+ margin-bottom: 0;
92
+ margin-right: 5px;
93
+ display: inline-block;
94
+ line-height: 1.4;
95
+ width: 50px;
96
+ font-size: 13px;
97
+ }
98
+ .saswp-r-b-unit{
99
+ margin-top: 0 !important;
100
+ margin-bottom: 0 !important;
101
+ display: inline-block;
102
+ line-height: 1.4;
103
+ font-size: 14px !important;
104
+ }
105
+ .saswp-recipe-b-notes{
106
+ background: #fbf9e7;
107
+ }
108
+ .saswp-r-b-direction-item{
109
+ border-bottom: 1px solid #e9e5c9;
110
+ position: relative;
111
+ }
112
+
113
+ .saswp-recipe-field-banner img{
114
+ width: 100%;
115
+
116
+ }
117
+ .saswp-recipe-field-banner .components-button{
118
+ margin-top: 85px !important;
119
+ }
120
+ .saswp-recipe-field-banner{
121
+ min-height: 200px;
122
+ background: #ccc;
123
+ text-align: center;
124
+ justify-content: center;
125
+ align-items: center;
126
+ }
127
+ .saswp-recipe-block-author{
128
+ display: flex;
129
+ }
130
+ .saswp-recipe-block-author input{
131
+ margin-left: 3px;
132
+ }
133
+ .saswp-r-course-section{
134
+ display: flex;
135
+ }
136
+ .saswp-r-course-section input{
137
+ width: 120px !important;
138
+ margin-left: 8px !important;
139
+ }
140
+ .saswp-recipe-block-course{
141
+ display: flex;
142
+ }
143
+ .saswp-recipe-block-cuisine{
144
+ display: flex;
145
+ }
146
+ .saswp-recipe-block-difficulty{
147
+ display: flex;
148
+ }
149
+ /*
150
+ Recipe Block css ens here
151
+ */
modules/gutenberg/includes/class-gutenberg.php CHANGED
@@ -31,6 +31,15 @@ class SASWP_Gutenberg {
31
  'editor' => 'saswp-gutenberg-css-reg-editor',
32
  'local' => array()
33
  ),
 
 
 
 
 
 
 
 
 
34
  'book' => array(
35
  'handler' => 'saswp-book-js-reg',
36
  'local_var' => 'saswpGutenbergBook',
@@ -40,6 +49,15 @@ class SASWP_Gutenberg {
40
  'editor' => 'saswp-gutenberg-css-reg-editor',
41
  'local' => array()
42
  ),
 
 
 
 
 
 
 
 
 
43
  'course' => array(
44
  'handler' => 'saswp-course-js-reg',
45
  'local_var' => 'saswpGutenbergCourse',
@@ -153,6 +171,10 @@ class SASWP_Gutenberg {
153
  $amp_css = SASWP_PLUGIN_DIR_PATH . 'modules/gutenberg/assets/css/amp/book.css';
154
  echo @file_get_contents($amp_css);
155
  }
 
 
 
 
156
 
157
  }
158
 
@@ -222,6 +244,15 @@ class SASWP_Gutenberg {
222
  );
223
 
224
  }
 
 
 
 
 
 
 
 
 
225
 
226
  }
227
 
@@ -266,7 +297,19 @@ class SASWP_Gutenberg {
266
  $block['local']['collection_not_found'] = true;
267
  $block['local']['collection_url'] = wp_nonce_url(admin_url('admin.php?page=collection'), '_wpnonce');
268
  }
 
 
 
 
 
 
 
 
 
 
 
269
  }
 
270
 
271
  wp_localize_script( $block['handler'], $block['local_var'], $block['local'] );
272
 
@@ -319,6 +362,22 @@ class SASWP_Gutenberg {
319
  return ob_get_clean();
320
 
321
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
 
323
  public function render_book_data($attributes){
324
 
@@ -335,6 +394,21 @@ class SASWP_Gutenberg {
335
 
336
  }
337
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  public function render_course_data($attributes){
339
 
340
  ob_start();
31
  'editor' => 'saswp-gutenberg-css-reg-editor',
32
  'local' => array()
33
  ),
34
+ 'location' => array(
35
+ 'handler' => 'saswp-location-js-reg',
36
+ 'local_var' => 'saswpGutenbergLocation',
37
+ 'block_name' => 'location-block',
38
+ 'render_func' => 'render_location_data',
39
+ 'style' => 'saswp-g-location-css',
40
+ 'editor' => 'saswp-gutenberg-css-reg-editor',
41
+ 'local' => array()
42
+ ),
43
  'book' => array(
44
  'handler' => 'saswp-book-js-reg',
45
  'local_var' => 'saswpGutenbergBook',
49
  'editor' => 'saswp-gutenberg-css-reg-editor',
50
  'local' => array()
51
  ),
52
+ 'recipe' => array(
53
+ 'handler' => 'saswp-recipe-js-reg',
54
+ 'local_var' => 'saswpGutenbergRecipe',
55
+ 'block_name' => 'recipe-block',
56
+ 'render_func' => 'render_recipe_data',
57
+ 'style' => 'saswp-g-recipe-css',
58
+ 'editor' => 'saswp-gutenberg-css-reg-editor',
59
+ 'local' => array()
60
+ ),
61
  'course' => array(
62
  'handler' => 'saswp-course-js-reg',
63
  'local_var' => 'saswpGutenbergCourse',
171
  $amp_css = SASWP_PLUGIN_DIR_PATH . 'modules/gutenberg/assets/css/amp/book.css';
172
  echo @file_get_contents($amp_css);
173
  }
174
+ if(isset($parse_blocks['blockName']) && $parse_blocks['blockName'] === 'saswp/recipe-block'){
175
+ $amp_css = SASWP_PLUGIN_DIR_PATH . 'modules/gutenberg/assets/css/amp/recipe.css';
176
+ echo @file_get_contents($amp_css);
177
+ }
178
 
179
  }
180
 
244
  );
245
 
246
  }
247
+ if(isset($parse_blocks['blockName']) && $parse_blocks['blockName'] === 'saswp/recipe-block'){
248
+
249
+ wp_enqueue_style(
250
+ 'saswp-g-recipe-css',
251
+ SASWP_PLUGIN_URL . '/modules/gutenberg/assets/css/recipe.css',
252
+ array()
253
+ );
254
+
255
+ }
256
 
257
  }
258
 
297
  $block['local']['collection_not_found'] = true;
298
  $block['local']['collection_url'] = wp_nonce_url(admin_url('admin.php?page=collection'), '_wpnonce');
299
  }
300
+ }
301
+
302
+ if($key == 'location'){
303
+
304
+ $col_opt = saswp_get_location_list();
305
+
306
+ if($col_opt){
307
+ $block['local']['location'] = $col_opt;
308
+ }else{
309
+ $block['local']['location_not_found'] = true;
310
+ $block['local']['location_url'] = admin_url('edit.php?post_type=saswp');
311
  }
312
+ }
313
 
314
  wp_localize_script( $block['handler'], $block['local_var'], $block['local'] );
315
 
362
  return ob_get_clean();
363
 
364
  }
365
+
366
+ public function render_location_data($attributes){
367
+
368
+ ob_start();
369
+
370
+ if ( !isset( $attributes ) ) {
371
+ ob_end_clean();
372
+
373
+ return '';
374
+ }
375
+
376
+ echo $this->render->location_block_data($attributes);
377
+
378
+ return ob_get_clean();
379
+
380
+ }
381
 
382
  public function render_book_data($attributes){
383
 
394
 
395
  }
396
 
397
+ public function render_recipe_data($attributes){
398
+
399
+ ob_start();
400
+
401
+ if ( !isset( $attributes ) ) {
402
+ ob_end_clean();
403
+ return '';
404
+ }
405
+
406
+ echo $this->render->recipe_block_data($attributes);
407
+
408
+ return ob_get_clean();
409
+
410
+ }
411
+
412
  public function render_course_data($attributes){
413
 
414
  ob_start();
modules/gutenberg/includes/render.php CHANGED
@@ -210,6 +210,108 @@ class SASWP_Gutenberg_Render {
210
 
211
  return $response;
212
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  public function book_block_data($attributes){
214
 
215
  ?>
@@ -340,5 +442,22 @@ class SASWP_Gutenberg_Render {
340
  return do_shortcode('[saswp-reviews-collection id="'.$collection_id.'"]');
341
 
342
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
 
344
  }
210
 
211
  return $response;
212
  }
213
+
214
+ public function recipe_block_data($attributes){
215
+
216
+ ?>
217
+ <div class="saswp-recipe-block-container">
218
+
219
+ <?php if(isset($attributes['banner_url'])){
220
+
221
+ echo '<div class="saswp-recipe-field-banner">
222
+ <div class="saswp-book-banner-div">
223
+ <img src="'.esc_url($attributes['banner_url']).'">
224
+ </div>
225
+ </div>';
226
+
227
+ } ?>
228
+
229
+ <div class="saswp-recipe-block-heading">
230
+ <h4></h4>
231
+ <span class="saswp-recipe-block-author"><?php echo saswp_t_string('Recipe By') ?> <?php echo (!empty($attributes['author']) ? esc_html($attributes['author']) : '') ; ?></span>
232
+ <div class="saswp-r-course-section">
233
+ <span class="saswp-recipe-block-course">
234
+ <?php echo saswp_t_string('Course') ?>: <strong><?php echo (!empty($attributes['course']) ? esc_html($attributes['course']) : '') ; ?></strong>
235
+ </span>
236
+ <span class="saswp-recipe-block-cuisine">
237
+ <?php echo saswp_t_string('Cusine') ?>:<strong><?php echo (!empty($attributes['cuisine']) ? esc_html($attributes['cuisine']) : '') ; ?></strong>
238
+
239
+ </span>
240
+ <span class="saswp-recipe-block-difficulty">
241
+ <?php echo saswp_t_string('Difficulty') ?>:<strong><?php echo (!empty($attributes['difficulty']) ? esc_html($attributes['difficulty']) : '') ; ?></strong>
242
+ </span>
243
+ </div>
244
+ </div>
245
+ <div class="saswp-recipe-block-details">
246
+ <div class="saswp-recipe-block-details-items">
247
+
248
+ <div class="saswp-recipe-block-details-item">
249
+ <p class="saswp-r-b-label"><?php echo saswp_t_string('Servings') ?></p>
250
+ <p class="saswp-r-b-unit"><?php echo (!empty($attributes['servings']) ? esc_html($attributes['servings']) : '') ; ?> <?php echo saswp_t_string('minutes') ?></p>
251
+ </div>
252
+
253
+ <div class="saswp-recipe-block-details-item">
254
+ <p class="saswp-r-b-label"><?php echo saswp_t_string('Preparing Time') ?></p>
255
+ <p class="saswp-r-b-unit"><?php echo (!empty($attributes['pre_time']) ? esc_html($attributes['pre_time']) : '') ; ?> <?php echo saswp_t_string('minutes') ?></p>
256
+ </div>
257
+
258
+ <div class="saswp-recipe-block-details-item">
259
+ <p class="saswp-r-b-label"><?php echo saswp_t_string('Cooking Time') ?></p>
260
+ <p class="saswp-r-b-unit"><?php echo (!empty($attributes['cook_time']) ? esc_html($attributes['cook_time']) : '') ; ?> <?php echo saswp_t_string('minutes') ?></p>
261
+ </div>
262
+
263
+ <div class="saswp-recipe-block-details-item">
264
+ <p class="saswp-r-b-label"><?php echo saswp_t_string('Calories') ?></p>
265
+ <p class="saswp-r-b-unit"><?php echo (!empty($attributes['calories']) ? esc_html($attributes['calories']) : '') ; ?> <?php echo saswp_t_string('kcal') ?></p>
266
+ </div>
267
+
268
+
269
+ </div>
270
+ </div>
271
+ <div class="saswp-recipe-block-ingredients">
272
+ <h4><?php echo saswp_t_string('INGREDIENTS') ?></h4>
273
+
274
+ <?php if(isset($attributes['ingredients'])){
275
+ echo '<ol class="saswp-dirction-ul">';
276
+ foreach ($attributes['ingredients'] as $value) {
277
+ echo '<li class="saswp-r-b-direction-item"><p>'.esc_html($value['name']).'</p></li>';
278
+ }
279
+ echo '</ol>';
280
+
281
+ } ?>
282
+
283
+ </div>
284
+ <div class="saswp-recipe-block-direction">
285
+ <h4><?php echo saswp_t_string('DIRECTION') ?></h4>
286
+
287
+ <?php if(isset($attributes['ingredients'])){
288
+ echo '<ol class="saswp-dirction-ul">';
289
+ foreach ($attributes['directions'] as $value) {
290
+ echo '<li class="saswp-r-b-direction-item"><strong>'.esc_html($value['name']).'</strong><p>'.esc_html($value['text']).'</p></li>';
291
+ }
292
+ echo '</ol>';
293
+
294
+ } ?>
295
+
296
+ </div>
297
+ <div class="saswp-recipe-block-notes">
298
+ <h4><?php echo saswp_t_string('NOTES') ?></h4>
299
+
300
+ <?php if(isset($attributes['notes'])){
301
+ echo '<ol class="saswp-dirction-ul">';
302
+ foreach ($attributes['notes'] as $value) {
303
+ echo '<p>'.esc_html($value['text']).'</p>';
304
+ }
305
+ echo '</ol>';
306
+
307
+ } ?>
308
+
309
+ </div>
310
+ </div>
311
+ <?php
312
+
313
+ }
314
+
315
  public function book_block_data($attributes){
316
 
317
  ?>
442
  return do_shortcode('[saswp-reviews-collection id="'.$collection_id.'"]');
443
 
444
  }
445
+
446
+ public function location_block_data($attributes){
447
+
448
+ $location_id = null;
449
+
450
+ if(isset($attributes['id'])){
451
+ $location_id = $attributes['id'];
452
+ }else{
453
+ $col_opt = saswp_get_location_list();
454
+ if(isset($col_opt[0]['value'])){
455
+ $location_id = $col_opt[0]['value'];
456
+ }
457
+ }
458
+
459
+ return do_shortcode('[saswp-location id="'.$location_id.'"]');
460
+
461
+ }
462
 
463
  }
modules/rating-box/backend.php CHANGED
@@ -56,7 +56,7 @@ class saswp_rating_box_backend {
56
 
57
  global $post;
58
 
59
- $field = get_post_meta( $post->ID, $value, true );
60
 
61
  if ( ! empty( $field ) ) {
62
  return is_array( $field ) ? stripslashes_deep( $field ) : stripslashes( wp_kses_decode_entities( $field ) );
@@ -71,7 +71,7 @@ class saswp_rating_box_backend {
71
  $saswp_review_item_feature = array();
72
  $saswp_review_item_star_rating = array();
73
 
74
- $saswp_review_details = get_post_meta($post->ID, 'saswp_review_details', true);
75
 
76
  if(isset($saswp_review_details['saswp-review-item-feature'])){
77
  $saswp_review_item_feature = $saswp_review_details['saswp-review-item-feature'];
@@ -137,7 +137,7 @@ class saswp_rating_box_backend {
137
  <div><label><?php echo saswp_t_string('Summary Title'); ?></label> <input type="text" id="saswp-review-item-description-title" name="saswp-review-item-description-title" value="<?php if ( isset( $saswp_review_details['saswp-review-item-description-title'] ) && ( ! empty( $saswp_review_details['saswp-review-item-description-title'] ) ) ) echo esc_attr( $saswp_review_details['saswp-review-item-description-title'] ); ?>"></div>
138
  <div class="saswp-wp-ediot-desc"><label><?php echo saswp_t_string('Description'); ?></label></div>
139
  <?php
140
- $content = get_post_meta( $post->ID, 'saswp-review-item-description', true );
141
  wp_editor( $content, 'saswp-review-item-description', array('textarea_rows'=> '5', 'media_buttons' => FALSE,) );
142
  ?>
143
  </div>
@@ -146,7 +146,7 @@ class saswp_rating_box_backend {
146
  <div class="saswp-props">
147
  <div class="saswp-wp-ediot-desc"><label><?php echo saswp_t_string('Pros'); ?></label></div>
148
  <?php
149
- $content = get_post_meta( $post->ID, 'saswp-review-item-props', true );
150
  wp_editor( $content, 'saswp-review-item-props',
151
  array(
152
  'tinymce' => array(
@@ -164,7 +164,7 @@ class saswp_rating_box_backend {
164
  <div class="saswp-cons">
165
  <div class="saswp-wp-ediot-desc"><label><?php echo saswp_t_string('Cons'); ?></label></div>
166
  <?php
167
- $content = get_post_meta( $post->ID, 'saswp-review-item-cons', true );
168
  wp_editor( $content,
169
  'saswp-review-item-cons',
170
  array(
@@ -217,16 +217,16 @@ class saswp_rating_box_backend {
217
  $saswp_review_details['saswp-review-item-enable'] = sanitize_text_field($_POST['saswp-review-item-enable']);
218
  }
219
  if(isset($_POST['saswp-review-item-description']) && $_POST['saswp-review-item-description'] != '' ){
220
- update_post_meta( $post_id, 'saswp-review-item-description', wp_kses_post( wp_unslash( $_POST['saswp-review-item-description'] )) );
221
  }
222
  if(isset($_POST['saswp-review-item-props']) && $_POST['saswp-review-item-props'] !='' ){
223
- update_post_meta( $post_id, 'saswp-review-item-props', wp_kses_post( wp_unslash( $_POST['saswp-review-item-props'] )) );
224
  }
225
  if(isset($_POST['saswp-review-item-cons']) && $_POST['saswp-review-item-cons'] != ''){
226
- update_post_meta( $post_id, 'saswp-review-item-cons', wp_kses_post( wp_unslash( $_POST['saswp-review-item-cons'] )) );
227
  }
228
  if(!empty($saswp_review_details)){
229
- update_post_meta( $post_id, 'saswp_review_details', $saswp_review_details );
230
  }
231
  }
232
  }
56
 
57
  global $post;
58
 
59
+ $field = saswp_get_post_meta( $post->ID, $value, true );
60
 
61
  if ( ! empty( $field ) ) {
62
  return is_array( $field ) ? stripslashes_deep( $field ) : stripslashes( wp_kses_decode_entities( $field ) );
71
  $saswp_review_item_feature = array();
72
  $saswp_review_item_star_rating = array();
73
 
74
+ $saswp_review_details = saswp_get_post_meta($post->ID, 'saswp_review_details', true);
75
 
76
  if(isset($saswp_review_details['saswp-review-item-feature'])){
77
  $saswp_review_item_feature = $saswp_review_details['saswp-review-item-feature'];
137
  <div><label><?php echo saswp_t_string('Summary Title'); ?></label> <input type="text" id="saswp-review-item-description-title" name="saswp-review-item-description-title" value="<?php if ( isset( $saswp_review_details['saswp-review-item-description-title'] ) && ( ! empty( $saswp_review_details['saswp-review-item-description-title'] ) ) ) echo esc_attr( $saswp_review_details['saswp-review-item-description-title'] ); ?>"></div>
138
  <div class="saswp-wp-ediot-desc"><label><?php echo saswp_t_string('Description'); ?></label></div>
139
  <?php
140
+ $content = saswp_get_post_meta( $post->ID, 'saswp-review-item-description', true );
141
  wp_editor( $content, 'saswp-review-item-description', array('textarea_rows'=> '5', 'media_buttons' => FALSE,) );
142
  ?>
143
  </div>
146
  <div class="saswp-props">
147
  <div class="saswp-wp-ediot-desc"><label><?php echo saswp_t_string('Pros'); ?></label></div>
148
  <?php
149
+ $content = saswp_get_post_meta( $post->ID, 'saswp-review-item-props', true );
150
  wp_editor( $content, 'saswp-review-item-props',
151
  array(
152
  'tinymce' => array(
164
  <div class="saswp-cons">
165
  <div class="saswp-wp-ediot-desc"><label><?php echo saswp_t_string('Cons'); ?></label></div>
166
  <?php
167
+ $content = saswp_get_post_meta( $post->ID, 'saswp-review-item-cons', true );
168
  wp_editor( $content,
169
  'saswp-review-item-cons',
170
  array(
217
  $saswp_review_details['saswp-review-item-enable'] = sanitize_text_field($_POST['saswp-review-item-enable']);
218
  }
219
  if(isset($_POST['saswp-review-item-description']) && $_POST['saswp-review-item-description'] != '' ){
220
+ saswp_update_post_meta( $post_id, 'saswp-review-item-description', wp_kses_post( wp_unslash( $_POST['saswp-review-item-description'] )) );
221
  }
222
  if(isset($_POST['saswp-review-item-props']) && $_POST['saswp-review-item-props'] !='' ){
223
+ saswp_update_post_meta( $post_id, 'saswp-review-item-props', wp_kses_post( wp_unslash( $_POST['saswp-review-item-props'] )) );
224
  }
225
  if(isset($_POST['saswp-review-item-cons']) && $_POST['saswp-review-item-cons'] != ''){
226
+ saswp_update_post_meta( $post_id, 'saswp-review-item-cons', wp_kses_post( wp_unslash( $_POST['saswp-review-item-cons'] )) );
227
  }
228
  if(!empty($saswp_review_details)){
229
+ saswp_update_post_meta( $post_id, 'saswp_review_details', $saswp_review_details );
230
  }
231
  }
232
  }
modules/rating-box/frontend.php CHANGED
@@ -49,7 +49,7 @@ Class saswp_rating_box_frontend{
49
 
50
  if(saswp_global_option() && isset($sd_data['saswp-review-module']) && $sd_data['saswp-review-module'] == 1){
51
 
52
- $saswp_review_details = get_post_meta(get_the_ID(), 'saswp_review_details', true);
53
 
54
  if(isset($saswp_review_details['saswp-review-item-enable'])){
55
 
@@ -67,7 +67,7 @@ Class saswp_rating_box_frontend{
67
 
68
  if(!$aurthor_name){
69
 
70
- $author_id = get_post_field ('post_author', get_the_ID());
71
  $aurthor_name = get_the_author_meta( 'display_name' , $author_id );
72
 
73
  }
@@ -115,7 +115,7 @@ Class saswp_rating_box_frontend{
115
  'worstRating' => 1,
116
  'bestRating' => 5,
117
  'ratingValue' => esc_attr($total_score),
118
- 'description' => strip_tags(get_post_meta( get_the_ID(), 'saswp-review-item-description', true )),
119
  );
120
 
121
  if(!empty($input1)){
@@ -150,10 +150,10 @@ Class saswp_rating_box_frontend{
150
  $saswp_review_item_feature = array();
151
  $saswp_review_item_star_rating = array();
152
 
153
- $saswp_review_details = get_post_meta(get_the_ID(), 'saswp_review_details', true);
154
- $saswp_review_description = get_post_meta( get_the_ID(), 'saswp-review-item-description', true );
155
- $saswp_review_props = get_post_meta( get_the_ID(), 'saswp-review-item-props', true );
156
- $saswp_review_cons = get_post_meta( get_the_ID(), 'saswp-review-item-cons', true );
157
  $saswp_over_all_rating = 0;
158
 
159
  if(isset($saswp_review_details['saswp-review-item-feature'])){
@@ -237,7 +237,7 @@ Class saswp_rating_box_frontend{
237
  public function saswp_display_review_box($content){
238
 
239
  global $sd_data;
240
- $saswp_review_details = get_post_meta(get_the_ID(), 'saswp_review_details', true);
241
  $saswp_review_item_enable = 0;
242
 
243
  if(isset($saswp_review_details['saswp-review-item-enable'])){
49
 
50
  if(saswp_global_option() && isset($sd_data['saswp-review-module']) && $sd_data['saswp-review-module'] == 1){
51
 
52
+ $saswp_review_details = saswp_get_post_meta(saswp_get_the_ID(), 'saswp_review_details', true);
53
 
54
  if(isset($saswp_review_details['saswp-review-item-enable'])){
55
 
67
 
68
  if(!$aurthor_name){
69
 
70
+ $author_id = get_post_field ('post_author', saswp_get_the_ID());
71
  $aurthor_name = get_the_author_meta( 'display_name' , $author_id );
72
 
73
  }
115
  'worstRating' => 1,
116
  'bestRating' => 5,
117
  'ratingValue' => esc_attr($total_score),
118
+ 'description' => strip_tags(saswp_get_post_meta( saswp_get_the_ID(), 'saswp-review-item-description', true )),
119
  );
120
 
121
  if(!empty($input1)){
150
  $saswp_review_item_feature = array();
151
  $saswp_review_item_star_rating = array();
152
 
153
+ $saswp_review_details = saswp_get_post_meta(saswp_get_the_ID(), 'saswp_review_details', true);
154
+ $saswp_review_description = saswp_get_post_meta( saswp_get_the_ID(), 'saswp-review-item-description', true );
155
+ $saswp_review_props = saswp_get_post_meta( saswp_get_the_ID(), 'saswp-review-item-props', true );
156
+ $saswp_review_cons = saswp_get_post_meta( saswp_get_the_ID(), 'saswp-review-item-cons', true );
157
  $saswp_over_all_rating = 0;
158
 
159
  if(isset($saswp_review_details['saswp-review-item-feature'])){
237
  public function saswp_display_review_box($content){
238
 
239
  global $sd_data;
240
+ $saswp_review_details = saswp_get_post_meta(saswp_get_the_ID(), 'saswp_review_details', true);
241
  $saswp_review_item_enable = 0;
242
 
243
  if(isset($saswp_review_details['saswp-review-item-enable'])){
modules/reviews/comments.php CHANGED
@@ -41,7 +41,7 @@ function saswp_check_starsrating_status(){
41
  if(isset($sd_data['saswp-starsrating']) && $sd_data['saswp-starsrating'] == 1){
42
 
43
  $enabled_posts = get_option( 'enabled_post_types' );
44
- $post_status = get_post_meta( get_the_ID(), 'sr-comments-rating', true );
45
 
46
  if ( ! is_array( $enabled_posts ) ) {
47
  $enabled_posts = (array) $enabled_posts;
41
  if(isset($sd_data['saswp-starsrating']) && $sd_data['saswp-starsrating'] == 1){
42
 
43
  $enabled_posts = get_option( 'enabled_post_types' );
44
+ $post_status = saswp_get_post_meta( saswp_get_the_ID(), 'sr-comments-rating', true );
45
 
46
  if ( ! is_array( $enabled_posts ) ) {
47
  $enabled_posts = (array) $enabled_posts;
modules/reviews/reviews_admin.php CHANGED
@@ -125,7 +125,7 @@ class saswp_reviews_admin {
125
  $label = $meta_field['label'];
126
  }
127
  $label = '<label for="' . esc_attr($meta_field['id']) . '">' . saswp_t_string( $label ) . '</label>';
128
- $meta_value = get_post_meta( $post->ID, $meta_field['id'], true );
129
 
130
  if ( empty( $meta_value ) ) {
131
  $meta_value = isset($meta_field['default']);
@@ -175,7 +175,7 @@ class saswp_reviews_admin {
175
  $media_value = array();
176
  $media_key = $meta_field['id'].'_detail';
177
 
178
- $media_value_meta = get_post_meta( $post->ID, $media_key, true );
179
 
180
  if(!empty($media_value_meta)){
181
  $media_value = $media_value_meta;
@@ -301,15 +301,15 @@ class saswp_reviews_admin {
301
  'thumbnail' => $media_thumbnail,
302
  );
303
 
304
- update_post_meta( $post_id, $media_key, $media_detail);
305
  break;
306
  default:
307
  $post_meta[ $meta_field['id'] ] = sanitize_text_field( $post_meta[ $meta_field['id'] ] );
308
  }
309
- update_post_meta( $post_id, $meta_field['id'], $post_meta[ $meta_field['id'] ] );
310
 
311
  } else if ( $meta_field['type'] === 'checkbox' ) {
312
- update_post_meta( $post_id, $meta_field['id'], '0' );
313
  }
314
  }
315
 
125
  $label = $meta_field['label'];
126
  }
127
  $label = '<label for="' . esc_attr($meta_field['id']) . '">' . saswp_t_string( $label ) . '</label>';
128
+ $meta_value = saswp_get_post_meta( $post->ID, $meta_field['id'], true );
129
 
130
  if ( empty( $meta_value ) ) {
131
  $meta_value = isset($meta_field['default']);
175
  $media_value = array();
176
  $media_key = $meta_field['id'].'_detail';
177
 
178
+ $media_value_meta = saswp_get_post_meta( $post->ID, $media_key, true );
179
 
180
  if(!empty($media_value_meta)){
181
  $media_value = $media_value_meta;
301
  'thumbnail' => $media_thumbnail,
302
  );
303
 
304
+ saswp_update_post_meta( $post_id, $media_key, $media_detail);
305
  break;
306
  default:
307
  $post_meta[ $meta_field['id'] ] = sanitize_text_field( $post_meta[ $meta_field['id'] ] );
308
  }
309
+ saswp_update_post_meta( $post_id, $meta_field['id'], $post_meta[ $meta_field['id'] ] );
310
 
311
  } else if ( $meta_field['type'] === 'checkbox' ) {
312
+ saswp_update_post_meta( $post_id, $meta_field['id'], '0' );
313
  }
314
  }
315
 
modules/reviews/reviews_collection.php CHANGED
@@ -59,8 +59,8 @@ class SASWP_Reviews_Collection {
59
  global $post;
60
  $response = false;
61
 
62
- $where = get_post_meta($collection_id, 'saswp_collection_where', true);
63
- $where_data = get_post_meta($collection_id, 'saswp_collection_where_data', true);
64
 
65
  if(isset($where[0])){
66
 
@@ -261,7 +261,7 @@ class SASWP_Reviews_Collection {
261
 
262
  if($collection_id){
263
 
264
- $reviews_list = get_post_meta($collection_id, 'saswp_platform_ids', true);
265
 
266
  if($reviews_list){
267
 
@@ -350,7 +350,7 @@ class SASWP_Reviews_Collection {
350
  $dots = $f_interval = $f_visibility = $arrow = 1;
351
  $g_type = $design = $cols = $sorting = $date_format = '';
352
 
353
- $collection_data = get_post_meta($attr['id']);
354
 
355
  if(isset($collection_data['saswp_collection_design'][0])){
356
  $design = $collection_data['saswp_collection_design'][0];
@@ -542,7 +542,7 @@ class SASWP_Reviews_Collection {
542
 
543
  $post_id = intval($_GET['post_id']);
544
 
545
- $post_meta = get_post_meta($post_id);
546
 
547
 
548
  } else{
@@ -917,7 +917,7 @@ class SASWP_Reviews_Collection {
917
 
918
  foreach($post_meta as $meta_key => $meta_val){
919
 
920
- update_post_meta($post_id, $meta_key, $meta_val);
921
 
922
  }
923
 
59
  global $post;
60
  $response = false;
61
 
62
+ $where = saswp_get_post_meta($collection_id, 'saswp_collection_where', true);
63
+ $where_data = saswp_get_post_meta($collection_id, 'saswp_collection_where_data', true);
64
 
65
  if(isset($where[0])){
66
 
261
 
262
  if($collection_id){
263
 
264
+ $reviews_list = saswp_get_post_meta($collection_id, 'saswp_platform_ids', true);
265
 
266
  if($reviews_list){
267
 
350
  $dots = $f_interval = $f_visibility = $arrow = 1;
351
  $g_type = $design = $cols = $sorting = $date_format = '';
352
 
353
+ $collection_data = saswp_get_post_meta($attr['id']);
354
 
355
  if(isset($collection_data['saswp_collection_design'][0])){
356
  $design = $collection_data['saswp_collection_design'][0];
542
 
543
  $post_id = intval($_GET['post_id']);
544
 
545
+ $post_meta = saswp_get_post_meta($post_id);
546
 
547
 
548
  } else{
917
 
918
  foreach($post_meta as $meta_key => $meta_val){
919
 
920
+ saswp_update_post_meta($post_id, $meta_key, $meta_val);
921
 
922
  }
923
 
modules/reviews/reviews_service.php CHANGED
@@ -174,7 +174,7 @@ class saswp_reviews_service {
174
  if($post_id && !empty($review_meta) && is_array($review_meta)){
175
 
176
  foreach ($review_meta as $key => $val){
177
- update_post_meta($post_id, $key, $val);
178
  }
179
 
180
  }
@@ -505,7 +505,7 @@ class saswp_reviews_service {
505
  if($post_id && !empty($review_meta) && is_array($review_meta)){
506
 
507
  foreach ($review_meta as $key => $val){
508
- update_post_meta($post_id, $key, $val);
509
  }
510
 
511
  }
@@ -572,7 +572,7 @@ class saswp_reviews_service {
572
  if($post_id && !empty($review_meta) && is_array($review_meta)){
573
 
574
  foreach ($review_meta as $key => $val){
575
- update_post_meta($post_id, $key, $val);
576
  }
577
 
578
  }
@@ -726,7 +726,7 @@ class saswp_reviews_service {
726
 
727
  foreach($post_meta as $meta_key){
728
 
729
- $review_data[$meta_key] = get_post_meta($rv_post->ID, $meta_key, true );
730
 
731
  }
732
 
@@ -940,20 +940,28 @@ class saswp_reviews_service {
940
 
941
  if(strpos($current_url, "?rv_page") !== false){
942
  $current_url = substr($current_url, 0, strpos($current_url, "?rv_page"));
943
- }
 
 
 
 
 
 
 
 
 
944
  $html .= '<div class="saswp-grid-pagination">';
945
  $html .= '<a class="saswp-grid-page" data-id="1" href="'.esc_url($current_url).'">&laquo;</a>';
946
 
947
- for($i=1; $i <= $page_count; $i++){
948
 
949
- if($i == $data_id){
950
- $html .= '<a class="active saswp-grid-page" href="'.esc_url($current_url.'?rv_page='.$i).'">'.esc_attr($i).'</a>';
951
  }else{
952
- $html .= '<a class="saswp-grid-page" href="'.esc_url($current_url.'?rv_page='.$i).'">'.esc_attr($i).'</a>';
953
  }
954
-
955
- }
956
-
957
  $html .= '<a class="saswp-grid-page" href="'.esc_url($current_url.'?rv_page='.$page_count).'">&raquo;</a>';
958
 
959
  $html .= '</div>';
@@ -963,7 +971,7 @@ class saswp_reviews_service {
963
  if(($page_count > 0 && $pagination ) && $pagination_wpr){
964
 
965
  $html .= '<div class="saswp-grid-pagination saswp-grid-wpr">';
966
- $html .= '<a data-id="1" class="saswp-grid-page" href="#">&laquo;</a>';
967
 
968
  for($i=1; $i <= $page_count; $i++){
969
 
@@ -975,7 +983,7 @@ class saswp_reviews_service {
975
 
976
  }
977
 
978
- $html .= '<a data-id="'.esc_attr($page_count).'" class="saswp-grid-page" href="#">&raquo;</a>';
979
 
980
  $html .= '</div>';
981
 
@@ -1517,10 +1525,10 @@ class saswp_reviews_service {
1517
 
1518
  foreach ($post_ids as $value) {
1519
 
1520
- $rating = get_post_meta($value, 'saswp_review_rating', true);
1521
 
1522
  if(is_numeric($rating)){
1523
- $avg += get_post_meta($value, 'saswp_review_rating', true);
1524
  }
1525
 
1526
  }
174
  if($post_id && !empty($review_meta) && is_array($review_meta)){
175
 
176
  foreach ($review_meta as $key => $val){
177
+ saswp_update_post_meta($post_id, $key, $val);
178
  }
179
 
180
  }
505
  if($post_id && !empty($review_meta) && is_array($review_meta)){
506
 
507
  foreach ($review_meta as $key => $val){
508
+ saswp_update_post_meta($post_id, $key, $val);
509
  }
510
 
511
  }
572
  if($post_id && !empty($review_meta) && is_array($review_meta)){
573
 
574
  foreach ($review_meta as $key => $val){
575
+ saswp_update_post_meta($post_id, $key, $val);
576
  }
577
 
578
  }
726
 
727
  foreach($post_meta as $meta_key){
728
 
729
+ $review_data[$meta_key] = saswp_get_post_meta($rv_post->ID, $meta_key, true );
730
 
731
  }
732
 
940
 
941
  if(strpos($current_url, "?rv_page") !== false){
942
  $current_url = substr($current_url, 0, strpos($current_url, "?rv_page"));
943
+ }
944
+
945
+ $sidenr = 1;
946
+
947
+ if(isset($_GET['rv_page'])){
948
+ $sidenr = intval($_GET['rv_page']);
949
+ }
950
+
951
+ list($min,$max) = saswp_get_page_range($sidenr, $page_count);
952
+
953
  $html .= '<div class="saswp-grid-pagination">';
954
  $html .= '<a class="saswp-grid-page" data-id="1" href="'.esc_url($current_url).'">&laquo;</a>';
955
 
956
+ foreach (range($min, $max) as $number) {
957
 
958
+ if($number == $data_id){
959
+ $html .= '<a class="active saswp-grid-page" href="'.esc_url($current_url.'?rv_page='.$number).'">'.esc_attr($number).'</a>';
960
  }else{
961
+ $html .= '<a class="saswp-grid-page" href="'.esc_url($current_url.'?rv_page='.$number).'">'.esc_attr($number).'</a>';
962
  }
963
+ }
964
+
 
965
  $html .= '<a class="saswp-grid-page" href="'.esc_url($current_url.'?rv_page='.$page_count).'">&raquo;</a>';
966
 
967
  $html .= '</div>';
971
  if(($page_count > 0 && $pagination ) && $pagination_wpr){
972
 
973
  $html .= '<div class="saswp-grid-pagination saswp-grid-wpr">';
974
+ $html .= '<a data-id="1" class="saswp-grid-page saswp-pagination-first-last" href="#">&laquo;</a>';
975
 
976
  for($i=1; $i <= $page_count; $i++){
977
 
983
 
984
  }
985
 
986
+ $html .= '<a data-id="'.esc_attr($page_count).'" class="saswp-grid-page saswp-pagination-first-last" href="#">&raquo;</a>';
987
 
988
  $html .= '</div>';
989
 
1525
 
1526
  foreach ($post_ids as $value) {
1527
 
1528
+ $rating = saswp_get_post_meta($value, 'saswp_review_rating', true);
1529
 
1530
  if(is_numeric($rating)){
1531
+ $avg += saswp_get_post_meta($value, 'saswp_review_rating', true);
1532
  }
1533
 
1534
  }
modules/reviews/reviews_setup.php CHANGED
@@ -127,9 +127,9 @@ function saswp_reviews_custom_columns_set( $column, $post_id ) {
127
 
128
  case 'saswp_reviewer_image' :
129
 
130
- $name = get_post_meta( $post_id, $key='saswp_reviewer_name', true);
131
 
132
- $image_url = get_post_meta( $post_id, $key='saswp_reviewer_image', true);
133
  if(!$image_url){
134
  $image_url = SASWP_PLUGIN_URL.'/admin_section/images/default_user.jpg';
135
  }
@@ -144,13 +144,13 @@ function saswp_reviews_custom_columns_set( $column, $post_id ) {
144
  break;
145
  case 'saswp_review_rating' :
146
 
147
- $rating_val = get_post_meta( $post_id, $key='saswp_review_rating', true);
148
  echo saswp_get_rating_html_by_value($rating_val);
149
 
150
  break;
151
  case 'saswp_review_platform' :
152
 
153
- $platform = get_post_meta( $post_id, $key='saswp_review_platform', true);
154
  $term = get_term( $platform, 'platform' );
155
 
156
  if(isset($term->slug)){
@@ -175,13 +175,13 @@ function saswp_reviews_custom_columns_set( $column, $post_id ) {
175
  break;
176
  case 'saswp_review_date' :
177
 
178
- $name = get_post_meta( $post_id, $key='saswp_review_date', true);
179
  echo esc_attr($name);
180
 
181
  break;
182
  case 'saswp_review_place_id' :
183
 
184
- $name = get_post_meta( $post_id, 'saswp_review_location_id', true);
185
  if(saswp_validate_url($name)){
186
  echo '<a target="_blank" href="'.esc_url($name).'">'.esc_attr($name).'</a>';
187
  }else{
@@ -293,7 +293,7 @@ function saswp_enqueue_rateyo_script( $hook ) {
293
  if($post_type =='saswp_reviews'){
294
 
295
  $rating_val= 0;
296
- $rv_rating = get_post_meta( get_the_ID(), $key='saswp_review_rating', true);
297
  if($rv_rating){
298
  $rating_val = $rv_rating;
299
  }
@@ -367,8 +367,8 @@ function saswp_insert_platform_terms(){
367
  'Apple AppStore',
368
  'Expedia',
369
  'Facebook',
370
- 'Google',
371
- 'Google Shopping',
372
  'Goodreads',
373
  'TripAdvisor',
374
  'Yelp',
127
 
128
  case 'saswp_reviewer_image' :
129
 
130
+ $name = saswp_get_post_meta( $post_id, $key='saswp_reviewer_name', true);
131
 
132
+ $image_url = saswp_get_post_meta( $post_id, $key='saswp_reviewer_image', true);
133
  if(!$image_url){
134
  $image_url = SASWP_PLUGIN_URL.'/admin_section/images/default_user.jpg';
135
  }
144
  break;
145
  case 'saswp_review_rating' :
146
 
147
+ $rating_val = saswp_get_post_meta( $post_id, $key='saswp_review_rating', true);
148
  echo saswp_get_rating_html_by_value($rating_val);
149
 
150
  break;
151
  case 'saswp_review_platform' :
152
 
153
+ $platform = saswp_get_post_meta( $post_id, $key='saswp_review_platform', true);
154
  $term = get_term( $platform, 'platform' );
155
 
156
  if(isset($term->slug)){
175
  break;
176
  case 'saswp_review_date' :
177
 
178
+ $name = saswp_get_post_meta( $post_id, $key='saswp_review_date', true);
179
  echo esc_attr($name);
180
 
181
  break;
182
  case 'saswp_review_place_id' :
183
 
184
+ $name = saswp_get_post_meta( $post_id, 'saswp_review_location_id', true);
185
  if(saswp_validate_url($name)){
186
  echo '<a target="_blank" href="'.esc_url($name).'">'.esc_attr($name).'</a>';
187
  }else{
293
  if($post_type =='saswp_reviews'){
294
 
295
  $rating_val= 0;
296
+ $rv_rating = saswp_get_post_meta( saswp_get_the_ID(), $key='saswp_review_rating', true);
297
  if($rv_rating){
298
  $rating_val = $rv_rating;
299
  }
367
  'Apple AppStore',
368
  'Expedia',
369
  'Facebook',
370
+ 'Google',
371
+ 'Google Shopping',
372
  'Goodreads',
373
  'TripAdvisor',
374
  'Yelp',
output/compatibility.php CHANGED
@@ -193,7 +193,7 @@ class saswp_output_compatibility{
193
 
194
  while ( $my_posts->have_posts() ) : $my_posts->the_post();
195
  $shortcode_opt['tpro_schema_markup'] = '';
196
- update_post_meta(get_the_id(), 'sp_tpro_shortcode_options',$shortcode_opt);
197
  endwhile;
198
 
199
  wp_reset_postdata();
193
 
194
  while ( $my_posts->have_posts() ) : $my_posts->the_post();
195
  $shortcode_opt['tpro_schema_markup'] = '';
196
+ saswp_update_post_meta(saswp_get_the_ID(), 'sp_tpro_shortcode_options',$shortcode_opt);
197
  endwhile;
198
 
199
  wp_reset_postdata();
output/function.php CHANGED
@@ -206,6 +206,7 @@ function saswp_get_all_schema_markup_output() {
206
  $gutenberg_job = array();
207
  $gutenberg_book = array();
208
  $gutenberg_course = array();
 
209
 
210
  if( !is_home() && ( is_singular() || is_front_page() || (function_exists('ampforwp_is_front_page') && ampforwp_is_front_page())) ){
211
 
@@ -258,7 +259,7 @@ function saswp_get_all_schema_markup_output() {
258
  $custom_markup = saswp_taxonomy_schema_output();
259
 
260
  if(is_singular()){
261
- $custom_markup = get_post_meta($post->ID, 'saswp_custom_schema_field', true);
262
  }
263
 
264
  $schema_output = saswp_schema_output();
@@ -810,8 +811,8 @@ function saswp_extract_taqyeem_ratings(){
810
 
811
  if(isset($sd_data['saswp-taqyeem']) && $sd_data['saswp-taqyeem'] == 1 && function_exists('taqyeem_review_get_rich_snippet')){
812
 
813
- $rate = get_post_meta( $post->ID, 'tie_user_rate', true );
814
- $count = get_post_meta( $post->ID, 'tie_users_num', true );
815
 
816
  if( ! empty( $rate ) && ! empty( $count ) ){
817
 
@@ -824,7 +825,7 @@ function saswp_extract_taqyeem_ratings(){
824
 
825
  }else{
826
 
827
- $total_score = (int) get_post_meta( $post->ID, 'taq_review_score', true );
828
 
829
  if( ! empty( $total_score ) && $total_score > 0 ){
830
  $total_score = round( ($total_score*5)/100, 1 );
@@ -847,7 +848,7 @@ function saswp_ratency_rating_box_rating(){
847
 
848
  if( isset($sd_data['saswp-ratency']) && $sd_data['saswp-ratency'] == 1 ){
849
 
850
- $ratency_total_rv = get_post_meta($post->ID, 'progression_studios_review_total', true);
851
 
852
  if( $ratency_total_rv ){
853
 
@@ -926,8 +927,8 @@ function saswp_extract_wpdiscuz(){
926
 
927
  if(isset($sd_data['saswp-wpdiscuz']) && $sd_data['saswp-wpdiscuz'] == 1 && is_plugin_active('wpdiscuz/class.WpdiscuzCore.php') ){
928
 
929
- $rating = (float) get_post_meta($post->ID, 'wpdiscuz_post_rating', true);
930
- $count = (int) get_post_meta($post->ID, 'wpdiscuz_post_rating_count', true);
931
 
932
  if($rating){
933
 
@@ -965,8 +966,8 @@ function saswp_extract_ratingform(){
965
 
966
  if(isset($sd_data['saswp-ratingform']) && $sd_data['saswp-ratingform'] == 1 && is_plugin_active('rating-form/rf-init.php')){
967
 
968
- $total = get_post_meta(get_the_ID(), 'rf_total', true) ? ((int) get_post_meta(get_the_ID(), 'rf_total', true)) : 0;
969
- $avg = get_post_meta(get_the_ID(), 'rf_average', true) ? ((int) get_post_meta(get_the_ID(), 'rf_average', true)) : 0;
970
 
971
 
972
  if( $total > 0 ){
@@ -998,7 +999,7 @@ function saswp_get_elementor_testomonials(){
998
 
999
  if( isset($sd_data['saswp-elementor']) && $sd_data['saswp-elementor'] == 1 && is_plugin_active('elementor/elementor.php') ){
1000
 
1001
- $alldata = get_post_meta( get_the_ID(),'_elementor_data', true );
1002
  $alldata = json_decode($alldata, true);
1003
 
1004
  $returnData = array();
@@ -1052,8 +1053,8 @@ function saswp_extract_rmp_ratings(){
1052
  if(isset($sd_data['saswp-rmprating']) && $sd_data['saswp-rmprating'] == 1 && is_plugin_active('rate-my-post/rate-my-post.php')){
1053
 
1054
 
1055
- $avg = get_post_meta(get_the_ID(), 'rmp_avg_rating', true) ? ( get_post_meta(get_the_ID(), 'rmp_avg_rating', true)) : 0;
1056
- $votes = get_post_meta(get_the_ID(), 'rmp_vote_count', true) ? ((int) get_post_meta(get_the_ID(), 'rmp_vote_count', true)) : 0;
1057
 
1058
  if($votes>0){
1059
 
@@ -1091,8 +1092,8 @@ function saswp_extract_kk_star_ratings(){
1091
  if(isset($sd_data['saswp-kk-star-raring']) && $sd_data['saswp-kk-star-raring'] == 1 && is_plugin_active('kk-star-ratings/index.php')){
1092
 
1093
  $best = get_option('kksr_stars');
1094
- $score = get_post_meta(get_the_ID(), '_kksr_ratings', true) ? ((int) get_post_meta(get_the_ID(), '_kksr_ratings', true)) : 0;
1095
- $votes = get_post_meta(get_the_ID(), '_kksr_casts', true) ? ((int) get_post_meta(get_the_ID(), '_kksr_casts', true)) : 0;
1096
  $avg = $score && $votes ? round((float)(($score/$votes)*($best/5)), 1) : 0;
1097
 
1098
  if($votes>0){
@@ -1132,8 +1133,8 @@ function saswp_extract_wp_post_ratings(){
1132
  if(isset($sd_data['saswp-wppostratings-raring']) && $sd_data['saswp-wppostratings-raring'] == 1 && is_plugin_active('wp-postratings/wp-postratings.php')){
1133
 
1134
  $best = (int) get_option( 'postratings_max' );
1135
- $avg = get_post_meta(get_the_ID(), 'ratings_average', true);
1136
- $votes = get_post_meta(get_the_ID(), 'ratings_users', true);
1137
 
1138
  if($votes>0){
1139
 
@@ -1678,7 +1679,7 @@ function saswp_get_the_tags(){
1678
 
1679
  if( isset($sd_data['saswp-metatagmanager']) && $sd_data['saswp-metatagmanager'] == 1 && class_exists('Meta_Tag_Manager') ){
1680
 
1681
- $post_meta = get_post_meta(get_the_ID(), 'mtm_data', true);
1682
 
1683
  if(is_array($post_meta)){
1684
 
@@ -1879,8 +1880,8 @@ function saswp_get_testimonial_data($atts, $matche){
1879
 
1880
  foreach ($testimonial as $value){
1881
 
1882
- $rating = get_post_meta($value->ID, $key='_ikcf_rating', true);
1883
- $author = get_post_meta($value->ID, $key='_ikcf_client', true);
1884
 
1885
  $sumofrating += $rating;
1886
 
@@ -2054,7 +2055,7 @@ function saswp_get_testimonial_pro_data($shortcode_data, $testimo_str){
2054
 
2055
  foreach ($testimonial as $value){
2056
 
2057
- $meta_option = get_post_meta($value->ID, 'sp_tpro_meta_options', true);
2058
 
2059
  $tpro_rating_star = $meta_option['tpro_rating'];
2060
 
@@ -2127,7 +2128,7 @@ function saswp_get_strong_testimonials_data($testimonial){
2127
  foreach ($testimonial as $value){
2128
 
2129
  $rating = 5;
2130
- $author = get_post_meta($value->ID, $key='client_name', true);
2131
 
2132
  $sumofrating += $rating;
2133
 
@@ -2182,8 +2183,8 @@ function saswp_get_bne_testimonials_data($atts, $testimo_str){
2182
 
2183
  foreach ($testimonial as $value){
2184
 
2185
- $rating = get_post_meta($value->ID, $key='rating', true);
2186
- $author = get_post_meta($value->ID, $key='tagline', true);
2187
 
2188
  $sumofrating += $rating;
2189
 
@@ -2430,7 +2431,7 @@ function saswp_get_testomonial_pro(){
2430
  $mached = trim($mached);
2431
  $atts = shortcode_parse_atts('['.$mached.' ]');
2432
 
2433
- $shortcode_data = get_post_meta( $atts['id'], 'sp_tpro_shortcode_options', true );
2434
 
2435
  if($shortcode_data){
2436
 
@@ -2484,7 +2485,7 @@ function saswp_get_bne_testomonials(){
2484
  $mached = trim($mached);
2485
  $atts = shortcode_parse_atts('['.$mached.' ]');
2486
 
2487
- $id = get_post_meta( $atts['custom'], '_bne_testimonials_sg_shortcode', true );
2488
 
2489
  if($id){
2490
 
@@ -2525,9 +2526,9 @@ function saswp_append_fetched_reviews($input1, $schema_post_id = null){
2525
 
2526
  if($schema_post_id){
2527
 
2528
- $attached_col = get_post_meta($schema_post_id, 'saswp_attached_collection', true);
2529
- $attached_rv = get_post_meta($schema_post_id, 'saswp_attahced_reviews', true);
2530
- $append_reviews = get_post_meta($schema_post_id, 'saswp_enable_append_reviews', true);
2531
 
2532
  if($append_reviews == 1 && ($attached_rv || $attached_col)){
2533
 
@@ -2551,7 +2552,7 @@ function saswp_append_fetched_reviews($input1, $schema_post_id = null){
2551
 
2552
  foreach($attached_col as $col_id){
2553
 
2554
- $collection_data = get_post_meta($col_id);
2555
 
2556
  if(isset($collection_data['saswp_platform_ids'][0])){
2557
  $platform_ids = unserialize($collection_data['saswp_platform_ids'][0]);
@@ -2604,9 +2605,9 @@ function saswp_get_mainEntity($schema_id){
2604
 
2605
  $response = array();
2606
 
2607
- $item_list_enable = get_post_meta($schema_id, 'saswp_enable_itemlist_schema', true);
2608
- $item_list_tags = get_post_meta($schema_id, 'saswp_item_list_tags', true);
2609
- $item_list_custom = get_post_meta($schema_id, 'saswp_item_list_custom', true);
2610
 
2611
  if($item_list_enable){
2612
 
@@ -2665,7 +2666,7 @@ function saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $sche
2665
 
2666
  if($schema_options['saswp_modify_method'] == 'manual'){
2667
 
2668
- $all_post_meta = get_post_meta($schema_post_id);
2669
 
2670
  switch ($schema_type) {
2671
 
@@ -2827,7 +2828,7 @@ function saswp_get_reviews_wp_theme(){
2827
  $user_overall = 0;
2828
  $user_rates = 0;
2829
 
2830
- $criterias = get_post_meta( get_the_ID(), 'reviews_score' );
2831
  $rate_criterias = array();
2832
  if( !empty( $criterias ) ){
2833
  foreach( $criterias as $criteria ){
@@ -2875,7 +2876,7 @@ function saswp_get_reviews_wp_theme(){
2875
 
2876
  }else{
2877
 
2878
- $author_average = get_post_meta( get_the_ID(), 'author_average', true );
2879
 
2880
  $ratings = array(
2881
  '@type' => 'AggregateRating',
@@ -3181,8 +3182,8 @@ function saswp_get_ampforwp_story_images(){
3181
 
3182
  if(class_exists('Ampforwp_Stories_Post_Type')){
3183
 
3184
- $amp_story_meta = get_post_meta( get_the_ID(), 'ampforwp_stories', true );
3185
- $post_type = get_post_type(get_the_ID());
3186
 
3187
  if( !empty($amp_story_meta) && is_array($amp_story_meta) && $post_type == 'ampforwp_story' ) {
3188
 
206
  $gutenberg_job = array();
207
  $gutenberg_book = array();
208
  $gutenberg_course = array();
209
+ $kb_website_output = array();
210
 
211
  if( !is_home() && ( is_singular() || is_front_page() || (function_exists('ampforwp_is_front_page') && ampforwp_is_front_page())) ){
212
 
259
  $custom_markup = saswp_taxonomy_schema_output();
260
 
261
  if(is_singular()){
262
+ $custom_markup = saswp_get_post_meta($post->ID, 'saswp_custom_schema_field', true);
263
  }
264
 
265
  $schema_output = saswp_schema_output();
811
 
812
  if(isset($sd_data['saswp-taqyeem']) && $sd_data['saswp-taqyeem'] == 1 && function_exists('taqyeem_review_get_rich_snippet')){
813
 
814
+ $rate = saswp_get_post_meta( $post->ID, 'tie_user_rate', true );
815
+ $count = saswp_get_post_meta( $post->ID, 'tie_users_num', true );
816
 
817
  if( ! empty( $rate ) && ! empty( $count ) ){
818
 
825
 
826
  }else{
827
 
828
+ $total_score = (int) saswp_get_post_meta( $post->ID, 'taq_review_score', true );
829
 
830
  if( ! empty( $total_score ) && $total_score > 0 ){
831
  $total_score = round( ($total_score*5)/100, 1 );
848
 
849
  if( isset($sd_data['saswp-ratency']) && $sd_data['saswp-ratency'] == 1 ){
850
 
851
+ $ratency_total_rv = saswp_get_post_meta($post->ID, 'progression_studios_review_total', true);
852
 
853
  if( $ratency_total_rv ){
854
 
927
 
928
  if(isset($sd_data['saswp-wpdiscuz']) && $sd_data['saswp-wpdiscuz'] == 1 && is_plugin_active('wpdiscuz/class.WpdiscuzCore.php') ){
929
 
930
+ $rating = (float) saswp_get_post_meta($post->ID, 'wpdiscuz_post_rating', true);
931
+ $count = (int) saswp_get_post_meta($post->ID, 'wpdiscuz_post_rating_count', true);
932
 
933
  if($rating){
934
 
966
 
967
  if(isset($sd_data['saswp-ratingform']) && $sd_data['saswp-ratingform'] == 1 && is_plugin_active('rating-form/rf-init.php')){
968
 
969
+ $total = saswp_get_post_meta(saswp_get_the_ID(), 'rf_total', true) ? ((int) saswp_get_post_meta(saswp_get_the_ID(), 'rf_total', true)) : 0;
970
+ $avg = saswp_get_post_meta(saswp_get_the_ID(), 'rf_average', true) ? ((int) saswp_get_post_meta(saswp_get_the_ID(), 'rf_average', true)) : 0;
971
 
972
 
973
  if( $total > 0 ){
999
 
1000
  if( isset($sd_data['saswp-elementor']) && $sd_data['saswp-elementor'] == 1 && is_plugin_active('elementor/elementor.php') ){
1001
 
1002
+ $alldata = saswp_get_post_meta( saswp_get_the_ID(),'_elementor_data', true );
1003
  $alldata = json_decode($alldata, true);
1004
 
1005
  $returnData = array();
1053
  if(isset($sd_data['saswp-rmprating']) && $sd_data['saswp-rmprating'] == 1 && is_plugin_active('rate-my-post/rate-my-post.php')){
1054
 
1055
 
1056
+ $avg = saswp_get_post_meta(saswp_get_the_ID(), 'rmp_avg_rating', true) ? ( saswp_get_post_meta(saswp_get_the_ID(), 'rmp_avg_rating', true)) : 0;
1057
+ $votes = saswp_get_post_meta(saswp_get_the_ID(), 'rmp_vote_count', true) ? ((int) saswp_get_post_meta(saswp_get_the_ID(), 'rmp_vote_count', true)) : 0;
1058
 
1059
  if($votes>0){
1060
 
1092
  if(isset($sd_data['saswp-kk-star-raring']) && $sd_data['saswp-kk-star-raring'] == 1 && is_plugin_active('kk-star-ratings/index.php')){
1093
 
1094
  $best = get_option('kksr_stars');
1095
+ $score = saswp_get_post_meta(saswp_get_the_ID(), '_kksr_ratings', true) ? ((int) saswp_get_post_meta(saswp_get_the_ID(), '_kksr_ratings', true)) : 0;
1096
+ $votes = saswp_get_post_meta(saswp_get_the_ID(), '_kksr_casts', true) ? ((int) saswp_get_post_meta(saswp_get_the_ID(), '_kksr_casts', true)) : 0;
1097
  $avg = $score && $votes ? round((float)(($score/$votes)*($best/5)), 1) : 0;
1098
 
1099
  if($votes>0){
1133
  if(isset($sd_data['saswp-wppostratings-raring']) && $sd_data['saswp-wppostratings-raring'] == 1 && is_plugin_active('wp-postratings/wp-postratings.php')){
1134
 
1135
  $best = (int) get_option( 'postratings_max' );
1136
+ $avg = saswp_get_post_meta(saswp_get_the_ID(), 'ratings_average', true);
1137
+ $votes = saswp_get_post_meta(saswp_get_the_ID(), 'ratings_users', true);
1138
 
1139
  if($votes>0){
1140
 
1679
 
1680
  if( isset($sd_data['saswp-metatagmanager']) && $sd_data['saswp-metatagmanager'] == 1 && class_exists('Meta_Tag_Manager') ){
1681
 
1682
+ $post_meta = saswp_get_post_meta(saswp_get_the_ID(), 'mtm_data', true);
1683
 
1684
  if(is_array($post_meta)){
1685
 
1880
 
1881
  foreach ($testimonial as $value){
1882
 
1883
+ $rating = saswp_get_post_meta($value->ID, $key='_ikcf_rating', true);
1884
+ $author = saswp_get_post_meta($value->ID, $key='_ikcf_client', true);
1885
 
1886
  $sumofrating += $rating;
1887
 
2055
 
2056
  foreach ($testimonial as $value){
2057
 
2058
+ $meta_option = saswp_get_post_meta($value->ID, 'sp_tpro_meta_options', true);
2059
 
2060
  $tpro_rating_star = $meta_option['tpro_rating'];
2061
 
2128
  foreach ($testimonial as $value){
2129
 
2130
  $rating = 5;
2131
+ $author = saswp_get_post_meta($value->ID, $key='client_name', true);
2132
 
2133
  $sumofrating += $rating;
2134
 
2183
 
2184
  foreach ($testimonial as $value){
2185
 
2186
+ $rating = saswp_get_post_meta($value->ID, $key='rating', true);
2187
+ $author = saswp_get_post_meta($value->ID, $key='tagline', true);
2188
 
2189
  $sumofrating += $rating;
2190
 
2431
  $mached = trim($mached);
2432
  $atts = shortcode_parse_atts('['.$mached.' ]');
2433
 
2434
+ $shortcode_data = saswp_get_post_meta( $atts['id'], 'sp_tpro_shortcode_options', true );
2435
 
2436
  if($shortcode_data){
2437
 
2485
  $mached = trim($mached);
2486
  $atts = shortcode_parse_atts('['.$mached.' ]');
2487
 
2488
+ $id = saswp_get_post_meta( $atts['custom'], '_bne_testimonials_sg_shortcode', true );
2489
 
2490
  if($id){
2491
 
2526
 
2527
  if($schema_post_id){
2528
 
2529
+ $attached_col = saswp_get_post_meta($schema_post_id, 'saswp_attached_collection', true);
2530
+ $attached_rv = saswp_get_post_meta($schema_post_id, 'saswp_attahced_reviews', true);
2531
+ $append_reviews = saswp_get_post_meta($schema_post_id, 'saswp_enable_append_reviews', true);
2532
 
2533
  if($append_reviews == 1 && ($attached_rv || $attached_col)){
2534
 
2552
 
2553
  foreach($attached_col as $col_id){
2554
 
2555
+ $collection_data = saswp_get_post_meta($col_id);
2556
 
2557
  if(isset($collection_data['saswp_platform_ids'][0])){
2558
  $platform_ids = unserialize($collection_data['saswp_platform_ids'][0]);
2605
 
2606
  $response = array();
2607
 
2608
+ $item_list_enable = saswp_get_post_meta($schema_id, 'saswp_enable_itemlist_schema', true);
2609
+ $item_list_tags = saswp_get_post_meta($schema_id, 'saswp_item_list_tags', true);
2610
+ $item_list_custom = saswp_get_post_meta($schema_id, 'saswp_item_list_custom', true);
2611
 
2612
  if($item_list_enable){
2613
 
2666
 
2667
  if($schema_options['saswp_modify_method'] == 'manual'){
2668
 
2669
+ $all_post_meta = saswp_get_post_meta($schema_post_id);
2670
 
2671
  switch ($schema_type) {
2672
 
2828
  $user_overall = 0;
2829
  $user_rates = 0;
2830
 
2831
+ $criterias = saswp_get_post_meta( saswp_get_the_ID(), 'reviews_score' );
2832
  $rate_criterias = array();
2833
  if( !empty( $criterias ) ){
2834
  foreach( $criterias as $criteria ){
2876
 
2877
  }else{
2878
 
2879
+ $author_average = saswp_get_post_meta( saswp_get_the_ID(), 'author_average', true );
2880
 
2881
  $ratings = array(
2882
  '@type' => 'AggregateRating',
3182
 
3183
  if(class_exists('Ampforwp_Stories_Post_Type')){
3184
 
3185
+ $amp_story_meta = saswp_get_post_meta( saswp_get_the_ID(), 'ampforwp_stories', true );
3186
+ $post_type = get_post_type(saswp_get_the_ID());
3187
 
3188
  if( !empty($amp_story_meta) && is_array($amp_story_meta) && $post_type == 'ampforwp_story' ) {
3189
 
output/gutenberg.php CHANGED
@@ -17,9 +17,12 @@ function saswp_gutenberg_recipe_schema(){
17
  $input1 = array();
18
 
19
  if( (isset($sd_data['saswp-wpzoom']) && $sd_data['saswp-wpzoom'] == 1) && class_exists('WPZOOM_Structured_Data_Helpers') && class_exists('WPZOOM_Helpers') ){
20
-
21
  $recipe_block = saswp_get_gutenberg_block_data('wpzoom-recipe-card/block-recipe-card');
22
- $attributes = $recipe_block['attrs'];
 
 
 
23
 
24
  $service_object = new saswp_output_service();
25
  $structured_data_helpers = new WPZOOM_Structured_Data_Helpers();
@@ -182,18 +185,21 @@ function saswp_gutenberg_recipe_schema(){
182
  $input1['recipeInstructions'] = $groups_section;
183
  }
184
 
185
- $image_details = saswp_get_image_by_id($attributes['image']['id']);
186
 
187
- if($image_details){
188
- $input1['image'] = $image_details;
189
- }else{
190
- if(!empty($feature_image)){
191
-
192
- $input1 = array_merge($input1, $feature_image);
193
 
 
 
 
194
  }
195
- }
196
-
197
 
198
  //video json
199
 
@@ -284,8 +290,8 @@ function saswp_gutenberg_recipe_schema(){
284
  }
285
  }
286
 
287
- $extra_theme_review = $service_object->saswp_extra_theme_review_details(get_the_ID());
288
- $aggregateRating = $service_object->saswp_rating_box_rating_markup(get_the_ID());
289
 
290
  if(!empty($aggregateRating)){
291
  $input1['aggregateRating'] = $aggregateRating;
@@ -294,7 +300,84 @@ function saswp_gutenberg_recipe_schema(){
294
  $input1 = array_merge($input1, $extra_theme_review);
295
  }
296
 
297
- $input1 = saswp_append_fetched_reviews($input1, get_the_ID());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
 
299
  }
300
 
@@ -707,8 +790,8 @@ function saswp_gutenberg_how_to_schema(){
707
 
708
  $service_object = new saswp_output_service();
709
 
710
- $extra_theme_review = $service_object->saswp_extra_theme_review_details(get_the_ID());
711
- $aggregateRating = $service_object->saswp_rating_box_rating_markup(get_the_ID());
712
 
713
  if(!empty($aggregateRating)){
714
  $input1['aggregateRating'] = $aggregateRating;
@@ -717,7 +800,7 @@ function saswp_gutenberg_how_to_schema(){
717
  $input1 = array_merge($input1, $extra_theme_review);
718
  }
719
 
720
- $input1 = saswp_append_fetched_reviews($input1, get_the_ID());
721
 
722
  }
723
 
17
  $input1 = array();
18
 
19
  if( (isset($sd_data['saswp-wpzoom']) && $sd_data['saswp-wpzoom'] == 1) && class_exists('WPZOOM_Structured_Data_Helpers') && class_exists('WPZOOM_Helpers') ){
20
+ $attributes = array();
21
  $recipe_block = saswp_get_gutenberg_block_data('wpzoom-recipe-card/block-recipe-card');
22
+
23
+ if(isset($recipe_block['attrs'])){
24
+ $attributes = $recipe_block['attrs'];
25
+ }
26
 
27
  $service_object = new saswp_output_service();
28
  $structured_data_helpers = new WPZOOM_Structured_Data_Helpers();
185
  $input1['recipeInstructions'] = $groups_section;
186
  }
187
 
188
+ if(isset($attributes['image']['id'])){
189
 
190
+ $image_details = saswp_get_image_by_id($attributes['image']['id']);
191
+
192
+ if($image_details){
193
+ $input1['image'] = $image_details;
194
+ }else{
195
+ if(!empty($feature_image)){
196
 
197
+ $input1 = array_merge($input1, $feature_image);
198
+
199
+ }
200
  }
201
+
202
+ }
203
 
204
  //video json
205
 
290
  }
291
  }
292
 
293
+ $extra_theme_review = $service_object->saswp_extra_theme_review_details(saswp_get_the_ID());
294
+ $aggregateRating = $service_object->saswp_rating_box_rating_markup(saswp_get_the_ID());
295
 
296
  if(!empty($aggregateRating)){
297
  $input1['aggregateRating'] = $aggregateRating;
300
  $input1 = array_merge($input1, $extra_theme_review);
301
  }
302
 
303
+ $input1 = saswp_append_fetched_reviews($input1, saswp_get_the_ID());
304
+
305
+ }else{
306
+
307
+
308
+ $attributes = saswp_get_gutenberg_block_data('saswp/recipe-block');
309
+
310
+ if(isset($attributes['attrs'])){
311
+
312
+ $data = $attributes['attrs'];
313
+
314
+ $input1['@context'] = saswp_context_url();
315
+ $input1['@type'] = 'Recipe';
316
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Recipe';
317
+ $input1['name'] = isset($data['title']) ? $data['title'] : saswp_get_the_title();
318
+ $input1['datePublished'] = get_the_date("c");
319
+ $input1['dateModified'] = get_the_modified_date("c");
320
+ $input1['author'] = isset($data['author']) ? $data['author'] : saswp_get_author_details();
321
+
322
+ $keywords = array();
323
+
324
+ if(!empty($data['cook_time'])){
325
+ $input1['cookTime'] = 'PT'.$data['cook_time'].'M';
326
+ }
327
+ if(!empty($data['pre_time'])){
328
+ $input1['prepTime'] = 'PT'.$data['pre_time'].'M';
329
+ }
330
+ if(!empty($data['cuisine'])){
331
+ $keywords[] = $data['cuisine'];
332
+ $input1['recipeCuisine'] = $data['cuisine'];
333
+ }
334
+ if(!empty($data['calories'])){
335
+ $input1['nutrition']['@type'] = 'NutritionInformation';
336
+ $input1['nutrition']['calories'] = $data['calories'];
337
+ }
338
+ if(!empty($data['servings'])){
339
+ $keywords[] = $data['servings'];
340
+ $input1['recipeYield'] = $data['servings'];
341
+ }
342
+ if(!empty($data['course'])){
343
+ $keywords[] = $data['course'];
344
+ $input1['recipeCategory'] = $data['course'];
345
+ }
346
+ if(!empty($data['banner_url'])){
347
+ $input1['image'] = $data['banner_url'];
348
+ }
349
+
350
+ $input1['keywords'] = isset($keywords) ? $keywords : saswp_get_the_tags();
351
+
352
+ if(!empty($data['notes'])){
353
+ $ing = '';
354
+ foreach ($data['notes'] as $value) {
355
+ $ing .= $value['name']. ', ';
356
+ }
357
+ $input1['description'] = $ing;
358
+ }
359
+
360
+ if(!empty($data['ingredients'])){
361
+ $ing = array();
362
+ foreach ($data['ingredients'] as $value) {
363
+ $ing[] = $value['name'];
364
+ }
365
+ $input1['recipeIngredient'] = $ing;
366
+ }
367
+
368
+ if(!empty($data['directions'])){
369
+ $ing = array();
370
+ foreach ($data['directions'] as $value) {
371
+ $ing[] = array(
372
+ '@type' => 'HoWToStep',
373
+ 'name' => $value['name'],
374
+ 'text' => $value['text'],
375
+ );
376
+ }
377
+ $input1['recipeInstructions'] = $ing;
378
+ }
379
+
380
+ }
381
 
382
  }
383
 
790
 
791
  $service_object = new saswp_output_service();
792
 
793
+ $extra_theme_review = $service_object->saswp_extra_theme_review_details(saswp_get_the_ID());
794
+ $aggregateRating = $service_object->saswp_rating_box_rating_markup(saswp_get_the_ID());
795
 
796
  if(!empty($aggregateRating)){
797
  $input1['aggregateRating'] = $aggregateRating;
800
  $input1 = array_merge($input1, $extra_theme_review);
801
  }
802
 
803
+ $input1 = saswp_append_fetched_reviews($input1, saswp_get_the_ID());
804
 
805
  }
806
 
output/location.php ADDED
@@ -0,0 +1,265 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class SASWP_Location_Widget extends WP_Widget {
4
+
5
+ /**
6
+ * Register widget with WordPress.
7
+ */
8
+ function __construct() {
9
+
10
+ parent::__construct(
11
+ 'saswp_location_widget', // Base ID
12
+ saswp_t_string('SASWP Location'), // Name
13
+ array( 'description' => saswp_t_string('Widget to display location') ) // Args
14
+ );
15
+ }
16
+
17
+ /**
18
+ * Front-end display of widget.
19
+ *
20
+ * @see WP_Widget::widget()
21
+ *
22
+ * @param array $args Widget arguments.
23
+ * @param array $instance Saved values from database.
24
+ */
25
+ public function widget( $args, $instance ) {
26
+
27
+ echo html_entity_decode(esc_attr($args['before_widget']));
28
+
29
+
30
+ $all_loc = saswp_get_location_list();
31
+
32
+ foreach($all_loc as $ad){
33
+
34
+ if($ad['value'] == $instance['loc']){
35
+
36
+ echo saswp_add_location_content($instance['loc']);
37
+
38
+ }
39
+
40
+ }
41
+
42
+ echo html_entity_decode(esc_attr($args['after_widget']));
43
+ }
44
+
45
+ /**
46
+ * Back-end widget form.
47
+ *
48
+ * @see WP_Widget::form()
49
+ *
50
+ * @param array $instance Previously saved values from database.
51
+ */
52
+ public function form( $instance ) {
53
+
54
+ $loc = ! empty( $instance['loc'] ) ? $instance['loc'] : saswp_t_string('Widget to display location');?>
55
+
56
+ <p><label for="<?php echo esc_attr( $this->get_field_id( 'loc' ) ); ?>"><?php saswp_t_string('Locations'); ?></label><?php
57
+
58
+ $loc_select_html = '';
59
+
60
+ $all_loc = saswp_get_location_list();
61
+
62
+ $loc_select_html .= '<option value="">'.saswp_t_string('Select Location').'</option>';
63
+
64
+ foreach($all_loc as $ad){
65
+
66
+ $loc_select_html .='<option '. esc_attr(selected( $loc, $ad['value'], false)).' value="'.esc_attr($ad['value']).'">'.esc_html($ad['label']).'</option>';
67
+
68
+ }
69
+
70
+ $allow_html = saswp_expanded_allowed_tags();
71
+
72
+ echo '<select id="'.esc_attr( $this->get_field_id( 'loc' )).'" name="'.esc_attr( $this->get_field_name( 'loc' )).'">'
73
+ .wp_kses($loc_select_html, $allow_html)
74
+ . '</select>';
75
+ ?></p><?php
76
+ }
77
+
78
+ /**
79
+ * Sanitize widget form values as they are saved.
80
+ *
81
+ * @see WP_Widget::update()
82
+ *
83
+ * @param array $new_instance Values just sent to be saved.
84
+ * @param array $old_instance Previously saved values from database.
85
+ *
86
+ * @return array Updated safe values to be saved.
87
+ */
88
+ public function update( $new_instance, $old_instance ) {
89
+ $instance = array();
90
+
91
+ $instance['loc'] = ( ! empty( $new_instance['loc'] ) ) ? sanitize_text_field( $new_instance['loc'] ) : '';
92
+ return $instance;
93
+ }
94
+
95
+ } // class SASWP_Location_Widget
96
+
97
+ function saswp_register_location_widget(){
98
+ register_widget('SASWP_Location_Widget');
99
+ }
100
+ add_action('widgets_init', 'saswp_register_location_widget');
101
+
102
+ function saswp_get_location_list(){
103
+
104
+ $response = array();
105
+
106
+ $schema_id_array = json_decode(get_transient('saswp_transient_schema_ids'), true);
107
+
108
+ if(!$schema_id_array){
109
+
110
+ $schema_id_array = saswp_get_saved_schema_ids();
111
+
112
+ }
113
+
114
+ if($schema_id_array){
115
+
116
+ $col_opt = array();
117
+
118
+ foreach($schema_id_array as $col){
119
+
120
+ $schema_type = saswp_get_post_meta($col, 'schema_type', true);
121
+ $display_front = saswp_get_post_meta($col, 'saswp_loc_display_on_front', true);
122
+
123
+ if( $schema_type == 'local_business' && $display_front ){
124
+ $col_opt[] = array(
125
+ 'value' => $col,
126
+ 'label' => get_the_title($col)
127
+ );
128
+ }
129
+
130
+ }
131
+
132
+ $response = $col_opt;
133
+
134
+ }
135
+ return $response;
136
+
137
+ }
138
+
139
+ add_shortcode( 'saswp-location', 'saswp_location_shortcode_render');
140
+
141
+ function saswp_location_shortcode_render($attr){
142
+
143
+ if(isset($attr['id'])){
144
+ echo saswp_add_location_content($attr['id']);
145
+ }
146
+
147
+ }
148
+
149
+ function saswp_add_location_content( $post_id ){
150
+
151
+ $post_meta = saswp_get_post_meta($post_id);
152
+
153
+ $html = '<div class="saswp-location-container">';
154
+
155
+ if( !empty($post_meta['local_business_name_'.$post_id][0]) ){
156
+ $html .= '<h2>'.esc_html($post_meta['local_business_name_'.$post_id][0]).'</h2>';
157
+ }
158
+
159
+ $html .= '<div class="saswp-location-address-wrapper">';
160
+
161
+ if( !empty($post_meta['local_street_address_'.$post_id][0]) ){
162
+ $html .= '<span>'.esc_html($post_meta['local_street_address_'.$post_id][0]).'</span>';
163
+ }
164
+ if( !empty($post_meta['local_city_'.$post_id][0]) ){
165
+ $html .= '<span> '.esc_html($post_meta['local_city_'.$post_id][0]).'</span>';
166
+ }
167
+ if( !empty($post_meta['local_state_'.$post_id][0]) ){
168
+ $html .= '<span> '.esc_html($post_meta['local_state_'.$post_id][0]).'</span>';
169
+ }
170
+ if( !empty($post_meta['local_postal_code_'.$post_id][0]) ){
171
+ $html .= '<span> '.esc_html($post_meta['local_postal_code_'.$post_id][0]).'</span>';
172
+ }
173
+
174
+ $html .= '</div>';
175
+
176
+ if( !empty($post_meta['local_phone_'.$post_id][0]) ){
177
+ $html .= '<div>Phone : '.esc_html($post_meta['local_phone_'.$post_id][0]).'</div>';
178
+ }
179
+ if( !empty($post_meta['local_website_'.$post_id][0]) ){
180
+ $html .= '<div>Website : '.esc_html($post_meta['local_website_'.$post_id][0]).'</div>';
181
+ }
182
+ if( !empty($post_meta['local_price_range_'.$post_id][0]) ){
183
+ $html .= '<div>Price indication : '.esc_html($post_meta['local_price_range_'.$post_id][0]).'</div>';
184
+ }
185
+ if( !empty($post_meta['local_facebook_'.$post_id][0]) ){
186
+ $html .= '<div>Facebook : '.esc_html($post_meta['local_facebook_'.$post_id][0]).'</div>';
187
+ }
188
+ if( !empty($post_meta['local_twitter_'.$post_id][0]) ){
189
+ $html .= '<div>Twitter : '.esc_html($post_meta['local_twitter_'.$post_id][0]).'</div>';
190
+ }
191
+ if( !empty($post_meta['local_instagram_'.$post_id][0]) ){
192
+ $html .= '<div>Instagram : '.esc_html($post_meta['local_instagram_'.$post_id][0]).'</div>';
193
+ }
194
+ if( !empty($post_meta['local_pinterest_'.$post_id][0]) ){
195
+ $html .= '<div>Pinterest : '.esc_html($post_meta['local_pinterest_'.$post_id][0]).'</div>';
196
+ }
197
+ if( !empty($post_meta['local_linkedin_'.$post_id][0]) ){
198
+ $html .= '<div>Linkedin : '.esc_html($post_meta['local_linkedin_'.$post_id][0]).'</div>';
199
+ }
200
+ if( !empty($post_meta['local_soundcloud_'.$post_id][0]) ){
201
+ $html .= '<div>Soundcloud : '.esc_html($post_meta['local_soundcloud_'.$post_id][0]).'</div>';
202
+ }
203
+ if( !empty($post_meta['local_tumblr_'.$post_id][0]) ){
204
+ $html .= '<div>Tumblr : '.esc_html($post_meta['local_tumblr_'.$post_id][0]).'</div>';
205
+ }
206
+ if( !empty($post_meta['local_youtube_'.$post_id][0]) ){
207
+ $html .= '<div>Youtube : '.esc_html($post_meta['local_youtube_'.$post_id][0]).'</div>';
208
+ }
209
+
210
+ if(!empty($post_meta['saswp_dayofweek_'.$post_id][0])){
211
+
212
+ $short_days = array('Monday' => 'Mo',
213
+ 'Tuesday' => 'Tu',
214
+ 'Wednesday' => 'We',
215
+ 'Thursday' => 'Th',
216
+ 'Friday' => 'Fr',
217
+ 'Saturday' => 'Sa',
218
+ 'Sunday' => 'Su');
219
+
220
+ $operation_days = explode(PHP_EOL, $post_meta['saswp_dayofweek_'.$post_id][0]);
221
+
222
+ $op_tr = '';
223
+
224
+ foreach ( $short_days as $key => $value ) {
225
+
226
+ $s_key = null;
227
+
228
+ foreach ( $operation_days as $okey => $oval ) {
229
+
230
+ if(strpos(strtolower($oval), strtolower($value)) !== false){
231
+ $s_key = $okey;
232
+ }
233
+
234
+ }
235
+
236
+ if($s_key){
237
+ $exploded = explode( ' ', $operation_days[$s_key] );
238
+ }
239
+
240
+ if( isset($exploded[1]) ){
241
+ $op_tr .= '<tr><td>'.esc_html($key).'</td><td>'.esc_html($exploded[1]).'</td></tr>';
242
+ }
243
+ }
244
+
245
+ if($op_tr){
246
+
247
+ $html.= '<table>';
248
+ $html.= '<tbody>';
249
+ $html.= $op_tr;
250
+ $html.= '</tbody>';
251
+ $html.= '</table>';
252
+
253
+ }
254
+
255
+ if( !empty($post_meta['local_latitude_'.$post_id][0]) && !empty($post_meta['local_longitude_'.$post_id][0]) ){
256
+ $html .= '<iframe src="https://maps.google.com/maps?q='.esc_attr($post_meta['local_latitude_'.$post_id][0]).', '.esc_attr($post_meta['local_longitude_'.$post_id][0]).'&z=15&output=embed" width="360" height="270" frameborder="0" style="border:0"></iframe>';
257
+ }
258
+
259
+
260
+ }
261
+
262
+ $html .= '</div>';
263
+
264
+ return $html;
265
+ }
output/markup.php CHANGED
@@ -86,7 +86,7 @@ function saswp_get_reviews_schema_markup($reviews){
86
 
87
  function saswp_get_modified_image( $key, $input1 ){
88
 
89
- $image = get_post_meta( get_the_ID(), $key ,true);
90
 
91
  if( !(empty($image)) && is_array($image) ){
92
 
@@ -161,7 +161,7 @@ function saswp_movie_schema_markup($schema_id, $schema_post_id, $all_post_meta){
161
 
162
  $input1 = array();
163
 
164
- $tool = get_post_meta($schema_post_id, 'movie_actor_'.$schema_id, true);
165
 
166
  $input1['@context'] = saswp_context_url();
167
  $input1['@type'] = 'Movie';
@@ -216,9 +216,9 @@ function saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta){
216
 
217
  $input1 = array();
218
 
219
- $tool = get_post_meta($schema_post_id, 'howto_tool_'.$schema_id, true);
220
- $step = get_post_meta($schema_post_id, 'howto_step_'.$schema_id, true);
221
- $supply = get_post_meta($schema_post_id, 'howto_supply_'.$schema_id, true);
222
 
223
  $input1['@context'] = saswp_context_url();
224
  $input1['@type'] = 'HowTo';
@@ -346,6 +346,129 @@ function saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta){
346
  return $input1;
347
  }
348
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
  function saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta){
350
 
351
  $input1 = array();
@@ -489,7 +612,7 @@ function saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta){
489
  }
490
 
491
  //Performer starts here
492
- $performer = get_post_meta($schema_post_id, 'performer_'.$schema_id, true);
493
 
494
  $performer_arr = array();
495
 
@@ -519,7 +642,7 @@ function saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta){
519
  //Performer ends here
520
 
521
  //Organizer starts here
522
- $organizer = get_post_meta($schema_post_id, 'organizer_'.$schema_id, true);
523
 
524
  $organizer_arr = array();
525
 
@@ -683,10 +806,10 @@ function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta)
683
 
684
  $input1 = array();
685
 
686
- $recipe_logo = get_post_meta( get_the_ID(), 'saswp_recipe_organization_logo_'.$schema_id.'_detail',true);
687
- $recipe_author_image = get_post_meta( get_the_ID(), 'saswp_recipe_author_image_'.$schema_id.'_detail',true);
688
 
689
- $step = get_post_meta($schema_post_id, 'recipe_instructions_'.$schema_id, true);
690
 
691
  $ingredient = array();
692
  $instruction = array();
@@ -968,7 +1091,7 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
968
  }
969
 
970
 
971
- $itinerary = get_post_meta($schema_post_id, 'product_reviews_'.$schema_id, true);
972
 
973
  $itinerary_arr = array();
974
 
@@ -1003,7 +1126,7 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
1003
  }
1004
 
1005
  $service = new saswp_output_service();
1006
- $product_details = $service->saswp_woocommerce_product_details(get_the_ID());
1007
 
1008
 
1009
  if(!empty($product_details['product_reviews'])){
@@ -1337,7 +1460,7 @@ function saswp_organization_schema_markup($schema_id, $schema_post_id, $all_post
1337
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_organization_url_'.$schema_id, 'saswp_array');
1338
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_organization_description_'.$schema_id, 'saswp_array');
1339
 
1340
- $howto_image = get_post_meta( get_the_ID(), 'saswp_organization_logo_'.$schema_id.'_detail',true);
1341
 
1342
  if(!(empty($howto_image))){
1343
 
@@ -1398,7 +1521,7 @@ function saswp_project_schema_markup($schema_id, $schema_post_id, $all_post_meta
1398
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_project_url_'.$schema_id, 'saswp_array');
1399
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_project_description_'.$schema_id, 'saswp_array');
1400
 
1401
- $howto_image = get_post_meta( get_the_ID(), 'saswp_project_logo_'.$schema_id.'_detail',true);
1402
 
1403
  if(!(empty($howto_image))){
1404
 
@@ -1632,7 +1755,7 @@ function saswp_music_playlist_schema_markup($schema_id, $schema_post_id, $all_po
1632
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_music_playlist_name_'.$schema_id, 'saswp_array');
1633
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_music_playlist_description_'.$schema_id, 'saswp_array');
1634
 
1635
- $faq_question = get_post_meta($schema_post_id, 'music_playlist_track_'.$schema_id, true);
1636
 
1637
  $faq_question_arr = array();
1638
 
@@ -1684,7 +1807,7 @@ function saswp_music_composition_schema_markup($schema_id, $schema_post_id, $all
1684
 
1685
  $input1 = saswp_get_modified_image('saswp_music_composition_image_'.$schema_id.'_detail', $input1);
1686
 
1687
- $faq_question = get_post_meta($schema_post_id, 'music_composer_'.$schema_id, true);
1688
 
1689
  $faq_question_arr = array();
1690
 
@@ -1866,7 +1989,7 @@ function saswp_trip_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1866
 
1867
  $input1 = saswp_get_modified_image('saswp_trip_schema_image_'.$schema_id.'_detail', $input1);
1868
 
1869
- $itinerary = get_post_meta($schema_post_id, 'trip_itinerary_'.$schema_id, true);
1870
 
1871
  $itinerary_arr = array();
1872
 
@@ -1903,7 +2026,7 @@ function saswp_boat_trip_schema_markup($schema_id, $schema_post_id, $all_post_me
1903
 
1904
  $input1 = saswp_get_modified_image('saswp_boat_trip_schema_image_'.$schema_id.'_detail', $input1);
1905
 
1906
- $itinerary = get_post_meta($schema_post_id, 'boat_trip_itinerary_'.$schema_id, true);
1907
 
1908
  $itinerary_arr = array();
1909
 
@@ -1931,8 +2054,8 @@ function saswp_itemlist_schema_markup($schema_id, $schema_post_id, $all_post_met
1931
 
1932
  $response = array();
1933
 
1934
- $itemlist = get_post_meta($schema_post_id, 'itemlist_item_'.$schema_id, true);
1935
- $itemtype = get_post_meta($schema_id, 'saswp_itemlist_item_type', true);
1936
  $type_func = 'saswp_'.$itemtype.'_schema_markup';
1937
  $list_item = array();
1938
  $image_details = array();
@@ -2024,7 +2147,7 @@ function saswp_faq_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2024
  $input1['author']['name'] = $all_post_meta['saswp_faq_author_'.$schema_id][0];
2025
  }
2026
 
2027
- $faq_question = get_post_meta($schema_post_id, 'faq_question_'.$schema_id, true);
2028
 
2029
  $faq_question_arr = array();
2030
 
@@ -2069,7 +2192,7 @@ function saswp_music_album_schema_markup($schema_id, $schema_post_id, $all_post_
2069
 
2070
  $input1 = saswp_get_modified_image('saswp_music_album_image_'.$schema_id.'_detail', $input1);
2071
 
2072
- $faq_question = get_post_meta($schema_post_id, 'music_album_track_'.$schema_id, true);
2073
 
2074
  $faq_question_arr = array();
2075
 
@@ -2096,7 +2219,7 @@ function saswp_job_posting_schema_markup($schema_id, $schema_post_id, $all_post_
2096
 
2097
  $input1 = array();
2098
 
2099
- $howto_image = get_post_meta( get_the_ID(), 'saswp_jobposting_schema_ho_logo_'.$schema_id.'_detail',true);
2100
 
2101
  $input1['@context'] = saswp_context_url();
2102
  $input1['@type'] = 'JobPosting';
@@ -2151,7 +2274,7 @@ function saswp_job_posting_schema_markup($schema_id, $schema_post_id, $all_post_
2151
 
2152
  $job_location[] = $job_location_arr;
2153
 
2154
- $joblocation_meta = get_post_meta($schema_post_id, 'joblocation_'.$schema_id, true);
2155
 
2156
  if(!empty($joblocation_meta)){
2157
 
@@ -2444,7 +2567,7 @@ function saswp_apartment_schema_markup($schema_id, $schema_post_id, $all_post_me
2444
 
2445
  }
2446
 
2447
- $itinerary = get_post_meta($schema_post_id, 'apartment_amenities_'.$schema_id, true);
2448
 
2449
  $itinerary_arr = array();
2450
 
@@ -2462,7 +2585,7 @@ function saswp_apartment_schema_markup($schema_id, $schema_post_id, $all_post_me
2462
  $input1['amenityFeature'] = $itinerary_arr;
2463
  }
2464
 
2465
- $add_property = get_post_meta($schema_post_id, 'additional_property_'.$schema_id, true);
2466
 
2467
  $add_property_arr = array();
2468
 
@@ -2578,8 +2701,8 @@ function saswp_tv_series_schema_markup($schema_id, $schema_post_id, $all_post_me
2578
 
2579
  $input1 = array();
2580
 
2581
- $actor = get_post_meta($schema_post_id, 'tvseries_actor_'.$schema_id, true);
2582
- $season = get_post_meta($schema_post_id, 'tvseries_season_'.$schema_id, true);
2583
 
2584
  $input1['@context'] = saswp_context_url();
2585
  $input1['@type'] = 'TVSeries';
@@ -2633,11 +2756,10 @@ function saswp_tv_series_schema_markup($schema_id, $schema_post_id, $all_post_me
2633
 
2634
  function saswp_medical_condition_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2635
 
2636
- $input1 = array();
2637
-
2638
- $cause = get_post_meta($schema_post_id, 'mc_cause_'.$schema_id, true);
2639
- $symptom = get_post_meta($schema_post_id, 'mc_symptom_'.$schema_id, true);
2640
- $riskfactro = get_post_meta($schema_post_id, 'mc_risk_factor_'.$schema_id, true);
2641
 
2642
  $input1['@context'] = saswp_context_url();
2643
  $input1['@type'] = 'MedicalCondition';
@@ -2669,7 +2791,8 @@ function saswp_medical_condition_schema_markup($schema_id, $schema_post_id, $all
2669
 
2670
  $input1['code']['@type'] = 'MedicalCode';
2671
  $input1['code']['code'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_medical_code_'.$schema_id, 'saswp_array');
2672
- $input1['code']['codingSystem'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_coding_system_'.$schema_id, 'saswp_array');
 
2673
  $symptom_arr = array();
2674
  if(!empty($symptom)){
2675
 
@@ -2709,7 +2832,7 @@ function saswp_qanda_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2709
  if(trim(saswp_remove_warnings($all_post_meta, 'saswp_qa_question_title_'.$schema_id, 'saswp_array')) ==''){
2710
 
2711
  $service_object = new saswp_output_service();
2712
- $input1 = $service_object->saswp_dw_question_answers_details(get_the_ID());
2713
 
2714
  }else{
2715
 
@@ -2724,18 +2847,16 @@ function saswp_qanda_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2724
  $input1['mainEntity']['dateCreated'] = isset($all_post_meta['saswp_qa_date_created_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_qa_date_created_'.$schema_id][0])):'';
2725
 
2726
  $input1['mainEntity']['author']['@type'] = 'Person';
2727
-
2728
  if(isset($all_post_meta['saswp_qa_question_author_type_'.$schema_id][0])){
2729
  $input1['mainEntity']['author']['@type'] = $all_post_meta['saswp_qa_question_author_type_'.$schema_id][0];
2730
  }
2731
 
2732
  $input1['mainEntity']['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_qa_question_author_name_'.$schema_id, 'saswp_array');
2733
-
2734
- $input1['mainEntity']['author'] = array('@type' => 'Person','name' =>saswp_remove_warnings($all_post_meta, 'saswp_qa_question_author_name_'.$schema_id, 'saswp_array'));
2735
-
2736
  $input1['mainEntity']['answerCount'] = saswp_remove_warnings($all_post_meta, 'saswp_qa_answer_count_'.$schema_id, 'saswp_array');
2737
 
2738
- $answer = get_post_meta($schema_post_id, 'accepted_answer_'.$schema_id, true);
2739
 
2740
  $answer_arr = array();
2741
 
@@ -2751,7 +2872,14 @@ function saswp_qanda_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2751
  $supply_data['url'] = $val['saswp_qa_accepted_answer_url'];
2752
  $supply_data['text'] = $val['saswp_qa_accepted_answer_text'];
2753
  $supply_data['dateCreated'] = saswp_format_date_time($val['saswp_qa_accepted_answer_date_created']);
2754
- $supply_data['author'] = $val['saswp_qa_accepted_author_name'];
 
 
 
 
 
 
 
2755
  }
2756
 
2757
  $answer_arr[] = $supply_data;
@@ -2759,7 +2887,7 @@ function saswp_qanda_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2759
  $input1['mainEntity']['acceptedAnswer'] = $answer_arr;
2760
  }
2761
 
2762
- $answer = get_post_meta($schema_post_id, 'suggested_answer_'.$schema_id, true);
2763
 
2764
  $answer_arr = array();
2765
 
@@ -2775,7 +2903,14 @@ function saswp_qanda_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2775
  $supply_data['url'] = $val['saswp_qa_suggested_answer_url'];
2776
  $supply_data['text'] = $val['saswp_qa_suggested_answer_text'];
2777
  $supply_data['dateCreated'] = saswp_format_date_time($val['saswp_qa_suggested_answer_date_created']);
2778
- $supply_data['author'] = $val['saswp_qa_suggested_author_name'];
 
 
 
 
 
 
 
2779
  }
2780
 
2781
  $answer_arr[] = $supply_data;
@@ -2804,7 +2939,7 @@ function saswp_data_feed_schema_markup($schema_id, $schema_post_id, $all_post_me
2804
  );
2805
 
2806
 
2807
- $performer = get_post_meta($schema_post_id, 'feed_element_'.$schema_id, true);
2808
 
2809
  $performer_arr = array();
2810
 
@@ -2836,7 +2971,7 @@ function saswp_dfp_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2836
 
2837
  $input1 = array();
2838
 
2839
- $slogo = get_post_meta( get_the_ID(), 'saswp_dfp_organization_logo_'.$schema_id.'_detail',true);
2840
  $input1 = array(
2841
  '@context' => saswp_context_url(),
2842
  '@type' => 'DiscussionForumPosting' ,
@@ -2880,7 +3015,7 @@ function saswp_blogposting_schema_markup($schema_id, $schema_post_id, $all_post_
2880
 
2881
  $input1 = array();
2882
 
2883
- $slogo = get_post_meta( get_the_ID(), 'saswp_blogposting_organization_logo_'.$schema_id.'_detail',true);
2884
 
2885
  $input1 = array(
2886
  '@context' => saswp_context_url(),
@@ -2922,7 +3057,7 @@ function saswp_blogposting_schema_markup($schema_id, $schema_post_id, $all_post_
2922
  $input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_blogposting_author_description_'.$schema_id, 'saswp_array');
2923
  $input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_blogposting_author_url_'.$schema_id, 'saswp_array');
2924
 
2925
- $itemlist = get_post_meta($schema_post_id, 'blogposting_items_'.$schema_id, true);
2926
 
2927
  if($itemlist){
2928
 
@@ -3041,7 +3176,7 @@ function saswp_vehicle_schema_markup($schema_id, $schema_post_id, $all_post_meta
3041
  }
3042
 
3043
 
3044
- $itinerary = get_post_meta($schema_post_id, 'car_reviews_'.$schema_id, true);
3045
 
3046
  $itinerary_arr = array();
3047
 
@@ -3076,7 +3211,7 @@ function saswp_vehicle_schema_markup($schema_id, $schema_post_id, $all_post_meta
3076
  }
3077
 
3078
  $service = new saswp_output_service();
3079
- $car_details = $service->saswp_woocommerce_product_details(get_the_ID());
3080
 
3081
  if(!empty($car_details['car_reviews'])){
3082
 
@@ -3198,7 +3333,7 @@ function saswp_car_schema_markup($schema_id, $schema_post_id, $all_post_meta){
3198
  }
3199
 
3200
 
3201
- $itinerary = get_post_meta($schema_post_id, 'car_reviews_'.$schema_id, true);
3202
 
3203
  $itinerary_arr = array();
3204
 
@@ -3233,7 +3368,7 @@ function saswp_car_schema_markup($schema_id, $schema_post_id, $all_post_meta){
3233
  }
3234
 
3235
  $service = new saswp_output_service();
3236
- $car_details = $service->saswp_woocommerce_product_details(get_the_ID());
3237
 
3238
  if(!empty($car_details['car_reviews'])){
3239
 
@@ -3271,7 +3406,7 @@ function saswp_creative_work_series_schema_markup($schema_id, $schema_post_id, $
3271
 
3272
  $input1 = array();
3273
 
3274
- $slogo = get_post_meta( get_the_ID(), 'saswp_cws_schema_organization_logo_'.$schema_id.'_detail',true);
3275
 
3276
  $input1 = array(
3277
  '@context' => saswp_context_url(),
@@ -3347,7 +3482,7 @@ function saswp_webpage_schema_markup($schema_id, $schema_post_id, $all_post_meta
3347
 
3348
  $input1 = array();
3349
 
3350
- $slogo = get_post_meta( get_the_ID(), 'saswp_webpage_organization_logo_'.$schema_id.'_detail',true);
3351
  $input1 = array(
3352
  '@context' => saswp_context_url(),
3353
  '@type' => 'WebPage' ,
@@ -3419,8 +3554,8 @@ function saswp_special_announcement_schema_markup($schema_id, $schema_post_id, $
3419
 
3420
  $input1 = array();
3421
 
3422
- $slogo = get_post_meta( get_the_ID(), 'saswp_special_announcement_organization_logo_'.$schema_id.'_detail',true);
3423
- $location_img = get_post_meta( get_the_ID(), 'saswp_special_announcement_location_image_'.$schema_id.'_detail',true);
3424
 
3425
  $input1 = array(
3426
  '@context' => saswp_context_url(),
@@ -3497,7 +3632,7 @@ function saswp_special_announcement_schema_markup($schema_id, $schema_post_id, $
3497
 
3498
  }
3499
 
3500
- $supply = get_post_meta($schema_post_id, 'announcement_location_'.$schema_id, true);
3501
 
3502
  if(!empty($supply)){
3503
 
@@ -3586,7 +3721,7 @@ function saswp_photograph_schema_markup($schema_id, $schema_post_id, $all_post_m
3586
 
3587
  $input1 = array();
3588
 
3589
- $slogo = get_post_meta( get_the_ID(), 'saswp_photograph_organization_logo_'.$schema_id.'_detail',true);
3590
 
3591
  $input1 = array(
3592
  '@context' => saswp_context_url(),
@@ -3631,7 +3766,7 @@ function saswp_article_schema_markup($schema_id, $schema_post_id, $all_post_meta
3631
 
3632
  $input1 = array();
3633
 
3634
- $slogo = get_post_meta( get_the_ID(), 'saswp_article_organization_logo_'.$schema_id.'_detail',true);
3635
 
3636
  $input1 = array(
3637
  '@context' => saswp_context_url(),
@@ -3672,7 +3807,7 @@ function saswp_article_schema_markup($schema_id, $schema_post_id, $all_post_meta
3672
 
3673
  }
3674
 
3675
- $itemlist = get_post_meta($schema_post_id, 'article_items_'.$schema_id, true);
3676
 
3677
  if($itemlist){
3678
 
@@ -3707,7 +3842,7 @@ function saswp_creativework_schema_markup($schema_id, $schema_post_id, $all_post
3707
 
3708
  $input1 = array();
3709
 
3710
- $slogo = get_post_meta( get_the_ID(), 'saswp_creativework_organization_logo_'.$schema_id.'_detail',true);
3711
 
3712
  $input1 = array(
3713
  '@context' => saswp_context_url(),
@@ -3748,7 +3883,7 @@ function saswp_creativework_schema_markup($schema_id, $schema_post_id, $all_post
3748
 
3749
  }
3750
 
3751
- $itemlist = get_post_meta($schema_post_id, 'article_items_'.$schema_id, true);
3752
 
3753
  if($itemlist){
3754
 
@@ -3773,7 +3908,7 @@ function saswp_tech_article_schema_markup($schema_id, $schema_post_id, $all_post
3773
 
3774
  $input1 = array();
3775
 
3776
- $slogo = get_post_meta( get_the_ID(), 'saswp_tech_article_organization_logo_'.$schema_id.'_detail',true);
3777
 
3778
  $input1 = array(
3779
  '@context' => saswp_context_url(),
@@ -3810,7 +3945,7 @@ function saswp_tech_article_schema_markup($schema_id, $schema_post_id, $all_post
3810
  $input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_tech_article_author_description_'.$schema_id, 'saswp_array');
3811
  $input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_tech_article_author_url_'.$schema_id, 'saswp_array');
3812
 
3813
- $itemlist = get_post_meta($schema_post_id, 'tech_article_items_'.$schema_id, true);
3814
 
3815
  if($itemlist){
3816
 
@@ -3844,8 +3979,8 @@ function saswp_news_article_schema_markup($schema_id, $schema_post_id, $all_post
3844
 
3845
  $input1 = array();
3846
 
3847
- $slogo = get_post_meta( get_the_ID(), 'saswp_newsarticle_organization_logo_'.$schema_id.'_detail',true);
3848
- $author_image = get_post_meta( get_the_ID(), 'saswp_newsarticle_author_image_'.$schema_id.'_detail',true);
3849
 
3850
  $input1 = array(
3851
  '@context' => saswp_context_url(),
@@ -3899,7 +4034,7 @@ function saswp_news_article_schema_markup($schema_id, $schema_post_id, $all_post
3899
  $input1['author']['image']['width'] = isset($author_image['width']) ? $author_image['width'] : '';
3900
 
3901
 
3902
- $itemlist = get_post_meta($schema_post_id, 'newsarticle_items_'.$schema_id, true);
3903
 
3904
  if($itemlist){
3905
 
@@ -3934,7 +4069,7 @@ function saswp_audiobook_schema_markup($schema_id, $schema_post_id, $all_post_me
3934
 
3935
  $input1 = array();
3936
 
3937
- $author_image = get_post_meta( get_the_ID(), 'saswp_audiobook_author_image_'.$schema_id.'_detail',true);
3938
 
3939
  $input1 = array(
3940
  '@context' => saswp_context_url(),
@@ -4064,8 +4199,8 @@ function saswp_video_object_schema_markup($schema_id, $schema_post_id, $all_post
4064
 
4065
  $input1 = array();
4066
 
4067
- $slogo = get_post_meta( get_the_ID(), 'saswp_video_object_organization_logo_'.$schema_id.'_detail',true);
4068
- $author_image = get_post_meta( get_the_ID(), 'saswp_video_object_author_image_'.$schema_id.'_detail',true);
4069
 
4070
  $input1 = array(
4071
  '@context' => saswp_context_url(),
@@ -4134,8 +4269,8 @@ function saswp_image_object_schema_markup($schema_id, $schema_post_id, $all_post
4134
 
4135
  $input1 = array();
4136
 
4137
- $slogo = get_post_meta( get_the_ID(), 'saswpimage_object_organization_logo_'.$schema_id.'_detail',true);
4138
- $author_image = get_post_meta( get_the_ID(), 'saswpimage_object_author_image_'.$schema_id.'_detail',true);
4139
 
4140
  $input1 = array(
4141
  '@context' => saswp_context_url(),
@@ -4178,7 +4313,7 @@ function saswp_image_object_schema_markup($schema_id, $schema_post_id, $all_post
4178
  $input1['author']['image']['height'] = $author_image['height'];
4179
  $input1['author']['image']['width'] = $author_image['width'];
4180
 
4181
- $itinerary = get_post_meta($schema_post_id, 'image_object_exif_data_'.$schema_id, true);
4182
 
4183
  $itinerary_arr = array();
4184
 
86
 
87
  function saswp_get_modified_image( $key, $input1 ){
88
 
89
+ $image = saswp_get_post_meta( saswp_get_the_ID(), $key ,true);
90
 
91
  if( !(empty($image)) && is_array($image) ){
92
 
161
 
162
  $input1 = array();
163
 
164
+ $tool = saswp_get_post_meta($schema_post_id, 'movie_actor_'.$schema_id, true);
165
 
166
  $input1['@context'] = saswp_context_url();
167
  $input1['@type'] = 'Movie';
216
 
217
  $input1 = array();
218
 
219
+ $tool = saswp_get_post_meta($schema_post_id, 'howto_tool_'.$schema_id, true);
220
+ $step = saswp_get_post_meta($schema_post_id, 'howto_step_'.$schema_id, true);
221
+ $supply = saswp_get_post_meta($schema_post_id, 'howto_supply_'.$schema_id, true);
222
 
223
  $input1['@context'] = saswp_context_url();
224
  $input1['@type'] = 'HowTo';
346
  return $input1;
347
  }
348
 
349
+ function saswp_eop_schema_markup($schema_id, $schema_post_id, $all_post_meta){
350
+
351
+ $input1 = array();
352
+
353
+ $input1['@context'] = saswp_context_url();
354
+ $input1['@type'] = 'EducationalOccupationalProgram';
355
+ $input1['@id'] = trailingslashit(get_permalink()).'#EducationalOccupationalProgram';
356
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_eop_name_'.$schema_id, 'saswp_array');
357
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_eop_url_'.$schema_id, 'saswp_array');
358
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_eop_description_'.$schema_id, 'saswp_array');
359
+
360
+ $howto_image = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_eop_image_'.$schema_id.'_detail',true);
361
+
362
+ if(!(empty($howto_image))){
363
+
364
+ $input1['image']['@type'] = 'ImageObject';
365
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
366
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
367
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
368
+
369
+ }
370
+
371
+ $input1['provider']['@type'] = 'EducationalOrganization';
372
+ $input1['provider']['address']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_eop_provider_name_'.$schema_id, 'saswp_array');
373
+ $input1['provider']['address']['streetAddress'] = saswp_remove_warnings($all_post_meta, 'saswp_eop_provider_street_address_'.$schema_id, 'saswp_array');
374
+ $input1['provider']['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_eop_provider_address_country_'.$schema_id, 'saswp_array');
375
+ $input1['provider']['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_eop_provider_address_locality_'.$schema_id, 'saswp_array');
376
+ $input1['provider']['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_eop_provider_address_region_'.$schema_id, 'saswp_array');
377
+ $input1['provider']['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_eop_provider_postal_code_'.$schema_id, 'saswp_array');
378
+
379
+ $input1['provider']['contactPoint']['@type'] = 'ContactPoint';
380
+ $input1['provider']['contactPoint']['contactType'] = 'Admissions';
381
+ $input1['provider']['contactPoint']['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_eop_provider_telephone_'.$schema_id, 'saswp_array');
382
+
383
+ if( isset($all_post_meta['saswp_eop_time_to_complete_'.$schema_id][0]) ){
384
+ $input1['timeToComplete'] = $all_post_meta['saswp_eop_time_to_complete_'.$schema_id][0];
385
+ }
386
+ if( isset($all_post_meta['saswp_eop_occupational_category_'.$schema_id][0]) ){
387
+ $input1['occupationalCategory'] = explode(',', $all_post_meta['saswp_eop_occupational_category_'.$schema_id][0]);
388
+ }
389
+ if( isset($all_post_meta['saswp_eop_occupational_credential_awarded_'.$schema_id][0]) ){
390
+ $input1['occupationalCredentialAwarded']['@type'] = 'EducationalOccupationalCredential';
391
+ $input1['occupationalCredentialAwarded']['credentialCategory'] = saswp_format_date_time($all_post_meta['saswp_eop_occupational_credential_awarded_'.$schema_id][0]);
392
+ }
393
+ if( isset($all_post_meta['saswp_eop_program_prerequisites_'.$schema_id][0]) ){
394
+ $input1['programPrerequisites']['@type'] = 'EducationalOccupationalCredential';
395
+ $input1['programPrerequisites'] = $all_post_meta['saswp_eop_program_prerequisites_'.$schema_id][0];
396
+ }
397
+ if( isset($all_post_meta['saswp_eop_application_start_date_'.$schema_id][0]) ){
398
+ $input1['applicationStartDate'] = $all_post_meta['saswp_eop_application_start_date_'.$schema_id][0];
399
+ }
400
+ if( isset($all_post_meta['saswp_eop_application_deadline_'.$schema_id][0]) ){
401
+ $input1['applicationDeadline'] = $all_post_meta['saswp_eop_application_deadline_'.$schema_id][0];
402
+ }
403
+ if( isset($all_post_meta['saswp_eop_start_date_'.$schema_id][0]) ){
404
+ $input1['startDate'] = $all_post_meta['saswp_eop_start_date_'.$schema_id][0];
405
+ }
406
+ if( isset($all_post_meta['saswp_eop_end_date_'.$schema_id][0]) ){
407
+ $input1['endDate'] = $all_post_meta['saswp_eop_end_date_'.$schema_id][0];
408
+ }
409
+ if( isset($all_post_meta['saswp_eop_day_of_week_'.$schema_id][0]) ){
410
+ $input1['dayOfWeek'] = explode(',' ,$all_post_meta['saswp_eop_day_of_week_'.$schema_id][0]);
411
+ }
412
+ if( isset($all_post_meta['saswp_eop_time_of_day_'.$schema_id][0]) ){
413
+ $input1['timeOfDay'] = $all_post_meta['saswp_eop_time_of_day_'.$schema_id][0];
414
+ }
415
+ if( isset($all_post_meta['saswp_eop_number_of_credits_'.$schema_id][0]) ){
416
+ $input1['numberOfCredits'] = $all_post_meta['saswp_eop_number_of_credits_'.$schema_id][0];
417
+ }
418
+ if( isset($all_post_meta['saswp_eop_typical_credits_per_term_'.$schema_id][0]) ){
419
+ $input1['typicalCreditsPerTerm'] = $all_post_meta['saswp_eop_typical_credits_per_term_'.$schema_id][0];
420
+ }
421
+ if( isset($all_post_meta['saswp_eop_term_duration_'.$schema_id][0]) ){
422
+ $input1['termDuration'] = $all_post_meta['saswp_eop_term_duration_'.$schema_id][0];
423
+ }
424
+ if( isset($all_post_meta['saswp_eop_terms_per_year_'.$schema_id][0]) ){
425
+ $input1['termsPerYear'] = $all_post_meta['saswp_eop_terms_per_year_'.$schema_id][0];
426
+ }
427
+ if( isset($all_post_meta['saswp_eop_maximum_enrollment_'.$schema_id][0]) ){
428
+ $input1['maximumEnrollment'] = $all_post_meta['saswp_eop_maximum_enrollment_'.$schema_id][0];
429
+ }
430
+ if( isset($all_post_meta['saswp_eop_educational_program_mode_'.$schema_id][0]) ){
431
+ $input1['educationalProgramMode'] = $all_post_meta['saswp_eop_educational_program_mode_'.$schema_id][0];
432
+ }
433
+ if( isset($all_post_meta['saswp_eop_financial_aid_eligible_'.$schema_id][0]) ){
434
+ $input1['financialAidEligible'] = $all_post_meta['saswp_eop_financial_aid_eligible_'.$schema_id][0];
435
+ }
436
+
437
+ $identifier = saswp_get_post_meta($schema_post_id, 'eopidentifier_'.$schema_id, true);
438
+
439
+ if(!empty($identifier)){
440
+ $data = array();
441
+ foreach ($identifier as $value) {
442
+ $data[] = array(
443
+ '@type' => 'PropertyValue',
444
+ 'propertyID' => $value['saswp_eopidentifier_property_id'],
445
+ 'value' => $value['saswp_eopidentifier_property_value']
446
+ );
447
+ }
448
+ $input1['identifier'] = $data;
449
+ }
450
+
451
+ $offer = saswp_get_post_meta($schema_post_id, 'eopoffer_'.$schema_id, true);
452
+
453
+ if(!empty($offer)){
454
+ $data = array();
455
+ foreach ($offer as $value) {
456
+ $data[] = array(
457
+ '@type' => 'Offer',
458
+ 'category' => $value['saswp_eopoffer_category'],
459
+ 'priceSpecification' => array(
460
+ '@type' => 'PriceSpecification',
461
+ 'price' => $value['saswp_eopoffer_price'],
462
+ 'priceCurrency' => $value['saswp_eopoffer_price_currency']
463
+ )
464
+ );
465
+ }
466
+ $input1['offers'] = $data;
467
+ }
468
+
469
+ return $input1;
470
+
471
+ }
472
  function saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta){
473
 
474
  $input1 = array();
612
  }
613
 
614
  //Performer starts here
615
+ $performer = saswp_get_post_meta($schema_post_id, 'performer_'.$schema_id, true);
616
 
617
  $performer_arr = array();
618
 
642
  //Performer ends here
643
 
644
  //Organizer starts here
645
+ $organizer = saswp_get_post_meta($schema_post_id, 'organizer_'.$schema_id, true);
646
 
647
  $organizer_arr = array();
648
 
806
 
807
  $input1 = array();
808
 
809
+ $recipe_logo = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_recipe_organization_logo_'.$schema_id.'_detail',true);
810
+ $recipe_author_image = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_recipe_author_image_'.$schema_id.'_detail',true);
811
 
812
+ $step = saswp_get_post_meta($schema_post_id, 'recipe_instructions_'.$schema_id, true);
813
 
814
  $ingredient = array();
815
  $instruction = array();
1091
  }
1092
 
1093
 
1094
+ $itinerary = saswp_get_post_meta($schema_post_id, 'product_reviews_'.$schema_id, true);
1095
 
1096
  $itinerary_arr = array();
1097
 
1126
  }
1127
 
1128
  $service = new saswp_output_service();
1129
+ $product_details = $service->saswp_woocommerce_product_details(saswp_get_the_ID());
1130
 
1131
 
1132
  if(!empty($product_details['product_reviews'])){
1460
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_organization_url_'.$schema_id, 'saswp_array');
1461
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_organization_description_'.$schema_id, 'saswp_array');
1462
 
1463
+ $howto_image = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_organization_logo_'.$schema_id.'_detail',true);
1464
 
1465
  if(!(empty($howto_image))){
1466
 
1521
  $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_project_url_'.$schema_id, 'saswp_array');
1522
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_project_description_'.$schema_id, 'saswp_array');
1523
 
1524
+ $howto_image = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_project_logo_'.$schema_id.'_detail',true);
1525
 
1526
  if(!(empty($howto_image))){
1527
 
1755
  $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_music_playlist_name_'.$schema_id, 'saswp_array');
1756
  $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_music_playlist_description_'.$schema_id, 'saswp_array');
1757
 
1758
+ $faq_question = saswp_get_post_meta($schema_post_id, 'music_playlist_track_'.$schema_id, true);
1759
 
1760
  $faq_question_arr = array();
1761
 
1807
 
1808
  $input1 = saswp_get_modified_image('saswp_music_composition_image_'.$schema_id.'_detail', $input1);
1809
 
1810
+ $faq_question = saswp_get_post_meta($schema_post_id, 'music_composer_'.$schema_id, true);
1811
 
1812
  $faq_question_arr = array();
1813
 
1989
 
1990
  $input1 = saswp_get_modified_image('saswp_trip_schema_image_'.$schema_id.'_detail', $input1);
1991
 
1992
+ $itinerary = saswp_get_post_meta($schema_post_id, 'trip_itinerary_'.$schema_id, true);
1993
 
1994
  $itinerary_arr = array();
1995
 
2026
 
2027
  $input1 = saswp_get_modified_image('saswp_boat_trip_schema_image_'.$schema_id.'_detail', $input1);
2028
 
2029
+ $itinerary = saswp_get_post_meta($schema_post_id, 'boat_trip_itinerary_'.$schema_id, true);
2030
 
2031
  $itinerary_arr = array();
2032
 
2054
 
2055
  $response = array();
2056
 
2057
+ $itemlist = saswp_get_post_meta($schema_post_id, 'itemlist_item_'.$schema_id, true);
2058
+ $itemtype = saswp_get_post_meta($schema_id, 'saswp_itemlist_item_type', true);
2059
  $type_func = 'saswp_'.$itemtype.'_schema_markup';
2060
  $list_item = array();
2061
  $image_details = array();
2147
  $input1['author']['name'] = $all_post_meta['saswp_faq_author_'.$schema_id][0];
2148
  }
2149
 
2150
+ $faq_question = saswp_get_post_meta($schema_post_id, 'faq_question_'.$schema_id, true);
2151
 
2152
  $faq_question_arr = array();
2153
 
2192
 
2193
  $input1 = saswp_get_modified_image('saswp_music_album_image_'.$schema_id.'_detail', $input1);
2194
 
2195
+ $faq_question = saswp_get_post_meta($schema_post_id, 'music_album_track_'.$schema_id, true);
2196
 
2197
  $faq_question_arr = array();
2198
 
2219
 
2220
  $input1 = array();
2221
 
2222
+ $howto_image = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_jobposting_schema_ho_logo_'.$schema_id.'_detail',true);
2223
 
2224
  $input1['@context'] = saswp_context_url();
2225
  $input1['@type'] = 'JobPosting';
2274
 
2275
  $job_location[] = $job_location_arr;
2276
 
2277
+ $joblocation_meta = saswp_get_post_meta($schema_post_id, 'joblocation_'.$schema_id, true);
2278
 
2279
  if(!empty($joblocation_meta)){
2280
 
2567
 
2568
  }
2569
 
2570
+ $itinerary = saswp_get_post_meta($schema_post_id, 'apartment_amenities_'.$schema_id, true);
2571
 
2572
  $itinerary_arr = array();
2573
 
2585
  $input1['amenityFeature'] = $itinerary_arr;
2586
  }
2587
 
2588
+ $add_property = saswp_get_post_meta($schema_post_id, 'additional_property_'.$schema_id, true);
2589
 
2590
  $add_property_arr = array();
2591
 
2701
 
2702
  $input1 = array();
2703
 
2704
+ $actor = saswp_get_post_meta($schema_post_id, 'tvseries_actor_'.$schema_id, true);
2705
+ $season = saswp_get_post_meta($schema_post_id, 'tvseries_season_'.$schema_id, true);
2706
 
2707
  $input1['@context'] = saswp_context_url();
2708
  $input1['@type'] = 'TVSeries';
2756
 
2757
  function saswp_medical_condition_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2758
 
2759
+ $input1 = array();
2760
+
2761
+ $symptom = saswp_get_post_meta($schema_post_id, 'mc_symptom_'.$schema_id, true);
2762
+ $riskfactro = saswp_get_post_meta($schema_post_id, 'mc_risk_factor_'.$schema_id, true);
 
2763
 
2764
  $input1['@context'] = saswp_context_url();
2765
  $input1['@type'] = 'MedicalCondition';
2791
 
2792
  $input1['code']['@type'] = 'MedicalCode';
2793
  $input1['code']['code'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_medical_code_'.$schema_id, 'saswp_array');
2794
+ $input1['code']['codingSystem'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_coding_system_'.$schema_id, 'saswp_array');
2795
+
2796
  $symptom_arr = array();
2797
  if(!empty($symptom)){
2798
 
2832
  if(trim(saswp_remove_warnings($all_post_meta, 'saswp_qa_question_title_'.$schema_id, 'saswp_array')) ==''){
2833
 
2834
  $service_object = new saswp_output_service();
2835
+ $input1 = $service_object->saswp_dw_question_answers_details(saswp_get_the_ID());
2836
 
2837
  }else{
2838
 
2847
  $input1['mainEntity']['dateCreated'] = isset($all_post_meta['saswp_qa_date_created_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_qa_date_created_'.$schema_id][0])):'';
2848
 
2849
  $input1['mainEntity']['author']['@type'] = 'Person';
2850
+
2851
  if(isset($all_post_meta['saswp_qa_question_author_type_'.$schema_id][0])){
2852
  $input1['mainEntity']['author']['@type'] = $all_post_meta['saswp_qa_question_author_type_'.$schema_id][0];
2853
  }
2854
 
2855
  $input1['mainEntity']['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_qa_question_author_name_'.$schema_id, 'saswp_array');
2856
+
 
 
2857
  $input1['mainEntity']['answerCount'] = saswp_remove_warnings($all_post_meta, 'saswp_qa_answer_count_'.$schema_id, 'saswp_array');
2858
 
2859
+ $answer = saswp_get_post_meta($schema_post_id, 'accepted_answer_'.$schema_id, true);
2860
 
2861
  $answer_arr = array();
2862
 
2872
  $supply_data['url'] = $val['saswp_qa_accepted_answer_url'];
2873
  $supply_data['text'] = $val['saswp_qa_accepted_answer_text'];
2874
  $supply_data['dateCreated'] = saswp_format_date_time($val['saswp_qa_accepted_answer_date_created']);
2875
+
2876
+ $supply_data['author']['@type'] = 'Person';
2877
+
2878
+ if(!empty($val['saswp_qa_accepted_author_type'])){
2879
+ $supply_data['author']['@type'] = $val['saswp_qa_accepted_author_type'];
2880
+ }
2881
+
2882
+ $supply_data['author']['name'] = $val['saswp_qa_accepted_author_name'];
2883
  }
2884
 
2885
  $answer_arr[] = $supply_data;
2887
  $input1['mainEntity']['acceptedAnswer'] = $answer_arr;
2888
  }
2889
 
2890
+ $answer = saswp_get_post_meta($schema_post_id, 'suggested_answer_'.$schema_id, true);
2891
 
2892
  $answer_arr = array();
2893
 
2903
  $supply_data['url'] = $val['saswp_qa_suggested_answer_url'];
2904
  $supply_data['text'] = $val['saswp_qa_suggested_answer_text'];
2905
  $supply_data['dateCreated'] = saswp_format_date_time($val['saswp_qa_suggested_answer_date_created']);
2906
+
2907
+ $supply_data['author']['@type'] = 'Person';
2908
+
2909
+ if(!empty($val['saswp_qa_suggested_author_type'])){
2910
+ $supply_data['author']['@type'] = $val['saswp_qa_suggested_author_type'];
2911
+ }
2912
+
2913
+ $supply_data['author']['name'] = $val['saswp_qa_suggested_author_name'];
2914
  }
2915
 
2916
  $answer_arr[] = $supply_data;
2939
  );
2940
 
2941
 
2942
+ $performer = saswp_get_post_meta($schema_post_id, 'feed_element_'.$schema_id, true);
2943
 
2944
  $performer_arr = array();
2945
 
2971
 
2972
  $input1 = array();
2973
 
2974
+ $slogo = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_dfp_organization_logo_'.$schema_id.'_detail',true);
2975
  $input1 = array(
2976
  '@context' => saswp_context_url(),
2977
  '@type' => 'DiscussionForumPosting' ,
3015
 
3016
  $input1 = array();
3017
 
3018
+ $slogo = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_blogposting_organization_logo_'.$schema_id.'_detail',true);
3019
 
3020
  $input1 = array(
3021
  '@context' => saswp_context_url(),
3057
  $input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_blogposting_author_description_'.$schema_id, 'saswp_array');
3058
  $input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_blogposting_author_url_'.$schema_id, 'saswp_array');
3059
 
3060
+ $itemlist = saswp_get_post_meta($schema_post_id, 'blogposting_items_'.$schema_id, true);
3061
 
3062
  if($itemlist){
3063
 
3176
  }
3177
 
3178
 
3179
+ $itinerary = saswp_get_post_meta($schema_post_id, 'car_reviews_'.$schema_id, true);
3180
 
3181
  $itinerary_arr = array();
3182
 
3211
  }
3212
 
3213
  $service = new saswp_output_service();
3214
+ $car_details = $service->saswp_woocommerce_product_details(saswp_get_the_ID());
3215
 
3216
  if(!empty($car_details['car_reviews'])){
3217
 
3333
  }
3334
 
3335
 
3336
+ $itinerary = saswp_get_post_meta($schema_post_id, 'car_reviews_'.$schema_id, true);
3337
 
3338
  $itinerary_arr = array();
3339
 
3368
  }
3369
 
3370
  $service = new saswp_output_service();
3371
+ $car_details = $service->saswp_woocommerce_product_details(saswp_get_the_ID());
3372
 
3373
  if(!empty($car_details['car_reviews'])){
3374
 
3406
 
3407
  $input1 = array();
3408
 
3409
+ $slogo = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_cws_schema_organization_logo_'.$schema_id.'_detail',true);
3410
 
3411
  $input1 = array(
3412
  '@context' => saswp_context_url(),
3482
 
3483
  $input1 = array();
3484
 
3485
+ $slogo = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_webpage_organization_logo_'.$schema_id.'_detail',true);
3486
  $input1 = array(
3487
  '@context' => saswp_context_url(),
3488
  '@type' => 'WebPage' ,
3554
 
3555
  $input1 = array();
3556
 
3557
+ $slogo = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_special_announcement_organization_logo_'.$schema_id.'_detail',true);
3558
+ $location_img = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_special_announcement_location_image_'.$schema_id.'_detail',true);
3559
 
3560
  $input1 = array(
3561
  '@context' => saswp_context_url(),
3632
 
3633
  }
3634
 
3635
+ $supply = saswp_get_post_meta($schema_post_id, 'announcement_location_'.$schema_id, true);
3636
 
3637
  if(!empty($supply)){
3638
 
3721
 
3722
  $input1 = array();
3723
 
3724
+ $slogo = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_photograph_organization_logo_'.$schema_id.'_detail',true);
3725
 
3726
  $input1 = array(
3727
  '@context' => saswp_context_url(),
3766
 
3767
  $input1 = array();
3768
 
3769
+ $slogo = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_article_organization_logo_'.$schema_id.'_detail',true);
3770
 
3771
  $input1 = array(
3772
  '@context' => saswp_context_url(),
3807
 
3808
  }
3809
 
3810
+ $itemlist = saswp_get_post_meta($schema_post_id, 'article_items_'.$schema_id, true);
3811
 
3812
  if($itemlist){
3813
 
3842
 
3843
  $input1 = array();
3844
 
3845
+ $slogo = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_creativework_organization_logo_'.$schema_id.'_detail',true);
3846
 
3847
  $input1 = array(
3848
  '@context' => saswp_context_url(),
3883
 
3884
  }
3885
 
3886
+ $itemlist = saswp_get_post_meta($schema_post_id, 'article_items_'.$schema_id, true);
3887
 
3888
  if($itemlist){
3889
 
3908
 
3909
  $input1 = array();
3910
 
3911
+ $slogo = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_tech_article_organization_logo_'.$schema_id.'_detail',true);
3912
 
3913
  $input1 = array(
3914
  '@context' => saswp_context_url(),
3945
  $input1['author']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_tech_article_author_description_'.$schema_id, 'saswp_array');
3946
  $input1['author']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_tech_article_author_url_'.$schema_id, 'saswp_array');
3947
 
3948
+ $itemlist = saswp_get_post_meta($schema_post_id, 'tech_article_items_'.$schema_id, true);
3949
 
3950
  if($itemlist){
3951
 
3979
 
3980
  $input1 = array();
3981
 
3982
+ $slogo = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_newsarticle_organization_logo_'.$schema_id.'_detail',true);
3983
+ $author_image = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_newsarticle_author_image_'.$schema_id.'_detail',true);
3984
 
3985
  $input1 = array(
3986
  '@context' => saswp_context_url(),
4034
  $input1['author']['image']['width'] = isset($author_image['width']) ? $author_image['width'] : '';
4035
 
4036
 
4037
+ $itemlist = saswp_get_post_meta($schema_post_id, 'newsarticle_items_'.$schema_id, true);
4038
 
4039
  if($itemlist){
4040
 
4069
 
4070
  $input1 = array();
4071
 
4072
+ $author_image = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_audiobook_author_image_'.$schema_id.'_detail',true);
4073
 
4074
  $input1 = array(
4075
  '@context' => saswp_context_url(),
4199
 
4200
  $input1 = array();
4201
 
4202
+ $slogo = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_video_object_organization_logo_'.$schema_id.'_detail',true);
4203
+ $author_image = saswp_get_post_meta( saswp_get_the_ID(), 'saswp_video_object_author_image_'.$schema_id.'_detail',true);
4204
 
4205
  $input1 = array(
4206
  '@context' => saswp_context_url(),
4269
 
4270
  $input1 = array();
4271
 
4272
+ $slogo = saswp_get_post_meta( saswp_get_the_ID(), 'saswpimage_object_organization_logo_'.$schema_id.'_detail',true);
4273
+ $author_image = saswp_get_post_meta( saswp_get_the_ID(), 'saswpimage_object_author_image_'.$schema_id.'_detail',true);
4274
 
4275
  $input1 = array(
4276
  '@context' => saswp_context_url(),
4313
  $input1['author']['image']['height'] = $author_image['height'];
4314
  $input1['author']['image']['width'] = $author_image['width'];
4315
 
4316
+ $itinerary = saswp_get_post_meta($schema_post_id, 'image_object_exif_data_'.$schema_id, true);
4317
 
4318
  $itinerary_arr = array();
4319
 
output/other-schema.php CHANGED
@@ -32,7 +32,7 @@ function saswp_schema_for_faqs_schema(){
32
 
33
  if(isset($sd_data['saswp-schemaforfaqs']) && $sd_data['saswp-schemaforfaqs'] == 1 && class_exists('Schema_Faqs') && !saswp_non_amp()){
34
 
35
- $post_meta = get_post_meta($post->ID, 'schema_faqs_ques_ans_data', true);
36
  $post_meta = str_replace("\'","'",$post_meta);
37
 
38
  if(!empty($post_meta)){
@@ -294,7 +294,7 @@ function saswp_classpress_ads_schema($input1){
294
 
295
  if(is_object($post) && $post->post_type == 'ad_listing' && isset($sd_data['saswp-classipress']) && $sd_data['saswp-classipress'] == 1 ){
296
 
297
- $post_meta = get_post_meta($post->ID);
298
 
299
  $input1['identifier'] = $post_meta['cp_sys_ad_conf_id'];
300
 
@@ -328,8 +328,8 @@ function saswp_wpecommerce_product_schema($input1){
328
 
329
  if( isset($sd_data['saswp-wpecommerce']) && $sd_data['saswp-wpecommerce'] == 1 && function_exists('wpsc_the_product_description') && get_post_type() == 'wpsc-product' ){
330
 
331
- $price = get_post_meta( get_the_ID(), '_wpsc_special_price', true );
332
- $cal_price = wpsc_calculate_price(get_the_ID());
333
  $currargs = array(
334
  'display_currency_symbol' => false,
335
  'display_decimal_point' => false,
@@ -394,7 +394,7 @@ function saswp_add_novelist_schema( $input1 ){
394
 
395
  }
396
 
397
- $post_meta = get_post_meta($post->ID);
398
 
399
  $input1['headline'] = saswp_get_the_title();
400
  $input1['genre'] = $genres_str;
@@ -518,7 +518,7 @@ function saswp_add_mooberrybm_schema( $input1 ){
518
 
519
  }
520
 
521
- $editions = get_post_meta($post->ID, '_mbdb_editions', true);
522
 
523
  $editions_arr = array();
524
 
32
 
33
  if(isset($sd_data['saswp-schemaforfaqs']) && $sd_data['saswp-schemaforfaqs'] == 1 && class_exists('Schema_Faqs') && !saswp_non_amp()){
34
 
35
+ $post_meta = saswp_get_post_meta($post->ID, 'schema_faqs_ques_ans_data', true);
36
  $post_meta = str_replace("\'","'",$post_meta);
37
 
38
  if(!empty($post_meta)){
294
 
295
  if(is_object($post) && $post->post_type == 'ad_listing' && isset($sd_data['saswp-classipress']) && $sd_data['saswp-classipress'] == 1 ){
296
 
297
+ $post_meta = saswp_get_post_meta($post->ID);
298
 
299
  $input1['identifier'] = $post_meta['cp_sys_ad_conf_id'];
300
 
328
 
329
  if( isset($sd_data['saswp-wpecommerce']) && $sd_data['saswp-wpecommerce'] == 1 && function_exists('wpsc_the_product_description') && get_post_type() == 'wpsc-product' ){
330
 
331
+ $price = saswp_get_post_meta( saswp_get_the_ID(), '_wpsc_special_price', true );
332
+ $cal_price = wpsc_calculate_price(saswp_get_the_ID());
333
  $currargs = array(
334
  'display_currency_symbol' => false,
335
  'display_decimal_point' => false,
394
 
395
  }
396
 
397
+ $post_meta = saswp_get_post_meta($post->ID);
398
 
399
  $input1['headline'] = saswp_get_the_title();
400
  $input1['genre'] = $genres_str;
518
 
519
  }
520
 
521
+ $editions = saswp_get_post_meta($post->ID, '_mbdb_editions', true);
522
 
523
  $editions_arr = array();
524
 
output/output.php CHANGED
@@ -162,12 +162,12 @@ function saswp_schema_output() {
162
  $image_id = get_post_thumbnail_id();
163
  $date = get_the_date("c");
164
  $modified_date = get_the_modified_date("c");
165
- $modify_option = get_option('modify_schema_post_enable_'.get_the_ID());
166
- $schema_enable = get_post_meta(get_the_ID(), 'saswp_enable_disable_schema', true);
167
- $all_post_meta = get_post_meta(get_the_ID());
168
  $publisher = $service_object->saswp_get_publisher();
169
- $extra_theme_review = $service_object->saswp_extra_theme_review_details(get_the_ID());
170
- $aggregateRating = $service_object->saswp_rating_box_rating_markup(get_the_ID());
171
 
172
 
173
  foreach($Conditionals as $schemaConditionals){
@@ -180,11 +180,11 @@ function saswp_schema_output() {
180
 
181
  $schema_type = saswp_remove_warnings($schemaConditionals, 'schema_type', 'saswp_string');
182
  $schema_post_id = saswp_remove_warnings($schemaConditionals, 'post_id', 'saswp_string');
183
- $enable_videoobject = get_post_meta($schema_post_id, 'saswp_enable_videoobject', true);
184
 
185
  $input1 = array();
186
 
187
- $modified_schema = get_post_meta(get_the_ID(), 'saswp_modify_this_schema_'.$schema_post_id, true);
188
 
189
  if($modify_option == 'enable' && (isset($schema_enable[$schema_post_id]) && $schema_enable[$schema_post_id] == 1)){
190
 
@@ -208,7 +208,7 @@ function saswp_schema_output() {
208
 
209
  $input1 = apply_filters('saswp_modify_itemlist_schema_output', $input1 );
210
 
211
- $input1 = saswp_itemlist_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
212
 
213
  break;
214
 
@@ -231,9 +231,9 @@ function saswp_schema_output() {
231
 
232
  if($modified_schema == 1){
233
 
234
- $input1 = saswp_faq_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
235
  }
236
-
237
  break;
238
 
239
  case 'VideoGame':
@@ -252,7 +252,7 @@ function saswp_schema_output() {
252
 
253
  if($modified_schema == 1){
254
 
255
- $input1 = saswp_video_game_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
256
  }
257
 
258
  break;
@@ -271,7 +271,7 @@ function saswp_schema_output() {
271
 
272
  if($modified_schema == 1){
273
 
274
- $input1 = saswp_medical_condition_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
275
  }
276
 
277
  break;
@@ -291,7 +291,7 @@ function saswp_schema_output() {
291
 
292
  if($modified_schema == 1){
293
 
294
- $input1 = saswp_tv_series_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
295
  }
296
 
297
  break;
@@ -310,7 +310,7 @@ function saswp_schema_output() {
310
 
311
  if($modified_schema == 1){
312
 
313
- $input1 = saswp_movie_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
314
  }
315
 
316
  break;
@@ -320,6 +320,8 @@ function saswp_schema_output() {
320
  $input1['@context'] = saswp_context_url();
321
  $input1['@type'] = 'HowTo';
322
  $input1['@id'] = trailingslashit(saswp_get_permalink()).'#HowTo';
 
 
323
 
324
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
325
 
@@ -329,9 +331,9 @@ function saswp_schema_output() {
329
 
330
  if($modified_schema == 1){
331
 
332
- $input1 = saswp_howto_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
333
  }
334
-
335
  break;
336
 
337
  case 'Trip':
@@ -346,7 +348,7 @@ function saswp_schema_output() {
346
 
347
  if($modified_schema == 1){
348
 
349
- $input1 = saswp_trip_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
350
  }
351
 
352
  break;
@@ -363,7 +365,7 @@ function saswp_schema_output() {
363
 
364
  if($modified_schema == 1){
365
 
366
- $input1 = saswp_boat_trip_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
367
  }
368
 
369
  break;
@@ -381,7 +383,7 @@ function saswp_schema_output() {
381
 
382
  if($modified_schema == 1){
383
 
384
- $input1 = saswp_single_family_residence_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
385
  }
386
 
387
  break;
@@ -399,7 +401,7 @@ function saswp_schema_output() {
399
 
400
  if($modified_schema == 1){
401
 
402
- $input1 = saswp_house_schema_makrup($schema_post_id, get_the_ID(), $all_post_meta);
403
  }
404
 
405
  break;
@@ -417,7 +419,7 @@ function saswp_schema_output() {
417
 
418
  if($modified_schema == 1){
419
 
420
- $input1 = saswp_apartment_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
421
  }
422
 
423
  break;
@@ -436,7 +438,7 @@ function saswp_schema_output() {
436
 
437
  if($modified_schema == 1){
438
 
439
- $input1 = saswp_music_playlist_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
440
  }
441
 
442
  break;
@@ -457,7 +459,7 @@ function saswp_schema_output() {
457
 
458
  if($modified_schema == 1){
459
 
460
- $input1 = saswp_music_composition_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
461
  }
462
 
463
  break;
@@ -484,7 +486,7 @@ function saswp_schema_output() {
484
 
485
  if($modified_schema == 1){
486
 
487
- $input1 = saswp_book_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
488
  }
489
 
490
  break;
@@ -502,7 +504,7 @@ function saswp_schema_output() {
502
 
503
  if($modified_schema == 1){
504
 
505
- $input1 = saswp_music_album_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
506
  }
507
 
508
  break;
@@ -520,7 +522,7 @@ function saswp_schema_output() {
520
 
521
  if($modified_schema == 1){
522
 
523
- $input1 = saswp_tourist_destination_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
524
  }
525
 
526
  break;
@@ -538,7 +540,7 @@ function saswp_schema_output() {
538
 
539
  if($modified_schema == 1){
540
 
541
- $input1 = saswp_tourist_attraction_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
542
  }
543
 
544
  break;
@@ -556,7 +558,7 @@ function saswp_schema_output() {
556
 
557
  if($modified_schema == 1){
558
 
559
- $input1 = saswp_lorh_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
560
  }
561
 
562
  break;
@@ -574,7 +576,7 @@ function saswp_schema_output() {
574
 
575
  if($modified_schema == 1){
576
 
577
- $input1 = saswp_buddhist_temple_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
578
  }
579
 
580
  break;
@@ -592,7 +594,7 @@ function saswp_schema_output() {
592
 
593
  if($modified_schema == 1){
594
 
595
- $input1 = saswp_hindu_temple_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
596
  }
597
 
598
  break;
@@ -610,7 +612,7 @@ function saswp_schema_output() {
610
 
611
  if($modified_schema == 1){
612
 
613
- $input1 = saswp_church_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
614
  }
615
 
616
  break;
@@ -628,7 +630,7 @@ function saswp_schema_output() {
628
 
629
  if($modified_schema == 1){
630
 
631
- $input1 = saswp_mosque_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
632
  }
633
 
634
  break;
@@ -654,7 +656,7 @@ function saswp_schema_output() {
654
 
655
  if($modified_schema == 1){
656
 
657
- $input1 = saswp_job_posting_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
658
  }
659
 
660
  break;
@@ -675,7 +677,7 @@ function saswp_schema_output() {
675
 
676
  if($modified_schema == 1){
677
 
678
- $input1 = saswp_person_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
679
  }
680
 
681
  break;
@@ -707,7 +709,7 @@ function saswp_schema_output() {
707
  }
708
  $input1 = saswp_append_fetched_reviews($input1);
709
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
710
- $input1['comment'] = saswp_get_comments(get_the_ID());
711
  }
712
 
713
  $input1 = apply_filters('saswp_modify_course_schema_output', $input1 );
@@ -716,7 +718,7 @@ function saswp_schema_output() {
716
 
717
  if($modified_schema == 1){
718
 
719
- $input1 = saswp_course_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
720
  }
721
 
722
 
@@ -726,7 +728,7 @@ function saswp_schema_output() {
726
 
727
  if(isset($sd_data['saswp-bbpress']) && $sd_data['saswp-bbpress'] == 1 && is_plugin_active('bbpress/bbpress.php')){
728
 
729
- $headline = bbp_get_topic_title(get_the_ID());
730
 
731
  if (strlen($headline) > 110){
732
  $headline = substr($headline, 0, 106) . ' ...';
@@ -742,7 +744,7 @@ function saswp_schema_output() {
742
  "articleSection" => bbp_get_forum_title(),
743
  "articleBody" => saswp_get_the_content(),
744
  'url' => bbp_get_topic_permalink(),
745
- 'datePublished' => get_post_time( DATE_ATOM, false, get_the_ID(), true ),
746
  'dateModified' => esc_html($modified_date),
747
  'author' => saswp_get_author_details(),
748
  'interactionStatistic' => array(
@@ -781,7 +783,7 @@ function saswp_schema_output() {
781
  $input1 = array_merge($input1, $extra_theme_review);
782
  }
783
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
784
- $input1['comment'] = saswp_get_comments(get_the_ID());
785
  }
786
 
787
  $input1 = apply_filters('saswp_modify_d_forum_posting_schema_output', $input1 );
@@ -790,7 +792,7 @@ function saswp_schema_output() {
790
 
791
  if($modified_schema == 1){
792
 
793
- $input1 = saswp_dfp_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
794
  }
795
 
796
 
@@ -813,7 +815,7 @@ function saswp_schema_output() {
813
 
814
  if($modified_schema == 1){
815
 
816
- $input1 = saswp_blogposting_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
817
  }
818
 
819
  break;
@@ -829,7 +831,7 @@ function saswp_schema_output() {
829
  );
830
 
831
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
832
- $input1['comment'] = saswp_get_comments(get_the_ID());
833
  }
834
 
835
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
@@ -840,7 +842,7 @@ function saswp_schema_output() {
840
 
841
  if($modified_schema == 1){
842
 
843
- $input1 = saswp_car_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
844
 
845
  }
846
 
@@ -857,7 +859,7 @@ function saswp_schema_output() {
857
  );
858
 
859
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
860
- $input1['comment'] = saswp_get_comments(get_the_ID());
861
  }
862
 
863
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
@@ -868,7 +870,7 @@ function saswp_schema_output() {
868
 
869
  if($modified_schema == 1){
870
 
871
- $input1 = saswp_vehicle_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
872
 
873
  }
874
 
@@ -894,7 +896,7 @@ function saswp_schema_output() {
894
  $input1 = array_merge($input1, $publisher);
895
  }
896
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
897
- $input1['comment'] = saswp_get_comments(get_the_ID());
898
  }
899
 
900
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
@@ -905,7 +907,7 @@ function saswp_schema_output() {
905
 
906
  if($modified_schema == 1){
907
 
908
- $input1 = saswp_creative_work_series_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
909
 
910
  }
911
 
@@ -928,7 +930,7 @@ function saswp_schema_output() {
928
 
929
  if($modified_schema == 1){
930
 
931
- $input1 = saswp_educational_occupational_credential_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
932
 
933
  }
934
 
@@ -954,7 +956,7 @@ function saswp_schema_output() {
954
 
955
  if($modified_schema == 1){
956
 
957
- $input1 = saswp_audiobook_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
958
 
959
  }
960
 
@@ -979,7 +981,7 @@ function saswp_schema_output() {
979
 
980
  if($modified_schema == 1){
981
 
982
- $input1 = saswp_podcast_episode_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
983
 
984
  }
985
 
@@ -1002,7 +1004,7 @@ function saswp_schema_output() {
1002
 
1003
  if($modified_schema == 1){
1004
 
1005
- $input1 = saswp_hotel_room_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1006
 
1007
  }
1008
 
@@ -1027,7 +1029,7 @@ function saswp_schema_output() {
1027
 
1028
  if($modified_schema == 1){
1029
 
1030
- $input1 = saswp_podcast_season_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1031
 
1032
  }
1033
 
@@ -1052,7 +1054,7 @@ function saswp_schema_output() {
1052
 
1053
  if($modified_schema == 1){
1054
 
1055
- $input1 = saswp_project_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1056
 
1057
  }
1058
 
@@ -1077,7 +1079,7 @@ function saswp_schema_output() {
1077
 
1078
  if($modified_schema == 1){
1079
 
1080
- $input1 = saswp_organization_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1081
 
1082
  }
1083
 
@@ -1106,7 +1108,7 @@ function saswp_schema_output() {
1106
  $input1 = array_merge($input1, $extra_theme_review);
1107
  }
1108
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1109
- $input1['comment'] = saswp_get_comments(get_the_ID());
1110
  }
1111
 
1112
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
@@ -1118,15 +1120,33 @@ function saswp_schema_output() {
1118
 
1119
  if($modified_schema == 1){
1120
 
1121
- $input1 = saswp_audio_object_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1122
  }
1123
 
1124
 
1125
  break;
1126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1127
  case 'Event':
1128
 
1129
- $event_type = get_post_meta($schema_post_id, 'saswp_event_type', true);
1130
 
1131
  $input1['@context'] = saswp_context_url();
1132
  $input1['@type'] = $event_type ? $event_type : $schema_type;
@@ -1147,7 +1167,7 @@ function saswp_schema_output() {
1147
 
1148
  if($modified_schema == 1){
1149
 
1150
- $input1 = saswp_event_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1151
  }
1152
 
1153
  break;
@@ -1181,7 +1201,7 @@ function saswp_schema_output() {
1181
  $input1 = array_merge($input1, $extra_theme_review);
1182
  }
1183
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1184
- $input1['comment'] = saswp_get_comments(get_the_ID());
1185
  }
1186
 
1187
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
@@ -1192,7 +1212,7 @@ function saswp_schema_output() {
1192
 
1193
  if($modified_schema == 1){
1194
 
1195
- $input1 = saswp_software_app_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1196
  }
1197
 
1198
  break;
@@ -1226,7 +1246,7 @@ function saswp_schema_output() {
1226
  $input1 = array_merge($input1, $extra_theme_review);
1227
  }
1228
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1229
- $input1['comment'] = saswp_get_comments(get_the_ID());
1230
  }
1231
 
1232
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
@@ -1237,7 +1257,7 @@ function saswp_schema_output() {
1237
 
1238
  if($modified_schema == 1){
1239
 
1240
- $input1 = saswp_mobile_app_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1241
  }
1242
 
1243
  break;
@@ -1247,7 +1267,7 @@ function saswp_schema_output() {
1247
  $input1 = $service_object->saswp_schema_markup_generator($schema_type);
1248
 
1249
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1250
- $input1['comment'] = saswp_get_comments(get_the_ID());
1251
  }
1252
  if(!empty($aggregateRating)){
1253
  $input1['mainEntity']['aggregateRating'] = $aggregateRating;
@@ -1262,7 +1282,7 @@ function saswp_schema_output() {
1262
 
1263
  if($modified_schema == 1){
1264
 
1265
- $input1 = saswp_webpage_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1266
  }
1267
 
1268
  break;
@@ -1272,7 +1292,7 @@ function saswp_schema_output() {
1272
  $input1 = $service_object->saswp_schema_markup_generator($schema_type);
1273
 
1274
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1275
- $input1['comment'] = saswp_get_comments(get_the_ID());
1276
  }
1277
  $input1 = apply_filters('saswp_modify_special_announcement_schema_output', $input1 );
1278
 
@@ -1280,7 +1300,7 @@ function saswp_schema_output() {
1280
 
1281
  if($modified_schema == 1){
1282
 
1283
- $input1 = saswp_special_announcement_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1284
  }
1285
 
1286
  break;
@@ -1304,7 +1324,7 @@ function saswp_schema_output() {
1304
 
1305
  if($modified_schema == 1){
1306
 
1307
- $input1 = saswp_visualartwork_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1308
  }
1309
 
1310
  break;
@@ -1325,7 +1345,7 @@ function saswp_schema_output() {
1325
 
1326
  if($modified_schema == 1){
1327
 
1328
- $input1 = saswp_creativework_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1329
  }
1330
 
1331
  break;
@@ -1345,8 +1365,8 @@ function saswp_schema_output() {
1345
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1346
 
1347
  if($modified_schema == 1){
1348
-
1349
- $input1 = saswp_article_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1350
  }
1351
 
1352
  break;
@@ -1361,7 +1381,7 @@ function saswp_schema_output() {
1361
 
1362
  if($modified_schema == 1){
1363
 
1364
- $input1 = saswp_photograph_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1365
  }
1366
 
1367
  break;
@@ -1386,7 +1406,7 @@ function saswp_schema_output() {
1386
 
1387
  if($modified_schema == 1){
1388
 
1389
- $input1 = saswp_tech_article_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1390
  }
1391
 
1392
  break;
@@ -1407,7 +1427,7 @@ function saswp_schema_output() {
1407
  );
1408
 
1409
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1410
- $input1['comment'] = saswp_get_comments(get_the_ID());
1411
  }
1412
  if(!empty($aggregateRating)){
1413
  $input1['aggregateRating'] = $aggregateRating;
@@ -1424,7 +1444,7 @@ function saswp_schema_output() {
1424
 
1425
  if($modified_schema == 1){
1426
 
1427
- $input1 = saswp_recipe_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1428
  }
1429
 
1430
  break;
@@ -1444,13 +1464,13 @@ function saswp_schema_output() {
1444
 
1445
  if(isset($sd_data['saswp-dw-question-answer']) && $sd_data['saswp-dw-question-answer'] ==1 && ($post_type == 'dwqa-question' || $post_type == 'dwqa-answer')){
1446
 
1447
- $input1 = $service_object->saswp_dw_question_answers_details(get_the_ID());
1448
 
1449
  }
1450
 
1451
  if(isset($sd_data['saswp-bbpress']) && $sd_data['saswp-bbpress'] ==1 && $post_type == 'topic'){
1452
 
1453
- $input1 = $service_object->saswp_bb_press_topic_details(get_the_ID());
1454
 
1455
  }
1456
 
@@ -1460,7 +1480,7 @@ function saswp_schema_output() {
1460
 
1461
  if($modified_schema == 1){
1462
 
1463
- $input1 = saswp_qanda_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1464
  }
1465
 
1466
  break;
@@ -1483,7 +1503,7 @@ function saswp_schema_output() {
1483
 
1484
  if($modified_schema == 1){
1485
 
1486
- $input1 = saswp_real_estate_listing_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1487
  }
1488
 
1489
  break;
@@ -1505,7 +1525,7 @@ function saswp_schema_output() {
1505
 
1506
  if($modified_schema == 1){
1507
 
1508
- $input1 = saswp_apartment_complex_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1509
  }
1510
 
1511
  break;
@@ -1525,7 +1545,7 @@ function saswp_schema_output() {
1525
 
1526
  if($modified_schema == 1){
1527
 
1528
- $input1 = saswp_rent_action_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1529
  }
1530
 
1531
  break;
@@ -1547,7 +1567,7 @@ function saswp_schema_output() {
1547
 
1548
  if($modified_schema == 1){
1549
 
1550
- $input1 = saswp_psychological_treatment_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1551
  }
1552
 
1553
  break;
@@ -1564,7 +1584,7 @@ function saswp_schema_output() {
1564
 
1565
  if($modified_schema == 1){
1566
 
1567
- $input1 = saswp_product_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1568
  }
1569
 
1570
  break;
@@ -1573,7 +1593,7 @@ function saswp_schema_output() {
1573
 
1574
  $image_details = wp_get_attachment_image_src($image_id);
1575
 
1576
- $category_detail = get_the_category(get_the_ID());//$post->ID
1577
  $article_section = '';
1578
 
1579
  foreach($category_detail as $cd){
@@ -1620,7 +1640,7 @@ function saswp_schema_output() {
1620
 
1621
  }
1622
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1623
- $input1['comment'] = saswp_get_comments(get_the_ID());
1624
  }
1625
 
1626
  $input1 = apply_filters('saswp_modify_news_article_schema_output', $input1 );
@@ -1629,7 +1649,7 @@ function saswp_schema_output() {
1629
 
1630
  if($modified_schema == 1){
1631
 
1632
- $input1 = saswp_news_article_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1633
  }
1634
 
1635
  break;
@@ -1646,7 +1666,7 @@ function saswp_schema_output() {
1646
 
1647
  if($modified_schema == 1){
1648
 
1649
- $input1 = saswp_service_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1650
  }
1651
 
1652
  break;
@@ -1663,7 +1683,7 @@ function saswp_schema_output() {
1663
 
1664
  if($modified_schema == 1){
1665
 
1666
- $input1 = saswp_taxi_service_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1667
  }
1668
 
1669
  break;
@@ -1671,7 +1691,7 @@ function saswp_schema_output() {
1671
  case 'Review':
1672
 
1673
  $review_markup = $service_object->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
1674
- $item_reviewed = get_post_meta($schema_post_id, 'saswp_review_item_reviewed_'.$schema_post_id, true);
1675
 
1676
  if($item_reviewed == 'local_business'){
1677
  $item_reviewed = 'LocalBusiness';
@@ -1714,7 +1734,7 @@ function saswp_schema_output() {
1714
 
1715
  if($modified_schema == 1){
1716
 
1717
- $input1 = saswp_review_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1718
  }
1719
 
1720
  break;
@@ -1761,7 +1781,7 @@ function saswp_schema_output() {
1761
 
1762
  }
1763
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1764
- $input1['comment'] = saswp_get_comments(get_the_ID());
1765
  }
1766
  if(!empty($aggregateRating)){
1767
  $input1['aggregateRating'] = $aggregateRating;
@@ -1777,7 +1797,7 @@ function saswp_schema_output() {
1777
 
1778
  if($modified_schema == 1){
1779
 
1780
- $input1 = saswp_video_object_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1781
  }
1782
 
1783
  if(isset($enable_videoobject) && $enable_videoobject == 1){
@@ -1816,7 +1836,7 @@ function saswp_schema_output() {
1816
 
1817
  }
1818
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1819
- $input1['comment'] = saswp_get_comments(get_the_ID());
1820
  }
1821
  if(!empty($aggregateRating)){
1822
  $input1['aggregateRating'] = $aggregateRating;
@@ -1832,15 +1852,15 @@ function saswp_schema_output() {
1832
 
1833
  if($modified_schema == 1){
1834
 
1835
- $input1 = saswp_image_object_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1836
  }
1837
 
1838
  break;
1839
 
1840
  case 'local_business':
1841
 
1842
- $business_type = get_post_meta($schema_post_id, 'saswp_business_type', true);
1843
- $business_name = get_post_meta($schema_post_id, 'saswp_business_name', true);
1844
 
1845
  if($business_name){
1846
 
@@ -1877,7 +1897,7 @@ function saswp_schema_output() {
1877
 
1878
  if($modified_schema == 1){
1879
 
1880
- $input1 = saswp_local_business_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1881
 
1882
  }
1883
 
@@ -1894,7 +1914,7 @@ function saswp_schema_output() {
1894
 
1895
  if($schema_type == 'TechArticle' || $schema_type == 'Article' || $schema_type == 'Blogposting' || $schema_type == 'BlogPosting' || $schema_type == 'NewsArticle' || $schema_type == 'WebPage'){
1896
 
1897
- $speakable_status = get_post_meta($schema_post_id, 'saswp_enable_speakable_schema', true);
1898
 
1899
  if($speakable_status){
1900
 
@@ -2718,7 +2738,7 @@ function saswp_about_page_output(){
2718
  $feature_image = array();
2719
  $publisher = array();
2720
  $page_ids = array();
2721
- $page_ids[] = get_the_ID();
2722
  $page_ids = apply_filters( 'saswp_modify_about_page_ids', $page_ids);
2723
 
2724
 
@@ -2766,7 +2786,7 @@ function saswp_contact_page_output(){
2766
  $feature_image = array();
2767
  $publisher = array();
2768
  $page_ids = array();
2769
- $page_ids[] = get_the_ID();
2770
  $page_ids = apply_filters( 'saswp_modify_contact_page_ids', $page_ids);
2771
 
2772
  if(isset($sd_data['sd_contact_page']) && in_array($sd_data['sd_contact_page'], $page_ids)){
162
  $image_id = get_post_thumbnail_id();
163
  $date = get_the_date("c");
164
  $modified_date = get_the_modified_date("c");
165
+ $modify_option = get_option('modify_schema_post_enable_'.saswp_get_the_ID());
166
+ $schema_enable = saswp_get_post_meta(saswp_get_the_ID(), 'saswp_enable_disable_schema', true);
167
+ $all_post_meta = saswp_get_post_meta(saswp_get_the_ID());
168
  $publisher = $service_object->saswp_get_publisher();
169
+ $extra_theme_review = $service_object->saswp_extra_theme_review_details(saswp_get_the_ID());
170
+ $aggregateRating = $service_object->saswp_rating_box_rating_markup(saswp_get_the_ID());
171
 
172
 
173
  foreach($Conditionals as $schemaConditionals){
180
 
181
  $schema_type = saswp_remove_warnings($schemaConditionals, 'schema_type', 'saswp_string');
182
  $schema_post_id = saswp_remove_warnings($schemaConditionals, 'post_id', 'saswp_string');
183
+ $enable_videoobject = saswp_get_post_meta($schema_post_id, 'saswp_enable_videoobject', true);
184
 
185
  $input1 = array();
186
 
187
+ $modified_schema = saswp_get_post_meta(saswp_get_the_ID(), 'saswp_modify_this_schema_'.$schema_post_id, true);
188
 
189
  if($modify_option == 'enable' && (isset($schema_enable[$schema_post_id]) && $schema_enable[$schema_post_id] == 1)){
190
 
208
 
209
  $input1 = apply_filters('saswp_modify_itemlist_schema_output', $input1 );
210
 
211
+ $input1 = saswp_itemlist_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
212
 
213
  break;
214
 
231
 
232
  if($modified_schema == 1){
233
 
234
+ $input1 = saswp_faq_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
235
  }
236
+
237
  break;
238
 
239
  case 'VideoGame':
252
 
253
  if($modified_schema == 1){
254
 
255
+ $input1 = saswp_video_game_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
256
  }
257
 
258
  break;
271
 
272
  if($modified_schema == 1){
273
 
274
+ $input1 = saswp_medical_condition_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
275
  }
276
 
277
  break;
291
 
292
  if($modified_schema == 1){
293
 
294
+ $input1 = saswp_tv_series_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
295
  }
296
 
297
  break;
310
 
311
  if($modified_schema == 1){
312
 
313
+ $input1 = saswp_movie_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
314
  }
315
 
316
  break;
320
  $input1['@context'] = saswp_context_url();
321
  $input1['@type'] = 'HowTo';
322
  $input1['@id'] = trailingslashit(saswp_get_permalink()).'#HowTo';
323
+ $input1['name'] = saswp_get_the_title();
324
+ $input1['description'] = saswp_get_the_excerpt();
325
 
326
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
327
 
331
 
332
  if($modified_schema == 1){
333
 
334
+ $input1 = saswp_howto_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
335
  }
336
+
337
  break;
338
 
339
  case 'Trip':
348
 
349
  if($modified_schema == 1){
350
 
351
+ $input1 = saswp_trip_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
352
  }
353
 
354
  break;
365
 
366
  if($modified_schema == 1){
367
 
368
+ $input1 = saswp_boat_trip_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
369
  }
370
 
371
  break;
383
 
384
  if($modified_schema == 1){
385
 
386
+ $input1 = saswp_single_family_residence_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
387
  }
388
 
389
  break;
401
 
402
  if($modified_schema == 1){
403
 
404
+ $input1 = saswp_house_schema_makrup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
405
  }
406
 
407
  break;
419
 
420
  if($modified_schema == 1){
421
 
422
+ $input1 = saswp_apartment_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
423
  }
424
 
425
  break;
438
 
439
  if($modified_schema == 1){
440
 
441
+ $input1 = saswp_music_playlist_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
442
  }
443
 
444
  break;
459
 
460
  if($modified_schema == 1){
461
 
462
+ $input1 = saswp_music_composition_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
463
  }
464
 
465
  break;
486
 
487
  if($modified_schema == 1){
488
 
489
+ $input1 = saswp_book_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
490
  }
491
 
492
  break;
504
 
505
  if($modified_schema == 1){
506
 
507
+ $input1 = saswp_music_album_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
508
  }
509
 
510
  break;
522
 
523
  if($modified_schema == 1){
524
 
525
+ $input1 = saswp_tourist_destination_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
526
  }
527
 
528
  break;
540
 
541
  if($modified_schema == 1){
542
 
543
+ $input1 = saswp_tourist_attraction_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
544
  }
545
 
546
  break;
558
 
559
  if($modified_schema == 1){
560
 
561
+ $input1 = saswp_lorh_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
562
  }
563
 
564
  break;
576
 
577
  if($modified_schema == 1){
578
 
579
+ $input1 = saswp_buddhist_temple_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
580
  }
581
 
582
  break;
594
 
595
  if($modified_schema == 1){
596
 
597
+ $input1 = saswp_hindu_temple_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
598
  }
599
 
600
  break;
612
 
613
  if($modified_schema == 1){
614
 
615
+ $input1 = saswp_church_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
616
  }
617
 
618
  break;
630
 
631
  if($modified_schema == 1){
632
 
633
+ $input1 = saswp_mosque_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
634
  }
635
 
636
  break;
656
 
657
  if($modified_schema == 1){
658
 
659
+ $input1 = saswp_job_posting_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
660
  }
661
 
662
  break;
677
 
678
  if($modified_schema == 1){
679
 
680
+ $input1 = saswp_person_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
681
  }
682
 
683
  break;
709
  }
710
  $input1 = saswp_append_fetched_reviews($input1);
711
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
712
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
713
  }
714
 
715
  $input1 = apply_filters('saswp_modify_course_schema_output', $input1 );
718
 
719
  if($modified_schema == 1){
720
 
721
+ $input1 = saswp_course_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
722
  }
723
 
724
 
728
 
729
  if(isset($sd_data['saswp-bbpress']) && $sd_data['saswp-bbpress'] == 1 && is_plugin_active('bbpress/bbpress.php')){
730
 
731
+ $headline = bbp_get_topic_title(saswp_get_the_ID());
732
 
733
  if (strlen($headline) > 110){
734
  $headline = substr($headline, 0, 106) . ' ...';
744
  "articleSection" => bbp_get_forum_title(),
745
  "articleBody" => saswp_get_the_content(),
746
  'url' => bbp_get_topic_permalink(),
747
+ 'datePublished' => get_post_time( DATE_ATOM, false, saswp_get_the_ID(), true ),
748
  'dateModified' => esc_html($modified_date),
749
  'author' => saswp_get_author_details(),
750
  'interactionStatistic' => array(
783
  $input1 = array_merge($input1, $extra_theme_review);
784
  }
785
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
786
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
787
  }
788
 
789
  $input1 = apply_filters('saswp_modify_d_forum_posting_schema_output', $input1 );
792
 
793
  if($modified_schema == 1){
794
 
795
+ $input1 = saswp_dfp_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
796
  }
797
 
798
 
815
 
816
  if($modified_schema == 1){
817
 
818
+ $input1 = saswp_blogposting_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
819
  }
820
 
821
  break;
831
  );
832
 
833
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
834
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
835
  }
836
 
837
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
842
 
843
  if($modified_schema == 1){
844
 
845
+ $input1 = saswp_car_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
846
 
847
  }
848
 
859
  );
860
 
861
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
862
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
863
  }
864
 
865
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
870
 
871
  if($modified_schema == 1){
872
 
873
+ $input1 = saswp_vehicle_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
874
 
875
  }
876
 
896
  $input1 = array_merge($input1, $publisher);
897
  }
898
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
899
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
900
  }
901
 
902
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
907
 
908
  if($modified_schema == 1){
909
 
910
+ $input1 = saswp_creative_work_series_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
911
 
912
  }
913
 
930
 
931
  if($modified_schema == 1){
932
 
933
+ $input1 = saswp_educational_occupational_credential_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
934
 
935
  }
936
 
956
 
957
  if($modified_schema == 1){
958
 
959
+ $input1 = saswp_audiobook_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
960
 
961
  }
962
 
981
 
982
  if($modified_schema == 1){
983
 
984
+ $input1 = saswp_podcast_episode_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
985
 
986
  }
987
 
1004
 
1005
  if($modified_schema == 1){
1006
 
1007
+ $input1 = saswp_hotel_room_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1008
 
1009
  }
1010
 
1029
 
1030
  if($modified_schema == 1){
1031
 
1032
+ $input1 = saswp_podcast_season_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1033
 
1034
  }
1035
 
1054
 
1055
  if($modified_schema == 1){
1056
 
1057
+ $input1 = saswp_project_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1058
 
1059
  }
1060
 
1079
 
1080
  if($modified_schema == 1){
1081
 
1082
+ $input1 = saswp_organization_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1083
 
1084
  }
1085
 
1108
  $input1 = array_merge($input1, $extra_theme_review);
1109
  }
1110
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1111
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
1112
  }
1113
 
1114
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
1120
 
1121
  if($modified_schema == 1){
1122
 
1123
+ $input1 = saswp_audio_object_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1124
  }
1125
 
1126
 
1127
  break;
1128
 
1129
+ case 'EducationalOccupationalProgram':
1130
+
1131
+ $input1['@context'] = saswp_context_url();
1132
+ $input1['@type'] = 'EducationalOccupationalProgram';
1133
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#EducationalOccupationalProgram';
1134
+ $input1['url'] = trailingslashit(saswp_get_permalink());
1135
+
1136
+ $input1 = apply_filters('saswp_modify_eop_schema_output', $input1 );
1137
+
1138
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1139
+
1140
+ if($modified_schema == 1){
1141
+
1142
+ $input1 = saswp_eop_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1143
+ }
1144
+
1145
+ break;
1146
+
1147
  case 'Event':
1148
 
1149
+ $event_type = saswp_get_post_meta($schema_post_id, 'saswp_event_type', true);
1150
 
1151
  $input1['@context'] = saswp_context_url();
1152
  $input1['@type'] = $event_type ? $event_type : $schema_type;
1167
 
1168
  if($modified_schema == 1){
1169
 
1170
+ $input1 = saswp_event_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1171
  }
1172
 
1173
  break;
1201
  $input1 = array_merge($input1, $extra_theme_review);
1202
  }
1203
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1204
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
1205
  }
1206
 
1207
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
1212
 
1213
  if($modified_schema == 1){
1214
 
1215
+ $input1 = saswp_software_app_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1216
  }
1217
 
1218
  break;
1246
  $input1 = array_merge($input1, $extra_theme_review);
1247
  }
1248
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1249
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
1250
  }
1251
 
1252
  $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
1257
 
1258
  if($modified_schema == 1){
1259
 
1260
+ $input1 = saswp_mobile_app_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1261
  }
1262
 
1263
  break;
1267
  $input1 = $service_object->saswp_schema_markup_generator($schema_type);
1268
 
1269
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1270
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
1271
  }
1272
  if(!empty($aggregateRating)){
1273
  $input1['mainEntity']['aggregateRating'] = $aggregateRating;
1282
 
1283
  if($modified_schema == 1){
1284
 
1285
+ $input1 = saswp_webpage_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1286
  }
1287
 
1288
  break;
1292
  $input1 = $service_object->saswp_schema_markup_generator($schema_type);
1293
 
1294
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1295
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
1296
  }
1297
  $input1 = apply_filters('saswp_modify_special_announcement_schema_output', $input1 );
1298
 
1300
 
1301
  if($modified_schema == 1){
1302
 
1303
+ $input1 = saswp_special_announcement_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1304
  }
1305
 
1306
  break;
1324
 
1325
  if($modified_schema == 1){
1326
 
1327
+ $input1 = saswp_visualartwork_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1328
  }
1329
 
1330
  break;
1345
 
1346
  if($modified_schema == 1){
1347
 
1348
+ $input1 = saswp_creativework_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1349
  }
1350
 
1351
  break;
1365
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1366
 
1367
  if($modified_schema == 1){
1368
+
1369
+ $input1 = saswp_article_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1370
  }
1371
 
1372
  break;
1381
 
1382
  if($modified_schema == 1){
1383
 
1384
+ $input1 = saswp_photograph_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1385
  }
1386
 
1387
  break;
1406
 
1407
  if($modified_schema == 1){
1408
 
1409
+ $input1 = saswp_tech_article_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1410
  }
1411
 
1412
  break;
1427
  );
1428
 
1429
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1430
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
1431
  }
1432
  if(!empty($aggregateRating)){
1433
  $input1['aggregateRating'] = $aggregateRating;
1444
 
1445
  if($modified_schema == 1){
1446
 
1447
+ $input1 = saswp_recipe_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1448
  }
1449
 
1450
  break;
1464
 
1465
  if(isset($sd_data['saswp-dw-question-answer']) && $sd_data['saswp-dw-question-answer'] ==1 && ($post_type == 'dwqa-question' || $post_type == 'dwqa-answer')){
1466
 
1467
+ $input1 = $service_object->saswp_dw_question_answers_details(saswp_get_the_ID());
1468
 
1469
  }
1470
 
1471
  if(isset($sd_data['saswp-bbpress']) && $sd_data['saswp-bbpress'] ==1 && $post_type == 'topic'){
1472
 
1473
+ $input1 = $service_object->saswp_bb_press_topic_details(saswp_get_the_ID());
1474
 
1475
  }
1476
 
1480
 
1481
  if($modified_schema == 1){
1482
 
1483
+ $input1 = saswp_qanda_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1484
  }
1485
 
1486
  break;
1503
 
1504
  if($modified_schema == 1){
1505
 
1506
+ $input1 = saswp_real_estate_listing_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1507
  }
1508
 
1509
  break;
1525
 
1526
  if($modified_schema == 1){
1527
 
1528
+ $input1 = saswp_apartment_complex_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1529
  }
1530
 
1531
  break;
1545
 
1546
  if($modified_schema == 1){
1547
 
1548
+ $input1 = saswp_rent_action_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1549
  }
1550
 
1551
  break;
1567
 
1568
  if($modified_schema == 1){
1569
 
1570
+ $input1 = saswp_psychological_treatment_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1571
  }
1572
 
1573
  break;
1584
 
1585
  if($modified_schema == 1){
1586
 
1587
+ $input1 = saswp_product_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1588
  }
1589
 
1590
  break;
1593
 
1594
  $image_details = wp_get_attachment_image_src($image_id);
1595
 
1596
+ $category_detail = get_the_category(saswp_get_the_ID());//$post->ID
1597
  $article_section = '';
1598
 
1599
  foreach($category_detail as $cd){
1640
 
1641
  }
1642
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1643
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
1644
  }
1645
 
1646
  $input1 = apply_filters('saswp_modify_news_article_schema_output', $input1 );
1649
 
1650
  if($modified_schema == 1){
1651
 
1652
+ $input1 = saswp_news_article_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1653
  }
1654
 
1655
  break;
1666
 
1667
  if($modified_schema == 1){
1668
 
1669
+ $input1 = saswp_service_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1670
  }
1671
 
1672
  break;
1683
 
1684
  if($modified_schema == 1){
1685
 
1686
+ $input1 = saswp_taxi_service_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1687
  }
1688
 
1689
  break;
1691
  case 'Review':
1692
 
1693
  $review_markup = $service_object->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
1694
+ $item_reviewed = saswp_get_post_meta($schema_post_id, 'saswp_review_item_reviewed_'.$schema_post_id, true);
1695
 
1696
  if($item_reviewed == 'local_business'){
1697
  $item_reviewed = 'LocalBusiness';
1734
 
1735
  if($modified_schema == 1){
1736
 
1737
+ $input1 = saswp_review_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1738
  }
1739
 
1740
  break;
1781
 
1782
  }
1783
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1784
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
1785
  }
1786
  if(!empty($aggregateRating)){
1787
  $input1['aggregateRating'] = $aggregateRating;
1797
 
1798
  if($modified_schema == 1){
1799
 
1800
+ $input1 = saswp_video_object_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1801
  }
1802
 
1803
  if(isset($enable_videoobject) && $enable_videoobject == 1){
1836
 
1837
  }
1838
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1839
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
1840
  }
1841
  if(!empty($aggregateRating)){
1842
  $input1['aggregateRating'] = $aggregateRating;
1852
 
1853
  if($modified_schema == 1){
1854
 
1855
+ $input1 = saswp_image_object_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1856
  }
1857
 
1858
  break;
1859
 
1860
  case 'local_business':
1861
 
1862
+ $business_type = saswp_get_post_meta($schema_post_id, 'saswp_business_type', true);
1863
+ $business_name = saswp_get_post_meta($schema_post_id, 'saswp_business_name', true);
1864
 
1865
  if($business_name){
1866
 
1897
 
1898
  if($modified_schema == 1){
1899
 
1900
+ $input1 = saswp_local_business_schema_markup($schema_post_id, saswp_get_the_ID(), $all_post_meta);
1901
 
1902
  }
1903
 
1914
 
1915
  if($schema_type == 'TechArticle' || $schema_type == 'Article' || $schema_type == 'Blogposting' || $schema_type == 'BlogPosting' || $schema_type == 'NewsArticle' || $schema_type == 'WebPage'){
1916
 
1917
+ $speakable_status = saswp_get_post_meta($schema_post_id, 'saswp_enable_speakable_schema', true);
1918
 
1919
  if($speakable_status){
1920
 
2738
  $feature_image = array();
2739
  $publisher = array();
2740
  $page_ids = array();
2741
+ $page_ids[] = saswp_get_the_ID();
2742
  $page_ids = apply_filters( 'saswp_modify_about_page_ids', $page_ids);
2743
 
2744
 
2786
  $feature_image = array();
2787
  $publisher = array();
2788
  $page_ids = array();
2789
+ $page_ids[] = saswp_get_the_ID();
2790
  $page_ids = apply_filters( 'saswp_modify_contact_page_ids', $page_ids);
2791
 
2792
  if(isset($sd_data['sd_contact_page']) && in_array($sd_data['sd_contact_page'], $page_ids)){
output/service.php CHANGED
@@ -50,7 +50,7 @@ Class saswp_output_service{
50
  while ( $the_query->have_posts() ) :
51
  $the_query->the_post();
52
 
53
- $post_id = get_the_id();
54
 
55
  $acf_fields = apply_filters( 'acf/field_group/get_fields', array(), $post_id ); // WPCS: XSS OK.
56
 
@@ -121,15 +121,18 @@ Class saswp_output_service{
121
  * @param type $schema_post_id
122
  * @return type array or string
123
  */
124
- public function saswp_get_meta_list_value($key, $field, $schema_post_id){
125
 
126
  global $post;
127
 
128
- $fixed_image = get_post_meta($schema_post_id, 'saswp_fixed_image', true) ;
129
 
130
  $response = null;
131
 
132
  switch ($field) {
 
 
 
133
  case 'blogname':
134
  $response = get_bloginfo();
135
  break;
@@ -180,7 +183,7 @@ Class saswp_output_service{
180
  break;
181
  case 'manual_text':
182
 
183
- $fixed_text = get_post_meta($schema_post_id, 'saswp_fixed_text', true) ;
184
 
185
  if(isset($fixed_text[$key])){
186
 
@@ -212,7 +215,7 @@ Class saswp_output_service{
212
 
213
  $response = '';
214
 
215
- $taxonomy_term = get_post_meta( $schema_post_id, 'saswp_taxonomy_term', true) ;
216
 
217
  if($taxonomy_term[$key] == 'all'){
218
 
@@ -254,8 +257,8 @@ Class saswp_output_service{
254
 
255
  case 'custom_field':
256
 
257
- $cus_field = get_post_meta($schema_post_id, 'saswp_custom_meta_field', true);
258
- $response = get_post_meta($post->ID, $cus_field[$key], true);
259
 
260
  break;
261
  case 'fixed_image':
@@ -319,29 +322,165 @@ Class saswp_output_service{
319
 
320
  if($acf_obj['type'] == 'image'){
321
 
322
- $image_id = get_post_meta($post->ID, $field, true );
323
  $response = saswp_get_image_by_id($image_id);
324
 
325
  }else if($acf_obj['type'] == 'repeater'){
326
 
327
- if(isset($acf_obj['value'])){
328
- foreach($acf_obj['value'] as $value){
329
- foreach ($value as $val){
330
- $response[] = $val;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331
  }
332
- }
333
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
 
335
  }else{
336
- $response = get_post_meta($post->ID, $field, true );
337
  }
338
 
339
  }else{
340
- $response = get_post_meta($post->ID, $field, true );
341
  }
342
 
343
  }else{
344
- $response = get_post_meta($post->ID, $field, true );
345
  }
346
 
347
  break;
@@ -358,26 +497,26 @@ Class saswp_output_service{
358
  */
359
  public function saswp_replace_with_custom_fields_value($input1, $schema_post_id){
360
 
361
- $custom_fields = get_post_meta($schema_post_id, 'saswp_meta_list_val', true);
362
  $allowed_html = saswp_expanded_allowed_tags();
363
  $review_markup = array();
364
  $review_response = array();
365
  $main_schema_type = '';
366
 
367
  if(!empty($custom_fields)){
368
-
 
 
369
  foreach ($custom_fields as $key => $field){
370
 
371
- $custom_fields[$key] = $this->saswp_get_meta_list_value($key, $field, $schema_post_id);
372
 
373
  }
374
-
375
- $schema_type = get_post_meta( $schema_post_id, 'schema_type', true);
376
-
377
  if($schema_type == 'Review'){
378
 
379
  $main_schema_type = $schema_type;
380
- $schema_type = get_post_meta($schema_post_id, 'saswp_review_item_reviewed_'.$schema_post_id, true);
381
 
382
  if(isset($custom_fields['saswp_review_name'])){
383
  $review_markup['name'] = $custom_fields['saswp_review_name'];
@@ -1409,6 +1548,16 @@ Class saswp_output_service{
1409
  if(isset($custom_fields['saswp_howto_schema_image'])){
1410
  $input1['image'] = $custom_fields['saswp_howto_schema_image'];
1411
  }
 
 
 
 
 
 
 
 
 
 
1412
 
1413
  break;
1414
 
@@ -3073,6 +3222,10 @@ Class saswp_output_service{
3073
 
3074
  $input1['author']['name'] = $custom_fields['saswp_faq_author'];
3075
  }
 
 
 
 
3076
 
3077
  break;
3078
 
@@ -3979,16 +4132,15 @@ Class saswp_output_service{
3979
  if($variations){
3980
 
3981
  foreach($variations as $value){
3982
-
3983
- $product_variation = wc_get_product( $value['variation_id'] );
3984
- $p_inc_tax = $product_variation->get_price_including_tax();
3985
-
3986
- if($p_inc_tax){
3987
- $varible_prices[] = $p_inc_tax;
3988
- }else{
3989
- $varible_prices[] = $value['display_price'];
3990
- }
3991
-
3992
  }
3993
  }
3994
 
@@ -4012,7 +4164,7 @@ Class saswp_output_service{
4012
 
4013
  //product categories ends here
4014
 
4015
- $gtin = get_post_meta($post_id, $key='hwp_product_gtin', true);
4016
 
4017
  if($gtin !=''){
4018
 
@@ -4021,7 +4173,7 @@ Class saswp_output_service{
4021
  }
4022
 
4023
  $brand = '';
4024
- $brand = get_post_meta($post_id, $key='hwp_product_brand', true);
4025
 
4026
  if($brand !=''){
4027
 
@@ -4102,7 +4254,7 @@ Class saswp_output_service{
4102
  }
4103
 
4104
  if(!isset($product_details['product_mpn'])){
4105
- $product_details['product_mpn'] = get_the_ID();
4106
  }
4107
 
4108
  $product_details['product_availability'] = saswp_prepend_schema_org($product->get_stock_status());
@@ -4130,7 +4282,7 @@ Class saswp_output_service{
4130
  $product_details['product_price'] = $woo_price;
4131
  }
4132
 
4133
- $product_details['product_sku'] = $product->get_sku() ? $product->get_sku(): get_the_ID();
4134
 
4135
  if(isset($date_on_sale)){
4136
 
@@ -4185,10 +4337,10 @@ Class saswp_output_service{
4185
 
4186
  foreach($post_meta as $key => $val){
4187
 
4188
- $rv[$val] = get_post_meta($me_post->ID, $key, true );
4189
 
4190
  if($val == 'reviewRating'){
4191
- $sumofrating += get_post_meta($me_post->ID, $key, true );
4192
  }
4193
 
4194
 
@@ -4306,7 +4458,7 @@ Class saswp_output_service{
4306
  $item_enable = 0;
4307
  $review_count = "1";
4308
 
4309
- $rating_box = get_post_meta($post_id, 'saswp_review_details', true);
4310
 
4311
  if(isset($rating_box['saswp-review-item-over-all'])){
4312
 
@@ -4349,7 +4501,7 @@ Class saswp_output_service{
4349
  $post_review_title = '';
4350
  $post_review_desc = '';
4351
 
4352
- $post_meta = get_post_meta($post_id);
4353
 
4354
  if(isset($post_meta['_post_review_box_breakdowns_score'])){
4355
 
@@ -4467,7 +4619,7 @@ Class saswp_output_service{
4467
 
4468
  if($post_type =='dwqa-question' && isset($sd_data['saswp-dw-question-answer']) && $sd_data['saswp-dw-question-answer'] ==1 && (is_plugin_active('dw-question-answer/dw-question-answer.php') || is_plugin_active('dw-question-answer-pro/dw-question-answer.php')) ){
4469
 
4470
- $post_meta = get_post_meta($post_id);
4471
 
4472
  if(isset($post_meta['_dwqa_best_answer'])){
4473
 
@@ -4477,7 +4629,7 @@ Class saswp_output_service{
4477
 
4478
  $dw_qa['@type'] = 'Question';
4479
  $dw_qa['name'] = saswp_get_the_title();
4480
- $dw_qa['upvoteCount'] = get_post_meta( $post_id, '_dwqa_votes', true );
4481
 
4482
  $args = array(
4483
  'p' => $post_id, // ID of a page, post, or custom type
@@ -4522,7 +4674,7 @@ Class saswp_output_service{
4522
  if(is_object($authorinfo)){
4523
  $authorname = $authorinfo->data->user_nicename;
4524
  }else{
4525
- $anonymous_name = get_post_meta( $answer->ID, '_dwqa_anonymous_name', true );
4526
  if($anonymous_name && $anonymous_name !=''){
4527
  $authorname = $anonymous_name;
4528
  }
@@ -4531,7 +4683,7 @@ Class saswp_output_service{
4531
  if($answer->ID == $best_answer_id){
4532
 
4533
  $accepted_answer['@type'] = 'Answer';
4534
- $accepted_answer['upvoteCount'] = get_post_meta( $answer->ID, '_dwqa_votes', true );
4535
  $accepted_answer['url'] = get_permalink();
4536
  $accepted_answer['text'] = wp_strip_all_tags($answer->post_content);
4537
  $accepted_answer['dateCreated'] = get_the_date("Y-m-d\TH:i:s\Z", $answer);
@@ -4541,7 +4693,7 @@ Class saswp_output_service{
4541
 
4542
  $suggested_answer[] = array(
4543
  '@type' => 'Answer',
4544
- 'upvoteCount' => get_post_meta( $answer->ID, '_dwqa_votes', true ),
4545
  'url' => get_permalink(),
4546
  'text' => wp_strip_all_tags($answer->post_content),
4547
  'dateCreated' => get_the_date("Y-m-d\TH:i:s\Z", $answer),
@@ -4662,7 +4814,7 @@ Class saswp_output_service{
4662
  }
4663
 
4664
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
4665
- $input1['comment'] = saswp_get_comments(get_the_ID());
4666
  }
4667
 
4668
  break;
@@ -4726,7 +4878,7 @@ Class saswp_output_service{
4726
  case 'Car':
4727
  case 'Vehicle':
4728
 
4729
- $product_details = $this->saswp_woocommerce_product_details(get_the_ID());
4730
 
4731
  if((isset($sd_data['saswp-woocommerce']) && $sd_data['saswp-woocommerce'] == 1) && !empty($product_details)){
4732
 
50
  while ( $the_query->have_posts() ) :
51
  $the_query->the_post();
52
 
53
+ $post_id = saswp_get_the_ID();
54
 
55
  $acf_fields = apply_filters( 'acf/field_group/get_fields', array(), $post_id ); // WPCS: XSS OK.
56
 
121
  * @param type $schema_post_id
122
  * @return type array or string
123
  */
124
+ public function saswp_get_meta_list_value($key, $field, $schema_post_id, $schema_type){
125
 
126
  global $post;
127
 
128
+ $fixed_image = saswp_get_post_meta($schema_post_id, 'saswp_fixed_image', true) ;
129
 
130
  $response = null;
131
 
132
  switch ($field) {
133
+ case 'blogname':
134
+ $response = get_bloginfo();
135
+ break;
136
  case 'blogname':
137
  $response = get_bloginfo();
138
  break;
183
  break;
184
  case 'manual_text':
185
 
186
+ $fixed_text = saswp_get_post_meta($schema_post_id, 'saswp_fixed_text', true) ;
187
 
188
  if(isset($fixed_text[$key])){
189
 
215
 
216
  $response = '';
217
 
218
+ $taxonomy_term = saswp_get_post_meta( $schema_post_id, 'saswp_taxonomy_term', true) ;
219
 
220
  if($taxonomy_term[$key] == 'all'){
221
 
257
 
258
  case 'custom_field':
259
 
260
+ $cus_field = saswp_get_post_meta($schema_post_id, 'saswp_custom_meta_field', true);
261
+ $response = saswp_get_post_meta($post->ID, $cus_field[$key], true);
262
 
263
  break;
264
  case 'fixed_image':
322
 
323
  if($acf_obj['type'] == 'image'){
324
 
325
+ $image_id = saswp_get_post_meta($post->ID, $field, true );
326
  $response = saswp_get_image_by_id($image_id);
327
 
328
  }else if($acf_obj['type'] == 'repeater'){
329
 
330
+ switch ($schema_type) {
331
+
332
+ case 'FAQ':
333
+
334
+ if(!empty($acf_obj['value'])){
335
+
336
+ foreach($acf_obj['value'] as $value){
337
+
338
+ $main_entity = array();
339
+
340
+ $ar_values = array_values($value);
341
+
342
+ $main_entity['@type'] = 'Question';
343
+
344
+ if(!empty($ar_values[0])){
345
+ $main_entity['name'] = $ar_values[0];
346
+ }
347
+ $main_entity['acceptedAnswer']['@type'] = 'Answer';
348
+ if(!empty($ar_values[1])){
349
+ $main_entity['acceptedAnswer']['text'] = $ar_values[1];
350
+ }
351
+ if(!empty($ar_values[2]['url'])){
352
+ $main_entity['acceptedAnswer']['image'] = $ar_values[2]['url'];
353
+ }
354
+
355
+ $response [] = $main_entity;
356
+
357
+ }
358
+
359
  }
360
+
361
+ break;
362
+
363
+ case 'HowTo':
364
+
365
+ if(strpos($acf_obj['name'], "tool") !== false){
366
+
367
+ if(!empty($acf_obj['value'])){
368
+
369
+ foreach($acf_obj['value'] as $value){
370
+
371
+ $main_entity = array();
372
+
373
+ $ar_values = array_values($value);
374
+
375
+ $main_entity['@type'] = 'HowToTool';
376
+
377
+ if(!empty($ar_values[0])){
378
+ $main_entity['name'] = $ar_values[0];
379
+ }
380
+ if(!empty($ar_values[1])){
381
+ $main_entity['url'] = $ar_values[1];
382
+ }
383
+ if(!empty($ar_values[2]['url'])){
384
+ $main_entity['image'] = $ar_values[2]['url'];
385
+ }
386
+
387
+ $response [] = $main_entity;
388
+
389
+ }
390
+
391
+ }
392
+
393
+ }
394
+
395
+ if(strpos($acf_obj['name'], "supp") !== false){
396
+
397
+ if(!empty($acf_obj['value'])){
398
+
399
+ foreach($acf_obj['value'] as $value){
400
+
401
+ $main_entity = array();
402
+
403
+ $ar_values = array_values($value);
404
+
405
+ $main_entity['@type'] = 'HowToSupply';
406
+
407
+ if(!empty($ar_values[0])){
408
+ $main_entity['name'] = $ar_values[0];
409
+ }
410
+ if(!empty($ar_values[1])){
411
+ $main_entity['url'] = $ar_values[1];
412
+ }
413
+ if(!empty($ar_values[2]['url'])){
414
+ $main_entity['image'] = $ar_values[2]['url'];
415
+ }
416
+
417
+ $response [] = $main_entity;
418
+
419
+ }
420
+
421
+ }
422
+
423
+ }
424
+
425
+ if(strpos($acf_obj['name'], "step") !== false){
426
+
427
+ if(!empty($acf_obj['value'])){
428
+
429
+ foreach($acf_obj['value'] as $value){
430
+
431
+ $main_entity = array();
432
+
433
+ $ar_values = array_values($value);
434
+
435
+ $main_entity['@type'] = 'HowToStep';
436
+
437
+ if(!empty($ar_values[0])){
438
+ $main_entity['name'] = $ar_values[0];
439
+ }
440
+ if(!empty($ar_values[1])){
441
+ $main_entity['url'] = $ar_values[1];
442
+ }
443
+ if(!empty($ar_values[2])){
444
+ $main_entity['text'] = $ar_values[2];
445
+ }
446
+ if(!empty($ar_values[3]['url'])){
447
+ $main_entity['image'] = $ar_values[3]['url'];
448
+ }
449
+
450
+ $response [] = $main_entity;
451
+
452
+ }
453
+
454
+ }
455
+
456
+ }
457
+
458
+ break;
459
+
460
+
461
+ default:
462
+
463
+ if(isset($acf_obj['value'])){
464
+ foreach($acf_obj['value'] as $value){
465
+ foreach ($value as $val){
466
+ $response[] = $val;
467
+ }
468
+ }
469
+ }
470
+
471
+ break;
472
+ }
473
 
474
  }else{
475
+ $response = saswp_get_post_meta($post->ID, $field, true );
476
  }
477
 
478
  }else{
479
+ $response = saswp_get_post_meta($post->ID, $field, true );
480
  }
481
 
482
  }else{
483
+ $response = saswp_get_post_meta($post->ID, $field, true );
484
  }
485
 
486
  break;
497
  */
498
  public function saswp_replace_with_custom_fields_value($input1, $schema_post_id){
499
 
500
+ $custom_fields = saswp_get_post_meta($schema_post_id, 'saswp_meta_list_val', true);
501
  $allowed_html = saswp_expanded_allowed_tags();
502
  $review_markup = array();
503
  $review_response = array();
504
  $main_schema_type = '';
505
 
506
  if(!empty($custom_fields)){
507
+
508
+ $schema_type = saswp_get_post_meta( $schema_post_id, 'schema_type', true);
509
+
510
  foreach ($custom_fields as $key => $field){
511
 
512
+ $custom_fields[$key] = $this->saswp_get_meta_list_value($key, $field, $schema_post_id, $schema_type);
513
 
514
  }
515
+
 
 
516
  if($schema_type == 'Review'){
517
 
518
  $main_schema_type = $schema_type;
519
+ $schema_type = saswp_get_post_meta($schema_post_id, 'saswp_review_item_reviewed_'.$schema_post_id, true);
520
 
521
  if(isset($custom_fields['saswp_review_name'])){
522
  $review_markup['name'] = $custom_fields['saswp_review_name'];
1548
  if(isset($custom_fields['saswp_howto_schema_image'])){
1549
  $input1['image'] = $custom_fields['saswp_howto_schema_image'];
1550
  }
1551
+
1552
+ if(isset($custom_fields['saswp_howto_schema_supplies'])){
1553
+ $input1['supply'] = $custom_fields['saswp_howto_schema_supplies'];
1554
+ }
1555
+ if(isset($custom_fields['saswp_howto_schema_tools'])){
1556
+ $input1['tool'] = $custom_fields['saswp_howto_schema_tools'];
1557
+ }
1558
+ if(isset($custom_fields['saswp_howto_schema_steps'])){
1559
+ $input1['step'] = $custom_fields['saswp_howto_schema_steps'];
1560
+ }
1561
 
1562
  break;
1563
 
3222
 
3223
  $input1['author']['name'] = $custom_fields['saswp_faq_author'];
3224
  }
3225
+
3226
+ if(isset($custom_fields['saswp_faq_main_entity'])){
3227
+ $input1['mainEntity'] = $custom_fields['saswp_faq_main_entity'];
3228
+ }
3229
 
3230
  break;
3231
 
4132
  if($variations){
4133
 
4134
  foreach($variations as $value){
4135
+
4136
+ $product_variation = wc_get_product( $value['variation_id'] );
4137
+ $p_inc_tax = $product_variation->get_price_including_tax();
4138
+
4139
+ if($p_inc_tax){
4140
+ $varible_prices[] = $p_inc_tax;
4141
+ }else{
4142
+ $varible_prices[] = $value['display_price'];
4143
+ }
 
4144
  }
4145
  }
4146
 
4164
 
4165
  //product categories ends here
4166
 
4167
+ $gtin = saswp_get_post_meta($post_id, $key='hwp_product_gtin', true);
4168
 
4169
  if($gtin !=''){
4170
 
4173
  }
4174
 
4175
  $brand = '';
4176
+ $brand = saswp_get_post_meta($post_id, $key='hwp_product_brand', true);
4177
 
4178
  if($brand !=''){
4179
 
4254
  }
4255
 
4256
  if(!isset($product_details['product_mpn'])){
4257
+ $product_details['product_mpn'] = saswp_get_the_ID();
4258
  }
4259
 
4260
  $product_details['product_availability'] = saswp_prepend_schema_org($product->get_stock_status());
4282
  $product_details['product_price'] = $woo_price;
4283
  }
4284
 
4285
+ $product_details['product_sku'] = $product->get_sku() ? $product->get_sku(): saswp_get_the_ID();
4286
 
4287
  if(isset($date_on_sale)){
4288
 
4337
 
4338
  foreach($post_meta as $key => $val){
4339
 
4340
+ $rv[$val] = saswp_get_post_meta($me_post->ID, $key, true );
4341
 
4342
  if($val == 'reviewRating'){
4343
+ $sumofrating += saswp_get_post_meta($me_post->ID, $key, true );
4344
  }
4345
 
4346
 
4458
  $item_enable = 0;
4459
  $review_count = "1";
4460
 
4461
+ $rating_box = saswp_get_post_meta($post_id, 'saswp_review_details', true);
4462
 
4463
  if(isset($rating_box['saswp-review-item-over-all'])){
4464
 
4501
  $post_review_title = '';
4502
  $post_review_desc = '';
4503
 
4504
+ $post_meta = saswp_get_post_meta($post_id);
4505
 
4506
  if(isset($post_meta['_post_review_box_breakdowns_score'])){
4507
 
4619
 
4620
  if($post_type =='dwqa-question' && isset($sd_data['saswp-dw-question-answer']) && $sd_data['saswp-dw-question-answer'] ==1 && (is_plugin_active('dw-question-answer/dw-question-answer.php') || is_plugin_active('dw-question-answer-pro/dw-question-answer.php')) ){
4621
 
4622
+ $post_meta = saswp_get_post_meta($post_id);
4623
 
4624
  if(isset($post_meta['_dwqa_best_answer'])){
4625
 
4629
 
4630
  $dw_qa['@type'] = 'Question';
4631
  $dw_qa['name'] = saswp_get_the_title();
4632
+ $dw_qa['upvoteCount'] = saswp_get_post_meta( $post_id, '_dwqa_votes', true );
4633
 
4634
  $args = array(
4635
  'p' => $post_id, // ID of a page, post, or custom type
4674
  if(is_object($authorinfo)){
4675
  $authorname = $authorinfo->data->user_nicename;
4676
  }else{
4677
+ $anonymous_name = saswp_get_post_meta( $answer->ID, '_dwqa_anonymous_name', true );
4678
  if($anonymous_name && $anonymous_name !=''){
4679
  $authorname = $anonymous_name;
4680
  }
4683
  if($answer->ID == $best_answer_id){
4684
 
4685
  $accepted_answer['@type'] = 'Answer';
4686
+ $accepted_answer['upvoteCount'] = saswp_get_post_meta( $answer->ID, '_dwqa_votes', true );
4687
  $accepted_answer['url'] = get_permalink();
4688
  $accepted_answer['text'] = wp_strip_all_tags($answer->post_content);
4689
  $accepted_answer['dateCreated'] = get_the_date("Y-m-d\TH:i:s\Z", $answer);
4693
 
4694
  $suggested_answer[] = array(
4695
  '@type' => 'Answer',
4696
+ 'upvoteCount' => saswp_get_post_meta( $answer->ID, '_dwqa_votes', true ),
4697
  'url' => get_permalink(),
4698
  'text' => wp_strip_all_tags($answer->post_content),
4699
  'dateCreated' => get_the_date("Y-m-d\TH:i:s\Z", $answer),
4814
  }
4815
 
4816
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
4817
+ $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
4818
  }
4819
 
4820
  break;
4878
  case 'Car':
4879
  case 'Vehicle':
4880
 
4881
+ $product_details = $this->saswp_woocommerce_product_details(saswp_get_the_ID());
4882
 
4883
  if((isset($sd_data['saswp-woocommerce']) && $sd_data['saswp-woocommerce'] == 1) && !empty($product_details)){
4884
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
- === Schema & Structured Data for WP & AMP ===
2
  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.7
6
- Stable tag: 1.9.81
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -120,16 +120,28 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
120
 
121
  == Changelog ==
122
 
123
- = 1.9.81 (04 July 2021) =
 
 
 
 
 
 
 
 
 
 
 
 
 
124
 
125
  * Fixed: Google review page redirect to wrong url, it should redirect to Google review page url. #1457
126
- * Fixed: When the "Defragment Schema Markup" option is enabled knowledge graph markup is displaying on the category post and pages. #1455
127
  * Fixed: Microdata cleaner option does not remove single itemtype, itemprop #1463
128
  * Fixed: Remove the cause property in the Medical condition schema type #1462
129
  * Fixed: Errors in NewsArticle (The property 2 is not recognised by the schema) #1468
130
  * Added: Google Shopping reviews platform #1448
131
 
132
-
133
  = 1.9.80 (23 Jun 2021) =
134
 
135
  * Fixed: Item name mismatches when We try to activate "1-Click Indexing API Integration" extension. #1454
@@ -1232,7 +1244,7 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
1232
  * Bug Fixed: Notice: Undefined variable: custom_markup #308
1233
  * Bug Fixed: JS and CSS should be included where it's need. #294
1234
  * Bug Fixed: Remove duplicate queries #296
1235
- * Bug Fixed: Google Review Module ( update_post_meta was called earlier than its actually call ) #307
1236
  * Bug Fixed: When extensions are active then it should show #313
1237
  * Bug Fixed: Compatibility conflicts with WooCommerce SEO #312
1238
  * Bug Fixed: '@type' => 'VideoObject' is missing in recipe schema video entity #314
1
+ === Schema & Structured Data for WP & AMP ===
2
  Contributors: magazine3
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
+ Tested up to: 5.8
6
+ Stable tag: 1.9.82
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.82 (15 July 2021) =
124
+
125
+ * Added: Option to show LocalBusiness as page content using shortcode, Gutenberg block and widget.
126
+ * Added: Job Training Schema type #503
127
+ * Added: Recipe Schema Block #164
128
+ * Added: Support for structure data on taxonomies page #983
129
+ * Added: Author type option for accepted answer and suggested answer in the Q&A schema #1469
130
+ * Added: The support of ACF repeater fields for HowTo and FAQ schema #1163.
131
+ * Fixed: Conflict Issue with Popup maker plugin #1478
132
+ * Fixed: Debug Warnings #1471
133
+ * Fixed: Improve pagination for the review widget #1042
134
+
135
+
136
+ = 1.9.81 (04 JULY 2021) =
137
 
138
  * Fixed: Google review page redirect to wrong url, it should redirect to Google review page url. #1457
139
+ * Fixed: When the Defragment Schema Markup option is enabled knowledge graph markup is displaying on the category post and pages. #1455
140
  * Fixed: Microdata cleaner option does not remove single itemtype, itemprop #1463
141
  * Fixed: Remove the cause property in the Medical condition schema type #1462
142
  * Fixed: Errors in NewsArticle (The property 2 is not recognised by the schema) #1468
143
  * Added: Google Shopping reviews platform #1448
144
 
 
145
  = 1.9.80 (23 Jun 2021) =
146
 
147
  * Fixed: Item name mismatches when We try to activate "1-Click Indexing API Integration" extension. #1454
1244
  * Bug Fixed: Notice: Undefined variable: custom_markup #308
1245
  * Bug Fixed: JS and CSS should be included where it's need. #294
1246
  * Bug Fixed: Remove duplicate queries #296
1247
+ * Bug Fixed: Google Review Module ( saswp_update_post_meta was called earlier than its actually call ) #307
1248
  * Bug Fixed: When extensions are active then it should show #313
1249
  * Bug Fixed: Compatibility conflicts with WooCommerce SEO #312
1250
  * Bug Fixed: '@type' => 'VideoObject' is missing in recipe schema video entity #314
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.81
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.81');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
@@ -74,11 +74,12 @@ if ( ! function_exists('saswp_non_amp') ){
74
  require_once SASWP_DIR_NAME.'/admin_section/structure_admin.php';
75
  require_once SASWP_DIR_NAME.'/admin_section/settings.php';
76
  require_once SASWP_DIR_NAME.'/admin_section/common-function.php';
 
77
  require_once SASWP_DIR_NAME.'/admin_section/fields-generator.php';
78
  require_once SASWP_DIR_NAME.'/admin_section/newsletter.php';
79
  require_once SASWP_DIR_NAME.'/admin_section/plugin-installer/install.php';
80
  //Loading View files
81
- require_once SASWP_DIR_NAME.'/view/taxonomy.php';
82
  require_once SASWP_DIR_NAME.'/view/help.php';
83
  require_once SASWP_DIR_NAME.'/view/schema_type.php';
84
  require_once SASWP_DIR_NAME.'/view/paywall.php';
@@ -152,4 +153,5 @@ if( ! function_exists( 'saswp_start_plugin_tracking' ) ) {
152
  }
153
 
154
  saswp_start_plugin_tracking();
155
- }
 
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.82
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.82');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
74
  require_once SASWP_DIR_NAME.'/admin_section/structure_admin.php';
75
  require_once SASWP_DIR_NAME.'/admin_section/settings.php';
76
  require_once SASWP_DIR_NAME.'/admin_section/common-function.php';
77
+ require_once SASWP_DIR_NAME .'/output/location.php';
78
  require_once SASWP_DIR_NAME.'/admin_section/fields-generator.php';
79
  require_once SASWP_DIR_NAME.'/admin_section/newsletter.php';
80
  require_once SASWP_DIR_NAME.'/admin_section/plugin-installer/install.php';
81
  //Loading View files
82
+
83
  require_once SASWP_DIR_NAME.'/view/help.php';
84
  require_once SASWP_DIR_NAME.'/view/schema_type.php';
85
  require_once SASWP_DIR_NAME.'/view/paywall.php';
153
  }
154
 
155
  saswp_start_plugin_tracking();
156
+ }
157
+
view/common.php CHANGED
@@ -50,7 +50,7 @@ class saswp_view_common_class {
50
  $response = '';
51
  $output = '';
52
 
53
- $item_type = get_post_meta($schema_id, 'saswp_itemlist_item_type', true);
54
 
55
  if($meta_name == 'itemlist_item'){
56
 
@@ -210,7 +210,7 @@ class saswp_view_common_class {
210
  if($type_fields){
211
 
212
  if($schema_type == 'ItemList'){
213
- $itemlist_sub_type = get_post_meta($schema_id, 'saswp_itemlist_item_type', true);
214
  $tabs_fields .= '<div schema-id="'.esc_attr($schema_id).'" class="saswp-table-create-onajax saswp-ps-toggle">';
215
 
216
  }else{
@@ -231,7 +231,7 @@ class saswp_view_common_class {
231
 
232
  foreach($type_fields as $key => $value){
233
 
234
- $howto_data[$value.'_'.$schema_id] = get_post_meta($post_id, $value.'_'.$schema_id, true);
235
  $tabs_fields .= '<div class="saswp-'.esc_attr($key).'-section-main">';
236
  $tabs_fields .= '<div class="saswp-'.esc_attr($key).'-section" data-id="'.esc_attr($schema_id).'">';
237
  if(isset($howto_data[$value.'_'.$schema_id])){
@@ -309,23 +309,28 @@ class saswp_view_common_class {
309
 
310
  $input = '';
311
  $attributes = '';
312
-
313
- $label = '<label for="' . esc_attr($meta_field['id']) . '">' . saswp_t_string( $meta_field['label'] ). '</label>';
314
- $meta_value = get_post_meta( $post_id, $meta_field['id'], true );
315
-
316
- if ( empty( $meta_value ) && isset($meta_field['default'])) {
317
-
318
- $meta_value = $meta_field['default'];
319
  }
 
 
 
 
320
 
321
- if(isset($meta_field['attributes'])){
322
-
323
- foreach ($meta_field['attributes'] as $key => $attr ){
324
-
325
- $attributes .=''.esc_attr($key).'="'.esc_attr($attr).'"';
326
- }
327
 
328
- }
 
 
 
 
 
 
 
329
 
330
  switch ( $meta_field['type'] ) {
331
 
@@ -337,7 +342,7 @@ class saswp_view_common_class {
337
  $media_value = array();
338
  $media_key = $meta_field['id'].'_detail';
339
 
340
- $media_value_meta = get_post_meta( $post_id, $media_key, true );
341
 
342
  if(!empty($media_value_meta)){
343
  $media_value = $media_value_meta;
@@ -476,7 +481,7 @@ class saswp_view_common_class {
476
  );
477
  break;
478
 
479
- case 'multiselect':
480
  $input = sprintf(
481
  '<select multiple id="%s" name="%s[]">',
482
  $meta_field['id'],
@@ -630,7 +635,7 @@ class saswp_view_common_class {
630
  'thumbnail' => $media_thumbnail,
631
  );
632
 
633
- update_post_meta( $post_id, $media_key, $media_detail);
634
 
635
  }
636
 
@@ -648,9 +653,9 @@ class saswp_view_common_class {
648
  $post_meta[ $meta_field['id'] ] = wp_unslash( $post_meta[ $meta_field['id'] ] );
649
 
650
  }
651
- update_post_meta( $post_id, $meta_field['id'], $post_meta[ $meta_field['id'] ] );
652
  } else if ( $meta_field['type'] === 'checkbox' ) {
653
- delete_post_meta( $post_id, $meta_field['id']);
654
  }
655
  }
656
 
@@ -675,7 +680,7 @@ class saswp_view_common_class {
675
  foreach($all_schema as $schema){
676
 
677
  if( isset($_POST['saswp_modify_this_schema_'.$schema->ID]) && !empty($_POST['saswp_modify_this_schema_'.$schema->ID]) ){
678
- update_post_meta( $post_id, 'saswp_modify_this_schema_'.$schema->ID, intval($_POST['saswp_modify_this_schema_'.$schema->ID]));
679
  }
680
 
681
  foreach ($this->schema_type_element as $element){
@@ -707,7 +712,7 @@ class saswp_view_common_class {
707
  }
708
  }
709
  if(!empty($element_val)){
710
- update_post_meta( $post_id, $val.'_'.intval($schema->ID), $element_val);
711
  }
712
 
713
  }
50
  $response = '';
51
  $output = '';
52
 
53
+ $item_type = saswp_get_post_meta($schema_id, 'saswp_itemlist_item_type', true);
54
 
55
  if($meta_name == 'itemlist_item'){
56
 
210
  if($type_fields){
211
 
212
  if($schema_type == 'ItemList'){
213
+ $itemlist_sub_type = saswp_get_post_meta($schema_id, 'saswp_itemlist_item_type', true);
214
  $tabs_fields .= '<div schema-id="'.esc_attr($schema_id).'" class="saswp-table-create-onajax saswp-ps-toggle">';
215
 
216
  }else{
231
 
232
  foreach($type_fields as $key => $value){
233
 
234
+ $howto_data[$value.'_'.$schema_id] = saswp_get_post_meta($post_id, $value.'_'.$schema_id, true);
235
  $tabs_fields .= '<div class="saswp-'.esc_attr($key).'-section-main">';
236
  $tabs_fields .= '<div class="saswp-'.esc_attr($key).'-section" data-id="'.esc_attr($schema_id).'">';
237
  if(isset($howto_data[$value.'_'.$schema_id])){
309
 
310
  $input = '';
311
  $attributes = '';
312
+ $label = '';
313
+ $meta_value = array();
314
+
315
+ if($meta_field['type'] != 'repeater'){
316
+ $label = '<label for="' . esc_attr($meta_field['id']) . '">' . saswp_t_string( $meta_field['label'] ). '</label>';
317
+ $meta_value = saswp_get_post_meta( $post_id, $meta_field['id'], true );
 
318
  }
319
+
320
+ if ( empty( $meta_value ) && isset($meta_field['default'])) {
321
+
322
+ $meta_value = $meta_field['default'];
323
 
324
+ }
 
 
 
 
 
325
 
326
+ if(isset($meta_field['attributes'])){
327
+
328
+ foreach ($meta_field['attributes'] as $key => $attr ){
329
+
330
+ $attributes .=''.esc_attr($key).'="'.esc_attr($attr).'"';
331
+ }
332
+
333
+ }
334
 
335
  switch ( $meta_field['type'] ) {
336
 
342
  $media_value = array();
343
  $media_key = $meta_field['id'].'_detail';
344
 
345
+ $media_value_meta = saswp_get_post_meta( $post_id, $media_key, true );
346
 
347
  if(!empty($media_value_meta)){
348
  $media_value = $media_value_meta;
481
  );
482
  break;
483
 
484
+ case 'multiselect':
485
  $input = sprintf(
486
  '<select multiple id="%s" name="%s[]">',
487
  $meta_field['id'],
635
  'thumbnail' => $media_thumbnail,
636
  );
637
 
638
+ saswp_update_post_meta( $post_id, $media_key, $media_detail);
639
 
640
  }
641
 
653
  $post_meta[ $meta_field['id'] ] = wp_unslash( $post_meta[ $meta_field['id'] ] );
654
 
655
  }
656
+ saswp_update_post_meta( $post_id, $meta_field['id'], $post_meta[ $meta_field['id'] ] );
657
  } else if ( $meta_field['type'] === 'checkbox' ) {
658
+ saswp_delete_post_meta( $post_id, $meta_field['id']);
659
  }
660
  }
661
 
680
  foreach($all_schema as $schema){
681
 
682
  if( isset($_POST['saswp_modify_this_schema_'.$schema->ID]) && !empty($_POST['saswp_modify_this_schema_'.$schema->ID]) ){
683
+ saswp_update_post_meta( $post_id, 'saswp_modify_this_schema_'.$schema->ID, intval($_POST['saswp_modify_this_schema_'.$schema->ID]));
684
  }
685
 
686
  foreach ($this->schema_type_element as $element){
712
  }
713
  }
714
  if(!empty($element_val)){
715
+ saswp_update_post_meta( $post_id, $val.'_'.intval($schema->ID), $element_val);
716
  }
717
 
718
  }
view/help.php CHANGED
@@ -30,4 +30,28 @@ function saswp_disable_new_posts() {
30
  unset($submenu['edit.php?post_type=saswp'][10]);
31
 
32
  }
33
- add_action('admin_menu', 'saswp_disable_new_posts');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  unset($submenu['edit.php?post_type=saswp'][10]);
31
 
32
  }
33
+ add_action('admin_menu', 'saswp_disable_new_posts');
34
+
35
+ function saswp_location_meta_box_cb($post){
36
+
37
+ $location = saswp_get_post_meta($post->ID, 'saswp_loc_display_on_front', true);
38
+
39
+ ?>
40
+
41
+ <ul>
42
+ <li>
43
+ <label><input name="saswp_loc_display_on_front" id="saswp_loc_display_on_front" type="checkbox" value="1" <?php echo ( $location == 1 ? 'checked' : '' ); ?> /> <?php echo saswp_t_string('Display On Page Content'); ?> </label>
44
+ </li>
45
+ </ul>
46
+ <div class="saswp-front-location-inst <?php echo ( $location == 1 ? '' : 'saswp_hide' ); ?>">
47
+ <p><?php echo saswp_t_string('There are three ways to display it.'); ?></p>
48
+ <ul>
49
+ <li><?php echo saswp_t_string('1. Using Gutenberg Block'); ?> <a target="_blank" href="https://structured-data-for-wp.com/docs/" ><?php echo saswp_t_string('Learn More'); ?></a></li>
50
+ <li><?php echo saswp_t_string('2. Using Widget'); ?> <a target="_blank" href="https://structured-data-for-wp.com/docs/" ><?php echo saswp_t_string('Learn More'); ?></a></li>
51
+ <li><?php echo saswp_t_string('3. Using shortcode'); ?> <a target="_blank" href="https://structured-data-for-wp.com/docs/" ><?php echo saswp_t_string('Learn More'); ?></a></li>
52
+ <li><?php echo saswp_t_string('Shortcode'); ?> <input type="text" value='[saswp-location id="<?php echo get_the_ID(); ?>"]' readonly /></li>
53
+ </ul>
54
+ </div>
55
+
56
+ <?php
57
+ }
view/paywall.php CHANGED
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
16
  function saswp_schema_options_get_meta( $value ) {
17
  global $post;
18
 
19
- $field = get_post_meta( $post->ID, $value, true );
20
 
21
  if ( ! empty( $field ) ) {
22
  return is_array( $field ) ? stripslashes_deep( $field ) : stripslashes( wp_kses_decode_entities( $field ) );
@@ -28,7 +28,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
28
 
29
  wp_nonce_field( 'saswp_schema_options_nonce', 'saswp_schema_options_nonce' );
30
 
31
- $schema_options = get_post_meta($post->ID, 'schema_options', true);
32
 
33
  ?>
34
 
@@ -109,10 +109,10 @@ if ( ! defined( 'ABSPATH' ) ) exit;
109
  'saswp_modify_method' => $saswp_modify_method
110
  );
111
 
112
- update_post_meta( $post_id, 'schema_options', $saswp_schema_options);
113
- update_post_meta( $post_id, 'saswp_meta_list_val', $meta_list);
114
- update_post_meta( $post_id, 'saswp_fixed_text', $fixed_text);
115
- update_post_meta( $post_id, 'saswp_taxonomy_term', $taxonomy_term);
116
- update_post_meta( $post_id, 'saswp_fixed_image', $fixed_image);
117
- update_post_meta( $post_id, 'saswp_custom_meta_field', $cus_meta_field);
118
  }
16
  function saswp_schema_options_get_meta( $value ) {
17
  global $post;
18
 
19
+ $field = saswp_get_post_meta( $post->ID, $value, true );
20
 
21
  if ( ! empty( $field ) ) {
22
  return is_array( $field ) ? stripslashes_deep( $field ) : stripslashes( wp_kses_decode_entities( $field ) );
28
 
29
  wp_nonce_field( 'saswp_schema_options_nonce', 'saswp_schema_options_nonce' );
30
 
31
+ $schema_options = saswp_get_post_meta($post->ID, 'schema_options', true);
32
 
33
  ?>
34
 
109
  'saswp_modify_method' => $saswp_modify_method
110
  );
111
 
112
+ saswp_update_post_meta( $post_id, 'schema_options', $saswp_schema_options);
113
+ saswp_update_post_meta( $post_id, 'saswp_meta_list_val', $meta_list);
114
+ saswp_update_post_meta( $post_id, 'saswp_fixed_text', $fixed_text);
115
+ saswp_update_post_meta( $post_id, 'saswp_taxonomy_term', $taxonomy_term);
116
+ saswp_update_post_meta( $post_id, 'saswp_fixed_image', $fixed_image);
117
+ saswp_update_post_meta( $post_id, 'saswp_custom_meta_field', $cus_meta_field);
118
  }
view/post_specific.php CHANGED
@@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
13
 
14
  class saswp_post_specific {
15
 
16
- public $screen = array();
17
  public $all_schema = null;
18
  public $options_response = array();
19
  public $modify_schema_post_enable = false;
@@ -40,13 +40,23 @@ class saswp_post_specific {
40
  * List of hooks used in this context
41
  */
42
  public function saswp_post_specific_hooks(){
 
 
 
 
 
 
 
 
43
 
44
  add_action( 'admin_init', array( $this, 'saswp_get_all_schema_list' ) );
45
 
46
  add_action( 'wp_ajax_saswp_get_item_reviewed_fields', array($this, 'saswp_get_item_reviewed_fields')) ;
47
 
48
- add_action( 'add_meta_boxes', array( $this, 'saswp_post_specifc_add_meta_boxes' ),10,2 );
 
49
  add_action( 'save_post', array( $this, 'saswp_post_specific_save_fields' ) );
 
50
  add_action( 'wp_ajax_saswp_get_sub_business_ajax', array($this,'saswp_get_sub_business_ajax'));
51
 
52
  add_action( 'wp_ajax_saswp_get_schema_dynamic_fields_ajax', array($this,'saswp_get_schema_dynamic_fields_ajax'));
@@ -55,6 +65,24 @@ class saswp_post_specific {
55
  add_action( 'wp_ajax_saswp_modify_schema_post_restore', array($this,'saswp_modify_schema_post_restore'));
56
 
57
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  /**
60
  * Generate the post specific metabox html with dynamic values on ajax call
@@ -75,13 +103,13 @@ class saswp_post_specific {
75
  $post_id = intval($_POST['post_id']);
76
  $schema_id = intval($_POST['schema_id']);
77
 
78
- delete_post_meta($post_id, 'saswp_modify_this_schema_'.$schema_id);
79
 
80
  $meta_field = saswp_get_fields_by_schema_type($schema_id);
81
 
82
  if($meta_field){
83
  foreach($meta_field as $field){
84
- delete_post_meta($post_id, $field['id']);
85
  }
86
  }
87
  echo json_encode(array('status'=> 't', 'msg'=>saswp_t_string( 'Schema has been restored' )));
@@ -112,7 +140,16 @@ class saswp_post_specific {
112
 
113
  endwhile;
114
 
 
 
 
 
 
 
 
 
115
  }
 
116
  return $response;
117
  }
118
 
@@ -130,14 +167,14 @@ class saswp_post_specific {
130
  return;
131
  }
132
 
133
- $post_id = intval($_GET['post_id']);
134
  $schema_id = intval($_GET['schema_id']);
135
  $modify_this = 1;
136
  $disabled = '';
137
  $modified = false;
138
 
139
- update_post_meta($post_id, 'saswp_modify_this_schema_'.$schema_id, 1);
140
- $schema_type = get_post_meta($schema_id, 'schema_type', true);
141
  $response = $this->saswp_get_schema_fields_on_ajax($post_id, $schema_id);
142
  $saswp_meta_fields = array_filter($response);
143
 
@@ -145,7 +182,7 @@ class saswp_post_specific {
145
 
146
  if($schema_type == 'Review'){
147
 
148
- $item_reviewed = get_post_meta($post->ID, 'saswp_review_item_reviewed_'.$schema_id, true);
149
  if(!$item_reviewed){
150
  $item_reviewed = 'Book';
151
  }
@@ -184,7 +221,7 @@ class saswp_post_specific {
184
  $post_id = intval($_GET['post_id']);
185
  $modify_this = intval($_GET['modify_this']);
186
 
187
- $schema_enable = get_post_meta($post_id, 'saswp_enable_disable_schema', true);
188
 
189
  if(isset($schema_enable[$schema_id]) && $schema_enable[$schema_id] == 0){
190
  $disabled = 'checked';
@@ -215,7 +252,7 @@ class saswp_post_specific {
215
  $schema_id = sanitize_text_field($_POST['schema_id']);
216
  $status = sanitize_text_field($_POST['status']);
217
 
218
- $schema_enable_status = get_post_meta($post_id, 'saswp_enable_disable_schema', true);
219
 
220
  if(is_array($schema_enable_status)){
221
 
@@ -223,13 +260,13 @@ class saswp_post_specific {
223
 
224
  }else{
225
 
226
- delete_post_meta($post_id, 'saswp_enable_disable_schema');
227
 
228
  }
229
 
230
  $schema_enable[$schema_id] = $status;
231
 
232
- update_post_meta( $post_id, 'saswp_enable_disable_schema', $schema_enable);
233
 
234
  echo json_encode(array('status'=>'t'));
235
  wp_die();
@@ -338,8 +375,8 @@ class saswp_post_specific {
338
  $schema_ids = array();
339
 
340
  $modify_option = get_option('modify_schema_post_enable_'.esc_attr($post->ID));
341
- $schema_enable = get_post_meta($post->ID, 'saswp_enable_disable_schema', true);
342
- $custom_markp = get_post_meta($post->ID, 'saswp_custom_schema_field', true);
343
  $disable_btn.= '<div class="saswp-disable-btn-container">'
344
  . '<span class="saswp-disable-label">'.saswp_t_string( 'Disable custom schema on this page' ).'</span>'
345
  . '<label class="saswp-switch">'
@@ -390,8 +427,8 @@ class saswp_post_specific {
390
 
391
  }
392
 
393
- $modify_this = get_post_meta($post->ID, 'saswp_modify_this_schema_'.$schema->ID, true);
394
- $schema_type = get_post_meta($schema->ID, 'schema_type', true);
395
  $response = @saswp_get_fields_by_schema_type($schema->ID);
396
  $saswp_meta_fields = array_filter($response);
397
  if($modify_this){
@@ -400,12 +437,12 @@ class saswp_post_specific {
400
 
401
 
402
  if($schema_type == 'ItemList'){
403
- $item_type = '('.get_post_meta($schema->ID, 'saswp_itemlist_item_type', true).')';
404
  }
405
 
406
  if($schema_type == 'Review' && $modify_this){
407
 
408
- $item_reviewed = get_post_meta($post->ID, 'saswp_review_item_reviewed_'.$schema->ID, true);
409
  if(!$item_reviewed){
410
  $item_reviewed = 'Book';
411
  }
@@ -542,6 +579,26 @@ class saswp_post_specific {
542
 
543
  }
544
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
545
  /**
546
  * Function to save post specific metabox fields value
547
  * @param type $post_id
@@ -560,9 +617,9 @@ class saswp_post_specific {
560
  $custom_schema = wp_kses(wp_unslash($_POST['saswp_custom_schema_field']), $allowed_html);
561
 
562
  if(!empty($custom_schema)){
563
- update_post_meta( $post_id, 'saswp_custom_schema_field', $custom_schema );
564
  }else{
565
- delete_post_meta( $post_id, 'saswp_custom_schema_field');
566
  }
567
 
568
  $this->_common_view->saswp_save_common_view($post_id, $this->all_schema);
13
 
14
  class saswp_post_specific {
15
 
16
+ public $screen = array();
17
  public $all_schema = null;
18
  public $options_response = array();
19
  public $modify_schema_post_enable = false;
40
  * List of hooks used in this context
41
  */
42
  public function saswp_post_specific_hooks(){
43
+
44
+ $taxterm = array('category', 'post_tag', 'product_cat', 'product_tag');
45
+
46
+ foreach ($taxterm as $value) {
47
+ add_action( "{$value}_edit_form_fields", array( $this, 'saswp_taxonomy_edit_custom_meta_box' ),10,2 );
48
+ add_action( "created_{$value}", array($this, "saswp_save_term_fields" ));
49
+ add_action( "edited_{$value}", array($this, "saswp_save_term_fields" ));
50
+ }
51
 
52
  add_action( 'admin_init', array( $this, 'saswp_get_all_schema_list' ) );
53
 
54
  add_action( 'wp_ajax_saswp_get_item_reviewed_fields', array($this, 'saswp_get_item_reviewed_fields')) ;
55
 
56
+ add_action( 'add_meta_boxes', array( $this, 'saswp_post_specifc_add_meta_boxes' ),10,2 );
57
+
58
  add_action( 'save_post', array( $this, 'saswp_post_specific_save_fields' ) );
59
+
60
  add_action( 'wp_ajax_saswp_get_sub_business_ajax', array($this,'saswp_get_sub_business_ajax'));
61
 
62
  add_action( 'wp_ajax_saswp_get_schema_dynamic_fields_ajax', array($this,'saswp_get_schema_dynamic_fields_ajax'));
65
  add_action( 'wp_ajax_saswp_modify_schema_post_restore', array($this,'saswp_modify_schema_post_restore'));
66
 
67
  }
68
+
69
+ public function saswp_taxonomy_edit_custom_meta_box($term, $taxonomy){
70
+
71
+ wp_nonce_field( 'taxonomy_specific_nonce_data', 'taxonomy_specific_nonce' );
72
+
73
+ $post = null;
74
+
75
+ $post['ID'] = $term->term_id;
76
+ $post = (object)$post;
77
+
78
+ ?>
79
+ <tr class="saswp-modify-schema-on-taxonomy">
80
+ <th>Schema & Structured Data for WP & AMP</th>
81
+ <td><?php $this->saswp_post_meta_box_callback($post); ?></td>
82
+ </tr>
83
+ <?php
84
+
85
+ }
86
 
87
  /**
88
  * Generate the post specific metabox html with dynamic values on ajax call
103
  $post_id = intval($_POST['post_id']);
104
  $schema_id = intval($_POST['schema_id']);
105
 
106
+ saswp_delete_post_meta($post_id, 'saswp_modify_this_schema_'.$schema_id);
107
 
108
  $meta_field = saswp_get_fields_by_schema_type($schema_id);
109
 
110
  if($meta_field){
111
  foreach($meta_field as $field){
112
+ saswp_delete_post_meta($post_id, $field['id']);
113
  }
114
  }
115
  echo json_encode(array('status'=> 't', 'msg'=>saswp_t_string( 'Schema has been restored' )));
140
 
141
  endwhile;
142
 
143
+ }else{
144
+
145
+ if($item_reviewed != null){
146
+ $response = saswp_get_fields_by_schema_type($schema_id, null, $item_reviewed);
147
+ }else{
148
+ $response = saswp_get_fields_by_schema_type($schema_id);
149
+ }
150
+
151
  }
152
+
153
  return $response;
154
  }
155
 
167
  return;
168
  }
169
 
170
+ $post_id = intval($_GET['post_id']);
171
  $schema_id = intval($_GET['schema_id']);
172
  $modify_this = 1;
173
  $disabled = '';
174
  $modified = false;
175
 
176
+ saswp_update_post_meta($post_id, 'saswp_modify_this_schema_'.$schema_id, 1);
177
+ $schema_type = saswp_get_post_meta($schema_id, 'schema_type', true);
178
  $response = $this->saswp_get_schema_fields_on_ajax($post_id, $schema_id);
179
  $saswp_meta_fields = array_filter($response);
180
 
182
 
183
  if($schema_type == 'Review'){
184
 
185
+ $item_reviewed = saswp_get_post_meta($post->ID, 'saswp_review_item_reviewed_'.$schema_id, true);
186
  if(!$item_reviewed){
187
  $item_reviewed = 'Book';
188
  }
221
  $post_id = intval($_GET['post_id']);
222
  $modify_this = intval($_GET['modify_this']);
223
 
224
+ $schema_enable = saswp_get_post_meta($post_id, 'saswp_enable_disable_schema', true);
225
 
226
  if(isset($schema_enable[$schema_id]) && $schema_enable[$schema_id] == 0){
227
  $disabled = 'checked';
252
  $schema_id = sanitize_text_field($_POST['schema_id']);
253
  $status = sanitize_text_field($_POST['status']);
254
 
255
+ $schema_enable_status = saswp_get_post_meta($post_id, 'saswp_enable_disable_schema', true);
256
 
257
  if(is_array($schema_enable_status)){
258
 
260
 
261
  }else{
262
 
263
+ saswp_delete_post_meta($post_id, 'saswp_enable_disable_schema');
264
 
265
  }
266
 
267
  $schema_enable[$schema_id] = $status;
268
 
269
+ saswp_update_post_meta( $post_id, 'saswp_enable_disable_schema', $schema_enable);
270
 
271
  echo json_encode(array('status'=>'t'));
272
  wp_die();
375
  $schema_ids = array();
376
 
377
  $modify_option = get_option('modify_schema_post_enable_'.esc_attr($post->ID));
378
+ $schema_enable = saswp_get_post_meta($post->ID, 'saswp_enable_disable_schema', true);
379
+ $custom_markp = saswp_get_post_meta($post->ID, 'saswp_custom_schema_field', true);
380
  $disable_btn.= '<div class="saswp-disable-btn-container">'
381
  . '<span class="saswp-disable-label">'.saswp_t_string( 'Disable custom schema on this page' ).'</span>'
382
  . '<label class="saswp-switch">'
427
 
428
  }
429
 
430
+ $modify_this = saswp_get_post_meta($post->ID, 'saswp_modify_this_schema_'.$schema->ID, true);
431
+ $schema_type = saswp_get_post_meta($schema->ID, 'schema_type', true);
432
  $response = @saswp_get_fields_by_schema_type($schema->ID);
433
  $saswp_meta_fields = array_filter($response);
434
  if($modify_this){
437
 
438
 
439
  if($schema_type == 'ItemList'){
440
+ $item_type = '('.saswp_get_post_meta($schema->ID, 'saswp_itemlist_item_type', true).')';
441
  }
442
 
443
  if($schema_type == 'Review' && $modify_this){
444
 
445
+ $item_reviewed = saswp_get_post_meta($post->ID, 'saswp_review_item_reviewed_'.$schema->ID, true);
446
  if(!$item_reviewed){
447
  $item_reviewed = 'Book';
448
  }
579
 
580
  }
581
 
582
+
583
+ public function saswp_save_term_fields( $post_id ) {
584
+
585
+ if ( ! isset( $_POST['taxonomy_specific_nonce'] ) ) return $post_id;
586
+
587
+ if ( !wp_verify_nonce( $_POST['taxonomy_specific_nonce'], 'taxonomy_specific_nonce_data' ) ) return $post_id;
588
+
589
+ $allowed_html = saswp_expanded_allowed_tags();
590
+
591
+ $custom_schema = wp_kses(wp_unslash($_POST['saswp_custom_schema_field']), $allowed_html);
592
+
593
+ if(!empty($custom_schema)){
594
+ saswp_update_post_meta( $post_id, 'saswp_custom_schema_field', $custom_schema );
595
+ }else{
596
+ saswp_delete_post_meta( $post_id, 'saswp_custom_schema_field');
597
+ }
598
+
599
+ $this->_common_view->saswp_save_common_view($post_id, $this->all_schema);
600
+
601
+ }
602
  /**
603
  * Function to save post specific metabox fields value
604
  * @param type $post_id
617
  $custom_schema = wp_kses(wp_unslash($_POST['saswp_custom_schema_field']), $allowed_html);
618
 
619
  if(!empty($custom_schema)){
620
+ saswp_update_post_meta( $post_id, 'saswp_custom_schema_field', $custom_schema );
621
  }else{
622
+ saswp_delete_post_meta( $post_id, 'saswp_custom_schema_field');
623
  }
624
 
625
  $this->_common_view->saswp_save_common_view($post_id, $this->all_schema);
view/schema_type.php CHANGED
@@ -37,7 +37,13 @@ function saswp_add_all_meta_boxes() {
37
  'normal',
38
  'high'
39
  );
40
-
 
 
 
 
 
 
41
  add_meta_box( 'saswp_help_meta_box',
42
  saswp_t_string('Help' ),
43
  'saswp_help_meta_box_cb',
@@ -101,7 +107,7 @@ function saswp_schema_type_get_meta( $value ) {
101
 
102
  global $post;
103
 
104
- $field = get_post_meta( $post->ID, $value, true );
105
 
106
  if ( ! empty( $field ) ) {
107
  return is_array( $field ) ? stripslashes_deep( $field ) : stripslashes( wp_kses_decode_entities( $field ) );
@@ -151,22 +157,22 @@ function saswp_schema_type_meta_box_callback( $post) {
151
  if($post){
152
 
153
  $post_id = $post->ID;
154
- $schema_options = get_post_meta($post->ID, 'schema_options', true);
155
- $meta_list = get_post_meta($post->ID, 'saswp_meta_list_val', true);
156
- $fixed_text = get_post_meta($post->ID, 'saswp_fixed_text', true);
157
- $taxonomy_term = get_post_meta($post->ID, 'saswp_taxonomy_term', true);
158
- $fixed_image = get_post_meta($post->ID, 'saswp_fixed_image', true);
159
- $cus_field = get_post_meta($post->ID, 'saswp_custom_meta_field', true);
160
- $schema_type = get_post_meta($post->ID, 'schema_type', true);
161
- $append_reviews = get_post_meta($post->ID, 'saswp_enable_append_reviews', true);
162
- $event_type = get_post_meta($post->ID, 'saswp_event_type', true);
163
- $speakable = get_post_meta($post->ID, 'saswp_enable_speakable_schema', true);
164
- $enable_videoobject= get_post_meta($post->ID, 'saswp_enable_videoobject', true);
165
- $item_list_enable = get_post_meta($post->ID, 'saswp_enable_itemlist_schema', true);
166
- $item_list_tags = get_post_meta($post->ID, 'saswp_item_list_tags', true);
167
- $item_list_custom = get_post_meta($post->ID, 'saswp_item_list_custom', true);
168
- $business_type = get_post_meta($post->ID, 'saswp_business_type', true);
169
- $business_name = get_post_meta($post->ID, 'saswp_business_name', true);
170
 
171
  if($schema_type != 'local_business'){
172
 
@@ -551,7 +557,7 @@ function saswp_schema_type_meta_box_callback( $post) {
551
  <select data-id="<?php echo esc_attr($post_id); ?>" name="saswp_itemlist_item_type" class="saswp-itemlist-item-type-list">
552
  <?php
553
 
554
- $item = get_post_meta($post_id, 'saswp_itemlist_item_type', true);
555
 
556
  foreach ($item_list_item as $key => $value) {
557
  $sel = '';
@@ -574,7 +580,7 @@ function saswp_schema_type_meta_box_callback( $post) {
574
  <select data-id="<?php echo esc_attr($post_id); ?>" name="saswp_review_item_reviewed_<?php echo $post_id; ?>" class="saswp-item-reivewed-list">
575
  <?php
576
 
577
- $item = get_post_meta($post_id, 'saswp_review_item_reviewed_'.$post_id, true);
578
  foreach ($item_reviewed as $key => $value) {
579
  $sel = '';
580
  if($item == $key){
@@ -667,13 +673,13 @@ function saswp_schema_type_meta_box_callback( $post) {
667
  <?php
668
 
669
  $attached_rv_json = '';
670
- $attached_rv = get_post_meta($post_id, 'saswp_attahced_reviews', true);
671
  if($attached_rv){
672
  $attached_rv_json = json_encode($attached_rv);
673
  }
674
 
675
  $attached_col_json = '';
676
- $attached_col = get_post_meta($post_id, 'saswp_attached_collection', true);
677
  if($attached_col){
678
  $attached_col_json = json_encode($attached_col);
679
  }
@@ -887,11 +893,11 @@ function saswp_schema_type_meta_box_callback( $post) {
887
  $review_fields = array();
888
  $service = new saswp_output_service();
889
 
890
- $schema_type = get_post_meta($post->ID, 'schema_type', true);
891
 
892
  if($schema_type == 'Review'){
893
 
894
- $item_reviewed = get_post_meta($post->ID, 'saswp_review_item_reviewed_'.$post->ID, true);
895
  $schema_type = $item_reviewed;
896
 
897
  $review_fields['saswp_review_name'] = 'Review Name';
@@ -1084,14 +1090,14 @@ function saswp_schema_type_meta_box_callback( $post) {
1084
  $output = '';
1085
  $common_obj = new saswp_view_common_class();
1086
 
1087
- $schema_type = get_post_meta($post_id, 'schema_type', true);
1088
 
1089
  $schema_fields = saswp_get_fields_by_schema_type($post_id, null, $schema_type, 'manual');
1090
  $output = $common_obj->saswp_saswp_post_specific($schema_type, $schema_fields, $post_id, $post_id, null, null, 1);
1091
 
1092
  if($schema_type == 'Review'){
1093
 
1094
- $item_reviewed = get_post_meta($post_id, 'saswp_review_item_reviewed_'.$post_id, true);
1095
  if(!$item_reviewed){
1096
  $item_reviewed = 'Book';
1097
  }
@@ -1207,71 +1213,77 @@ function saswp_schema_type_add_meta_box_save( $post_id ) {
1207
  if ( ! isset( $_POST['saswp_schema_type_nonce'] ) || ! wp_verify_nonce( $_POST['saswp_schema_type_nonce'], 'saswp_schema_type_nonce' ) ) return;
1208
  if ( ! current_user_can( 'edit_post', $post_id ) ) return;
1209
 
1210
- update_post_meta( $post_id, 'schema_type', sanitize_text_field( $_POST['schema_type'] ) );
1211
-
 
 
 
 
 
 
1212
  if(isset($_POST['saswp_business_type'])){
1213
- update_post_meta( $post_id, 'saswp_business_type', sanitize_text_field( $_POST['saswp_business_type'] ) );
1214
  }else{
1215
- delete_post_meta( $post_id, 'saswp_business_type');
1216
  }
1217
 
1218
  if(isset($_POST['saswp_event_type'])){
1219
- update_post_meta( $post_id, 'saswp_event_type', sanitize_text_field( $_POST['saswp_event_type'] ) );
1220
  }else{
1221
- delete_post_meta( $post_id, 'saswp_event_type');
1222
  }
1223
 
1224
  if(isset($_POST['saswp_business_name'])){
1225
- update_post_meta( $post_id, 'saswp_business_name', sanitize_text_field( $_POST['saswp_business_name'] ) );
1226
  }else{
1227
- delete_post_meta( $post_id, 'saswp_business_name');
1228
  }
1229
  if(isset($_POST['saswp_enable_speakable_schema'])){
1230
- update_post_meta( $post_id, 'saswp_enable_speakable_schema', intval($_POST['saswp_enable_speakable_schema']) );
1231
  }else{
1232
- delete_post_meta( $post_id, 'saswp_enable_speakable_schema');
1233
  }
1234
  if(isset($_POST['saswp_enable_videoobject'])){
1235
- update_post_meta( $post_id, 'saswp_enable_videoobject', intval($_POST['saswp_enable_videoobject']) );
1236
  }else{
1237
- delete_post_meta( $post_id, 'saswp_enable_videoobject');
1238
  }
1239
 
1240
  if(isset($_POST['saswp_enable_append_reviews'])){
1241
- update_post_meta( $post_id, 'saswp_enable_append_reviews', intval($_POST['saswp_enable_append_reviews']) );
1242
  }else{
1243
- delete_post_meta( $post_id, 'saswp_enable_append_reviews');
1244
  }
1245
 
1246
  if(isset($_POST['saswp_enable_itemlist_schema'])){
1247
- update_post_meta( $post_id, 'saswp_enable_itemlist_schema', intval($_POST['saswp_enable_itemlist_schema']) );
1248
  }else{
1249
- delete_post_meta( $post_id, 'saswp_enable_itemlist_schema');
1250
  }
1251
 
1252
  if(isset($_POST['saswp_item_list_tags'])){
1253
- update_post_meta( $post_id, 'saswp_item_list_tags', sanitize_text_field($_POST['saswp_item_list_tags']) );
1254
  }else{
1255
- delete_post_meta( $post_id, 'saswp_item_list_tags');
1256
  }
1257
  if(isset($_POST['saswp_item_list_custom'])){
1258
- update_post_meta( $post_id, 'saswp_item_list_custom', sanitize_text_field($_POST['saswp_item_list_custom']) );
1259
  }else{
1260
- delete_post_meta( $post_id, 'saswp_item_list_custom');
1261
  }
1262
  if(isset($_POST['saswp_review_item_reviewed_'.$post_id])){
1263
- update_post_meta( $post_id, 'saswp_review_item_reviewed_'.$post_id, sanitize_text_field($_POST['saswp_review_item_reviewed_'.$post_id]) );
1264
  }else{
1265
- delete_post_meta( $post_id, 'saswp_review_item_reviewed_'.$post_id);
1266
  }
1267
  if(isset($_POST['saswp_itemlist_item_type'])){
1268
- update_post_meta( $post_id, 'saswp_itemlist_item_type', sanitize_text_field($_POST['saswp_itemlist_item_type']) );
1269
  }else{
1270
- delete_post_meta( $post_id, 'saswp_itemlist_item_type');
1271
  }
1272
 
1273
- update_post_meta( $post_id, 'saswp_attahced_reviews', json_decode(wp_unslash($_POST['saswp_attahced_reviews'])) );
1274
- update_post_meta( $post_id, 'saswp_attached_collection', json_decode(wp_unslash($_POST['saswp_attached_collection'])) );
1275
 
1276
  $common_obj = new saswp_view_common_class();
1277
 
37
  'normal',
38
  'high'
39
  );
40
+ add_meta_box( 'saswp_location_meta_box',
41
+ saswp_t_string('Front End' ),
42
+ 'saswp_location_meta_box_cb',
43
+ 'saswp',
44
+ 'side', 'low'
45
+ );
46
+
47
  add_meta_box( 'saswp_help_meta_box',
48
  saswp_t_string('Help' ),
49
  'saswp_help_meta_box_cb',
107
 
108
  global $post;
109
 
110
+ $field = saswp_get_post_meta( $post->ID, $value, true );
111
 
112
  if ( ! empty( $field ) ) {
113
  return is_array( $field ) ? stripslashes_deep( $field ) : stripslashes( wp_kses_decode_entities( $field ) );
157
  if($post){
158
 
159
  $post_id = $post->ID;
160
+ $schema_options = saswp_get_post_meta($post->ID, 'schema_options', true);
161
+ $meta_list = saswp_get_post_meta($post->ID, 'saswp_meta_list_val', true);
162
+ $fixed_text = saswp_get_post_meta($post->ID, 'saswp_fixed_text', true);
163
+ $taxonomy_term = saswp_get_post_meta($post->ID, 'saswp_taxonomy_term', true);
164
+ $fixed_image = saswp_get_post_meta($post->ID, 'saswp_fixed_image', true);
165
+ $cus_field = saswp_get_post_meta($post->ID, 'saswp_custom_meta_field', true);
166
+ $schema_type = saswp_get_post_meta($post->ID, 'schema_type', true);
167
+ $append_reviews = saswp_get_post_meta($post->ID, 'saswp_enable_append_reviews', true);
168
+ $event_type = saswp_get_post_meta($post->ID, 'saswp_event_type', true);
169
+ $speakable = saswp_get_post_meta($post->ID, 'saswp_enable_speakable_schema', true);
170
+ $enable_videoobject= saswp_get_post_meta($post->ID, 'saswp_enable_videoobject', true);
171
+ $item_list_enable = saswp_get_post_meta($post->ID, 'saswp_enable_itemlist_schema', true);
172
+ $item_list_tags = saswp_get_post_meta($post->ID, 'saswp_item_list_tags', true);
173
+ $item_list_custom = saswp_get_post_meta($post->ID, 'saswp_item_list_custom', true);
174
+ $business_type = saswp_get_post_meta($post->ID, 'saswp_business_type', true);
175
+ $business_name = saswp_get_post_meta($post->ID, 'saswp_business_name', true);
176
 
177
  if($schema_type != 'local_business'){
178
 
557
  <select data-id="<?php echo esc_attr($post_id); ?>" name="saswp_itemlist_item_type" class="saswp-itemlist-item-type-list">
558
  <?php
559
 
560
+ $item = saswp_get_post_meta($post_id, 'saswp_itemlist_item_type', true);
561
 
562
  foreach ($item_list_item as $key => $value) {
563
  $sel = '';
580
  <select data-id="<?php echo esc_attr($post_id); ?>" name="saswp_review_item_reviewed_<?php echo $post_id; ?>" class="saswp-item-reivewed-list">
581
  <?php
582
 
583
+ $item = saswp_get_post_meta($post_id, 'saswp_review_item_reviewed_'.$post_id, true);
584
  foreach ($item_reviewed as $key => $value) {
585
  $sel = '';
586
  if($item == $key){
673
  <?php
674
 
675
  $attached_rv_json = '';
676
+ $attached_rv = saswp_get_post_meta($post_id, 'saswp_attahced_reviews', true);
677
  if($attached_rv){
678
  $attached_rv_json = json_encode($attached_rv);
679
  }
680
 
681
  $attached_col_json = '';
682
+ $attached_col = saswp_get_post_meta($post_id, 'saswp_attached_collection', true);
683
  if($attached_col){
684
  $attached_col_json = json_encode($attached_col);
685
  }
893
  $review_fields = array();
894
  $service = new saswp_output_service();
895
 
896
+ $schema_type = saswp_get_post_meta($post->ID, 'schema_type', true);
897
 
898
  if($schema_type == 'Review'){
899
 
900
+ $item_reviewed = saswp_get_post_meta($post->ID, 'saswp_review_item_reviewed_'.$post->ID, true);
901
  $schema_type = $item_reviewed;
902
 
903
  $review_fields['saswp_review_name'] = 'Review Name';
1090
  $output = '';
1091
  $common_obj = new saswp_view_common_class();
1092
 
1093
+ $schema_type = saswp_get_post_meta($post_id, 'schema_type', true);
1094
 
1095
  $schema_fields = saswp_get_fields_by_schema_type($post_id, null, $schema_type, 'manual');
1096
  $output = $common_obj->saswp_saswp_post_specific($schema_type, $schema_fields, $post_id, $post_id, null, null, 1);
1097
 
1098
  if($schema_type == 'Review'){
1099
 
1100
+ $item_reviewed = saswp_get_post_meta($post_id, 'saswp_review_item_reviewed_'.$post_id, true);
1101
  if(!$item_reviewed){
1102
  $item_reviewed = 'Book';
1103
  }
1213
  if ( ! isset( $_POST['saswp_schema_type_nonce'] ) || ! wp_verify_nonce( $_POST['saswp_schema_type_nonce'], 'saswp_schema_type_nonce' ) ) return;
1214
  if ( ! current_user_can( 'edit_post', $post_id ) ) return;
1215
 
1216
+ saswp_update_post_meta( $post_id, 'schema_type', sanitize_text_field( $_POST['schema_type'] ) );
1217
+
1218
+ if(isset($_POST['saswp_loc_display_on_front'])){
1219
+ saswp_update_post_meta( $post_id, 'saswp_loc_display_on_front', intval( $_POST['saswp_loc_display_on_front'] ) );
1220
+ }else{
1221
+ saswp_delete_post_meta( $post_id, 'saswp_loc_display_on_front');
1222
+ }
1223
+
1224
  if(isset($_POST['saswp_business_type'])){
1225
+ saswp_update_post_meta( $post_id, 'saswp_business_type', sanitize_text_field( $_POST['saswp_business_type'] ) );
1226
  }else{
1227
+ saswp_delete_post_meta( $post_id, 'saswp_business_type');
1228
  }
1229
 
1230
  if(isset($_POST['saswp_event_type'])){
1231
+ saswp_update_post_meta( $post_id, 'saswp_event_type', sanitize_text_field( $_POST['saswp_event_type'] ) );
1232
  }else{
1233
+ saswp_delete_post_meta( $post_id, 'saswp_event_type');
1234
  }
1235
 
1236
  if(isset($_POST['saswp_business_name'])){
1237
+ saswp_update_post_meta( $post_id, 'saswp_business_name', sanitize_text_field( $_POST['saswp_business_name'] ) );
1238
  }else{
1239
+ saswp_delete_post_meta( $post_id, 'saswp_business_name');
1240
  }
1241
  if(isset($_POST['saswp_enable_speakable_schema'])){
1242
+ saswp_update_post_meta( $post_id, 'saswp_enable_speakable_schema', intval($_POST['saswp_enable_speakable_schema']) );
1243
  }else{
1244
+ saswp_delete_post_meta( $post_id, 'saswp_enable_speakable_schema');
1245
  }
1246
  if(isset($_POST['saswp_enable_videoobject'])){
1247
+ saswp_update_post_meta( $post_id, 'saswp_enable_videoobject', intval($_POST['saswp_enable_videoobject']) );
1248
  }else{
1249
+ saswp_delete_post_meta( $post_id, 'saswp_enable_videoobject');
1250
  }
1251
 
1252
  if(isset($_POST['saswp_enable_append_reviews'])){
1253
+ saswp_update_post_meta( $post_id, 'saswp_enable_append_reviews', intval($_POST['saswp_enable_append_reviews']) );
1254
  }else{
1255
+ saswp_delete_post_meta( $post_id, 'saswp_enable_append_reviews');
1256
  }
1257
 
1258
  if(isset($_POST['saswp_enable_itemlist_schema'])){
1259
+ saswp_update_post_meta( $post_id, 'saswp_enable_itemlist_schema', intval($_POST['saswp_enable_itemlist_schema']) );
1260
  }else{
1261
+ saswp_delete_post_meta( $post_id, 'saswp_enable_itemlist_schema');
1262
  }
1263
 
1264
  if(isset($_POST['saswp_item_list_tags'])){
1265
+ saswp_update_post_meta( $post_id, 'saswp_item_list_tags', sanitize_text_field($_POST['saswp_item_list_tags']) );
1266
  }else{
1267
+ saswp_delete_post_meta( $post_id, 'saswp_item_list_tags');
1268
  }
1269
  if(isset($_POST['saswp_item_list_custom'])){
1270
+ saswp_update_post_meta( $post_id, 'saswp_item_list_custom', sanitize_text_field($_POST['saswp_item_list_custom']) );
1271
  }else{
1272
+ saswp_delete_post_meta( $post_id, 'saswp_item_list_custom');
1273
  }
1274
  if(isset($_POST['saswp_review_item_reviewed_'.$post_id])){
1275
+ saswp_update_post_meta( $post_id, 'saswp_review_item_reviewed_'.$post_id, sanitize_text_field($_POST['saswp_review_item_reviewed_'.$post_id]) );
1276
  }else{
1277
+ saswp_delete_post_meta( $post_id, 'saswp_review_item_reviewed_'.$post_id);
1278
  }
1279
  if(isset($_POST['saswp_itemlist_item_type'])){
1280
+ saswp_update_post_meta( $post_id, 'saswp_itemlist_item_type', sanitize_text_field($_POST['saswp_itemlist_item_type']) );
1281
  }else{
1282
+ saswp_delete_post_meta( $post_id, 'saswp_itemlist_item_type');
1283
  }
1284
 
1285
+ saswp_update_post_meta( $post_id, 'saswp_attahced_reviews', json_decode(wp_unslash($_POST['saswp_attahced_reviews'])) );
1286
+ saswp_update_post_meta( $post_id, 'saswp_attached_collection', json_decode(wp_unslash($_POST['saswp_attached_collection'])) );
1287
 
1288
  $common_obj = new saswp_view_common_class();
1289
 
view/taxonomy.php DELETED
@@ -1,98 +0,0 @@
1
- <?php
2
- // Exit if accessed directly.
3
- if ( ! defined( 'ABSPATH' ) ) exit;
4
-
5
- class SASWP_View_Taxonomy
6
- {
7
- /**
8
- * The unique instance of the plugin.
9
- *
10
- * @var SASWP_View_Taxonomy
11
- */
12
- private static $instance;
13
- private $_taxonomy = array(
14
- 'category',
15
- 'post_tag',
16
- 'product_cat',
17
- 'product_tag'
18
- );
19
-
20
- /**
21
- * Gets an instance of our plugin.
22
- *
23
- * @return SASWP_View_Taxonomy
24
- */
25
- public static function get_instance()
26
- {
27
- if (null === self::$instance) {
28
- self::$instance = new self();
29
- }
30
-
31
- return self::$instance;
32
- }
33
-
34
- /**
35
- * Constructor.
36
- */
37
- private function __construct()
38
- {
39
-
40
- if(!empty($this->_taxonomy)){
41
-
42
- foreach ($this->_taxonomy as $value) {
43
- add_action( "{$value}_edit_form_fields", array($this, "saswp_edit_term_fields"), 10, 2);
44
- add_action( "created_{$value}", array($this, "saswp_save_term_fields" ));
45
- add_action( "edited_{$value}", array($this, "saswp_save_term_fields" ));
46
- }
47
-
48
- }
49
-
50
- }
51
-
52
- public function saswp_edit_term_fields( $term, $taxonomy ) {
53
-
54
- wp_nonce_field( 'taxonomy_specific_nonce_data', 'taxonomy_specific_nonce' );
55
-
56
- $value = get_term_meta( $term->term_id, 'saswp_custom_schema_field', true );
57
-
58
- ?>
59
-
60
- <tr class="form-field">
61
- <th>
62
- <label for="saswp_custom_schema_field"><?php echo saswp_t_string('Custom Schema') ?></label>
63
- </th>
64
- <td>
65
- <textarea rows="4" cols="50" name="saswp_custom_schema_field" id="saswp_custom_schema_field" placeholder="JSON-LD" type="text" ><?php echo esc_html( $value ); ?></textarea>
66
- <p class="description"><?php echo saswp_t_string('Please provide a valid JSON-LD') ?></p>
67
- </td>
68
- </tr>
69
-
70
- <?php
71
-
72
- }
73
-
74
-
75
- public function saswp_save_term_fields( $term_id ) {
76
-
77
- if ( ! isset( $_POST['taxonomy_specific_nonce'] ) ) return $term_id;
78
-
79
- if ( !wp_verify_nonce( $_POST['taxonomy_specific_nonce'], 'taxonomy_specific_nonce_data' ) ) return $term_id;
80
-
81
- if(isset($_POST['saswp_custom_schema_field'])){
82
-
83
- $allowed_html = saswp_expanded_allowed_tags();
84
-
85
- $custom_schema = wp_kses(wp_unslash($_POST['saswp_custom_schema_field']), $allowed_html);
86
-
87
- update_term_meta( $term_id, 'saswp_custom_schema_field', $custom_schema );
88
-
89
- }else{
90
-
91
- delete_term_meta( $term_id, 'saswp_custom_schema_field');
92
-
93
- }
94
-
95
- }
96
-
97
- }
98
- SASWP_View_Taxonomy::get_instance();