Schema & Structured Data for WP & AMP - Version 1.9.83

Version Description

(10 Aug 2021) =

  • Fixed: when "Add Schema Markup in footer" checked breadcurm does not work properly #1477
  • Fixed: Item list heading are not working if the content generating from shortcode #1494
  • Fixed: Compatibility issue with SmartCrawl plugin #1490
  • Fixed: Error in Article schema #1486
  • Fixed: getting image warning after placing the image also (image: 91 (The value provided for image must be a valid URL.)) #1470
  • Fixed: License Key {Fatal Error}- Reviews for Schema #1473
  • Fixed: css issue of star ratings in comment form with Neptune by Osetin Theme. #1476
  • Added: Auto Listings Plugin integration #1493
  • Fixed: conflict with popup maker when schema enabled #1495
  • Fixed: Article category("Thing" is not a known valid target type for the publisher property) #1474
Download this release

Release Info

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

Code changes from version 1.9.82.2 to 1.9.83

admin_section/add-schema/add_new.php CHANGED
@@ -422,14 +422,14 @@ $saswp_add_data_type_config = 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,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
- saswp_update_post_meta(
476
  $post_id,
477
  'data_group_array',
478
  $post_data_group_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
 
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
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
- 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,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 = saswp_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 = 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,7 +373,7 @@ if ( ! defined('ABSPATH') ) exit;
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,7 +504,7 @@ if ( ! defined('ABSPATH') ) exit;
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,13 +527,13 @@ if ( ! defined('ABSPATH') ) exit;
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,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 = saswp_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
- saswp_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
- saswp_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
- 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,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
- saswp_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
- saswp_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
- saswp_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 = 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,7 +1512,7 @@ if ( ! defined('ABSPATH') ) exit;
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,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 ( saswp_get_post_meta(saswp_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 ( saswp_get_post_meta(saswp_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', saswp_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 = 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,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 = saswp_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 = saswp_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 = 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,7 +2330,7 @@ if ( ! defined('ABSPATH') ) exit;
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;
@@ -3030,6 +3030,7 @@ function saswp_get_field_note($pname){
3030
  $notes = array(
3031
  'wpml' => saswp_t_string('Requires').' <a target="_blank" href="https://wpml.org">WPML</a>',
3032
  'polylang' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/polylang/">Polylang</a>',
 
3033
  'wpdiscuz' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/wpdiscuz/">Comments – wpDiscuz</a>',
3034
  'rannarecipe' => saswp_t_string('Requires').' <a target="_blank" href="https://themeforest.net/item/ranna-food-recipe-wordpress-theme/25157340">Ranna - Food & Recipe</a>',
3035
  'easy_recipe' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/easyrecipe/">EasyRecipe</a>',
@@ -3698,9 +3699,9 @@ function saswp_insert_schema_type($title){
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,11 +3721,11 @@ function saswp_get_posts_by_arg($arg){
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];
@@ -4284,61 +4285,6 @@ function saswp_prepend_schema_org( $short_str ){
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;
@@ -4360,4 +4306,39 @@ function saswp_get_page_range($current, $max, $total_pages = 5) {
4360
  ];
4361
  }
4362
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4363
  }
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
  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
  $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
  );
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
 
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
  }
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
  $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
  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
  $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
  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
  $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
  );
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
  );
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
  $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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
  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
 
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;
3030
  $notes = array(
3031
  'wpml' => saswp_t_string('Requires').' <a target="_blank" href="https://wpml.org">WPML</a>',
3032
  'polylang' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/polylang/">Polylang</a>',
3033
+ 'autolistings' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/auto-listings">Auto Listings</a>',
3034
  'wpdiscuz' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/wpdiscuz/">Comments – wpDiscuz</a>',
3035
  'rannarecipe' => saswp_t_string('Requires').' <a target="_blank" href="https://themeforest.net/item/ranna-food-recipe-wordpress-theme/25157340">Ranna - Food & Recipe</a>',
3036
  'easy_recipe' => saswp_t_string('Requires').' <a target="_blank" href="https://wordpress.org/plugins/easyrecipe/">EasyRecipe</a>',
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
  $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];
4285
  return $response;
4286
  }
4287
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4288
  function saswp_get_page_range($current, $max, $total_pages = 5) {
4289
 
4290
  $desired_pages = $max < $total_pages ? $max : $total_pages;
4306
  ];
4307
  }
4308
 
4309
+ }
4310
+ function saswp_get_post_meta( $post_id, $key=null, $single = null ){
4311
+
4312
+ if( (isset($_GET['tag_ID'] ) && is_admin()) || (is_tag() || is_tax() || is_category()) ){
4313
+ return get_term_meta($post_id, $key, $single);
4314
+ }else{
4315
+ return get_post_meta($post_id, $key, $single);
4316
+ }
4317
+ }
4318
+ function saswp_update_post_meta( $post_id, $meta_key, $meta_value ){
4319
+
4320
+ if((!empty($_POST['tag_ID']) || !empty($_GET['tag_ID'])) && is_admin()){
4321
+ return update_term_meta($post_id, $meta_key, $meta_value);
4322
+ }else{
4323
+ return update_post_meta($post_id, $meta_key, $meta_value);
4324
+ }
4325
+ }
4326
+
4327
+ function saswp_delete_post_meta( $post_id, $meta_key, $meta_value = null ){
4328
+
4329
+ if(!empty($_POST['tag_ID']) && is_admin()){
4330
+ return delete_term_meta( $post_id, $meta_key, $meta_value );
4331
+ }else{
4332
+ return delete_post_meta( $post_id, $meta_key, $meta_value );
4333
+ }
4334
+ }
4335
+ function saswp_get_the_ID(){
4336
+
4337
+ $id = get_the_ID();
4338
+
4339
+ if( is_tag() || is_tax() || is_category() ){
4340
+ $id = get_queried_object_id();
4341
+ }
4342
+
4343
+ return $id;
4344
  }
admin_section/css/saswp-frontend-extra.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group {
2
+ position: absolute !important;
3
+ }
admin_section/css/saswp-frontend-extra.min.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .jq-ry-container > .jq-ry-group-wrapper > .jq-ry-group {
2
+ position: absolute !important;
3
+ }
admin_section/images/cpc.png ADDED
Binary file
admin_section/js/main-script.js CHANGED
@@ -1214,6 +1214,15 @@ jQuery(document).ready(function($){
1214
  }
1215
  break;
1216
 
 
 
 
 
 
 
 
 
 
1217
  case 'saswp-wpml-checkbox':
1218
  saswp_compatibliy_notes(current, id);
1219
  if ($(this).is(':checked')) {
@@ -2369,7 +2378,7 @@ jQuery(document).ready(function($){
2369
  current.addClass('updating-message');
2370
 
2371
  $.get(ajaxurl,
2372
- { action:"saswp_modify_schema_post_enable", schema_id:schema_id, post_id: saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
2373
  function(response){
2374
 
2375
  $(".saswp-post-specific-wrapper[data-id="+schema_id+"] .saswp-post-specific-setting").after(response);
@@ -2397,7 +2406,7 @@ jQuery(document).ready(function($){
2397
  current.addClass('updating-message');
2398
 
2399
  $.post(ajaxurl,
2400
- { action:"saswp_modify_schema_post_restore", schema_id:schema_id, post_id: saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
2401
  function(response){
2402
  current.removeClass('updating-message');
2403
 
1214
  }
1215
  break;
1216
 
1217
+ case 'saswp-autolistings-checkbox':
1218
+ saswp_compatibliy_notes(current, id);
1219
+ if ($(this).is(':checked')) {
1220
+ $("#saswp-autolistings").val(1);
1221
+ }else{
1222
+ $("#saswp-autolistings").val(0);
1223
+ }
1224
+ break;
1225
+
1226
  case 'saswp-wpml-checkbox':
1227
  saswp_compatibliy_notes(current, id);
1228
  if ($(this).is(':checked')) {
2378
  current.addClass('updating-message');
2379
 
2380
  $.get(ajaxurl,
2381
+ { action:"saswp_modify_schema_post_enable",tag_ID:saswp_localize_data.tag_ID, schema_id:schema_id, post_id: saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
2382
  function(response){
2383
 
2384
  $(".saswp-post-specific-wrapper[data-id="+schema_id+"] .saswp-post-specific-setting").after(response);
2406
  current.addClass('updating-message');
2407
 
2408
  $.post(ajaxurl,
2409
+ { action:"saswp_modify_schema_post_restore", tag_ID:saswp_localize_data.tag_ID, schema_id:schema_id, post_id: saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
2410
  function(response){
2411
  current.removeClass('updating-message');
2412
 
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("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)});
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-autolistings-checkbox":saswp_compatibliy_notes(e,a),s(this).is(":checked")?s("#saswp-autolistings").val(1):s("#saswp-autolistings").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",tag_ID:saswp_localize_data.tag_ID,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",tag_ID:saswp_localize_data.tag_ID,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
- 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
  }
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
  }
admin_section/settings.php CHANGED
@@ -415,6 +415,37 @@ function saswp_premium_features_callback(){ ?>
415
 
416
  <ul class="saswp-features-blocks">
417
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
  <li>
419
 
420
  <?php
@@ -1806,6 +1837,11 @@ echo '</ul>';
1806
 
1807
  $add_on[] = 'Polylang';
1808
 
 
 
 
 
 
1809
  }
1810
 
1811
  if(is_plugin_active('wpml-schema-compatibility/wpml-schema-compatibility.php')){
@@ -1926,6 +1962,13 @@ function saswp_get_license_section_html($on, $license_key, $license_status, $lic
1926
  $response.= '<strong>'.saswp_t_string(''.$on.' Schema Compatibility').'</strong>';
1927
  $response.= '</div>';
1928
 
 
 
 
 
 
 
 
1929
  }
1930
  if($label == true && $on == 'WPML'){
1931
 
@@ -2378,7 +2421,20 @@ function saswp_compatibility_page_callback(){
2378
  'id' => 'saswp-polylang',
2379
  'name' => 'sd_data[saswp-polylang]',
2380
  )
2381
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
2382
 
2383
  $wpml = array(
2384
  'label' => 'WPML',
@@ -3808,6 +3864,10 @@ function saswp_compatibility_page_callback(){
3808
 
3809
  $polylang['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/polylang-compatibility-for-saswp/">Polylang Compatibility For SASWP Addon</a>';
3810
  }
 
 
 
 
3811
  if(!is_plugin_active('wpml-schema-compatibility/wpml-schema-compatibility.php')){
3812
 
3813
  $wpml['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/wpml-schema-compatibility">WPML Schema Compatibility Addon</a>';
@@ -3893,6 +3953,7 @@ function saswp_compatibility_page_callback(){
3893
  $sabaidiscuss,
3894
  $yoast,
3895
  $polylang,
 
3896
  $wpml,
3897
  $metatagmanager,
3898
  $slimseo,
@@ -4209,7 +4270,7 @@ function saswp_enqueue_style_js( $hook ) {
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']);
@@ -4234,7 +4295,8 @@ function saswp_enqueue_style_js( $hook ) {
4234
  'trans_reviews' => saswp_t_string(saswp_label_text('translation-reviews')),
4235
  'trans_self' => saswp_t_string(saswp_label_text('translation-self')),
4236
  'translable_txt' => $translable_txt,
4237
- 'is_rtl' => is_rtl()
 
4238
  );
4239
 
4240
  $data = apply_filters('saswp_localize_filter',$data,'saswp_localize_data');
@@ -4299,13 +4361,16 @@ function saswp_enqueue_saswp_select2_js( $hook ) {
4299
 
4300
  // Dequeue mediclinic theme's select2 on schema dashboard to remove conflict.
4301
  wp_dequeue_script( 'mkdf-select2-script' );
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);
4311
  wp_enqueue_script('select2-extended-script', SASWP_PLUGIN_URL. 'admin_section/js/select2-extended.min.js', array( 'jquery' ), SASWP_VERSION, true);
415
 
416
  <ul class="saswp-features-blocks">
417
 
418
+ <li>
419
+
420
+ <?php
421
+
422
+ $cooked_active_text = '';
423
+
424
+ if(is_plugin_active('classifieds-plugin-compatibility/classifieds-plugin-compatibility.php')){
425
+ $cooked_active_text = '<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span style="color:green;">'.saswp_t_string('Active').'</span></label>';
426
+ }else{
427
+ $cooked_active_text .='<label class="saswp-sts-txt">'.saswp_t_string('Status').' :<span>'.saswp_t_string('Inactive').'</span></label>';
428
+ $cooked_active_text .='<a target="_blank" href="http://structured-data-for-wp.com/extensions/"><span class="saswp-d-btn">'.saswp_t_string('Download').'</span></a>';
429
+ }
430
+
431
+ ?>
432
+
433
+ <div class="saswp-features-ele">
434
+ <div class="saswp-ele-ic" style="background: #9fa2f5;">
435
+ <img src="<?php echo SASWP_PLUGIN_URL; ?>/admin_section/images/cpc.png">
436
+ </div>
437
+ <div class="saswp-ele-tlt">
438
+ <h3><?php echo saswp_t_string('Classifieds Plugin Compatibility') ?></h3>
439
+ <p><?php echo saswp_t_string('Classifieds Plugin Compatibility generated schema markup automatically for classified theme and plugin with just few steps click.') ?></p>
440
+ </div>
441
+ </div>
442
+ <div class="saswp-sts-btn">
443
+
444
+ <?php echo $cooked_active_text; ?>
445
+
446
+ </div>
447
+ </li>
448
+
449
  <li>
450
 
451
  <?php
1837
 
1838
  $add_on[] = 'Polylang';
1839
 
1840
+ }
1841
+ if(is_plugin_active('classifieds-plugin-compatibility/classifieds-plugin-compatibility.php')){
1842
+
1843
+ $add_on[] = 'CPC';
1844
+
1845
  }
1846
 
1847
  if(is_plugin_active('wpml-schema-compatibility/wpml-schema-compatibility.php')){
1962
  $response.= '<strong>'.saswp_t_string(''.$on.' Schema Compatibility').'</strong>';
1963
  $response.= '</div>';
1964
 
1965
+ }
1966
+ if($label == true && $on == 'CPC'){
1967
+
1968
+ $response.= '<div class="saswp-license-label">';
1969
+ $response.= '<strong>'.saswp_t_string('Classifieds Plugin Compatibility').'</strong>';
1970
+ $response.= '</div>';
1971
+
1972
  }
1973
  if($label == true && $on == 'WPML'){
1974
 
2421
  'id' => 'saswp-polylang',
2422
  'name' => 'sd_data[saswp-polylang]',
2423
  )
2424
+ );
2425
+
2426
+ $autolistings = array(
2427
+ 'label' => 'Auto Listings',
2428
+ 'id' => 'saswp-autolistings-checkbox',
2429
+ 'name' => 'saswp-autolistings-checkbox',
2430
+ 'type' => 'checkbox',
2431
+ 'class' => 'checkbox saswp-checkbox',
2432
+ 'note' => saswp_get_field_note('autolistings'),
2433
+ 'hidden' => array(
2434
+ 'id' => 'saswp-autolistings',
2435
+ 'name' => 'sd_data[saswp-autolistings]',
2436
+ )
2437
+ );
2438
 
2439
  $wpml = array(
2440
  'label' => 'WPML',
3864
 
3865
  $polylang['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/polylang-compatibility-for-saswp/">Polylang Compatibility For SASWP Addon</a>';
3866
  }
3867
+ if(!is_plugin_active('classifieds-plugin-compatibility/classifieds-plugin-compatibility.php')){
3868
+
3869
+ $autolistings['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/classifieds-plugin-compatibility/">Classifieds Plugin Compatibility Addon</a>';
3870
+ }
3871
  if(!is_plugin_active('wpml-schema-compatibility/wpml-schema-compatibility.php')){
3872
 
3873
  $wpml['note'] = saswp_t_string('This feature requires').' <a target="_blank" href="https://structured-data-for-wp.com/wpml-schema-compatibility">WPML Schema Compatibility Addon</a>';
3953
  $sabaidiscuss,
3954
  $yoast,
3955
  $polylang,
3956
+ $autolistings,
3957
  $wpml,
3958
  $metatagmanager,
3959
  $slimseo,
4270
  $all_schema_array = include $mappings_file;
4271
  }
4272
 
4273
+ $post_id = get_the_ID();
4274
 
4275
  if(isset($_GET['tag_ID'])){
4276
  $post_id = intval($_GET['tag_ID']);
4295
  'trans_reviews' => saswp_t_string(saswp_label_text('translation-reviews')),
4296
  'trans_self' => saswp_t_string(saswp_label_text('translation-self')),
4297
  'translable_txt' => $translable_txt,
4298
+ 'is_rtl' => is_rtl(),
4299
+ 'tag_ID' => isset($_GET['tag_ID']) ? intval($_GET['tag_ID']) : '',
4300
  );
4301
 
4302
  $data = apply_filters('saswp_localize_filter',$data,'saswp_localize_data');
4361
 
4362
  // Dequeue mediclinic theme's select2 on schema dashboard to remove conflict.
4363
  wp_dequeue_script( 'mkdf-select2-script' );
 
 
 
4364
 
4365
+ if($post_type == 'saswp'){
 
4366
 
4367
+ wp_dequeue_script( 'wds-shared-ui' );
4368
+ wp_deregister_script( 'wds-shared-ui' );
4369
+ wp_dequeue_script( 'pum-admin-general' );
4370
+ wp_deregister_script( 'pum-admin-general' );
4371
+
4372
+ }
4373
+
4374
  wp_enqueue_style('saswp-select2-style', SASWP_PLUGIN_URL. 'admin_section/css/select2.min.css' , false, SASWP_VERSION);
4375
  wp_enqueue_script('select2', SASWP_PLUGIN_URL. 'admin_section/js/select2.min.js', array( 'jquery'), SASWP_VERSION, true);
4376
  wp_enqueue_script('select2-extended-script', SASWP_PLUGIN_URL. 'admin_section/js/select2-extended.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 = saswp_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' => 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,7 +269,7 @@ function saswp_get_all_schema_posts(){
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
 
@@ -647,7 +647,7 @@ function saswp_comparison_logic_checker($input, $post){
647
  $term_data = $input['key_4'];
648
  $termChoices = array();
649
 
650
- if(is_tax()){
651
 
652
  $queried_obj = get_queried_object();
653
  $termChoices[] = $queried_obj->slug;
@@ -695,7 +695,7 @@ function saswp_comparison_logic_checker($input, $post){
695
  }
696
 
697
  }else{
698
-
699
  if( isset($_GET['tag_ID'] ) && is_admin() ){
700
 
701
  $term_object = get_term( intval($_GET['tag_ID']) );
@@ -811,7 +811,7 @@ if(is_admin()){
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,7 +1075,7 @@ function saswp_dequeue_script() {
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
@@ -1234,7 +1234,7 @@ function saswp_custom_breadcrumbs() {
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,13 +1419,13 @@ function saswp_custom_column_set( $column, $post_id ) {
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,7 +1447,7 @@ function saswp_custom_column_set( $column, $post_id ) {
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){
@@ -1769,7 +1769,8 @@ add_action('wp_ajax_saswp_feeback_remindme', 'saswp_feeback_remindme');
1769
 
1770
  function saswp_license_status($add_on, $license_status, $license_key){
1771
 
1772
- $item_name = array(
 
1773
  'jobposting' => 'JobPosting Schema Compatibility',
1774
  'polylang' => 'Polylang Compatibility For SASWP',
1775
  'wpml' => 'WPML Schema Compatibility',
@@ -2002,7 +2003,7 @@ function saswp_review_module_upgradation(){
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);
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
  }
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
 
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
 
647
  $term_data = $input['key_4'];
648
  $termChoices = array();
649
 
650
+ if(is_tax() || is_tag()){
651
 
652
  $queried_obj = get_queried_object();
653
  $termChoices[] = $queried_obj->slug;
695
  }
696
 
697
  }else{
698
+
699
  if( isset($_GET['tag_ID'] ) && is_admin() ){
700
 
701
  $term_object = get_term( intval($_GET['tag_ID']) );
811
 
812
  function saswp_select_callback($post) {
813
 
814
+ $data_group_array = 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
+ update_post_meta(
1079
  $post_id,
1080
  'data_group_array',
1081
  $post_data_group_array
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', 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 = 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 = get_post_meta($post_id, 'saswp_business_type', true);
1428
+ $business_name = 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 = get_post_meta( $post_id, $key='data_group_array', true);
1451
 
1452
 
1453
  if($data_group_array){
1769
 
1770
  function saswp_license_status($add_on, $license_status, $license_key){
1771
 
1772
+ $item_name = array(
1773
+ 'cooked' => 'Cooked compatibility for Schema',
1774
  'jobposting' => 'JobPosting Schema Compatibility',
1775
  'polylang' => 'Polylang Compatibility For SASWP',
1776
  'wpml' => 'WPML Schema Compatibility',
2003
 
2004
  foreach($posts_list as $list){
2005
 
2006
+ $g_place_id = get_post_meta($list->ID, $key='saswp_google_place_id', true);
2007
 
2008
  if($g_place_id){
2009
  $service->saswp_get_free_reviews_data($g_place_id, $g_review_api);
core/array-list/compatibility-list.php CHANGED
@@ -4,6 +4,12 @@ if ( ! defined( 'ABSPATH' ) ) exit;
4
 
5
  return array(
6
  'plugins' => array(
 
 
 
 
 
 
7
  'ratingform' => array(
8
  'name' => 'Rating Form by SerdarG',
9
  'free' => 'rating-form/rf-init.php',
4
 
5
  return array(
6
  'plugins' => array(
7
+ 'autolistings' => array(
8
+ 'name' => 'Auto Listings',
9
+ 'free' => 'auto-listings/auto-listings.php',
10
+ 'opt_name' => 'saswp-autolistings',
11
+ 'part_in' => 'pro',
12
+ ),
13
  'ratingform' => array(
14
  'name' => 'Rating Form by SerdarG',
15
  'free' => 'rating-form/rf-init.php',
core/array-list/pro_extensions.php CHANGED
@@ -8,6 +8,11 @@ return array(
8
  'name' => '1 Click Indexing Api Integration For SASWP',
9
  'path' => '1-click-indexing-api-integration-for-saswp/1-click-indexing-api-integration-for-saswp.php',
10
  ),
 
 
 
 
 
11
  array(
12
  'key' => 'polylang_compatibility_for_saswp',
13
  'name' => 'Polylang Compatibility For SASWP',
8
  'name' => '1 Click Indexing Api Integration For SASWP',
9
  'path' => '1-click-indexing-api-integration-for-saswp/1-click-indexing-api-integration-for-saswp.php',
10
  ),
11
+ array(
12
+ 'key' => 'classifieds_plugin_compatibility',
13
+ 'name' => 'Classifieds Plugin Compatibility',
14
+ 'path' => 'classifieds-plugin-compatibility/classifieds-plugin-compatibility.php',
15
+ ),
16
  array(
17
  'key' => 'polylang_compatibility_for_saswp',
18
  'name' => 'Polylang Compatibility For SASWP',
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 = saswp_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 = 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,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(saswp_get_the_ID());//$post->ID
449
  $article_section = '';
450
 
451
  foreach($category_detail as $cd){
@@ -1404,7 +1404,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
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,7 +1588,7 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
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(
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
  $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
 
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){
1404
 
1405
  case 'SpecialAnnouncement':
1406
 
1407
+ $category_detail =get_the_category(get_the_ID());//$post->ID
1408
  $article_section = '';
1409
 
1410
  if($category_detail){
1588
 
1589
  case 'Event':
1590
 
1591
+ $event_type = get_post_meta($schema_id, 'saswp_event_type', true);
1592
 
1593
  $meta_field = array(
1594
  array(
modules/rating-box/backend.php CHANGED
@@ -56,7 +56,7 @@ class saswp_rating_box_backend {
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,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 = 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,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 = 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,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 = 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,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 = saswp_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
- 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
  }
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
  $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
  <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
  <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
  <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
  $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
  }
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 = 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,7 +67,7 @@ Class saswp_rating_box_frontend{
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,7 +115,7 @@ Class saswp_rating_box_frontend{
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,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 = 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,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 = 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'])){
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
 
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
  '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
  $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
  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'])){
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 = 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;
@@ -108,6 +108,9 @@ function saswp_comment_rating_rating_field () {
108
 
109
  if(saswp_check_stars_rating()){
110
 
 
 
 
111
  wp_enqueue_style( 'saswp-frontend-css', SASWP_PLUGIN_URL . 'admin_section/css/'.(SASWP_ENVIRONMENT == 'production' ? 'saswp-frontend.min.css' : 'saswp-frontend.css'), false , SASWP_VERSION );
112
  wp_enqueue_script( 'saswp-rateyo-front-js', SASWP_PLUGIN_URL . 'admin_section/js/jquery.rateyo.min.js', array('jquery', 'jquery-ui-core'), SASWP_VERSION , true );
113
  wp_enqueue_style( 'jquery-rateyo-min-css', SASWP_PLUGIN_URL . 'admin_section/css/'.(SASWP_ENVIRONMENT == 'production' ? 'jquery.rateyo.min.css' : 'jquery.rateyo.min.css'), false, SASWP_VERSION );
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;
108
 
109
  if(saswp_check_stars_rating()){
110
 
111
+ if( function_exists('get_template') && get_template() == 'neptune-by-osetin' ){
112
+ wp_enqueue_style( 'saswp-frontend-extra-css', SASWP_PLUGIN_URL . 'admin_section/css/'.(SASWP_ENVIRONMENT == 'production' ? 'saswp-frontend-extra.min.css' : 'saswp-frontend-extra.css'), false , SASWP_VERSION );
113
+ }
114
  wp_enqueue_style( 'saswp-frontend-css', SASWP_PLUGIN_URL . 'admin_section/css/'.(SASWP_ENVIRONMENT == 'production' ? 'saswp-frontend.min.css' : 'saswp-frontend.css'), false , SASWP_VERSION );
115
  wp_enqueue_script( 'saswp-rateyo-front-js', SASWP_PLUGIN_URL . 'admin_section/js/jquery.rateyo.min.js', array('jquery', 'jquery-ui-core'), SASWP_VERSION , true );
116
  wp_enqueue_style( 'jquery-rateyo-min-css', SASWP_PLUGIN_URL . 'admin_section/css/'.(SASWP_ENVIRONMENT == 'production' ? 'jquery.rateyo.min.css' : 'jquery.rateyo.min.css'), false, SASWP_VERSION );
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 = saswp_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 = saswp_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
- 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
 
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
  $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
  '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
 
modules/reviews/reviews_collection.php CHANGED
@@ -59,8 +59,8 @@ class SASWP_Reviews_Collection {
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,7 +261,7 @@ class SASWP_Reviews_Collection {
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,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 = 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,7 +542,7 @@ class SASWP_Reviews_Collection {
542
 
543
  $post_id = intval($_GET['post_id']);
544
 
545
- $post_meta = saswp_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
- saswp_update_post_meta($post_id, $meta_key, $meta_val);
921
 
922
  }
923
 
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
 
262
  if($collection_id){
263
 
264
+ $reviews_list = 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 = 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 = get_post_meta($post_id);
546
 
547
 
548
  } else{
917
 
918
  foreach($post_meta as $meta_key => $meta_val){
919
 
920
+ 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
- saswp_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
- saswp_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
- saswp_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] = saswp_get_post_meta($rv_post->ID, $meta_key, true );
730
 
731
  }
732
 
@@ -1525,10 +1525,10 @@ class saswp_reviews_service {
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
  }
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
  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
  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
 
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
 
1525
 
1526
  foreach ($post_ids as $value) {
1527
 
1528
+ $rating = get_post_meta($value, 'saswp_review_rating', true);
1529
 
1530
  if(is_numeric($rating)){
1531
+ $avg += 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 = 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,13 +144,13 @@ function saswp_reviews_custom_columns_set( $column, $post_id ) {
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,13 +175,13 @@ function saswp_reviews_custom_columns_set( $column, $post_id ) {
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,7 +293,7 @@ function saswp_enqueue_rateyo_script( $hook ) {
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
  }
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
  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
  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
  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
  }
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
- saswp_update_post_meta(saswp_get_the_ID(), 'sp_tpro_shortcode_options',$shortcode_opt);
197
  endwhile;
198
 
199
  wp_reset_postdata();
@@ -651,6 +651,9 @@ class saswp_output_compatibility{
651
  public function polylang_on_activation(){
652
  $this->saswp_update_option_on_compatibility_activation('saswp-polylang');
653
  }
 
 
 
654
  public function wpml_on_activation(){
655
  $this->saswp_update_option_on_compatibility_activation('saswp-wpml');
656
  }
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();
651
  public function polylang_on_activation(){
652
  $this->saswp_update_option_on_compatibility_activation('saswp-polylang');
653
  }
654
+ public function autolistings_on_activation(){
655
+ $this->saswp_update_option_on_compatibility_activation('saswp-autolistings');
656
+ }
657
  public function wpml_on_activation(){
658
  $this->saswp_update_option_on_compatibility_activation('saswp-wpml');
659
  }
output/function.php CHANGED
@@ -259,7 +259,7 @@ function saswp_get_all_schema_markup_output() {
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();
@@ -501,16 +501,24 @@ function saswp_get_all_schema_markup_output() {
501
 
502
  if($kb_website_output){
503
 
504
- $kb_website_output['publisher'] = array(
505
- '@id' => isset($kb_schema_output['@id']) ? $kb_schema_output['@id'] : ''
506
- );
 
 
 
 
507
  }
508
  if($sd_data['saswp_kb_type'] == 'Organization'){
509
 
510
- $soutput['publisher'] = array(
511
- '@id' => isset($kb_schema_output['@id']) ? $kb_schema_output['@id'] : ''
512
- );
513
-
 
 
 
 
514
  }
515
 
516
  }
@@ -811,8 +819,8 @@ function saswp_extract_taqyeem_ratings(){
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,7 +833,7 @@ function saswp_extract_taqyeem_ratings(){
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,7 +856,7 @@ function saswp_ratency_rating_box_rating(){
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,8 +935,8 @@ function saswp_extract_wpdiscuz(){
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,8 +974,8 @@ function saswp_extract_ratingform(){
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,7 +1007,7 @@ function saswp_get_elementor_testomonials(){
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,8 +1061,8 @@ function saswp_extract_rmp_ratings(){
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,8 +1100,8 @@ function saswp_extract_kk_star_ratings(){
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,8 +1141,8 @@ function saswp_extract_wp_post_ratings(){
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
 
@@ -1340,7 +1348,10 @@ function saswp_list_items_generator(){
1340
  global $sd_data;
1341
  $bc_titles = array();
1342
  $bc_links = array();
1343
-
 
 
 
1344
  if(isset($sd_data['titles']) && !empty($sd_data['titles'])){
1345
  $bc_titles = $sd_data['titles'];
1346
  }
@@ -1679,7 +1690,7 @@ function saswp_get_the_tags(){
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,8 +1891,8 @@ function saswp_get_testimonial_data($atts, $matche){
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,7 +2066,7 @@ function saswp_get_testimonial_pro_data($shortcode_data, $testimo_str){
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,7 +2139,7 @@ function saswp_get_strong_testimonials_data($testimonial){
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,8 +2194,8 @@ function saswp_get_bne_testimonials_data($atts, $testimo_str){
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,7 +2442,7 @@ function saswp_get_testomonial_pro(){
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,7 +2496,7 @@ function saswp_get_bne_testomonials(){
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,9 +2537,9 @@ function saswp_append_fetched_reviews($input1, $schema_post_id = null){
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,7 +2563,7 @@ function saswp_append_fetched_reviews($input1, $schema_post_id = null){
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]);
@@ -2603,11 +2614,16 @@ function saswp_get_mainEntity($schema_id){
2603
 
2604
  global $post;
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
 
@@ -2617,7 +2633,7 @@ function saswp_get_mainEntity($schema_id){
2617
 
2618
  $regex = '/<([0-9a-z]*)\sclass="'.$item_list_custom.'"[^>]*>(.*?)<\/\1>/';
2619
 
2620
- preg_match_all( $regex, $post->post_content, $matches , PREG_SET_ORDER );
2621
 
2622
  foreach($matches as $match){
2623
  $listitem[] = $match[2];
@@ -2627,7 +2643,7 @@ function saswp_get_mainEntity($schema_id){
2627
 
2628
  $regex = '/<'.$item_list_tags.'>(.*?)<\/'.$item_list_tags.'>/';
2629
 
2630
- preg_match_all( $regex, $post->post_content, $matches , PREG_SET_ORDER );
2631
 
2632
  if($matches){
2633
  foreach($matches as $match){
@@ -2666,7 +2682,7 @@ function saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $sche
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,7 +2844,7 @@ function saswp_get_reviews_wp_theme(){
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,7 +2892,7 @@ function saswp_get_reviews_wp_theme(){
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,8 +3198,8 @@ function saswp_get_ampforwp_story_images(){
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
 
259
  $custom_markup = saswp_taxonomy_schema_output();
260
 
261
  if(is_singular()){
262
+ $custom_markup = get_post_meta($post->ID, 'saswp_custom_schema_field', true);
263
  }
264
 
265
  $schema_output = saswp_schema_output();
501
 
502
  if($kb_website_output){
503
 
504
+ if(!empty($kb_schema_output['@id'])){
505
+
506
+ $kb_website_output['publisher'] = array(
507
+ '@id' => $kb_schema_output['@id']
508
+ );
509
+ }
510
+
511
  }
512
  if($sd_data['saswp_kb_type'] == 'Organization'){
513
 
514
+ if(!empty($kb_schema_output['@id'])){
515
+
516
+ $soutput['publisher'] = array(
517
+ '@id' => $kb_schema_output['@id']
518
+ );
519
+
520
+ }
521
+
522
  }
523
 
524
  }
819
 
820
  if(isset($sd_data['saswp-taqyeem']) && $sd_data['saswp-taqyeem'] == 1 && function_exists('taqyeem_review_get_rich_snippet')){
821
 
822
+ $rate = get_post_meta( $post->ID, 'tie_user_rate', true );
823
+ $count = get_post_meta( $post->ID, 'tie_users_num', true );
824
 
825
  if( ! empty( $rate ) && ! empty( $count ) ){
826
 
833
 
834
  }else{
835
 
836
+ $total_score = (int) get_post_meta( $post->ID, 'taq_review_score', true );
837
 
838
  if( ! empty( $total_score ) && $total_score > 0 ){
839
  $total_score = round( ($total_score*5)/100, 1 );
856
 
857
  if( isset($sd_data['saswp-ratency']) && $sd_data['saswp-ratency'] == 1 ){
858
 
859
+ $ratency_total_rv = get_post_meta($post->ID, 'progression_studios_review_total', true);
860
 
861
  if( $ratency_total_rv ){
862
 
935
 
936
  if(isset($sd_data['saswp-wpdiscuz']) && $sd_data['saswp-wpdiscuz'] == 1 && is_plugin_active('wpdiscuz/class.WpdiscuzCore.php') ){
937
 
938
+ $rating = (float) get_post_meta($post->ID, 'wpdiscuz_post_rating', true);
939
+ $count = (int) get_post_meta($post->ID, 'wpdiscuz_post_rating_count', true);
940
 
941
  if($rating){
942
 
974
 
975
  if(isset($sd_data['saswp-ratingform']) && $sd_data['saswp-ratingform'] == 1 && is_plugin_active('rating-form/rf-init.php')){
976
 
977
+ $total = get_post_meta(get_the_ID(), 'rf_total', true) ? ((int) get_post_meta(get_the_ID(), 'rf_total', true)) : 0;
978
+ $avg = get_post_meta(get_the_ID(), 'rf_average', true) ? ((int) get_post_meta(get_the_ID(), 'rf_average', true)) : 0;
979
 
980
 
981
  if( $total > 0 ){
1007
 
1008
  if( isset($sd_data['saswp-elementor']) && $sd_data['saswp-elementor'] == 1 && is_plugin_active('elementor/elementor.php') ){
1009
 
1010
+ $alldata = get_post_meta( get_the_ID(),'_elementor_data', true );
1011
  $alldata = json_decode($alldata, true);
1012
 
1013
  $returnData = array();
1061
  if(isset($sd_data['saswp-rmprating']) && $sd_data['saswp-rmprating'] == 1 && is_plugin_active('rate-my-post/rate-my-post.php')){
1062
 
1063
 
1064
+ $avg = get_post_meta(get_the_ID(), 'rmp_avg_rating', true) ? ( get_post_meta(get_the_ID(), 'rmp_avg_rating', true)) : 0;
1065
+ $votes = get_post_meta(get_the_ID(), 'rmp_vote_count', true) ? ((int) get_post_meta(get_the_ID(), 'rmp_vote_count', true)) : 0;
1066
 
1067
  if($votes>0){
1068
 
1100
  if(isset($sd_data['saswp-kk-star-raring']) && $sd_data['saswp-kk-star-raring'] == 1 && is_plugin_active('kk-star-ratings/index.php')){
1101
 
1102
  $best = get_option('kksr_stars');
1103
+ $score = get_post_meta(get_the_ID(), '_kksr_ratings', true) ? ((int) get_post_meta(get_the_ID(), '_kksr_ratings', true)) : 0;
1104
+ $votes = get_post_meta(get_the_ID(), '_kksr_casts', true) ? ((int) get_post_meta(get_the_ID(), '_kksr_casts', true)) : 0;
1105
  $avg = $score && $votes ? round((float)(($score/$votes)*($best/5)), 1) : 0;
1106
 
1107
  if($votes>0){
1141
  if(isset($sd_data['saswp-wppostratings-raring']) && $sd_data['saswp-wppostratings-raring'] == 1 && is_plugin_active('wp-postratings/wp-postratings.php')){
1142
 
1143
  $best = (int) get_option( 'postratings_max' );
1144
+ $avg = get_post_meta(get_the_ID(), 'ratings_average', true);
1145
+ $votes = get_post_meta(get_the_ID(), 'ratings_users', true);
1146
 
1147
  if($votes>0){
1148
 
1348
  global $sd_data;
1349
  $bc_titles = array();
1350
  $bc_links = array();
1351
+
1352
+ if(empty($sd_data['links'])){
1353
+ saswp_custom_breadcrumbs();
1354
+ }
1355
  if(isset($sd_data['titles']) && !empty($sd_data['titles'])){
1356
  $bc_titles = $sd_data['titles'];
1357
  }
1690
 
1691
  if( isset($sd_data['saswp-metatagmanager']) && $sd_data['saswp-metatagmanager'] == 1 && class_exists('Meta_Tag_Manager') ){
1692
 
1693
+ $post_meta = get_post_meta(get_the_ID(), 'mtm_data', true);
1694
 
1695
  if(is_array($post_meta)){
1696
 
1891
 
1892
  foreach ($testimonial as $value){
1893
 
1894
+ $rating = get_post_meta($value->ID, $key='_ikcf_rating', true);
1895
+ $author = get_post_meta($value->ID, $key='_ikcf_client', true);
1896
 
1897
  $sumofrating += $rating;
1898
 
2066
 
2067
  foreach ($testimonial as $value){
2068
 
2069
+ $meta_option = get_post_meta($value->ID, 'sp_tpro_meta_options', true);
2070
 
2071
  $tpro_rating_star = $meta_option['tpro_rating'];
2072
 
2139
  foreach ($testimonial as $value){
2140
 
2141
  $rating = 5;
2142
+ $author = get_post_meta($value->ID, $key='client_name', true);
2143
 
2144
  $sumofrating += $rating;
2145
 
2194
 
2195
  foreach ($testimonial as $value){
2196
 
2197
+ $rating = get_post_meta($value->ID, $key='rating', true);
2198
+ $author = get_post_meta($value->ID, $key='tagline', true);
2199
 
2200
  $sumofrating += $rating;
2201
 
2442
  $mached = trim($mached);
2443
  $atts = shortcode_parse_atts('['.$mached.' ]');
2444
 
2445
+ $shortcode_data = get_post_meta( $atts['id'], 'sp_tpro_shortcode_options', true );
2446
 
2447
  if($shortcode_data){
2448
 
2496
  $mached = trim($mached);
2497
  $atts = shortcode_parse_atts('['.$mached.' ]');
2498
 
2499
+ $id = get_post_meta( $atts['custom'], '_bne_testimonials_sg_shortcode', true );
2500
 
2501
  if($id){
2502
 
2537
 
2538
  if($schema_post_id){
2539
 
2540
+ $attached_col = get_post_meta($schema_post_id, 'saswp_attached_collection', true);
2541
+ $attached_rv = get_post_meta($schema_post_id, 'saswp_attahced_reviews', true);
2542
+ $append_reviews = get_post_meta($schema_post_id, 'saswp_enable_append_reviews', true);
2543
 
2544
  if($append_reviews == 1 && ($attached_rv || $attached_col)){
2545
 
2563
 
2564
  foreach($attached_col as $col_id){
2565
 
2566
+ $collection_data = get_post_meta($col_id);
2567
 
2568
  if(isset($collection_data['saswp_platform_ids'][0])){
2569
  $platform_ids = unserialize($collection_data['saswp_platform_ids'][0]);
2614
 
2615
  global $post;
2616
 
2617
+ $post_content = '';
2618
  $response = array();
2619
+
2620
+ if(is_object($post)){
2621
+ $post_content = do_shortcode($post->post_content);
2622
+ }
2623
 
2624
+ $item_list_enable = get_post_meta($schema_id, 'saswp_enable_itemlist_schema', true);
2625
+ $item_list_tags = get_post_meta($schema_id, 'saswp_item_list_tags', true);
2626
+ $item_list_custom = get_post_meta($schema_id, 'saswp_item_list_custom', true);
2627
 
2628
  if($item_list_enable){
2629
 
2633
 
2634
  $regex = '/<([0-9a-z]*)\sclass="'.$item_list_custom.'"[^>]*>(.*?)<\/\1>/';
2635
 
2636
+ preg_match_all( $regex, $post_content, $matches , PREG_SET_ORDER );
2637
 
2638
  foreach($matches as $match){
2639
  $listitem[] = $match[2];
2643
 
2644
  $regex = '/<'.$item_list_tags.'>(.*?)<\/'.$item_list_tags.'>/';
2645
 
2646
+ preg_match_all( $regex, $post_content, $matches , PREG_SET_ORDER );
2647
 
2648
  if($matches){
2649
  foreach($matches as $match){
2682
 
2683
  if($schema_options['saswp_modify_method'] == 'manual'){
2684
 
2685
+ $all_post_meta = get_post_meta($schema_post_id);
2686
 
2687
  switch ($schema_type) {
2688
 
2844
  $user_overall = 0;
2845
  $user_rates = 0;
2846
 
2847
+ $criterias = get_post_meta( get_the_ID(), 'reviews_score' );
2848
  $rate_criterias = array();
2849
  if( !empty( $criterias ) ){
2850
  foreach( $criterias as $criteria ){
2892
 
2893
  }else{
2894
 
2895
+ $author_average = get_post_meta( get_the_ID(), 'author_average', true );
2896
 
2897
  $ratings = array(
2898
  '@type' => 'AggregateRating',
3198
 
3199
  if(class_exists('Ampforwp_Stories_Post_Type')){
3200
 
3201
+ $amp_story_meta = get_post_meta( get_the_ID(), 'ampforwp_stories', true );
3202
+ $post_type = get_post_type(get_the_ID());
3203
 
3204
  if( !empty($amp_story_meta) && is_array($amp_story_meta) && $post_type == 'ampforwp_story' ) {
3205
 
output/gutenberg.php CHANGED
@@ -290,8 +290,8 @@ function saswp_gutenberg_recipe_schema(){
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,7 +300,7 @@ function saswp_gutenberg_recipe_schema(){
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
 
@@ -790,8 +790,8 @@ function saswp_gutenberg_how_to_schema(){
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,7 +800,7 @@ function saswp_gutenberg_how_to_schema(){
800
  $input1 = array_merge($input1, $extra_theme_review);
801
  }
802
 
803
- $input1 = saswp_append_fetched_reviews($input1, saswp_get_the_ID());
804
 
805
  }
806
 
290
  }
291
  }
292
 
293
+ $extra_theme_review = $service_object->saswp_extra_theme_review_details(get_the_ID());
294
+ $aggregateRating = $service_object->saswp_rating_box_rating_markup(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, get_the_ID());
304
 
305
  }else{
306
 
790
 
791
  $service_object = new saswp_output_service();
792
 
793
+ $extra_theme_review = $service_object->saswp_extra_theme_review_details(get_the_ID());
794
+ $aggregateRating = $service_object->saswp_rating_box_rating_markup(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, get_the_ID());
804
 
805
  }
806
 
output/location.php CHANGED
@@ -117,8 +117,8 @@ function saswp_get_location_list(){
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(
@@ -148,7 +148,7 @@ function saswp_location_shortcode_render($attr){
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
 
117
 
118
  foreach($schema_id_array as $col){
119
 
120
+ $schema_type = get_post_meta($col, 'schema_type', true);
121
+ $display_front = get_post_meta($col, 'saswp_loc_display_on_front', true);
122
 
123
  if( $schema_type == 'local_business' && $display_front ){
124
  $col_opt[] = array(
148
 
149
  function saswp_add_location_content( $post_id ){
150
 
151
+ $post_meta = get_post_meta($post_id);
152
 
153
  $html = '<div class="saswp-location-container">';
154
 
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 = saswp_get_post_meta( saswp_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 = saswp_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 = 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';
@@ -357,7 +357,7 @@ function saswp_eop_schema_markup($schema_id, $schema_post_id, $all_post_meta){
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
 
@@ -434,7 +434,7 @@ function saswp_eop_schema_markup($schema_id, $schema_post_id, $all_post_meta){
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();
@@ -448,7 +448,7 @@ function saswp_eop_schema_markup($schema_id, $schema_post_id, $all_post_meta){
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();
@@ -612,7 +612,7 @@ function saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta){
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,7 +642,7 @@ function saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta){
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,10 +806,10 @@ function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta)
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,7 +1091,7 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
1091
  }
1092
 
1093
 
1094
- $itinerary = saswp_get_post_meta($schema_post_id, 'product_reviews_'.$schema_id, true);
1095
 
1096
  $itinerary_arr = array();
1097
 
@@ -1126,7 +1126,7 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
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,7 +1460,7 @@ function saswp_organization_schema_markup($schema_id, $schema_post_id, $all_post
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,7 +1521,7 @@ function saswp_project_schema_markup($schema_id, $schema_post_id, $all_post_meta
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,7 +1755,7 @@ function saswp_music_playlist_schema_markup($schema_id, $schema_post_id, $all_po
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,7 +1807,7 @@ function saswp_music_composition_schema_markup($schema_id, $schema_post_id, $all
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,7 +1989,7 @@ function saswp_trip_schema_markup($schema_id, $schema_post_id, $all_post_meta){
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,7 +2026,7 @@ function saswp_boat_trip_schema_markup($schema_id, $schema_post_id, $all_post_me
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,8 +2054,8 @@ function saswp_itemlist_schema_markup($schema_id, $schema_post_id, $all_post_met
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,7 +2147,7 @@ function saswp_faq_schema_markup($schema_id, $schema_post_id, $all_post_meta){
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,7 +2192,7 @@ function saswp_music_album_schema_markup($schema_id, $schema_post_id, $all_post_
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,7 +2219,7 @@ function saswp_job_posting_schema_markup($schema_id, $schema_post_id, $all_post_
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,7 +2274,7 @@ function saswp_job_posting_schema_markup($schema_id, $schema_post_id, $all_post_
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,7 +2567,7 @@ function saswp_apartment_schema_markup($schema_id, $schema_post_id, $all_post_me
2567
 
2568
  }
2569
 
2570
- $itinerary = saswp_get_post_meta($schema_post_id, 'apartment_amenities_'.$schema_id, true);
2571
 
2572
  $itinerary_arr = array();
2573
 
@@ -2585,7 +2585,7 @@ function saswp_apartment_schema_markup($schema_id, $schema_post_id, $all_post_me
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,8 +2701,8 @@ function saswp_tv_series_schema_markup($schema_id, $schema_post_id, $all_post_me
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';
@@ -2758,8 +2758,8 @@ function saswp_medical_condition_schema_markup($schema_id, $schema_post_id, $all
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';
@@ -2832,7 +2832,7 @@ function saswp_qanda_schema_markup($schema_id, $schema_post_id, $all_post_meta){
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
 
@@ -2856,7 +2856,7 @@ function saswp_qanda_schema_markup($schema_id, $schema_post_id, $all_post_meta){
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
 
@@ -2887,7 +2887,7 @@ function saswp_qanda_schema_markup($schema_id, $schema_post_id, $all_post_meta){
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
 
@@ -2939,7 +2939,7 @@ function saswp_data_feed_schema_markup($schema_id, $schema_post_id, $all_post_me
2939
  );
2940
 
2941
 
2942
- $performer = saswp_get_post_meta($schema_post_id, 'feed_element_'.$schema_id, true);
2943
 
2944
  $performer_arr = array();
2945
 
@@ -2971,7 +2971,7 @@ function saswp_dfp_schema_markup($schema_id, $schema_post_id, $all_post_meta){
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,7 +3015,7 @@ function saswp_blogposting_schema_markup($schema_id, $schema_post_id, $all_post_
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,7 +3057,7 @@ function saswp_blogposting_schema_markup($schema_id, $schema_post_id, $all_post_
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,7 +3176,7 @@ function saswp_vehicle_schema_markup($schema_id, $schema_post_id, $all_post_meta
3176
  }
3177
 
3178
 
3179
- $itinerary = saswp_get_post_meta($schema_post_id, 'car_reviews_'.$schema_id, true);
3180
 
3181
  $itinerary_arr = array();
3182
 
@@ -3211,7 +3211,7 @@ function saswp_vehicle_schema_markup($schema_id, $schema_post_id, $all_post_meta
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
 
@@ -3255,7 +3255,7 @@ function saswp_car_schema_markup($schema_id, $schema_post_id, $all_post_meta){
3255
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_car_schema_name_'.$schema_id, 'saswp_array'),
3256
  'sku' => saswp_remove_warnings($all_post_meta, 'saswp_car_schema_sku_'.$schema_id, 'saswp_array'),
3257
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_car_schema_description_'.$schema_id, 'saswp_array'),
3258
- 'brand' => array('@type' => 'Thing',
3259
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_car_schema_brand_name_'.$schema_id, 'saswp_array'),
3260
  )
3261
  );
@@ -3333,7 +3333,7 @@ function saswp_car_schema_markup($schema_id, $schema_post_id, $all_post_meta){
3333
  }
3334
 
3335
 
3336
- $itinerary = saswp_get_post_meta($schema_post_id, 'car_reviews_'.$schema_id, true);
3337
 
3338
  $itinerary_arr = array();
3339
 
@@ -3368,7 +3368,7 @@ function saswp_car_schema_markup($schema_id, $schema_post_id, $all_post_meta){
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,7 +3406,7 @@ function saswp_creative_work_series_schema_markup($schema_id, $schema_post_id, $
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,7 +3482,7 @@ function saswp_webpage_schema_markup($schema_id, $schema_post_id, $all_post_meta
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,8 +3554,8 @@ function saswp_special_announcement_schema_markup($schema_id, $schema_post_id, $
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,7 +3632,7 @@ function saswp_special_announcement_schema_markup($schema_id, $schema_post_id, $
3632
 
3633
  }
3634
 
3635
- $supply = saswp_get_post_meta($schema_post_id, 'announcement_location_'.$schema_id, true);
3636
 
3637
  if(!empty($supply)){
3638
 
@@ -3721,7 +3721,7 @@ function saswp_photograph_schema_markup($schema_id, $schema_post_id, $all_post_m
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,7 +3766,7 @@ function saswp_article_schema_markup($schema_id, $schema_post_id, $all_post_meta
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,7 +3807,7 @@ function saswp_article_schema_markup($schema_id, $schema_post_id, $all_post_meta
3807
 
3808
  }
3809
 
3810
- $itemlist = saswp_get_post_meta($schema_post_id, 'article_items_'.$schema_id, true);
3811
 
3812
  if($itemlist){
3813
 
@@ -3842,7 +3842,7 @@ function saswp_creativework_schema_markup($schema_id, $schema_post_id, $all_post
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,7 +3883,7 @@ function saswp_creativework_schema_markup($schema_id, $schema_post_id, $all_post
3883
 
3884
  }
3885
 
3886
- $itemlist = saswp_get_post_meta($schema_post_id, 'article_items_'.$schema_id, true);
3887
 
3888
  if($itemlist){
3889
 
@@ -3908,7 +3908,7 @@ function saswp_tech_article_schema_markup($schema_id, $schema_post_id, $all_post
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,7 +3945,7 @@ function saswp_tech_article_schema_markup($schema_id, $schema_post_id, $all_post
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,8 +3979,8 @@ function saswp_news_article_schema_markup($schema_id, $schema_post_id, $all_post
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,7 +4034,7 @@ function saswp_news_article_schema_markup($schema_id, $schema_post_id, $all_post
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,7 +4069,7 @@ function saswp_audiobook_schema_markup($schema_id, $schema_post_id, $all_post_me
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,8 +4199,8 @@ function saswp_video_object_schema_markup($schema_id, $schema_post_id, $all_post
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,8 +4269,8 @@ function saswp_image_object_schema_markup($schema_id, $schema_post_id, $all_post
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,7 +4313,7 @@ function saswp_image_object_schema_markup($schema_id, $schema_post_id, $all_post
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
 
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
 
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
 
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';
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 = get_post_meta( get_the_ID(), 'saswp_eop_image_'.$schema_id.'_detail',true);
361
 
362
  if(!(empty($howto_image))){
363
 
434
  $input1['financialAidEligible'] = $all_post_meta['saswp_eop_financial_aid_eligible_'.$schema_id][0];
435
  }
436
 
437
+ $identifier = get_post_meta($schema_post_id, 'eopidentifier_'.$schema_id, true);
438
 
439
  if(!empty($identifier)){
440
  $data = array();
448
  $input1['identifier'] = $data;
449
  }
450
 
451
+ $offer = get_post_meta($schema_post_id, 'eopoffer_'.$schema_id, true);
452
 
453
  if(!empty($offer)){
454
  $data = array();
612
  }
613
 
614
  //Performer starts here
615
+ $performer = 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 = get_post_meta($schema_post_id, 'organizer_'.$schema_id, true);
646
 
647
  $organizer_arr = array();
648
 
806
 
807
  $input1 = array();
808
 
809
+ $recipe_logo = get_post_meta( get_the_ID(), 'saswp_recipe_organization_logo_'.$schema_id.'_detail',true);
810
+ $recipe_author_image = get_post_meta( get_the_ID(), 'saswp_recipe_author_image_'.$schema_id.'_detail',true);
811
 
812
+ $step = get_post_meta($schema_post_id, 'recipe_instructions_'.$schema_id, true);
813
 
814
  $ingredient = array();
815
  $instruction = array();
1091
  }
1092
 
1093
 
1094
+ $itinerary = 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(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 = get_post_meta( 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 = get_post_meta( 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 = 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 = 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 = 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 = 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 = get_post_meta($schema_post_id, 'itemlist_item_'.$schema_id, true);
2058
+ $itemtype = 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 = 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 = 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 = get_post_meta( 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 = get_post_meta($schema_post_id, 'joblocation_'.$schema_id, true);
2278
 
2279
  if(!empty($joblocation_meta)){
2280
 
2567
 
2568
  }
2569
 
2570
+ $itinerary = 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 = 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 = get_post_meta($schema_post_id, 'tvseries_actor_'.$schema_id, true);
2705
+ $season = get_post_meta($schema_post_id, 'tvseries_season_'.$schema_id, true);
2706
 
2707
  $input1['@context'] = saswp_context_url();
2708
  $input1['@type'] = 'TVSeries';
2758
 
2759
  $input1 = array();
2760
 
2761
+ $symptom = get_post_meta($schema_post_id, 'mc_symptom_'.$schema_id, true);
2762
+ $riskfactro = get_post_meta($schema_post_id, 'mc_risk_factor_'.$schema_id, true);
2763
 
2764
  $input1['@context'] = saswp_context_url();
2765
  $input1['@type'] = 'MedicalCondition';
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(get_the_ID());
2836
 
2837
  }else{
2838
 
2856
 
2857
  $input1['mainEntity']['answerCount'] = saswp_remove_warnings($all_post_meta, 'saswp_qa_answer_count_'.$schema_id, 'saswp_array');
2858
 
2859
+ $answer = get_post_meta($schema_post_id, 'accepted_answer_'.$schema_id, true);
2860
 
2861
  $answer_arr = array();
2862
 
2887
  $input1['mainEntity']['acceptedAnswer'] = $answer_arr;
2888
  }
2889
 
2890
+ $answer = get_post_meta($schema_post_id, 'suggested_answer_'.$schema_id, true);
2891
 
2892
  $answer_arr = array();
2893
 
2939
  );
2940
 
2941
 
2942
+ $performer = get_post_meta($schema_post_id, 'feed_element_'.$schema_id, true);
2943
 
2944
  $performer_arr = array();
2945
 
2971
 
2972
  $input1 = array();
2973
 
2974
+ $slogo = get_post_meta( 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 = get_post_meta( 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 = get_post_meta($schema_post_id, 'blogposting_items_'.$schema_id, true);
3061
 
3062
  if($itemlist){
3063
 
3176
  }
3177
 
3178
 
3179
+ $itinerary = 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(get_the_ID());
3215
 
3216
  if(!empty($car_details['car_reviews'])){
3217
 
3255
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_car_schema_name_'.$schema_id, 'saswp_array'),
3256
  'sku' => saswp_remove_warnings($all_post_meta, 'saswp_car_schema_sku_'.$schema_id, 'saswp_array'),
3257
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_car_schema_description_'.$schema_id, 'saswp_array'),
3258
+ 'brand' => array('@type' => 'Brand',
3259
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_car_schema_brand_name_'.$schema_id, 'saswp_array'),
3260
  )
3261
  );
3333
  }
3334
 
3335
 
3336
+ $itinerary = 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(get_the_ID());
3372
 
3373
  if(!empty($car_details['car_reviews'])){
3374
 
3406
 
3407
  $input1 = array();
3408
 
3409
+ $slogo = get_post_meta( 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 = get_post_meta( 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 = get_post_meta( get_the_ID(), 'saswp_special_announcement_organization_logo_'.$schema_id.'_detail',true);
3558
+ $location_img = get_post_meta( 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 = get_post_meta($schema_post_id, 'announcement_location_'.$schema_id, true);
3636
 
3637
  if(!empty($supply)){
3638
 
3721
 
3722
  $input1 = array();
3723
 
3724
+ $slogo = get_post_meta( 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 = get_post_meta( 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 = get_post_meta($schema_post_id, 'article_items_'.$schema_id, true);
3811
 
3812
  if($itemlist){
3813
 
3842
 
3843
  $input1 = array();
3844
 
3845
+ $slogo = get_post_meta( 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 = get_post_meta($schema_post_id, 'article_items_'.$schema_id, true);
3887
 
3888
  if($itemlist){
3889
 
3908
 
3909
  $input1 = array();
3910
 
3911
+ $slogo = get_post_meta( 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 = get_post_meta($schema_post_id, 'tech_article_items_'.$schema_id, true);
3949
 
3950
  if($itemlist){
3951
 
3979
 
3980
  $input1 = array();
3981
 
3982
+ $slogo = get_post_meta( get_the_ID(), 'saswp_newsarticle_organization_logo_'.$schema_id.'_detail',true);
3983
+ $author_image = get_post_meta( 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 = get_post_meta($schema_post_id, 'newsarticle_items_'.$schema_id, true);
4038
 
4039
  if($itemlist){
4040
 
4069
 
4070
  $input1 = array();
4071
 
4072
+ $author_image = get_post_meta( 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 = get_post_meta( get_the_ID(), 'saswp_video_object_organization_logo_'.$schema_id.'_detail',true);
4203
+ $author_image = get_post_meta( 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 = get_post_meta( get_the_ID(), 'saswpimage_object_organization_logo_'.$schema_id.'_detail',true);
4273
+ $author_image = get_post_meta( 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 = 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 = 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,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 = saswp_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 = 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,7 +394,7 @@ function saswp_add_novelist_schema( $input1 ){
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,7 +518,7 @@ function saswp_add_mooberrybm_schema( $input1 ){
518
 
519
  }
520
 
521
- $editions = saswp_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 = 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 = 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 = 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
 
395
  }
396
 
397
+ $post_meta = get_post_meta($post->ID);
398
 
399
  $input1['headline'] = saswp_get_the_title();
400
  $input1['genre'] = $genres_str;
518
 
519
  }
520
 
521
+ $editions = get_post_meta($post->ID, '_mbdb_editions', true);
522
 
523
  $editions_arr = array();
524
 
output/output.php CHANGED
@@ -156,13 +156,13 @@ function saswp_schema_output() {
156
  return ;
157
  }
158
  $service_object = new saswp_output_service();
159
-
160
  $all_schema_output = array();
161
 
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();
@@ -180,7 +180,7 @@ 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 = saswp_get_post_meta($schema_post_id, 'saswp_enable_videoobject', true);
184
 
185
  $input1 = array();
186
 
@@ -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, saswp_get_the_ID(), $all_post_meta);
212
 
213
  break;
214
 
@@ -231,7 +231,7 @@ function saswp_schema_output() {
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;
@@ -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, saswp_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, saswp_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, saswp_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, saswp_get_the_ID(), $all_post_meta);
314
  }
315
 
316
  break;
@@ -331,7 +331,7 @@ function saswp_schema_output() {
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;
@@ -348,7 +348,7 @@ function saswp_schema_output() {
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,7 +365,7 @@ function saswp_schema_output() {
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,7 +383,7 @@ function saswp_schema_output() {
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,7 +401,7 @@ function saswp_schema_output() {
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,7 +419,7 @@ function saswp_schema_output() {
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,7 +438,7 @@ function saswp_schema_output() {
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,7 +459,7 @@ function saswp_schema_output() {
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,7 +486,7 @@ function saswp_schema_output() {
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,7 +504,7 @@ function saswp_schema_output() {
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,7 +522,7 @@ function saswp_schema_output() {
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,7 +540,7 @@ function saswp_schema_output() {
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,7 +558,7 @@ function saswp_schema_output() {
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,7 +576,7 @@ function saswp_schema_output() {
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,7 +594,7 @@ function saswp_schema_output() {
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,7 +612,7 @@ function saswp_schema_output() {
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,7 +630,7 @@ function saswp_schema_output() {
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,7 +656,7 @@ function saswp_schema_output() {
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,7 +677,7 @@ function saswp_schema_output() {
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,7 +709,7 @@ function saswp_schema_output() {
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,7 +718,7 @@ function saswp_schema_output() {
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,7 +728,7 @@ function saswp_schema_output() {
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,7 +744,7 @@ function saswp_schema_output() {
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,7 +783,7 @@ function saswp_schema_output() {
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,7 +792,7 @@ function saswp_schema_output() {
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,7 +815,7 @@ function saswp_schema_output() {
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,7 +831,7 @@ function saswp_schema_output() {
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,7 +842,7 @@ function saswp_schema_output() {
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,7 +859,7 @@ function saswp_schema_output() {
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,7 +870,7 @@ function saswp_schema_output() {
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,7 +896,7 @@ function saswp_schema_output() {
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,7 +907,7 @@ function saswp_schema_output() {
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,7 +930,7 @@ function saswp_schema_output() {
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,7 +956,7 @@ function saswp_schema_output() {
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,7 +981,7 @@ function saswp_schema_output() {
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,7 +1004,7 @@ function saswp_schema_output() {
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,7 +1029,7 @@ function saswp_schema_output() {
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,7 +1054,7 @@ function saswp_schema_output() {
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,7 +1079,7 @@ function saswp_schema_output() {
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,7 +1108,7 @@ function saswp_schema_output() {
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,7 +1120,7 @@ function saswp_schema_output() {
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
 
@@ -1139,14 +1139,14 @@ function saswp_schema_output() {
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,7 +1167,7 @@ function saswp_schema_output() {
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,7 +1201,7 @@ function saswp_schema_output() {
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,7 +1212,7 @@ function saswp_schema_output() {
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,7 +1246,7 @@ function saswp_schema_output() {
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,7 +1257,7 @@ function saswp_schema_output() {
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,7 +1267,7 @@ function saswp_schema_output() {
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,7 +1282,7 @@ function saswp_schema_output() {
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,7 +1292,7 @@ function saswp_schema_output() {
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,7 +1300,7 @@ function saswp_schema_output() {
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,7 +1324,7 @@ function saswp_schema_output() {
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,7 +1345,7 @@ function saswp_schema_output() {
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;
@@ -1366,7 +1366,7 @@ function saswp_schema_output() {
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,7 +1381,7 @@ function saswp_schema_output() {
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,7 +1406,7 @@ function saswp_schema_output() {
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,7 +1427,7 @@ function saswp_schema_output() {
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,7 +1444,7 @@ function saswp_schema_output() {
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,13 +1464,13 @@ function saswp_schema_output() {
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,7 +1480,7 @@ function saswp_schema_output() {
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,7 +1503,7 @@ function saswp_schema_output() {
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,7 +1525,7 @@ function saswp_schema_output() {
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,7 +1545,7 @@ function saswp_schema_output() {
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,7 +1567,7 @@ function saswp_schema_output() {
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,7 +1584,7 @@ function saswp_schema_output() {
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,7 +1593,7 @@ function saswp_schema_output() {
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,7 +1640,7 @@ function saswp_schema_output() {
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,7 +1649,7 @@ function saswp_schema_output() {
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,7 +1666,7 @@ function saswp_schema_output() {
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,7 +1683,7 @@ function saswp_schema_output() {
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,7 +1691,7 @@ function saswp_schema_output() {
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,7 +1734,7 @@ function saswp_schema_output() {
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,7 +1781,7 @@ function saswp_schema_output() {
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,7 +1797,7 @@ function saswp_schema_output() {
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,7 +1836,7 @@ function saswp_schema_output() {
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,15 +1852,15 @@ function saswp_schema_output() {
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,7 +1897,7 @@ function saswp_schema_output() {
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,7 +1914,7 @@ function saswp_schema_output() {
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,7 +2738,7 @@ function saswp_about_page_output(){
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,7 +2786,7 @@ function saswp_contact_page_output(){
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)){
156
  return ;
157
  }
158
  $service_object = new saswp_output_service();
159
+
160
  $all_schema_output = array();
161
 
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 = 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();
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
 
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
 
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;
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
 
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
 
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
 
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;
331
 
332
  if($modified_schema == 1){
333
 
334
+ $input1 = saswp_howto_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
335
  }
336
 
337
  break;
348
 
349
  if($modified_schema == 1){
350
 
351
+ $input1 = saswp_trip_schema_markup($schema_post_id, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(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, 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(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, 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(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, 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, 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(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, 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(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, 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(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, 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, 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, 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, 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, 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, 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, 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, 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(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, get_the_ID(), $all_post_meta);
1124
  }
1125
 
1126
 
1139
 
1140
  if($modified_schema == 1){
1141
 
1142
+ $input1 = saswp_eop_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1143
  }
1144
 
1145
  break;
1146
 
1147
  case 'Event':
1148
 
1149
+ $event_type = 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, 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(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, 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(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, 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(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, 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(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, 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, 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, get_the_ID(), $all_post_meta);
1349
  }
1350
 
1351
  break;
1366
 
1367
  if($modified_schema == 1){
1368
 
1369
+ $input1 = saswp_article_schema_markup($schema_post_id, 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, 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, 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(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, 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(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(get_the_ID());
1474
 
1475
  }
1476
 
1480
 
1481
  if($modified_schema == 1){
1482
 
1483
+ $input1 = saswp_qanda_schema_markup($schema_post_id, 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, 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, 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, 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, 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, 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(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(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, 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, 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, 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 = 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, 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(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, 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(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, get_the_ID(), $all_post_meta);
1856
  }
1857
 
1858
  break;
1859
 
1860
  case 'local_business':
1861
 
1862
+ $business_type = get_post_meta($schema_post_id, 'saswp_business_type', true);
1863
+ $business_name = 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, 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 = 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[] = 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[] = 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 = saswp_get_the_ID();
54
 
55
  $acf_fields = apply_filters( 'acf/field_group/get_fields', array(), $post_id ); // WPCS: XSS OK.
56
 
@@ -125,7 +125,7 @@ Class saswp_output_service{
125
 
126
  global $post;
127
 
128
- $fixed_image = saswp_get_post_meta($schema_post_id, 'saswp_fixed_image', true) ;
129
 
130
  $response = null;
131
 
@@ -183,7 +183,7 @@ Class saswp_output_service{
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,7 +215,7 @@ Class saswp_output_service{
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,9 +257,19 @@ Class saswp_output_service{
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':
265
 
@@ -322,7 +332,7 @@ Class saswp_output_service{
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'){
@@ -472,15 +482,15 @@ Class saswp_output_service{
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,7 +507,7 @@ Class saswp_output_service{
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();
@@ -505,7 +515,7 @@ Class saswp_output_service{
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
 
@@ -516,7 +526,7 @@ Class saswp_output_service{
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'];
@@ -4168,7 +4178,7 @@ Class saswp_output_service{
4168
 
4169
  //product categories ends here
4170
 
4171
- $gtin = saswp_get_post_meta($post_id, $key='hwp_product_gtin', true);
4172
 
4173
  if($gtin !=''){
4174
 
@@ -4177,7 +4187,7 @@ Class saswp_output_service{
4177
  }
4178
 
4179
  $brand = '';
4180
- $brand = saswp_get_post_meta($post_id, $key='hwp_product_brand', true);
4181
 
4182
  if($brand !=''){
4183
 
@@ -4258,7 +4268,7 @@ Class saswp_output_service{
4258
  }
4259
 
4260
  if(!isset($product_details['product_mpn'])){
4261
- $product_details['product_mpn'] = saswp_get_the_ID();
4262
  }
4263
 
4264
  $product_details['product_availability'] = saswp_prepend_schema_org($product->get_stock_status());
@@ -4286,7 +4296,7 @@ Class saswp_output_service{
4286
  $product_details['product_price'] = $woo_price;
4287
  }
4288
 
4289
- $product_details['product_sku'] = $product->get_sku() ? $product->get_sku(): saswp_get_the_ID();
4290
 
4291
  if(isset($date_on_sale)){
4292
 
@@ -4341,10 +4351,10 @@ Class saswp_output_service{
4341
 
4342
  foreach($post_meta as $key => $val){
4343
 
4344
- $rv[$val] = saswp_get_post_meta($me_post->ID, $key, true );
4345
 
4346
  if($val == 'reviewRating'){
4347
- $sumofrating += saswp_get_post_meta($me_post->ID, $key, true );
4348
  }
4349
 
4350
 
@@ -4462,7 +4472,7 @@ Class saswp_output_service{
4462
  $item_enable = 0;
4463
  $review_count = "1";
4464
 
4465
- $rating_box = saswp_get_post_meta($post_id, 'saswp_review_details', true);
4466
 
4467
  if(isset($rating_box['saswp-review-item-over-all'])){
4468
 
@@ -4505,7 +4515,7 @@ Class saswp_output_service{
4505
  $post_review_title = '';
4506
  $post_review_desc = '';
4507
 
4508
- $post_meta = saswp_get_post_meta($post_id);
4509
 
4510
  if(isset($post_meta['_post_review_box_breakdowns_score'])){
4511
 
@@ -4623,7 +4633,7 @@ Class saswp_output_service{
4623
 
4624
  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')) ){
4625
 
4626
- $post_meta = saswp_get_post_meta($post_id);
4627
 
4628
  if(isset($post_meta['_dwqa_best_answer'])){
4629
 
@@ -4633,7 +4643,7 @@ Class saswp_output_service{
4633
 
4634
  $dw_qa['@type'] = 'Question';
4635
  $dw_qa['name'] = saswp_get_the_title();
4636
- $dw_qa['upvoteCount'] = saswp_get_post_meta( $post_id, '_dwqa_votes', true );
4637
 
4638
  $args = array(
4639
  'p' => $post_id, // ID of a page, post, or custom type
@@ -4678,7 +4688,7 @@ Class saswp_output_service{
4678
  if(is_object($authorinfo)){
4679
  $authorname = $authorinfo->data->user_nicename;
4680
  }else{
4681
- $anonymous_name = saswp_get_post_meta( $answer->ID, '_dwqa_anonymous_name', true );
4682
  if($anonymous_name && $anonymous_name !=''){
4683
  $authorname = $anonymous_name;
4684
  }
@@ -4687,7 +4697,7 @@ Class saswp_output_service{
4687
  if($answer->ID == $best_answer_id){
4688
 
4689
  $accepted_answer['@type'] = 'Answer';
4690
- $accepted_answer['upvoteCount'] = saswp_get_post_meta( $answer->ID, '_dwqa_votes', true );
4691
  $accepted_answer['url'] = get_permalink();
4692
  $accepted_answer['text'] = wp_strip_all_tags($answer->post_content);
4693
  $accepted_answer['dateCreated'] = get_the_date("Y-m-d\TH:i:s\Z", $answer);
@@ -4697,7 +4707,7 @@ Class saswp_output_service{
4697
 
4698
  $suggested_answer[] = array(
4699
  '@type' => 'Answer',
4700
- 'upvoteCount' => saswp_get_post_meta( $answer->ID, '_dwqa_votes', true ),
4701
  'url' => get_permalink(),
4702
  'text' => wp_strip_all_tags($answer->post_content),
4703
  'dateCreated' => get_the_date("Y-m-d\TH:i:s\Z", $answer),
@@ -4818,7 +4828,7 @@ Class saswp_output_service{
4818
  }
4819
 
4820
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
4821
- $input1['comment'] = saswp_get_comments(saswp_get_the_ID());
4822
  }
4823
 
4824
  break;
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
 
125
 
126
  global $post;
127
 
128
+ $fixed_image = get_post_meta($schema_post_id, 'saswp_fixed_image', true) ;
129
 
130
  $response = null;
131
 
183
  break;
184
  case 'manual_text':
185
 
186
+ $fixed_text = 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 = 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 = get_post_meta($schema_post_id, 'saswp_custom_meta_field', true);
261
+
262
+ if(strpos($cus_field[$key], "image") !== false){
263
+ $response = get_post_meta($post->ID, $cus_field[$key], true);
264
+ if(is_numeric($response)){
265
+ $response = saswp_get_image_by_id($response);
266
+ }else{
267
+ $response = get_post_meta($post->ID, $cus_field[$key], true);
268
+ }
269
+ }else{
270
+ $response = get_post_meta($post->ID, $cus_field[$key], true);
271
+ }
272
+
273
  break;
274
  case 'fixed_image':
275
 
332
 
333
  if($acf_obj['type'] == 'image'){
334
 
335
+ $image_id = get_post_meta($post->ID, $field, true );
336
  $response = saswp_get_image_by_id($image_id);
337
 
338
  }else if($acf_obj['type'] == 'repeater'){
482
  }
483
 
484
  }else{
485
+ $response = get_post_meta($post->ID, $field, true );
486
  }
487
 
488
  }else{
489
+ $response = get_post_meta($post->ID, $field, true );
490
  }
491
 
492
  }else{
493
+ $response = get_post_meta($post->ID, $field, true );
494
  }
495
 
496
  break;
507
  */
508
  public function saswp_replace_with_custom_fields_value($input1, $schema_post_id){
509
 
510
+ $custom_fields = get_post_meta($schema_post_id, 'saswp_meta_list_val', true);
511
  $allowed_html = saswp_expanded_allowed_tags();
512
  $review_markup = array();
513
  $review_response = array();
515
 
516
  if(!empty($custom_fields)){
517
 
518
+ $schema_type = get_post_meta( $schema_post_id, 'schema_type', true);
519
 
520
  foreach ($custom_fields as $key => $field){
521
 
526
  if($schema_type == 'Review'){
527
 
528
  $main_schema_type = $schema_type;
529
+ $schema_type = get_post_meta($schema_post_id, 'saswp_review_item_reviewed_'.$schema_post_id, true);
530
 
531
  if(isset($custom_fields['saswp_review_name'])){
532
  $review_markup['name'] = $custom_fields['saswp_review_name'];
4178
 
4179
  //product categories ends here
4180
 
4181
+ $gtin = get_post_meta($post_id, $key='hwp_product_gtin', true);
4182
 
4183
  if($gtin !=''){
4184
 
4187
  }
4188
 
4189
  $brand = '';
4190
+ $brand = get_post_meta($post_id, $key='hwp_product_brand', true);
4191
 
4192
  if($brand !=''){
4193
 
4268
  }
4269
 
4270
  if(!isset($product_details['product_mpn'])){
4271
+ $product_details['product_mpn'] = get_the_ID();
4272
  }
4273
 
4274
  $product_details['product_availability'] = saswp_prepend_schema_org($product->get_stock_status());
4296
  $product_details['product_price'] = $woo_price;
4297
  }
4298
 
4299
+ $product_details['product_sku'] = $product->get_sku() ? $product->get_sku(): get_the_ID();
4300
 
4301
  if(isset($date_on_sale)){
4302
 
4351
 
4352
  foreach($post_meta as $key => $val){
4353
 
4354
+ $rv[$val] = get_post_meta($me_post->ID, $key, true );
4355
 
4356
  if($val == 'reviewRating'){
4357
+ $sumofrating += get_post_meta($me_post->ID, $key, true );
4358
  }
4359
 
4360
 
4472
  $item_enable = 0;
4473
  $review_count = "1";
4474
 
4475
+ $rating_box = get_post_meta($post_id, 'saswp_review_details', true);
4476
 
4477
  if(isset($rating_box['saswp-review-item-over-all'])){
4478
 
4515
  $post_review_title = '';
4516
  $post_review_desc = '';
4517
 
4518
+ $post_meta = get_post_meta($post_id);
4519
 
4520
  if(isset($post_meta['_post_review_box_breakdowns_score'])){
4521
 
4633
 
4634
  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')) ){
4635
 
4636
+ $post_meta = get_post_meta($post_id);
4637
 
4638
  if(isset($post_meta['_dwqa_best_answer'])){
4639
 
4643
 
4644
  $dw_qa['@type'] = 'Question';
4645
  $dw_qa['name'] = saswp_get_the_title();
4646
+ $dw_qa['upvoteCount'] = get_post_meta( $post_id, '_dwqa_votes', true );
4647
 
4648
  $args = array(
4649
  'p' => $post_id, // ID of a page, post, or custom type
4688
  if(is_object($authorinfo)){
4689
  $authorname = $authorinfo->data->user_nicename;
4690
  }else{
4691
+ $anonymous_name = get_post_meta( $answer->ID, '_dwqa_anonymous_name', true );
4692
  if($anonymous_name && $anonymous_name !=''){
4693
  $authorname = $anonymous_name;
4694
  }
4697
  if($answer->ID == $best_answer_id){
4698
 
4699
  $accepted_answer['@type'] = 'Answer';
4700
+ $accepted_answer['upvoteCount'] = get_post_meta( $answer->ID, '_dwqa_votes', true );
4701
  $accepted_answer['url'] = get_permalink();
4702
  $accepted_answer['text'] = wp_strip_all_tags($answer->post_content);
4703
  $accepted_answer['dateCreated'] = get_the_date("Y-m-d\TH:i:s\Z", $answer);
4707
 
4708
  $suggested_answer[] = array(
4709
  '@type' => 'Answer',
4710
+ 'upvoteCount' => get_post_meta( $answer->ID, '_dwqa_votes', true ),
4711
  'url' => get_permalink(),
4712
  'text' => wp_strip_all_tags($answer->post_content),
4713
  'dateCreated' => get_the_date("Y-m-d\TH:i:s\Z", $answer),
4828
  }
4829
 
4830
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
4831
+ $input1['comment'] = saswp_get_comments(get_the_ID());
4832
  }
4833
 
4834
  break;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.8
6
- Stable tag: 1.9.82.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -120,6 +120,20 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  = 1.9.82.2 (28 July 2021) =
124
 
125
  * Added: Feefo reviews ( https://www.feefo.com ) platform
@@ -1257,7 +1271,7 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
1257
  * Bug Fixed: Notice: Undefined variable: custom_markup #308
1258
  * Bug Fixed: JS and CSS should be included where it's need. #294
1259
  * Bug Fixed: Remove duplicate queries #296
1260
- * Bug Fixed: Google Review Module ( saswp_update_post_meta was called earlier than its actually call ) #307
1261
  * Bug Fixed: When extensions are active then it should show #313
1262
  * Bug Fixed: Compatibility conflicts with WooCommerce SEO #312
1263
  * Bug Fixed: '@type' => 'VideoObject' is missing in recipe schema video entity #314
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.83
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.83 (10 Aug 2021) =
124
+
125
+ * Fixed: when "Add Schema Markup in footer" checked breadcurm does not work properly #1477
126
+ * Fixed: Item list heading are not working if the content generating from shortcode #1494
127
+ * Fixed: Compatibility issue with SmartCrawl plugin #1490
128
+ * Fixed: Error in Article schema #1486
129
+ * Fixed: getting image warning after placing the image also (image: 91 (The value provided for image must be a valid URL.)) #1470
130
+ * Fixed: License Key {Fatal Error}- Reviews for Schema #1473
131
+ * Fixed: css issue of star ratings in comment form with Neptune by Osetin Theme. #1476
132
+ * Added: Auto Listings Plugin integration #1493
133
+ * Fixed: conflict with popup maker when schema enabled #1495
134
+ * Fixed: Article category("Thing" is not a known valid target type for the publisher property) #1474
135
+
136
+
137
  = 1.9.82.2 (28 July 2021) =
138
 
139
  * Added: Feefo reviews ( https://www.feefo.com ) platform
1271
  * Bug Fixed: Notice: Undefined variable: custom_markup #308
1272
  * Bug Fixed: JS and CSS should be included where it's need. #294
1273
  * Bug Fixed: Remove duplicate queries #296
1274
+ * Bug Fixed: Google Review Module ( update_post_meta was called earlier than its actually call ) #307
1275
  * Bug Fixed: When extensions are active then it should show #313
1276
  * Bug Fixed: Compatibility conflicts with WooCommerce SEO #312
1277
  * 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.82.2
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.82.2');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
@@ -153,5 +153,4 @@ if( ! function_exists( 'saswp_start_plugin_tracking' ) ) {
153
  }
154
 
155
  saswp_start_plugin_tracking();
156
- }
157
-
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.83
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.83');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
153
  }
154
 
155
  saswp_start_plugin_tracking();
156
+ }
 
view/common.php CHANGED
@@ -50,7 +50,7 @@ class saswp_view_common_class {
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,7 +210,7 @@ class saswp_view_common_class {
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{
@@ -607,9 +607,7 @@ class saswp_view_common_class {
607
  $tabs_fields .= $this->saswp_schema_fields_html_on_the_fly($schema_type, $schema_id, $post_id, $disabled_schema, $modify_this, $modified);
608
 
609
  }
610
-
611
-
612
-
613
  return $tabs_fields;
614
  }
615
 
@@ -680,7 +678,7 @@ class saswp_view_common_class {
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){
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
  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{
607
  $tabs_fields .= $this->saswp_schema_fields_html_on_the_fly($schema_type, $schema_id, $post_id, $disabled_schema, $modify_this, $modified);
608
 
609
  }
610
+
 
 
611
  return $tabs_fields;
612
  }
613
 
678
  foreach($all_schema as $schema){
679
 
680
  if( isset($_POST['saswp_modify_this_schema_'.$schema->ID]) && !empty($_POST['saswp_modify_this_schema_'.$schema->ID]) ){
681
+ saswp_update_post_meta( $post_id, 'saswp_modify_this_schema_'.$schema->ID, intval($_POST['saswp_modify_this_schema_'.$schema->ID]));
682
  }
683
 
684
  foreach ($this->schema_type_element as $element){
view/help.php CHANGED
@@ -34,7 +34,7 @@ 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
 
34
 
35
  function saswp_location_meta_box_cb($post){
36
 
37
+ $location = get_post_meta($post->ID, 'saswp_loc_display_on_front', true);
38
 
39
  ?>
40
 
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 = 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,7 +28,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
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,10 +109,10 @@ if ( ! defined( 'ABSPATH' ) ) exit;
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
  }
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
 
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
  '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
  }
view/post_specific.php CHANGED
@@ -74,7 +74,7 @@ class saswp_post_specific {
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>
@@ -99,7 +99,7 @@ class saswp_post_specific {
99
  if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
100
  return;
101
  }
102
-
103
  $post_id = intval($_POST['post_id']);
104
  $schema_id = intval($_POST['schema_id']);
105
 
@@ -174,7 +174,7 @@ class saswp_post_specific {
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,7 +182,7 @@ class saswp_post_specific {
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,7 +221,7 @@ class saswp_post_specific {
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,7 +252,7 @@ class saswp_post_specific {
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,13 +260,13 @@ class saswp_post_specific {
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();
@@ -428,7 +428,7 @@ class saswp_post_specific {
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,7 +437,7 @@ class saswp_post_specific {
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){
@@ -581,7 +581,7 @@ class saswp_post_specific {
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;
@@ -591,9 +591,9 @@ class saswp_post_specific {
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);
@@ -617,9 +617,9 @@ class saswp_post_specific {
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);
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>
99
  if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
100
  return;
101
  }
102
+
103
  $post_id = intval($_POST['post_id']);
104
  $schema_id = intval($_POST['schema_id']);
105
 
174
  $modified = false;
175
 
176
  saswp_update_post_meta($post_id, 'saswp_modify_this_schema_'.$schema_id, 1);
177
+ $schema_type = 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 = 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 = get_post_meta($post_id, 'saswp_enable_disable_schema', true);
256
 
257
  if(is_array($schema_enable_status)){
258
 
260
 
261
  }else{
262
 
263
+ delete_post_meta($post_id, 'saswp_enable_disable_schema');
264
 
265
  }
266
 
267
  $schema_enable[$schema_id] = $status;
268
 
269
+ update_post_meta( $post_id, 'saswp_enable_disable_schema', $schema_enable);
270
 
271
  echo json_encode(array('status'=>'t'));
272
  wp_die();
428
  }
429
 
430
  $modify_this = saswp_get_post_meta($post->ID, 'saswp_modify_this_schema_'.$schema->ID, true);
431
+ $schema_type = 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 = '('.get_post_meta($schema->ID, 'saswp_itemlist_item_type', true).')';
441
  }
442
 
443
  if($schema_type == 'Review' && $modify_this){
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;
591
  $custom_schema = wp_kses(wp_unslash($_POST['saswp_custom_schema_field']), $allowed_html);
592
 
593
  if(!empty($custom_schema)){
594
+ update_term_meta( $post_id, 'saswp_custom_schema_field', $custom_schema );
595
  }else{
596
+ delete_term_meta( $post_id, 'saswp_custom_schema_field');
597
  }
598
 
599
  $this->_common_view->saswp_save_common_view($post_id, $this->all_schema);
617
  $custom_schema = wp_kses(wp_unslash($_POST['saswp_custom_schema_field']), $allowed_html);
618
 
619
  if(!empty($custom_schema)){
620
+ update_post_meta( $post_id, 'saswp_custom_schema_field', $custom_schema );
621
  }else{
622
+ 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
@@ -107,7 +107,7 @@ function saswp_schema_type_get_meta( $value ) {
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,22 +157,22 @@ function saswp_schema_type_meta_box_callback( $post) {
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,7 +557,7 @@ function saswp_schema_type_meta_box_callback( $post) {
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,7 +580,7 @@ function saswp_schema_type_meta_box_callback( $post) {
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,13 +673,13 @@ function saswp_schema_type_meta_box_callback( $post) {
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,11 +893,11 @@ function saswp_schema_type_meta_box_callback( $post) {
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,14 +1090,14 @@ function saswp_schema_type_meta_box_callback( $post) {
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,77 +1213,77 @@ function saswp_schema_type_add_meta_box_save( $post_id ) {
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
 
107
 
108
  global $post;
109
 
110
+ $field = 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 = get_post_meta($post->ID, 'schema_options', true);
161
+ $meta_list = get_post_meta($post->ID, 'saswp_meta_list_val', true);
162
+ $fixed_text = get_post_meta($post->ID, 'saswp_fixed_text', true);
163
+ $taxonomy_term = get_post_meta($post->ID, 'saswp_taxonomy_term', true);
164
+ $fixed_image = get_post_meta($post->ID, 'saswp_fixed_image', true);
165
+ $cus_field = get_post_meta($post->ID, 'saswp_custom_meta_field', true);
166
+ $schema_type = get_post_meta($post->ID, 'schema_type', true);
167
+ $append_reviews = get_post_meta($post->ID, 'saswp_enable_append_reviews', true);
168
+ $event_type = get_post_meta($post->ID, 'saswp_event_type', true);
169
+ $speakable = get_post_meta($post->ID, 'saswp_enable_speakable_schema', true);
170
+ $enable_videoobject= get_post_meta($post->ID, 'saswp_enable_videoobject', true);
171
+ $item_list_enable = get_post_meta($post->ID, 'saswp_enable_itemlist_schema', true);
172
+ $item_list_tags = get_post_meta($post->ID, 'saswp_item_list_tags', true);
173
+ $item_list_custom = get_post_meta($post->ID, 'saswp_item_list_custom', true);
174
+ $business_type = get_post_meta($post->ID, 'saswp_business_type', true);
175
+ $business_name = 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 = 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 = 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 = 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 = 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 = get_post_meta($post->ID, 'schema_type', true);
897
 
898
  if($schema_type == 'Review'){
899
 
900
+ $item_reviewed = 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 = 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 = 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
+ update_post_meta( $post_id, 'schema_type', sanitize_text_field( $_POST['schema_type'] ) );
1217
 
1218
  if(isset($_POST['saswp_loc_display_on_front'])){
1219
+ update_post_meta( $post_id, 'saswp_loc_display_on_front', intval( $_POST['saswp_loc_display_on_front'] ) );
1220
  }else{
1221
+ delete_post_meta( $post_id, 'saswp_loc_display_on_front');
1222
  }
1223
 
1224
  if(isset($_POST['saswp_business_type'])){
1225
+ update_post_meta( $post_id, 'saswp_business_type', sanitize_text_field( $_POST['saswp_business_type'] ) );
1226
  }else{
1227
+ delete_post_meta( $post_id, 'saswp_business_type');
1228
  }
1229
 
1230
  if(isset($_POST['saswp_event_type'])){
1231
+ update_post_meta( $post_id, 'saswp_event_type', sanitize_text_field( $_POST['saswp_event_type'] ) );
1232
  }else{
1233
+ delete_post_meta( $post_id, 'saswp_event_type');
1234
  }
1235
 
1236
  if(isset($_POST['saswp_business_name'])){
1237
+ update_post_meta( $post_id, 'saswp_business_name', sanitize_text_field( $_POST['saswp_business_name'] ) );
1238
  }else{
1239
+ delete_post_meta( $post_id, 'saswp_business_name');
1240
  }
1241
  if(isset($_POST['saswp_enable_speakable_schema'])){
1242
+ update_post_meta( $post_id, 'saswp_enable_speakable_schema', intval($_POST['saswp_enable_speakable_schema']) );
1243
  }else{
1244
+ delete_post_meta( $post_id, 'saswp_enable_speakable_schema');
1245
  }
1246
  if(isset($_POST['saswp_enable_videoobject'])){
1247
+ update_post_meta( $post_id, 'saswp_enable_videoobject', intval($_POST['saswp_enable_videoobject']) );
1248
  }else{
1249
+ delete_post_meta( $post_id, 'saswp_enable_videoobject');
1250
  }
1251
 
1252
  if(isset($_POST['saswp_enable_append_reviews'])){
1253
+ update_post_meta( $post_id, 'saswp_enable_append_reviews', intval($_POST['saswp_enable_append_reviews']) );
1254
  }else{
1255
+ delete_post_meta( $post_id, 'saswp_enable_append_reviews');
1256
  }
1257
 
1258
  if(isset($_POST['saswp_enable_itemlist_schema'])){
1259
+ update_post_meta( $post_id, 'saswp_enable_itemlist_schema', intval($_POST['saswp_enable_itemlist_schema']) );
1260
  }else{
1261
+ delete_post_meta( $post_id, 'saswp_enable_itemlist_schema');
1262
  }
1263
 
1264
  if(isset($_POST['saswp_item_list_tags'])){
1265
+ update_post_meta( $post_id, 'saswp_item_list_tags', sanitize_text_field($_POST['saswp_item_list_tags']) );
1266
  }else{
1267
+ delete_post_meta( $post_id, 'saswp_item_list_tags');
1268
  }
1269
  if(isset($_POST['saswp_item_list_custom'])){
1270
+ update_post_meta( $post_id, 'saswp_item_list_custom', sanitize_text_field($_POST['saswp_item_list_custom']) );
1271
  }else{
1272
+ delete_post_meta( $post_id, 'saswp_item_list_custom');
1273
  }
1274
  if(isset($_POST['saswp_review_item_reviewed_'.$post_id])){
1275
+ update_post_meta( $post_id, 'saswp_review_item_reviewed_'.$post_id, sanitize_text_field($_POST['saswp_review_item_reviewed_'.$post_id]) );
1276
  }else{
1277
+ delete_post_meta( $post_id, 'saswp_review_item_reviewed_'.$post_id);
1278
  }
1279
  if(isset($_POST['saswp_itemlist_item_type'])){
1280
+ update_post_meta( $post_id, 'saswp_itemlist_item_type', sanitize_text_field($_POST['saswp_itemlist_item_type']) );
1281
  }else{
1282
+ delete_post_meta( $post_id, 'saswp_itemlist_item_type');
1283
  }
1284
 
1285
+ update_post_meta( $post_id, 'saswp_attahced_reviews', json_decode(wp_unslash($_POST['saswp_attahced_reviews'])) );
1286
+ 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