Schema & Structured Data for WP & AMP - Version 1.9.17

Version Description

(05 Dec 2019) =

  • Major Feature: Reviews Collection ( Create a collection using different platform's reviews and display them using shortcode with multiple design option )
  • Added: compatibility with Easy Testimonials ( https://wordpress.org/plugins/easy-testimonials/ ) #582
  • Added: compatibility with BNE Testimonials ( https://wordpress.org/plugins/bne-testimonials/ ) #582
  • Added: inLanguage property in schema markup #599
  • Added: ImageObject Schema type #621
  • Added: ItemList schema type. #605
  • Fixed: Custom field for description property should not pull styles and html #602
  • Fixed: In Yoast SEO,the website schema is not fetching the description correctly. #614
  • Fixed: Breadcrumb schema taking id of the first product on the shop page. #601
  • Fixed: Fix PostalAddress in Schema Type "Event" #620
  • Fixed: Added "Time Need" text in translation panel #639
  • Fixed: Problem With Review Schema #606
  • Fixed: HTML code is displaying instead of text at description box in structure data testing tool #640
  • Fixed: If a shortcode for review is available on product page then it should fetch the review automatically. #603
  • Enhancement: Remove unwanted metabox from saswp custom post type #626
  • Enhancement: Remove unwanted notice boxes from saswp custom post type #641
  • Enhancement: Improve modify schema output option #607
  • Enhancement: Added option if User do not want to use default product Review. #619
Download this release

Release Info

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

Code changes from version 1.9.16.2 to 1.9.17

Files changed (56) hide show
  1. admin_section/common-function.php +154 -12
  2. admin_section/css/amp/collection-front-badge.css +97 -0
  3. admin_section/css/amp/collection-front-fomo.css +75 -0
  4. admin_section/css/amp/collection-front-gallery.css +202 -0
  5. admin_section/css/amp/collection-front-global.css +5 -0
  6. admin_section/css/amp/collection-front-grid.css +116 -0
  7. admin_section/css/amp/collection-front-popup.css +148 -0
  8. admin_section/css/collection-front.css +1067 -0
  9. admin_section/css/collection-front.min.css +1 -0
  10. admin_section/css/main-style.css +1071 -18
  11. admin_section/css/main-style.min.css +1 -66
  12. admin_section/css/saswp-style.css +7 -0
  13. admin_section/images/reviews_platform_icon/Best_Buy_logo.svg.png +0 -0
  14. admin_section/images/reviews_platform_icon/apple-appstore-img.png +0 -0
  15. admin_section/images/reviews_platform_icon/booking-img.png +0 -0
  16. admin_section/images/reviews_platform_icon/cars-img.png +0 -0
  17. admin_section/images/reviews_platform_icon/classpass-img.png +0 -0
  18. admin_section/images/reviews_platform_icon/{consumeraffairs-img.png → consumer-affairs-img.png} +0 -0
  19. admin_section/images/reviews_platform_icon/gartner-img.png +0 -0
  20. admin_section/images/reviews_platform_icon/hotels-img.png +0 -0
  21. admin_section/images/reviews_platform_icon/lawyers-img.png +0 -0
  22. admin_section/images/reviews_platform_icon/rotten-tomatoes-img.png +0 -0
  23. admin_section/js/{saswp-newsletter.js → amp/collection-front.js} +0 -0
  24. admin_section/js/collection-front.js +179 -0
  25. admin_section/js/collection-front.min.js +1 -0
  26. admin_section/js/functions-list.js +0 -0
  27. admin_section/js/functions-list.min.js +1 -0
  28. admin_section/js/main-script.js +425 -497
  29. admin_section/js/main-script.min.js +1 -1
  30. admin_section/js/structure_admin.js +1 -3
  31. admin_section/plugin-installer/install.php +4 -4
  32. admin_section/settings.php +51 -5
  33. admin_section/structure_admin.php +32 -20
  34. core/array-list/compatibility-list.php +7 -0
  35. core/array-list/plugins.php +0 -132
  36. core/array-list/repeater-fields.php +384 -0
  37. core/array-list/schema-properties.php +3431 -0
  38. core/array-list/schemas.php +1 -0
  39. google_review/google_review.php +0 -303
  40. google_review/google_review_page.php +0 -400
  41. google_review/google_review_setup.php +0 -245
  42. google_review/google_review_widget.php +0 -129
  43. metaboxes/help.php +0 -21
  44. modules/gutenberg/assets/blocks/faq.js +1 -1
  45. modules/gutenberg/assets/blocks/how-to.js +1 -1
  46. modules/gutenberg/includes/class-gutenberg.php +1 -1
  47. {reviews → modules/reviews}/reviews_admin.php +4 -3
  48. modules/reviews/reviews_collection.php +611 -0
  49. modules/reviews/reviews_service.php +1300 -0
  50. {reviews → modules/reviews}/reviews_setup.php +16 -9
  51. {reviews → modules/reviews}/reviews_widget.php +1 -1
  52. output/flexmls.php +0 -349
  53. output/function.php +351 -824
  54. output/markup.php +2419 -0
  55. output/output.php +152 -168
  56. output/output_post_specific.php +0 -246
admin_section/common-function.php CHANGED
@@ -28,7 +28,8 @@ if ( ! defined('ABSPATH') ) exit;
28
  'translation-review-overview' => 'Review Overview',
29
  'translation-overall-score' => 'Overall Score',
30
  'translation-tools' => 'Tools',
31
- 'translation-materials' => 'Materials',
 
32
  );
33
  //global variable to store List of labels ends here
34
 
@@ -1553,6 +1554,7 @@ if ( ! defined('ABSPATH') ) exit;
1553
  'add-on' => array(),
1554
  'license-status' => array(),
1555
  'class' => array(),
 
1556
  );
1557
  $my_allowed['p'] = array(
1558
  'add-on' => array(),
@@ -1641,7 +1643,8 @@ if ( ! defined('ABSPATH') ) exit;
1641
  'saswp-for-wordpress' => 1,
1642
  'sd_initial_wizard_status' => 1,
1643
  'saswp-microdata-cleanup' => 1,
1644
- 'saswp-other-images' => 1
 
1645
 
1646
  );
1647
 
@@ -1706,7 +1709,9 @@ if ( ! defined('ABSPATH') ) exit;
1706
  wp_enqueue_style( 'saswp-style', SASWP_PLUGIN_URL . 'admin_section/css/saswp-style.min.css', false , SASWP_VERSION );
1707
 
1708
  }
1709
-
 
 
1710
 
1711
  }
1712
  /**
@@ -2080,7 +2085,8 @@ if ( ! defined('ABSPATH') ) exit;
2080
  function saswp_get_the_content(){
2081
 
2082
  global $post;
2083
- $content = '';
 
2084
  if(is_object($post)){
2085
  $content = get_post_field('post_content', $post->ID);
2086
  $content = wp_strip_all_tags(strip_shortcodes($content));
@@ -2123,9 +2129,7 @@ if ( ! defined('ABSPATH') ) exit;
2123
  }
2124
 
2125
  }
2126
-
2127
- $excerpt = wp_strip_all_tags(strip_shortcodes($excerpt));
2128
-
2129
  if(saswp_remove_warnings($sd_data, 'saswp-yoast', 'saswp_string') == 1){
2130
 
2131
  $yoast_meta_des = saswp_convert_yoast_metafields($post->ID, 'metadesc');
@@ -2211,7 +2215,9 @@ if ( ! defined('ABSPATH') ) exit;
2211
  }
2212
 
2213
  }
2214
-
 
 
2215
  return apply_filters('saswp_the_excerpt' ,$excerpt);
2216
  }
2217
  /**
@@ -2234,7 +2240,27 @@ if ( ! defined('ABSPATH') ) exit;
2234
  }
2235
  return '';
2236
  }
2237
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2238
  /**
2239
  * since @1.8.7
2240
  * Here we are modifying the default title
@@ -2493,11 +2519,10 @@ function saswp_uninstall_single($blog_id = null){
2493
  $query = "SELECT ID FROM " . $wpdb->posts;
2494
  $all_post_id = $wpdb->get_results($query, ARRAY_A );
2495
  $all_post_id = wp_list_pluck( $all_post_id, 'ID' );
2496
- $post_specific = new saswp_post_specific();
2497
-
2498
  foreach($post_ids as $post_id){
2499
 
2500
- $meta_fields = $post_specific->saswp_get_fields_by_schema_type($post_id);
2501
  $meta_fields = wp_list_pluck( $meta_fields, 'id' );
2502
 
2503
  foreach ($meta_fields as $meta_key){
@@ -2682,4 +2707,121 @@ function saswp_format_date_time($date, $time=null){
2682
  }
2683
 
2684
  return $formated;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2685
  }
28
  'translation-review-overview' => 'Review Overview',
29
  'translation-overall-score' => 'Overall Score',
30
  'translation-tools' => 'Tools',
31
+ 'translation-materials' => 'Materials',
32
+ 'translation-time-needed' => 'Time Needed',
33
  );
34
  //global variable to store List of labels ends here
35
 
1554
  'add-on' => array(),
1555
  'license-status' => array(),
1556
  'class' => array(),
1557
+ 'data-id' => array()
1558
  );
1559
  $my_allowed['p'] = array(
1560
  'add-on' => array(),
1643
  'saswp-for-wordpress' => 1,
1644
  'sd_initial_wizard_status' => 1,
1645
  'saswp-microdata-cleanup' => 1,
1646
+ 'saswp-other-images' => 1,
1647
+ 'saswp_default_review' => 1
1648
 
1649
  );
1650
 
1709
  wp_enqueue_style( 'saswp-style', SASWP_PLUGIN_URL . 'admin_section/css/saswp-style.min.css', false , SASWP_VERSION );
1710
 
1711
  }
1712
+
1713
+ wp_enqueue_style( 'saswp-collection-front-css', SASWP_PLUGIN_URL . 'admin_section/css/'.(SASWP_ENVIRONMENT == 'production' ? 'collection-front.min.css' : 'collection-front.css'), false , SASWP_VERSION );
1714
+ wp_enqueue_script( 'saswp-collection-front-js', SASWP_PLUGIN_URL . 'admin_section/js/'.(SASWP_ENVIRONMENT == 'production' ? 'collection-front.min.js' : 'collection-front.js'), array('jquery') , SASWP_VERSION );
1715
 
1716
  }
1717
  /**
2085
  function saswp_get_the_content(){
2086
 
2087
  global $post;
2088
+ $content = '';
2089
+
2090
  if(is_object($post)){
2091
  $content = get_post_field('post_content', $post->ID);
2092
  $content = wp_strip_all_tags(strip_shortcodes($content));
2129
  }
2130
 
2131
  }
2132
+
 
 
2133
  if(saswp_remove_warnings($sd_data, 'saswp-yoast', 'saswp_string') == 1){
2134
 
2135
  $yoast_meta_des = saswp_convert_yoast_metafields($post->ID, 'metadesc');
2215
  }
2216
 
2217
  }
2218
+
2219
+ $excerpt = wp_strip_all_tags(strip_shortcodes($excerpt));
2220
+
2221
  return apply_filters('saswp_the_excerpt' ,$excerpt);
2222
  }
2223
  /**
2240
  }
2241
  return '';
2242
  }
2243
+
2244
+ function saswp_get_blog_desc(){
2245
+
2246
+ global $sd_data;
2247
+
2248
+ $blog_desc = get_bloginfo('description');
2249
+
2250
+ if(isset($sd_data['saswp-yoast']) && $sd_data['saswp-yoast'] == 1){
2251
+
2252
+ if(class_exists('WPSEO_Frontend')){
2253
+
2254
+ $front = WPSEO_Frontend::get_instance();
2255
+ $blog_desc = $front->metadesc( false );
2256
+
2257
+ }
2258
+
2259
+ }
2260
+
2261
+ return $blog_desc;
2262
+ }
2263
+
2264
  /**
2265
  * since @1.8.7
2266
  * Here we are modifying the default title
2519
  $query = "SELECT ID FROM " . $wpdb->posts;
2520
  $all_post_id = $wpdb->get_results($query, ARRAY_A );
2521
  $all_post_id = wp_list_pluck( $all_post_id, 'ID' );
2522
+
 
2523
  foreach($post_ids as $post_id){
2524
 
2525
+ $meta_fields = saswp_get_fields_by_schema_type($post_id);
2526
  $meta_fields = wp_list_pluck( $meta_fields, 'id' );
2527
 
2528
  foreach ($meta_fields as $meta_key){
2707
  }
2708
 
2709
  return $formated;
2710
+ }
2711
+
2712
+ function saswp_https( $url ) {
2713
+
2714
+ return str_replace( 'http://', 'https://', $url );
2715
+
2716
+ }
2717
+
2718
+ function saswp_remove_unwanted_metabox(){
2719
+
2720
+ global $wp_meta_boxes;
2721
+
2722
+ if(get_post_type() == 'saswp' || get_post_type() == 'saswp_reviews'){
2723
+ $wp_meta_boxes = array();
2724
+ }
2725
+
2726
+ return $wp_meta_boxes;
2727
+ }
2728
+
2729
+
2730
+ function saswp_remove_unwanted_notice_boxes(){
2731
+
2732
+ $screen_id = '';
2733
+ $current_screen = get_current_screen();
2734
+
2735
+ if(is_object($current_screen)){
2736
+ $screen_id = $current_screen->id;
2737
+ }
2738
+
2739
+ if( get_post_type() == 'saswp' ||
2740
+ get_post_type() == 'saswp_reviews' ||
2741
+ get_post_type() == 'saswp-collections' ||
2742
+ $screen_id =='saswp_page_structured_data_options' ||
2743
+ $screen_id =='edit-saswp' ||
2744
+ $screen_id == 'saswp'
2745
+ ){
2746
+
2747
+ remove_all_actions('admin_notices');
2748
+
2749
+ add_action( 'admin_notices', 'saswp_admin_notice' );
2750
+ }
2751
+
2752
+ }
2753
+
2754
+ add_action('in_admin_header', 'saswp_remove_unwanted_notice_boxes');
2755
+
2756
+ function saswp_admin_notice(){
2757
+
2758
+ $screen_id = '';
2759
+ $current_screen = get_current_screen();
2760
+
2761
+ if(is_object($current_screen)){
2762
+ $screen_id = $current_screen->id;
2763
+ }
2764
+
2765
+ $nonce = wp_create_nonce( 'saswp_install_wizard_nonce' );
2766
+
2767
+ $setup_notice = '<div class="updated notice message notice notice-alt saswp-setup-notice">'
2768
+ . '<p>'
2769
+ . '<strong>'.esc_html__('Welcome to Schema & Structured Data For WP', 'schema-and-structured-data-for-wp').'</strong>'
2770
+ .' - '.esc_html__('You are almost ready :)', 'schema-and-structured-data-for-wp')
2771
+ . '</p>'
2772
+ . '<p>'
2773
+ . '<a class="button button-primary" href="'.esc_url(admin_url( 'plugins.php?page=saswp-setup-wizard' ).'&_saswp_nonce='.$nonce).'">'
2774
+ . esc_html__('Run the Setup Wizard', 'schema-and-structured-data-for-wp')
2775
+ . '</a> '
2776
+ .'<a class="button saswp-skip-button">'
2777
+ . esc_html__('Skip Setup', 'schema-and-structured-data-for-wp')
2778
+ . '</a>'
2779
+ . '</p>'
2780
+ . '</div>';
2781
+
2782
+
2783
+
2784
+ $sd_data = get_option('sd_data');
2785
+
2786
+ if(($screen_id =='saswp_page_structured_data_options' ||$screen_id == 'plugins' || $screen_id =='edit-saswp' || $screen_id == 'saswp') && !isset($sd_data['sd_initial_wizard_status'])){
2787
+
2788
+ echo $setup_notice;
2789
+
2790
+ }
2791
+ //Feedback notice
2792
+ $activation_date = get_option("saswp_activation_date");
2793
+ $activation_never = get_option("saswp_activation_never");
2794
+ $next_days = strtotime("+7 day", strtotime($activation_date));
2795
+ $next_days = date('Y-m-d', $next_days);
2796
+ $current_date = date("Y-m-d");
2797
+
2798
+ if(($next_days < $current_date) && $activation_never !='never' ){
2799
+ ?>
2800
+ <div class="updated notice message notice notice-alt saswp-feedback-notice">
2801
+ <p><span class="dashicons dashicons-thumbs-up"></span>
2802
+ <?php echo esc_html__('You have been using the Schema & Structured Data for WP & AMP for some time. Now, Do you like it? If Yes.', 'schema-and-structured-data-for-wp') ?>
2803
+ <a class="saswp-revws-lnk" target="_blank" href="https://wordpress.org/plugins/schema-and-structured-data-for-wp/#reviews"> <?php echo esc_html__('Rate Plugin', 'schema-and-structured-data-for-wp') ?></a>
2804
+ </p>
2805
+ <div class="saswp-update-notice-btns">
2806
+ <a class="saswp-feedback-remindme"><?php echo esc_html__('Remind Me Later', 'schema-and-structured-data-for-wp') ?></a>
2807
+ <a class="saswp-feedback-no-thanks"><?php echo esc_html__('No Thanks', 'schema-and-structured-data-for-wp') ?></a>
2808
+ </div>
2809
+ </div>
2810
+ <?php
2811
+ }
2812
+
2813
+ if(isset($sd_data['sd_default_image']['url']) && $sd_data['sd_default_image']['url'] == '' && ($screen_id =='saswp_page_structured_data_options' ||$screen_id == 'plugins' || $screen_id =='edit-saswp' || $screen_id == 'saswp')){
2814
+
2815
+ ?>
2816
+ <div class="updated notice is-dismissible message notice notice-alt saswp-feedback-notice">
2817
+ <p>
2818
+ <span><?php echo esc_html__('You have not set up default image in Schema & Structured Data For WP.', 'schema-and-structured-data-for-wp') ?> </span>
2819
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=structured_data_options&tab=general#saswp-default-container' ) ); ?>"> <?php echo esc_html__('Please Setup', 'schema-and-structured-data-for-wp') ?></a>
2820
+ </p>
2821
+ </div>
2822
+
2823
+ <?php
2824
+
2825
+ }
2826
+
2827
  }
admin_section/css/amp/collection-front-badge.css ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** Badges CSS **/
2
+ .saswp-r3 ul{
3
+ padding:0px;
4
+ display:grid;
5
+ grid-template-columns:190px 190px 190px 190px;
6
+ grid-gap: 30px;
7
+ list-style-type:none;
8
+ margin:0;
9
+ justify-content: center;
10
+ }
11
+ .saswp-r3 li{
12
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,.26);
13
+ }
14
+ .artl-cnt .saswp-r3 li{
15
+ padding:0px;
16
+ }
17
+ .artl-cnt .saswp-r3 li:before{
18
+ display:none;
19
+ }
20
+ .saswp-r3 li a{
21
+ text-decoration:none;
22
+ }
23
+ .saswp-r3-lg{
24
+ background: #f8f8f8;
25
+ display: flex;
26
+ border-bottom: 1px solid #e8e8e8;
27
+ align-items: center;
28
+ justify-content: center;
29
+ width: 100%;
30
+ padding: 6px 8px;
31
+ box-sizing: border-box;
32
+ border-radius: 3px 3px 0px 0px;
33
+ }
34
+ .saswp-r3-lg amp-img{
35
+ max-width: 18px;
36
+ max-height: 18px;
37
+ margin-right: 6px;
38
+ border-radius: 100px;
39
+ }
40
+ .saswp-r3-lg .saswp-r3-tlt{
41
+ font-size: 12px;
42
+ line-height: 1.4;
43
+ text-transform: uppercase;
44
+ color: #555;
45
+ font-weight: 400;
46
+ }
47
+ .saswp-r3-lg span{
48
+ line-height: 0;
49
+ }
50
+ .saswp-r3-rtng{
51
+ padding: 13px 10px 10px 10px;
52
+ background: #fff;
53
+ border-radius: 0px 0px 3px 3px;
54
+ text-align: center;
55
+ }
56
+ .saswp-r3-rtxt{
57
+ display: flex;
58
+ align-items: center;
59
+ line-height: 0;
60
+ width: 100%;
61
+ margin-bottom: 4px;
62
+ justify-content: center;
63
+ }
64
+ .saswp-r3-brv{
65
+ color: #666;
66
+ font-size: 13px;
67
+ line-height: 1;
68
+ }
69
+ .saswp-r3-rtxt .saswp-r3-num{
70
+ color: #666;
71
+ margin-right: 10px;
72
+ font-size: 20px;
73
+ width:30px;
74
+ }
75
+ .saswp-r3 .saswp-rvw-str .df-clr, .saswp-r3 .saswp-rvw-str .half-str, .saswp-r3 .saswp-rvw-str .str-ic {
76
+ display: inline-block;
77
+ width: 22px;
78
+ height: 22px;
79
+ background-repeat: no-repeat;
80
+ background-size: 22px;
81
+ margin-right: 3px;
82
+ }
83
+
84
+ @media(max-width:800px){
85
+ .saswp-r3 ul{
86
+ grid-template-columns:190px 190px;
87
+ grid-gap: 20px
88
+ }
89
+
90
+ }
91
+
92
+ @media(max-width:600px){
93
+ .saswp-r3 ul{
94
+ grid-template-columns: 190px;
95
+ }
96
+
97
+ }
admin_section/css/amp/collection-front-fomo.css ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** Fomo CSS **/
2
+ .saswp-r5{
3
+ position: fixed;
4
+ bottom: 20px;
5
+ left: 20px;
6
+ width: calc(100% - 20px);
7
+ max-width: 325px;
8
+ border-radius: 12px;
9
+ background: #fff;
10
+ border: 1px solid #e6e6e6;
11
+ box-shadow: 0 0 8px 0px rgba(0, 0, 0, 0.05);
12
+ transition: all .3s ease-in;
13
+ height: 80px;
14
+ }
15
+ #saswp-reviews-fomo-amp .amp-carousel-button { display: none }
16
+
17
+ .saswp-r5-r{
18
+ display: flex;
19
+ flex-wrap: wrap;
20
+ width: 100%;
21
+ align-items: center;
22
+ height:80px;
23
+ }
24
+ .saswp-r5-rng{
25
+ flex:1 0 60%;
26
+ padding-left: 15px;
27
+ position: relative;
28
+ top: 0px;
29
+ }
30
+ .saswp-r5 .saswp-rvw-str .df-clr, .saswp-r5 .saswp-rvw-str .half-str, .saswp-r5 .saswp-rvw-str .str-ic {
31
+ display: inline-block;
32
+ width: 23px;
33
+ height: 20px;
34
+ background-repeat: no-repeat;
35
+ background-size: 20px;
36
+ }
37
+ .saswp-r5-lg{
38
+ width: 80px;
39
+ height: 100%;
40
+ border-right: 1px solid #ddd;
41
+ box-sizing: border-box;
42
+ background: linear-gradient(to bottom,#fefefe 0,#f2f2f2 100%);
43
+ position: relative;
44
+ display: flex;
45
+ align-items: center;
46
+ border-radius: 12px 0px 0px 12px;
47
+ }
48
+ .saswp-r5-r .saswp-r5-lg amp-img{
49
+ position: relative;
50
+ max-width: 40px;
51
+ left: 20PX;
52
+ border-radius: 10px 0px 0px 10px;
53
+ top: 4px;
54
+ }
55
+ .saswp-r5-txrng{
56
+ font-size: 12px;
57
+ line-height: 1.2;
58
+ color: #444;
59
+ display: flex;
60
+ margin-bottom: 2px;
61
+ }
62
+ .saswp-r5-txrng span{
63
+ font-weight: 600;
64
+ color: #666;
65
+ margin-right: 5px
66
+ }
67
+ .saswp-r5-rng span.saswp-r5-dt{
68
+ display: block;
69
+ font-size: 11px;
70
+ color: #ababab;
71
+ font-weight: normal;
72
+ }
73
+ .saswp-r5 a{
74
+ text-decoration:none;
75
+ }
admin_section/css/amp/collection-front-gallery.css ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** Slider Design CSS **/
2
+
3
+ .saswp-r li {
4
+ list-style-type: none;
5
+ }
6
+ .saswp-r2-q svg{
7
+ width: 20px;
8
+ fill: #bbb;
9
+ position: absolute;
10
+ height: 30px;
11
+ top: 15px;
12
+ left: 12px;
13
+ }
14
+ .saswp-r2-b {
15
+ padding: 20px 40px 20px 40px;
16
+ background-color: #fafafa;
17
+ position: relative;
18
+ color: #777;
19
+ border: 1px solid #ededed;
20
+ border-radius: 4px;
21
+ box-sizing: border-box;
22
+ }
23
+ .saswp-r li .saswp-rc-cnt{
24
+ margin:0px;
25
+ display: inline-block;
26
+ width: 100%;
27
+ clear: both;
28
+ }
29
+ .saswp-rvw-str{
30
+ justify-content: center;
31
+ }
32
+ .saswp-r li .saswp-rd1-stars{
33
+ display: inline-block;
34
+ width: 100px;
35
+ float: left;
36
+ }
37
+ .saswp-r li .saswp-rd2-box:before {
38
+ position: absolute;
39
+ bottom: -8px;
40
+ left: 35px;
41
+ display: block;
42
+ width: 14px;
43
+ height: 14px;
44
+ border: 1px solid #ededed;
45
+ border-top: none;
46
+ border-left: none;
47
+ background-color: #fafafa;
48
+ content: "";
49
+ -webkit-transform: rotate(45deg);
50
+ -ms-transform: rotate(45deg);
51
+ transform: rotate(45deg);
52
+ }
53
+ .saswp-r li .saswp-rc{
54
+ padding: 20px;
55
+ }
56
+ .saswp-rc {
57
+ display: flex;
58
+ width: 100%;
59
+ flex-wrap: wrap;
60
+ align-items: flex-start;
61
+ justify-content: space-between;
62
+ }
63
+
64
+ .saswp-rc-dt {
65
+ margin-top: 5px;
66
+ font-size: 12px;
67
+ line-height: 1.2;
68
+ color: #999;
69
+ display: block;
70
+ }
71
+ .saswp-rc-nm a {
72
+ text-decoration: none;
73
+ font-size: 16px;
74
+ font-weight:600;
75
+ display: inline-block;
76
+ line-height: 1.5;
77
+ }
78
+ .saswp-rc-a {
79
+ flex: 1 0 85%;
80
+ display: flex;
81
+ justify-content: flex-start;
82
+ }
83
+ .saswp-r li .saswp-rc-a amp-img {
84
+ float: left;
85
+ margin-right: 10px;
86
+ border-radius: 100px;
87
+ max-width: 56px;
88
+ height: 56px;
89
+ }
90
+ .saswp-r li .saswp-rc-lg amp-img{
91
+ max-width:25px;
92
+ height:25px;
93
+ border-radius: 100px;
94
+ }
95
+ .saswp-r2-strs{
96
+ line-height: 0px;
97
+ }
98
+ .saswp-cp{
99
+ text-align: center;
100
+ position: relative;
101
+ top: -50px;
102
+ }
103
+ .saswp-cp button{
104
+ width:12px;
105
+ height:12px;
106
+ border-radius:100px;
107
+ border:none;
108
+ margin:0px 10px;
109
+ cursor: pointer;
110
+ background:#ccc;
111
+ }
112
+ .saswp-cp button.active{
113
+ background:#0071a1;
114
+ }
115
+ .saswp-r2-b::-webkit-scrollbar {
116
+ width: 4px ;
117
+ display:inline-block ;
118
+ }
119
+ .saswp-r2-b::-webkit-scrollbar-thumb {
120
+ -webkit-border-radius: 10px ;
121
+ border-radius: 10px ;
122
+ background: #ccc ;
123
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5) ;
124
+ }
125
+ .saswp-r2-b::-webkit-scrollbar-track {
126
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
127
+ -webkit-border-radius: 4px;
128
+ border-radius: 4px;
129
+ }
130
+
131
+ .carousel-type::-webkit-scrollbar {
132
+ width: 4px ;
133
+ height:4px;
134
+ display:inline-block ;
135
+ }
136
+ .carousel-type::-webkit-scrollbar-thumb {
137
+ -webkit-border-radius: 10px ;
138
+ border-radius: 10px ;
139
+ background: #ccc ;
140
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5) ;
141
+ }
142
+ .carousel-type::-webkit-scrollbar-track {
143
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
144
+ -webkit-border-radius: 4px;
145
+ border-radius: 4px;
146
+ }
147
+
148
+
149
+ .saswp-rc-cnt p{margin:0;}
150
+ .saswp-rc-cnt {
151
+ position: static;
152
+ height: 80px;
153
+ overflow-y: auto;
154
+ font-size: 14px;
155
+ line-height: 1.6;
156
+ text-align: left;
157
+ padding: 0 2px 0 0;
158
+ margin: 10px 0 0;
159
+ }
160
+ .saswp-r .amp-carousel-button{
161
+ bottom: 0px;
162
+ top: auto;
163
+ cursor: pointer
164
+ }
165
+
166
+
167
+ /** Carousel **/
168
+ .carousel-type + .saswp-cp{
169
+ top: -32px;
170
+ }
171
+ .saswp-r .carousel-type .amp-carousel-button {
172
+ bottom: -17px;
173
+ }
174
+ .carousel-type li{
175
+ max-width:300px;
176
+ margin: 0px 20px 50px 0px;
177
+ }
178
+ .carousel-type .saswp-rv-box {
179
+ margin-right: 20px;
180
+ max-width: 100%;
181
+ }
182
+ .carousel-type .saswp-rc-cnt{
183
+ white-space: initial;
184
+ }
185
+
186
+ amp-carousel .amp-carousel-button{
187
+ border-radius: 100px;
188
+ }
189
+
190
+
191
+ @media(max-width:767px){
192
+ .carousel-type li{
193
+ width:100%;
194
+ }
195
+ .amp-carousel-button-next {
196
+ right: 5px;
197
+ }
198
+ .amp-carousel-button-prev {
199
+ left: 5px;
200
+ }
201
+
202
+ }
admin_section/css/amp/collection-front-global.css ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ .saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}
2
+ .saswp-r{
3
+ font-family: sans-serif;
4
+ margin-top:30px;
5
+ }
admin_section/css/amp/collection-front-grid.css ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** Review Design 1 **/
2
+ .saswp-r1 ul{
3
+ padding:0px;
4
+ list-style-type:none;
5
+ display:grid;
6
+ width:100%;
7
+ grid-template-columns:1fr 1fr 1fr;
8
+ grid-gap:15px;
9
+ }
10
+ .saswp-r1 li{
11
+ padding:20px;
12
+ position: relative;
13
+ color: #777;
14
+ border: 1px solid #ededed;
15
+ background-color: #fafafa;
16
+ border-radius: 4px;
17
+ }
18
+ .artl-cnt .saswp-r1 li:before, .saswp-r1 li:before{
19
+ display:none;
20
+ }
21
+ .saswp-grid-scroll{
22
+ overflow-x:scroll;
23
+ }
24
+ .saswp-grid-scroll-hidden{
25
+ overflow-x: hidden;
26
+ }
27
+ .saswp-rc{
28
+ display: flex;
29
+ width: 100%;
30
+ flex-wrap: wrap;
31
+ align-items: flex-start;
32
+ justify-content: space-between;
33
+ position: relative;
34
+ }
35
+ .saswp-rc .saswp-rc-lg{
36
+ position: absolute;
37
+ right: 0;
38
+ }
39
+ .saswp-r1-aimg amp-img{
40
+ float: left;
41
+ max-width: 56px;
42
+ min-height: 56px;
43
+ max-height: 56px;
44
+ margin-right: 10px;
45
+ border-radius: 100px;
46
+ }
47
+ .saswp-rc-lg amp-img{
48
+ max-width:20px;
49
+ height:20px;
50
+ border-radius:100px;
51
+ }
52
+ .saswp-rc-nm a{
53
+ text-decoration: none;
54
+ color: #427fed;
55
+ font-size: 16px;
56
+ font-weight:600;
57
+ display: inline-block;
58
+ line-height: 1.1;
59
+ letter-spacing: 0;
60
+ width:80%;
61
+ }
62
+ .saswp-rc-dt{
63
+ margin-top:5px;
64
+ font-size:12px;
65
+ line-height:1.2;
66
+ color:#999;
67
+ display:block;
68
+ }
69
+ .saswp-rc-a{
70
+ flex: 1 0 85%;
71
+ display: flex;
72
+ justify-content: flex-start;
73
+ }
74
+ .saswp-rc-nm{
75
+ width:100%;
76
+ line-height: 1.3;
77
+ }
78
+ .saswp-rc-cnt{
79
+ position: static;
80
+ height: 100px;
81
+ overflow-y: auto;
82
+ font-size: 14px;
83
+ line-height:1.6;
84
+ text-align: left;
85
+ padding: 0 2px 0 0;
86
+ margin: 10px 0 0;
87
+ box-sizing: border-box;
88
+ }
89
+ .saswp-rc-cnt p{
90
+ margin:0;
91
+ }
92
+ .saswp-r1 li::-webkit-scrollbar {
93
+ width: 4px ;
94
+ display:inline-block;
95
+ }
96
+ .saswp-r1 li::-webkit-scrollbar-thumb {
97
+ -webkit-border-radius: 10px ;
98
+ border-radius: 10px ;
99
+ background: #ccc ;
100
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5) ;
101
+ }
102
+ .saswp-r1 li::-webkit-scrollbar-track {
103
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
104
+ -webkit-border-radius: 4px;
105
+ border-radius: 4px;
106
+ }
107
+
108
+ @media(max-width:767px){
109
+ .saswp-r1 li {
110
+ padding: 13px;
111
+ }
112
+ .saswp-r1 ul{
113
+ grid-template-columns: 1fr;
114
+ }
115
+
116
+ }
admin_section/css/amp/collection-front-popup.css ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** Popup2 CSS **/
2
+ .btn{
3
+ position: fixed;
4
+ top: auto;
5
+ bottom: 0;
6
+ left: 20px;
7
+ font-family: "Arial",sans-serif;
8
+ z-index: 9;
9
+ box-shadow: 0 20px 40px 8px rgba(0,0,0,.25);
10
+ width:300px;
11
+ background: #fff;
12
+ border:none;
13
+ padding:0;
14
+ }
15
+ .open-class.btn{
16
+ width:500px;
17
+ }
18
+ #saswp-reviews-cntn {
19
+ display:none;
20
+ }
21
+ #saswp-sticky-review .open-class #saswp-reviews-cntn{
22
+ display:block;
23
+ }
24
+ .saswp-opn-cls-btn{
25
+ display: flex;
26
+ height: 50px;
27
+ justify-content: space-between;
28
+ align-items: center;
29
+ background: #fba306;
30
+ width:100%;
31
+ padding:0px 15px;
32
+ border-radius:4px 4px 0px 0px;
33
+ cursor: pointer;
34
+ }
35
+ .saswp-opn-cls-btn span{
36
+ font-size: 15px;
37
+ font-weight: 600;
38
+ color: #fff;
39
+ }
40
+ .saswp-r4-info ul{
41
+ list-style-type:none;
42
+ padding:0;
43
+ margin:0;
44
+ text-align:left;
45
+ height: 350px;
46
+ overflow-y: scroll;
47
+ }
48
+ .saswp-r4-info ul li{
49
+ border-bottom:1px solid #e4e4e4;
50
+ padding:20px;
51
+ }
52
+ .artl-cnt .saswp-r4-info li:before{
53
+ display:none;
54
+ }
55
+ .saswp-r4-b{
56
+ display: flex;
57
+ align-items: center;
58
+ justify-content: flex-start;
59
+ width: 100%;
60
+ }
61
+ .saswp-r4-b .saswp-r4-str{
62
+ margin-right:10px;
63
+ line-height: 0;
64
+ }
65
+ .saswp-r4-b span.saswp-r4-tx{
66
+ font-size:14px;
67
+ color:#444;
68
+ }
69
+ .saswp-r4-b span.saswp-r4-nm:after{
70
+ content:"-";
71
+ display:inline-block;
72
+ margin:0px 10px;
73
+ }
74
+ .saswp-r4-info .saswp-rvw-str .df-clr, .saswp-r4-info .saswp-rvw-str .half-str, .saswp-r4-info .saswp-rvw-str .str-ic {
75
+ display: inline-block;
76
+ width: 22px;
77
+ height: 20px;
78
+ background-repeat: no-repeat;
79
+ background-size: 18px;
80
+ }
81
+ .saswp-r4-cnt h3{
82
+ margin: 10px 0px 8px 0px ;
83
+ font-size: 18px;
84
+ color: #333;
85
+ font-weight: 500;
86
+ }
87
+ .saswp-r4-cnt p{
88
+ font-size: 13px;
89
+ line-height: 1.5;
90
+ margin: 0;
91
+ color: #333;
92
+ }
93
+ .saswp-r4-info ul li.saswp-r4-r{
94
+ display: flex;
95
+ width: 100%;
96
+ align-items: center;
97
+ text-align: center;
98
+ justify-content: center;
99
+ }
100
+ .saswp-r4-r > span{
101
+ line-height:0px;
102
+ }
103
+ .saswp-r4-info ul li span.saswp-r4-rnm{
104
+ margin-left: 10px;
105
+ font-size: 18px;
106
+ color:#666;
107
+ }
108
+ .btn .saswp-onclick-hide, .btn.open-class .saswp-onclick-show {
109
+ display: flex;
110
+ justify-content: space-between;
111
+ width: 100%;
112
+ }
113
+ .btn .saswp-onclick-show, .btn.open-class .saswp-onclick-hide {
114
+ display: none;
115
+ }
116
+ span.saswp-mines{
117
+ line-height:0;
118
+ }
119
+ .saswp-mines:before{
120
+ content: "";
121
+ display: inline-block;
122
+ width: 20px;
123
+ height: 4px;
124
+ background: #fff;
125
+ position: relative;
126
+ top: 10px;
127
+ }
128
+
129
+ @media(max-width:500px){
130
+ .open-class.btn {
131
+ width: 93vw;
132
+ left: 15px;
133
+ }
134
+ .btn{width:90%;}
135
+ }
136
+
137
+ @media(max-width:320px){
138
+ .btn{
139
+ width:90%;
140
+ left:15px;
141
+ }
142
+ .open-class.btn {
143
+ width: 90vw;
144
+ }
145
+ .saswp-fomo-wrap {
146
+ left: 10px;
147
+ }
148
+ }
admin_section/css/collection-front.css ADDED
@@ -0,0 +1,1067 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}
2
+ /*** Review Design CSS ****/
3
+ .saswp-g-review-header{
4
+ margin-top: 50px;
5
+ }
6
+ .saswp-g-review-body{
7
+ display:inline-grid;
8
+ grid-template-columns: 1fr 300px;
9
+ grid-gap:30px;
10
+ margin-top:30px;
11
+ width:100%;
12
+ }
13
+ .saswp-review-list{}
14
+ .saswp-channel-list{
15
+ margin-right: 15px;
16
+ }
17
+ .saswp-input-fields{
18
+ display: inline-flex;
19
+ align-items: center;
20
+ margin-bottom: 8px;
21
+ width: 100%;
22
+ }
23
+ .saswp-input-fields label{
24
+ width: 130px;
25
+ }
26
+ .saswp-panel h3{
27
+ font-size: 20px;
28
+ line-height: 1.4;
29
+ color: #222;
30
+ text-align: center;
31
+ margin: 10px 0px 20px 0px;
32
+ }
33
+ .saswp-input-fields a.button-primary{
34
+ margin-top:10px;
35
+ }
36
+ .saswp-glg-review-body{
37
+ display: grid;
38
+ grid-template-columns: 100px 1fr;
39
+ grid-gap: 20px;
40
+ background: #fff;
41
+ padding: 20px;
42
+ box-shadow: 0px 0px 20px 1px #d2cccc;
43
+ margin-bottom: 30px;
44
+ }
45
+ .saswp-g-plus{
46
+ float: right;
47
+ font-size: 15px;
48
+ width: 20px;
49
+ height: 20px;
50
+ }
51
+ .saswp-g-plus img{
52
+ width:100%;
53
+ }
54
+ .saswp-rtng{
55
+ padding-left: 5px;
56
+ font-size: 14px;
57
+ }
58
+ .saswp-pt-dt {
59
+ font-size: 12px;
60
+ color: #999;
61
+ font-weight: 600;
62
+ margin-top: 5px;
63
+ display: inline-block;
64
+ }
65
+ .saswp-athr{
66
+ font-size: 15px;
67
+ line-height: 1.4;
68
+ color: #000;
69
+ font-weight: bold;
70
+ display: inline-block;
71
+ vertical-align: middle;
72
+ }
73
+ .saswp-str-rtng .saswp-rvw-str{
74
+ display: inline-block;
75
+ vertical-align: middle;
76
+ padding-left: 10px;
77
+ width: auto;
78
+ }
79
+ .widget-area .saswp-str-rtng .saswp-rvw-str{padding:10px 0px 0px 0px;}
80
+ .saswp-rv-cnt p{
81
+ font-size: 16px;
82
+ line-height: 1.6;
83
+ color: #000;
84
+ margin: 10px 0px 0px 0px;
85
+ }
86
+ .saswp-rv-img img{
87
+ max-width:100px;
88
+ border-radius: 100%;
89
+ }
90
+ .widget-area .saswp-rv-img img{max-width:50px;}
91
+ .widget-area .saswp-glg-review-body {
92
+ display: inline-block;
93
+ width:100%;
94
+ }
95
+ .widget-area .saswp-rv-img{
96
+ width:60px;
97
+ float:left;
98
+ }
99
+
100
+ @media(max-width:767px){
101
+ .saswp-glg-review-body {
102
+ grid-template-columns: 50px 1fr;
103
+ }
104
+ .saswp-rv-img img{
105
+ max-width:50px;
106
+ }
107
+ }
108
+
109
+ /** Widgest Reviews CSS **/
110
+ .widget .saswp-glg-review-body{
111
+ display: inline-block;
112
+ width: 100%;
113
+ }
114
+ .widget .saswp-rv-img{
115
+ margin-bottom:12px;
116
+ }
117
+ .widget .saswp-rv-img img {
118
+ max-width: 50px;
119
+ }
120
+
121
+ .saswp-collection-body{
122
+ width:100%;
123
+ display:flex;
124
+ flex-wrap:wrap;
125
+ margin-top: 40px;
126
+ }
127
+ .saswp-collection-preview{
128
+ flex:1 0 70%;
129
+ margin-right: 20px;
130
+ }
131
+ .saswp-collection-settings{
132
+ flex:1 0 25%;
133
+ background: #fff;
134
+ padding-bottom: 12px;
135
+ height:100%;
136
+ }
137
+ .saswp-collection-container{
138
+ margin-top: 60px;
139
+ width:100%;
140
+ display: inline-block;
141
+ padding-right: 20px;
142
+ box-sizing: border-box;
143
+ }
144
+ .saswp-collection-preview-table{
145
+ width: 100%;
146
+ }
147
+ .saswp-collection-preview-table td{
148
+ width: 30%;
149
+ }
150
+ .saswp-platform-added-list{
151
+ display: block;
152
+ width: 100%;
153
+ }
154
+
155
+ /** Review Design 1 **/
156
+ body .saswp-r, body .saswp-r p{
157
+ font-family: sans-serif;
158
+ }
159
+ .saswp-r1{
160
+ margin-bottom:50px;
161
+ }
162
+ .saswp-r1 ul{
163
+ padding:0px;
164
+ list-style-type:none;
165
+ display:grid;
166
+ width:100%;
167
+ grid-template-columns:1fr 1fr 1fr;
168
+ grid-gap:15px;
169
+ margin:0;
170
+ }
171
+ .saswp-r1 li{
172
+ padding:20px;
173
+ position: relative;
174
+ color: #777;
175
+ border: 1px solid #ededed;
176
+ background-color: #fafafa;
177
+ border-radius: 4px;
178
+ margin:0px;
179
+ }
180
+ .saswp-rc{
181
+ display: flex;
182
+ width: 100%;
183
+ flex-wrap: wrap;
184
+ align-items: flex-start;
185
+ justify-content: space-between;
186
+ position: relative;
187
+ font-family: sans-serif;
188
+ }
189
+ .saswp-rc .saswp-rc-lg{
190
+ position: absolute;
191
+ right: 0px;
192
+ }
193
+ .saswp-r1-aimg img{
194
+ float: left;
195
+ max-width: 56px;
196
+ min-height: 56px;
197
+ max-height: 56px;
198
+ margin-right: 10px;
199
+ border-radius: 100px;
200
+ }
201
+ .saswp-rc-lg img{
202
+ width:20px;
203
+ height:20px;
204
+ border-radius: 100px;
205
+ }
206
+ .saswp-rc-nm a{
207
+ text-decoration: none;
208
+ color: #427fed;
209
+ font-size: 16px;
210
+ font-weight:600;
211
+ display: inline-block;
212
+ line-height: 1.1;
213
+ letter-spacing: 0;
214
+ width:80%;
215
+ }
216
+ .saswp-rc-dt{
217
+ margin-top:5px;
218
+ font-size:12px;
219
+ line-height:1.2;
220
+ color:#999;
221
+ display:block;
222
+ }
223
+ .saswp-rc-a{
224
+ flex: 1 0 85%;
225
+ display: flex;
226
+ justify-content: flex-start;
227
+ }
228
+ .saswp-rc-nm{
229
+ width:100%;
230
+ line-height:1.2;
231
+ }
232
+ .saswp-rc-cnt{
233
+ position: static;
234
+ height: 80px;
235
+ overflow-y: auto;
236
+ font-size: 14px;
237
+ line-height:1.6;
238
+ text-align: left;
239
+ padding: 0 2px 0 0;
240
+ margin: 10px 0 0;
241
+ }
242
+ .saswp-rc-cnt p{
243
+ margin:0;
244
+ }
245
+ .saswp-rc-cnt::-webkit-scrollbar {
246
+ width: 4px;
247
+ display:inline-block;
248
+
249
+ }
250
+ .saswp-rc-cnt::-webkit-scrollbar-thumb {
251
+ -webkit-border-radius: 10px;
252
+ border-radius: 10px;
253
+ background: #ccc;
254
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
255
+ }
256
+ .saswp-rc-cnt::-webkit-scrollbar-track {
257
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
258
+ -webkit-border-radius: 4px;
259
+ border-radius: 4px;
260
+ }
261
+
262
+ /** colltection settings CSS **/
263
+ .saswp-collection-settings ul{
264
+ margin:0;
265
+ border: 1px solid #e5e5e5;
266
+ box-shadow: 0 1px 1px rgba(0,0,0,.04);
267
+ }
268
+ .saswp-collection-settings ul li {
269
+ border-bottom: 1px solid #ddd;
270
+ margin: 0;
271
+ position: relative;
272
+ }
273
+ .saswp-dp-dsg{
274
+ display: inline-grid;
275
+ grid-template-columns: 1fr 2fr;
276
+ width: 100%;
277
+ grid-gap: 0px 5px;
278
+ align-items: center;
279
+ color:#666;
280
+ }
281
+ .saswp-dp-dtm{
282
+ margin-top:13px;
283
+ }
284
+ .saswp-slider-display{
285
+ margin-top: 15px;
286
+ }
287
+ .wp-admin .saswp-collection-settings select{
288
+ margin:0px;
289
+ min-height: 30px;
290
+ }
291
+ .saswp-slider-display span{
292
+ width: 30%;
293
+ display: inline-block;
294
+ }
295
+ .saswp-collection-settings ul li a{
296
+ padding:12px 15px;
297
+ background:#fff;
298
+ color: #23282d;
299
+ cursor: pointer;
300
+ width: 100%;
301
+ border: none;
302
+ text-align: left;
303
+ font-size: 14px;
304
+ line-height: 1.5;
305
+ font-weight: 600;
306
+ transition: all 0.5s ease-in-out 0s;
307
+ display: block;
308
+ box-sizing: border-box;
309
+ position: relative;
310
+ }
311
+ .saswp-collection-settings ul li input{
312
+ width:100%;
313
+ }
314
+ .saswp-collection-settings ul li input[type=checkbox] {
315
+ width:16px;
316
+ }
317
+ .saswp-collection-settings ul li a:hover, .saswp-collection-settings ul li a.active{
318
+ background: #f5f5f5;
319
+ }
320
+ .saswp-accordion.active + .saswp-accordion-panel{
321
+ border-top:1px solid #ddd;
322
+ }
323
+ .saswp-plf-lst-rv-cnt{
324
+ display: inline-grid;
325
+ width: 100%;
326
+ flex-wrap: wrap;
327
+ grid-template-columns: 100px 100px 1fr;
328
+ grid-gap: 5px
329
+ }
330
+ .saswp-accordion-panel {
331
+ padding: 15px 18px ;
332
+ display: none;
333
+ background-color: white;
334
+ overflow: hidden;
335
+ }
336
+ .saswp-collection-settings a.saswp-add-to-collection{
337
+ text-align:center;
338
+ }
339
+ .wp-core-ui a.button.saswp-remove-platform{
340
+ background: #ccc;
341
+ border: none;
342
+ line-height: 22px;
343
+ width: 22px;
344
+ padding: 0;
345
+ font-family: sans-serif;
346
+ border-radius: 100px;
347
+ min-height: 22px;
348
+ max-height: 22px;
349
+ text-align: center;
350
+ font-size: 10px;
351
+ margin-left: 10px;
352
+ }
353
+ .cancel-btn{
354
+ align-items: center;
355
+ display: flex;
356
+ justify-content: flex-end;
357
+ width: 100%;
358
+ margin-top: 8px;
359
+ }
360
+ .wp-admin .saswp-accordion-panel select.saswp-collection-desing{
361
+ width: 100%;
362
+ }
363
+ .saswp-slider-display.saswp-desing-options{
364
+ margin-top:10px;
365
+ }
366
+ .saswp-slider-display.saswp-desing-options span{
367
+ margin-right: 10px;
368
+ display: inline-block;
369
+ }
370
+ .saswp-collection-settings li a.saswp-accordion:after{
371
+ content: "\f140";
372
+ font: normal 20px/1 dashicons;
373
+ speak: none;
374
+ display: block;
375
+ position: absolute;
376
+ right: 0;
377
+ top: 13px;
378
+ right: 18px;
379
+ }
380
+ .saswp-collection-settings li a.saswp-accordion.active:after{
381
+ content: "\f142";
382
+ top: 13px;
383
+ }
384
+ .saswp-collection-settings .button-primary{
385
+ width: 120px;
386
+ text-align: center;
387
+ margin: 10px auto 0 auto;
388
+ display: inherit;
389
+ }
390
+ .saswp-collection-shortcode{
391
+ color: #555;
392
+ margin-top: 10px;
393
+ text-align: center;
394
+ }
395
+
396
+
397
+ /** Badges CSS **/
398
+ .saswp-r3{
399
+ margin-bottom: 20px;
400
+ }
401
+ .saswp-r3 ul{
402
+ padding:0px;
403
+ display:grid;
404
+ grid-template-columns:190px 190px 190px 190px;
405
+ grid-gap: 30px;
406
+ list-style-type:none;
407
+ margin:0;
408
+ justify-content: center;
409
+ /*overflow-x: scroll;*/
410
+ }
411
+
412
+ .saswp-r3 li{
413
+ box-shadow: 0px 1px 12px rgba(0, 0, 0, 0.20);
414
+ margin: 0;
415
+ border-radius: 3px;
416
+ font-family: sans-serif;
417
+ }
418
+ .saswp-r3 li a{
419
+ text-decoration:none;
420
+ }
421
+ .saswp-r3-lg{
422
+ background: #f8f8f8;
423
+ display: flex;
424
+ border-bottom: 1px solid #e8e8e8;
425
+ align-items: center;
426
+ justify-content: center;
427
+ width: 100%;
428
+ padding: 6px 8px;
429
+ box-sizing: border-box;
430
+ border-radius: 3px 3px 0px 0px;
431
+ }
432
+ .saswp-r3-lg span img{
433
+ width: 18px;
434
+ height: 18px;
435
+ margin-right: 6px;
436
+ border-radius: 100px;
437
+ }
438
+ .saswp-r3-lg span {
439
+ line-height: 0px;
440
+ }
441
+ .saswp-r3-lg .saswp-r3-tlt{
442
+ font-size: 12px;
443
+ line-height: 1.4;
444
+ text-transform: uppercase;
445
+ color: #555;
446
+ font-weight: 400;
447
+ }
448
+ .saswp-lg{
449
+ line-height: 0;
450
+ margin-right: 10px;
451
+ }
452
+ .saswp-r3-rtng{
453
+ padding: 13px 10px 10px 10px;
454
+ background: #fff;
455
+ border-radius: 0px 0px 3px 3px;
456
+ text-align: center;
457
+ }
458
+ .saswp-r3-rtxt{
459
+ display: flex;
460
+ align-items: center;
461
+ line-height: 0;
462
+ width: 100%;
463
+ margin-bottom: 4px;
464
+ justify-content: center;
465
+ }
466
+ .saswp-r3-rtxt .saswp-r3-num{
467
+ color: #23282d;
468
+ margin-right: 5px;
469
+ font-size: 22px;
470
+ font-weight: 500;
471
+ position: relative;
472
+ top: 2px;
473
+ word-break: normal;
474
+ }
475
+ .saswp-r3-brv{
476
+ color: #666;
477
+ font-size: 13px;
478
+ line-height: 1;
479
+ }
480
+ .saswp-r3 .saswp-rvw-str .df-clr, .saswp-r3 .saswp-rvw-str .half-str, .saswp-r3 .saswp-rvw-str .str-ic {
481
+ display: inline-block;
482
+ width: 22px;
483
+ height: 22px;
484
+ background-repeat: no-repeat;
485
+ background-size: 22px;
486
+ margin-right: 3px;
487
+ }
488
+
489
+ /** Fomo CSS **/
490
+ .saswp-r5{
491
+ position: fixed;
492
+ bottom: 20px;
493
+ left: 20px;
494
+ width: calc(100% - 20px);
495
+ max-width: 325px;
496
+ border-radius: 12px;
497
+ background: #fff;
498
+ border: 1px solid #e6e6e6;
499
+ box-shadow: 0 0 8px 0px rgba(0, 0, 0, 0.05);
500
+ transition: all .3s ease-in;
501
+ height: 80px;
502
+ }
503
+ .saswp-r5-r .saswp-str-rtng .saswp-rvw-str{
504
+ padding-left:0px;
505
+ margin-bottom: 6px;
506
+ line-height: 0;
507
+ display: block;
508
+ }
509
+ .saswp-r5 .saswp-rvw-str .df-clr, .saswp-r5 .saswp-rvw-str .half-str, .saswp-r5 .saswp-rvw-str .str-ic {
510
+ display: inline-block;
511
+ width: 23px;
512
+ height: 20px;
513
+ background-repeat: no-repeat;
514
+ background-size: 20px;
515
+ }
516
+ .saswp-r5-r{
517
+ display: flex;
518
+ flex-wrap: wrap;
519
+ width: 100%;
520
+ align-items: center;
521
+ height:80px;
522
+ border-radius: 12px;
523
+ }
524
+ .saswp-r5-r .saswp-r5-lg span{
525
+ border-radius: 10px 0px 0px 10px;
526
+ }
527
+ .saswp-r5-r .saswp-r5-lg img{
528
+ position: relative;
529
+ max-width: 40px;
530
+ left: 20PX;
531
+ border-radius: 10px 0px 0px 10px;
532
+ top: 0px;
533
+ }
534
+ .saswp-r5-rng{
535
+ flex:1 0 60%;
536
+ padding-left: 15px;
537
+ }
538
+ .saswp-r5-lg{
539
+ width: 80px;
540
+ height: 100%;
541
+ border-right: 1px solid #ddd;
542
+ box-sizing: border-box;
543
+ background: linear-gradient(to bottom,#fefefe 0,#f2f2f2 100%);
544
+ position: relative;
545
+ display: flex;
546
+ align-items: center;
547
+ border-radius: 12px 0px 0px 12px;
548
+ }
549
+ .saswp-r5-txrng{
550
+ font-size: 12px;
551
+ line-height: 1.2;
552
+ color: #444;
553
+ display: flex;
554
+ margin-bottom: 3px;
555
+ }
556
+ .saswp-r5-txrng span{
557
+ font-weight: 600;
558
+ color: #666;
559
+ margin-right: 5px
560
+ }
561
+ .saswp-r5-dt{
562
+ display: block;
563
+ font-size: 11px;
564
+ color: #ababab;
565
+ font-weight: normal;
566
+ }
567
+ .saswp-r5 a{
568
+ text-decoration:none;
569
+ }
570
+
571
+ /** Popup2 CSS **/
572
+ .saswp-popup-btn{
573
+ position: fixed;
574
+ top: auto;
575
+ bottom: 0;
576
+ font-family: "Arial",sans-serif;
577
+ z-index: 9;
578
+ box-shadow: 0 20px 40px 8px rgba(0,0,0,.25);
579
+ width:300px;
580
+ background: #fff;
581
+ border:none;
582
+ padding:0;
583
+ left:20px;
584
+ }
585
+ .saswp-open-class.saswp-popup-btn{
586
+ width:300px;
587
+ }
588
+ #saswp-reviews-cntn {
589
+ display:none;
590
+ }
591
+ #saswp-sticky-review .saswp-open-class #saswp-reviews-cntn{
592
+ width: 100%;
593
+ }
594
+ .saswp-opn-cls-btn{
595
+ display: flex;
596
+ height: 50px;
597
+ justify-content: space-between;
598
+ align-items: center;
599
+ background: #fba306;
600
+ width:100%;
601
+ padding:0px 15px;
602
+ border-radius:4px 4px 0px 0px;
603
+ cursor: pointer;
604
+ box-sizing: border-box;
605
+ }
606
+ .saswp-opn-cls-btn svg path{
607
+ fill:#fff;
608
+ }
609
+ .saswp-opn-cls-btn span{
610
+ font-size: 15px;
611
+ font-weight: 600;
612
+ color: #fff;
613
+ }
614
+ .saswp-onclick-hide, .saswp-onclick-show{
615
+ display: flex;
616
+ justify-content: space-between;
617
+ width: 100%;
618
+ }
619
+ .saswp-r4-info ul{
620
+ list-style-type:none;
621
+ padding:0;
622
+ margin:0;
623
+ text-align:left;
624
+ height: 350px;
625
+ overflow-y: scroll;
626
+ }
627
+ .saswp-r4-info ul li{
628
+ border-bottom:1px solid #e4e4e4;
629
+ padding:20px;
630
+ margin:0;
631
+ font-family: sans-serif;
632
+ }
633
+ .saswp-r4-info ul li.saswp-r4-r{
634
+ display: flex;
635
+ width: 100%;
636
+ align-items: center;
637
+ text-align: center;
638
+ justify-content: center;
639
+ box-sizing: border-box;
640
+ }
641
+ .saswp-r4-b{
642
+ display: flex;
643
+ align-items: center;
644
+ justify-content: flex-start;
645
+ width: 100%;
646
+ }
647
+ .saswp-r4-b .saswp-r4-str{
648
+ margin-right:10px;
649
+ }
650
+ .saswp-r4-b span.saswp-r4-tx{
651
+ font-size:14px;
652
+ color:#444;
653
+ }
654
+ .saswp-r4-b span.saswp-r4-nm:after{
655
+ content:"-";
656
+ display:inline-block;
657
+ margin:0px 10px;
658
+ }
659
+ .saswp-r4-cnt h3{
660
+ margin: 10px 0px 8px 0px !important;
661
+ font-size: 18px;
662
+ color: #333;
663
+ font-weight: 500;
664
+ }
665
+ .saswp-rvw-str{
666
+ position: relative;
667
+ top: 3px;
668
+ }
669
+ .saswp-r4-info .saswp-rvw-str .df-clr, .saswp-r4-info .saswp-rvw-str .half-str, .saswp-r4-info .saswp-rvw-str .str-ic {
670
+ display: inline-block;
671
+ width: 22px;
672
+ height: 20px;
673
+ background-repeat: no-repeat;
674
+ background-size: 18px;
675
+ }
676
+ .saswp-r4-cnt p{
677
+ font-size: 13px;
678
+ line-height: 1.5;
679
+ margin: 0;
680
+ color: #333;
681
+ }
682
+ .saswp-r4-info ul li.saswp-ttl-rvw{
683
+ display: flex;
684
+ width: 100%;
685
+ align-items: center;
686
+ text-align: center;
687
+ justify-content: center;
688
+ box-sizing: border-box;
689
+ }
690
+ .saswp-r4-info ul li.saswp-ttl-rvw span{
691
+ font-size:20px;
692
+ color:#666;
693
+ }
694
+ .saswp-ttl-rvw svg{
695
+ width:22px;
696
+ height:22px;
697
+ margin:0px 5px 0px 0px
698
+ }
699
+ .saswp-r4-info ul li span.saswp-r4-rnm{
700
+ margin-left: 10px;
701
+ font-size: 18px;
702
+ }
703
+
704
+ .btn .saswp-onclick-hide, .btn.saswp-open-class .saswp-onclick-show {
705
+ display: flex;
706
+ justify-content: space-between;
707
+ width: 100%;
708
+ }
709
+ .btn .saswp-onclick-show, .btn.saswp-open-class .saswp-onclick-hide{
710
+ display:none;
711
+ }
712
+ span.saswp-mines{
713
+ line-height:0;
714
+ }
715
+ .saswp-mines:before{
716
+ content: "";
717
+ display: inline-block;
718
+ width: 20px;
719
+ height: 4px;
720
+ background: #fff;
721
+ position: relative;
722
+ top: 10px;
723
+ }
724
+
725
+ /** Slider Design CSS **/
726
+ .saswp-rd2-warp{
727
+ width:100%;
728
+ display:inline-block;
729
+ margin-bottom:50px;
730
+ }
731
+ .saswp-rd2-warp div {
732
+ width:350px;
733
+ margin-right:25px;
734
+ }
735
+ .saswp-rc-a img {
736
+ float: left;
737
+ margin-right: 10px;
738
+ border-radius: 100px;
739
+ width: 56px;
740
+ height: 56px;
741
+ }
742
+ .saswp-rd2-warp .saswp-rc-cnt{
743
+ white-space: initial;
744
+ }
745
+ .saswp-rd2-warp .saswp-r2-b{
746
+ position: relative;
747
+ color: #777;
748
+ border: 1px solid #ededed;
749
+ background-color: #fafafa;
750
+ border-radius: 4px;
751
+ }
752
+ .saswp-rd2-warp .saswp-rc-cnt{
753
+ height: 150px;
754
+ margin: 20px 20px 20px 40px;
755
+ }
756
+
757
+ .saswp-rd2-warp .saswp-rc{
758
+ padding: 20px;
759
+ }
760
+ .saswp-r2-b .saswp-r2-s{
761
+ display:inline-block;
762
+ }
763
+ .saswp-r2-b .saswp-rc-cnt p{
764
+ display:inline;
765
+ }
766
+ .saswp-r2-strs{
767
+ text-align: center;
768
+ }
769
+ .saswp-r2-b .saswp-rc-lg{
770
+ line-height: 0;
771
+ position: absolute;
772
+ right: 13px;
773
+ top: 13px;
774
+ background: #fafafa;
775
+ }
776
+ .saswp-r2-q svg{
777
+ width: 20px;
778
+ fill: #bbb;
779
+ position: absolute;
780
+ height: 30px;
781
+ top: 15px;
782
+ left: 12px;
783
+ }
784
+ .saswp-rd2-warp .saswp-r2-b:before {
785
+ position: absolute;
786
+ bottom: -8px;
787
+ left: 35px;
788
+ display: block;
789
+ width: 14px;
790
+ height: 14px;
791
+ border: 1px solid #ededed;
792
+ border-top: none;
793
+ border-left: none;
794
+ background-color: #fafafa;
795
+ content: "";
796
+ -webkit-transform: rotate(45deg);
797
+ -ms-transform: rotate(45deg);
798
+ transform: rotate(45deg);
799
+ }
800
+ .carousel-preview{
801
+ text-align:center;
802
+ }
803
+ .carousel-preview button{
804
+ width:12px;
805
+ height:12px;
806
+ border-radius:100px;
807
+ border:none;
808
+ margin:0px 5px;
809
+ cursor: pointer;
810
+ }
811
+ .carousel-preview button.saswp-active{
812
+ background:#427fed;
813
+ }
814
+
815
+ /**Slider csss starts here **/
816
+
817
+
818
+ /** Single Slider CSS Start here **/
819
+ .saswp-cst .saswp-cs{
820
+ width: 100%;
821
+ max-width: 640px;
822
+ margin: 0 auto;
823
+ overflow: hidden;
824
+ position:relative;
825
+ height:280px;
826
+ }
827
+ .saswp-r2-b{
828
+ padding: 20px 40px 20px 40px;
829
+ background-color: #fafafa;
830
+ position: relative;
831
+ color: #777;
832
+ border: 1px solid #ededed;
833
+ border-radius: 4px;
834
+ box-sizing: border-box;
835
+ }
836
+ .saswp-cst .saswp-rc{
837
+ padding: 20px;
838
+ box-sizing: border-box;
839
+ }
840
+ .saswp-si .saswp-r2-b:before {
841
+ position: absolute;
842
+ bottom: -8px;
843
+ left: 35px;
844
+ display: block;
845
+ width: 14px;
846
+ height: 14px;
847
+ border: 1px solid #ededed;
848
+ border-top: none;
849
+ border-left: none;
850
+ background-color: #fafafa;
851
+ content: "";
852
+ -webkit-transform: rotate(45deg);
853
+ -ms-transform: rotate(45deg);
854
+ transform: rotate(45deg);
855
+ }
856
+ .saswp-si .saswp-rc-cnt{
857
+ margin:0px;
858
+ }
859
+ .saswp-cs .saswp-slider-controls {
860
+ width: 100%;
861
+ display: flex;
862
+ align-items: center;
863
+ justify-content: space-between;
864
+ box-sizing: border-box;
865
+ z-index: 9;
866
+ }
867
+ .saswp-slider-controls a.saswp-slider-prev-btn{
868
+ position: absolute;
869
+ left: 10px;
870
+ bottom: 0;
871
+ background: rgba(0,0,0,0.5);
872
+ line-height: 0;
873
+ border-radius: 100px;
874
+ width: 30px;
875
+ height: 30px;
876
+ }
877
+ .saswp-slider-controls a.saswp-slider-prev-btn:before{
878
+ content:"";
879
+ display: inline-block;
880
+ width: 7px;
881
+ height: 7px;
882
+ border: 2px solid #fff;
883
+ border-top: none;
884
+ border-left: none;
885
+ transform: rotate(135deg);
886
+ position: relative;
887
+ top: 12px;
888
+ left: 12px;
889
+ }
890
+ .saswp-slider-controls a.saswp-slider-next-btn{
891
+ position: absolute;
892
+ right: 10px;
893
+ bottom: 0;
894
+ background: rgba(0,0,0,0.5);
895
+ line-height: 0;
896
+ border-radius: 100px;
897
+ width: 30px;
898
+ height: 30px;
899
+ }
900
+ .saswp-slider-controls a.saswp-slider-next-btn:after{
901
+ content:"";
902
+ display: inline-block;
903
+ width: 7px;
904
+ height: 7px;
905
+ border: 2px solid #fff;
906
+ border-top: none;
907
+ border-left: none;
908
+ transform: rotate(135deg);
909
+ transform: rotate(-45deg);
910
+ position: relative;
911
+ top: 11px;
912
+ right: -10px;
913
+ }
914
+ .saswp-si .saswp-rc-lg img {
915
+ width: 25px;
916
+ height: 25px;
917
+ }
918
+ .saswp-cs .saswp-sd .saswp-dots {
919
+ width: 10px;
920
+ height: 10px;
921
+ background: #ccc;
922
+ transition: 0.15s ease-in-out;
923
+ border-radius: 8px;
924
+ cursor: pointer;
925
+ margin: 0 12px;
926
+ }
927
+ .saswp-cs .saswp-sd .saswp-dot.saswp-active {
928
+ background: #0071a1;
929
+ }
930
+ .saswp-cst .saswp-sic .saswp-si {
931
+ width: 100vw;
932
+ max-width: 640px;
933
+ display: block;
934
+ }
935
+ .spinner.saswp-spinner{
936
+ float:none;
937
+ margin: 0px auto;
938
+ display: block;
939
+ }
940
+
941
+ /** Single Slider CSS Ends here **/
942
+
943
+ /** Carousel Slider CSS Starts here **/
944
+ .saswp-cct .saswp-cs {
945
+ width: 100%;
946
+ max-width: 800px;
947
+ margin: 0 auto;
948
+ overflow: hidden;
949
+ position: relative;
950
+ /*height: 300px;*/
951
+ }
952
+ .saswp-cct .saswp-sic .saswp-si {
953
+ width: 100%;
954
+ max-width: 800px;
955
+ display: flex;
956
+ }
957
+ .saswp-cct .saswp-r2-sli{
958
+ width: 100%;
959
+ margin-right: 20px;
960
+ max-width: 300px;
961
+ margin-bottom: 40px;
962
+ }
963
+ .saswp-cct .saswp-rc {
964
+ padding: 20px 10px;
965
+ box-sizing: border-box;
966
+ }
967
+ .saswp-cct .saswp-rc-cnt{
968
+ height:120px;
969
+ }
970
+ .saswp-cs .saswp-sic {
971
+ display: flex;
972
+ flex-wrap: wrap;
973
+ height: auto;
974
+ transition: transform 0.35s ease-in-out;
975
+ }
976
+ .saswp-cs .saswp-slider-controls a {
977
+ color: #333;
978
+ text-decoration: none;
979
+ transition: 0.15s ease-in-out;
980
+ }
981
+ .saswp-cs .saswp-slider-controls a:hover {
982
+ color: #888;
983
+ }
984
+ .saswp-cs .saswp-sd {
985
+ width: 100%;
986
+ display: flex;
987
+ justify-content: center;
988
+ margin: 0 auto;
989
+ position: relative;
990
+ top: -10px;
991
+ }
992
+ .saswp-onclick-show{
993
+ display: none;
994
+ }
995
+ .saswp-dp-dsg.saswp_hide{
996
+ display: none;
997
+ }
998
+ .entry .entry-content a {
999
+ text-decoration: none !important;
1000
+ }
1001
+ /** Carousel Slider CSS Ends here **/
1002
+
1003
+
1004
+ /** Responsive CSS **/
1005
+ @media(max-width:1200px){
1006
+ .saswp-plf-lst-rv-cnt{
1007
+ grid-template-columns: 1fr;
1008
+ }
1009
+ }
1010
+
1011
+ @media(max-width:767px){
1012
+ .saswp-collection-lp{
1013
+ flex: 1 0 100%;
1014
+ margin-right: 0px;
1015
+ width: 100%;
1016
+ }
1017
+ .saswp-collection-settings {
1018
+ flex: 1 0 100%;
1019
+ padding-bottom: 0px;
1020
+ height: 100%;
1021
+ width: 100%;
1022
+ }
1023
+ .wp-admin .saswp-collection-settings select{
1024
+ max-width:100%;
1025
+ }
1026
+ .saswp-r1 ul{
1027
+ grid-template-columns: 1fr !important;
1028
+ }
1029
+ .saswp-r3 ul{
1030
+ grid-template-columns: 190px 190px !important;
1031
+ }
1032
+ .saswp-rc-nm{
1033
+ margin:0px;
1034
+ }
1035
+ .saswp-cst .saswp-sic .saswp-si, .saswp-cst .saswp-cs {
1036
+ max-width: 500px;
1037
+ }
1038
+ .saswp-rc .saswp-rc-lg {
1039
+ right: 0;
1040
+ }
1041
+
1042
+
1043
+ }
1044
+
1045
+
1046
+ @media(max-width:550px){
1047
+ .saswp-cst .saswp-sic .saswp-si, .saswp-cst .saswp-cs {
1048
+ max-width: 320px;
1049
+ }
1050
+ .saswp-r3 ul{
1051
+ grid-template-columns: 190px !important;
1052
+ }
1053
+ .saswp-open-class.saswp-popup-btn{
1054
+ width:93vw !important;
1055
+ }
1056
+
1057
+ }
1058
+
1059
+ @media(max-width:320px){
1060
+ .saswp-cst .saswp-sic .saswp-si, .saswp-cst .saswp-cs {
1061
+ max-width: 295px;
1062
+ }
1063
+ .saswp-r5 {
1064
+ left: 10px;
1065
+ }
1066
+
1067
+ }
admin_section/css/collection-front.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px;width:100%}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px;width:20px;height:20px}.saswp-g-plus img{width:100%}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700;display:inline-block;vertical-align:middle}.saswp-str-rtng .saswp-rvw-str{display:inline-block;vertical-align:middle;padding-left:10px;width:auto}.widget-area .saswp-str-rtng .saswp-rvw-str{padding:10px 0 0 0}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px;border-radius:100%}.widget-area .saswp-rv-img img{max-width:50px}.widget-area .saswp-glg-review-body{display:inline-block;width:100%}.widget-area .saswp-rv-img{width:60px;float:left}@media(max-width:767px){.saswp-glg-review-body{grid-template-columns:50px 1fr}.saswp-rv-img img{max-width:50px}}.widget .saswp-glg-review-body{display:inline-block;width:100%}.widget .saswp-rv-img{margin-bottom:12px}.widget .saswp-rv-img img{max-width:50px}.saswp-collection-body{width:100%;display:flex;flex-wrap:wrap;margin-top:40px}.saswp-collection-preview{flex:1 0 70%;margin-right:20px}.saswp-collection-settings{flex:1 0 25%;background:#fff;padding-bottom:12px;height:100%}.saswp-collection-container{margin-top:60px;width:100%;display:inline-block;padding-right:20px;box-sizing:border-box}.saswp-collection-preview-table{width:100%}.saswp-collection-preview-table td{width:30%}.saswp-platform-added-list{display:block;width:100%}body .saswp-r,body .saswp-r p{font-family:sans-serif}.saswp-r1{margin-bottom:50px}.saswp-r1 ul{padding:0;list-style-type:none;display:grid;width:100%;grid-template-columns:1fr 1fr 1fr;grid-gap:15px;margin:0}.saswp-r1 li{padding:20px;position:relative;color:#777;border:1px solid #ededed;background-color:#fafafa;border-radius:4px;margin:0}.saswp-rc{display:flex;width:100%;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;position:relative;font-family:sans-serif}.saswp-rc .saswp-rc-lg{position:absolute;right:0}.saswp-r1-aimg img{float:left;max-width:56px;min-height:56px;max-height:56px;margin-right:10px;border-radius:100px}.saswp-rc-lg img{width:20px;height:20px;border-radius:100px}.saswp-rc-nm a{text-decoration:none;color:#427fed;font-size:16px;font-weight:600;display:inline-block;line-height:1.1;letter-spacing:0;width:80%}.saswp-rc-dt{margin-top:5px;font-size:12px;line-height:1.2;color:#999;display:block}.saswp-rc-a{flex:1 0 85%;display:flex;justify-content:flex-start}.saswp-rc-nm{width:100%;line-height:1.2}.saswp-rc-cnt{position:static;height:80px;overflow-y:auto;font-size:14px;line-height:1.6;text-align:left;padding:0 2px 0 0;margin:10px 0 0}.saswp-rc-cnt p{margin:0}.saswp-rc-cnt::-webkit-scrollbar{width:4px;display:inline-block}.saswp-rc-cnt::-webkit-scrollbar-thumb{-webkit-border-radius:10px;border-radius:10px;background:#ccc;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.5)}.saswp-rc-cnt::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);-webkit-border-radius:4px;border-radius:4px}.saswp-collection-settings ul{margin:0;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}.saswp-collection-settings ul li{border-bottom:1px solid #ddd;margin:0;position:relative}.saswp-dp-dsg{display:inline-grid;grid-template-columns:1fr 2fr;width:100%;grid-gap:0 5px;align-items:center;color:#666}.saswp-dp-dtm{margin-top:13px}.saswp-slider-display{margin-top:15px}.wp-admin .saswp-collection-settings select{margin:0;min-height:30px}.saswp-slider-display span{width:30%;display:inline-block}.saswp-collection-settings ul li a{padding:12px 15px;background:#fff;color:#23282d;cursor:pointer;width:100%;border:none;text-align:left;font-size:14px;line-height:1.5;font-weight:600;transition:all .5s ease-in-out 0s;display:block;box-sizing:border-box;position:relative}.saswp-collection-settings ul li input{width:100%}.saswp-collection-settings ul li input[type=checkbox]{width:16px}.saswp-collection-settings ul li a.active,.saswp-collection-settings ul li a:hover{background:#f5f5f5}.saswp-accordion.active+.saswp-accordion-panel{border-top:1px solid #ddd}.saswp-plf-lst-rv-cnt{display:inline-grid;width:100%;flex-wrap:wrap;grid-template-columns:100px 100px 1fr;grid-gap:5px}.saswp-accordion-panel{padding:15px 18px;display:none;background-color:#fff;overflow:hidden}.saswp-collection-settings a.saswp-add-to-collection{text-align:center}.wp-core-ui a.button.saswp-remove-platform{background:#ccc;border:none;line-height:22px;width:22px;padding:0;font-family:sans-serif;border-radius:100px;min-height:22px;max-height:22px;text-align:center;font-size:10px;margin-left:10px}.cancel-btn{align-items:center;display:flex;justify-content:flex-end;width:100%;margin-top:8px}.wp-admin .saswp-accordion-panel select.saswp-collection-desing{width:100%}.saswp-slider-display.saswp-desing-options{margin-top:10px}.saswp-slider-display.saswp-desing-options span{margin-right:10px;display:inline-block}.saswp-collection-settings li a.saswp-accordion:after{content:"\f140";font:normal 20px/1 dashicons;speak:none;display:block;position:absolute;right:0;top:13px;right:18px}.saswp-collection-settings li a.saswp-accordion.active:after{content:"\f142";top:13px}.saswp-collection-settings .button-primary{width:120px;text-align:center;margin:10px auto 0 auto;display:inherit}.saswp-collection-shortcode{color:#555;margin-top:10px;text-align:center}.saswp-r3{margin-bottom:20px}.saswp-r3 ul{padding:0;display:grid;grid-template-columns:190px 190px 190px 190px;grid-gap:30px;list-style-type:none;margin:0;justify-content:center}.saswp-r3 li{box-shadow:0 1px 12px rgba(0,0,0,.2);margin:0;border-radius:3px;font-family:sans-serif}.saswp-r3 li a{text-decoration:none}.saswp-r3-lg{background:#f8f8f8;display:flex;border-bottom:1px solid #e8e8e8;align-items:center;justify-content:center;width:100%;padding:6px 8px;box-sizing:border-box;border-radius:3px 3px 0 0}.saswp-r3-lg span img{width:18px;height:18px;margin-right:6px;border-radius:100px}.saswp-r3-lg span{line-height:0}.saswp-r3-lg .saswp-r3-tlt{font-size:12px;line-height:1.4;text-transform:uppercase;color:#555;font-weight:400}.saswp-lg{line-height:0;margin-right:10px}.saswp-r3-rtng{padding:13px 10px 10px 10px;background:#fff;border-radius:0 0 3px 3px;text-align:center}.saswp-r3-rtxt{display:flex;align-items:center;line-height:0;width:100%;margin-bottom:4px;justify-content:center}.saswp-r3-rtxt .saswp-r3-num{color:#23282d;margin-right:5px;font-size:22px;font-weight:500;position:relative;top:2px;word-break:normal}.saswp-r3-brv{color:#666;font-size:13px;line-height:1}.saswp-r3 .saswp-rvw-str .df-clr,.saswp-r3 .saswp-rvw-str .half-str,.saswp-r3 .saswp-rvw-str .str-ic{display:inline-block;width:22px;height:22px;background-repeat:no-repeat;background-size:22px;margin-right:3px}.saswp-r5{position:fixed;bottom:20px;left:20px;width:calc(100% - 20px);max-width:325px;border-radius:12px;background:#fff;border:1px solid #e6e6e6;box-shadow:0 0 8px 0 rgba(0,0,0,.05);transition:all .3s ease-in;height:80px}.saswp-r5-r .saswp-str-rtng .saswp-rvw-str{padding-left:0;margin-bottom:6px;line-height:0;display:block}.saswp-r5 .saswp-rvw-str .df-clr,.saswp-r5 .saswp-rvw-str .half-str,.saswp-r5 .saswp-rvw-str .str-ic{display:inline-block;width:23px;height:20px;background-repeat:no-repeat;background-size:20px}.saswp-r5-r{display:flex;flex-wrap:wrap;width:100%;align-items:center;height:80px;border-radius:12px}.saswp-r5-r .saswp-r5-lg span{border-radius:10px 0 0 10px}.saswp-r5-r .saswp-r5-lg img{position:relative;max-width:40px;left:20PX;border-radius:10px 0 0 10px;top:0}.saswp-r5-rng{flex:1 0 60%;padding-left:15px}.saswp-r5-lg{width:80px;height:100%;border-right:1px solid #ddd;box-sizing:border-box;background:linear-gradient(to bottom,#fefefe 0,#f2f2f2 100%);position:relative;display:flex;align-items:center;border-radius:12px 0 0 12px}.saswp-r5-txrng{font-size:12px;line-height:1.2;color:#444;display:flex;margin-bottom:3px}.saswp-r5-txrng span{font-weight:600;color:#666;margin-right:5px}.saswp-r5-dt{display:block;font-size:11px;color:#ababab;font-weight:400}.saswp-r5 a{text-decoration:none}.saswp-popup-btn{position:fixed;top:auto;bottom:0;font-family:Arial,sans-serif;z-index:9;box-shadow:0 20px 40px 8px rgba(0,0,0,.25);width:300px;background:#fff;border:none;padding:0;left:20px}.saswp-open-class.saswp-popup-btn{width:300px}#saswp-reviews-cntn{display:none}#saswp-sticky-review .saswp-open-class #saswp-reviews-cntn{width:100%}.saswp-opn-cls-btn{display:flex;height:50px;justify-content:space-between;align-items:center;background:#fba306;width:100%;padding:0 15px;border-radius:4px 4px 0 0;cursor:pointer;box-sizing:border-box}.saswp-opn-cls-btn svg path{fill:#fff}.saswp-opn-cls-btn span{font-size:15px;font-weight:600;color:#fff}.saswp-onclick-hide,.saswp-onclick-show{display:flex;justify-content:space-between;width:100%}.saswp-r4-info ul{list-style-type:none;padding:0;margin:0;text-align:left;height:350px;overflow-y:scroll}.saswp-r4-info ul li{border-bottom:1px solid #e4e4e4;padding:20px;margin:0;font-family:sans-serif}.saswp-r4-info ul li.saswp-r4-r{display:flex;width:100%;align-items:center;text-align:center;justify-content:center;box-sizing:border-box}.saswp-r4-b{display:flex;align-items:center;justify-content:flex-start;width:100%}.saswp-r4-b .saswp-r4-str{margin-right:10px}.saswp-r4-b span.saswp-r4-tx{font-size:14px;color:#444}.saswp-r4-b span.saswp-r4-nm:after{content:"-";display:inline-block;margin:0 10px}.saswp-r4-cnt h3{margin:10px 0 8px 0!important;font-size:18px;color:#333;font-weight:500}.saswp-rvw-str{position:relative;top:3px}.saswp-r4-info .saswp-rvw-str .df-clr,.saswp-r4-info .saswp-rvw-str .half-str,.saswp-r4-info .saswp-rvw-str .str-ic{display:inline-block;width:22px;height:20px;background-repeat:no-repeat;background-size:18px}.saswp-r4-cnt p{font-size:13px;line-height:1.5;margin:0;color:#333}.saswp-r4-info ul li.saswp-ttl-rvw{display:flex;width:100%;align-items:center;text-align:center;justify-content:center;box-sizing:border-box}.saswp-r4-info ul li.saswp-ttl-rvw span{font-size:20px;color:#666}.saswp-ttl-rvw svg{width:22px;height:22px;margin:0 5px 0 0}.saswp-r4-info ul li span.saswp-r4-rnm{margin-left:10px;font-size:18px}.btn .saswp-onclick-hide,.btn.saswp-open-class .saswp-onclick-show{display:flex;justify-content:space-between;width:100%}.btn .saswp-onclick-show,.btn.saswp-open-class .saswp-onclick-hide{display:none}span.saswp-mines{line-height:0}.saswp-mines:before{content:"";display:inline-block;width:20px;height:4px;background:#fff;position:relative;top:10px}.saswp-rd2-warp{width:100%;display:inline-block;margin-bottom:50px}.saswp-rd2-warp div{width:350px;margin-right:25px}.saswp-rc-a img{float:left;margin-right:10px;border-radius:100px;width:56px;height:56px}.saswp-rd2-warp .saswp-rc-cnt{white-space:initial}.saswp-rd2-warp .saswp-r2-b{position:relative;color:#777;border:1px solid #ededed;background-color:#fafafa;border-radius:4px}.saswp-rd2-warp .saswp-rc-cnt{height:150px;margin:20px 20px 20px 40px}.saswp-rd2-warp .saswp-rc{padding:20px}.saswp-r2-b .saswp-r2-s{display:inline-block}.saswp-r2-b .saswp-rc-cnt p{display:inline}.saswp-r2-strs{text-align:center}.saswp-r2-b .saswp-rc-lg{line-height:0;position:absolute;right:13px;top:13px;background:#fafafa}.saswp-r2-q svg{width:20px;fill:#bbb;position:absolute;height:30px;top:15px;left:12px}.saswp-rd2-warp .saswp-r2-b:before{position:absolute;bottom:-8px;left:35px;display:block;width:14px;height:14px;border:1px solid #ededed;border-top:none;border-left:none;background-color:#fafafa;content:"";-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.carousel-preview{text-align:center}.carousel-preview button{width:12px;height:12px;border-radius:100px;border:none;margin:0 5px;cursor:pointer}.carousel-preview button.saswp-active{background:#427fed}.saswp-cst .saswp-cs{width:100%;max-width:640px;margin:0 auto;overflow:hidden;position:relative;height:280px}.saswp-r2-b{padding:20px 40px 20px 40px;background-color:#fafafa;position:relative;color:#777;border:1px solid #ededed;border-radius:4px;box-sizing:border-box}.saswp-cst .saswp-rc{padding:20px;box-sizing:border-box}.saswp-si .saswp-r2-b:before{position:absolute;bottom:-8px;left:35px;display:block;width:14px;height:14px;border:1px solid #ededed;border-top:none;border-left:none;background-color:#fafafa;content:"";-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.saswp-si .saswp-rc-cnt{margin:0}.saswp-cs .saswp-slider-controls{width:100%;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;z-index:9}.saswp-slider-controls a.saswp-slider-prev-btn{position:absolute;left:10px;bottom:0;background:rgba(0,0,0,.5);line-height:0;border-radius:100px;width:30px;height:30px}.saswp-slider-controls a.saswp-slider-prev-btn:before{content:"";display:inline-block;width:7px;height:7px;border:2px solid #fff;border-top:none;border-left:none;transform:rotate(135deg);position:relative;top:12px;left:12px}.saswp-slider-controls a.saswp-slider-next-btn{position:absolute;right:10px;bottom:0;background:rgba(0,0,0,.5);line-height:0;border-radius:100px;width:30px;height:30px}.saswp-slider-controls a.saswp-slider-next-btn:after{content:"";display:inline-block;width:7px;height:7px;border:2px solid #fff;border-top:none;border-left:none;transform:rotate(135deg);transform:rotate(-45deg);position:relative;top:11px;right:-10px}.saswp-si .saswp-rc-lg img{width:25px;height:25px}.saswp-cs .saswp-sd .saswp-dots{width:10px;height:10px;background:#ccc;transition:.15s ease-in-out;border-radius:8px;cursor:pointer;margin:0 12px}.saswp-cs .saswp-sd .saswp-dot.saswp-active{background:#0071a1}.saswp-cst .saswp-sic .saswp-si{width:100vw;max-width:640px;display:block}.spinner.saswp-spinner{float:none;margin:0 auto;display:block}.saswp-cct .saswp-cs{width:100%;max-width:800px;margin:0 auto;overflow:hidden;position:relative}.saswp-cct .saswp-sic .saswp-si{width:100%;max-width:800px;display:flex}.saswp-cct .saswp-r2-sli{width:100%;margin-right:20px;max-width:300px;margin-bottom:40px}.saswp-cct .saswp-rc{padding:20px 10px;box-sizing:border-box}.saswp-cct .saswp-rc-cnt{height:120px}.saswp-cs .saswp-sic{display:flex;flex-wrap:wrap;height:auto;transition:transform .35s ease-in-out}.saswp-cs .saswp-slider-controls a{color:#333;text-decoration:none;transition:.15s ease-in-out}.saswp-cs .saswp-slider-controls a:hover{color:#888}.saswp-cs .saswp-sd{width:100%;display:flex;justify-content:center;margin:0 auto;position:relative;top:-10px}.saswp-onclick-show{display:none}.saswp-dp-dsg.saswp_hide{display:none}.entry .entry-content a{text-decoration:none!important}@media(max-width:1200px){.saswp-plf-lst-rv-cnt{grid-template-columns:1fr}}@media(max-width:767px){.saswp-collection-lp{flex:1 0 100%;margin-right:0;width:100%}.saswp-collection-settings{flex:1 0 100%;padding-bottom:0;height:100%;width:100%}.wp-admin .saswp-collection-settings select{max-width:100%}.saswp-r1 ul{grid-template-columns:1fr!important}.saswp-r3 ul{grid-template-columns:190px 190px!important}.saswp-rc-nm{margin:0}.saswp-cst .saswp-cs,.saswp-cst .saswp-sic .saswp-si{max-width:500px}.saswp-rc .saswp-rc-lg{right:0}}@media(max-width:550px){.saswp-cst .saswp-cs,.saswp-cst .saswp-sic .saswp-si{max-width:320px}.saswp-r3 ul{grid-template-columns:190px!important}.saswp-open-class.saswp-popup-btn{width:93vw!important}}@media(max-width:320px){.saswp-cst .saswp-cs,.saswp-cst .saswp-sic .saswp-si{max-width:295px}.saswp-r5{left:10px}}
admin_section/css/main-style.css CHANGED
@@ -7,6 +7,38 @@ and open the template in the editor.
7
  Created on : Jul 27, 2018, 5:36:26 PM
8
  Author : Magazine3
9
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  .saswp_warning{
11
  color: #ef6c00 !important;
12
  }
@@ -757,7 +789,7 @@ Google review module starts here
757
  display: inline-block;
758
  vertical-align: middle;
759
  }
760
- .saswp-str-rtng .saswp-rvw-str{
761
  display: inline-block;
762
  vertical-align: middle;
763
  padding-left: 10px;
@@ -861,7 +893,7 @@ Google review module ends here
861
  float: left;
862
  }
863
  .saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}
864
- .str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}
865
  /*** Review Design CSS ****/
866
  .saswp-g-review-header{
867
  margin-top: 50px;
@@ -1017,20 +1049,7 @@ Google review module ends here
1017
 
1018
  .saswp-nav-menu-list label{
1019
  padding-left: 10px;
1020
- }
1021
-
1022
- /** Coupon Code CSS **/
1023
- .saswp-hide{
1024
- display:none;
1025
- }
1026
- .saswp-settings-second-div .saswp-upgrade-pro.promo-cpn{
1027
- display:block;
1028
- }
1029
- .saswp-upgrade-pro.promo-cpn{
1030
- border: 1px solid #558B2F
1031
- }
1032
-
1033
-
1034
  /*** How to schema css starts here ***/
1035
 
1036
  .saswp-dynamic-properties
@@ -1212,8 +1231,7 @@ a.saswp-feedback-remindme, a.saswp-feedback-no-thanks{
1212
  .saswp-feedback-remindme:after{
1213
  content:",";
1214
  display: inline-block;
1215
- margin-right:5px;
1216
- padding-left: 5px
1217
  }
1218
  a.saswp-revws-lnk{
1219
  display: inline-block;
@@ -1275,4 +1293,1039 @@ a.saswp-revws-lnk{
1275
  }
1276
  .saswp-social-links-table td{
1277
  padding-left: 0px !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1278
  }
7
  Created on : Jul 27, 2018, 5:36:26 PM
8
  Author : Magazine3
9
  */
10
+ .saswp-static-container .spinner{
11
+ padding: 5px;
12
+ float: none;
13
+ margin: 0 auto;
14
+ display: block;
15
+ }
16
+ .saswp-item-list-div{
17
+ display: flex;
18
+ width: 100%;
19
+ align-items: center;
20
+ }
21
+ .saswp-enable-modify-schema{
22
+ padding-top: 10px;
23
+ padding-left: 10px;
24
+ }
25
+ .saswp-enable-modify-schema strong{
26
+ margin-right: 10px;
27
+ }
28
+ .saswp-item-list-div{
29
+ display: flex;
30
+ width: 100%;
31
+ align-items: center;
32
+ }
33
+
34
+ #saswp_item_list_tags{
35
+ width: 100%;
36
+ margin-left: 10px;
37
+ }
38
+ #saswp_item_list_custom{
39
+ width: 100%;
40
+ margin-left: 10px;
41
+ }
42
  .saswp_warning{
43
  color: #ef6c00 !important;
44
  }
789
  display: inline-block;
790
  vertical-align: middle;
791
  }
792
+ .saswp-r5-rng .saswp-rvw-str{
793
  display: inline-block;
794
  vertical-align: middle;
795
  padding-left: 10px;
893
  float: left;
894
  }
895
  .saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}
896
+ .str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%;margin-top: 5px;}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}
897
  /*** Review Design CSS ****/
898
  .saswp-g-review-header{
899
  margin-top: 50px;
1049
 
1050
  .saswp-nav-menu-list label{
1051
  padding-left: 10px;
1052
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
1053
  /*** How to schema css starts here ***/
1054
 
1055
  .saswp-dynamic-properties
1231
  .saswp-feedback-remindme:after{
1232
  content:",";
1233
  display: inline-block;
1234
+ margin-right:5px;
 
1235
  }
1236
  a.saswp-revws-lnk{
1237
  display: inline-block;
1293
  }
1294
  .saswp-social-links-table td{
1295
  padding-left: 0px !important;
1296
+ }
1297
+ #saswp-compatibility-tabs a{
1298
+ cursor: pointer;
1299
+ }
1300
+
1301
+ /*
1302
+ Collection css starts here
1303
+ */
1304
+ .saswp-collection-body{
1305
+ width:100%;
1306
+ display:flex;
1307
+ flex-wrap:wrap;
1308
+ }
1309
+ .saswp-collection-lp{
1310
+ flex:1 0 68%;
1311
+ margin-right: 20px;
1312
+ width:68%;
1313
+ background:#fff;
1314
+ border: 1px solid #ccd0d4;
1315
+ box-shadow: 0 1px 1px rgba(0,0,0,.04);
1316
+ padding-bottom: 22px;
1317
+ }
1318
+ .saswp-collection-settings{
1319
+ flex:1 0 27%;
1320
+ height:100%;
1321
+ width:28%;
1322
+ }
1323
+
1324
+ .saswp-collection-container{
1325
+ margin-top: 60px;
1326
+ width:100%;
1327
+ display: inline-block;
1328
+ padding-right: 20px;
1329
+ box-sizing: border-box;
1330
+ }
1331
+ .saswp-collection-preview-table{
1332
+ width: 100%;
1333
+ }
1334
+ .saswp-collection-preview-table td{
1335
+ width: 30%;
1336
+ }
1337
+ .saswp-platform-added-list{
1338
+ display: inline-block;
1339
+ width: 100%;
1340
+ margin-top: 10px;
1341
+ }
1342
+ .saswp-collection-title input{
1343
+ width: 100%;
1344
+ padding: 3px 8px;
1345
+ font-size: 15px;
1346
+ line-height: 2;
1347
+ height: 1.7em;
1348
+ outline: 0;
1349
+ margin: 0 0 3px;
1350
+ background-color: #fff;
1351
+ color: #32373c;
1352
+ }
1353
+ .saswp-collection-title{
1354
+ margin-bottom: 10px;
1355
+ padding: 10px;
1356
+ background: #f5f5f5;
1357
+ border-bottom: 1px solid #ddd;
1358
+ }
1359
+ .saswp-collection-preview{
1360
+ padding:0px 30px;
1361
+ }
1362
+
1363
+
1364
+ /** Review Design 1 **/
1365
+
1366
+ .saswp-r1{
1367
+ margin-bottom:50px;
1368
+ }
1369
+ .saswp-r1 ul{
1370
+ padding:0px;
1371
+ list-style-type:none;
1372
+ display:grid;
1373
+ width:100%;
1374
+ grid-template-columns:1fr 1fr 1fr;
1375
+ grid-gap:15px;
1376
+ margin:0;
1377
+ }
1378
+ .saswp-r1 li{
1379
+ padding:20px;
1380
+ position: relative;
1381
+ color: #777;
1382
+ border: 1px solid #ededed;
1383
+ background-color: #fafafa;
1384
+ border-radius: 4px;
1385
+ margin:0px;
1386
+ }
1387
+ .saswp-rc{
1388
+ display: flex;
1389
+ width: 100%;
1390
+ flex-wrap: wrap;
1391
+ align-items: flex-start;
1392
+ justify-content: space-between;
1393
+ position: relative;
1394
+ }
1395
+ .saswp-r1 .saswp-rc-lg{
1396
+ position: absolute;
1397
+ right:-5px;
1398
+ }
1399
+ .saswp-r1-aimg img {
1400
+ float: left;
1401
+ max-width: 56px;
1402
+ min-height: 56px;
1403
+ max-height: 56px;
1404
+ border-radius: 100px;
1405
+ }
1406
+ .saswp-rc-a >img {
1407
+ max-width: 56px;
1408
+ min-height: 56px;
1409
+ max-height: 56px;
1410
+ margin-right: 10px;
1411
+ border-radius: 100px;
1412
+ }
1413
+ .saswp-rc-lg img{
1414
+ width:20px;
1415
+ height:20px;
1416
+ border-radius: 100px;
1417
+ }
1418
+
1419
+ .saswp-rc-nm a{
1420
+ text-decoration: none;
1421
+ color: #427fed;
1422
+ font-size: 16px;
1423
+ font-weight:600;
1424
+ display: inline-block;
1425
+ line-height: 1.1;
1426
+ letter-spacing: 0;
1427
+ width:80%;
1428
+ }
1429
+ .saswp-rc-dt{
1430
+ margin-top:5px;
1431
+ font-size:12px;
1432
+ line-height:1.2;
1433
+ color:#999;
1434
+ display:block;
1435
+ }
1436
+ .saswp-rc-a{
1437
+ flex: 1 0 85%;
1438
+ display: flex;
1439
+ justify-content: flex-start;
1440
+ }
1441
+ .saswp-rc-nm{
1442
+ width:100%;
1443
+ margin-left:10px;
1444
+ }
1445
+ .saswp-rc-cnt{
1446
+ position: static;
1447
+ height: 80px;
1448
+ overflow-y: auto;
1449
+ font-size: 14px;
1450
+ line-height:1.6;
1451
+ text-align: left;
1452
+ padding: 0 2px 0 0;
1453
+ margin: 10px 0 0;
1454
+ }
1455
+ .saswp-r2-strs{
1456
+ text-align: center;
1457
+ }
1458
+ .saswp-rc-cnt p{
1459
+ margin:0;
1460
+ }
1461
+ .saswp-rc-cnt::-webkit-scrollbar {
1462
+ width: 4px;
1463
+ display:inline-block;
1464
+
1465
+ }
1466
+ .saswp-rc-cnt::-webkit-scrollbar-thumb {
1467
+ -webkit-border-radius: 10px;
1468
+ border-radius: 10px;
1469
+ background: #ccc;
1470
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
1471
+ }
1472
+ .saswp-rc-cnt::-webkit-scrollbar-track {
1473
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
1474
+ -webkit-border-radius: 4px;
1475
+ border-radius: 4px;
1476
+ }
1477
+
1478
+ /** colltection settings CSS **/
1479
+ .saswp-collection-settings{
1480
+ border: 1px solid #ccd0d4;
1481
+ box-shadow: 0 1px 1px rgba(0,0,0,.04);
1482
+ }
1483
+ .saswp-collection-settings ul{
1484
+ margin:0;
1485
+ padding:0px;
1486
+ }
1487
+ .saswp-collection-settings ul li {
1488
+ border-bottom: 1px solid #ddd;
1489
+ margin: 0;
1490
+ position: relative;
1491
+ }
1492
+ .saswp-dp-dsg{
1493
+ display: inline-grid;
1494
+ grid-template-columns: 1fr 2fr;
1495
+ width: 100%;
1496
+ grid-gap: 0px 5px;
1497
+ align-items: center;
1498
+ color:#666;
1499
+ }
1500
+ .saswp-dp-dtm{
1501
+ margin-top:13px;
1502
+ }
1503
+ .saswp-slider-display{
1504
+ margin-top: 15px;
1505
+ }
1506
+ .wp-admin .saswp-collection-settings select{
1507
+ margin:0px;
1508
+ min-height: 30px;
1509
+ max-height: 30px;
1510
+ max-width: 100%;
1511
+ }
1512
+ .saswp-slider-display span{
1513
+ width: 30%;
1514
+ display: inline-block;
1515
+ }
1516
+ .saswp-collection-settings ul li a{
1517
+ padding:12px 15px;
1518
+ background:#fff;
1519
+ color: #23282d;
1520
+ cursor: pointer;
1521
+ width: 100%;
1522
+ border: none;
1523
+ text-align: left;
1524
+ font-size: 14px;
1525
+ line-height: 1.5;
1526
+ font-weight: 600;
1527
+ transition: all 0.5s ease-in-out 0s;
1528
+ display: block;
1529
+ box-sizing: border-box;
1530
+ position: relative;
1531
+ }
1532
+ .saswp-collection-settings ul li input{
1533
+ width:100%;
1534
+ }
1535
+ .saswp-collection-settings ul li input[type=checkbox] {
1536
+ width:16px;
1537
+ }
1538
+ .saswp-collection-settings ul li a:hover, .saswp-collection-settings ul li a.active{
1539
+ background: #f5f5f5;
1540
+ }
1541
+ .saswp-accordion.active + .saswp-accordion-panel{
1542
+ border-top:1px solid #ddd;
1543
+ }
1544
+ .saswp-plf-lst-rv-cnt{
1545
+ display: inline-grid;
1546
+ width: 100%;
1547
+ flex-wrap: wrap;
1548
+ grid-template-columns: 180px 57px 1fr;
1549
+ grid-gap: 5px
1550
+ }
1551
+ .saswp-accordion-panel {
1552
+ padding: 15px 18px ;
1553
+ display: none;
1554
+ background-color: white;
1555
+ overflow: hidden;
1556
+ border-top: 1px solid #ddd;
1557
+ }
1558
+ .saswp-collection-settings a.saswp-add-to-collection{
1559
+ text-align: center;
1560
+ height: 30px;
1561
+ font-weight: normal;
1562
+ position: relative;
1563
+ top: 1px;
1564
+ line-height: 27px;
1565
+ }
1566
+ .wp-core-ui a.button.saswp-remove-platform{
1567
+ background: transparent;
1568
+ border: none;
1569
+ padding: 0;
1570
+ margin-left: 6px;
1571
+ min-height: 0px;
1572
+ }
1573
+ .wp-core-ui a.button.saswp-remove-platform:hover{
1574
+ color:#c00;
1575
+ }
1576
+ .wp-core-ui a.button.saswp-remove-platform:after{
1577
+ content: "\f153";
1578
+ display: block;
1579
+ font: normal 16px/20px dashicons;
1580
+ }
1581
+ .cancel-btn{
1582
+ margin-right:10px;
1583
+ margin-bottom: 5px;
1584
+ float: left;
1585
+ display: inline-flex;
1586
+ }
1587
+ .wp-admin .saswp-accordion-panel select.saswp-collection-desing{
1588
+ width: 100%;
1589
+ }
1590
+ .saswp-slider-display.saswp-desing-options{
1591
+ margin-top:10px;
1592
+ }
1593
+ .saswp-slider-display.saswp-desing-options span{
1594
+ margin-right: 10px;
1595
+ display: inline-block;
1596
+ }
1597
+ .saswp-collection-settings li a.saswp-accordion:after{
1598
+ content: "\f140";
1599
+ font: normal 20px/1 dashicons;
1600
+ speak: none;
1601
+ display: block;
1602
+ position: absolute;
1603
+ color: #72777c;
1604
+ top: 13px;
1605
+ right: 18px;
1606
+ }
1607
+ .saswp-collection-settings li a.saswp-accordion.active:after{
1608
+ content: "\f142";
1609
+ top: 13px;
1610
+ }
1611
+ .saswp-sv-btn{
1612
+ background: #f5f5f5;
1613
+ padding: 8px 10px;
1614
+ text-align: right;
1615
+ width: 100%;
1616
+ box-sizing: border-box;
1617
+ }
1618
+ .saswp-collection-settings .button-primary{
1619
+ width: 89px;
1620
+ margin: 0;
1621
+ display: inline-block;
1622
+ padding: 2px 0px;
1623
+ }
1624
+ .saswp-collection-shortcode{
1625
+ color: #555;
1626
+ margin-top: 10px;
1627
+ padding: 4px;
1628
+ background: #f1f1f1;
1629
+ display: inline-block;
1630
+ border: 1px solid #ddd;
1631
+ }
1632
+
1633
+ /** Badges CSS **/
1634
+ .saswp-rd3-warp ul{
1635
+ padding:0px;
1636
+ display:grid;
1637
+ grid-template-columns:1fr 1fr 1fr 1fr;
1638
+ grid-gap: 30px;
1639
+ list-style-type:none;
1640
+ margin:0;
1641
+ justify-content: center;
1642
+ }
1643
+ .saswp-rd3-warp li{
1644
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,.26);
1645
+ margin:0px;
1646
+ }
1647
+ .saswp-rd3-warp li a{
1648
+ text-decoration:none;
1649
+ }
1650
+ .saswp-r3-lg{
1651
+ background: #ededed;
1652
+ display: flex;
1653
+ align-items: center;
1654
+ justify-content: center;
1655
+ width: 100%;
1656
+ padding: 6px 8px;
1657
+ box-sizing: border-box;
1658
+ }
1659
+ .saswp-r3-lg span img{
1660
+ width: 18px;
1661
+ height: 18px;
1662
+ margin-right: 10px;
1663
+ }
1664
+ .saswp-r3-lg span {
1665
+ line-height: 0px;
1666
+ }
1667
+ .saswp-r3-lg .saswp-r3-tlt{
1668
+ font-size: 12px;
1669
+ line-height: 1.4;
1670
+ text-transform: uppercase;
1671
+ color: #555;
1672
+ font-weight: 400;
1673
+ }
1674
+ .saswp-lg{
1675
+ line-height: 0;
1676
+ }
1677
+ .saswp-r3-rtng{
1678
+ padding: 13px 10px 10px 10px;
1679
+ background: #fff;
1680
+ border-radius: 0px 0px 3px 3px;
1681
+ text-align: center;
1682
+ }
1683
+ .saswp-r3-rtxt{
1684
+ display: flex;
1685
+ align-items: center;
1686
+ line-height: 0;
1687
+ width: 100%;
1688
+ margin-bottom: 10px;
1689
+ justify-content: center;
1690
+ }
1691
+ .saswp-r3-rtxt .saswp-r3-num{
1692
+ color: #23282d;
1693
+ margin-right: 5px;
1694
+ font-size: 22px;
1695
+ font-weight: 500;
1696
+ position: relative;
1697
+ top: 2px;
1698
+ word-break: normal;
1699
+ }
1700
+ .saswp-rd3-warp .saswp-rvw-str .df-clr, .saswp-rd3-warp .saswp-rvw-str .half-str, .saswp-rd3-warp .saswp-rvw-str .str-ic {
1701
+ display: inline-block;
1702
+ width: 22px;
1703
+ height: 22px;
1704
+ background-repeat: no-repeat;
1705
+ background-size: 22px;
1706
+ margin-right: 3px;
1707
+ }
1708
+ .saswp-r3-brv{
1709
+ color: #666;
1710
+ font-size: 13px;
1711
+ line-height: 1;
1712
+ }
1713
+
1714
+ /** Fomo CSS **/
1715
+ .saswp-r5{
1716
+ position:fixed;
1717
+ bottom:20px;
1718
+ width: calc(100% - 20px);
1719
+ max-width: 325px;
1720
+ border-radius: 12px;
1721
+ background: #fff;
1722
+ border: 1px solid #e6e6e6;
1723
+ box-shadow: 0 0 8px 0px rgba(0, 0, 0, 0.05);
1724
+ transition: all .3s ease-in;
1725
+ display: none;
1726
+ }
1727
+ .saswp-r5 .saswp-rvw-str .df-clr, .saswp-r5 .saswp-rvw-str .half-str, .saswp-r5 .saswp-rvw-str .str-ic {
1728
+ display: inline-block;
1729
+ width: 23px;
1730
+ height: 20px;
1731
+ background-repeat: no-repeat;
1732
+ background-size: 20px;
1733
+ }
1734
+ .saswp-r5-r .saswp-r5-rng .saswp-rvw-str{
1735
+ padding-left:0px;
1736
+ margin-bottom: 3px;
1737
+ }
1738
+ .saswp-r5-r{
1739
+ display: flex;
1740
+ flex-wrap: wrap;
1741
+ width: 100%;
1742
+ align-items: center;
1743
+ height:80px;
1744
+ }
1745
+ .saswp-r5-rng{
1746
+ flex:1 0 60%;
1747
+ padding-left: 15px;
1748
+ }
1749
+ .saswp-r5-lg{
1750
+ width: 80px;
1751
+ height: 100%;
1752
+ border-right: 1px solid #ddd;
1753
+ box-sizing: border-box;
1754
+ background: linear-gradient(to bottom,#fefefe 0,#f2f2f2 100%);
1755
+ position: relative;
1756
+ display: flex;
1757
+ align-items: center;
1758
+ border-radius: 12px 0px 0px 12px;
1759
+ }
1760
+ .saswp-r5-r .saswp-r5-lg span{
1761
+ border-radius: 10px 0px 0px 10px;
1762
+ }
1763
+ .saswp-r5-r .saswp-r5-lg img{
1764
+ position: relative;
1765
+ max-width: 40px;
1766
+ max-height: 40px;
1767
+ left: 20PX;
1768
+ border-radius: 10px 0px 0px 10px;
1769
+ top: 2px;
1770
+ }
1771
+ .saswp-r5-txrng{
1772
+ font-size: 12px;
1773
+ line-height: 1.2;
1774
+ color: #444;
1775
+ display: flex;
1776
+ margin-bottom: 5px;
1777
+ }
1778
+ .saswp-r5-txrng span{
1779
+ font-weight: 600;
1780
+ color: #666;
1781
+ margin-right: 5px
1782
+ }
1783
+ .saswp-r5-rng span.saswp-r5-dt{
1784
+ display: block;
1785
+ font-size: 11px;
1786
+ color: #ababab;
1787
+ font-weight: normal;
1788
+ }
1789
+ .saswp-r5 a{
1790
+ text-decoration:none;
1791
+ }
1792
+
1793
+ /** Popup2 CSS **/
1794
+ .saswp-popup-btn{
1795
+ position: fixed;
1796
+ top: auto;
1797
+ bottom: 0;
1798
+ font-family: "Arial",sans-serif;
1799
+ z-index: 9;
1800
+ box-shadow: 0 20px 40px 8px rgba(0,0,0,.25);
1801
+ width:300px;
1802
+ background: #fff;
1803
+ border:none;
1804
+ padding:0;
1805
+ }
1806
+ .saswp-open-class.saswp-popup-btn{
1807
+ width:300px;
1808
+ }
1809
+ #saswp-reviews-cntn {
1810
+ display:none;
1811
+ }
1812
+ #saswp-sticky-review .saswp-open-class #saswp-reviews-cntn{
1813
+ width: 100%;
1814
+ }
1815
+ .saswp-opn-cls-btn{
1816
+ display: flex;
1817
+ height: 50px;
1818
+ justify-content: space-between;
1819
+ align-items: center;
1820
+ background: #fba306;
1821
+ width:100%;
1822
+ padding:0px 15px;
1823
+ border-radius:4px 4px 0px 0px;
1824
+ cursor: pointer;
1825
+ box-sizing: border-box;
1826
+ }
1827
+ .saswp-opn-cls-btn svg path{
1828
+ fill:#fff;
1829
+ }
1830
+ .saswp-opn-cls-btn span{
1831
+ font-size: 15px;
1832
+ font-weight: 600;
1833
+ color: #fff;
1834
+ }
1835
+ .saswp-onclick-hide, .saswp-onclick-show{
1836
+ display: flex;
1837
+ justify-content: space-between;
1838
+ width: 100%;
1839
+ }
1840
+ .saswp-r4-info ul{
1841
+ list-style-type:none;
1842
+ padding:0;
1843
+ margin:0;
1844
+ text-align:left;
1845
+ height: 350px;
1846
+ overflow-y: scroll;
1847
+ }
1848
+ .saswp-r4-info ul li{
1849
+ border-bottom:1px solid #e4e4e4;
1850
+ padding:20px;
1851
+ }
1852
+ .saswp-r4-b{
1853
+ display: flex;
1854
+ align-items: center;
1855
+ justify-content: flex-start;
1856
+ width: 100%;
1857
+ }
1858
+ .saswp-r4-b .saswp-r4-str{
1859
+ margin-right:10px;
1860
+ }
1861
+ .saswp-r4-b span.saswp-r4-tx{
1862
+ font-size:14px;
1863
+ color:#444;
1864
+ }
1865
+ .saswp-r4-b span.saswp-r4-nm:after{
1866
+ content:"-";
1867
+ display:inline-block;
1868
+ margin:0px 10px;
1869
+ }
1870
+ .saswp-r4-info .saswp-rvw-str .df-clr, .saswp-r4-info .saswp-rvw-str .half-str, .saswp-r4-info .saswp-rvw-str .str-ic {
1871
+ display: inline-block;
1872
+ width: 22px;
1873
+ height: 20px;
1874
+ background-repeat: no-repeat;
1875
+ background-size: 18px;
1876
+ }
1877
+ .saswp-r4-cnt h3{
1878
+ margin: 10px 0px 8px 0px !important;
1879
+ font-size: 18px;
1880
+ color: #333;
1881
+ font-weight: 500;
1882
+ }
1883
+ .saswp-r4-cnt p{
1884
+ font-size: 13px;
1885
+ line-height: 1.5;
1886
+ margin: 0;
1887
+ color: #333;
1888
+ }
1889
+ .saswp-r4-info ul li.saswp-r4-r{
1890
+ display: flex;
1891
+ width: 100%;
1892
+ align-items: center;
1893
+ text-align: center;
1894
+ justify-content: center;
1895
+ box-sizing: border-box;
1896
+ }
1897
+ .saswp-r4-info ul li span.saswp-r4-rnm{
1898
+ margin-left: 10px;
1899
+ font-size: 18px;
1900
+ color:#666;
1901
+ }
1902
+
1903
+ .btn .saswp-onclick-hide, .btn.saswp-open-class .saswp-onclick-show {
1904
+ display: flex;
1905
+ justify-content: space-between;
1906
+ width: 100%;
1907
+ }
1908
+ .btn .saswp-onclick-show, .btn.saswp-open-class .saswp-onclick-hide{
1909
+ display:none;
1910
+ }
1911
+ span.saswp-mines{
1912
+ line-height:0;
1913
+ }
1914
+ .saswp-mines:before{
1915
+ content: "";
1916
+ display: inline-block;
1917
+ width: 20px;
1918
+ height: 4px;
1919
+ background: #fff;
1920
+ position: relative;
1921
+ top: 5px;
1922
+ }
1923
+
1924
+ /** Slider Design CSS **/
1925
+ .saswp-rd2-warp{
1926
+ width:100%;
1927
+ display:inline-block;
1928
+ margin-bottom:50px;
1929
+ }
1930
+ .saswp-rd2-warp div {
1931
+ width:350px;
1932
+ margin-right:25px;
1933
+ }
1934
+ .saswp-rd2-warp .saswp-rc-cnt{
1935
+ white-space: initial;
1936
+ }
1937
+ .saswp-rd2-warp .saswp-r2-b{
1938
+ position: relative;
1939
+ color: #777;
1940
+ border: 1px solid #ededed;
1941
+ background-color: #fafafa;
1942
+ border-radius: 4px;
1943
+ }
1944
+ .saswp-rd2-warp .saswp-rc-cnt{
1945
+ height: 150px;
1946
+ margin: 20px 20px 20px 40px;
1947
+ }
1948
+
1949
+ .saswp-rd2-warp .saswp-rc{
1950
+ padding: 20px;
1951
+ }
1952
+ .saswp-r2-b .saswp-r2-s{
1953
+ display:inline-block;
1954
+ }
1955
+ .saswp-r2-b .saswp-rc-cnt p{
1956
+ display:inline;
1957
+ }
1958
+ .saswp-r2-b .saswp-rc-lg{
1959
+ line-height: 0;
1960
+ position: absolute;
1961
+ right: 13px;
1962
+ top: 13px;
1963
+ background: #fafafa;
1964
+ }
1965
+ .saswp-r2-q svg{
1966
+ width: 20px;
1967
+ fill: #bbb;
1968
+ position: absolute;
1969
+ height: 30px;
1970
+ top: 15px;
1971
+ left: 12px;
1972
+ }
1973
+ .saswp-rd2-warp .saswp-r2-b:before {
1974
+ position: absolute;
1975
+ bottom: -8px;
1976
+ left: 35px;
1977
+ display: block;
1978
+ width: 14px;
1979
+ height: 14px;
1980
+ border: 1px solid #ededed;
1981
+ border-top: none;
1982
+ border-left: none;
1983
+ background-color: #fafafa;
1984
+ content: "";
1985
+ -webkit-transform: rotate(45deg);
1986
+ -ms-transform: rotate(45deg);
1987
+ transform: rotate(45deg);
1988
+ }
1989
+ .carousel-preview{
1990
+ text-align:center;
1991
+ }
1992
+ .carousel-preview button{
1993
+ width:12px;
1994
+ height:12px;
1995
+ border-radius:100px;
1996
+ border:none;
1997
+ margin:0px 5px;
1998
+ cursor: pointer;
1999
+ }
2000
+ .carousel-preview button.saswp-active{
2001
+ background:#427fed;
2002
+ }
2003
+
2004
+ /**Slider csss starts here **/
2005
+
2006
+
2007
+ /** Single Slider CSS Start here **/
2008
+ .saswp-cst .saswp-cs{
2009
+ width: 100%;
2010
+ max-width: 640px;
2011
+ margin: 0 auto;
2012
+ overflow: hidden;
2013
+ position:relative;
2014
+ }
2015
+ .saswp-r2-b{
2016
+ padding: 20px 40px 20px 40px;
2017
+ background-color: #fafafa;
2018
+ position: relative;
2019
+ color: #777;
2020
+ border: 1px solid #ededed;
2021
+ border-radius: 4px;
2022
+ box-sizing: border-box;
2023
+ }
2024
+ .saswp-cst .saswp-rc{
2025
+ padding: 20px;
2026
+ box-sizing: border-box;
2027
+ }
2028
+ .saswp-si .saswp-r2-b:before {
2029
+ position: absolute;
2030
+ bottom: -8px;
2031
+ left: 35px;
2032
+ display: block;
2033
+ width: 14px;
2034
+ height: 14px;
2035
+ border: 1px solid #ededed;
2036
+ border-top: none;
2037
+ border-left: none;
2038
+ background-color: #fafafa;
2039
+ content: "";
2040
+ -webkit-transform: rotate(45deg);
2041
+ -ms-transform: rotate(45deg);
2042
+ transform: rotate(45deg);
2043
+ }
2044
+ .saswp-si .saswp-rc-cnt{
2045
+ margin:0px;
2046
+ }
2047
+ .saswp-cs .saswp-slider-controls {
2048
+ width: 100%;
2049
+ display: flex;
2050
+ align-items: center;
2051
+ justify-content: space-between;
2052
+ box-sizing: border-box;
2053
+ z-index: 9;
2054
+ position: relative;
2055
+ top: 10px;
2056
+ }
2057
+ .saswp-slider-controls a.saswp-slider-prev-btn{
2058
+ position: absolute;
2059
+ left: 10px;
2060
+ bottom: 0px;
2061
+ background: rgba(0,0,0,0.5);
2062
+ line-height: 0;
2063
+ border-radius: 100px;
2064
+ width: 30px;
2065
+ height: 30px;
2066
+ }
2067
+ .saswp-slider-controls a.saswp-slider-prev-btn:before{
2068
+ content:"";
2069
+ display: inline-block;
2070
+ width: 6px;
2071
+ height: 6px;
2072
+ border: 2px solid #fff;
2073
+ border-top: none;
2074
+ border-left: none;
2075
+ transform: rotate(135deg);
2076
+ position: relative;
2077
+ top: 11px;
2078
+ left: 12px;
2079
+ }
2080
+ .saswp-slider-controls a.saswp-slider-next-btn{
2081
+ position: absolute;
2082
+ right: 10px;
2083
+ bottom: 0px;
2084
+ background: rgba(0,0,0,0.5);
2085
+ line-height: 0;
2086
+ border-radius: 100px;
2087
+ width: 30px;
2088
+ height: 30px;
2089
+ }
2090
+ .saswp-slider-controls a.saswp-slider-next-btn:after{
2091
+ content:"";
2092
+ display: inline-block;
2093
+ width: 6px;
2094
+ height: 6px;
2095
+ border: 2px solid #fff;
2096
+ border-top: none;
2097
+ border-left: none;
2098
+ transform: rotate(135deg);
2099
+ transform: rotate(-45deg);
2100
+ position: relative;
2101
+ top: 11px;
2102
+ right: -9px;
2103
+ }
2104
+ .saswp-si .saswp-rc-lg img {
2105
+ width: 25px;
2106
+ height: 25px;
2107
+ }
2108
+ .saswp-cs .saswp-slider-dots .saswp-dot {
2109
+ width: 10px;
2110
+ height: 10px;
2111
+ background: #ccc;
2112
+ transition: 0.15s ease-in-out;
2113
+ border-radius: 8px;
2114
+ cursor: pointer;
2115
+ margin: 0 12px;
2116
+ }
2117
+ .saswp-cs .saswp-slider-dots .saswp-dot.saswp-active {
2118
+ background: #0071a1;
2119
+ }
2120
+ .saswp-cst .saswp-sic .saswp-si {
2121
+ width: 100vw;
2122
+ max-width: 640px;
2123
+ display: block;
2124
+ }
2125
+ .spinner.saswp-spinner{
2126
+ float:none;
2127
+ margin: 0px auto;
2128
+ display: block;
2129
+ }
2130
+ /** Single Slider CSS Ends here **/
2131
+
2132
+ /** Carousel Slider CSS Starts here **/
2133
+ .saswp-cct .saswp-cs {
2134
+ width: 100%;
2135
+ max-width: 800px;
2136
+ margin: 0 auto;
2137
+ overflow: hidden;
2138
+ position: relative;
2139
+ }
2140
+ .saswp-cct .saswp-sic .saswp-si {
2141
+ width: 100%;
2142
+ max-width: 800px;
2143
+ display: flex;
2144
+ }
2145
+ .saswp-cct .saswp-r2-sli{
2146
+ width: 100%;
2147
+ margin-right: 20px;
2148
+ max-width: 40%;
2149
+ }
2150
+ .saswp-cct .saswp-rc {
2151
+ padding: 20px 10px;
2152
+ box-sizing: border-box;
2153
+ }
2154
+ .saswp-cct .saswp-rc-cnt{
2155
+ height:120px;
2156
+ }
2157
+ .saswp-cs .saswp-sic {
2158
+ display: flex;
2159
+ flex-wrap: wrap;
2160
+ height: auto;
2161
+ transition: transform 0.35s ease-in-out;
2162
+ }
2163
+ .saswp-cs .saswp-slider-controls a {
2164
+ color: #333;
2165
+ text-decoration: none;
2166
+ transition: 0.15s ease-in-out;
2167
+ }
2168
+ .saswp-cs .saswp-slider-controls a:hover {
2169
+ color: #888;
2170
+ }
2171
+ .saswp-cs .saswp-slider-dots {
2172
+ width: 100%;
2173
+ display: flex;
2174
+ justify-content: center;
2175
+ margin: 0 auto;
2176
+ position: relative;
2177
+ top: -10px;
2178
+ }
2179
+ .saswp-onclick-show{
2180
+ display: none;
2181
+ }
2182
+ .saswp-dp-dsg.saswp_hide{
2183
+ display: none;
2184
+ }
2185
+ /** Carousel Slider CSS Ends here **/
2186
+
2187
+
2188
+ /** Responsive CSS **/
2189
+ @media(max-width:1200px){
2190
+ .saswp-plf-lst-rv-cnt{
2191
+ grid-template-columns: 1fr;
2192
+ }
2193
+ }
2194
+
2195
+ @media(max-width:767px){
2196
+ .saswp-collection-lp{
2197
+ flex: 1 0 100%;
2198
+ margin-right: 0px;
2199
+ width: 100%;
2200
+ }
2201
+ .saswp-collection-settings {
2202
+ flex: 1 0 100%;
2203
+ height: 100%;
2204
+ width: 100%;
2205
+ }
2206
+ .wp-admin .saswp-collection-settings select{
2207
+ max-width:100%;
2208
+ }
2209
+ }
2210
+ /*** Upgrade Pro CSS starts here***/
2211
+ .saswp-upgrade-pro{
2212
+ background: #fff;
2213
+ padding: 25px;
2214
+ border: 1px solid #d8d8d8;
2215
+ display: inline-block;
2216
+ margin-top: 10px;
2217
+ width: 81%;
2218
+ }
2219
+ .saswp-upgrade-pro h2{
2220
+ font-size: 20px;
2221
+ margin: 0;
2222
+ color: #23282d;
2223
+ font-weight: 600;
2224
+ text-align: center;
2225
+ }
2226
+ .saswp-upgrade-pro ul{
2227
+ margin: 25px 0px 20px 0px;
2228
+ display: inline-block;
2229
+ }
2230
+ .saswp-upgrade-pro ul li{
2231
+ position: relative;
2232
+ padding-left: 30px;
2233
+ font-size: 14px;
2234
+ line-height: 1.4;
2235
+ margin-bottom: 10px;
2236
+ }
2237
+ .saswp-upgrade-pro ul li:before {
2238
+ content: "";
2239
+ background-image: url(../images/check.png);
2240
+ background-repeat: no-repeat;
2241
+ background-size: 20px;
2242
+ width: 20px;
2243
+ height: 20px;
2244
+ position: absolute;
2245
+ left: 2px;
2246
+ top: 2px;
2247
+ }
2248
+ .saswp-upgrade-pro a{
2249
+ background: #d2150a;
2250
+ padding: 10px 0px;
2251
+ display: block;
2252
+ text-align: center;
2253
+ color: #fff;
2254
+ text-decoration: none;
2255
+ font-size: 16px;
2256
+ font-weight: 600;
2257
+ letter-spacing: 1px;
2258
+ border-radius: 5px;
2259
+ }
2260
+ .saswp-settings-second-div .saswp-upgrade-pro.promo-cpn{
2261
+ display:block;
2262
+ }
2263
+ .saswp-upgrade-pro.promo-cpn{
2264
+ border: 1px solid #558B2F
2265
+ }
2266
+ /*** Upgrade Pro CSS ends here***/
2267
+
2268
+ /** Coupon Code CSS **/
2269
+ .saswp-hide{
2270
+ display:none;
2271
+ }
2272
+ .saswp-settings-second-div .saswp-upgrade-pro.promo-cpn{
2273
+ display: block;
2274
+ margin: 0;
2275
+ }
2276
+ .saswp-upgrade-pro.promo-cpn{
2277
+ border: 1px solid #558B2F;
2278
+ border-radius: 8px;
2279
+ }
2280
+ .saswp-upgrade-pro.promo-cpn h2{
2281
+ color: #2E7D32;
2282
+ font-size: 24px;
2283
+ text-align: center;
2284
+ margin: 0px 0px 20px 0px;
2285
+ }
2286
+ .saswp-upgrade-pro.promo-cpn span {
2287
+ text-align: center;
2288
+ font-size: 14px;
2289
+ display: inline-block;
2290
+ color: #777;
2291
+ padding: 0px 20px;
2292
+ box-sizing: border-box;
2293
+ line-height: 1.4;
2294
+ font-weight: 400;
2295
+ }
2296
+ .saswp-promo {
2297
+ font-size: 20px;
2298
+ margin-top: 15px;
2299
+ width: 100%;
2300
+ text-align: center;
2301
+ }
2302
+ .saswp-upgrade-pro.promo-cpn .prm-txt {
2303
+ display: block;
2304
+ line-height: 1;
2305
+ }
2306
+ .saswp-upgrade-pro.promo-cpn .saswp-promo .prm-cpn {
2307
+ border: 1px dashed #1B5E20;
2308
+ border-radius: 100px;
2309
+ margin-top: 5px;
2310
+ color: #388E3C;
2311
+ font-size: 20px;
2312
+ padding: 2px 15px 2px 15px;
2313
+ }
2314
+ .saswp-upgrade-pro a{
2315
+ background:#43A047;
2316
+ }
2317
+ .saswp-upgrade-pro{border-radius: 8px;}
2318
+ .saswp-settings-second-div a{
2319
+ text-decoration: none;
2320
+ }
2321
+ .saswp-upgrade-pro ul li:before{
2322
+ content: "\f147";
2323
+ background-repeat: no-repeat;
2324
+ font-family: dashicons;
2325
+ position: absolute;
2326
+ color: #46b450;
2327
+ font-size: 25px;
2328
+ left: 0px;
2329
+ line-height: 1;
2330
+ top: 0px;
2331
  }
admin_section/css/main-style.min.css CHANGED
@@ -1,66 +1 @@
1
- .saswp_warning{color:#ef6c00!important}.saswp_hide{display:none}.saswp-general table th{width:auto;font-weight:600;padding:0}.saswp-general table{margin-top:0}.saswp-general table td{padding:5px}.saswp-knowledge table th{width:auto;padding:0}.saswp-knowledge table{margin-top:0}.saswp-knowledge table td{padding:5px}.saswp-schema table th{width:auto;padding:0}.saswp-schema table{margin-top:0}.saswp-schema table td{padding:5px}.saswp-amp table th{width:auto;padding:0}.saswp-amp table{margin-top:0}.saswp-amp table td{padding:5px}.saswp-help table th{width:auto;padding:0}.saswp-support table th{width:auto;padding:0}.saswp-review table th{width:auto;padding:0}.saswp-help table{margin-top:0}.saswp-help table td{padding:5px}.saswp-settings-list{display:inline-block;width:100%}.saswp-settings-list li{padding-left:0}.saswp-settings-list li div label{font-weight:600}.saswp-general h2{margin-bottom:0}.saswp-knowledge h2{margin-bottom:0}.saswp-schema h2{margin-bottom:0}.saswp-help h2{margin-bottom:0}.saswp-settings-form p.submit{margin-top:0}.saswp_qanda_p{font-weight:500}.saswp-display-none{display:none!important}.saswp-placement-groups{border:1px solid #e5e5e5}.saswp-query-success{color:#060}.saswp-query-error{color:#bf3322}.saswp-tools table th{width:auto;padding:0}.saswp-tools table{margin-top:0}.saswp-tools table td{padding:5px}.saswp-tools-field-title strong{padding-right:130px}.saswp-tools .saswp-tooltip{width:230px}.saswp-tools .saswp-knowledge-label{float:left}.saswp-error{color:red!important}.saswp-tooltip{position:relative;display:inline-block}.saswp-tooltip .saswp-tooltiptext{visibility:hidden;width:200px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:100%;left:50%;margin-left:-25px}.saswp-tooltiptext::after{content:"";position:absolute;top:100%;left:10%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}.saswp-knowledge-base .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-knowledge-base .saswp-knowledge-field{width:75%;float:right}.saswp-social-fileds ul{display:grid;grid-template-columns:26.5% 1fr}.saswp-social-fileds li{display:flex}.saswp-social-fileds .saswp-knowledge-field{width:100%;margin-left:10px}.saswp-social-fileds .saswp-knowledge-field input{float:right;margin:inherit}.saswp-schema-type-fields .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-schema-type-fields .saswp-knowledge-field{width:75%;float:right}.saswp-settings-first-div{width:92%}.saswp-settings-container{display:inline-flex;width:100%}.saswp-settings-second-div{float:right;position:relative;top:20px;margin-right:30px;margin-top:37px}.saswp-feedback-panel{height:200px;width:280px;background:#fff;position:relative}.saswp-start-quck-setup{position:relative;float:inherit;top:7px;left:15px}.saswp-feedback-panel ul{list-style-type:circle;list-style:decimal;padding-left:30px;font-size:15px}.saswp-feedback-panel a{text-decoration:none}.saswp-feedback-panel h2{text-align:center;padding-top:18px}.saswp-social-sharing-buttons{text-align:center;padding-top:20px}.saswp-facebook-share{background:#3b5998;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-right:5px}.saswp-social-sharing-buttons a{text-align:center;padding:8px}.twitter-share-button{background:#1b95e0!important;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-left:5px}.saswp-placement-button{padding:3px 10px;color:#0d0d0d;font-size:14px;border:1px solid #aaa;border-radius:2px;background:linear-gradient(#ededed,#fff)}.saswp-placement-table td{padding:5px 10px!important}.saswp-archive-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-archive-div .saswp-knowledge-label{float:left;clear:both}.saswp-amp .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-amp .saswp-knowledge-label{float:left;clear:both}.saswp-review .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-review .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-compativility-div .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div li{display:inline-flex}.saswp-seller-div .saswp-knowledge-label{float:left;clear:both}.saswp-seller-div .saswp-knowledge-field{float:left;width:70%}.saswp-post-specific-tab-wrapper{display:inline-block;width:25%;vertical-align:top;box-sizing:border-box;padding-right:10px}.saswp-post-specific-container{display:inline-block;width:calc(75% - 1px);border-left:1px solid #eee}.saswp-post-specific-wrapper{padding:10px}.saswp-tab a.selected{background-color:#ccc}.saswp-tab-links{display:block;background-color:inherit;color:#000;padding:6px 10px;outline:0;text-align:left;cursor:pointer;transition:.3s;font-size:15px;width:130px;overflow:hidden;margin-right:10px}.saswp-star-rating{cursor:pointer}.saswp-post-specific-wrapper select{width:100%}.saswp-review-tables{width:100%}.saswp-over-all-raring{float:right}.saswp-review-pros-and-cons{position:relative;clear:both}.saswp-review-pros-and-cons>div:first{padding-left:10px}.saswp-review-pros-and-cons>div{width:49%;display:inline-block}.saswp-review-pros-and-cons>div:nth-child(2){padding-left:12px}.saswp-wp-ediot-desc{margin-bottom:-23px;display:block}.saswp-review-description{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saswp-review-pros-and-cons{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saspw-review-item-list{margin-top:20px;border-top:1px solid #eee}.saswp-review-item-list-table{padding-bottom:10px}#sasw-review input[type=text]{width:180px}#sasw-review input[type=number]{width:180px}#saswp-review-item-enable{width:10px}.saswp-enable-review-on-post{padding-bottom:10px}.saswp-enable-review-on-post label{font-weight:500}.saswp-compatibility table th{width:auto;padding:0}.saswp-compatibility .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-field{float:right;width:69%;padding-bottom:10px}.saswp_kg_logo,.saswp_person_fields{background-color:#fff!important}.saswp_image_thumbnail{padding-top:5px;display:inline-block}.saswp-compatibility .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-job-posting-note,.saswp-schem-type-note{color:#d2691e}.saswp-custom-fields-name{border:1px solid #aaa;border-radius:4px}.saswp-option-table-class p{margin:auto;font-style:italic;color:#666}.saswp-switch{position:relative;display:inline-block;width:40px;height:22px;border:20px}.saswp-switch input{opacity:0;width:0;height:0}.saswp-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#5a6783;transition:.4s;border-radius:20px}.saswp-slider:before{position:absolute;content:"";height:15px;width:15px;left:4px;bottom:4px;background-color:#fff;transition:.4s;border-radius:20px}input:checked+.saswp-slider{background-color:#61bd3b;border-radius:30px}input:focus+.saswp-slider{box-shadow:0 0 1px #2196f3}input:checked+.saswp-slider:before{transform:translateX(15px)}.saswp-slider.saswp-round{border-radius:34px}.saswp-slider.saswp-round:before{border-radius:50%}.saswp-tab-nav li{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;border-bottom:1px solid #eee}.saswp-tab-nav .selected{background-color:#ccc}.saswp-single-post-restore .saswp-switch{height:28px}.saswp-single-post-restore .saswp-slider:before{height:20px}.option-table-class{width:100%}.option-table-class tr td{padding:10px 10px 10px 10px}.option-table-class tr>td{width:30%}.option-table-class tr td:last-child{width:60%}.saswp-custom-fields-table{width:100%}.saswp-custom-fields-table input{width:100%}.saswp-custom-fields-table tr td{padding:10px 10px 10px 10px}.saswp-custom-fields-table td{width:30%;vertical-align:top}.saswp-option-table-class input[type=text],.saswp-option-table-class select{width:100%}.saswp-paywall-table-class input[type=text],.saswp-paywall-table-class select{width:100%}.saswp-email_schema table th{width:auto;padding:0}.saswp-email_schema .saswp-knowledge-label{float:left;clear:both}.saswp-email_schema .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-add-on-plugin label{margin-top:10px}.saswp-add-on-plugin span{width:250px;display:inline-block}.saswp-knowledge-label label[for=saswp_search_box_schema_checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-booking-checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-membership-checkbox]{padding-left:10px}.saswp-global-selected{color:#000;font-weight:500}#saswp-global-tabs a{cursor:pointer}#saswp-global-tabs{padding-left:5px}#saswp-tools-tabs a{cursor:pointer}#saswp-review-tabs a{cursor:pointer}#saswp-tools-tabs{padding-left:5px}.saswp-need-help{padding-left:60px}.saswp-heading{display:inline-flex;align-items:baseline}.saswp-heading h2{margin-bottom:0}.saswp-view-docs a{margin-right:5px!important;margin-top:10px!important;float:right}.saswp-tabs .nav-tab{margin-left:4px}.saswp-panel{padding:7px 18px;background-color:#fff;box-shadow:0 0 20px 1px #d2cccc}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-input-fields select{width:100%}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-str{display:inline-block;width:100%;vertical-align:middle}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700;display:inline-block;vertical-align:middle}.saswp-str-rtng .saswp-rvw-str{display:inline-block;vertical-align:middle;padding-left:10px;width:auto}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px;border-radius:100%}.saswp-premium_features table th,.saswp-services table th{width:auto;padding:0}.saswp-features-blocks{display:inline-grid;grid-template-columns:1fr 1fr;grid-gap:20px}.saswp-features-blocks li{background:#fff;padding:25px;border:1px solid #d8d8d8}.saswp-features-blocks li a{text-decoration:none}.saswp-ele-ic{border-radius:256px;display:inline-block;padding:8px 10px 8px 10px;width:70px;margin-right:20px;height:70px;float:left}.saswp-ele-ic img{width:80%;left:10%;position:relative;top:9%}.saswp-ele-1{background:#96588a}.saswp-ele-2{background:#00a97e}.saswp-ele-3{background:#cacaca}.saswp-ele-4{background:#9c56cc}.saswp-ele-tlt h3{margin:0;font-size:18px;line-height:1.4}.saswp-ele-tlt p{margin-top:10px}.saswp-sts-btn{box-sizing:border-box;height:52px;margin-top:20px;padding:6px 15px;border:1px solid #e5e5e5;border-radius:3px;display:flex;align-items:center;justify-content:space-between}.saswp-d-btn{background:#d2150a;padding:6px 18px;border-radius:30px;font-size:14px;color:#fff}.form-wrap .saswp-sts-txt{font-size:16px;color:#000}.saswp-sts-txt span{color:#bebfc0;padding-left:5px}.saswp_review_platform .saswp-g-plus{float:left}.saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px;width:100%}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px;width:20px;height:20px}.saswp-g-plus img{max-width:100%}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px}.saswp-g-review-header div{margin-top:10px}.saswp-upgrade-pro{background:#fff;padding:25px;border:1px solid #d8d8d8;display:inline-block;margin-top:10px;width:81%}.saswp-upgrade-pro h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:15px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro a{background:#d2150a;padding:10px 0;display:block;text-align:center;color:#fff;text-decoration:none;font-size:16px;font-weight:600;letter-spacing:1px;border-radius:5px}.saswp_image_prev{max-width:200px;max-height:200px;float:left;padding-left:2px}.saswp_prev_close{position:relative;width:30px;height:30px;top:12px;font-size:20px;top:-5px;text-decoration:none}.saswp-add-custom-schema-div{margin-top:10px;border-top:1px solid #eee;padding-top:5px}.saswp-nav-menu-list label{padding-left:10px}.saswp-dynamic-properties{border:1px solid #aaa;margin-top:5px;margin-bottom:5px}.saswp-table-close{float:right;cursor:pointer}.saswp-table-create-onajax table td,.saswp-table-create-onajax table th{padding:5px}.saswp-table-create-onajax select{width:98%}.saswp-g-reviews-settings-table input{width:100%}.saswp-s-reviews-settings-table input{width:100%}.saswp_rv_module_pro_notice{border:1px solid #d8d8d8;background:#fff}.saswp-settings-list .saswp-rev-mod{width:100%;display:inline-block;margin-top:20px}.saswp-rev-mod .saswp-knowledge-label{width:100%;display:inline-block;padding:10px 16px;font-weight:600;font-size:16px;color:#333;background:#f9f9f9;border:1px solid #d8d8d8;border-bottom:none;box-sizing:border-box}.saswp-rev-mod .saswp-knowledge-field{width:100%;display:inline-block}.saswp-rev-mod .saswp_rv_module_pro_notice{padding:20px}.saswp_cmpny_lst{width:100%;display:inline-block;margin-top:30px}.saswp_rv_module_pro_notice ul{margin:15px 0 20px 0;width:100%;display:inline-grid;grid-template-columns:1fr 1fr 1fr;grid-gap:20px;border-bottom:1px solid #eee;padding-bottom:20px}.saswp_rv_module_pro_notice ul li{position:relative;font-size:15px;line-height:1.5;color:#444;margin:0}.saswp_rv_module_pro_notice ul li span{padding-left:3px}.saswp_rv_module_pro_notice h2{text-align:center;font-size:31px}.saswp_rv_module_pro_notice .saswp_desc{text-align:center;font-size:18px;font-style:normal;color:#000}.saswp_rv_module_pro_notice .saswp_desc a{font-style:italic}.saswp_rv_module_pro_notice .saswp_lst{color:grey;font-family:georgia;font-style:italic;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice .saswp_avlbl{color:#2a902e;font-family:georgia;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice ul li img{width:20px;height:20px;position:relative;top:4px}.saswp-rev-btn{width:100%;display:inline-block;margin-top:20px;text-align:center}.saswp-rev-btn span{display:block;font-size:13px;margin-bottom:15px}.saswp-rev-btn a{padding:12px 18px;display:inline-block;text-decoration:none;border-radius:5px;background:#0085ba;color:#fff;font-weight:600;font-size:18px}.select2-container{width:100%!important}.saswp-schema-modify-section{margin-top:15px;border-top:1px solid #eee;padding-top:15px}.saswp-custom-meta-list{border:1px solid #aaa;border-radius:4px}.saswp-custom-fields-table tr td:nth-child(3n+3) input{border:1px solid #aaa;border-radius:4px}.updated.notice p{display:flex;width:100%;align-items:center}.updated.notice .dashicons-thumbs-up{margin-right:10px}a.saswp-feedback-no-thanks,a.saswp-feedback-remindme{display:inline-block;cursor:pointer}.saswp-feedback-remindme:after{content:",";display:inline-block;margin-right:5px;padding-left:5px}a.saswp-revws-lnk{display:inline-block;background:#0085ba;padding:12px 20px;color:#fff;text-decoration:none;border-radius:3px;margin-left:20px;font-size:14px;line-height:.6}.saswp-update-notice-btns{display:inline-block;width:100%;margin-bottom:5px}.saswp-about-contact-page{width:75%;float:right}.saswp-about-contact-page-tooltip{float:left;clear:both}.saswp-quick-setup{float:left}.saswp_add_schema_fields_on_fly{margin-bottom:5px!important}.saswp-custom-fields-table .saswp_image_prev{max-width:62px!important}.saswp-custom-fields-table .saswp_prev_close{font-size:15px}.saswp-review-content-table td:nth-child(2){width:50%;float:left}.saswp-review-content-table input{width:100%}.saswp-review-content-table select{width:100%}.saswp-review-content-table textarea{width:100%}.saswp-social-links-table{width:100%}.saswp-social-links-table input{width:100%}.saswp-add-social-links{margin:3px!important}.saswp-social-links-table td{padding-left:0!important}
2
-
3
- /** Coupon Code CSS **/
4
- .saswp-hide{
5
- display:none;
6
- }
7
- .saswp-settings-second-div .saswp-upgrade-pro.promo-cpn{
8
- display: block;
9
- margin: 0;
10
- }
11
- .saswp-upgrade-pro.promo-cpn{
12
- border: 1px solid #558B2F;
13
- border-radius: 8px;
14
- }
15
- .saswp-upgrade-pro.promo-cpn h2{
16
- color: #2E7D32;
17
- font-size: 24px;
18
- text-align: center;
19
- margin: 0px 0px 20px 0px;
20
- }
21
- .saswp-upgrade-pro.promo-cpn span {
22
- text-align: center;
23
- font-size: 14px;
24
- display: inline-block;
25
- color: #777;
26
- padding: 0px 20px;
27
- box-sizing: border-box;
28
- line-height: 1.4;
29
- font-weight: 400;
30
- }
31
- .saswp-promo {
32
- font-size: 20px;
33
- margin-top: 15px;
34
- width: 100%;
35
- text-align: center;
36
- }
37
- .saswp-upgrade-pro.promo-cpn .prm-txt {
38
- display: block;
39
- line-height: 1;
40
- }
41
- .saswp-upgrade-pro.promo-cpn .saswp-promo .prm-cpn {
42
- border: 1px dashed #1B5E20;
43
- border-radius: 100px;
44
- margin-top: 5px;
45
- color: #388E3C;
46
- font-size: 20px;
47
- padding: 2px 15px 2px 15px;
48
- }
49
- .saswp-upgrade-pro a{
50
- background:#43A047;
51
- }
52
- .saswp-upgrade-pro{border-radius: 8px;}
53
- .saswp-settings-second-div a{
54
- text-decoration: none;
55
- }
56
- .saswp-upgrade-pro ul li:before{
57
- content: "\f147";
58
- background-repeat: no-repeat;
59
- font-family: dashicons;
60
- position: absolute;
61
- color: #46b450;
62
- font-size: 25px;
63
- left: 0px;
64
- line-height: 1;
65
- top: 0px;
66
- }
1
+ .saswp-static-container .spinner{padding:5px;float:none;margin:0 auto;display:block}.saswp-item-list-div{display:flex;width:100%;align-items:center}.saswp-enable-modify-schema{padding-top:10px;padding-left:10px}.saswp-enable-modify-schema strong{margin-right:10px}.saswp-item-list-div{display:flex;width:100%;align-items:center}#saswp_item_list_tags{width:100%;margin-left:10px}#saswp_item_list_custom{width:100%;margin-left:10px}.saswp_warning{color:#ef6c00!important}.saswp_hide{display:none}.saswp-general table th{width:auto;font-weight:600;padding:0}.saswp-general table{margin-top:0}.saswp-general table td{padding:5px}.saswp-knowledge table th{width:auto;padding:0}.saswp-knowledge table{margin-top:0}.saswp-knowledge table td{padding:5px}.saswp-schema table th{width:auto;padding:0}.saswp-schema table{margin-top:0}.saswp-schema table td{padding:5px}.saswp-amp table th{width:auto;padding:0}.saswp-amp table{margin-top:0}.saswp-amp table td{padding:5px}.saswp-help table th{width:auto;padding:0}.saswp-support table th{width:auto;padding:0}.saswp-review table th{width:auto;padding:0}.saswp-help table{margin-top:0}.saswp-help table td{padding:5px}.saswp-settings-list{display:inline-block;width:100%}.saswp-settings-list li{padding-left:0}.saswp-settings-list li div label{font-weight:600}.saswp-general h2{margin-bottom:0}.saswp-knowledge h2{margin-bottom:0}.saswp-schema h2{margin-bottom:0}.saswp-help h2{margin-bottom:0}.saswp-settings-form p.submit{margin-top:0}.saswp_qanda_p{font-weight:500}.saswp-display-none{display:none!important}.saswp-placement-groups{border:1px solid #e5e5e5}.saswp-query-success{color:#060}.saswp-query-error{color:#bf3322}.saswp-tools table th{width:auto;padding:0}.saswp-tools table{margin-top:0}.saswp-tools table td{padding:5px}.saswp-tools-field-title strong{padding-right:130px}.saswp-tools .saswp-tooltip{width:230px}.saswp-tools .saswp-knowledge-label{float:left}.saswp-error{color:red!important}.saswp-tooltip{position:relative;display:inline-block}.saswp-tooltip .saswp-tooltiptext{visibility:hidden;width:200px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:100%;left:50%;margin-left:-25px}.saswp-tooltiptext::after{content:"";position:absolute;top:100%;left:10%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}.saswp-knowledge-base .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-knowledge-base .saswp-knowledge-field{width:75%;float:right}.saswp-social-fileds ul{display:grid;grid-template-columns:26.5% 1fr}.saswp-social-fileds li{display:flex}.saswp-social-fileds .saswp-knowledge-field{width:100%;margin-left:10px}.saswp-social-fileds .saswp-knowledge-field input{float:right;margin:inherit}.saswp-schema-type-fields .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-schema-type-fields .saswp-knowledge-field{width:75%;float:right}.saswp-settings-first-div{width:92%}.saswp-settings-container{display:inline-flex;width:100%}.saswp-settings-second-div{float:right;position:relative;top:20px;margin-right:30px;margin-top:37px}.saswp-feedback-panel{height:200px;width:280px;background:#fff;position:relative}.saswp-start-quck-setup{position:relative;float:inherit;top:7px;left:15px}.saswp-feedback-panel ul{list-style-type:circle;list-style:decimal;padding-left:30px;font-size:15px}.saswp-feedback-panel a{text-decoration:none}.saswp-feedback-panel h2{text-align:center;padding-top:18px}.saswp-social-sharing-buttons{text-align:center;padding-top:20px}.saswp-facebook-share{background:#3b5998;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-right:5px}.saswp-social-sharing-buttons a{text-align:center;padding:8px}.twitter-share-button{background:#1b95e0!important;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-left:5px}.saswp-placement-button{padding:3px 10px;color:#0d0d0d;font-size:14px;border:1px solid #aaa;border-radius:2px;background:linear-gradient(#ededed,#fff)}.saswp-placement-table td{padding:5px 10px!important}.saswp-archive-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-archive-div .saswp-knowledge-label{float:left;clear:both}.saswp-amp .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-amp .saswp-knowledge-label{float:left;clear:both}.saswp-review .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-review .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-compativility-div .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div li{display:inline-flex}.saswp-seller-div .saswp-knowledge-label{float:left;clear:both}.saswp-seller-div .saswp-knowledge-field{float:left;width:70%}.saswp-post-specific-tab-wrapper{display:inline-block;width:25%;vertical-align:top;box-sizing:border-box;padding-right:10px}.saswp-post-specific-container{display:inline-block;width:calc(75% - 1px);border-left:1px solid #eee}.saswp-post-specific-wrapper{padding:10px}.saswp-tab a.selected{background-color:#ccc}.saswp-tab-links{display:block;background-color:inherit;color:#000;padding:6px 10px;outline:0;text-align:left;cursor:pointer;transition:.3s;font-size:15px;width:130px;overflow:hidden;margin-right:10px}.saswp-star-rating{cursor:pointer}.saswp-post-specific-wrapper select{width:100%}.saswp-review-tables{width:100%}.saswp-over-all-raring{float:right}.saswp-review-pros-and-cons{position:relative;clear:both}.saswp-review-pros-and-cons>div:first{padding-left:10px}.saswp-review-pros-and-cons>div{width:49%;display:inline-block}.saswp-review-pros-and-cons>div:nth-child(2){padding-left:12px}.saswp-wp-ediot-desc{margin-bottom:-23px;display:block}.saswp-review-description{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saswp-review-pros-and-cons{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saspw-review-item-list{margin-top:20px;border-top:1px solid #eee}.saswp-review-item-list-table{padding-bottom:10px}#sasw-review input[type=text]{width:180px}#sasw-review input[type=number]{width:180px}#saswp-review-item-enable{width:10px}.saswp-enable-review-on-post{padding-bottom:10px}.saswp-enable-review-on-post label{font-weight:500}.saswp-compatibility table th{width:auto;padding:0}.saswp-compatibility .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-field{float:right;width:69%;padding-bottom:10px}.saswp_kg_logo,.saswp_person_fields{background-color:#fff!important}.saswp_image_thumbnail{padding-top:5px;display:inline-block}.saswp-compatibility .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-job-posting-note,.saswp-schem-type-note{color:#d2691e}.saswp-custom-fields-name{border:1px solid #aaa;border-radius:4px}.saswp-option-table-class p{margin:auto;font-style:italic;color:#666}.saswp-switch{position:relative;display:inline-block;width:40px;height:22px;border:20px}.saswp-switch input{opacity:0;width:0;height:0}.saswp-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#5a6783;transition:.4s;border-radius:20px}.saswp-slider:before{position:absolute;content:"";height:15px;width:15px;left:4px;bottom:4px;background-color:#fff;transition:.4s;border-radius:20px}input:checked+.saswp-slider{background-color:#61bd3b;border-radius:30px}input:focus+.saswp-slider{box-shadow:0 0 1px #2196f3}input:checked+.saswp-slider:before{transform:translateX(15px)}.saswp-slider.saswp-round{border-radius:34px}.saswp-slider.saswp-round:before{border-radius:50%}.saswp-tab-nav li{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;border-bottom:1px solid #eee}.saswp-tab-nav .selected{background-color:#ccc}.saswp-single-post-restore .saswp-switch{height:28px}.saswp-single-post-restore .saswp-slider:before{height:20px}.option-table-class{width:100%}.option-table-class tr td{padding:10px 10px 10px 10px}.option-table-class tr>td{width:30%}.option-table-class tr td:last-child{width:60%}.saswp-custom-fields-table{width:100%}.saswp-custom-fields-table input{width:100%}.saswp-custom-fields-table tr td{padding:10px 10px 10px 10px}.saswp-custom-fields-table td{width:30%;vertical-align:top}.saswp-option-table-class input[type=text],.saswp-option-table-class select{width:100%}.saswp-paywall-table-class input[type=text],.saswp-paywall-table-class select{width:100%}.saswp-email_schema table th{width:auto;padding:0}.saswp-email_schema .saswp-knowledge-label{float:left;clear:both}.saswp-email_schema .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-add-on-plugin label{margin-top:10px}.saswp-add-on-plugin span{width:250px;display:inline-block}.saswp-knowledge-label label[for=saswp_search_box_schema_checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-booking-checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-membership-checkbox]{padding-left:10px}.saswp-global-selected{color:#000;font-weight:500}#saswp-global-tabs a{cursor:pointer}#saswp-global-tabs{padding-left:5px}#saswp-tools-tabs a{cursor:pointer}#saswp-review-tabs a{cursor:pointer}#saswp-tools-tabs{padding-left:5px}.saswp-need-help{padding-left:60px}.saswp-heading{display:inline-flex;align-items:baseline}.saswp-heading h2{margin-bottom:0}.saswp-view-docs a{margin-right:5px!important;margin-top:10px!important;float:right}.saswp-tabs .nav-tab{margin-left:4px}.saswp-panel{padding:7px 18px;background-color:#fff;box-shadow:0 0 20px 1px #d2cccc}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-input-fields select{width:100%}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-str{display:inline-block;width:100%;vertical-align:middle}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700;display:inline-block;vertical-align:middle}.saswp-r5-rng .saswp-rvw-str{display:inline-block;vertical-align:middle;padding-left:10px;width:auto}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px;border-radius:100%}.saswp-premium_features table th,.saswp-services table th{width:auto;padding:0}.saswp-features-blocks{display:inline-grid;grid-template-columns:1fr 1fr;grid-gap:20px}.saswp-features-blocks li{background:#fff;padding:25px;border:1px solid #d8d8d8}.saswp-features-blocks li a{text-decoration:none}.saswp-ele-ic{border-radius:256px;display:inline-block;padding:8px 10px 8px 10px;width:70px;margin-right:20px;height:70px;float:left}.saswp-ele-ic img{width:80%;left:10%;position:relative;top:9%}.saswp-ele-1{background:#96588a}.saswp-ele-2{background:#00a97e}.saswp-ele-3{background:#cacaca}.saswp-ele-4{background:#9c56cc}.saswp-ele-tlt h3{margin:0;font-size:18px;line-height:1.4}.saswp-ele-tlt p{margin-top:10px}.saswp-sts-btn{box-sizing:border-box;height:52px;margin-top:20px;padding:6px 15px;border:1px solid #e5e5e5;border-radius:3px;display:flex;align-items:center;justify-content:space-between}.saswp-d-btn{background:#d2150a;padding:6px 18px;border-radius:30px;font-size:14px;color:#fff}.form-wrap .saswp-sts-txt{font-size:16px;color:#000}.saswp-sts-txt span{color:#bebfc0;padding-left:5px}.saswp_review_platform .saswp-g-plus{float:left}.saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%;margin-top:5px}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px;width:100%}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px;width:20px;height:20px}.saswp-g-plus img{max-width:100%}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px}.saswp-g-review-header div{margin-top:10px}.saswp-upgrade-pro{background:#fff;padding:25px;border:1px solid #d8d8d8;display:inline-block;margin-top:10px;width:81%}.saswp-upgrade-pro h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:14px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro ul li:before{content:"";background-image:url(../images/check.png);background-repeat:no-repeat;background-size:20px;width:20px;height:20px;position:absolute;left:2px;top:2px}.saswp-upgrade-pro a{background:#d2150a;padding:10px 0;display:block;text-align:center;color:#fff;text-decoration:none;font-size:16px;font-weight:600;letter-spacing:1px;border-radius:5px}.saswp_image_prev{max-width:200px;max-height:200px;float:left;padding-left:2px}.saswp_prev_close{position:relative;width:30px;height:30px;top:12px;font-size:20px;top:-5px;text-decoration:none}.saswp-add-custom-schema-div{margin-top:10px;border-top:1px solid #eee;padding-top:5px}.saswp-nav-menu-list label{padding-left:10px}.saswp-dynamic-properties{border:1px solid #aaa;margin-top:5px;margin-bottom:5px}.saswp-table-close{float:right;cursor:pointer}.saswp-table-create-onajax table td,.saswp-table-create-onajax table th{padding:5px}.saswp-table-create-onajax select{width:98%}.saswp-g-reviews-settings-table input{width:100%}.saswp-s-reviews-settings-table input{width:100%}.saswp_rv_module_pro_notice{border:1px solid #d8d8d8;background:#fff}.saswp-settings-list .saswp-rev-mod{width:100%;display:inline-block;margin-top:20px}.saswp-rev-mod .saswp-knowledge-label{width:100%;display:inline-block;padding:10px 16px;font-weight:600;font-size:16px;color:#333;background:#f9f9f9;border:1px solid #d8d8d8;border-bottom:none;box-sizing:border-box}.saswp-rev-mod .saswp-knowledge-field{width:100%;display:inline-block}.saswp-rev-mod .saswp_rv_module_pro_notice{padding:20px}.saswp_cmpny_lst{width:100%;display:inline-block;margin-top:30px}.saswp_rv_module_pro_notice ul{margin:15px 0 20px 0;width:100%;display:inline-grid;grid-template-columns:1fr 1fr 1fr;grid-gap:20px;border-bottom:1px solid #eee;padding-bottom:20px}.saswp_rv_module_pro_notice ul li{position:relative;font-size:15px;line-height:1.5;color:#444;margin:0}.saswp_rv_module_pro_notice ul li span{padding-left:3px}.saswp_rv_module_pro_notice h2{text-align:center;font-size:31px}.saswp_rv_module_pro_notice .saswp_desc{text-align:center;font-size:18px;font-style:normal;color:#000}.saswp_rv_module_pro_notice .saswp_desc a{font-style:italic}.saswp_rv_module_pro_notice .saswp_lst{color:grey;font-family:georgia;font-style:italic;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice .saswp_avlbl{color:#2a902e;font-family:georgia;font-style:italic;font-size:15px;font-weight:600}.saswp_rv_module_pro_notice ul li img{width:20px;height:20px;position:relative;top:4px}.saswp-rev-btn{width:100%;display:inline-block;margin-top:20px;text-align:center}.saswp-rev-btn span{display:block;font-size:13px;margin-bottom:15px}.saswp-rev-btn a{padding:12px 18px;display:inline-block;text-decoration:none;border-radius:5px;background:#0085ba;color:#fff;font-weight:600;font-size:18px}.select2-container{width:100%!important}.saswp-schema-modify-section{margin-top:15px;border-top:1px solid #eee;padding-top:15px}.saswp-custom-meta-list{border:1px solid #aaa;border-radius:4px}.saswp-custom-fields-table tr td:nth-child(3n+3) input{border:1px solid #aaa;border-radius:4px}.updated.notice p{display:flex;width:100%;align-items:center}.updated.notice .dashicons-thumbs-up{margin-right:10px}a.saswp-feedback-no-thanks,a.saswp-feedback-remindme{display:inline-block;cursor:pointer}.saswp-feedback-remindme:after{content:",";display:inline-block;margin-right:5px}a.saswp-revws-lnk{display:inline-block;background:#0085ba;padding:12px 20px;color:#fff;text-decoration:none;border-radius:3px;margin-left:20px;font-size:14px;line-height:.6}.saswp-update-notice-btns{display:inline-block;width:100%;margin-bottom:5px}.saswp-about-contact-page{width:75%;float:right}.saswp-about-contact-page-tooltip{float:left;clear:both}.saswp-quick-setup{float:left}.saswp_add_schema_fields_on_fly{margin-bottom:5px!important}.saswp-custom-fields-table .saswp_image_prev{max-width:62px!important}.saswp-custom-fields-table .saswp_prev_close{font-size:15px}.saswp-review-content-table td:nth-child(2){width:50%;float:left}.saswp-review-content-table input{width:100%}.saswp-review-content-table select{width:100%}.saswp-review-content-table textarea{width:100%}.saswp-social-links-table{width:100%}.saswp-social-links-table input{width:100%}.saswp-add-social-links{margin:3px!important}.saswp-social-links-table td{padding-left:0!important}#saswp-compatibility-tabs a{cursor:pointer}.saswp-collection-body{width:100%;display:flex;flex-wrap:wrap}.saswp-collection-lp{flex:1 0 68%;margin-right:20px;width:68%;background:#fff;border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);padding-bottom:22px}.saswp-collection-settings{flex:1 0 27%;height:100%;width:28%}.saswp-collection-container{margin-top:60px;width:100%;display:inline-block;padding-right:20px;box-sizing:border-box}.saswp-collection-preview-table{width:100%}.saswp-collection-preview-table td{width:30%}.saswp-platform-added-list{display:inline-block;width:100%;margin-top:10px}.saswp-collection-title input{width:100%;padding:3px 8px;font-size:15px;line-height:2;height:1.7em;outline:0;margin:0 0 3px;background-color:#fff;color:#32373c}.saswp-collection-title{margin-bottom:10px;padding:10px;background:#f5f5f5;border-bottom:1px solid #ddd}.saswp-collection-preview{padding:0 30px}.saswp-r1{margin-bottom:50px}.saswp-r1 ul{padding:0;list-style-type:none;display:grid;width:100%;grid-template-columns:1fr 1fr 1fr;grid-gap:15px;margin:0}.saswp-r1 li{padding:20px;position:relative;color:#777;border:1px solid #ededed;background-color:#fafafa;border-radius:4px;margin:0}.saswp-rc{display:flex;width:100%;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;position:relative}.saswp-r1 .saswp-rc-lg{position:absolute;right:-5px}.saswp-r1-aimg img{float:left;max-width:56px;min-height:56px;max-height:56px;border-radius:100px}.saswp-rc-a>img{max-width:56px;min-height:56px;max-height:56px;margin-right:10px;border-radius:100px}.saswp-rc-lg img{width:20px;height:20px;border-radius:100px}.saswp-rc-nm a{text-decoration:none;color:#427fed;font-size:16px;font-weight:600;display:inline-block;line-height:1.1;letter-spacing:0;width:80%}.saswp-rc-dt{margin-top:5px;font-size:12px;line-height:1.2;color:#999;display:block}.saswp-rc-a{flex:1 0 85%;display:flex;justify-content:flex-start}.saswp-rc-nm{width:100%;margin-left:10px}.saswp-rc-cnt{position:static;height:80px;overflow-y:auto;font-size:14px;line-height:1.6;text-align:left;padding:0 2px 0 0;margin:10px 0 0}.saswp-r2-strs{text-align:center}.saswp-rc-cnt p{margin:0}.saswp-rc-cnt::-webkit-scrollbar{width:4px;display:inline-block}.saswp-rc-cnt::-webkit-scrollbar-thumb{-webkit-border-radius:10px;border-radius:10px;background:#ccc;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.5)}.saswp-rc-cnt::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);-webkit-border-radius:4px;border-radius:4px}.saswp-collection-settings{border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04)}.saswp-collection-settings ul{margin:0;padding:0}.saswp-collection-settings ul li{border-bottom:1px solid #ddd;margin:0;position:relative}.saswp-dp-dsg{display:inline-grid;grid-template-columns:1fr 2fr;width:100%;grid-gap:0 5px;align-items:center;color:#666}.saswp-dp-dtm{margin-top:13px}.saswp-slider-display{margin-top:15px}.wp-admin .saswp-collection-settings select{margin:0;min-height:30px;max-height:30px;max-width:100%}.saswp-slider-display span{width:30%;display:inline-block}.saswp-collection-settings ul li a{padding:12px 15px;background:#fff;color:#23282d;cursor:pointer;width:100%;border:none;text-align:left;font-size:14px;line-height:1.5;font-weight:600;transition:all .5s ease-in-out 0s;display:block;box-sizing:border-box;position:relative}.saswp-collection-settings ul li input{width:100%}.saswp-collection-settings ul li input[type=checkbox]{width:16px}.saswp-collection-settings ul li a.active,.saswp-collection-settings ul li a:hover{background:#f5f5f5}.saswp-accordion.active+.saswp-accordion-panel{border-top:1px solid #ddd}.saswp-plf-lst-rv-cnt{display:inline-grid;width:100%;flex-wrap:wrap;grid-template-columns:180px 57px 1fr;grid-gap:5px}.saswp-accordion-panel{padding:15px 18px;display:none;background-color:#fff;overflow:hidden;border-top:1px solid #ddd}.saswp-collection-settings a.saswp-add-to-collection{text-align:center;height:30px;font-weight:400;position:relative;top:1px;line-height:27px}.wp-core-ui a.button.saswp-remove-platform{background:0 0;border:none;padding:0;margin-left:6px;min-height:0}.wp-core-ui a.button.saswp-remove-platform:hover{color:#c00}.wp-core-ui a.button.saswp-remove-platform:after{content:"\f153";display:block;font:normal 16px/20px dashicons}.cancel-btn{margin-right:10px;margin-bottom:5px;float:left;display:inline-flex}.wp-admin .saswp-accordion-panel select.saswp-collection-desing{width:100%}.saswp-slider-display.saswp-desing-options{margin-top:10px}.saswp-slider-display.saswp-desing-options span{margin-right:10px;display:inline-block}.saswp-collection-settings li a.saswp-accordion:after{content:"\f140";font:normal 20px/1 dashicons;speak:none;display:block;position:absolute;color:#72777c;top:13px;right:18px}.saswp-collection-settings li a.saswp-accordion.active:after{content:"\f142";top:13px}.saswp-sv-btn{background:#f5f5f5;padding:8px 10px;text-align:right;width:100%;box-sizing:border-box}.saswp-collection-settings .button-primary{width:89px;margin:0;display:inline-block;padding:2px 0}.saswp-collection-shortcode{color:#555;margin-top:10px;padding:4px;background:#f1f1f1;display:inline-block;border:1px solid #ddd}.saswp-rd3-warp ul{padding:0;display:grid;grid-template-columns:1fr 1fr 1fr 1fr;grid-gap:30px;list-style-type:none;margin:0;justify-content:center}.saswp-rd3-warp li{box-shadow:0 2px 5px 0 rgba(0,0,0,.26);margin:0}.saswp-rd3-warp li a{text-decoration:none}.saswp-r3-lg{background:#ededed;display:flex;align-items:center;justify-content:center;width:100%;padding:6px 8px;box-sizing:border-box}.saswp-r3-lg span img{width:18px;height:18px;margin-right:10px}.saswp-r3-lg span{line-height:0}.saswp-r3-lg .saswp-r3-tlt{font-size:12px;line-height:1.4;text-transform:uppercase;color:#555;font-weight:400}.saswp-lg{line-height:0}.saswp-r3-rtng{padding:13px 10px 10px 10px;background:#fff;border-radius:0 0 3px 3px;text-align:center}.saswp-r3-rtxt{display:flex;align-items:center;line-height:0;width:100%;margin-bottom:10px;justify-content:center}.saswp-r3-rtxt .saswp-r3-num{color:#23282d;margin-right:5px;font-size:22px;font-weight:500;position:relative;top:2px;word-break:normal}.saswp-rd3-warp .saswp-rvw-str .df-clr,.saswp-rd3-warp .saswp-rvw-str .half-str,.saswp-rd3-warp .saswp-rvw-str .str-ic{display:inline-block;width:22px;height:22px;background-repeat:no-repeat;background-size:22px;margin-right:3px}.saswp-r3-brv{color:#666;font-size:13px;line-height:1}.saswp-r5{position:fixed;bottom:20px;width:calc(100% - 20px);max-width:325px;border-radius:12px;background:#fff;border:1px solid #e6e6e6;box-shadow:0 0 8px 0 rgba(0,0,0,.05);transition:all .3s ease-in;display:none}.saswp-r5 .saswp-rvw-str .df-clr,.saswp-r5 .saswp-rvw-str .half-str,.saswp-r5 .saswp-rvw-str .str-ic{display:inline-block;width:23px;height:20px;background-repeat:no-repeat;background-size:20px}.saswp-r5-r .saswp-r5-rng .saswp-rvw-str{padding-left:0;margin-bottom:3px}.saswp-r5-r{display:flex;flex-wrap:wrap;width:100%;align-items:center;height:80px}.saswp-r5-rng{flex:1 0 60%;padding-left:15px}.saswp-r5-lg{width:80px;height:100%;border-right:1px solid #ddd;box-sizing:border-box;background:linear-gradient(to bottom,#fefefe 0,#f2f2f2 100%);position:relative;display:flex;align-items:center;border-radius:12px 0 0 12px}.saswp-r5-r .saswp-r5-lg span{border-radius:10px 0 0 10px}.saswp-r5-r .saswp-r5-lg img{position:relative;max-width:40px;max-height:40px;left:20PX;border-radius:10px 0 0 10px;top:2px}.saswp-r5-txrng{font-size:12px;line-height:1.2;color:#444;display:flex;margin-bottom:5px}.saswp-r5-txrng span{font-weight:600;color:#666;margin-right:5px}.saswp-r5-rng span.saswp-r5-dt{display:block;font-size:11px;color:#ababab;font-weight:400}.saswp-r5 a{text-decoration:none}.saswp-popup-btn{position:fixed;top:auto;bottom:0;font-family:Arial,sans-serif;z-index:9;box-shadow:0 20px 40px 8px rgba(0,0,0,.25);width:300px;background:#fff;border:none;padding:0}.saswp-open-class.saswp-popup-btn{width:300px}#saswp-reviews-cntn{display:none}#saswp-sticky-review .saswp-open-class #saswp-reviews-cntn{width:100%}.saswp-opn-cls-btn{display:flex;height:50px;justify-content:space-between;align-items:center;background:#fba306;width:100%;padding:0 15px;border-radius:4px 4px 0 0;cursor:pointer;box-sizing:border-box}.saswp-opn-cls-btn svg path{fill:#fff}.saswp-opn-cls-btn span{font-size:15px;font-weight:600;color:#fff}.saswp-onclick-hide,.saswp-onclick-show{display:flex;justify-content:space-between;width:100%}.saswp-r4-info ul{list-style-type:none;padding:0;margin:0;text-align:left;height:350px;overflow-y:scroll}.saswp-r4-info ul li{border-bottom:1px solid #e4e4e4;padding:20px}.saswp-r4-b{display:flex;align-items:center;justify-content:flex-start;width:100%}.saswp-r4-b .saswp-r4-str{margin-right:10px}.saswp-r4-b span.saswp-r4-tx{font-size:14px;color:#444}.saswp-r4-b span.saswp-r4-nm:after{content:"-";display:inline-block;margin:0 10px}.saswp-r4-info .saswp-rvw-str .df-clr,.saswp-r4-info .saswp-rvw-str .half-str,.saswp-r4-info .saswp-rvw-str .str-ic{display:inline-block;width:22px;height:20px;background-repeat:no-repeat;background-size:18px}.saswp-r4-cnt h3{margin:10px 0 8px 0!important;font-size:18px;color:#333;font-weight:500}.saswp-r4-cnt p{font-size:13px;line-height:1.5;margin:0;color:#333}.saswp-r4-info ul li.saswp-r4-r{display:flex;width:100%;align-items:center;text-align:center;justify-content:center;box-sizing:border-box}.saswp-r4-info ul li span.saswp-r4-rnm{margin-left:10px;font-size:18px;color:#666}.btn .saswp-onclick-hide,.btn.saswp-open-class .saswp-onclick-show{display:flex;justify-content:space-between;width:100%}.btn .saswp-onclick-show,.btn.saswp-open-class .saswp-onclick-hide{display:none}span.saswp-mines{line-height:0}.saswp-mines:before{content:"";display:inline-block;width:20px;height:4px;background:#fff;position:relative;top:5px}.saswp-rd2-warp{width:100%;display:inline-block;margin-bottom:50px}.saswp-rd2-warp div{width:350px;margin-right:25px}.saswp-rd2-warp .saswp-rc-cnt{white-space:initial}.saswp-rd2-warp .saswp-r2-b{position:relative;color:#777;border:1px solid #ededed;background-color:#fafafa;border-radius:4px}.saswp-rd2-warp .saswp-rc-cnt{height:150px;margin:20px 20px 20px 40px}.saswp-rd2-warp .saswp-rc{padding:20px}.saswp-r2-b .saswp-r2-s{display:inline-block}.saswp-r2-b .saswp-rc-cnt p{display:inline}.saswp-r2-b .saswp-rc-lg{line-height:0;position:absolute;right:13px;top:13px;background:#fafafa}.saswp-r2-q svg{width:20px;fill:#bbb;position:absolute;height:30px;top:15px;left:12px}.saswp-rd2-warp .saswp-r2-b:before{position:absolute;bottom:-8px;left:35px;display:block;width:14px;height:14px;border:1px solid #ededed;border-top:none;border-left:none;background-color:#fafafa;content:"";-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.carousel-preview{text-align:center}.carousel-preview button{width:12px;height:12px;border-radius:100px;border:none;margin:0 5px;cursor:pointer}.carousel-preview button.saswp-active{background:#427fed}.saswp-cst .saswp-cs{width:100%;max-width:640px;margin:0 auto;overflow:hidden;position:relative}.saswp-r2-b{padding:20px 40px 20px 40px;background-color:#fafafa;position:relative;color:#777;border:1px solid #ededed;border-radius:4px;box-sizing:border-box}.saswp-cst .saswp-rc{padding:20px;box-sizing:border-box}.saswp-si .saswp-r2-b:before{position:absolute;bottom:-8px;left:35px;display:block;width:14px;height:14px;border:1px solid #ededed;border-top:none;border-left:none;background-color:#fafafa;content:"";-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.saswp-si .saswp-rc-cnt{margin:0}.saswp-cs .saswp-slider-controls{width:100%;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;z-index:9;position:relative;top:10px}.saswp-slider-controls a.saswp-slider-prev-btn{position:absolute;left:10px;bottom:0;background:rgba(0,0,0,.5);line-height:0;border-radius:100px;width:30px;height:30px}.saswp-slider-controls a.saswp-slider-prev-btn:before{content:"";display:inline-block;width:6px;height:6px;border:2px solid #fff;border-top:none;border-left:none;transform:rotate(135deg);position:relative;top:11px;left:12px}.saswp-slider-controls a.saswp-slider-next-btn{position:absolute;right:10px;bottom:0;background:rgba(0,0,0,.5);line-height:0;border-radius:100px;width:30px;height:30px}.saswp-slider-controls a.saswp-slider-next-btn:after{content:"";display:inline-block;width:6px;height:6px;border:2px solid #fff;border-top:none;border-left:none;transform:rotate(135deg);transform:rotate(-45deg);position:relative;top:11px;right:-9px}.saswp-si .saswp-rc-lg img{width:25px;height:25px}.saswp-cs .saswp-slider-dots .saswp-dot{width:10px;height:10px;background:#ccc;transition:.15s ease-in-out;border-radius:8px;cursor:pointer;margin:0 12px}.saswp-cs .saswp-slider-dots .saswp-dot.saswp-active{background:#0071a1}.saswp-cst .saswp-sic .saswp-si{width:100vw;max-width:640px;display:block}.spinner.saswp-spinner{float:none;margin:0 auto;display:block}.saswp-cct .saswp-cs{width:100%;max-width:800px;margin:0 auto;overflow:hidden;position:relative}.saswp-cct .saswp-sic .saswp-si{width:100%;max-width:800px;display:flex}.saswp-cct .saswp-r2-sli{width:100%;margin-right:20px;max-width:40%}.saswp-cct .saswp-rc{padding:20px 10px;box-sizing:border-box}.saswp-cct .saswp-rc-cnt{height:120px}.saswp-cs .saswp-sic{display:flex;flex-wrap:wrap;height:auto;transition:transform .35s ease-in-out}.saswp-cs .saswp-slider-controls a{color:#333;text-decoration:none;transition:.15s ease-in-out}.saswp-cs .saswp-slider-controls a:hover{color:#888}.saswp-cs .saswp-slider-dots{width:100%;display:flex;justify-content:center;margin:0 auto;position:relative;top:-10px}.saswp-onclick-show{display:none}.saswp-dp-dsg.saswp_hide{display:none}@media(max-width:1200px){.saswp-plf-lst-rv-cnt{grid-template-columns:1fr}}@media(max-width:767px){.saswp-collection-lp{flex:1 0 100%;margin-right:0;width:100%}.saswp-collection-settings{flex:1 0 100%;height:100%;width:100%}.wp-admin .saswp-collection-settings select{max-width:100%}}.saswp-upgrade-pro{background:#fff;padding:25px;border:1px solid #d8d8d8;display:inline-block;margin-top:10px;width:81%}.saswp-upgrade-pro h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:14px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro ul li:before{content:"";background-image:url(../images/check.png);background-repeat:no-repeat;background-size:20px;width:20px;height:20px;position:absolute;left:2px;top:2px}.saswp-upgrade-pro a{background:#d2150a;padding:10px 0;display:block;text-align:center;color:#fff;text-decoration:none;font-size:16px;font-weight:600;letter-spacing:1px;border-radius:5px}.saswp-settings-second-div .saswp-upgrade-pro.promo-cpn{display:block}.saswp-upgrade-pro.promo-cpn{border:1px solid #558b2f}.saswp-hide{display:none}.saswp-settings-second-div .saswp-upgrade-pro.promo-cpn{display:block;margin:0}.saswp-upgrade-pro.promo-cpn{border:1px solid #558b2f;border-radius:8px}.saswp-upgrade-pro.promo-cpn h2{color:#2e7d32;font-size:24px;text-align:center;margin:0 0 20px 0}.saswp-upgrade-pro.promo-cpn span{text-align:center;font-size:14px;display:inline-block;color:#777;padding:0 20px;box-sizing:border-box;line-height:1.4;font-weight:400}.saswp-promo{font-size:20px;margin-top:15px;width:100%;text-align:center}.saswp-upgrade-pro.promo-cpn .prm-txt{display:block;line-height:1}.saswp-upgrade-pro.promo-cpn .saswp-promo .prm-cpn{border:1px dashed #1b5e20;border-radius:100px;margin-top:5px;color:#388e3c;font-size:20px;padding:2px 15px 2px 15px}.saswp-upgrade-pro a{background:#43a047}.saswp-upgrade-pro{border-radius:8px}.saswp-settings-second-div a{text-decoration:none}.saswp-upgrade-pro ul li:before{content:"\f147";background-repeat:no-repeat;font-family:dashicons;position:absolute;color:#46b450;font-size:25px;left:0;line-height:1;top:0}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin_section/css/saswp-style.css CHANGED
@@ -117,3 +117,10 @@
117
  .widget .saswp-rv-img img {
118
  max-width: 50px;
119
  }
 
 
 
 
 
 
 
117
  .widget .saswp-rv-img img {
118
  max-width: 50px;
119
  }
120
+
121
+
122
+ /** Collection css starts here **/
123
+
124
+
125
+
126
+ /** Collection css ends here **/
admin_section/images/reviews_platform_icon/Best_Buy_logo.svg.png ADDED
Binary file
admin_section/images/reviews_platform_icon/apple-appstore-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/booking-img.png DELETED
Binary file
admin_section/images/reviews_platform_icon/cars-img.png DELETED
Binary file
admin_section/images/reviews_platform_icon/classpass-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/{consumeraffairs-img.png → consumer-affairs-img.png} RENAMED
File without changes
admin_section/images/reviews_platform_icon/gartner-img.png ADDED
Binary file
admin_section/images/reviews_platform_icon/hotels-img.png DELETED
Binary file
admin_section/images/reviews_platform_icon/lawyers-img.png DELETED
Binary file
admin_section/images/reviews_platform_icon/rotten-tomatoes-img.png ADDED
Binary file
admin_section/js/{saswp-newsletter.js → amp/collection-front.js} RENAMED
File without changes
admin_section/js/collection-front.js ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function saswpCollectionSlider(){
2
+
3
+ jQuery(".saswp-cs").each( function(){
4
+
5
+ var $slider = jQuery(this),
6
+ $itemscontainer = $slider.find(".saswp-sic");
7
+
8
+ if ($itemscontainer.find(".saswp-si.saswp-active").length == 0){
9
+ $itemscontainer.find(".saswp-si").first().addClass("saswp-active");
10
+ }
11
+
12
+ function setWidth(){
13
+ var totalWidth = 0;
14
+
15
+ jQuery($itemscontainer).find(".saswp-si").each( function(){
16
+ totalWidth += jQuery(this).outerWidth();
17
+ });
18
+
19
+ $itemscontainer.width(totalWidth);
20
+
21
+ }
22
+ function setTransform(){
23
+
24
+ if(jQuery(".saswp-si.saswp-active").length > 0){
25
+
26
+ var $activeItem = $itemscontainer.find(".saswp-si.saswp-active"),
27
+ activeItemOffset = $activeItem.offset().left,
28
+ itemsContainerOffset = $itemscontainer.offset().left,
29
+ totalOffset = activeItemOffset - itemsContainerOffset;
30
+
31
+ $itemscontainer.css({"transform": "translate( -"+totalOffset+"px, 0px)"})
32
+
33
+ }
34
+
35
+ }
36
+ function nextSlide(){
37
+ var activeItem = $itemscontainer.find(".saswp-si.saswp-active"),
38
+ activeItemIndex = activeItem.index(),
39
+ sliderItemTotal = $itemscontainer.find(".saswp-si").length,
40
+ nextSlide = 0;
41
+
42
+ if (activeItemIndex + 1 > sliderItemTotal - 1){
43
+ nextSlide = 0;
44
+ }else{
45
+ nextSlide = activeItemIndex + 1
46
+ }
47
+
48
+ var nextSlideSelect = $itemscontainer.find(".saswp-si").eq(nextSlide),
49
+ itemContainerOffset = $itemscontainer.offset().left,
50
+ totalOffset = nextSlideSelect.offset().left - itemContainerOffset
51
+
52
+ $itemscontainer.find(".saswp-si.saswp-active").removeClass("saswp-active");
53
+ nextSlideSelect.addClass("saswp-active");
54
+ $slider.find(".saswp-sd").find(".saswp-dot").removeClass("saswp-active")
55
+ $slider.find(".saswp-sd").find(".saswp-dot").eq(nextSlide).addClass("saswp-active");
56
+ $itemscontainer.css({"transform": "translate( -"+totalOffset+"px, 0px)"})
57
+
58
+ }
59
+ function prevSlide(){
60
+ var activeItem = $itemscontainer.find(".saswp-si.saswp-active"),
61
+ activeItemIndex = activeItem.index(),
62
+ sliderItemTotal = $itemscontainer.find(".saswp-si").length,
63
+ nextSlide = 0;
64
+
65
+ if (activeItemIndex - 1 < 0){
66
+ nextSlide = sliderItemTotal - 1;
67
+ }else{
68
+ nextSlide = activeItemIndex - 1;
69
+ }
70
+
71
+ var nextSlideSelect = $itemscontainer.find(".saswp-si").eq(nextSlide),
72
+ itemContainerOffset = $itemscontainer.offset().left,
73
+ totalOffset = nextSlideSelect.offset().left - itemContainerOffset
74
+
75
+ $itemscontainer.find(".saswp-si.saswp-active").removeClass("saswp-active");
76
+ nextSlideSelect.addClass("saswp-active");
77
+ $slider.find(".saswp-sd").find(".saswp-dot").removeClass("saswp-active")
78
+ $slider.find(".saswp-sd").find(".saswp-dot").eq(nextSlide).addClass("saswp-active");
79
+ $itemscontainer.css({"transform": "translate( -"+totalOffset+"px, 0px)"})
80
+
81
+ }
82
+ function makeDots(){
83
+ var activeItem = $itemscontainer.find(".saswp-si.saswp-active"),
84
+ activeItemIndex = activeItem.index(),
85
+ sliderItemTotal = $itemscontainer.find(".saswp-si").length;
86
+
87
+ for (i = 0; i < sliderItemTotal; i++){
88
+ $slider.find(".saswp-sd").append("<div class='saswp-dot'></div>")
89
+ }
90
+
91
+ $slider.find(".saswp-sd").find(".saswp-dot").eq(activeItemIndex).addClass("saswp-active")
92
+
93
+ }
94
+
95
+ setWidth();
96
+ setTransform();
97
+ makeDots();
98
+
99
+ jQuery(window).load( function(){
100
+ setWidth();
101
+ setTransform();
102
+ });
103
+
104
+ jQuery(window).resize( function(){
105
+ setWidth();
106
+ setTransform();
107
+ });
108
+
109
+ var nextBtn = $slider.find(".saswp-slider-controls").find(".saswp-slider-next-btn"),
110
+ prevBtn = $slider.find(".saswp-slider-controls").find(".saswp-slider-prev-btn");
111
+
112
+ nextBtn.on('click', function(e){
113
+ e.preventDefault();
114
+ nextSlide();
115
+ });
116
+
117
+ prevBtn.on('click', function(e){
118
+ e.preventDefault();
119
+ prevSlide();
120
+ });
121
+
122
+ $slider.find(".saswp-sd").find(".saswp-dot").on('click', function(e){
123
+
124
+ var dotIndex = jQuery(this).index(),
125
+ totalOffset = $itemscontainer.find(".saswp-slider-item").eq(dotIndex).offset().left - $itemscontainer.offset().left;
126
+
127
+ $itemscontainer.find(".saswp-si.saswp-active").removeClass("saswp-active");
128
+ $itemscontainer.find(".saswp-si").eq(dotIndex).addClass("saswp-active");
129
+ $slider.find(".saswp-sd").find(".saswp-dot").removeClass("saswp-active");
130
+ jQuery(this).addClass("saswp-active");
131
+
132
+ $itemscontainer.css({"transform": "translate( -"+totalOffset+"px, 0px)"})
133
+
134
+ });
135
+
136
+ });
137
+
138
+ }
139
+
140
+
141
+
142
+ jQuery(document).ready(function($){
143
+
144
+ saswpCollectionSlider();
145
+
146
+ var fomo_inverval = jQuery("#saswp_fomo_interval").val();
147
+
148
+ var elems = $(".saswp-r5");
149
+ var i = 1;
150
+ saswp_fomo_fade(elems[0])
151
+
152
+ function saswp_fomo_fade(elem) {
153
+ if (i > elems.length - 1) {
154
+ i = 0;
155
+ }
156
+ console.log(fomo_inverval);
157
+ $(elem).fadeIn(300).delay(fomo_inverval*1000).fadeOut(300, function() {
158
+ saswp_fomo_fade(elems[i++])
159
+ });
160
+ }
161
+
162
+ $(document).on("click", ".saswp-opn-cls-btn", function(){
163
+
164
+ $("#saswp-reviews-cntn").toggle();
165
+
166
+ if( $('#saswp-reviews-cntn').is(':visible') ) {
167
+ $(".saswp-onclick-show").css('display','flex');
168
+ $(".saswp-onclick-hide").hide();
169
+ $(".saswp-open-class").css('width', '500px');
170
+ }
171
+ else {
172
+ $(".saswp-onclick-show").hide();
173
+ $(".saswp-onclick-hide").css('display','flex');
174
+ $(".saswp-open-class").css('width', '300px');
175
+ }
176
+
177
+ });
178
+
179
+ });
admin_section/js/collection-front.min.js ADDED
@@ -0,0 +1 @@
 
1
+ function saswpCollectionSlider(){jQuery(".saswp-cs").each(function(){var s=jQuery(this),a=s.find(".saswp-sic");function e(){var s=0;jQuery(a).find(".saswp-si").each(function(){s+=jQuery(this).outerWidth()}),a.width(s)}function n(){if(jQuery(".saswp-si.saswp-active").length>0){var s=a.find(".saswp-si.saswp-active").offset().left-a.offset().left;a.css({transform:"translate( -"+s+"px, 0px)"})}}0==a.find(".saswp-si.saswp-active").length&&a.find(".saswp-si").first().addClass("saswp-active"),e(),n(),function(){var e=a.find(".saswp-si.saswp-active").index(),n=a.find(".saswp-si").length;for(i=0;i<n;i++)s.find(".saswp-sd").append("<div class='saswp-dot'></div>");s.find(".saswp-sd").find(".saswp-dot").eq(e).addClass("saswp-active")}(),jQuery(window).load(function(){e(),n()}),jQuery(window).resize(function(){e(),n()});var t=s.find(".saswp-slider-controls").find(".saswp-slider-next-btn"),d=s.find(".saswp-slider-controls").find(".saswp-slider-prev-btn");t.on("click",function(i){i.preventDefault(),function(){var i=a.find(".saswp-si.saswp-active").index(),e=0;e=i+1>a.find(".saswp-si").length-1?0:i+1;var n=a.find(".saswp-si").eq(e),t=a.offset().left,d=n.offset().left-t;a.find(".saswp-si.saswp-active").removeClass("saswp-active"),n.addClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").eq(e).addClass("saswp-active"),a.css({transform:"translate( -"+d+"px, 0px)"})}()}),d.on("click",function(i){i.preventDefault(),function(){var i=a.find(".saswp-si.saswp-active").index(),e=a.find(".saswp-si").length,n=0;n=i-1<0?e-1:i-1;var t=a.find(".saswp-si").eq(n),d=a.offset().left,p=t.offset().left-d;a.find(".saswp-si.saswp-active").removeClass("saswp-active"),t.addClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").eq(n).addClass("saswp-active"),a.css({transform:"translate( -"+p+"px, 0px)"})}()}),s.find(".saswp-sd").find(".saswp-dot").on("click",function(i){var e=jQuery(this).index(),n=a.find(".saswp-slider-item").eq(e).offset().left-a.offset().left;a.find(".saswp-si.saswp-active").removeClass("saswp-active"),a.find(".saswp-si").eq(e).addClass("saswp-active"),s.find(".saswp-sd").find(".saswp-dot").removeClass("saswp-active"),jQuery(this).addClass("saswp-active"),a.css({transform:"translate( -"+n+"px, 0px)"})})})}jQuery(document).ready(function(s){saswpCollectionSlider();var a=jQuery("#saswp_fomo_interval").val(),i=s(".saswp-r5"),e=1;!function n(t){e>i.length-1&&(e=0);console.log(a);s(t).fadeIn(300).delay(1e3*a).fadeOut(300,function(){n(i[e++])})}(i[0]),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").hide(),s(".saswp-onclick-hide").css("display","flex"),s(".saswp-open-class").css("width","300px"))})});
admin_section/js/functions-list.js ADDED
File without changes
admin_section/js/functions-list.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[],saswp_taxonomy_term=[],saswp_collection=[],saswp_total_collection=[],saswp_coll_json=null;function saswp_convert_datetostring(s){var e={};if(s){var a=new Date(s);e={time:a.toLocaleTimeString(),date:a.toLocaleDateString()}}else e={time:"",date:""};return e}function saswp_taxonomy_term_html(s,e){var a="";return a+="<td>",a+='<select name="saswp_taxonomy_term['+e+']">',jQuery.each(s,function(s,e){a+='<option value="'+s+'">'+e+"</option>"}),a+="</select>",a+="</td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'}function saswp_enable_rating_review(){var s="";jQuery("select#schema_type option:selected").val()&&(s=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),s&&jQuery(".saswp-enable-rating-review-"+s.toLowerCase()).change(function(){jQuery(this).is(":checked")?jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).show():jQuery(this).parent().parent().siblings(".saswp-rating-review-"+s.toLowerCase()).hide()}).change()}function getParameterByName(s,e){e||(e=window.location.href),s=s.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+s+"(=([^&#]*)|&|#|$)").exec(e);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswpCustomSelect2(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||jQuery(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(s){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:s.term,action:"saswp_get_custom_meta_fields"}},processResults:function(s){return{results:s}},cache:!0},minimumInputLength:2})}function saswp_reviews_datepicker(){jQuery(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_timepicker(){jQuery(".saswp-timepicker").timepicker({timeFormat:"H:i:s"})}function saswp_item_reviewed_ajax(s,e,a=null){var t=e.val(),i=saswp_localize_data.post_id,n=jQuery(e).attr("data-id"),p=jQuery(e).attr("post-specific"),r="";r=null==a?jQuery("#saswp_specific_"+n):jQuery(".saswp-manual-modification"),jQuery.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",schema_type:s,schema_id:n,post_specific:p,item:t,post_id:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){jQuery(r).find(".saswp-table-create-onajax").remove();var e=jQuery(r).find(".saswp-table-create-onload");jQuery.each(e,function(s,e){0!=s&&jQuery(this).remove()}),jQuery(r).append(s),saswp_schema_datepicker(),saswp_schema_timepicker()})}function saswp_item_reviewed_call(){jQuery(".saswp-item-reviewed").change(function(s){s.preventDefault();var e="";(jQuery("select#schema_type option:selected").val()&&(e=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(e=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===e)&&saswp_item_reviewed_ajax(e,$(this))}).change()}function saswp_compatibliy_notes(s,e){var a=e.replace("-checkbox",""),t=jQuery("#"+a).next("p").text();s.is(":checked")&&""!==t?jQuery("#"+a).next("p").removeClass("saswp_hide"):1==jQuery("#"+a).next("p").attr("data-id")?jQuery("#"+a).next("p").text("This feature is only available in pro version"):jQuery("#"+a).next("p").addClass("saswp_hide")}function saswp_meta_list_html(s,e,a,t,i,n){var p=t;null==p&&(p=Object.keys(a)[0]);var r="";if(r+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+p+']">',jQuery.each(e,function(s,e){r+='<optgroup label="'+e.label+'">',jQuery.each(e["meta-list"],function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),r+="</optgroup>"}),r+="</select>",a){var l=jQuery("select#schema_type option:selected").val(),c="";"Review"==l&&(c=jQuery("select.saswp-item-reivewed-list option:selected").val());var o="<tr>";o+="<td>",o+='<select class="saswp-custom-fields-name">',"Review"==l&&(o+='<optgroup label="Review">',o+='<option value="saswp_review_name">Review Name</option>',o+='<option value="saswp_review_description">Review Description</option>',o+='<option value="saswp_review_author">Review Author</option>',o+='<option value="saswp_review_author_url">Review Author Profile URL</option>',o+='<option value="saswp_review_publisher">Review Publisher</option>',o+='<option value="saswp_review_rating_value">Review Rating Value</option>',o+='<option value="saswp_review_date_published">Review Published Date</option>',o+='<option value="saswp_review_url">Review URL</option>',o+="</optgroup>"),"Review"==l&&(o+='<optgroup label="'+c+'">'),jQuery.each(a,function(s,e){o+='<option value="'+s+'">'+e+"</option>"}),"Review"==l&&(o+="</optgroup>"),o+="</select>",o+="</td>",o+="<td>",o+=r,o+="</td>",o+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',o+="</tr>",jQuery(".saswp-custom-fields-table").append(o),null!=s&&s.removeClass("updating-message")}else jQuery(i).html(r),null!=s&&s.removeClass("updating-message")}function saswp_get_meta_list(s,e,a,t,i,n){saswp_meta_list[e]?saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(p){saswp_meta_list[e]=p[e],saswp_meta_list_html(s,saswp_meta_list[e],a,i,t,n)},"json")}function saswp_get_post_specific_schema_fields(s,e,a,t,i,n){if(saswp_meta_fields[n]){var p=saswp_fields_html_generator(e,i,n,t,saswp_meta_fields[n]);p&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(p),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[n]=a;var p=saswp_fields_html_generator(e,i,n,t,a);p&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(p),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(s,e,a,t,i){var n="";return n+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+s+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var p="";switch("saswp_tvseries_season_published_date"!=i.name&&"saswp_feed_element_date_created"!=i.name&&"saswp_product_reviews_created_date"!=i.name||(p="saswp-datepicker-picker"),i.type){case"number":case"text":n+="<tr><th>"+i.label+'</th><td><input class="'+p+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']"></td></tr>';break;case"textarea":n+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var r="";jQuery.each(i.options,function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),n+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']">'+r+"</select></td></tr>";break;case"media":n+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+s+"_"+e+'" name="'+i.name+"_"+s+"_"+e+'"><input type="hidden" data-id="'+i.name+"_"+s+"_"+e+'_id" name="'+a+e+"["+s+"]["+i.name+'_id]" id="'+i.name+"_"+s+"_"+e+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+s+"_"+e+'_button" name="'+i.name+"_"+s+"_"+e+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+s+"_"+e+'"></div></fieldset></td></tr>'}}),n+="</table></div>"}function saswp_create_total_collection(){var s="";for(var e in saswp_total_collection=[],saswp_collection)saswp_collection[e]&&(jQuery.each(saswp_collection[e],function(s,e){saswp_total_collection.push(e)}),s+=saswp_function_added_platform(e,saswp_collection[e].length));jQuery(".saswp-platform-added-list").html(""),jQuery(".saswp-platform-added-list").append(s)}function saswp_create_rating_html_by_value(s){var e="";e+='<div class="saswp-rvw-str">';for(var a=0;a<5;a++)if(s>a){var t=s.split(".");t[1]?a<t[0]?e+='<span class="str-ic"></span>':e+='<span class="half-str"></span>':e+='<span class="str-ic"></span>'}else e+='<span class="df-clr"></span>';return e+="</div>"}function saswpChunkArray(s,e){for(var a=JSON.parse(JSON.stringify(s)),t=[];a.length;)t.push(a.splice(0,e));return t}function saswp_function_added_platform(s,e){var a="";return a+='<div class="cancel-btn">',a+="<span>"+jQuery("#saswp-plaftorm-list option[value="+s+"]").text()+"</span>",a+='<input type="hidden" name="saswp_platform_ids['+s+']" value="'+e+'">',a+='<a platform-id="'+s+'" class="button button-default saswp-remove-platform"></a>',a+="</div>"}function saswpCollectionSlider(){jQuery(".saswp-cs").each(function(){var s=jQuery(this),e=s.find(".saswp-sic");function a(){var s=0;jQuery(e).find(".saswp-si").each(function(){s+=jQuery(this).outerWidth()}),e.width(s)}function t(){if(jQuery(".saswp-si.saswp-active").length>0){var s=e.find(".saswp-si.saswp-active").offset().left-e.offset().left;e.css({transform:"translate( -"+s+"px, 0px)"})}}0==e.find(".saswp-si.saswp-active").length&&e.find(".saswp-si").first().addClass("saswp-active"),a(),t(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length;for(i=0;i<t;i++)s.find(".saswp-slider-dots").append("<div class='saswp-dot'></div>");s.find(".saswp-slider-dots").find(".saswp-dot").eq(a).addClass("saswp-active")}(),jQuery(document).ready(function(){a(),t()}),jQuery(window).resize(function(){a(),t()});var n=s.find(".saswp-slider-controls").find(".saswp-slider-next-btn"),p=s.find(".saswp-slider-controls").find(".saswp-slider-prev-btn");n.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=0;t=a+1>e.find(".saswp-si").length-1?0:a+1;var i=e.find(".saswp-si").eq(t),n=e.offset().left,p=i.offset().left-n;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),i.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(t).addClass("saswp-active"),e.css({transform:"translate( -"+p+"px, 0px)"})}()}),p.on("click",function(a){a.preventDefault(),function(){var a=e.find(".saswp-si.saswp-active").index(),t=e.find(".saswp-si").length,i=0;i=a-1<0?t-1:a-1;var n=e.find(".saswp-si").eq(i),p=e.offset().left,r=n.offset().left-p;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),n.addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").eq(i).addClass("saswp-active"),e.css({transform:"translate( -"+r+"px, 0px)"})}()}),s.find(".saswp-slider-dots").find(".saswp-dot").on("click",function(a){var t=jQuery(this).index(),i=e.find(".saswp-si").eq(t).offset().left-e.offset().left;e.find(".saswp-si.saswp-active").removeClass("saswp-active"),e.find(".saswp-si").eq(t).addClass("saswp-active"),s.find(".saswp-slider-dots").find(".saswp-dot").removeClass("saswp-active"),jQuery(this).addClass("saswp-active"),e.css({transform:"translate( -"+i+"px, 0px)"})})})}function saswp_review_desing_for_slider(s){var e=saswp_convert_datetostring(s.saswp_review_date),a="";return a+='<div class="saswp-r2-sli">',a+='<div class="saswp-r2-b">',a+='<div class="saswp-r2-q">',a+='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="95.333px" height="95.332px" viewBox="0 0 95.333 95.332" style="enable-background:new 0 0 95.333 95.332;" xml:space="preserve"><path d="M30.512,43.939c-2.348-0.676-4.696-1.019-6.98-1.019c-3.527,0-6.47,0.806-8.752,1.793 c2.2-8.054,7.485-21.951,18.013-23.516c0.975-0.145,1.774-0.85,2.04-1.799l2.301-8.23c0.194-0.696,0.079-1.441-0.318-2.045 s-1.035-1.007-1.75-1.105c-0.777-0.106-1.569-0.16-2.354-0.16c-12.637,0-25.152,13.19-30.433,32.076 c-3.1,11.08-4.009,27.738,3.627,38.223c4.273,5.867,10.507,9,18.529,9.313c0.033,0.001,0.065,0.002,0.098,0.002 c9.898,0,18.675-6.666,21.345-16.209c1.595-5.705,0.874-11.688-2.032-16.851C40.971,49.307,36.236,45.586,30.512,43.939z"></path><path d="M92.471,54.413c-2.875-5.106-7.61-8.827-13.334-10.474c-2.348-0.676-4.696-1.019-6.979-1.019 c-3.527,0-6.471,0.806-8.753,1.793c2.2-8.054,7.485-21.951,18.014-23.516c0.975-0.145,1.773-0.85,2.04-1.799l2.301-8.23 c0.194-0.696,0.079-1.441-0.318-2.045c-0.396-0.604-1.034-1.007-1.75-1.105c-0.776-0.106-1.568-0.16-2.354-0.16 c-12.637,0-25.152,13.19-30.434,32.076c-3.099,11.08-4.008,27.738,3.629,38.225c4.272,5.866,10.507,9,18.528,9.312 c0.033,0.001,0.065,0.002,0.099,0.002c9.897,0,18.675-6.666,21.345-16.209C96.098,65.559,95.376,59.575,92.471,54.413z"></path></svg>',a+="</div>",a+='<div class="saswp-rc-cnt">',a+="<p>",a+=s.saswp_review_text,a+="</p>",a+="</div>",a+='<div class="saswp-r2-strs">',a+='<span class="saswp-r2-s">',a+=saswp_create_rating_html_by_value(s.saswp_review_rating),a+="</span>",a+="</div>",a+="</div>",a+='<div class="saswp-rc">',a+='<div class="saswp-rc-a">',a+='<img src="'+s.saswp_reviewer_image+'"/>',a+='<div class="saswp-rc-nm">',a+='<a href="#">'+s.saswp_reviewer_name+"</a>",a+='<span class="saswp-rc-dt">'+e.date+"</span>",a+="</div>",a+='<div class="saswp-rc-lg">',a+='<img src="'+s.saswp_review_platform_icon+'"/>',a+="</div>",a+="</div>",a+="</div>",a+="</div>"}function saswp_create_collection_slider(s,e,a){var t="";if(saswp_total_collection.length>0){if(t+="slider"==s?'<div class="saswp-cst">':'<div class="saswp-cct">',t+='<div class="saswp-cs">',t+='<div class="saswp-sic">',"slider"==s&&jQuery.each(saswp_total_collection,function(s,e){t+='<div class="saswp-si">',t+=saswp_review_desing_for_slider(e),t+="</div>"}),"carousel"==s){var i=saswpChunkArray(saswp_total_collection,3);i&&jQuery.each(i,function(s,e){t+='<div class="saswp-si">',jQuery.each(e,function(s,e){t+=saswp_review_desing_for_slider(e)}),t+="</div>"})}t+="</div>",e&&(t+='<div class="saswp-slider-controls">',t+='<a href="#" class="saswp-slider-prev-btn"></a>',t+='<a href="#" class="saswp-slider-next-btn"></a>',t+="</div>"),a&&(t+='<div class="saswp-slider-dots">',t+="</div>"),t+="</div>",t+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(t),saswpCollectionSlider()}function saswp_create_collection_badge(){var s="";if(saswp_total_collection.length>0){for(var e in s+='<div class="saswp-rd3-warp">',s+="<ul>",saswp_collection){var a="",t="",i=0,n=0,p=1;jQuery.each(saswp_collection[e],function(s,e){a=e.saswp_review_platform_icon,t=e.saswp_review_platform_name,n+=parseFloat(e.saswp_review_rating),i++}),n>0&&(p=n/i),saswp_collection[e]&&(s+="<li>",s+='<a href="#">',s+='<div class="saswp-r3-lg">',s+="<span>",s+='<img src="'+a+'"/>',s+="</span>",s+='<span class="saswp-r3-tlt">'+t+'</span">',s+="</div>",s+='<div class="saswp-r3-rtng">',s+='<div class="saswp-r3-rtxt">',s+='<span class="saswp-r3-num">',s+=p,s+="</span>",s+='<span class="saswp-stars">',s+=saswp_create_rating_html_by_value(p.toString()),s+="</span>",s+="</div>",s+='<span class="saswp-r3-brv">',s+="Based on "+i+" Reviews",s+="</span>",s+="</div>",s+="</a>",s+="</li>")}s+="</ul>",s+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_popup(){var s="",e="";if(saswp_total_collection.length>0){var a=0,t=0,i=1;jQuery.each(saswp_total_collection,function(s,i){platform_icon=i.saswp_review_platform_icon,t+=parseFloat(i.saswp_review_rating),a++;var n=saswp_convert_datetostring(i.saswp_review_date);e+="<li>",e+='<div class="saswp-r4-b">',e+='<span class="saswp-r4-str">',e+=saswp_create_rating_html_by_value(i.saswp_review_rating),e+="</span>",e+='<span class="saswp-r4-tx">'+n.date+"</span>",e+="</div>",e+='<div class="saswp-r4-cnt">',e+="<h3>"+i.saswp_reviewer_name+"</h3>",e+="<p>"+i.saswp_review_text+"</p>",e+="</div>",e+="</li>"}),t>0&&(i=t/a),a>0&&(s+='<div id="saswp-sticky-review">',s+='<div class="saswp-open-class saswp-popup-btn">',s+='<div class="saswp-opn-cls-btn">',s+='<div class="saswp-onclick-hide">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</div>",s+='<div class="saswp-onclick-show">',s+="<span>Ratings and reviews</span>",s+='<span class="saswp-mines"></span>',s+="</div>",s+="</div>",s+='<div id="saswp-reviews-cntn">',s+='<div class="saswp-r4-info">',s+="<ul>",s+='<li class="saswp-r4-r">',s+="<span>",s+=saswp_create_rating_html_by_value(i.toString()),s+="</span>",s+='<span class="saswp-r4-rnm">'+i.toFixed(1)+" from "+a+" reviews</span>",s+="</li>",s+=e,s+="</ul>",s+="</div>",s+="</div>",s+="</div>",s+="</div>")}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(s)}function saswp_create_collection_fomo(s,e){var a="";saswp_total_collection.length>0&&jQuery.each(saswp_total_collection,function(s,e){var t=saswp_convert_datetostring(e.saswp_review_date);a+='<div id="'+s+'" class="saswp-r5">',a+='<div class="saswp-r5-r">',a+='<div class="saswp-r5-lg">',a+="<span>",a+='<img height="70" width="70" src="'+e.saswp_review_platform_icon+'"/>',a+="</span>",a+="</div>",a+='<div class="saswp-r5-rng">',a+=saswp_create_rating_html_by_value(e.saswp_review_rating),a+='<div class="saswp-r5-txrng">',a+="<span>"+e.saswp_review_rating+" Stars</span>",a+="<span>by</span>",a+="<span>"+e.saswp_reviewer_name+"</span>",a+="</div>",a+='<span class="saswp-r5-dt">'+t.date+"</span>",a+="</div>",a+="</div>",a+="</div>"}),jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(a),saswp_fomo_slide(s,e)}function saswp_fomo_slide(s,e){var a=jQuery(".saswp-collection-preview .saswp-r5"),t=a.length,i=0;!function s(){a.eq(i%t).fadeIn(6e3,function(){a.eq(i%t).fadeOut(3e3,s),i++})}()}function saswp_collection_sorting(s){if(saswp_total_collection.length>0)switch(s){case"lowest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating});break;case"highest":saswp_total_collection.sort(function(s,e){return s.saswp_review_rating-e.saswp_review_rating}),saswp_total_collection.reverse();break;case"newest":case"recent":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)}),saswp_total_collection.reverse();break;case"oldest":saswp_total_collection.sort(function(s,e){return new Date(s.saswp_review_date)-new Date(e.saswp_review_date)});break;case"random":saswp_total_collection.sort(function(s,e){return.5-Math.random()})}}function saswp_create_collection_grid(s){var e="",a="";if(saswp_total_collection.length>0){e+='<div class="saswp-r1">';for(var t=1;t<=s;t++)a+=" 1fr";s.length>3?e+='<ul style="grid-template-columns:'+a+';overflow-y: scroll;">':e+='<ul style="grid-template-columns:'+a+';overflow-y:hidden;">',saswp_total_collection&&jQuery.each(saswp_total_collection,function(s,a){var t=saswp_convert_datetostring(a.saswp_review_date);e+="<li>",e+='<div class="saswp-rc">',e+='<div class="saswp-rc-a">',e+='<div class="saswp-r1-aimg">',e+='<img src="'+a.saswp_reviewer_image+'" width="56" height="56"/>',e+="</div>",e+='<div class="saswp-rc-nm">',e+='<a href="#">'+a.saswp_reviewer_name+"</a>",e+=saswp_create_rating_html_by_value(a.saswp_review_rating),t.date&&(e+='<span class="saswp-rc-dt">'+t.date+"</span>"),e+="</div>",e+="</div>",e+='<div class="saswp-rc-lg">',e+='<img src="'+a.saswp_review_platform_icon+'"/>',e+="</div>",e+="</div>",e+='<div class="saswp-rc-cnt">',e+="<p>"+a.saswp_review_text+"</p>",e+="</div>",e+="</li>"}),e+="</ul>",e+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(e)}function saswp_create_collection_by_design(s,e,a,t,i,n,p){switch(s){case"grid":saswp_create_collection_grid(e);break;case"gallery":saswp_create_collection_slider(a,t,i);break;case"badge":saswp_create_collection_badge();break;case"popup":saswp_create_collection_popup();break;case"fomo":saswp_create_collection_fomo(n,p)}}function saswp_on_collection_design_change(){var s=jQuery(".saswp-collection-sorting").val(),e=jQuery(".saswp-collection-desing").val(),a=jQuery("#saswp-collection-cols").val(),t=jQuery(".saswp-slider-type").val(),i=jQuery("#saswp_fomo_interval").val();if(jQuery("#saswp_gallery_arrow").is(":checked"))var n=!0;else n=!1;if(jQuery("#saswp_gallery_dots").is(":checked"))var p=!0;else p=!1;saswp_create_total_collection(),saswp_collection_sorting(s),saswp_create_collection_by_design(e,a,t,n,p,i,i)}function saswp_get_collection_data(s,e,a=null){jQuery.get(ajaxurl,{action:"saswp_add_to_collection",rvcount:s,platform_id:e,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if(s.status){var t=s.message;saswp_collection[e]=t,saswp_collection[e]=jQuery.extend(saswp_collection[e],t),saswp_on_collection_design_change()}a&&a.removeClass("updating-message")},"json")}
admin_section/js/main-script.js CHANGED
@@ -1,385 +1,47 @@
1
- var saswp_meta_list = [];
2
- var saswp_meta_fields = [];
3
- var saswp_meta_list_fields = [];
4
- var saswp_taxonomy_term = [];
5
-
6
- function saswp_taxonomy_term_html(taxonomy, field_name){
7
-
8
- var html ='';
9
- html += '<td>';
10
- html += '<select name="saswp_taxonomy_term['+field_name+']">';
11
- jQuery.each(taxonomy, function(key, value){
12
- html += '<option value="'+key+'">'+value+'</option>';
13
- });
14
- html += '</select>';
15
- html += '</td>';
16
- html += '<td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
17
-
18
- return html;
19
-
20
- }
21
-
22
- function saswp_enable_rating_review(){
23
- var schema_type = "";
24
- if(jQuery('select#schema_type option:selected').val()){
25
- schema_type = jQuery('select#schema_type option:selected').val();
26
- }
27
- if(jQuery(".saswp-tab-links.selected").attr('saswp-schema-type')){
28
- schema_type = jQuery(".saswp-tab-links.selected").attr('saswp-schema-type');
29
- }
30
-
31
- if(schema_type){
32
- jQuery(".saswp-enable-rating-review-"+schema_type.toLowerCase()).change(function(){
33
-
34
- if(jQuery(this).is(':checked')){
35
- jQuery(this).parent().parent().siblings('.saswp-rating-review-'+schema_type.toLowerCase()).show();
36
- }else{
37
- jQuery(this).parent().parent().siblings('.saswp-rating-review-'+schema_type.toLowerCase()).hide();
38
- }
39
-
40
- }).change();
41
- }
42
-
43
- }
44
-
45
- function getParameterByName(name, url) {
46
- if (!url){
47
- url = window.location.href;
48
- }
49
- name = name.replace(/[\[\]]/g, "\\$&");
50
- var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
51
- results = regex.exec(url);
52
- if (!results) return null;
53
- if (!results[2]) return "";
54
- return decodeURIComponent(results[2].replace(/\+/g, " "));
55
- }
56
-
57
- function saswpCustomSelect2(){
58
- if((saswp_localize_data.post_type == 'saswp' || saswp_localize_data.page_now =='saswp') && saswp_localize_data.page_now !='saswp_page_structured_data_options'){
59
-
60
- jQuery('.saswp-custom-fields-select2').select2({
61
- ajax: {
62
- type: "POST",
63
- url: ajaxurl, // AJAX URL is predefined in WordPress admin
64
- dataType: 'json',
65
- delay: 250, // delay in ms while typing when to perform a AJAX search
66
- data: function (params) {
67
- return {
68
- saswp_security_nonce: saswp_localize_data.saswp_security_nonce,
69
- q: params.term, // search query
70
- action: 'saswp_get_custom_meta_fields' // AJAX action for admin-ajax.php
71
- };
72
- },
73
- processResults: function( data ) {
74
- return {
75
- results: data
76
- };
77
- },
78
- cache: true
79
- },
80
- minimumInputLength: 2 // the minimum of symbols to input before perform a search
81
- });
82
-
83
- }
84
-
85
- }
86
-
87
- function saswp_reviews_datepicker(){
88
 
89
- jQuery('.saswp-reviews-datepicker-picker').datepicker({
90
- dateFormat: "yy-mm-dd"
91
- });
92
- }
93
 
94
- function saswp_schema_datepicker(){
95
 
96
- jQuery('.saswp-datepicker-picker').datepicker({
97
- dateFormat: "yy-mm-dd",
98
- });
99
-
100
- }
 
 
101
 
102
- function saswp_schema_timepicker(){
103
- jQuery('.saswp-timepicker').timepicker({ 'timeFormat': 'H:i:s'});
 
 
 
 
 
 
 
 
 
 
 
104
  }
105
 
106
- function saswp_item_reviewed_call(){
107
-
108
- jQuery(".saswp-item-reviewed").change(function(e){
109
- e.preventDefault();
110
- var schema_type ="";
111
-
112
- if(jQuery('select#schema_type option:selected').val()){
113
- schema_type = jQuery('select#schema_type option:selected').val();
114
- }
115
- if(jQuery(".saswp-tab-links.selected").attr('saswp-schema-type')){
116
- schema_type = jQuery(".saswp-tab-links.selected").attr('saswp-schema-type');
117
- }
118
-
119
- if(schema_type === 'Review'){
120
-
121
- var current = jQuery(this);
122
- var item = jQuery(this).val();
123
- var post_id = saswp_localize_data.post_id;
124
- var schema_id = jQuery(current).attr('data-id');
125
- var post_specific = jQuery(current).attr('post-specific');
126
- jQuery.get(ajaxurl,
127
- { action:"saswp_get_item_reviewed_fields",schema_id:schema_id, post_specific:post_specific ,item:item, post_id:post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
128
- function(response){
129
-
130
- jQuery("#saswp_specific_"+schema_id).find(".saswp-table-create-onajax").remove();
131
- var onload_class = jQuery("#saswp_specific_"+schema_id).find(".saswp-table-create-onload");
132
-
133
- jQuery.each(onload_class, function(key, val){
134
- if(key != 0){
135
- jQuery(this).remove();
136
- }
137
-
138
- });
139
- jQuery("#saswp_specific_"+schema_id).append(response);
140
- saswp_schema_datepicker();
141
- saswp_schema_timepicker();
142
-
143
- });
144
-
145
- }
146
-
147
-
148
- }).change();
149
-
150
- }
151
 
152
- function saswp_compatibliy_notes(current, id){
153
 
154
- var plugin_name = id.replace('-checkbox','');
155
- var text = jQuery("#"+plugin_name).next('p').text();
156
-
157
- if (current.is(':checked') && text !=='') {
158
- jQuery("#"+plugin_name).next('p').removeClass('saswp_hide');
159
- }else{
160
- if(jQuery("#"+plugin_name).next('p').attr('data-id') == 1){
161
- jQuery("#"+plugin_name).next('p').text('This feature is only available in pro version');
162
- }else{
163
- jQuery("#"+plugin_name).next('p').addClass('saswp_hide');
164
- }
165
- }
166
- }
167
-
168
- function saswp_meta_list_html(current_fly, response, fields, f_name, id, tr){
169
-
170
- var field_name = f_name;
171
- if(field_name == null){
172
- field_name = Object.keys(fields)[0];
173
- }
174
- var re_html = '';
175
- re_html += '<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+field_name+']">';
176
- jQuery.each(response, function(key,value){
177
-
178
- re_html += '<optgroup label="'+value['label']+'">';
179
-
180
- jQuery.each(value['meta-list'], function(key, value){
181
- re_html += '<option value="'+key+'">'+value+'</option>';
182
- });
183
- re_html += '</optgroup>';
184
-
185
- });
186
- re_html += '</select>';
187
-
188
- if(fields){
189
-
190
- var schema_type = jQuery('select#schema_type option:selected').val();
191
- var schema_subtype = '';
192
-
193
- if(schema_type == 'Review'){
194
- schema_subtype = jQuery('select.saswp-item-reivewed-list option:selected').val();
195
- }
196
-
197
- var html = '<tr>';
198
- html += '<td>';
199
- html += '<select class="saswp-custom-fields-name">';
200
-
201
- if(schema_type == 'Review'){
202
- html += '<optgroup label="Review">';
203
- html += '<option value="saswp_review_name">Review Name</option>';
204
- html += '<option value="saswp_review_description">Review Description</option>';
205
- html += '<option value="saswp_review_author">Review Author</option>';
206
- html += '<option value="saswp_review_author_url">Review Author Profile URL</option>';
207
- html += '<option value="saswp_review_publisher">Review Publisher</option>';
208
- html += '<option value="saswp_review_rating_value">Review Rating Value</option>';
209
- html += '<option value="saswp_review_date_published">Review Published Date</option>';
210
- html += '<option value="saswp_review_url">Review URL</option>';
211
- html += '</optgroup>';
212
-
213
- }
214
-
215
- if(schema_type == 'Review'){
216
- html += '<optgroup label="'+schema_subtype+'">';
217
- }
218
-
219
- jQuery.each(fields, function(key,value){
220
- html += '<option value="'+key+'">'+value+'</option>';
221
- });
222
-
223
- if(schema_type == 'Review'){
224
- html += '</optgroup>';
225
- }
226
-
227
- html += '</select>';
228
- html += '</td>';
229
- html += '<td>';
230
- html += re_html;
231
- html += '</td>';
232
- html += '<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>';
233
- html += '</tr>';
234
- jQuery(".saswp-custom-fields-table").append(html);
235
- if(current_fly != null){
236
- current_fly.removeClass('updating-message');
237
- }
238
-
239
-
240
- }else{
241
- jQuery(id).html(re_html);
242
- if(current_fly != null){
243
- current_fly.removeClass('updating-message');
244
- }
245
- }
246
-
247
- }
248
-
249
- function saswp_get_meta_list(current_fly, type, fields, id, fields_name, tr){
250
- if (!saswp_meta_list[type]) {
251
-
252
- jQuery.get(ajaxurl,
253
- { action:"saswp_get_meta_list", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
254
- function(response){
255
- saswp_meta_list[type] = response[type];
256
- saswp_meta_list_html(current_fly, saswp_meta_list[type], fields, fields_name, id, tr);
257
-
258
- },'json');
259
-
260
- }else{
261
- saswp_meta_list_html(current_fly, saswp_meta_list[type], fields, fields_name, id, tr);
262
- }
263
-
264
- }
265
-
266
- function saswp_get_post_specific_schema_fields(current_fly, index, meta_name, div_type, schema_id, fields_type){
267
-
268
- if (!saswp_meta_fields[fields_type]) {
269
-
270
- jQuery.get(ajaxurl,
271
- { action:"saswp_get_schema_dynamic_fields_ajax",meta_name:meta_name, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
272
- function(response){
273
- saswp_meta_fields[fields_type] = response;
274
- var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, response);
275
-
276
- if(html){
277
- jQuery('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
278
- saswp_schema_datepicker();
279
- saswp_schema_timepicker();
280
- current_fly.removeClass('updating-message');
281
- }
282
-
283
- },'json');
284
-
285
- }else{
286
-
287
- var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, saswp_meta_fields[fields_type]);
288
-
289
- if(html){
290
- jQuery('.saswp-'+div_type+'-section[data-id="'+schema_id+'"]').append(html);
291
- saswp_schema_datepicker();
292
- saswp_schema_timepicker();
293
- current_fly.removeClass('updating-message');
294
- }
295
-
296
- }
297
-
298
-
299
- }
300
-
301
- function saswp_fields_html_generator(index, schema_id, fields_type, div_type, schema_fields){
302
-
303
- var html = '';
304
-
305
- html += '<div class="saswp-'+div_type+'-table-div saswp-dynamic-properties" data-id="'+index+'">'
306
- + '<a class="saswp-table-close">X</a>'
307
- + '<table class="form-table saswp-'+div_type+'-table">'
308
-
309
- jQuery.each(schema_fields, function(eachindex, element){
310
-
311
- var meta_class = "";
312
- if(element.name == 'saswp_tvseries_season_published_date' || element.name == 'saswp_feed_element_date_created' || element.name == 'saswp_product_reviews_created_date'){
313
- meta_class = "saswp-datepicker-picker";
314
- }
315
-
316
- switch(element.type) {
317
-
318
- case "number":
319
- case "text":
320
-
321
- html += '<tr>'
322
- + '<th>'+element.label+'</th><td><input class="'+meta_class+'" style="width:100%" type="'+element.type+'" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']"></td>'
323
- + '</tr>';
324
-
325
- break;
326
-
327
- case "textarea":
328
-
329
- html += '<tr>'
330
- + '<th>'+element.label+'</th><td><textarea style="width: 100%" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']" rows="5"></textarea></td>'
331
- + '</tr>';
332
-
333
- break;
334
- case "select":
335
-
336
- var options_html = "";
337
- jQuery.each(element.options, function(opt_index, opt_element){
338
- options_html += '<option value="'+opt_index+'">'+opt_element+'</option>';
339
- });
340
-
341
- html += '<tr>'
342
- + '<th>'+element.label+'</th>'
343
- + '<td>'
344
-
345
- + '<select id="'+element.name+'_'+index+'_'+schema_id+'" name="'+fields_type+schema_id+'['+index+']['+element.name+']">'
346
- + options_html
347
- + '</select>'
348
-
349
- + '</td>'
350
- + '</tr>';
351
-
352
- break;
353
-
354
- case "media":
355
-
356
- html += '<tr>'
357
- + '<th>'+element.label+'</th>'
358
- + '<td>'
359
- + '<fieldset>'
360
- + '<input style="width:80%" type="text" id="'+element.name+'_'+index+'_'+schema_id+'" name="'+element.name+'_'+index+'_'+schema_id+'">'
361
- + '<input type="hidden" data-id="'+element.name+'_'+index+'_'+schema_id+'_id" name="'+fields_type+schema_id+'['+index+']['+element.name+'_id]" id="'+element.name+'_'+index+'_'+schema_id+'_id">'
362
- + '<input data-id="media" style="width: 19%" class="button" id="'+element.name+'_'+index+'_'+schema_id+'_button" name="'+element.name+'_'+index+'_'+schema_id+'_button" type="button" value="Upload">'
363
- + '<div class="saswp_image_div_'+element.name+'_'+index+'_'+schema_id+'">'
364
- + '</div>'
365
- + '</fieldset>'
366
- + '</td>'
367
- + '</tr>';
368
-
369
- break;
370
- default:
371
- // code block
372
- }
373
-
374
- });
375
- html += '</table>'
376
- + '</div>';
377
-
378
- return html;
379
-
380
  }
381
-
382
- jQuery(document).ready(function($){
383
 
384
  /* Google Reviews js starts here */
385
 
@@ -410,7 +72,7 @@ jQuery(document).ready(function($){
410
  }
411
 
412
  });
413
-
414
  $(document).on("click", '.saswp-fetch-g-reviews', function(){
415
 
416
  var current = $(this);
@@ -490,13 +152,13 @@ jQuery(document).ready(function($){
490
 
491
  /* Newletters js starts here */
492
 
493
- if(saswp_localize_data.do_tour){
494
 
495
  var content = '<h3>Thanks for using Structured Data!</h3>';
496
- content += '<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>';
497
  content += '<style type="text/css">';
498
  content += '.wp-pointer-buttons{ padding:0; overflow: hidden; }';
499
- content += '.wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }';
500
  content += '</style>';
501
  content += '<div id="afw_mc_embed_signup">';
502
  content += '<form action="//app.mailerlite.com/webforms/submit/z7t4b8" data-id="258182" data-code="z7t4b8" method="POST" target="_blank">';
@@ -573,94 +235,125 @@ jQuery(document).ready(function($){
573
  }
574
 
575
  /* Newletters js ends here */
576
-
577
-
578
- $(".saswp-tabs a").click(function(e){
579
- var href = $(this).attr('href');
580
- var currentTab = getParameterByName('tab',href);
581
- if(!currentTab){
582
- currentTab = "general";
583
- }
584
- $(this).siblings().removeClass("nav-tab-active");
585
- $(this).addClass("nav-tab-active");
586
- $(".form-wrap").find(".saswp-"+currentTab).siblings().hide();
587
- $(".form-wrap .saswp-"+currentTab).show();
588
- window.history.pushState("", "", href);
589
- return false;
590
- });
591
-
592
- $(".saswp-schame-type-select").change(function(){
593
- $(".saswp-custom-fields-table").html('');
594
- var schematype = $(this).val();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
595
 
596
- $(".saswp-option-table-class tr").each(function(index,value){
597
- if(index>0){
598
- $(this).hide();
599
- $(this).find('select').attr('disabled', true);
600
- }
601
- });
602
- if(schematype == 'TechArticle' || schematype == 'Article' || schematype == 'Blogposting' || schematype == 'NewsArticle' || schematype == 'WebPage'){
603
-
604
- $(".saswp-enable-speakable").parent().parent().show();
605
- }else{
606
- $(".saswp-enable-speakable").parent().parent().hide();
607
- }
608
-
609
- if(schematype == 'Book'
610
- || schematype == 'Course'
611
- || schematype == 'HowTo'
612
- || schematype == 'MusicPlaylist'
613
- || schematype == 'MusicAlbum'
614
- || schematype == 'Recipe'
615
- || schematype == 'TVSeries'
616
- || schematype == 'SoftwareApplication'
617
- || schematype == 'Event'
618
- || schematype == 'VideoGame'
619
- || schematype == 'Service'
620
-
621
- || schematype == 'AudioObject'
622
- || schematype == 'VideoObject'
623
- || schematype == 'local_business'
624
- || schematype == 'Product'
625
-
626
- ){
627
-
628
- $(".saswp-enable-append-reviews").parent().parent().show();
629
- }else{
630
- $(".saswp-enable-append-reviews").parent().parent().hide();
631
- }
632
 
 
 
 
 
 
 
 
 
 
 
 
633
 
634
- if(schematype == 'local_business'){
635
- $(".saswp-option-table-class tr").eq(1).show();
636
- $(".saswp-business-text-field-tr").show();
637
- $(".saswp-option-table-class tr").find('select').attr('disabled', false);
638
- $('.select-post-type').val('show_globally').trigger('change');
639
- }
640
- if(schematype == 'Service'){
641
- $(".saswp-service-text-field-tr").show();
642
- $(".saswp-option-table-class tr").find('select').attr('disabled', false);
643
- }
644
- if(schematype == 'Event'){
645
- $(".saswp-event-text-field-tr").show();
646
- $(".saswp-option-table-class tr").find('select').attr('disabled', false);
647
- }
648
- if(schematype == 'Review'){
649
- $(".saswp-review-text-field-tr").show();
650
- $(".saswp-option-table-class tr").find('select').attr('disabled', false);
651
- saswp_item_reviewed_call();
652
- }
653
- saswp_enable_rating_review();
654
- });
655
-
656
- $("#saswp_business_type").change(function(){
657
  var businesstype = $ (this).val();
658
  var schematype = $(".saswp-schame-type-select").val();
659
 
660
  $(".saswp-option-table-class tr").each(function(index,value){
661
  if(index>1){
662
  $(this).hide();
663
- $(this).find('select').attr('disabled', true);
664
  }
665
  });
666
 
@@ -696,18 +389,18 @@ jQuery(document).ready(function($){
696
  }
697
 
698
  if(schematype == 'local_business'){
699
- $(".saswp-"+businesstype+'-tr').show();
700
- $(".saswp-business-text-field-tr").show();
701
- $(".saswp-"+businesstype+'-tr').find('select').attr('disabled', false);
702
  }
703
 
704
  if(schematype == 'Review'){
705
- $(".saswp-review-text-field-tr").show();
706
- $(".saswp-review-text-field-tr").find('select').attr('disabled', false);
707
  }
708
  if(schematype == 'Event'){
709
- $(".saswp-event-text-field-tr").show();
710
- $(".saswp-option-table-class tr").find('select').attr('disabled', false);
711
  }
712
 
713
  saswp_enable_rating_review();
@@ -1044,6 +737,15 @@ jQuery(document).ready(function($){
1044
  }
1045
  break;
1046
 
 
 
 
 
 
 
 
 
 
1047
  case 'saswp-extra-checkbox':
1048
  saswp_compatibliy_notes(current, id);
1049
  if ($(this).is(':checked')) {
@@ -1389,7 +1091,16 @@ jQuery(document).ready(function($){
1389
 
1390
  break;
1391
 
1392
-
 
 
 
 
 
 
 
 
 
1393
  default:
1394
  break;
1395
  }
@@ -1422,22 +1133,22 @@ jQuery(document).ready(function($){
1422
 
1423
  }).change();
1424
 
1425
- $(document).on("click", "input[data-id=media]" ,function(e) { // Application Icon upload
1426
- e.preventDefault();
1427
  var current = $(this);
1428
  var button = current;
1429
  var id = button.attr('id').replace('_button', '');
1430
- var saswpMediaUploader = wp.media({
1431
- title: "Application Icon",
1432
- button: {
1433
- text: "Select Icon"
1434
- },
1435
- multiple: false, // Set this to true to allow multiple files to be selected
1436
  library:{type : 'image'}
1437
- })
1438
- .on("select", function() {
1439
- var attachment = saswpMediaUploader.state().get('selection').first().toJSON();
1440
-
1441
  $("#"+id).val(attachment.url);
1442
  $("input[data-id='"+id+"_id']").val(attachment.id);
1443
  $("input[data-id='"+id+"_height']").val(attachment.height);
@@ -1457,9 +1168,9 @@ jQuery(document).ready(function($){
1457
 
1458
  $(".saswp_image_div_"+id).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+attachment.url+'"/><a data-id="'+id+'" href="#" class="saswp_prev_close">X</a></div>'+smaller_img_notice);
1459
 
1460
- })
1461
- .open();
1462
- });
1463
 
1464
  $(document).on("click", ".saswp_prev_close", function(e){
1465
  e.preventDefault();
@@ -1653,7 +1364,7 @@ jQuery(document).ready(function($){
1653
  function(response){
1654
  if(response['status'] =='t'){
1655
  $(".saswp-feedback-notice").hide();
1656
- }
1657
  },'json');
1658
  });
1659
 
@@ -1664,7 +1375,7 @@ jQuery(document).ready(function($){
1664
  function(response){
1665
  if(response['status'] =='t'){
1666
  $(".saswp-feedback-notice").hide();
1667
- }
1668
  },'json');
1669
  });
1670
 
@@ -1689,7 +1400,7 @@ jQuery(document).ready(function($){
1689
  current.parents('.form-table tr:first').after(html);
1690
  }else{
1691
  $(".saswp-local-business-name-select").parents('tr').remove();
1692
- }
1693
  },'json');
1694
  });
1695
 
@@ -1914,12 +1625,19 @@ jQuery(document).ready(function($){
1914
  //Changing the url of add new schema type
1915
  $('a[href="'+saswp_localize_data.new_url_selector+'"]').attr( 'href', saswp_localize_data.new_url_href);
1916
 
1917
-
1918
- $("#saswp_enable_custom_field").change(function(){
1919
- if ($(this).is(':checked')) {
1920
- $(".saswp-custom-fields-div").show();
1921
- }else{
1922
- $(".saswp-custom-fields-div").hide();
 
 
 
 
 
 
 
1923
  }
1924
  });
1925
 
@@ -1928,8 +1646,8 @@ jQuery(document).ready(function($){
1928
  var type = 'text';
1929
  var tr = $(this).parent().parent('tr');
1930
  var fields_name = $(this).val();
1931
- var str2 = "image";
1932
- var str3 = "logo";
1933
  if((fields_name.indexOf(str2) != -1)|| (fields_name.indexOf(str3) != -1)){
1934
  type = 'image';
1935
  }
@@ -1945,7 +1663,7 @@ jQuery(document).ready(function($){
1945
  $.post(ajaxurl,
1946
  { action:"saswp_skip_wizard", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1947
  function(response){
1948
-
1949
  },'json');
1950
 
1951
  });
@@ -2072,9 +1790,15 @@ jQuery(document).ready(function($){
2072
 
2073
  $(document).on("change", ".saswp-item-reivewed-list", function(){
2074
 
2075
- $(".saswp-custom-fields-table").html('');
2076
- saswp_meta_list_fields = [];
2077
-
 
 
 
 
 
 
2078
  });
2079
 
2080
  $(document).on("click", '.saswp-add-custom-fields', function(){
@@ -2083,11 +1807,14 @@ jQuery(document).ready(function($){
2083
  current_fly.addClass('updating-message');
2084
  var schema_type = $('select#schema_type option:selected').val();
2085
  var schema_subtype = '';
 
2086
 
2087
  if(schema_type == 'Review'){
2088
  schema_subtype = $('select.saswp-item-reivewed-list option:selected').val();
 
2089
  }
2090
  var post_id = $('#post_ID').val();
 
2091
  if(schema_type !=''){
2092
 
2093
  if(!saswp_meta_list_fields[schema_type]){
@@ -2100,7 +1827,7 @@ jQuery(document).ready(function($){
2100
  success:function(response){
2101
 
2102
  saswp_meta_list_fields[schema_type] = response;
2103
- saswp_get_meta_list(current_fly, 'text', saswp_meta_list_fields[schema_type], null, null, null);
2104
 
2105
  },
2106
  error: function(response){
@@ -2111,7 +1838,7 @@ jQuery(document).ready(function($){
2111
 
2112
  }else{
2113
 
2114
- saswp_get_meta_list(current_fly, 'text', saswp_meta_list_fields[schema_type], null, null, null);
2115
 
2116
  }
2117
 
@@ -2165,7 +1892,13 @@ jQuery(document).ready(function($){
2165
 
2166
  if ('saswp' == saswp_localize_data.post_type && saswp_localize_data.page_now == 'edit.php') {
2167
 
2168
- jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>");
 
 
 
 
 
 
2169
 
2170
  }
2171
 
@@ -2203,5 +1936,200 @@ jQuery(document).ready(function($){
2203
  }
2204
 
2205
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2206
 
2207
  });
1
+
2
+ jQuery(document).ready(function($){
3
+
4
+
5
+ $(".saswp-modify-schema-toggle").click(function(e){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
+ e.preventDefault();
 
 
 
8
 
9
+ $(".saswp-modify-container").slideToggle("300");
10
 
11
+ var hiddenField = $('#saswp_enable_custom_field'),
12
+ val = hiddenField.val();
13
+ hiddenField.val(val === "1" ? "0" : "1");
14
+ $(".saswp-enable-modify-schema-output").change();
15
+ });
16
+
17
+ $(".saswp-enable-itemlist").change(function(){
18
 
19
+ if($(this).is(":checked")){
20
+ $("#saswp_item_list_tags").show();
21
+ $(".saspw-item-list-note").show();
22
+
23
+ if($("#saswp_item_list_tags").val() == 'custom'){
24
+ $("#saswp_item_list_custom").show();
25
+ }else{
26
+ $("#saswp_item_list_custom").hide();
27
+ }
28
+ }else{
29
+ $(".saspw-item-list-note").hide();
30
+ $("#saswp_item_list_tags").hide();
31
+ $("#saswp_item_list_custom").hide();
32
  }
33
 
34
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
+ $("#saswp_item_list_tags").change(function(){
37
 
38
+ if($(this).val() == 'custom'){
39
+ $("#saswp_item_list_custom").show();
40
+ }else{
41
+ $("#saswp_item_list_custom").hide();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  }
43
+
44
+ });
45
 
46
  /* Google Reviews js starts here */
47
 
72
  }
73
 
74
  });
75
+
76
  $(document).on("click", '.saswp-fetch-g-reviews', function(){
77
 
78
  var current = $(this);
152
 
153
  /* Newletters js starts here */
154
 
155
+ if(saswp_localize_data.do_tour){
156
 
157
  var content = '<h3>Thanks for using Structured Data!</h3>';
158
+ content += '<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>';
159
  content += '<style type="text/css">';
160
  content += '.wp-pointer-buttons{ padding:0; overflow: hidden; }';
161
+ content += '.wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }';
162
  content += '</style>';
163
  content += '<div id="afw_mc_embed_signup">';
164
  content += '<form action="//app.mailerlite.com/webforms/submit/z7t4b8" data-id="258182" data-code="z7t4b8" method="POST" target="_blank">';
235
  }
236
 
237
  /* Newletters js ends here */
238
+
239
+ $(".saswp-tabs a").click(function(e){
240
+ var href = $(this).attr('href');
241
+ var currentTab = getParameterByName('tab',href);
242
+ if(!currentTab){
243
+ currentTab = "general";
244
+ }
245
+ $(this).siblings().removeClass("nav-tab-active");
246
+ $(this).addClass("nav-tab-active");
247
+ $(".form-wrap").find(".saswp-"+currentTab).siblings().hide();
248
+ $(".form-wrap .saswp-"+currentTab).show();
249
+ window.history.pushState("", "", href);
250
+ return false;
251
+ });
252
+
253
+ $(".saswp-schame-type-select").change(function(e){
254
+
255
+ e.preventDefault();
256
+ $(".saswp-custom-fields-table").html('');
257
+ var schematype = $(this).val();
258
+
259
+ $(".saswp-option-table-class tr").each(function(index,value){
260
+ if(index>0){
261
+ $(this).hide();
262
+ // $(this).find('select').attr('disabled', true);
263
+ }
264
+ });
265
+ if(schematype == 'TechArticle' || schematype == 'Article' || schematype == 'Blogposting' || schematype == 'NewsArticle' || schematype == 'WebPage'){
266
+
267
+ $(".saswp-enable-speakable").parent().parent().show();
268
+ }else{
269
+ $(".saswp-enable-speakable").parent().parent().hide();
270
+ }
271
+
272
+ if(schematype == 'Book'
273
+ || schematype == 'Course'
274
+ || schematype == 'HowTo'
275
+ || schematype == 'MusicPlaylist'
276
+ || schematype == 'MusicAlbum'
277
+ || schematype == 'Recipe'
278
+ || schematype == 'TVSeries'
279
+ || schematype == 'SoftwareApplication'
280
+ || schematype == 'Event'
281
+ || schematype == 'VideoGame'
282
+ || schematype == 'Service'
283
+
284
+ || schematype == 'AudioObject'
285
+ || schematype == 'VideoObject'
286
+ || schematype == 'local_business'
287
+ || schematype == 'Product'
288
+
289
+ ){
290
+
291
+ $(".saswp-enable-append-reviews").parent().parent().show();
292
+ }else{
293
+ $(".saswp-enable-append-reviews").parent().parent().hide();
294
+ }
295
+
296
+
297
+ if(schematype == 'local_business'){
298
+ $(".saswp-option-table-class tr").eq(1).show();
299
+ $(".saswp-business-text-field-tr").show();
300
+ $(".saswp-option-table-class tr").find('select').attr('disabled', false);
301
+ $('.select-post-type').val('show_globally').trigger('change');
302
+ }
303
+ if(schematype == 'Service'){
304
+ $(".saswp-service-text-field-tr").show();
305
+ $(".saswp-option-table-class tr").find('select').attr('disabled', false);
306
+ }
307
+ if(schematype == 'Event'){
308
+ $(".saswp-event-text-field-tr").show();
309
+ $(".saswp-option-table-class tr").find('select').attr('disabled', false);
310
+ }
311
+ if(schematype == 'Review'){
312
+ $(".saswp-review-text-field-tr").show();
313
+ $(".saswp-option-table-class tr").find('select').attr('disabled', false);
314
+ $(".saswp-item-reivewed-list").change();
315
+ }
316
+ saswp_enable_rating_review();
317
 
318
+ $(".saswp-manual-modification").html('');
319
+ $('.saswp-static-container .spinner').addClass('is-active');
320
+ $.get(ajaxurl,
321
+ { action:"saswp_get_manual_fields_on_ajax", schema_type:schematype, post_id: saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
 
323
+ function(response){
324
+
325
+ $('.saswp-static-container .spinner').removeClass('is-active');
326
+ $(".saswp-manual-modification").append(response);
327
+
328
+ saswp_schema_datepicker();
329
+ saswp_schema_timepicker();
330
+
331
+ saswp_item_reviewed_call();
332
+
333
+ });
334
 
335
+ if(schematype == 'HowTo' || schematype == 'local_business' || schematype == 'FAQ'){
336
+
337
+ $(".saswp-enable-modify-schema").show();
338
+
339
+ }else{
340
+
341
+ $(".saswp-enable-modify-schema-output").val('automatic');
342
+ $(".saswp-enable-modify-schema-output").change();
343
+ $(".saswp-enable-modify-schema").hide();
344
+
345
+ }
346
+
347
+ });
348
+
349
+ $("#saswp_business_type").change(function(){
 
 
 
 
 
 
 
 
350
  var businesstype = $ (this).val();
351
  var schematype = $(".saswp-schame-type-select").val();
352
 
353
  $(".saswp-option-table-class tr").each(function(index,value){
354
  if(index>1){
355
  $(this).hide();
356
+ $(this).find('.saswp-local-sub-type-2').attr('disabled', true);
357
  }
358
  });
359
 
389
  }
390
 
391
  if(schematype == 'local_business'){
392
+ $(".saswp-"+businesstype+'-tr').show();
393
+ $(".saswp-business-text-field-tr").show();
394
+ $(".saswp-"+businesstype+'-tr').find('select').attr('disabled', false);
395
  }
396
 
397
  if(schematype == 'Review'){
398
+ $(".saswp-review-text-field-tr").show();
399
+ $(".saswp-review-text-field-tr").find('select').attr('disabled', false);
400
  }
401
  if(schematype == 'Event'){
402
+ $(".saswp-event-text-field-tr").show();
403
+ $(".saswp-option-table-class tr").find('select').attr('disabled', false);
404
  }
405
 
406
  saswp_enable_rating_review();
737
  }
738
  break;
739
 
740
+ case 'saswp-default-review-checkbox':
741
+ saswp_compatibliy_notes(current, id);
742
+ if ($(this).is(':checked')) {
743
+ $("#saswp_default_review").val(1);
744
+ }else{
745
+ $("#saswp_default_review").val(0);
746
+ }
747
+ break;
748
+
749
  case 'saswp-extra-checkbox':
750
  saswp_compatibliy_notes(current, id);
751
  if ($(this).is(':checked')) {
1091
 
1092
  break;
1093
 
1094
+ case 'saswp-bne-testimonials-checkbox':
1095
+
1096
+ if ($(this).is(':checked')) {
1097
+ $("#saswp-bne-testimonials").val(1);
1098
+ }else{
1099
+ $("#saswp-bne-testimonials").val(0);
1100
+ }
1101
+
1102
+ break;
1103
+
1104
  default:
1105
  break;
1106
  }
1133
 
1134
  }).change();
1135
 
1136
+ $(document).on("click", "input[data-id=media]" ,function(e) { // Application Icon upload
1137
+ e.preventDefault();
1138
  var current = $(this);
1139
  var button = current;
1140
  var id = button.attr('id').replace('_button', '');
1141
+ var saswpMediaUploader = wp.media({
1142
+ title: "Application Icon",
1143
+ button: {
1144
+ text: "Select Icon"
1145
+ },
1146
+ multiple: false, // Set this to true to allow multiple files to be selected
1147
  library:{type : 'image'}
1148
+ })
1149
+ .on("select", function() {
1150
+ var attachment = saswpMediaUploader.state().get('selection').first().toJSON();
1151
+
1152
  $("#"+id).val(attachment.url);
1153
  $("input[data-id='"+id+"_id']").val(attachment.id);
1154
  $("input[data-id='"+id+"_height']").val(attachment.height);
1168
 
1169
  $(".saswp_image_div_"+id).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+attachment.url+'"/><a data-id="'+id+'" href="#" class="saswp_prev_close">X</a></div>'+smaller_img_notice);
1170
 
1171
+ })
1172
+ .open();
1173
+ });
1174
 
1175
  $(document).on("click", ".saswp_prev_close", function(e){
1176
  e.preventDefault();
1364
  function(response){
1365
  if(response['status'] =='t'){
1366
  $(".saswp-feedback-notice").hide();
1367
+ }
1368
  },'json');
1369
  });
1370
 
1375
  function(response){
1376
  if(response['status'] =='t'){
1377
  $(".saswp-feedback-notice").hide();
1378
+ }
1379
  },'json');
1380
  });
1381
 
1400
  current.parents('.form-table tr:first').after(html);
1401
  }else{
1402
  $(".saswp-local-business-name-select").parents('tr').remove();
1403
+ }
1404
  },'json');
1405
  });
1406
 
1625
  //Changing the url of add new schema type
1626
  $('a[href="'+saswp_localize_data.new_url_selector+'"]').attr( 'href', saswp_localize_data.new_url_href);
1627
 
1628
+
1629
+ $(".saswp-enable-modify-schema-output").on("change",function(){
1630
+
1631
+ $(".saswp-static-container").addClass('saswp_hide');
1632
+ $(".saswp-dynamic-container").addClass('saswp_hide');
1633
+
1634
+ if ($(this).val() == 'manual') {
1635
+ $(".saswp-static-container").removeClass('saswp_hide');
1636
+ $(".saswp-dynamic-container").addClass('saswp_hide');
1637
+ }
1638
+ if ($(this).val() == 'automatic') {
1639
+ $(".saswp-static-container").addClass('saswp_hide');
1640
+ $(".saswp-dynamic-container").removeClass('saswp_hide');
1641
  }
1642
  });
1643
 
1646
  var type = 'text';
1647
  var tr = $(this).parent().parent('tr');
1648
  var fields_name = $(this).val();
1649
+ var str2 = "_image";
1650
+ var str3 = "_logo";
1651
  if((fields_name.indexOf(str2) != -1)|| (fields_name.indexOf(str3) != -1)){
1652
  type = 'image';
1653
  }
1663
  $.post(ajaxurl,
1664
  { action:"saswp_skip_wizard", saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
1665
  function(response){
1666
+
1667
  },'json');
1668
 
1669
  });
1790
 
1791
  $(document).on("change", ".saswp-item-reivewed-list", function(){
1792
 
1793
+ $(".saswp-custom-fields-table").html('');
1794
+ saswp_meta_list_fields = [];
1795
+
1796
+ var current = $(this);
1797
+ var schema_type = $('select#schema_type option:selected').val();
1798
+
1799
+ saswp_item_reviewed_ajax(schema_type, current, 'manual');
1800
+
1801
+
1802
  });
1803
 
1804
  $(document).on("click", '.saswp-add-custom-fields', function(){
1807
  current_fly.addClass('updating-message');
1808
  var schema_type = $('select#schema_type option:selected').val();
1809
  var schema_subtype = '';
1810
+ var field_name = null;
1811
 
1812
  if(schema_type == 'Review'){
1813
  schema_subtype = $('select.saswp-item-reivewed-list option:selected').val();
1814
+ field_name = 'saswp_review_name';
1815
  }
1816
  var post_id = $('#post_ID').val();
1817
+
1818
  if(schema_type !=''){
1819
 
1820
  if(!saswp_meta_list_fields[schema_type]){
1827
  success:function(response){
1828
 
1829
  saswp_meta_list_fields[schema_type] = response;
1830
+ saswp_get_meta_list(current_fly, 'text', saswp_meta_list_fields[schema_type], null, field_name, null);
1831
 
1832
  },
1833
  error: function(response){
1838
 
1839
  }else{
1840
 
1841
+ saswp_get_meta_list(current_fly, 'text', saswp_meta_list_fields[schema_type], null, field_name, null);
1842
 
1843
  }
1844
 
1892
 
1893
  if ('saswp' == saswp_localize_data.post_type && saswp_localize_data.page_now == 'edit.php') {
1894
 
1895
+ jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>");
1896
+
1897
+ }
1898
+
1899
+ if ('saswp_reviews' == saswp_localize_data.post_type && saswp_localize_data.page_now == 'edit.php') {
1900
+
1901
+ jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.collections_page_url+"' id='' class='page-title-action'>Collections</a>");
1902
 
1903
  }
1904
 
1936
  }
1937
 
1938
  });
1939
+
1940
+ //Collection js starst here
1941
+
1942
+ saswpCollectionSlider();
1943
+
1944
+ $(".saswp-accordion").click(function(){
1945
+ $(this).toggleClass("active");
1946
+ $(this).next(".saswp-accordion-panel").slideToggle(200);
1947
+ });
1948
+
1949
+ $(document).on("click", ".saswp-opn-cls-btn", function(){
1950
+
1951
+ $("#saswp-reviews-cntn").toggle();
1952
+
1953
+ if( $('#saswp-reviews-cntn').is(':visible') ) {
1954
+ $(".saswp-onclick-show").css('display','flex');
1955
+ $(".saswp-onclick-hide").hide();
1956
+ $(".saswp-open-class").css('width', '500px');
1957
+ }
1958
+ else {
1959
+ $(".saswp-onclick-show").css('display','none');
1960
+ $(".saswp-onclick-hide").show();
1961
+ $(".saswp-open-class").css('width', '300px');
1962
+ }
1963
+
1964
+ });
1965
+ $(".saswp-collection-display-method").change(function(){
1966
+
1967
+ if($(this).val() == 'shortcode'){
1968
+ $(".saswp-collection-shortcode").removeClass('saswp_hide');
1969
+ }else{
1970
+ $(".saswp-collection-shortcode").addClass('saswp_hide');
1971
+ }
1972
+
1973
+ }).change();
1974
+ $(document).on("click", ".saswp-remove-platform", function(e){
1975
+
1976
+ e.preventDefault();
1977
+
1978
+ var platform_id = $(this).attr('platform-id');
1979
+ saswp_collection.splice(platform_id, 1);
1980
+ $(this).parent().remove();
1981
+ saswp_on_collection_design_change();
1982
+
1983
+ });
1984
+
1985
+ $(".saswp-number-change").bind('keyup mouseup', function () {
1986
+
1987
+ saswp_on_collection_design_change();
1988
+ });
1989
+
1990
+
1991
+ $(".saswp-coll-settings-options").change(function(){
1992
+
1993
+ var design = $(".saswp-collection-desing").val();
1994
+
1995
+ $(".saswp-coll-options").addClass('saswp_hide');
1996
+ $(".saswp-collection-lp").css('height', 'auto');
1997
+
1998
+ if(design == 'grid'){
1999
+ $(".saswp-grid-options").removeClass("saswp_hide");
2000
+ }
2001
+
2002
+ if(design == 'gallery'){
2003
+ $(".saswp-slider-options").removeClass("saswp_hide");
2004
+ }
2005
+
2006
+ if(design == 'fomo'){
2007
+ $(".saswp-fomo-options").removeClass("saswp_hide");
2008
+ $(".saswp-collection-lp").css('height', '31px');
2009
+ }
2010
+
2011
+ if(design == 'popup'){
2012
+ $(".saswp-collection-lp").css('height', '31px');
2013
+ }
2014
+
2015
+ saswp_on_collection_design_change();
2016
+
2017
+ }).change();
2018
+
2019
+ $(".saswp-add-to-collection").on("click", function(e){
2020
+
2021
+ e.preventDefault();
2022
+
2023
+ var current = $(this);
2024
+ var platform_id = $("#saswp-plaftorm-list").val();
2025
+ var rvcount = $("#saswp-review-count").val();
2026
+
2027
+ if(platform_id && rvcount > 0){
2028
+
2029
+ current.addClass('updating-message');
2030
+
2031
+ saswp_get_collection_data(rvcount, platform_id, current);
2032
+
2033
+ }else{
2034
+
2035
+ alert('Enter Count');
2036
+
2037
+ }
2038
+
2039
+ });
2040
+
2041
+ var collection_id = $("#saswp_collection_id").val();
2042
+
2043
+ if(collection_id){
2044
+
2045
+ $('.spinner').addClass('is-active');
2046
+
2047
+ $.get(ajaxurl,
2048
+ { action:"saswp_get_collection_platforms", collection_id:collection_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
2049
+
2050
+ function(response){
2051
+
2052
+ if(response['status']){
2053
+
2054
+ var res_json = response['message'];
2055
+
2056
+ $.each(res_json, function(i, e){
2057
+ saswp_get_collection_data(e, i, null);
2058
+ });
2059
+
2060
+ }
2061
+ $('.spinner').removeClass('is-active');
2062
+
2063
+ },'json');
2064
+
2065
+ }
2066
+
2067
+ //Collection js ends here
2068
+
2069
+
2070
+ // Text on Click Copy scripts
2071
+ var tooltip, // global variables oh my! Refactor when deploying!
2072
+ hidetooltiptimer
2073
+
2074
+ function createtooltip(){ // call this function ONCE at the end of page to create tool tip object
2075
+ tooltip = document.createElement('div')
2076
+ tooltip.style.cssText =
2077
+ 'position:absolute; background:black; color:white; padding:4px 6px;z-index:10000;'
2078
+ + 'border-radius:2px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);'
2079
+ + 'opacity:0;transition:opacity 0.3s'
2080
+ tooltip.innerHTML = 'Copied!'
2081
+ document.body.appendChild(tooltip)
2082
+ }
2083
+
2084
+ function showtooltip(e){
2085
+ var evt = e || event
2086
+ clearTimeout(hidetooltiptimer)
2087
+ tooltip.style.left = evt.pageX - 10 + 'px'
2088
+ tooltip.style.top = evt.pageY + 15 + 'px'
2089
+ tooltip.style.opacity = 1
2090
+ hidetooltiptimer = setTimeout(function(){
2091
+ tooltip.style.opacity = 0
2092
+ }, 500)
2093
+ }
2094
+
2095
+ createtooltip()
2096
+ function selectElementText(el){
2097
+ var range = document.createRange() // create new range object
2098
+ range.selectNodeContents(el) // set range to encompass desired element text
2099
+ var selection = window.getSelection() // get Selection object from currently user selected text
2100
+ selection.removeAllRanges() // unselect any user selected text (if any)
2101
+ selection.addRange(range) // add range to Selection object to select it
2102
+ }
2103
+
2104
+
2105
+ function copySelectionText(){
2106
+ var copysuccess // var to check whether execCommand successfully executed
2107
+ try{
2108
+ copysuccess = document.execCommand("copy") // run command to copy selected text to clipboard
2109
+ } catch(e){
2110
+ copysuccess = false
2111
+ }
2112
+ return copysuccess
2113
+ }
2114
+
2115
+ var motivatebox = document.getElementById('motivatebox')
2116
+
2117
+ if(motivatebox){
2118
+
2119
+ motivatebox.addEventListener('mouseup', function(e){
2120
+ var e = e || event // equalize event object between modern and older IE browsers
2121
+ var target = e.target || e.srcElement // get target element mouse is over
2122
+ if (target.className == 'motivate'){
2123
+ selectElementText(target) // select the element's text we wish to read
2124
+ var copysuccess = copySelectionText()
2125
+ if (copysuccess){
2126
+ //e.target.setAttribute("data-title", "copied");
2127
+ showtooltip(e);
2128
+ }
2129
+ }
2130
+ }, false);
2131
+
2132
+ }
2133
+
2134
 
2135
  });
admin_section/js/main-script.min.js CHANGED
@@ -1 +1 @@
1
- var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[],saswp_taxonomy_term=[];function saswp_taxonomy_term_html(e,s){var a="";return a+="<td>",a+='<select name="saswp_taxonomy_term['+s+']">',jQuery.each(e,function(e,s){a+='<option value="'+e+'">'+s+"</option>"}),a+="</select>",a+="</td>",a+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>'}function saswp_enable_rating_review(){var e="";jQuery("select#schema_type option:selected").val()&&(e=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(e=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),e&&jQuery(".saswp-enable-rating-review-"+e.toLowerCase()).change(function(){jQuery(this).is(":checked")?jQuery(this).parent().parent().siblings(".saswp-rating-review-"+e.toLowerCase()).show():jQuery(this).parent().parent().siblings(".saswp-rating-review-"+e.toLowerCase()).hide()}).change()}function getParameterByName(e,s){s||(s=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(s);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null}function saswpCustomSelect2(){"saswp"!=saswp_localize_data.post_type&&"saswp"!=saswp_localize_data.page_now||"saswp_page_structured_data_options"==saswp_localize_data.page_now||jQuery(".saswp-custom-fields-select2").select2({ajax:{type:"POST",url:ajaxurl,dataType:"json",delay:250,data:function(e){return{saswp_security_nonce:saswp_localize_data.saswp_security_nonce,q:e.term,action:"saswp_get_custom_meta_fields"}},processResults:function(e){return{results:e}},cache:!0},minimumInputLength:2})}function saswp_reviews_datepicker(){jQuery(".saswp-reviews-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_datepicker(){jQuery(".saswp-datepicker-picker").datepicker({dateFormat:"yy-mm-dd"})}function saswp_schema_timepicker(){jQuery(".saswp-timepicker").timepicker({timeFormat:"H:i:s"})}function saswp_item_reviewed_call(){jQuery(".saswp-item-reviewed").change(function(e){e.preventDefault();var s="";if(jQuery("select#schema_type option:selected").val()&&(s=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(s=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===s){var a=jQuery(this),t=jQuery(this).val(),i=saswp_localize_data.post_id,p=jQuery(a).attr("data-id"),o=jQuery(a).attr("post-specific");jQuery.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",schema_id:p,post_specific:o,item:t,post_id:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){jQuery("#saswp_specific_"+p).find(".saswp-table-create-onajax").remove();var s=jQuery("#saswp_specific_"+p).find(".saswp-table-create-onload");jQuery.each(s,function(e,s){0!=e&&jQuery(this).remove()}),jQuery("#saswp_specific_"+p).append(e),saswp_schema_datepicker(),saswp_schema_timepicker()})}}).change()}function saswp_compatibliy_notes(e,s){var a=s.replace("-checkbox",""),t=jQuery("#"+a).next("p").text();e.is(":checked")&&""!==t?jQuery("#"+a).next("p").removeClass("saswp_hide"):1==jQuery("#"+a).next("p").attr("data-id")?jQuery("#"+a).next("p").text("This feature is only available in pro version"):jQuery("#"+a).next("p").addClass("saswp_hide")}function saswp_meta_list_html(e,s,a,t,i,p){var o=t;null==o&&(o=Object.keys(a)[0]);var n="";if(n+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+o+']">',jQuery.each(s,function(e,s){n+='<optgroup label="'+s.label+'">',jQuery.each(s["meta-list"],function(e,s){n+='<option value="'+e+'">'+s+"</option>"}),n+="</optgroup>"}),n+="</select>",a){var c=jQuery("select#schema_type option:selected").val(),l="";"Review"==c&&(l=jQuery("select.saswp-item-reivewed-list option:selected").val());var r="<tr>";r+="<td>",r+='<select class="saswp-custom-fields-name">',"Review"==c&&(r+='<optgroup label="Review">',r+='<option value="saswp_review_name">Review Name</option>',r+='<option value="saswp_review_description">Review Description</option>',r+='<option value="saswp_review_author">Review Author</option>',r+='<option value="saswp_review_author_url">Review Author Profile URL</option>',r+='<option value="saswp_review_publisher">Review Publisher</option>',r+='<option value="saswp_review_rating_value">Review Rating Value</option>',r+='<option value="saswp_review_date_published">Review Published Date</option>',r+='<option value="saswp_review_url">Review URL</option>',r+="</optgroup>"),"Review"==c&&(r+='<optgroup label="'+l+'">'),jQuery.each(a,function(e,s){r+='<option value="'+e+'">'+s+"</option>"}),"Review"==c&&(r+="</optgroup>"),r+="</select>",r+="</td>",r+="<td>",r+=n,r+="</td>",r+='<td></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td>',r+="</tr>",jQuery(".saswp-custom-fields-table").append(r),null!=e&&e.removeClass("updating-message")}else jQuery(i).html(n),null!=e&&e.removeClass("updating-message")}function saswp_get_meta_list(e,s,a,t,i,p){saswp_meta_list[s]?saswp_meta_list_html(e,saswp_meta_list[s],a,i,t,p):jQuery.get(ajaxurl,{action:"saswp_get_meta_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(o){saswp_meta_list[s]=o[s],saswp_meta_list_html(e,saswp_meta_list[s],a,i,t,p)},"json")}function saswp_get_post_specific_schema_fields(e,s,a,t,i,p){if(saswp_meta_fields[p]){var o=saswp_fields_html_generator(s,i,p,t,saswp_meta_fields[p]);o&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(o),saswp_schema_datepicker(),saswp_schema_timepicker(),e.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[p]=a;var o=saswp_fields_html_generator(s,i,p,t,a);o&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(o),saswp_schema_datepicker(),saswp_schema_timepicker(),e.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(e,s,a,t,i){var p="";return p+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+e+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var o="";switch("saswp_tvseries_season_published_date"!=i.name&&"saswp_feed_element_date_created"!=i.name&&"saswp_product_reviews_created_date"!=i.name||(o="saswp-datepicker-picker"),i.type){case"number":case"text":p+="<tr><th>"+i.label+'</th><td><input class="'+o+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']"></td></tr>';break;case"textarea":p+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var n="";jQuery.each(i.options,function(e,s){n+='<option value="'+e+'">'+s+"</option>"}),p+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+e+"_"+s+'" name="'+a+s+"["+e+"]["+i.name+']">'+n+"</select></td></tr>";break;case"media":p+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+e+"_"+s+'" name="'+i.name+"_"+e+"_"+s+'"><input type="hidden" data-id="'+i.name+"_"+e+"_"+s+'_id" name="'+a+s+"["+e+"]["+i.name+'_id]" id="'+i.name+"_"+e+"_"+s+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+e+"_"+s+'_button" name="'+i.name+"_"+e+"_"+s+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+e+"_"+s+'"></div></fieldset></td></tr>'}}),p+="</table></div>"}jQuery(document).ready(function(e){if(e(document).on("click",".saswp-add-g-location-btn",function(s){var a="";a=e("#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">',s.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>Place Id</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>Reviews</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&e(".saswp-g-reviews-settings-table").append(t)}),e(document).on("click",".saswp-fetch-g-reviews",function(){var s=e(this),a="free";s.addClass("updating-message");var t=e(this).parent().parent().find(".saswp-g-location-field").val(),i=e(this).parent().parent().find(".saswp-g-blocks-field").val(),p=e("#saswp_google_place_api_key").val(),o=e("#reviews_addon_license_key").val(),n=e("#reviews_addon_license_key_status").val();if("premium"==(a=e("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert("Blocks value is zero"),s.removeClass("updating-message"),!1;if(0!=i%10)return s.parent().parent().find(".saswp-rv-fetched-msg").text("Reviews count should be in step of 10"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),s.removeClass("updating-message"),!1}""!=t&&(o||p)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:n,reviews_api:o,location:t,blocks:i,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s.parent().parent().find(".saswp-rv-fetched-msg").text("Success"),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(s.parent().parent().find(".saswp-rv-fetched-msg").text(e.message),s.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),s.removeClass("updating-message")},error:function(e){console.log(e)}}):(""==t&&alert("Please enter place id"),""==p&&alert("Please enter api key"),""==o&&alert("Please enter reviews api key"),s.removeClass("updating-message"))}),saswp_localize_data.do_tour){var s,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none}\t#afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/z7t4b8" data-id="258182" data-code="z7t4b8" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+='<div class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+="</div>",a+="</form>";var t={content:a+="</div>",position:{edge:"top",align:"left"}};s=function(){e(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(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},(t=e.extend(t,{buttons:function(e,s){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(){s.element.pointer("close")}),button_2.on("click",function(){s.element.pointer("close")}),button},close:function(){e.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(e,s){s.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?e(window).bind("load.wp-pointers",s):s()}e(".saswp-tabs a").click(function(s){var a=e(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),e(this).siblings().removeClass("nav-tab-active"),e(this).addClass("nav-tab-active"),e(".form-wrap").find(".saswp-"+t).siblings().hide(),e(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),e(".saswp-schame-type-select").change(function(){e(".saswp-custom-fields-table").html("");var s=e(this).val();e(".saswp-option-table-class tr").each(function(s,a){s>0&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==s||"Article"==s||"Blogposting"==s||"NewsArticle"==s||"WebPage"==s?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"Book"==s||"Course"==s||"HowTo"==s||"MusicPlaylist"==s||"MusicAlbum"==s||"Recipe"==s||"TVSeries"==s||"SoftwareApplication"==s||"Event"==s||"VideoGame"==s||"Service"==s||"AudioObject"==s||"VideoObject"==s||"local_business"==s||"Product"==s?e(".saswp-enable-append-reviews").parent().parent().show():e(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==s&&(e(".saswp-option-table-class tr").eq(1).show(),e(".saswp-business-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),e(".select-post-type").val("show_globally").trigger("change")),"Service"==s&&(e(".saswp-service-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==s&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==s&&(e(".saswp-review-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1),saswp_item_reviewed_call()),saswp_enable_rating_review()}),e("#saswp_business_type").change(function(){var s=e(this).val(),a=e(".saswp-schame-type-select").val();e(".saswp-option-table-class tr").each(function(s,a){s>1&&(e(this).hide(),e(this).find("select").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?e(".saswp-enable-speakable").parent().parent().show():e(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a?e(".saswp-enable-append-reviews").parent().parent().show():e(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(e(".saswp-"+s+"-tr").show(),e(".saswp-business-text-field-tr").show(),e(".saswp-"+s+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(e(".saswp-review-text-field-tr").show(),e(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(e(".saswp-event-text-field-tr").show(),e(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review()}).change(),e(".saswp-checkbox").change(function(){var s=e(this).attr("id"),a=e(this);switch(s){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-the-seo-framework").val(1):e("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-seo-press").val(1):e("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-aiosp").val(1):e("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-smart-crawl").val(1):e("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-squirrly-seo").val(1):e("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wp-recipe-maker").val(1):e("#saswp-wp-recipe-maker").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wp-ultimate-recipe").val(1):e("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-zip-recipes").val(1):e("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-mediavine-create").val(1):e("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-ht-recipes").val(1):e("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wpsso-core").val(1):e("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":e(this).is(":checked")?e("#saswp-for-wordpress").val(1):e("#saswp-for-wordpress").val(0);break;case"saswp-facebook-enable-checkbox":e(this).is(":checked")?(e("#saswp-facebook-enable").val(1),e("#sd_facebook").show()):(e("#saswp-facebook-enable").val(0),e("#sd_facebook").hide());break;case"saswp-twitter-enable-checkbox":e(this).is(":checked")?(e("#saswp-twitter-enable").val(1),e("#sd_twitter").show()):(e("#saswp-twitter-enable").val(0),e("#sd_twitter").hide());break;case"saswp-google-plus-enable-checkbox":e(this).is(":checked")?(e("#saswp-google-plus-enable").val(1),e("#sd_google_plus").show()):(e("#saswp-google-plus-enable").val(0),e("#sd_google_plus").hide());break;case"saswp-instagram-enable-checkbox":e(this).is(":checked")?(e("#saswp-instagram-enable").val(1),e("#sd_instagram").show()):(e("#saswp-instagram-enable").val(0),e("#sd_instagram").hide());break;case"saswp-youtube-enable-checkbox":e(this).is(":checked")?(e("#sd_youtube").show(),e("#saswp-youtube-enable").val(1)):(e("#saswp-youtube-enable").val(0),e("#sd_youtube").hide());break;case"saswp-linkedin-enable-checkbox":e(this).is(":checked")?(e("#saswp-linkedin-enable").val(1),e("#sd_linkedin").show()):(e("#saswp-linkedin-enable").val(0),e("#sd_linkedin").hide());break;case"saswp-pinterest-enable-checkbox":e(this).is(":checked")?(e("#saswp-pinterest-enable").val(1),e("#sd_pinterest").show()):(e("#saswp-pinterest-enable").val(0),e("#sd_pinterest").hide());break;case"saswp-soundcloud-enable-checkbox":e(this).is(":checked")?(e("#saswp-soundcloud-enable").val(1),e("#sd_soundcloud").show()):(e("#saswp-soundcloud-enable").val(0),e("#sd_soundcloud").hide());break;case"saswp-tumblr-enable-checkbox":e(this).is(":checked")?(e("#saswp-tumblr-enable").val(1),e("#sd_tumblr").show()):(e("#saswp-tumblr-enable").val(0),e("#sd_tumblr").hide());break;case"saswp-yelp-enable-checkbox":e(this).is(":checked")?(e("#saswp-yelp-enable").val(1),e("#sd_yelp").show()):(e("#saswp-yelp-enable").val(0),e("#sd_yelp").hide());break;case"saswp-for-amp-checkbox":e(this).is(":checked")?e("#saswp-for-amp").val(1):e("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":e(this).is(":checked")?(e("#saswp_kb_contact_1").val(1),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(e("#saswp_kb_contact_1").val(0),e("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":e(this).is(":checked")?(e("#saswp-logo-dimensions").val(1),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(e("#saswp-logo-dimensions").val(0),e("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":e(this).is(":checked")?(e("#saswp_archive_schema").val(1),e(".saswp_archive_schema_type_class").parent().parent().show()):(e("#saswp_archive_schema").val(0),e(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":e(this).is(":checked")?(e("#saswp_website_schema").val(1),e("#saswp_search_box_schema").parent().parent().show()):(e("#saswp_website_schema").val(0),e("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":e(this).is(":checked")?e("#saswp_search_box_schema").val(1):e("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":e(this).is(":checked")?e("#saswp_breadcrumb_schema").val(1):e("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":e(this).is(":checked")?e("#saswp_comments_schema").val(1):e("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":e(this).is(":checked")?e("#saswp-review-module").val(1):e("#saswp-review-module").val(0);break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-kk-star-raring").val(1):e("#saswp-kk-star-raring").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-woocommerce").val(1):e("#saswp-woocommerce").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-extra").val(1):e("#saswp-extra").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-dw-question-answer").val(1):e("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wp-job-manager").val(1):e("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-yoast").val(1):e("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-rankmath").val(1):e("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-tagyeem").val(1):e("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-the-events-calendar").val(1):e("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-homeland").val(1):e("#saswp-homeland").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-realhomes").val(1):e("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-learn-press").val(1):e("#saswp-learn-press").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-learn-dash").val(1):e("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-lifter-lms").val(1):e("#saswp-lifter-lms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wp-event-manager").val(1):e("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-events-manager").val(1):e("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-event-calendar-wd").val(1):e("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-event-organiser").val(1):e("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-modern-events-calendar").val(1):e("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking").val(1),e("#saswp-woocommerce-booking-main").val(1)):(e("#saswp-woocommerce-booking").val(0),e("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?(e("#saswp-woocommerce-booking-main").val(1),e("#saswp-woocommerce-booking").val(1)):(e("#saswp-woocommerce-booking-main").val(0),e("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-woocommerce-membership").val(1):e("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":e(this).is(":checked")?e("#saswp-defragment").val(1):e("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-cooked").val(1):e("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-flexmlx-compativility").val(1):e("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?(e("#saswp-shopper-approved-review").val(1),e(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-shopper-approved-review").val(0),e(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":e(this).is(":checked")?(e("#saswp-google-review").val(1),e("#saswp-google-rv-free-checkbox").length?(e("#saswp-google-review-free").parent().parent().show(),e("#saswp-google-rv-free-checkbox").is(":checked")?e("#saswp_google_place_api_key").parent().parent().show():e("#saswp_google_place_api_key").parent().parent().hide()):e("#saswp_google_place_api_key").parent().parent().show(),e(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(e("#saswp-google-review").val(0),e("#saswp_google_place_api_key").parent().parent().hide(),e(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),e("#saswp-google-rv-free-checkbox").length&&e("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":e("#saswp-google-review-checkbox").is(":checked")&&e(this).is(":checked")?(e("#saswp-google-review-free").val(1),e("#saswp_google_place_api_key").parent().parent().show()):(e("#saswp-google-review-free").val(0),e("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":e(this).is(":checked")?e("#saswp-markup-footer").val(1):e("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":e(this).is(":checked")?e("#saswp-pretty-print").val(1):e("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-wppostratings-raring").val(1):e("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,s),e(this).is(":checked")?e("#saswp-bbpress").val(1):e("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":e(this).is(":checked")?e("#saswp-microdata-cleanup").val(1):e("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":e(this).is(":checked")?e("#saswp-other-images").val(1):e("#saswp-other-images").val(0);break;case"saswp-easy-testimonials-checkbox":e(this).is(":checked")?e("#saswp-easy-testimonials").val(1):e("#saswp-easy-testimonials").val(0)}}).change(),e("#saswp_kb_type").change(function(){var s=e(this).val();e(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==s&&(e(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_person_fields").parent().parent().addClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==s&&(e(".saswp_org_fields").parent().parent().addClass("saswp_hide"),e(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),e(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),e("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),e(document).on("click","input[data-id=media]",function(s){s.preventDefault();var a=e(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var s=i.state().get("selection").first().toJSON();e("#"+t).val(s.url),e("input[data-id='"+t+"_id']").val(s.id),e("input[data-id='"+t+"_height']").val(s.height),e("input[data-id='"+t+"_width']").val(s.width),e("input[data-id='"+t+"_thumbnail']").val(s.url),"sd_default_image_button"===a.attr("id")&&(e("#sd_default_image_width").val(s.width),e("#sd_default_image_height").val(s.height));var p="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&s.height<1200&&(p='<p class="saswp_warning">Image size is smaller than recommended size</p>'),e(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+s.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+p)}).open()}),e(document).on("click",".saswp_prev_close",function(s){s.preventDefault();var a=e(this).attr("data-id");console.log(a),e(this).parent().remove(),e("#"+a).val(""),e("input[data-id='"+a+"_id']").val(""),e("input[data-id='"+a+"_height']").val(""),e("input[data-id='"+a+"_width']").val(""),e("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(e("#sd_default_image_width").val(""),e("#sd_default_image_height").val(""))}),e(document).on("change",".saswp-schema-type-toggle",function(s){var a=e(this).attr("data-schema-id"),t=e(this).attr("data-post-id");if(e(this).is(":checked"))var i=1;else i=0;e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:i,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){},error:function(e){console.log(e)}})}),e(document).on("click",".saswp-reset-data",function(s){s.preventDefault(),1==confirm("Are you sure?")&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){setTimeout(function(){location.reload()},1e3)},error:function(e){console.log(e)}})}),e(document).on("click",".saswp_license_activation",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("license-status"),i=e(this).attr("add-on"),p=e("#"+i+"_addon_license_key").val();t&&i&&p?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:p,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){e("#"+i+"_addon_license_key_status").val(s.status),"active"==s.status?(e(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").css("color","green"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),e(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),e(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)):(e(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),e(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),e(".saswp-"+i+"-dashicons").css("color","red"),e(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),e(".saswp_license_activation[add-on='"+i+"']").text("Activate"),e(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),e(".saswp_license_status_msg[add-on='"+i+"']").text(s.message)),a.removeClass("updating-message")},error:function(e){console.log(e)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),e(".saswp-send-query").on("click",function(s){s.preventDefault();var a=e("#saswp_query_message").val();""!=e.trim(a)?e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",message:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e(".saswp-query-success").show(),e(".saswp-query-error").hide()):(console.log("dd"),e(".saswp-query-success").hide(),e(".saswp-query-error").show())},error:function(e){console.log(e)}}):alert("Please enter the message")}),e(".saswp-import-plugins").on("click",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("data-id");e.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?(e(a).parent().find(".saswp-imported-message").text(s.message),e(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(e(a).parent().find(".saswp-imported-message").addClass("saswp-error"),e(a).parent().find(".saswp-imported-message").text(s.message)),a.removeClass("updating-message")},"json")}),e(".saswp-feedback-no-thanks").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(".saswp-feedback-remindme").on("click",function(s){s.preventDefault(),e.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status&&e(".saswp-feedback-notice").hide()},"json")}),e(document).on("change",".saswp-local-business-type-select",function(s){s.preventDefault();var a=e(this),t=e(this).val();e.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){if("t"==s.status){e(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',e.each(s.result,function(e,s){i+='<option value="'+e+'">'+s+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else e(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),e(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),e(document).on("click",".saswp-add-custom-schema",function(s){s.preventDefault(),e(".saswp-add-custom-schema-field").removeClass("saswp_hide"),e(this).hide()}),e(document).on("click",".saswp-delete-custom-schema",function(s){s.preventDefault(),e("#saswp_custom_schema_field").val(""),e(".saswp-add-custom-schema-field").addClass("saswp_hide"),e(".saswp-add-custom-schema").show()}),e(".saswp-modify_schema_post_enable").on("click",function(s){var a=e(this);a.addClass("updating-message"),s.preventDefault(),e.get(ajaxurl,{action:"saswp_modify_schema_post_enable",post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){a.remove(),e(".saswp-add-custom-schema-div").remove(),e("#post_specific .inside").append(s),a.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_item_reviewed_call()})}),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_reviews_datepicker(),e(document).on("click",".saswp-add-more-item",function(s){s.preventDefault();var a=e(".saswp-review-item-list-table tr").length;console.log(a);e(".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>')}),e(document).on("click",".saswp-remove-review-item",function(s){s.preventDefault(),e(this).parent().parent("tr").remove()}),e(document).on("focusout",".saswp-review-item-tr input[type=number]",function(s){s.preventDefault();var a=0,t=e(".saswp-review-item-tr input[type=number]").length;e(".saswp-review-item-tr input[type=number]").each(function(s,t){""==e(t).val()?a+=parseFloat(0):a+=parseFloat(e(t).val())});var i=a/t;e("#saswp-review-item-over-all").val(i)}),e("#saswp-review-location").change(function(){var s=e(this).val();e(".saswp-review-shortcode").addClass("saswp_hide"),3==s&&e(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),e("#saswp-review-item-enable").change(function(){e(this).is(":checked")?e(".saswp-review-fields").show():e(".saswp-review-fields").hide()}).change(),e(document).on("click",".saswp-restore-post-schema",function(s){s.preventDefault();var a=e(this);if(a.addClass("updating-message"),e(".saswp-post-specific-schema-ids").val())var t=JSON.parse(e(".saswp-post-specific-schema-ids").val());e.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(e){"t"==e.status?setTimeout(function(){location.reload()},1e3):(alert(e.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),e(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(s){s.preventDefault();var a=e(this).attr("data-id");e(".saswp-post-specific-wrapper").hide(),e("#"+a).show(),e("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),e("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),e(this).addClass("selected"),e(this).parent().addClass("selected"),saswp_enable_rating_review()}),e("#saswp-global-tabs a:first").addClass("saswp-global-selected"),e(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?e(".saswp-global-container:eq(2)").show():e(".saswp-global-container:first").show(),e("#saswp-global-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-global-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-global-container").hide(),e("#"+s).show())}),e("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e(".saswp-tools-container:first").show(),e("#saswp-tools-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-tools-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-tools-container").hide(),e("#"+s).show())}),e("#saswp-review-tabs a:first").addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e(".saswp-review-container:first").show(),e("#saswp-review-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-review-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-review-container").hide(),e("#"+s).show())}),e("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),e(".saswp-compatibility-container").hide(),e(".saswp-compatibility-container:first").show(),e("#saswp-compatibility-tabs a").click(function(){var s=e(this).attr("data-id");e(this).hasClass("saswp-global-selected")||(e("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),e(this).addClass("saswp-global-selected"),e(".saswp-compatibility-container").hide(),e("#"+s).show())}),e('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),e("#saswp_enable_custom_field").change(function(){e(this).is(":checked")?e(".saswp-custom-fields-div").show():e(".saswp-custom-fields-div").hide()}),e(document).on("change",".saswp-custom-fields-name",function(){var s="text",a=e(this).parent().parent("tr"),t=e(this).val();-1==t.indexOf("image")&&-1==t.indexOf("logo")||(s="image"),saswp_get_meta_list(null,s,null,e(this).parent().parent("tr").find("td:eq(1)"),t,a)}),e(document).on("click",".saswp-skip-button",function(s){s.preventDefault(),e(this).parent().parent().hide(),e.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){},"json")}),e(document).on("click",".saswp_add_schema_fields_on_fly",function(s){s.preventDefault();var a=e(this);a.addClass("updating-message");var t=e(this).attr("data-id"),i=e(this).attr("fields_type"),p=e(this).attr("div_type"),o=e("saswp_specific_"+t+" , .saswp-"+p+"-table-div").length,n=e("saswp_specific_"+t+" , .saswp-"+p+"-table-div:nth-child("+o+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,p,t,i+"_")}),e(document).on("click",".saswp-table-close",function(){e(this).parent().remove()}),e(document).on("click",".saswp-rmv-modify_row",function(s){s.preventDefault(),e(this).parent().parent().remove()}),e(document).on("change",".saswp-custom-meta-list",function(){var s=e(this),a=e("select#schema_type option:selected").val(),t=e(this).val(),i=e(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),p="",o=a.toLowerCase()+"_"+i,n="saswp_fixed_image["+i+"]";"manual_text"==t?(p+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(p),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(p+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),s.parent().parent("tr").find("td:gt(1)").remove(),s.parent().parent("tr").append(p),saswpCustomSelect2()):e.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){e&&(saswp_taxonomy_term.taxonomy=e,p+=saswp_taxonomy_term_html(e,i),s.parent().parent("tr").find("td:gt(1)").remove(),s.parent().parent("tr").append(p),saswpCustomSelect2())},"json"):"custom_field"==t?(p+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',p+="</select></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(p),saswpCustomSelect2()):"fixed_image"==t?(p+="<td>",p+="<fieldset>",p+='<input data-id="media" style="width: 30%;" class="button" id="'+o+'_button" name="'+o+'_button" type="button" value="Upload" />',p+='<input type="hidden" data-id="'+o+'_height" class="upload-height" name="'+n+'[height]" id="'+o+'_height" value="">',p+='<input type="hidden" data-id="'+o+'_width" class="upload-width" name="'+n+'[width]" id="'+o+'_width" value="">',p+='<input type="hidden" data-id="'+o+'_thumbnail" class="upload-thumbnail" name="'+n+'[thumbnail]" id="'+o+'_thumbnail" value="">',p+='<div class="saswp_image_div_'+o+'">',p+="</div>",p+="</fieldset>",p+="</td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(p),saswpCustomSelect2()):(p+="<td></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',e(this).parent().parent("tr").find("td:gt(1)").remove(),e(this).parent().parent("tr").append(p),saswpCustomSelect2())}),e(document).on("change",".saswp-item-reivewed-list",function(){e(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[]}),e(document).on("click",".saswp-add-custom-fields",function(){var s=e(this);s.addClass("updating-message");var a=e("select#schema_type option:selected").val(),t="";"Review"==a&&(t=e("select.saswp-item-reivewed-list option:selected").val());var i=e("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(s,"text",saswp_meta_list_fields[a],null,null,null):e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:i,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){saswp_meta_list_fields[a]=e,saswp_get_meta_list(s,"text",saswp_meta_list_fields[a],null,null,null)},error:function(e){console.log(e)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),e('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),e(document).on("click",".saswp_coonect_google_place",function(){var s=e("#saswp_google_place_id").val(),a=e("#saswp_language_list").val(),t=e("#saswp_googel_api").val();""!=s&&e.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:s,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){console.log(e.status)},error:function(e){console.log(e)}})}),e(document).on("click",".saswp-add-social-links",function(){e(".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>')}),"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&&e(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(s,a){e(this).next().val(s),console.log(s)}}),e("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var s=e(this);s.parent().find(".saswp-phone-validation").remove();var a=e(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?s.parent().find(".saswp-phone-validation").remove():s.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')})});
1
+ jQuery(document).ready(function(s){if(s(".saswp-modify-schema-toggle").click(function(e){e.preventDefault(),s(".saswp-modify-container").slideToggle("300");var a=s("#saswp_enable_custom_field"),t=a.val();a.val("1"===t?"0":"1"),s(".saswp-enable-modify-schema-output").change()}),s(".saswp-enable-itemlist").change(function(){s(this).is(":checked")?(s("#saswp_item_list_tags").show(),s(".saspw-item-list-note").show(),"custom"==s("#saswp_item_list_tags").val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()):(s(".saspw-item-list-note").hide(),s("#saswp_item_list_tags").hide(),s("#saswp_item_list_custom").hide())}),s("#saswp_item_list_tags").change(function(){"custom"==s(this).val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()}),s(document).on("click",".saswp-add-g-location-btn",function(e){var a="";a=s("#saswp_google_place_api_key").length?'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="5" step="5" placeholder="5" disabled="disabled">':'<input class="saswp-g-blocks-field" name="sd_data[saswp_reviews_location_blocks][]" type="number" min="10" step="10" placeholder="10">',e.preventDefault();var t="";(t+='<tr><td style="width:12%;"><strong>Place Id</strong></td><td style="width:20%;"><input class="saswp-g-location-field" name="sd_data[saswp_reviews_location_name][]" type="text" value=""></td><td style="width:10%;"><strong>Reviews</strong></td><td style="width:10%;">'+a+'</td><td style="width:10%;"><a class="button button-default saswp-fetch-g-reviews">Fetch</a></td><td style="width:10%;"><a type="button" class="saswp-remove-review-item button">x</a></td><td style="width:10%;"><p class="saswp-rv-fetched-msg"></p></td></tr>')&&s(".saswp-g-reviews-settings-table").append(t)}),s(document).on("click",".saswp-fetch-g-reviews",function(){var e=s(this),a="free";e.addClass("updating-message");var t=s(this).parent().parent().find(".saswp-g-location-field").val(),i=s(this).parent().parent().find(".saswp-g-blocks-field").val(),o=s("#saswp_google_place_api_key").val(),p=s("#reviews_addon_license_key").val(),n=s("#reviews_addon_license_key_status").val();if("premium"==(a=s("#saswp_google_place_api_key").length?"free":"premium")){if(!(i>0))return alert("Blocks value is zero"),e.removeClass("updating-message"),!1;if(0!=i%10)return e.parent().parent().find(".saswp-rv-fetched-msg").text("Reviews count should be in step of 10"),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b"),e.removeClass("updating-message"),!1}""!=t&&(p||o)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:n,reviews_api:p,location:t,blocks:i,g_api:o,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text("Success"),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","green")):(e.parent().parent().find(".saswp-rv-fetched-msg").text(s.message),e.parent().parent().find(".saswp-rv-fetched-msg").css("color","#988f1b")),e.removeClass("updating-message")},error:function(s){console.log(s)}}):(""==t&&alert("Please enter place id"),""==o&&alert("Please enter api key"),""==p&&alert("Please enter reviews api key"),e.removeClass("updating-message"))}),saswp_localize_data.do_tour){var e,a="<h3>Thanks for using Structured Data!</h3>";a+="<p>Do you want the latest on <b>Structured Data update</b> before others and some best resources on monetization in a single email? - Free just for users of Structured Data!</p>",a+='<style type="text/css">',a+=".wp-pointer-buttons{ padding:0; overflow: hidden; }",a+=".wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #afw_mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }",a+="</style>",a+='<div id="afw_mc_embed_signup">',a+='<form action="//app.mailerlite.com/webforms/submit/z7t4b8" data-id="258182" data-code="z7t4b8" method="POST" target="_blank">',a+='<div id="afw_mc_embed_signup_scroll">',a+='<div class="afw-mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">',a+='<input type="text" name="fields[name]" class="form-control" placeholder="Name" hidden value="'+saswp_localize_data.current_user_name+'" style="display:none">',a+='<input type="text" value="'+saswp_localize_data.current_user_email+'" name="fields[email]" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">',a+='<input type="text" name="fields[company]" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="'+saswp_localize_data.get_home_url+'">',a+='<input type="hidden" name="ml-submit" value="1" />',a+="</div>",a+='<div id="mce-responses">',a+='<div class="response" id="mce-error-response" style="display:none"></div>',a+='<div class="response" id="mce-success-response" style="display:none"></div>',a+="</div>",a+='<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_a631df13442f19caede5a5baf_c9a71edce6" tabindex="-1" value=""></div>',a+='<input type="submit" value="Subscribe" name="subscribe" id="pointer-close" class="button mc-newsletter-sent" style=" background: #0085ba; border-color: #006799; padding: 0px 16px; text-shadow: 0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799; height: 30px; margin-top: 1px; color: #fff; box-shadow: 0 1px 0 #006799;">',a+="</div>",a+="</form>";var t={content:a+="</div>",position:{edge:"top",align:"left"}};e=function(){s(saswp_localize_data.displayID).pointer(t).pointer("open"),saswp_localize_data.button2&&(jQuery("#pointer-close").after('<a id="pointer-primary" class="button-primary">'+saswp_localize_data.button2+"</a>"),jQuery("#pointer-primary").click(function(){saswp_localize_data.function_name}),jQuery("#pointer-close").click(function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})}))},(t=s.extend(t,{buttons:function(s,e){return button=jQuery('<a id="pointer-close" class="button-secondary">'+saswp_localize_data.button1+"</a>"),button_2=jQuery("#pointer-close.button"),button.bind("click.pointer",function(){e.element.pointer("close")}),button_2.on("click",function(){e.element.pointer("close")}),button},close:function(){s.post(saswp_localize_data.ajax_url,{pointer:"saswp_subscribe_pointer",action:"dismiss-wp-pointer"})},show:function(s,e){e.pointer.css({left:"170px",top:"160px"})}})).position&&t.position.defer_loading?s(window).bind("load.wp-pointers",e):e()}s(".saswp-tabs a").click(function(e){var a=s(this).attr("href"),t=getParameterByName("tab",a);return t||(t="general"),s(this).siblings().removeClass("nav-tab-active"),s(this).addClass("nav-tab-active"),s(".form-wrap").find(".saswp-"+t).siblings().hide(),s(".form-wrap .saswp-"+t).show(),window.history.pushState("","",a),!1}),s(".saswp-schame-type-select").change(function(e){e.preventDefault(),s(".saswp-custom-fields-table").html("");var a=s(this).val();s(".saswp-option-table-class tr").each(function(e,a){e>0&&s(this).hide()}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-option-table-class tr").eq(1).show(),s(".saswp-business-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".select-post-type").val("show_globally").trigger("change")),"Service"==a&&(s(".saswp-service-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-item-reivewed-list").change()),saswp_enable_rating_review(),s(".saswp-manual-modification").html(""),s(".saswp-static-container .spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_manual_fields_on_ajax",schema_type:a,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){s(".saswp-static-container .spinner").removeClass("is-active"),s(".saswp-manual-modification").append(e),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_item_reviewed_call()}),"HowTo"==a||"local_business"==a||"FAQ"==a?s(".saswp-enable-modify-schema").show():(s(".saswp-enable-modify-schema-output").val("automatic"),s(".saswp-enable-modify-schema-output").change(),s(".saswp-enable-modify-schema").hide())}),s("#saswp_business_type").change(function(){var e=s(this).val(),a=s(".saswp-schame-type-select").val();s(".saswp-option-table-class tr").each(function(e,a){e>1&&(s(this).hide(),s(this).find(".saswp-local-sub-type-2").attr("disabled",!0))}),"TechArticle"==a||"Article"==a||"Blogposting"==a||"NewsArticle"==a||"WebPage"==a?s(".saswp-enable-speakable").parent().parent().show():s(".saswp-enable-speakable").parent().parent().hide(),"Book"==a||"Course"==a||"HowTo"==a||"MusicPlaylist"==a||"MusicAlbum"==a||"Recipe"==a||"TVSeries"==a||"SoftwareApplication"==a||"Event"==a||"VideoGame"==a||"Service"==a||"AudioObject"==a||"VideoObject"==a||"local_business"==a||"Product"==a?s(".saswp-enable-append-reviews").parent().parent().show():s(".saswp-enable-append-reviews").parent().parent().hide(),"local_business"==a&&(s(".saswp-"+e+"-tr").show(),s(".saswp-business-text-field-tr").show(),s(".saswp-"+e+"-tr").find("select").attr("disabled",!1)),"Review"==a&&(s(".saswp-review-text-field-tr").show(),s(".saswp-review-text-field-tr").find("select").attr("disabled",!1)),"Event"==a&&(s(".saswp-event-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)),saswp_enable_rating_review()}).change(),s(".saswp-checkbox").change(function(){var e=s(this).attr("id"),a=s(this);switch(e){case"saswp-the-seo-framework-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-seo-framework").val(1):s("#saswp-the-seo-framework").val(0);break;case"saswp-seo-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-seo-press").val(1):s("#saswp-seo-press").val(0);break;case"saswp-aiosp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-aiosp").val(1):s("#saswp-aiosp").val(0);break;case"saswp-smart-crawl-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-smart-crawl").val(1):s("#saswp-smart-crawl").val(0);break;case"saswp-squirrly-seo-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-squirrly-seo").val(1):s("#saswp-squirrly-seo").val(0);break;case"saswp-wp-recipe-maker-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-recipe-maker").val(1):s("#saswp-wp-recipe-maker").val(0);break;case"saswp-wp-ultimate-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-ultimate-recipe").val(1):s("#saswp-wp-ultimate-recipe").val(0);break;case"saswp-zip-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-zip-recipes").val(1):s("#saswp-zip-recipes").val(0);break;case"saswp-mediavine-create-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-mediavine-create").val(1):s("#saswp-mediavine-create").val(0);break;case"saswp-ht-recipes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ht-recipes").val(1):s("#saswp-ht-recipes").val(0);break;case"saswp-wpsso-core-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpsso-core").val(1):s("#saswp-wpsso-core").val(0);break;case"saswp-for-wordpress-checkbox":s(this).is(":checked")?s("#saswp-for-wordpress").val(1):s("#saswp-for-wordpress").val(0);break;case"saswp-facebook-enable-checkbox":s(this).is(":checked")?(s("#saswp-facebook-enable").val(1),s("#sd_facebook").show()):(s("#saswp-facebook-enable").val(0),s("#sd_facebook").hide());break;case"saswp-twitter-enable-checkbox":s(this).is(":checked")?(s("#saswp-twitter-enable").val(1),s("#sd_twitter").show()):(s("#saswp-twitter-enable").val(0),s("#sd_twitter").hide());break;case"saswp-google-plus-enable-checkbox":s(this).is(":checked")?(s("#saswp-google-plus-enable").val(1),s("#sd_google_plus").show()):(s("#saswp-google-plus-enable").val(0),s("#sd_google_plus").hide());break;case"saswp-instagram-enable-checkbox":s(this).is(":checked")?(s("#saswp-instagram-enable").val(1),s("#sd_instagram").show()):(s("#saswp-instagram-enable").val(0),s("#sd_instagram").hide());break;case"saswp-youtube-enable-checkbox":s(this).is(":checked")?(s("#sd_youtube").show(),s("#saswp-youtube-enable").val(1)):(s("#saswp-youtube-enable").val(0),s("#sd_youtube").hide());break;case"saswp-linkedin-enable-checkbox":s(this).is(":checked")?(s("#saswp-linkedin-enable").val(1),s("#sd_linkedin").show()):(s("#saswp-linkedin-enable").val(0),s("#sd_linkedin").hide());break;case"saswp-pinterest-enable-checkbox":s(this).is(":checked")?(s("#saswp-pinterest-enable").val(1),s("#sd_pinterest").show()):(s("#saswp-pinterest-enable").val(0),s("#sd_pinterest").hide());break;case"saswp-soundcloud-enable-checkbox":s(this).is(":checked")?(s("#saswp-soundcloud-enable").val(1),s("#sd_soundcloud").show()):(s("#saswp-soundcloud-enable").val(0),s("#sd_soundcloud").hide());break;case"saswp-tumblr-enable-checkbox":s(this).is(":checked")?(s("#saswp-tumblr-enable").val(1),s("#sd_tumblr").show()):(s("#saswp-tumblr-enable").val(0),s("#sd_tumblr").hide());break;case"saswp-yelp-enable-checkbox":s(this).is(":checked")?(s("#saswp-yelp-enable").val(1),s("#sd_yelp").show()):(s("#saswp-yelp-enable").val(0),s("#sd_yelp").hide());break;case"saswp-for-amp-checkbox":s(this).is(":checked")?s("#saswp-for-amp").val(1):s("#saswp-for-amp").val(0);break;case"saswp_kb_contact_1_checkbox":s(this).is(":checked")?(s("#saswp_kb_contact_1").val(1),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").removeClass("saswp-display-none")):(s("#saswp_kb_contact_1").val(0),s("#saswp_kb_telephone, #saswp_contact_type").parent().parent("li").addClass("saswp-display-none"));break;case"saswp-logo-dimensions-check":s(this).is(":checked")?(s("#saswp-logo-dimensions").val(1),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").show()):(s("#saswp-logo-dimensions").val(0),s("#saswp-logo-width, #saswp-logo-height").parent().parent("li").hide());break;case"saswp_archive_schema_checkbox":s(this).is(":checked")?(s("#saswp_archive_schema").val(1),s(".saswp_archive_schema_type_class").parent().parent().show()):(s("#saswp_archive_schema").val(0),s(".saswp_archive_schema_type_class").parent().parent().hide());break;case"saswp_website_schema_checkbox":s(this).is(":checked")?(s("#saswp_website_schema").val(1),s("#saswp_search_box_schema").parent().parent().show()):(s("#saswp_website_schema").val(0),s("#saswp_search_box_schema").parent().parent().hide());break;case"saswp_search_box_schema_checkbox":s(this).is(":checked")?s("#saswp_search_box_schema").val(1):s("#saswp_search_box_schema").val(0);break;case"saswp_breadcrumb_schema_checkbox":s(this).is(":checked")?s("#saswp_breadcrumb_schema").val(1):s("#saswp_breadcrumb_schema").val(0);break;case"saswp_comments_schema_checkbox":s(this).is(":checked")?s("#saswp_comments_schema").val(1):s("#saswp_comments_schema").val(0);break;case"saswp-compativility-checkbox":s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-review-module-checkbox":s(this).is(":checked")?s("#saswp-review-module").val(1):s("#saswp-review-module").val(0);break;case"saswp-kk-star-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-kk-star-raring").val(1):s("#saswp-kk-star-raring").val(0);break;case"saswp-woocommerce-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce").val(1):s("#saswp-woocommerce").val(0);break;case"saswp-default-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp_default_review").val(1):s("#saswp_default_review").val(0);break;case"saswp-extra-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-extra").val(1):s("#saswp-extra").val(0);break;case"saswp-dw-question-answer-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-dw-question-answer").val(1):s("#saswp-dw-question-answer").val(0);break;case"saswp-wp-job-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-job-manager").val(1):s("#saswp-wp-job-manager").val(0);break;case"saswp-yoast-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-yoast").val(1):s("#saswp-yoast").val(0);break;case"saswp-rankmath-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-rankmath").val(1):s("#saswp-rankmath").val(0);break;case"saswp-tagyeem-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tagyeem").val(1):s("#saswp-tagyeem").val(0);break;case"saswp-the-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-the-events-calendar").val(1):s("#saswp-the-events-calendar").val(0);break;case"saswp-homeland-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-homeland").val(1):s("#saswp-homeland").val(0);break;case"saswp-realhomes-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-realhomes").val(1):s("#saswp-realhomes").val(0);break;case"saswp-learn-press-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-press").val(1):s("#saswp-learn-press").val(0);break;case"saswp-learn-dash-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-learn-dash").val(1):s("#saswp-learn-dash").val(0);break;case"saswp-lifter-lms-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-lifter-lms").val(1):s("#saswp-lifter-lms").val(0);break;case"saswp-wp-event-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-manager").val(1):s("#saswp-wp-event-manager").val(0);break;case"saswp-events-manager-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-events-manager").val(1):s("#saswp-events-manager").val(0);break;case"saswp-event-calendar-wd-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-calendar-wd").val(1):s("#saswp-event-calendar-wd").val(0);break;case"saswp-event-organiser-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-event-organiser").val(1):s("#saswp-event-organiser").val(0);break;case"saswp-modern-events-calendar-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-modern-events-calendar").val(1):s("#saswp-modern-events-calendar").val(0);break;case"saswp-woocommerce-booking-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking").val(1),s("#saswp-woocommerce-booking-main").val(1)):(s("#saswp-woocommerce-booking").val(0),s("#saswp-woocommerce-booking-main").val(0));break;case"saswp-woocommerce-booking-main-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-woocommerce-booking-main").val(1),s("#saswp-woocommerce-booking").val(1)):(s("#saswp-woocommerce-booking-main").val(0),s("#saswp-woocommerce-booking").val(0));break;case"saswp-woocommerce-membership-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-woocommerce-membership").val(1):s("#saswp-woocommerce-membership").val(0);break;case"saswp-defragment-checkbox":s(this).is(":checked")?s("#saswp-defragment").val(1):s("#saswp-defragment").val(0);break;case"saswp-cooked-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-cooked").val(1):s("#saswp-cooked").val(0);break;case"saswp-flexmlx-compativility-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-flexmlx-compativility").val(1):s("#saswp-flexmlx-compativility").val(0);break;case"saswp-shopper-approved-review-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?(s("#saswp-shopper-approved-review").val(1),s(".saswp-s-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-shopper-approved-review").val(0),s(".saswp-s-reviews-settings-table").parent().parent().parent().hide());break;case"saswp-google-review-checkbox":s(this).is(":checked")?(s("#saswp-google-review").val(1),s("#saswp-google-rv-free-checkbox").length?(s("#saswp-google-review-free").parent().parent().show(),s("#saswp-google-rv-free-checkbox").is(":checked")?s("#saswp_google_place_api_key").parent().parent().show():s("#saswp_google_place_api_key").parent().parent().hide()):s("#saswp_google_place_api_key").parent().parent().show(),s(".saswp-g-reviews-settings-table").parent().parent().parent().show()):(s("#saswp-google-review").val(0),s("#saswp_google_place_api_key").parent().parent().hide(),s(".saswp-g-reviews-settings-table").parent().parent().parent().hide(),s("#saswp-google-rv-free-checkbox").length&&s("#saswp-google-review-free").parent().parent().hide());break;case"saswp-google-rv-free-checkbox":s("#saswp-google-review-checkbox").is(":checked")&&s(this).is(":checked")?(s("#saswp-google-review-free").val(1),s("#saswp_google_place_api_key").parent().parent().show()):(s("#saswp-google-review-free").val(0),s("#saswp_google_place_api_key").parent().parent().hide());break;case"saswp-markup-footer-checkbox":s(this).is(":checked")?s("#saswp-markup-footer").val(1):s("#saswp-markup-footer").val(0);break;case"saswp-pretty-print-checkbox":s(this).is(":checked")?s("#saswp-pretty-print").val(1):s("#saswp-pretty-print").val(0);break;case"saswp-wppostratings-raring-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wppostratings-raring").val(1):s("#saswp-wppostratings-raring").val(0);break;case"saswp-bbpress-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-bbpress").val(1):s("#saswp-bbpress").val(0);break;case"saswp-microdata-cleanup-checkbox":s(this).is(":checked")?s("#saswp-microdata-cleanup").val(1):s("#saswp-microdata-cleanup").val(0);break;case"saswp-other-images-checkbox":s(this).is(":checked")?s("#saswp-other-images").val(1):s("#saswp-other-images").val(0);break;case"saswp-easy-testimonials-checkbox":s(this).is(":checked")?s("#saswp-easy-testimonials").val(1):s("#saswp-easy-testimonials").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0)}}).change(),s("#saswp_kb_type").change(function(){var e=s(this).val();s(".saswp_org_fields, .saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().addClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide"),"Organization"==e&&(s(".saswp_org_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_person_fields").parent().parent().addClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().addClass("saswp_hide")),"Person"==e&&(s(".saswp_org_fields").parent().parent().addClass("saswp_hide"),s(".saswp_person_fields").parent().parent().removeClass("saswp_hide"),s(".saswp_kg_logo").parent().parent().parent().removeClass("saswp_hide"),s("#sd-person-image").parent().parent().parent().removeClass("saswp_hide"))}).change(),s(document).on("click","input[data-id=media]",function(e){e.preventDefault();var a=s(this),t=a.attr("id").replace("_button",""),i=wp.media({title:"Application Icon",button:{text:"Select Icon"},multiple:!1,library:{type:"image"}}).on("select",function(){var e=i.state().get("selection").first().toJSON();s("#"+t).val(e.url),s("input[data-id='"+t+"_id']").val(e.id),s("input[data-id='"+t+"_height']").val(e.height),s("input[data-id='"+t+"_width']").val(e.width),s("input[data-id='"+t+"_thumbnail']").val(e.url),"sd_default_image_button"===a.attr("id")&&(s("#sd_default_image_width").val(e.width),s("#sd_default_image_height").val(e.height));var o="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(o='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+e.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+o)}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");console.log(a),s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("change",".saswp-schema-type-toggle",function(e){var a=s(this).attr("data-schema-id"),t=s(this).attr("data-post-id");if(s(this).is(":checked"))var i=1;else i=0;s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:i,schema_id:a,post_id:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-reset-data",function(e){e.preventDefault(),1==confirm("Are you sure?")&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_reset_all_settings",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){setTimeout(function(){location.reload()},1e3)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp_license_activation",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("license-status"),i=s(this).attr("add-on"),o=s("#"+i+"_addon_license_key").val();t&&i&&o?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:o,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){s("#"+i+"_addon_license_key_status").val(e.status),"active"==e.status?(s(".saswp-"+i+"-dashicons").addClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").css("color","green"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","inactive"),s(".saswp_license_activation[add-on='"+i+"']").text("Deactivate"),s(".saswp_license_status_msg[add-on='"+i+"']").text("Activated"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","green"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)):(s(".saswp-"+i+"-dashicons").addClass("dashicons-no-alt"),s(".saswp-"+i+"-dashicons").removeClass("dashicons-yes"),s(".saswp-"+i+"-dashicons").css("color","red"),s(".saswp_license_activation[add-on='"+i+"']").attr("license-status","active"),s(".saswp_license_activation[add-on='"+i+"']").text("Activate"),s(".saswp_license_status_msg[add-on='"+i+"']").css("color","red"),s(".saswp_license_status_msg[add-on='"+i+"']").text(e.message)),a.removeClass("updating-message")},error:function(s){console.log(s)}}):(alert("Please enter value license key"),a.removeClass("updating-message"))}),s(".saswp-send-query").on("click",function(e){e.preventDefault();var a=s("#saswp_query_message").val();""!=s.trim(a)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",message:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(e){"t"==e.status?(s(".saswp-query-success").show(),s(".saswp-query-error").hide()):(console.log("dd"),s(".saswp-query-success").hide(),s(".saswp-query-error").show())},error:function(s){console.log(s)}}):alert("Please enter the message")}),s(".saswp-import-plugins").on("click",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id");s.get(ajaxurl,{action:"saswp_import_plugin_data",plugin_name:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status?(s(a).parent().find(".saswp-imported-message").text(e.message),s(a).parent().find(".saswp-imported-message").removeClass("saswp-error"),setTimeout(function(){location.reload()},2e3)):(s(a).parent().find(".saswp-imported-message").addClass("saswp-error"),s(a).parent().find(".saswp-imported-message").text(e.message)),a.removeClass("updating-message")},"json")}),s(".saswp-feedback-no-thanks").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_no_thanks",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(".saswp-feedback-remindme").on("click",function(e){e.preventDefault(),s.get(ajaxurl,{action:"saswp_feeback_remindme",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){"t"==e.status&&s(".saswp-feedback-notice").hide()},"json")}),s(document).on("change",".saswp-local-business-type-select",function(e){e.preventDefault();var a=s(this),t=s(this).val();s.get(ajaxurl,{action:"saswp_get_sub_business_ajax",business_type:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){s(".saswp-local-business-name-select").parents("tr").remove();var t=a.parents(".saswp-post-specific-wrapper").attr("data-id"),i='<tr><th><label for="saswp_business_name_'+t+'">Sub Business Type</label></th>';i+='<td><select class="saswp-local-business-name-select" id="saswp_business_name_'+t+'" name="saswp_business_name_'+t+'">',s.each(e.result,function(s,e){i+='<option value="'+s+'">'+e+"</option>"}),i+="</select></td>",i+="</tr>",a.parents(".form-table tr:first").after(i)}else s(".saswp-local-business-name-select").parents("tr").remove()},"json")}),saswp_item_reviewed_call(),s(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),s(document).on("click",".saswp-add-custom-schema",function(e){e.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(e){e.preventDefault(),s("#saswp_custom_schema_field").val(""),s(".saswp-add-custom-schema-field").addClass("saswp_hide"),s(".saswp-add-custom-schema").show()}),s(".saswp-modify_schema_post_enable").on("click",function(e){var a=s(this);a.addClass("updating-message"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_modify_schema_post_enable",post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){a.remove(),s(".saswp-add-custom-schema-div").remove(),s("#post_specific .inside").append(e),a.removeClass("updating-message"),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_enable_rating_review(),saswp_item_reviewed_call()})}),saswp_schema_datepicker(),saswp_schema_timepicker(),saswp_reviews_datepicker(),s(document).on("click",".saswp-add-more-item",function(e){e.preventDefault();var a=s(".saswp-review-item-list-table tr").length;console.log(a);s(".saswp-review-item-list-table").append('<tr class="saswp-review-item-tr"><td>Review Item Feature</td><td><input type="text" name="saswp-review-item-feature[]"></td><td>Rating</td><td><input step="0.1" min="0" max="5" type="number" name="saswp-review-item-star-rating[]"></td><td><a type="button" class="saswp-remove-review-item button">x</a></td></tr>')}),s(document).on("click",".saswp-remove-review-item",function(e){e.preventDefault(),s(this).parent().parent("tr").remove()}),s(document).on("focusout",".saswp-review-item-tr input[type=number]",function(e){e.preventDefault();var a=0,t=s(".saswp-review-item-tr input[type=number]").length;s(".saswp-review-item-tr input[type=number]").each(function(e,t){""==s(t).val()?a+=parseFloat(0):a+=parseFloat(s(t).val())});var i=a/t;s("#saswp-review-item-over-all").val(i)}),s("#saswp-review-location").change(function(){var e=s(this).val();s(".saswp-review-shortcode").addClass("saswp_hide"),3==e&&s(".saswp-review-shortcode").removeClass("saswp_hide")}).change(),s("#saswp-review-item-enable").change(function(){s(this).is(":checked")?s(".saswp-review-fields").show():s(".saswp-review-fields").hide()}).change(),s(document).on("click",".saswp-restore-post-schema",function(e){e.preventDefault();var a=s(this);if(a.addClass("updating-message"),s(".saswp-post-specific-schema-ids").val())var t=JSON.parse(s(".saswp-post-specific-schema-ids").val());s.post(ajaxurl,{action:"saswp_restore_schema",schema_ids:t,post_id:saswp_localize_data.post_id,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){"t"==s.status?setTimeout(function(){location.reload()},1e3):(alert(s.msg),setTimeout(function(){location.reload()},1e3)),a.removeClass("updating-message")},"json")}),s(document).on("click","div.saswp-tab ul.saswp-tab-nav a",function(e){e.preventDefault();var a=s(this).attr("data-id");s(".saswp-post-specific-wrapper").hide(),s("#"+a).show(),s("div.saswp-tab ul.saswp-tab-nav a").removeClass("selected"),s("div.saswp-tab ul.saswp-tab-nav li").removeClass("selected"),s(this).addClass("selected"),s(this).parent().addClass("selected"),saswp_enable_rating_review()}),s("#saswp-global-tabs a:first").addClass("saswp-global-selected"),s(".saswp-global-container").hide(),"#saswp-default-container"==window.location.hash?s(".saswp-global-container:eq(2)").show():s(".saswp-global-container:first").show(),s("#saswp-global-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-global-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-global-container").hide(),s("#"+e).show())}),s("#saswp-tools-tabs a:first").addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s(".saswp-tools-container:first").show(),s("#saswp-tools-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-tools-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-tools-container").hide(),s("#"+e).show())}),s("#saswp-review-tabs a:first").addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s(".saswp-review-container:first").show(),s("#saswp-review-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-review-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-review-container").hide(),s("#"+e).show())}),s("#saswp-compatibility-tabs a:first").addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s(".saswp-compatibility-container:first").show(),s("#saswp-compatibility-tabs a").click(function(){var e=s(this).attr("data-id");s(this).hasClass("saswp-global-selected")||(s("#saswp-compatibility-tabs a").removeClass("saswp-global-selected"),s(this).addClass("saswp-global-selected"),s(".saswp-compatibility-container").hide(),s("#"+e).show())}),s('a[href="'+saswp_localize_data.new_url_selector+'"]').attr("href",saswp_localize_data.new_url_href),s(".saswp-enable-modify-schema-output").on("change",function(){s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide"),"manual"==s(this).val()&&(s(".saswp-static-container").removeClass("saswp_hide"),s(".saswp-dynamic-container").addClass("saswp_hide")),"automatic"==s(this).val()&&(s(".saswp-static-container").addClass("saswp_hide"),s(".saswp-dynamic-container").removeClass("saswp_hide"))}),s(document).on("change",".saswp-custom-fields-name",function(){var e="text",a=s(this).parent().parent("tr"),t=s(this).val();-1==t.indexOf("_image")&&-1==t.indexOf("_logo")||(e="image");var i=s(this).parent().parent("tr").find("td:eq(1)");saswp_get_meta_list(null,e,null,i,t,a)}),s(document).on("click",".saswp-skip-button",function(e){e.preventDefault(),s(this).parent().parent().hide(),s.post(ajaxurl,{action:"saswp_skip_wizard",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){},"json")}),s(document).on("click",".saswp_add_schema_fields_on_fly",function(e){e.preventDefault();var a=s(this);a.addClass("updating-message");var t=s(this).attr("data-id"),i=s(this).attr("fields_type"),o=s(this).attr("div_type"),p=s("saswp_specific_"+t+" , .saswp-"+o+"-table-div").length,n=s("saswp_specific_"+t+" , .saswp-"+o+"-table-div:nth-child("+p+")").attr("data-id");(n=++n)||(n=0),saswp_get_post_specific_schema_fields(a,n,i,o,t,i+"_")}),s(document).on("click",".saswp-table-close",function(){s(this).parent().remove()}),s(document).on("click",".saswp-rmv-modify_row",function(e){e.preventDefault(),s(this).parent().parent().remove()}),s(document).on("change",".saswp-custom-meta-list",function(){var e=s(this),a=s("select#schema_type option:selected").val(),t=s(this).val(),i=s(this).parent().parent("tr").find(".saswp-custom-fields-name").val(),o="",p=a.toLowerCase()+"_"+i,n="saswp_fixed_image["+i+"]";"manual_text"==t?(o+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',o+='<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(o),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(o+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(o),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,o+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(o),saswpCustomSelect2())},"json"):"custom_field"==t?(o+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',o+="</select></td>",o+='<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(o),saswpCustomSelect2()):"fixed_image"==t?(o+="<td>",o+="<fieldset>",o+='<input data-id="media" style="width: 30%;" class="button" id="'+p+'_button" name="'+p+'_button" type="button" value="Upload" />',o+='<input type="hidden" data-id="'+p+'_height" class="upload-height" name="'+n+'[height]" id="'+p+'_height" value="">',o+='<input type="hidden" data-id="'+p+'_width" class="upload-width" name="'+n+'[width]" id="'+p+'_width" value="">',o+='<input type="hidden" data-id="'+p+'_thumbnail" class="upload-thumbnail" name="'+n+'[thumbnail]" id="'+p+'_thumbnail" value="">',o+='<div class="saswp_image_div_'+p+'">',o+="</div>",o+="</fieldset>",o+="</td>",o+='<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(o),saswpCustomSelect2()):(o+="<td></td>",o+='<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(o),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var e=s(this),a=s("select#schema_type option:selected").val();saswp_item_reviewed_ajax(a,e,"manual")}),s(document).on("click",".saswp-add-custom-fields",function(){var e=s(this);e.addClass("updating-message");var a=s("select#schema_type option:selected").val(),t="",i=null;"Review"==a&&(t=s("select.saswp-item-reivewed-list option:selected").val(),i="saswp_review_name");var o=s("#post_ID").val();""!=a&&(saswp_meta_list_fields[a]?saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null):s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_get_schema_type_fields",post_id:o,schema_type:a,schema_subtype:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){saswp_meta_list_fields[a]=s,saswp_get_meta_list(e,"text",saswp_meta_list_fields[a],null,i,null)},error:function(s){console.log(s)}}))}),saswpCustomSelect2(),saswp_enable_rating_review(),s('a[href="'+saswp_localize_data.collection_post_add_url+'"]').attr("href",saswp_localize_data.collection_post_add_new_url),s(document).on("click",".saswp_coonect_google_place",function(){var e=s("#saswp_google_place_id").val(),a=s("#saswp_language_list").val(),t=s("#saswp_googel_api").val();""!=e&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_connect_google_place",place_id:e,language:a,google_api:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){console.log(s.status)},error:function(s){console.log(s)}})}),s(document).on("click",".saswp-add-social-links",function(){s(".saswp-social-links-table").append('<tr><td><input type="text" placeholder="https://www.facebook.com/profile" name="sd_data[saswp_social_links][]" value=""></td><td><a class="button button-default saswp-rmv-modify_row">X</a></td></tr>')}),"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>"),"saswp_reviews"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.collections_page_url+"' id='' class='page-title-action'>Collections</a>"),"undefined"!=typeof saswp_reviews_data&&s(".saswp-rating-div").rateYo({rating:saswp_reviews_data.rating_val,halfStar:!0,readOnly:saswp_reviews_data.readonly,onSet:function(e,a){s(this).next().val(e),console.log(e)}}),s("#sd-person-phone-number, #saswp_kb_telephone").focusout(function(){var e=s(this);e.parent().find(".saswp-phone-validation").remove();var a=s(this).val();/^\+([0-9]{1,3})\)?[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})[-. ]?([0-9]{2,4})$/.test(a)?e.parent().find(".saswp-phone-validation").remove():e.after('<span style="color:red;" class="saswp-phone-validation">Invalid Phone Number</span>')}),saswpCollectionSlider(),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){var e=s(".saswp-collection-desing").val();s(".saswp-coll-options").addClass("saswp_hide"),s(".saswp-collection-lp").css("height","auto"),"grid"==e&&s(".saswp-grid-options").removeClass("saswp_hide"),"gallery"==e&&s(".saswp-slider-options").removeClass("saswp_hide"),"fomo"==e&&(s(".saswp-fomo-options").removeClass("saswp_hide"),s(".saswp-collection-lp").css("height","31px")),"popup"==e&&s(".saswp-collection-lp").css("height","31px"),saswp_on_collection_design_change()}).change(),s(".saswp-add-to-collection").on("click",function(e){e.preventDefault();var a=s(this),t=s("#saswp-plaftorm-list").val(),i=s("#saswp-review-count").val();t&&i>0?(a.addClass("updating-message"),saswp_get_collection_data(i,t,a)):alert("Enter Count")});var i,o,p=s("#saswp_collection_id").val();p&&(s(".spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_collection_platforms",collection_id:p,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if(e.status){var a=e.message;s.each(a,function(s,e){saswp_get_collection_data(e,s,null)})}s(".spinner").removeClass("is-active")},"json")),(i=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",i.innerHTML="Copied!",document.body.appendChild(i);var n=document.getElementById("motivatebox");n&&n.addEventListener("mouseup",function(s){var e=(s=s||event).target||s.srcElement;"motivate"==e.className&&(!function(s){var e=document.createRange();e.selectNodeContents(s);var a=window.getSelection();a.removeAllRanges(),a.addRange(e)}(e),function(){var s;try{s=document.execCommand("copy")}catch(e){s=!1}return s}()&&function(s){var e=s||event;clearTimeout(o),i.style.left=e.pageX-10+"px",i.style.top=e.pageY+15+"px",i.style.opacity=1,o=setTimeout(function(){i.style.opacity=0},500)}(s))},!1)});
admin_section/js/structure_admin.js CHANGED
@@ -30,9 +30,7 @@ jQuery(document).ready(function($){
30
 
31
  $('#saswp-dayofweek-opens-time').timepicker({ 'timeFormat': 'H:i:s'});
32
  $('#saswp-dayofweek-closes-time').timepicker({ 'timeFormat': 'H:i:s'});
33
-
34
-
35
-
36
  $(".saswp-placement-or-group").on("click", function(e){
37
  e.preventDefault();
38
  var group_index ='';
30
 
31
  $('#saswp-dayofweek-opens-time').timepicker({ 'timeFormat': 'H:i:s'});
32
  $('#saswp-dayofweek-closes-time').timepicker({ 'timeFormat': 'H:i:s'});
33
+
 
 
34
  $(".saswp-placement-or-group").on("click", function(e){
35
  e.preventDefault();
36
  var group_index ='';
admin_section/plugin-installer/install.php CHANGED
@@ -382,7 +382,7 @@
382
 
383
  $sd_data = array_merge($pre_sd_data,$sd_data);
384
  }
385
- update_option('sd_data',$sd_data);
386
 
387
  }
388
 
@@ -435,7 +435,7 @@
435
  wp_send_json(
436
  array(
437
  'done' => 1,
438
- 'message' => "Stored Successfully",
439
  )
440
  );
441
  }
@@ -697,7 +697,7 @@ function saswp_general_setting_fields_callback(){
697
  $about_page = '<li class="saswp_fields">
698
  <label>'.esc_html__('About', 'schema-and-structured-data-for-wp').'</label>
699
  <select name="sd_data[sd_about_page]" id="sd_about_page-select">
700
- <option value="">Select an item</option>
701
  '.$about_page.'
702
  </select>
703
  </li>';
@@ -708,7 +708,7 @@ function saswp_general_setting_fields_callback(){
708
  $contact_page = '<li class="saswp_fields">
709
  <label>'.esc_html__('Contact', 'schema-and-structured-data-for-wp').'</label>
710
  <select name="sd_data[sd_contact_page]" id="sd_contact_page-select">
711
- <option value="">Select an item</option>
712
  '.$contact_page.'
713
  </select>
714
  </li>';
382
 
383
  $sd_data = array_merge($pre_sd_data,$sd_data);
384
  }
385
+ update_option('sd_data',$sd_data);
386
 
387
  }
388
 
435
  wp_send_json(
436
  array(
437
  'done' => 1,
438
+ 'message' => esc_html__( 'Stored Successfully', 'schema-and-structured-data-for-wp' ),
439
  )
440
  );
441
  }
697
  $about_page = '<li class="saswp_fields">
698
  <label>'.esc_html__('About', 'schema-and-structured-data-for-wp').'</label>
699
  <select name="sd_data[sd_about_page]" id="sd_about_page-select">
700
+ <option value="">'.esc_html__( 'Select an item', 'schema-and-structured-data-for-wp' ).'</option>
701
  '.$about_page.'
702
  </select>
703
  </li>';
708
  $contact_page = '<li class="saswp_fields">
709
  <label>'.esc_html__('Contact', 'schema-and-structured-data-for-wp').'</label>
710
  <select name="sd_data[sd_contact_page]" id="sd_contact_page-select">
711
+ <option value="">'.esc_html__( 'Select an item', 'schema-and-structured-data-for-wp' ).'</option>
712
  '.$contact_page.'
713
  </select>
714
  </li>';
admin_section/settings.php CHANGED
@@ -1036,8 +1036,28 @@ function saswp_general_page_callback(){
1036
  'class' => 'regular-text',
1037
  'type' => 'text',
1038
  'note' => esc_html__('According to google validation tool, Image size must be greater than or equal to 1200*728','schema-and-structured-data-for-wp')
1039
- )
 
1040
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1041
  echo '<div class="saswp-heading">';
1042
  echo '<h2>'.esc_html__('Default Data','schema-and-structured-data-for-wp').'</h2>';
1043
  echo '</div>';
@@ -2041,6 +2061,18 @@ function saswp_compatibility_page_callback(){
2041
  'name' => 'sd_data[saswp-easy-testimonials]',
2042
  )
2043
  );
 
 
 
 
 
 
 
 
 
 
 
 
2044
 
2045
  $flex_lmx = array(
2046
  'label' => 'FlexMLS IDX Plugin',
@@ -2139,6 +2171,7 @@ function saswp_compatibility_page_callback(){
2139
  $event_organiser,
2140
  $modern_events_calendar,
2141
  $easy_testimonials,
 
2142
  $flex_lmx
2143
 
2144
  );
@@ -2325,20 +2358,30 @@ function saswp_enqueue_style_js( $hook ) {
2325
  if(isset($current_screen->post_type)){
2326
  $post_type = $current_screen->post_type;
2327
  }
 
 
 
 
2328
 
 
 
 
 
2329
  $data = array(
2330
  'post_id' => get_the_ID(),
2331
  'ajax_url' => admin_url( 'admin-ajax.php' ),
2332
  'saswp_security_nonce' => wp_create_nonce('saswp_ajax_check_nonce'),
2333
  'new_url_selector' => esc_url(admin_url()).'post-new.php?post_type=saswp',
2334
  'new_url_href' => htmlspecialchars_decode(wp_nonce_url(admin_url('index.php?page=saswp_add_new_data_type&'), '_wpnonce')),
2335
- 'collection_post_add_url' => esc_url(admin_url()).'post-new.php?post_type=saswp-google-review',
2336
  'collection_post_add_new_url' => htmlspecialchars_decode(wp_nonce_url(admin_url('admin.php?page=collection'), '_wpnonce')),
 
2337
  'post_type' => $post_type,
2338
  'page_now' => $hook,
2339
- 'saswp_settings_url' => esc_url(admin_url('edit.php?post_type=saswp&page=structured_data_options'))
 
2340
  );
2341
-
2342
  $data = apply_filters('saswp_localize_filter',$data,'saswp_localize_data');
2343
  // Color picker CSS
2344
  // @refer https://make.wordpress.org/core/2012/11/30/new-color-picker-in-wp-3-5/
@@ -2353,6 +2396,8 @@ function saswp_enqueue_style_js( $hook ) {
2353
  wp_enqueue_script( 'jquery-ui-datepicker' );
2354
  wp_register_style( 'jquery-ui', SASWP_PLUGIN_URL. 'admin_section/css/jquery-ui.css' );
2355
  wp_enqueue_style( 'jquery-ui' );
 
 
2356
 
2357
  wp_register_script( 'saswp-main-js', SASWP_PLUGIN_URL . 'admin_section/js/'.(SASWP_ENVIRONMENT == 'production' ? 'main-script.min.js' : 'main-script.js'), array('jquery','jquery-ui-core'), SASWP_VERSION , true );
2358
 
@@ -2404,7 +2449,8 @@ function saswp_get_field_note($pname){
2404
  'zip_recipes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/zip-recipes/">Zip Recipes</a>',
2405
  'mediavine_create' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/mediavine-create/">Create by Mediavine</a>',
2406
  'ht_recipes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/culinier-food-recipe-wordpress-theme/11088564/">HT-Recipes</a>',
2407
- 'easy_testimonials' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/easy-testimonials">Easy Testimonials</a>'
 
2408
  );
2409
 
2410
  $active = saswp_compatible_active_list();
1036
  'class' => 'regular-text',
1037
  'type' => 'text',
1038
  'note' => esc_html__('According to google validation tool, Image size must be greater than or equal to 1200*728','schema-and-structured-data-for-wp')
1039
+ )
1040
+
1041
  );
1042
+
1043
+
1044
+ if(is_plugin_active('woocommerce/woocommerce.php')){
1045
+
1046
+ $meta_fields_default[] = array(
1047
+ 'label' => 'Product Default Review',
1048
+ 'id' => 'saswp-default-review-checkbox',
1049
+ 'name' => 'saswp-default-review-checkbox',
1050
+ 'type' => 'checkbox',
1051
+ 'class' => 'checkbox saswp-checkbox',
1052
+ 'note' => 'This option will add a default review to a woocommerce product if reviews are not there',
1053
+ 'hidden' => array(
1054
+ 'id' => 'saswp_default_review',
1055
+ 'name' => 'sd_data[saswp_default_review]',
1056
+ )
1057
+ );
1058
+
1059
+ }
1060
+
1061
  echo '<div class="saswp-heading">';
1062
  echo '<h2>'.esc_html__('Default Data','schema-and-structured-data-for-wp').'</h2>';
1063
  echo '</div>';
2061
  'name' => 'sd_data[saswp-easy-testimonials]',
2062
  )
2063
  );
2064
+ $bne_testimonials = array(
2065
+ 'label' => 'BNE Testimonials',
2066
+ 'id' => 'saswp-bne-testimonials-checkbox',
2067
+ 'name' => 'saswp-bne-testimonials-checkbox',
2068
+ 'type' => 'checkbox',
2069
+ 'class' => 'checkbox saswp-checkbox',
2070
+ 'note' => saswp_get_field_note('bne_testimonials'),
2071
+ 'hidden' => array(
2072
+ 'id' => 'saswp-bne-testimonials',
2073
+ 'name' => 'sd_data[saswp-bne-testimonials]',
2074
+ )
2075
+ );
2076
 
2077
  $flex_lmx = array(
2078
  'label' => 'FlexMLS IDX Plugin',
2171
  $event_organiser,
2172
  $modern_events_calendar,
2173
  $easy_testimonials,
2174
+ $bne_testimonials,
2175
  $flex_lmx
2176
 
2177
  );
2358
  if(isset($current_screen->post_type)){
2359
  $post_type = $current_screen->post_type;
2360
  }
2361
+
2362
+ $all_schema_array = array();
2363
+
2364
+ $mappings_file = SASWP_DIR_NAME . '/core/array-list/schemas.php';
2365
 
2366
+ if ( file_exists( $mappings_file ) ) {
2367
+ $all_schema_array = include $mappings_file;
2368
+ }
2369
+
2370
  $data = array(
2371
  'post_id' => get_the_ID(),
2372
  'ajax_url' => admin_url( 'admin-ajax.php' ),
2373
  'saswp_security_nonce' => wp_create_nonce('saswp_ajax_check_nonce'),
2374
  'new_url_selector' => esc_url(admin_url()).'post-new.php?post_type=saswp',
2375
  'new_url_href' => htmlspecialchars_decode(wp_nonce_url(admin_url('index.php?page=saswp_add_new_data_type&'), '_wpnonce')),
2376
+ 'collection_post_add_url' => esc_url(admin_url()).'post-new.php?post_type=saswp-collections',
2377
  'collection_post_add_new_url' => htmlspecialchars_decode(wp_nonce_url(admin_url('admin.php?page=collection'), '_wpnonce')),
2378
+ 'collections_page_url' => htmlspecialchars_decode(wp_nonce_url(admin_url('edit.php?post_type=saswp-collections'), '_wpnonce')),
2379
  'post_type' => $post_type,
2380
  'page_now' => $hook,
2381
+ 'saswp_settings_url' => esc_url(admin_url('edit.php?post_type=saswp&page=structured_data_options')),
2382
+ 'saswp_schema_types' => $all_schema_array
2383
  );
2384
+
2385
  $data = apply_filters('saswp_localize_filter',$data,'saswp_localize_data');
2386
  // Color picker CSS
2387
  // @refer https://make.wordpress.org/core/2012/11/30/new-color-picker-in-wp-3-5/
2396
  wp_enqueue_script( 'jquery-ui-datepicker' );
2397
  wp_register_style( 'jquery-ui', SASWP_PLUGIN_URL. 'admin_section/css/jquery-ui.css' );
2398
  wp_enqueue_style( 'jquery-ui' );
2399
+
2400
+ wp_enqueue_script( 'saswp-functions-list', SASWP_PLUGIN_URL . 'admin_section/js/'.(SASWP_ENVIRONMENT == 'production' ? 'functions-list.min.js' : 'functions-list.js'), false, SASWP_VERSION );
2401
 
2402
  wp_register_script( 'saswp-main-js', SASWP_PLUGIN_URL . 'admin_section/js/'.(SASWP_ENVIRONMENT == 'production' ? 'main-script.min.js' : 'main-script.js'), array('jquery','jquery-ui-core'), SASWP_VERSION , true );
2403
 
2449
  'zip_recipes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/zip-recipes/">Zip Recipes</a>',
2450
  'mediavine_create' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/mediavine-create/">Create by Mediavine</a>',
2451
  'ht_recipes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/culinier-food-recipe-wordpress-theme/11088564/">HT-Recipes</a>',
2452
+ 'easy_testimonials' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/easy-testimonials">Easy Testimonials</a>',
2453
+ 'bne_testimonials' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/bne-testimonials/">BNE Testimonials</a>'
2454
  );
2455
 
2456
  $active = saswp_compatible_active_list();
admin_section/structure_admin.php CHANGED
@@ -627,13 +627,7 @@ if(is_admin()){
627
  )
628
  );
629
  }
630
- add_action( 'add_meta_boxes', 'saswp_create_meta_box_select' );
631
- function saswp_create_meta_box_select(){
632
- // Repeater Comparison Field
633
- add_meta_box( 'saswp_amp_select', esc_html__( 'Placement','schema-and-structured-data-for-wp' ), 'saswp_select_callback', 'saswp','normal', 'high' );
634
-
635
- }
636
-
637
  function saswp_select_callback($post) {
638
 
639
  $data_group_array = esc_sql ( get_post_meta($post->ID, 'data_group_array', true) );
@@ -920,7 +914,8 @@ function saswp_custom_breadcrumbs() {
920
 
921
  global $sd_data;
922
  $variables1_titles = array();
923
- $variables2_links = array();
 
924
  // Settings
925
  $prefix = '';
926
  $home_title = '';
@@ -951,17 +946,18 @@ function saswp_custom_breadcrumbs() {
951
  // Home page
952
  $variables1_titles[] = $home_title;
953
  $variables2_links[] = get_home_url();
 
954
 
955
 
956
  if ( is_archive() && !is_tax() && !is_category() && !is_tag() && !is_author() ) {
957
-
958
- $archive_title = post_type_archive_title($prefix, false);
959
- $variables1_titles[] = $archive_title;
960
-
961
 
962
  } else if ( is_author() ) {
963
 
964
- global $author;
965
 
966
  $userdata = get_userdata( $author );
967
  $author_url = get_author_posts_url($userdata->ID);
@@ -969,6 +965,7 @@ function saswp_custom_breadcrumbs() {
969
  // author name
970
  $variables1_titles[] = $userdata->display_name;
971
  $variables2_links[] = $author_url;
 
972
 
973
  } else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {
974
 
@@ -991,12 +988,14 @@ function saswp_custom_breadcrumbs() {
991
 
992
  if(is_object($queried_obj)){
993
  $variables1_titles[] = $queried_obj->name;
994
- $variables2_links[] = get_term_link($queried_obj->term_id);
 
995
  }
996
 
997
  }else{
998
  $variables1_titles[] = $post_type_object->labels->name;
999
  $variables2_links[] = $post_type_archive;
 
1000
  }
1001
 
1002
  }
@@ -1006,7 +1005,7 @@ function saswp_custom_breadcrumbs() {
1006
  if(is_object($queried_obj)){
1007
  $variables1_titles[] = get_queried_object()->name;
1008
  $variables2_links[] = get_term_link($queried_obj->term_id);
1009
-
1010
  }
1011
 
1012
  } else if ( is_single() ) {
@@ -1025,7 +1024,8 @@ function saswp_custom_breadcrumbs() {
1025
  }
1026
 
1027
  $variables1_titles[]= $post_type_object->labels->name;
1028
- $variables2_links[] = $post_type_archive;
 
1029
  }
1030
 
1031
  // Get post category info
@@ -1041,6 +1041,7 @@ function saswp_custom_breadcrumbs() {
1041
  $cat_name = $category_name->name;
1042
  $variables1_titles[] = $cat_name;
1043
  $variables2_links[] = get_category_link( $category_value );
 
1044
 
1045
  }
1046
 
@@ -1084,11 +1085,13 @@ function saswp_custom_breadcrumbs() {
1084
 
1085
  $variables1_titles[] = $cat_name;
1086
  $variables2_links[] = $cat_link;
 
1087
 
1088
  }
1089
 
1090
  $variables1_titles[] = saswp_get_the_title();
1091
- $variables2_links[] = get_permalink();
 
1092
 
1093
  } else if ( is_category() ) {
1094
 
@@ -1104,6 +1107,7 @@ function saswp_custom_breadcrumbs() {
1104
  $cat_name = $category_name->name;
1105
  $variables1_titles[] = $cat_name;
1106
  $variables2_links[] = get_category_link( $category_value );
 
1107
 
1108
  }
1109
  }
@@ -1127,16 +1131,19 @@ function saswp_custom_breadcrumbs() {
1127
  $parents .= '<li class="separator separator-' . esc_attr($ancestor) . '"> ' . esc_html__($separator, 'schema-and-structured-data-for-wp' ) . ' </li>';
1128
  $variables1_titles[] = @get_the_title($ancestor);
1129
  $variables2_links[] = get_permalink($ancestor);
 
1130
 
1131
  }
1132
 
1133
  $variables1_titles[] = saswp_get_the_title();
1134
  $variables2_links[] = get_permalink();
 
1135
 
1136
  } else {
1137
 
1138
  $variables1_titles[] = saswp_get_the_title();
1139
  $variables2_links[] = get_permalink();
 
1140
  }
1141
 
1142
  } else if ( is_tag() ) {
@@ -1149,14 +1156,16 @@ function saswp_custom_breadcrumbs() {
1149
  if(is_object($get_term)){
1150
 
1151
  $variables1_titles[] = $get_term->name;
1152
- $variables2_links[] = get_term_link($term_id);
 
1153
 
1154
  }
1155
  // Tag name and link
1156
  }
1157
 
1158
- $sd_data['titles'] = $variables1_titles;
1159
- $sd_data['links'] = $variables2_links;
 
1160
 
1161
  }
1162
 
@@ -1505,6 +1514,9 @@ function saswp_license_status($add_on, $license_status, $license_key){
1505
  case 'no_activations_left':
1506
  $message = __( 'Your license key has reached its activation limit.' );
1507
  break;
 
 
 
1508
  default :
1509
  $message = __( 'An error occurred, please try again.' );
1510
  break;
627
  )
628
  );
629
  }
630
+
 
 
 
 
 
 
631
  function saswp_select_callback($post) {
632
 
633
  $data_group_array = esc_sql ( get_post_meta($post->ID, 'data_group_array', true) );
914
 
915
  global $sd_data;
916
  $variables1_titles = array();
917
+ $variables2_links = array();
918
+ $breadcrumb_url = '';
919
  // Settings
920
  $prefix = '';
921
  $home_title = '';
946
  // Home page
947
  $variables1_titles[] = $home_title;
948
  $variables2_links[] = get_home_url();
949
+ $breadcrumb_url = get_home_url();
950
 
951
 
952
  if ( is_archive() && !is_tax() && !is_category() && !is_tag() && !is_author() ) {
953
+
954
+ $variables1_titles[] = post_type_archive_title($prefix, false);
955
+ $variables2_links[] = get_post_type_archive_link(get_post_type());
956
+ $breadcrumb_url = get_post_type_archive_link(get_post_type());
957
 
958
  } else if ( is_author() ) {
959
 
960
+ global $author;
961
 
962
  $userdata = get_userdata( $author );
963
  $author_url = get_author_posts_url($userdata->ID);
965
  // author name
966
  $variables1_titles[] = $userdata->display_name;
967
  $variables2_links[] = $author_url;
968
+ $breadcrumb_url = $author_url;
969
 
970
  } else if ( is_archive() && is_tax() && !is_category() && !is_tag() ) {
971
 
988
 
989
  if(is_object($queried_obj)){
990
  $variables1_titles[] = $queried_obj->name;
991
+ $variables2_links[] = get_term_link($queried_obj->term_id);
992
+ $breadcrumb_url = get_term_link($queried_obj->term_id);
993
  }
994
 
995
  }else{
996
  $variables1_titles[] = $post_type_object->labels->name;
997
  $variables2_links[] = $post_type_archive;
998
+ $breadcrumb_url = $post_type_archive;
999
  }
1000
 
1001
  }
1005
  if(is_object($queried_obj)){
1006
  $variables1_titles[] = get_queried_object()->name;
1007
  $variables2_links[] = get_term_link($queried_obj->term_id);
1008
+ $breadcrumb_url = get_term_link($queried_obj->term_id);
1009
  }
1010
 
1011
  } else if ( is_single() ) {
1024
  }
1025
 
1026
  $variables1_titles[]= $post_type_object->labels->name;
1027
+ $variables2_links[] = $post_type_archive;
1028
+ $breadcrumb_url = $post_type_archive;
1029
  }
1030
 
1031
  // Get post category info
1041
  $cat_name = $category_name->name;
1042
  $variables1_titles[] = $cat_name;
1043
  $variables2_links[] = get_category_link( $category_value );
1044
+ $breadcrumb_url = get_category_link( $category_value );
1045
 
1046
  }
1047
 
1085
 
1086
  $variables1_titles[] = $cat_name;
1087
  $variables2_links[] = $cat_link;
1088
+ $breadcrumb_url = $cat_link;
1089
 
1090
  }
1091
 
1092
  $variables1_titles[] = saswp_get_the_title();
1093
+ $variables2_links[] = get_permalink();
1094
+ $breadcrumb_url = get_permalink();
1095
 
1096
  } else if ( is_category() ) {
1097
 
1107
  $cat_name = $category_name->name;
1108
  $variables1_titles[] = $cat_name;
1109
  $variables2_links[] = get_category_link( $category_value );
1110
+ $breadcrumb_url = get_category_link( $category_value );
1111
 
1112
  }
1113
  }
1131
  $parents .= '<li class="separator separator-' . esc_attr($ancestor) . '"> ' . esc_html__($separator, 'schema-and-structured-data-for-wp' ) . ' </li>';
1132
  $variables1_titles[] = @get_the_title($ancestor);
1133
  $variables2_links[] = get_permalink($ancestor);
1134
+ $breadcrumb_url = get_permalink($ancestor);
1135
 
1136
  }
1137
 
1138
  $variables1_titles[] = saswp_get_the_title();
1139
  $variables2_links[] = get_permalink();
1140
+ $breadcrumb_url = get_permalink();
1141
 
1142
  } else {
1143
 
1144
  $variables1_titles[] = saswp_get_the_title();
1145
  $variables2_links[] = get_permalink();
1146
+ $breadcrumb_url = get_permalink();
1147
  }
1148
 
1149
  } else if ( is_tag() ) {
1156
  if(is_object($get_term)){
1157
 
1158
  $variables1_titles[] = $get_term->name;
1159
+ $variables2_links[] = get_term_link($term_id);
1160
+ $breadcrumb_url = get_term_link($term_id);
1161
 
1162
  }
1163
  // Tag name and link
1164
  }
1165
 
1166
+ $sd_data['titles'] = $variables1_titles;
1167
+ $sd_data['links'] = $variables2_links;
1168
+ $sd_data['breadcrumb_url'] = $breadcrumb_url;
1169
 
1170
  }
1171
 
1514
  case 'no_activations_left':
1515
  $message = __( 'Your license key has reached its activation limit.' );
1516
  break;
1517
+ case 'license_not_activable':
1518
+ $message = __( 'Your license key may not belong to this extension.' );
1519
+ break;
1520
  default :
1521
  $message = __( 'An error occurred, please try again.' );
1522
  break;
core/array-list/compatibility-list.php CHANGED
@@ -22,6 +22,13 @@ return array(
22
  'opt_name' => 'saswp-easy-testimonials',
23
  'part_in' => 'free',
24
  ),
 
 
 
 
 
 
 
25
  'learn_press' => array(
26
  'name' => 'Learn Press',
27
  'free' => 'learnpress/learnpress.php',
22
  'opt_name' => 'saswp-easy-testimonials',
23
  'part_in' => 'free',
24
  ),
25
+ 'bne_testimonials' => array(
26
+ 'name' => 'BNE Testimonials',
27
+ 'free' => 'bne-testimonials/bne-testimonials.php',
28
+ 'pro' => 'bne-testimonials-pro/bne-testimonials-pro.php',
29
+ 'opt_name' => 'saswp-bne-testimonials',
30
+ 'part_in' => 'free',
31
+ ),
32
  'learn_press' => array(
33
  'name' => 'Learn Press',
34
  'free' => 'learnpress/learnpress.php',
core/array-list/plugins.php DELETED
@@ -1,132 +0,0 @@
1
- <?php
2
- // Exit if accessed directly.
3
- if ( ! defined( 'ABSPATH' ) ) exit;
4
-
5
- return array(
6
-
7
- array(
8
- 'key' => 'kk_star_ratings',
9
- 'name' => 'kk Star Ratings',
10
- 'path_free' => 'kk-star-ratings/index.php',
11
- 'status_key' => 'saswp-kk-star-raring',
12
- ),
13
- array(
14
- 'key' => 'wp_post_ratings',
15
- 'name' => 'WP-PostRatings',
16
- 'path_free' => 'wp-postratings/wp-postratings.php',
17
- 'status_key' => 'saswp-wppostratings-raring',
18
- ),
19
- array(
20
- 'key' => 'bb_press',
21
- 'name' => 'bbPress',
22
- 'path_free' => 'bbpress/bbpress.php',
23
- 'status_key' => 'saswp-bbpress',
24
- ),
25
- array(
26
- 'key' => 'woocommerce',
27
- 'name' => 'Woocommerce',
28
- 'path_free' => 'woocommerce/woocommerce.php',
29
- 'status_key' => 'saswp-woocommerce',
30
- ),
31
- array(
32
- 'key' => 'cooked',
33
- 'name' => 'Cooked',
34
- 'path_free' => 'cooked/cooked.php',
35
- 'path_pro' => 'cooked-pro/cooked-pro.php',
36
- 'status_key' => 'saswp-cooked',
37
- ),
38
- array(
39
- 'key' => 'the_events_calendar',
40
- 'name' => 'The Events Calendar',
41
- 'path_free' => 'the-events-calendar/the-events-calendar.php',
42
- 'status_key' => 'saswp-the-events-calendar',
43
- ),
44
- array(
45
- 'key' => 'event_organiser',
46
- 'name' => 'Event Organiser',
47
- 'path_free' => 'event-organiser/event-organiser.php',
48
- 'status_key' => 'saswp-event-organiser',
49
- ),
50
- array(
51
- 'key' => 'modern_events_calendar',
52
- 'name' => 'Modern Events Calendar Lite',
53
- 'path_free' => 'modern-events-calendar-lite/modern-events-calendar-lite.php',
54
- 'status_key' => 'saswp-modern-events-calendar',
55
- ),
56
- array(
57
- 'key' => 'wp_event_manager',
58
- 'name' => 'WP Event Manager',
59
- 'path_free' => 'wp-event-manager/wp-event-manager.php',
60
- 'status_key' => 'saswp-wp-event-manager',
61
- ),
62
- array(
63
- 'key' => 'events_manager',
64
- 'name' => 'Events Manager',
65
- 'path_free' => 'events-manager/events-manager.php',
66
- 'status_key' => 'saswp-events-manager',
67
- ),
68
- array(
69
- 'key' => 'event_calendar_wd',
70
- 'name' => 'Event Calendar WD',
71
- 'path_free' => 'event-calendar-wd/ecwd.php',
72
- 'status_key' => 'saswp-event-calendar-wd',
73
- ),
74
- array(
75
- 'key' => 'dw_qna',
76
- 'name' => 'DW Question Answer',
77
- 'path_free' => 'dw-question-answer/dw-question-answer.php',
78
- 'path_pro' => 'dw-question-answer-pro/dw-question-answer.php',
79
- 'status_key' => 'saswp-dw-question-answer',
80
- ),
81
- array(
82
- 'key' => 'yoast_seo',
83
- 'name' => 'Yoast Seo',
84
- 'path_free' => 'wordpress-seo/wp-seo.php',
85
- 'path_pro' => 'wordpress-seo-premium/wp-seo-premium.php',
86
- 'status_key' => 'saswp-yoast',
87
- ),
88
- array(
89
- 'key' => 'rank_math',
90
- 'name' => 'Rank Math',
91
- 'path_free' => 'seo-by-rank-math/rank-math.php',
92
- 'path_pro' => 'seo-by-rank-math-premium/rank-math-premium.php',
93
- 'status_key' => 'saswp-rankmath',
94
- ),
95
- array(
96
- 'key' => 'smart_crawl',
97
- 'name' => 'SmartCrawl Seo',
98
- 'path_free' => 'smartcrawl-seo/wpmu-dev-seo.php',
99
- 'status_key' => 'saswp-smart-crawl',
100
- ),
101
- array(
102
- 'key' => 'the_seo_framework',
103
- 'name' => 'The SEO Framework',
104
- 'path_free' => 'autodescription/autodescription.php',
105
- 'status_key' => 'saswp-the-seo-framework',
106
- ),
107
- array(
108
- 'key' => 'seo_press',
109
- 'name' => 'SEOPress',
110
- 'path_free' => 'wp-seopress/seopress.php',
111
- 'status_key' => 'saswp-seo-press',
112
- ),
113
- array(
114
- 'key' => 'aiosp',
115
- 'name' => 'All in One SEO Pack',
116
- 'path_free' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
117
- 'status_key' => 'saswp-aiosp',
118
- ),
119
- array(
120
- 'key' => 'squirrly_seo',
121
- 'name' => 'Squirrly SEO',
122
- 'path_free' => 'squirrly-seo/squirrly.php',
123
- 'status_key' => 'saswp-squirrly-seo',
124
- ),
125
- array(
126
- 'key' => 'wp_recipe_maker',
127
- 'name' => 'WP Recipe Maker',
128
- 'path_free' => 'wp-recipe-maker/wp-recipe-maker.php',
129
- 'status_key' => 'saswp-wp-recipe-maker',
130
- ),
131
-
132
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
core/array-list/repeater-fields.php ADDED
@@ -0,0 +1,384 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly.
3
+ if ( ! defined( 'ABSPATH' ) ) exit;
4
+
5
+ return array( 'schema_type_element' => array(
6
+ 'Article' => array(
7
+ 'article_items' => 'article_items',
8
+ ),
9
+ 'ImageObject' => array(
10
+ 'image_object_exif_data' => 'image_object_exif_data',
11
+ ),
12
+ 'Blogposting' => array(
13
+ 'blogposting_items' => 'blogposting_items',
14
+ ),
15
+ 'NewsArticle' => array(
16
+ 'newsarticle_items' => 'newsarticle_items',
17
+ ),
18
+ 'TechArticle' => array(
19
+ 'tech_article_items' => 'tech_article_items',
20
+ ),
21
+ 'Product' => array(
22
+ 'product_reviews' => 'product_reviews',
23
+ ),
24
+ 'DataFeed' => array(
25
+ 'feed_element' => 'feed_element',
26
+ ),
27
+ 'FAQ' => array(
28
+ 'faq-question' => 'faq_question',
29
+ ),
30
+ 'Event' => array(
31
+ 'performer' => 'performer',
32
+ ),
33
+ 'HowTo' => array(
34
+ 'how-to-supply' => 'howto_supply',
35
+ 'how-to-tool' => 'howto_tool',
36
+ 'how-to-step' => 'howto_step',
37
+ ),
38
+ 'MusicPlaylist' => array(
39
+ 'music-playlist-track' => 'music_playlist_track',
40
+ ),
41
+ 'MusicAlbum' => array(
42
+ 'music-album-track' => 'music_album_track',
43
+ ),
44
+ 'Apartment' => array(
45
+ 'apartment-amenities' => 'apartment_amenities',
46
+ 'additional-property' => 'additional_property',
47
+
48
+ ),
49
+ 'MedicalCondition' => array(
50
+ 'mc-cause' => 'mc_cause',
51
+ 'mc-symptom' => 'mc_symptom',
52
+ 'mc-risk_factor' => 'mc_risk_factor',
53
+
54
+ ),
55
+ 'TVSeries' => array(
56
+ 'tvseries-actor' => 'tvseries_actor',
57
+ 'tvseries-season' => 'tvseries_season',
58
+ ),
59
+ 'Trip' => array(
60
+ 'trip-itinerary' => 'trip_itinerary'
61
+ )
62
+ ),
63
+ 'meta_name' => array(
64
+ 'article_items' => array(
65
+ array(
66
+ 'label' => 'Item Name',
67
+ 'name' => 'saswp_article_items_name',
68
+ 'type' => 'text',
69
+ )
70
+ ),
71
+ 'image_object_exif_data' => array(
72
+ array(
73
+ 'label' => 'Name',
74
+ 'name' => 'saswpimage_object_exif_data_name',
75
+ 'type' => 'text',
76
+ ),
77
+ array(
78
+ 'label' => 'Value',
79
+ 'name' => 'saswpimage_object_exif_data_value',
80
+ 'type' => 'text',
81
+ )
82
+ ),
83
+ 'newsarticle_items' => array(
84
+ array(
85
+ 'label' => 'Item Name',
86
+ 'name' => 'saswp_newsarticle_items_name',
87
+ 'type' => 'text',
88
+ )
89
+ ),
90
+ 'tech_article_items' => array(
91
+ array(
92
+ 'label' => 'Item Name',
93
+ 'name' => 'saswp_tech_article_items_name',
94
+ 'type' => 'text',
95
+ )
96
+ ),
97
+ 'blogposting_items' => array(
98
+ array(
99
+ 'label' => 'Item Name',
100
+ 'name' => 'saswp_blogposting_items_name',
101
+ 'type' => 'text',
102
+ )
103
+ ),
104
+ 'product_reviews' => array(
105
+ array(
106
+ 'label' => 'Reviewer Name',
107
+ 'name' => 'saswp_product_reviews_reviewer_name',
108
+ 'type' => 'text',
109
+ ),
110
+ array(
111
+ 'label' => 'Rating',
112
+ 'name' => 'saswp_product_reviews_reviewer_rating',
113
+ 'type' => 'number',
114
+ ),
115
+ array(
116
+ 'label' => 'Text',
117
+ 'name' => 'saswp_product_reviews_text',
118
+ 'type' => 'textarea',
119
+ ),
120
+ array(
121
+ 'label' => 'Created Date',
122
+ 'name' => 'saswp_product_reviews_created_date',
123
+ 'type' => 'text',
124
+ )
125
+ ),
126
+ 'feed_element' => array(
127
+ array(
128
+ 'label' => 'Date Created',
129
+ 'name' => 'saswp_feed_element_date_created',
130
+ 'type' => 'text',
131
+ ),
132
+ array(
133
+ 'label' => 'Feed Element Name',
134
+ 'name' => 'saswp_feed_element_name',
135
+ 'type' => 'text',
136
+ ),
137
+ array(
138
+ 'label' => 'Feed Element email',
139
+ 'name' => 'saswp_feed_element_email',
140
+ 'type' => 'text',
141
+ )
142
+ ),
143
+ 'performer' => array(
144
+ array(
145
+ 'label' => 'Performer Type',
146
+ 'name' => 'saswp_event_performer_type',
147
+ 'type' => 'select',
148
+ 'options' => array(
149
+ 'MusicGroup' => 'MusicGroup',
150
+ 'Person' => 'Person'
151
+ )
152
+ ),
153
+ array(
154
+ 'label' => 'Performer Name',
155
+ 'name' => 'saswp_event_performer_name',
156
+ 'type' => 'text',
157
+ ),
158
+ array(
159
+ 'label' => 'Performer URL',
160
+ 'name' => 'saswp_event_performer_url',
161
+ 'type' => 'text',
162
+ )
163
+ ),
164
+ 'howto_supply' => array(
165
+ array(
166
+ 'label' => 'Supply Name',
167
+ 'name' => 'saswp_howto_supply_name',
168
+ 'type' => 'text',
169
+ ),
170
+ array(
171
+ 'label' => 'Supply URL',
172
+ 'name' => 'saswp_howto_supply_url',
173
+ 'type' => 'text',
174
+ ),
175
+ array(
176
+ 'label' => 'Supply Image',
177
+ 'name' => 'saswp_howto_supply_image',
178
+ 'type' => 'media',
179
+ )
180
+ ),
181
+ 'howto_tool' => array(
182
+ array(
183
+ 'label' => 'Tool Name',
184
+ 'name' => 'saswp_howto_tool_name',
185
+ 'type' => 'text',
186
+ ),
187
+ array(
188
+ 'label' => 'Tool URL',
189
+ 'name' => 'saswp_howto_tool_url',
190
+ 'type' => 'text',
191
+ ),
192
+ array(
193
+ 'label' => 'Tool Image',
194
+ 'name' => 'saswp_howto_tool_image',
195
+ 'type' => 'media',
196
+ )
197
+ ),
198
+ 'howto_step' => array(
199
+ array(
200
+ 'label' => 'Step Name',
201
+ 'name' => 'saswp_howto_step_name',
202
+ 'type' => 'text',
203
+ ),
204
+ array(
205
+ 'label' => 'HowToDirection Text',
206
+ 'name' => 'saswp_howto_direction_text',
207
+ 'type' => 'text',
208
+ ),
209
+ array(
210
+ 'label' => 'HowToTip Text',
211
+ 'name' => 'saswp_howto_tip_text',
212
+ 'type' => 'text',
213
+ ),
214
+ array(
215
+ 'label' => 'Step Image',
216
+ 'name' => 'saswp_howto_step_image',
217
+ 'type' => 'media',
218
+ )
219
+ ),
220
+ 'mc_symptom' => array(
221
+ array(
222
+ 'label' => 'Sign Or Symptom',
223
+ 'name' => 'saswp_mc_symptom_name',
224
+ 'type' => 'text',
225
+ )
226
+ ),
227
+ 'mc_risk_factor' => array(
228
+ array(
229
+ 'label' => 'Risk Factor',
230
+ 'name' => 'saswp_mc_risk_factor_name',
231
+ 'type' => 'text',
232
+ )
233
+ ),
234
+ 'mc_cause' => array(
235
+ array(
236
+ 'label' => 'Cause',
237
+ 'name' => 'saswp_mc_cause_name',
238
+ 'type' => 'text',
239
+ )
240
+ ),
241
+ 'tvseries_actor' => array(
242
+ array(
243
+ 'label' => 'Actor Name',
244
+ 'name' => 'saswp_tvseries_actor_name',
245
+ 'type' => 'text',
246
+ )
247
+ ),
248
+ 'tvseries_season' => array(
249
+ array(
250
+ 'label' => 'Season Name',
251
+ 'name' => 'saswp_tvseries_season_name',
252
+ 'type' => 'text',
253
+ ),
254
+ array(
255
+ 'label' => 'Season Published Date',
256
+ 'name' => 'saswp_tvseries_season_published_date',
257
+ 'type' => 'text',
258
+ ),
259
+ array(
260
+ 'label' => 'Number Of Episodes',
261
+ 'name' => 'saswp_tvseries_season_episodes',
262
+ 'type' => 'text',
263
+ )
264
+ ),
265
+ 'trip_itinerary' => array(
266
+ array(
267
+ 'label' => 'Itinerary Type',
268
+ 'name' => 'saswp_trip_itinerary_type',
269
+ 'type' => 'select',
270
+ 'options' => array(
271
+ 'City' => 'City',
272
+ 'LandmarksOrHistoricalBuildings' => 'LandmarksOrHistoricalBuildings',
273
+ 'AdministrativeArea' => 'AdministrativeArea',
274
+ 'LakeBodyOfWater' => 'LakeBodyOfWater'
275
+ )
276
+ ),
277
+ array(
278
+ 'label' => 'Itinerary Name',
279
+ 'name' => 'saswp_trip_itinerary_name',
280
+ 'type' => 'text'
281
+ ),
282
+ array(
283
+ 'label' => 'Itinerary Description',
284
+ 'name' => 'saswp_trip_itinerary_description',
285
+ 'type' => 'textarea'
286
+ ),
287
+ array(
288
+ 'label' => 'Itinerary URL',
289
+ 'name' => 'saswp_trip_itinerary_url',
290
+ 'type' => 'text'
291
+ )
292
+ ),
293
+ 'faq_question' => array(
294
+ array(
295
+ 'label' => 'Question',
296
+ 'name' => 'saswp_faq_question_name',
297
+ 'type' => 'text'
298
+ ),
299
+ array(
300
+ 'label' => 'Accepted Answer',
301
+ 'name' => 'saswp_faq_question_answer',
302
+ 'type' => 'textarea'
303
+ )
304
+ ),
305
+ 'apartment_amenities' => array(
306
+ array(
307
+ 'label' => 'Amenity Name',
308
+ 'name' => 'saswp_apartment_amenities_name',
309
+ 'type' => 'text',
310
+ )
311
+ ),
312
+ 'additional_property' => array(
313
+ array(
314
+ 'label' => 'Name',
315
+ 'name' => 'saswp_apartment_additional_property_name',
316
+ 'type' => 'text',
317
+ ),
318
+ array(
319
+ 'label' => 'Value',
320
+ 'name' => 'saswp_apartment_additional_property_value',
321
+ 'type' => 'text',
322
+ ),
323
+ array(
324
+ 'label' => 'Code Type',
325
+ 'name' => 'saswp_apartment_additional_property_code_type',
326
+ 'type' => 'select',
327
+ 'options' => array(
328
+ 'unitCode' => 'Unit Code',
329
+ 'unitText' => 'Unit Text',
330
+ )
331
+ ),
332
+ array(
333
+ 'label' => 'Code Value',
334
+ 'name' => 'saswp_apartment_additional_property_code_value',
335
+ 'type' => 'text',
336
+ ),
337
+ ),
338
+ 'music_playlist_track' => array(
339
+ array(
340
+ 'label' => 'Track Artist',
341
+ 'name' => 'saswp_music_playlist_track_artist',
342
+ 'type' => 'text',
343
+ ),
344
+ array(
345
+ 'label' => 'Track Duration',
346
+ 'name' => 'saswp_music_playlist_track_duration',
347
+ 'type' => 'text',
348
+ ),
349
+ array(
350
+ 'label' => 'Track In Album',
351
+ 'name' => 'saswp_music_playlist_track_inalbum',
352
+ 'type' => 'text',
353
+ ),
354
+ array(
355
+ 'label' => 'Track Name',
356
+ 'name' => 'saswp_music_playlist_track_name',
357
+ 'type' => 'text',
358
+ ),
359
+ array(
360
+ 'label' => 'Track URL',
361
+ 'name' => 'saswp_music_playlist_track_url',
362
+ 'type' => 'text',
363
+ ),
364
+
365
+ ),
366
+ 'music_album_track' => array(
367
+ array(
368
+ 'label' => 'Track Duration',
369
+ 'name' => 'saswp_music_album_track_duration',
370
+ 'type' => 'text',
371
+ ),
372
+ array(
373
+ 'label' => 'Track Name',
374
+ 'name' => 'saswp_music_album_track_name',
375
+ 'type' => 'text',
376
+ ),
377
+ array(
378
+ 'label' => 'Track URL',
379
+ 'name' => 'saswp_music_album_track_url',
380
+ 'type' => 'text',
381
+ ),
382
+ )
383
+ )
384
+ );
core/array-list/schema-properties.php ADDED
@@ -0,0 +1,3431 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly.
3
+ if ( ! defined( 'ABSPATH' ) ) exit;
4
+ /**
5
+ * Function to get the fields of a particular schema type as an array
6
+ * @global type $post
7
+ * @global type $sd_data
8
+ * @param type $schema_id
9
+ * @return array
10
+ * @since version 1.0.4
11
+ */
12
+ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null, $review_type = null, $manual = null ) {
13
+
14
+ global $post;
15
+ global $sd_data;
16
+
17
+ $post_id = $post->ID;
18
+
19
+ $image_details = array();
20
+
21
+ $image_id = get_post_thumbnail_id();
22
+
23
+ if($image_id){
24
+
25
+ $image_details = wp_get_attachment_image_src($image_id, 'full');
26
+
27
+ }
28
+
29
+ if(empty($image_details[0]) || $image_details[0] === NULL ){
30
+
31
+ if(isset($sd_data['sd_logo']['url'])){
32
+ $image_details[0] = $sd_data['sd_logo']['url'];
33
+ }
34
+
35
+ }
36
+
37
+ $current_user = wp_get_current_user();
38
+ $author_desc = get_the_author_meta( 'user_description' );
39
+ $author_details = array();
40
+
41
+ if(function_exists('get_avatar_data')){
42
+ $author_details = get_avatar_data($current_user->ID);
43
+ }
44
+
45
+ $schema_type = get_post_meta($schema_id, 'schema_type', true);
46
+
47
+ if($review_type){
48
+ $schema_type = $review_type;
49
+ }
50
+ $business_type = '';
51
+ $business_type = get_post_meta($schema_id, 'saswp_business_type', true);
52
+ $business_name = get_post_meta($schema_id, 'saswp_business_name', true);
53
+
54
+ $saswp_business_type_key = 'saswp_business_type_'.$schema_id;
55
+ $saved_business_type = get_post_meta( $post->ID, $saswp_business_type_key, true );
56
+ $saved_saswp_business_name = get_post_meta( $post->ID, 'saswp_business_name_'.$schema_id, true );
57
+
58
+ if($saved_business_type){
59
+ $business_type = $saved_business_type;
60
+ }
61
+ if($saved_saswp_business_name){
62
+ $business_name = $saved_saswp_business_name;
63
+ }
64
+ $meta_field = array();
65
+
66
+ switch ($schema_type) {
67
+
68
+ case 'local_business':
69
+
70
+ $sub_business_options = array();
71
+
72
+ $mappings_local_sub = SASWP_DIR_NAME . '/core/array-list/local-sub-business.php';
73
+ $local_sub_business = include $mappings_local_sub;
74
+
75
+ if($condition !=null){
76
+
77
+ if(!empty($local_sub_business)){
78
+
79
+ $sub_business_options = array(
80
+ 'label' => 'Sub Business Type',
81
+ 'id' => 'saswp_business_name_'.$schema_id,
82
+ 'type' => 'select',
83
+ 'options' => $local_sub_business[$business_type],
84
+ 'default' => $business_name
85
+ );
86
+
87
+ }
88
+
89
+
90
+ }else{
91
+
92
+ if(!empty($local_sub_business) && array_key_exists($business_type, $local_sub_business)){
93
+
94
+ $sub_business_options = array(
95
+ 'label' => 'Sub Business Type',
96
+ 'id' => 'saswp_business_name_'.$schema_id,
97
+ 'type' => 'select',
98
+ 'options' => $local_sub_business[$business_type],
99
+ 'default' => $business_name
100
+ );
101
+
102
+ }
103
+
104
+ }
105
+
106
+ $meta_field[] = array(
107
+ 'label' => 'ID',
108
+ 'id' => 'local_business_id_'.$schema_id,
109
+ 'type' => 'text',
110
+ 'default' => 'LocalBusiness'
111
+
112
+ );
113
+
114
+ if($manual == null){
115
+
116
+ $meta_field[] = array(
117
+ 'label' => 'Business Type',
118
+ 'id' => 'saswp_business_type_'.$schema_id,
119
+ 'type' => 'select',
120
+ 'default' => $business_type,
121
+ 'options' => $local_sub_business['all_business_type']
122
+ );
123
+ $meta_field[] = $sub_business_options;
124
+
125
+ }
126
+
127
+ $meta_field[] = array(
128
+ 'label' => 'Business Name',
129
+ 'id' => 'local_business_name_'.$schema_id,
130
+ 'type' => 'text',
131
+ );
132
+
133
+ $meta_field[] = array(
134
+ 'label' => 'URL',
135
+ 'id' => 'local_business_name_url_'.$schema_id,
136
+ 'type' => 'text',
137
+ 'default' => get_permalink()
138
+ );
139
+
140
+ $meta_field[] = array(
141
+ 'label' => 'Description',
142
+ 'id' => 'local_business_description_'.$schema_id,
143
+ 'type' => 'textarea',
144
+ 'default' => $post->post_excerpt
145
+ );
146
+
147
+ $meta_field[] = array(
148
+ 'label' => 'Street Address',
149
+ 'id' => 'local_street_address_'.$schema_id,
150
+ 'type' => 'text',
151
+ );
152
+
153
+ $meta_field[] = array(
154
+ 'label' => 'City',
155
+ 'id' => 'local_city_'.$schema_id,
156
+ 'type' => 'text',
157
+ );
158
+
159
+ $meta_field[] = array(
160
+ 'label' => 'State',
161
+ 'id' => 'local_state_'.$schema_id,
162
+ 'type' => 'text',
163
+ );
164
+
165
+ $meta_field[] = array(
166
+ 'label' => 'Postal Code',
167
+ 'id' => 'local_postal_code_'.$schema_id,
168
+ 'type' => 'text',
169
+ );
170
+
171
+ $meta_field[] = array(
172
+ 'label' => 'Latitude',
173
+ 'id' => 'local_latitude_'.$schema_id,
174
+ 'type' => 'text',
175
+ );
176
+
177
+ $meta_field[] = array(
178
+ 'label' => 'Longitude',
179
+ 'id' => 'local_longitude_'.$schema_id,
180
+ 'type' => 'text',
181
+ );
182
+
183
+ $meta_field[] = array(
184
+ 'label' => 'Phone',
185
+ 'id' => 'local_phone_'.$schema_id,
186
+ 'type' => 'text',
187
+ );
188
+
189
+ $meta_field[] = array(
190
+ 'label' => 'Website',
191
+ 'id' => 'local_website_'.$schema_id,
192
+ 'type' => 'text',
193
+ );
194
+
195
+ $meta_field[] = array(
196
+ 'label' => 'Image',
197
+ 'id' => 'local_business_logo_'.$schema_id,
198
+ 'type' => 'media',
199
+ );
200
+
201
+ $meta_field[] = array(
202
+ 'label' => 'Operation Days',
203
+ 'id' => 'saswp_dayofweek_'.$schema_id,
204
+ 'type' => 'textarea',
205
+ 'attributes' => array(
206
+ 'placeholder' => 'Mo-Sa 11:00-14:30&#10;Mo-Th 17:00-21:30&#10;Fr-Sa 17:00-22:00'
207
+ ),
208
+ 'note' => 'Note: Enter one operation days per line without comma.'
209
+ );
210
+
211
+ $meta_field[] = array(
212
+ 'label' => 'Area Served',
213
+ 'id' => 'local_area_served_'.$schema_id,
214
+ 'type' => 'textarea',
215
+ 'attributes' => array(
216
+ 'placeholder' => 'Example, Example2'
217
+ ),
218
+ 'note' => 'Note: Separate area served list by comma ( , )'
219
+ );
220
+
221
+ $meta_field[] = array(
222
+ 'label' => 'Price Range',
223
+ 'id' => 'local_price_range_'.$schema_id,
224
+ 'type' => 'text',
225
+ );
226
+
227
+ $meta_field[] = array(
228
+ 'label' => 'Menu',
229
+ 'id' => 'local_menu_'.$schema_id,
230
+ 'type' => 'text',
231
+ );
232
+ $meta_field[] = array(
233
+ 'label' => 'HasMap',
234
+ 'id' => 'local_hasmap_'.$schema_id,
235
+ 'type' => 'text',
236
+ );
237
+ $meta_field[] = array(
238
+ 'label' => 'Serves Cuisine',
239
+ 'id' => 'local_serves_cuisine_'.$schema_id,
240
+ 'type' => 'text',
241
+ );
242
+ $meta_field[] = array(
243
+ 'label' => 'Facebook',
244
+ 'id' => 'local_facebook_'.$schema_id,
245
+ 'type' => 'text',
246
+ );
247
+ $meta_field[] = array(
248
+ 'label' => 'Twitter',
249
+ 'id' => 'local_twitter_'.$schema_id,
250
+ 'type' => 'text',
251
+ );
252
+ $meta_field[] = array(
253
+ 'label' => 'Instagram',
254
+ 'id' => 'local_instagram_'.$schema_id,
255
+ 'type' => 'text',
256
+ );
257
+ $meta_field[] = array(
258
+ 'label' => 'Pinterest',
259
+ 'id' => 'local_pinterest_'.$schema_id,
260
+ 'type' => 'text',
261
+ );
262
+ $meta_field[] = array(
263
+ 'label' => 'Linkedin',
264
+ 'id' => 'local_linkedin_'.$schema_id,
265
+ 'type' => 'text',
266
+ );
267
+ $meta_field[] = array(
268
+ 'label' => 'Soundcloud',
269
+ 'id' => 'local_soundcloud_'.$schema_id,
270
+ 'type' => 'text',
271
+ );
272
+ $meta_field[] = array(
273
+ 'label' => 'local_tumblr',
274
+ 'id' => 'local_tumblr_'.$schema_id,
275
+ 'type' => 'text',
276
+ );
277
+ $meta_field[] = array(
278
+ 'label' => 'Youtube',
279
+ 'id' => 'local_youtube_'.$schema_id,
280
+ 'type' => 'text',
281
+ );
282
+ $meta_field[] = array(
283
+ 'label' => 'Aggregate Rating',
284
+ 'id' => 'local_enable_rating_'.$schema_id,
285
+ 'type' => 'checkbox',
286
+ );
287
+ $meta_field[] = array(
288
+ 'label' => 'Rating',
289
+ 'id' => 'local_rating_'.$schema_id,
290
+ 'type' => 'text',
291
+ );
292
+ $meta_field[] = array(
293
+ 'label' => 'Number of Reviews',
294
+ 'id' => 'local_review_count_'.$schema_id,
295
+ 'type' => 'text',
296
+ );
297
+
298
+ break;
299
+
300
+ case 'Blogposting':
301
+ $meta_field = array(
302
+ array(
303
+ 'label' => 'Main Entity Of Page',
304
+ 'id' => 'saswp_blogposting_main_entity_of_page_'.$schema_id,
305
+ 'type' => 'text',
306
+ 'default' => get_permalink()
307
+ ),
308
+ array(
309
+ 'label' => 'Headline',
310
+ 'id' => 'saswp_blogposting_headline_'.$schema_id,
311
+ 'type' => 'text',
312
+ 'default'=> saswp_get_the_title()
313
+ ),
314
+ array(
315
+ 'label' => 'Description',
316
+ 'id' => 'saswp_blogposting_description_'.$schema_id,
317
+ 'type' => 'textarea',
318
+ 'default' => get_the_excerpt()
319
+ ),
320
+ array(
321
+ 'label' => 'Keywords',
322
+ 'id' => 'saswp_blogposting_keywords_'.$schema_id,
323
+ 'type' => 'text',
324
+ 'default' => saswp_get_the_tags()
325
+ ),
326
+ array(
327
+ 'label' => 'Name',
328
+ 'id' => 'saswp_blogposting_name_'.$schema_id,
329
+ 'type' => 'text',
330
+ 'default' => saswp_get_the_title()
331
+ ),
332
+ array(
333
+ 'label' => 'URL',
334
+ 'id' => 'saswp_blogposting_url_'.$schema_id,
335
+ 'type' => 'text',
336
+ 'default' => get_permalink()
337
+ ),
338
+ array(
339
+ 'label' => 'Date Published',
340
+ 'id' => 'saswp_blogposting_date_published_'.$schema_id,
341
+ 'type' => 'text',
342
+ 'default' => get_the_date("Y-m-d")
343
+ ),
344
+ array(
345
+ 'label' => 'Date Modified',
346
+ 'id' => 'saswp_blogposting_date_modified_'.$schema_id,
347
+ 'type' => 'text',
348
+ 'default' => get_the_modified_date("Y-m-d")
349
+ ),
350
+ array(
351
+ 'label' => 'Author Name',
352
+ 'id' => 'saswp_blogposting_author_name_'.$schema_id,
353
+ 'type' => 'text',
354
+ 'default' => $current_user->display_name
355
+ ),
356
+ array(
357
+ 'label' => 'Author Description',
358
+ 'id' => 'saswp_blogposting_author_description_'.$schema_id,
359
+ 'type' => 'textarea',
360
+ 'default' => $author_desc
361
+ ),
362
+ array(
363
+ 'label' => 'Organization Name',
364
+ 'id' => 'saswp_blogposting_organization_name_'.$schema_id,
365
+ 'type' => 'text',
366
+ 'default' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
367
+ ),
368
+ array(
369
+ 'label' => 'Organization Logo',
370
+ 'id' => 'saswp_blogposting_organization_logo_'.$schema_id,
371
+ 'type' => 'media',
372
+ 'default' => isset($sd_data['sd_logo']) ? $sd_data['sd_logo']['url'] : ''
373
+ ),
374
+ array(
375
+ 'label' => 'Speakable',
376
+ 'id' => 'saswp_blogposting_speakable_'.$schema_id,
377
+ 'type' => 'checkbox',
378
+
379
+ )
380
+ );
381
+ break;
382
+
383
+ case 'NewsArticle':
384
+
385
+ $category_detail=get_the_category(get_the_ID());//$post->ID
386
+ $article_section = '';
387
+
388
+ foreach($category_detail as $cd){
389
+
390
+ $article_section = $cd->cat_name;
391
+
392
+ }
393
+ $word_count = saswp_reading_time_and_word_count();
394
+
395
+ $meta_field = array(
396
+ array(
397
+ 'label' => 'Main Entity Of Page',
398
+ 'id' => 'saswp_newsarticle_main_entity_of_page_'.$schema_id,
399
+ 'type' => 'text',
400
+ 'default' => get_permalink()
401
+ ),
402
+ array(
403
+ 'label' => 'URL',
404
+ 'id' => 'saswp_newsarticle_URL_'.$schema_id,
405
+ 'type' => 'text',
406
+ 'default' => get_permalink(),
407
+ ),
408
+ array(
409
+ 'label' => 'Image',
410
+ 'id' => 'saswp_newsarticle_image_'.$schema_id,
411
+ 'type' => 'media',
412
+ ),
413
+ array(
414
+ 'label' => 'Headline',
415
+ 'id' => 'saswp_newsarticle_headline_'.$schema_id,
416
+ 'type' => 'text',
417
+ 'default' => saswp_get_the_title(),
418
+ ),
419
+ array(
420
+ 'label' => 'Date Published',
421
+ 'id' => 'saswp_newsarticle_date_published_'.$schema_id,
422
+ 'type' => 'text',
423
+ 'default' => get_the_date("Y-m-d")
424
+ ),
425
+ array(
426
+ 'label' => 'Date Modified',
427
+ 'id' => 'saswp_newsarticle_date_modified_'.$schema_id,
428
+ 'type' => 'text',
429
+ 'default' => get_the_modified_date("Y-m-d")
430
+ ),
431
+ array(
432
+ 'label' => 'Description',
433
+ 'id' => 'saswp_newsarticle_description_'.$schema_id,
434
+ 'type' => 'textarea',
435
+ 'default' => get_the_excerpt()
436
+ ),
437
+ array(
438
+ 'label' => 'Keywords',
439
+ 'id' => 'saswp_newsarticle_keywords_'.$schema_id,
440
+ 'type' => 'text',
441
+ 'default' => saswp_get_the_tags()
442
+ ),
443
+ array(
444
+ 'label' => 'Article Section',
445
+ 'id' => 'saswp_newsarticle_section_'.$schema_id,
446
+ 'type' => 'text',
447
+ 'default' => $article_section
448
+ ),
449
+ array(
450
+ 'label' => 'Article Body',
451
+ 'id' => 'saswp_newsarticle_body_'.$schema_id,
452
+ 'type' => 'textarea',
453
+ 'default' => $post->post_content
454
+ ),
455
+ array(
456
+ 'label' => 'Name',
457
+ 'id' => 'saswp_newsarticle_name_'.$schema_id,
458
+ 'type' => 'text',
459
+ 'default' => saswp_get_the_title()
460
+ ),
461
+ array(
462
+ 'label' => 'Thumbnail URL',
463
+ 'id' => 'saswp_newsarticle_thumbnailurl_'.$schema_id,
464
+ 'type' => 'text'
465
+ ),
466
+ array(
467
+ 'label' => 'Word Count',
468
+ 'id' => 'saswp_newsarticle_word_count_'.$schema_id,
469
+ 'type' => 'text',
470
+ 'default' => $word_count['word_count']
471
+ ),
472
+ array(
473
+ 'label' => 'Time Required',
474
+ 'id' => 'saswp_newsarticle_timerequired_'.$schema_id,
475
+ 'type' => 'text',
476
+ 'default' => $word_count['timerequired']
477
+ ),
478
+ array(
479
+ 'label' => 'Main Entity Id',
480
+ 'id' => 'saswp_newsarticle_main_entity_id_'.$schema_id,
481
+ 'type' => 'text',
482
+ 'default' => get_permalink()
483
+ ),
484
+ array(
485
+ 'label' => 'Author Name',
486
+ 'id' => 'saswp_newsarticle_author_name_'.$schema_id,
487
+ 'type' => 'text',
488
+ 'default' => $current_user->display_name
489
+ ),
490
+ array(
491
+ 'label' => 'Author Description',
492
+ 'id' => 'saswp_newsarticle_author_description_'.$schema_id,
493
+ 'type' => 'textarea',
494
+ 'default' => $author_desc
495
+ ),
496
+ array(
497
+ 'label' => 'Author Image',
498
+ 'id' => 'saswp_newsarticle_author_image_'.$schema_id,
499
+ 'type' => 'media',
500
+ 'default' => isset($author_details['url']) ? $author_details['url']: ''
501
+ ),
502
+ array(
503
+ 'label' => 'Organization Name',
504
+ 'id' => 'saswp_newsarticle_organization_name_'.$schema_id,
505
+ 'type' => 'text',
506
+ 'default'=> saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
507
+ ),
508
+ array(
509
+ 'label' => 'Organization Logo',
510
+ 'id' => 'saswp_newsarticle_organization_logo_'.$schema_id,
511
+ 'type' => 'media',
512
+ 'default' => isset($sd_data['sd_logo'])? $sd_data['sd_logo']['url']:''
513
+ ),
514
+ array(
515
+ 'label' => 'Speakable',
516
+ 'id' => 'saswp_newsarticle_speakable_'.$schema_id,
517
+ 'type' => 'checkbox',
518
+
519
+ )
520
+ );
521
+ break;
522
+
523
+ case 'WebPage':
524
+ $meta_field = array(
525
+ array(
526
+ 'label' => 'Name',
527
+ 'id' => 'saswp_webpage_name_'.$schema_id,
528
+ 'type' => 'text',
529
+ 'default' => saswp_get_the_title()
530
+ ),
531
+ array(
532
+ 'label' => 'URL',
533
+ 'id' => 'saswp_webpage_url_'.$schema_id,
534
+ 'type' => 'text',
535
+ 'default' => get_permalink()
536
+ ),
537
+ array(
538
+ 'label' => 'Description',
539
+ 'id' => 'saswp_webpage_description_'.$schema_id,
540
+ 'type' => 'textarea',
541
+ 'default' => get_the_excerpt()
542
+ ),
543
+ array(
544
+ 'label' => 'Keywords',
545
+ 'id' => 'saswp_webpage_keywords_'.$schema_id,
546
+ 'type' => 'text',
547
+ 'default' => saswp_get_the_tags()
548
+ ),
549
+ array(
550
+ 'label' => 'Main Entity Of Page',
551
+ 'id' => 'saswp_webpage_main_entity_of_page_'.$schema_id,
552
+ 'type' => 'text',
553
+ 'default' => get_permalink()
554
+ ),
555
+ array(
556
+ 'label' => 'Image',
557
+ 'id' => 'saswp_webpage_image_'.$schema_id,
558
+ 'type' => 'media',
559
+ ),
560
+ array(
561
+ 'label' => 'Headline',
562
+ 'id' => 'saswp_webpage_headline_'.$schema_id,
563
+ 'type' => 'text',
564
+ 'default' => saswp_get_the_title(),
565
+ ),
566
+
567
+ array(
568
+ 'label' => 'Date Published',
569
+ 'id' => 'saswp_webpage_date_published_'.$schema_id,
570
+ 'type' => 'text',
571
+ 'default' => get_the_date("Y-m-d")
572
+ ),
573
+ array(
574
+ 'label' => 'Date Modified',
575
+ 'id' => 'saswp_webpage_date_modified_'.$schema_id,
576
+ 'type' => 'text',
577
+ 'default' => get_the_modified_date("Y-m-d")
578
+ ),
579
+ array(
580
+ 'label' => 'Author Name',
581
+ 'id' => 'saswp_webpage_author_name_'.$schema_id,
582
+ 'type' => 'text',
583
+ 'default' => $current_user->display_name
584
+ ),
585
+ array(
586
+ 'label' => 'Author Description',
587
+ 'id' => 'saswp_webpage_author_description_'.$schema_id,
588
+ 'type' => 'textarea',
589
+ 'default' => $author_desc
590
+ ),
591
+ array(
592
+ 'label' => 'Organization Name',
593
+ 'id' => 'saswp_webpage_organization_name_'.$schema_id,
594
+ 'type' => 'text',
595
+ 'default' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
596
+ ),
597
+ array(
598
+ 'label' => 'Organization Logo',
599
+ 'id' => 'saswp_webpage_organization_logo_'.$schema_id,
600
+ 'type' => 'media',
601
+ 'default' => isset($sd_data['sd_logo']) ? $sd_data['sd_logo']['url']:''
602
+ ),
603
+ array(
604
+ 'label' => 'Speakable',
605
+ 'id' => 'saswp_webpage_speakable_'.$schema_id,
606
+ 'type' => 'checkbox',
607
+
608
+ )
609
+ );
610
+ break;
611
+
612
+ case 'Article':
613
+ $meta_field = array(
614
+ array(
615
+ 'label' => 'Main Entity Of Page',
616
+ 'id' => 'saswp_article_main_entity_of_page_'.$schema_id,
617
+ 'type' => 'text',
618
+ 'default' => get_permalink()
619
+ ),
620
+ array(
621
+ 'label' => 'URL',
622
+ 'id' => 'saswp_article_url_'.$schema_id,
623
+ 'type' => 'text',
624
+ 'default' => get_permalink(),
625
+ ),
626
+ array(
627
+ 'label' => 'Image',
628
+ 'id' => 'saswp_article_image_'.$schema_id,
629
+ 'type' => 'media'
630
+ ),
631
+ array(
632
+ 'label' => 'Headline',
633
+ 'id' => 'saswp_article_headline_'.$schema_id,
634
+ 'type' => 'text',
635
+ 'default' => saswp_get_the_title()
636
+ ),
637
+ array(
638
+ 'label' => 'Description',
639
+ 'id' => 'saswp_article_description_'.$schema_id,
640
+ 'type' => 'textarea',
641
+ 'default' => get_the_excerpt()
642
+ ),
643
+ array(
644
+ 'label' => 'Keywords',
645
+ 'id' => 'saswp_article_keywords_'.$schema_id,
646
+ 'type' => 'text',
647
+ 'default' => saswp_get_the_tags()
648
+ ),
649
+ array(
650
+ 'label' => 'Date Published',
651
+ 'id' => 'saswp_article_date_published_'.$schema_id,
652
+ 'type' => 'text',
653
+ 'default' => get_the_date("Y-m-d")
654
+ ),
655
+ array(
656
+ 'label' => 'Date Modified',
657
+ 'id' => 'saswp_article_date_modified_'.$schema_id,
658
+ 'type' => 'text',
659
+ 'default' => get_the_modified_date("Y-m-d")
660
+ ),
661
+ array(
662
+ 'label' => 'Author Name',
663
+ 'id' => 'saswp_article_author_name_'.$schema_id,
664
+ 'type' => 'text',
665
+ 'default' => $current_user->display_name
666
+ ),
667
+ array(
668
+ 'label' => 'Author Description',
669
+ 'id' => 'saswp_article_author_description_'.$schema_id,
670
+ 'type' => 'textarea',
671
+ 'default' => $author_desc
672
+ ),
673
+ array(
674
+ 'label' => 'Organization Name',
675
+ 'id' => 'saswp_article_organization_name_'.$schema_id,
676
+ 'type' => 'text',
677
+ 'default' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
678
+ ),
679
+ array(
680
+ 'label' => 'Organization Logo',
681
+ 'id' => 'saswp_article_organization_logo_'.$schema_id,
682
+ 'type' => 'media',
683
+ 'default' => isset($sd_data['sd_logo']) ? $sd_data['sd_logo']['url']:''
684
+ ),
685
+ array(
686
+ 'label' => 'Speakable',
687
+ 'id' => 'saswp_article_speakable_'.$schema_id,
688
+ 'type' => 'checkbox',
689
+
690
+ )
691
+ );
692
+ break;
693
+
694
+ case 'Event':
695
+
696
+ $meta_field = array(
697
+ array(
698
+ 'label' => 'Type',
699
+ 'id' => 'saswp_event_schema_type_'.$schema_id,
700
+ 'type' => 'select',
701
+ 'options' => array(
702
+ '' => 'Select Type (Optional)',
703
+ 'BusinessEvent' => 'BusinessEvent',
704
+ 'ChildrensEvent' => 'ChildrensEvent',
705
+ 'ComedyEvent' => 'ComedyEvent',
706
+ 'CourseInstance' => 'CourseInstance',
707
+ 'DanceEvent' => 'DanceEvent',
708
+ 'DeliveryEvent' => 'DeliveryEvent',
709
+ 'EducationEvent' => 'EducationEvent',
710
+ 'EventSeries' => 'EventSeries',
711
+ 'ExhibitionEvent' => 'ExhibitionEvent',
712
+ 'Festival' => 'Festival',
713
+ 'FoodEvent' => 'FoodEvent',
714
+ 'LiteraryEvent' => 'LiteraryEvent',
715
+ 'MusicEvent' => 'MusicEvent',
716
+ 'PublicationEvent' => 'PublicationEvent',
717
+ 'SaleEvent' => 'SaleEvent',
718
+ 'ScreeningEvent' => 'ScreeningEvent',
719
+ 'SocialEvent' => 'SocialEvent',
720
+ 'SportsEvent' => 'SportsEvent',
721
+ 'TheaterEvent' => 'TheaterEvent',
722
+ 'VisualArtsEvent' => 'VisualArtsEvent'
723
+ )
724
+ ),
725
+ array(
726
+ 'label' => 'Name',
727
+ 'id' => 'saswp_event_schema_name_'.$schema_id,
728
+ 'type' => 'text',
729
+ ),
730
+ array(
731
+ 'label' => 'Description',
732
+ 'id' => 'saswp_event_schema_description_'.$schema_id,
733
+ 'type' => 'textarea',
734
+ ),
735
+ array(
736
+ 'label' => 'Location Name',
737
+ 'id' => 'saswp_event_schema_location_name_'.$schema_id,
738
+ 'type' => 'text',
739
+ ),
740
+ array(
741
+ 'label' => 'Location Street Address',
742
+ 'id' => 'saswp_event_schema_location_streetaddress_'.$schema_id,
743
+ 'type' => 'text',
744
+ ),
745
+ array(
746
+ 'label' => 'Location Locality',
747
+ 'id' => 'saswp_event_schema_location_locality_'.$schema_id,
748
+ 'type' => 'text',
749
+ ),
750
+ array(
751
+ 'label' => 'Location Region',
752
+ 'id' => 'saswp_event_schema_location_region_'.$schema_id,
753
+ 'type' => 'text',
754
+ ),
755
+ array(
756
+ 'label' => 'Location PostalCode',
757
+ 'id' => 'saswp_event_schema_location_postalcode_'.$schema_id,
758
+ 'type' => 'text',
759
+ ),
760
+ array(
761
+ 'label' => 'Location Country',
762
+ 'id' => 'saswp_event_schema_location_country_'.$schema_id,
763
+ 'type' => 'text',
764
+ ),
765
+ array(
766
+ 'label' => 'Start Date',
767
+ 'id' => 'saswp_event_schema_start_date_'.$schema_id,
768
+ 'type' => 'text',
769
+ ),
770
+ array(
771
+ 'label' => 'Start Time',
772
+ 'id' => 'saswp_event_schema_start_time_'.$schema_id,
773
+ 'type' => 'text',
774
+ ),
775
+ array(
776
+ 'label' => 'End Date',
777
+ 'id' => 'saswp_event_schema_end_date_'.$schema_id,
778
+ 'type' => 'text',
779
+ ),
780
+ array(
781
+ 'label' => 'End Time',
782
+ 'id' => 'saswp_event_schema_end_time_'.$schema_id,
783
+ 'type' => 'text',
784
+ ),
785
+ array(
786
+ 'label' => 'Image',
787
+ 'id' => 'saswp_event_schema_image_'.$schema_id,
788
+ 'type' => 'media',
789
+ ),
790
+ array(
791
+ 'label' => 'Price',
792
+ 'id' => 'saswp_event_schema_price_'.$schema_id,
793
+ 'type' => 'number',
794
+ ),
795
+ array(
796
+ 'label' => 'Price Currency',
797
+ 'id' => 'saswp_event_schema_price_currency_'.$schema_id,
798
+ 'type' => 'text',
799
+ ),
800
+ array(
801
+ 'label' => 'Availability',
802
+ 'id' => 'saswp_event_schema_availability_'.$schema_id,
803
+ 'type' => 'select',
804
+ 'options' => array(
805
+ 'InStock' => 'In Stock',
806
+ 'OutOfStock' => 'Out Of Stock',
807
+ 'Discontinued' => 'Discontinued',
808
+ 'PreOrder' => 'Pre Order',
809
+ )
810
+ ),
811
+ array(
812
+ 'label' => 'Valid From',
813
+ 'id' => 'saswp_event_schema_validfrom_'.$schema_id,
814
+ 'type' => 'text',
815
+ ),
816
+ array(
817
+ 'label' => 'URL',
818
+ 'id' => 'saswp_event_schema_url_'.$schema_id,
819
+ 'type' => 'text',
820
+ ),
821
+ );
822
+ break;
823
+
824
+ case 'TechArticle':
825
+ $meta_field = array(
826
+ array(
827
+ 'label' => 'Main Entity Of Page',
828
+ 'id' => 'saswp_tech_article_main_entity_of_page_'.$schema_id,
829
+ 'type' => 'text',
830
+ 'default' => get_permalink()
831
+ ),
832
+ array(
833
+ 'label' => 'Image',
834
+ 'id' => 'saswp_tech_article_image_'.$schema_id,
835
+ 'type' => 'media',
836
+ 'default' => $image_details[0]
837
+ ),
838
+ array(
839
+ 'label' => 'Headline',
840
+ 'id' => 'saswp_tech_article_headline_'.$schema_id,
841
+ 'type' => 'text',
842
+ 'default' => saswp_get_the_title()
843
+ ),
844
+ array(
845
+ 'label' => 'Description',
846
+ 'id' => 'saswp_tech_article_description_'.$schema_id,
847
+ 'type' => 'textarea',
848
+ 'default' => get_the_excerpt()
849
+ ) ,
850
+ array(
851
+ 'label' => 'Keywords',
852
+ 'id' => 'saswp_tech_article_keywords_'.$schema_id,
853
+ 'type' => 'text',
854
+ 'default' => saswp_get_the_tags()
855
+ ),
856
+ array(
857
+ 'label' => 'Date Published',
858
+ 'id' => 'saswp_tech_article_date_published_'.$schema_id,
859
+ 'type' => 'text',
860
+ 'default' => get_the_date("Y-m-d")
861
+ ),
862
+ array(
863
+ 'label' => 'Date Modified',
864
+ 'id' => 'saswp_tech_article_date_modified_'.$schema_id,
865
+ 'type' => 'text',
866
+ 'default' => get_the_modified_date("Y-m-d")
867
+ ),
868
+ array(
869
+ 'label' => 'Author Name',
870
+ 'id' => 'saswp_tech_article_author_name_'.$schema_id,
871
+ 'type' => 'text',
872
+ 'default' => $current_user->display_name
873
+ ),
874
+ array(
875
+ 'label' => 'Author Description',
876
+ 'id' => 'saswp_tech_article_author_name_'.$schema_id,
877
+ 'type' => 'textarea',
878
+ 'default' => $author_desc
879
+ ),
880
+ array(
881
+ 'label' => 'Organization Name',
882
+ 'id' => 'saswp_tech_article_organization_name_'.$schema_id,
883
+ 'type' => 'text',
884
+ 'default' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
885
+ ),
886
+ array(
887
+ 'label' => 'Organization Logo',
888
+ 'id' => 'saswp_tech_article_organization_logo_'.$schema_id,
889
+ 'type' => 'media',
890
+ 'default' => isset($sd_data['sd_logo']) ? $sd_data['sd_logo']['url']:''
891
+ ),
892
+ array(
893
+ 'label' => 'Speakable',
894
+ 'id' => 'saswp_tech_article_speakable_'.$schema_id,
895
+ 'type' => 'checkbox',
896
+
897
+ )
898
+ );
899
+ break;
900
+
901
+ case 'Course':
902
+ $meta_field = array(
903
+ array(
904
+ 'label' => 'Name',
905
+ 'id' => 'saswp_course_name_'.$schema_id,
906
+ 'type' => 'text',
907
+ 'default' => saswp_get_the_title()
908
+ ),
909
+ array(
910
+ 'label' => 'Description',
911
+ 'id' => 'saswp_course_description_'.$schema_id,
912
+ 'type' => 'textarea',
913
+ 'default' => $post->post_excerpt
914
+ ) ,
915
+ array(
916
+ 'label' => 'URL',
917
+ 'id' => 'saswp_course_url_'.$schema_id,
918
+ 'type' => 'text',
919
+ 'default' => get_permalink()
920
+ ),
921
+ array(
922
+ 'label' => 'Date Published',
923
+ 'id' => 'saswp_course_date_published_'.$schema_id,
924
+ 'type' => 'text',
925
+ 'default' => get_the_date("Y-m-d")
926
+ ),
927
+ array(
928
+ 'label' => 'Date Modified',
929
+ 'id' => 'saswp_course_date_modified_'.$schema_id,
930
+ 'type' => 'text',
931
+ 'default' => get_the_modified_date("Y-m-d")
932
+ ),
933
+ array(
934
+ 'label' => 'Provider Name',
935
+ 'id' => 'saswp_course_provider_name_'.$schema_id,
936
+ 'type' => 'text',
937
+ 'default' => get_bloginfo()
938
+ ),
939
+ array(
940
+ 'label' => 'Provider SameAs',
941
+ 'id' => 'saswp_course_sameas_'.$schema_id,
942
+ 'type' => 'text',
943
+ 'default' => get_home_url()
944
+ )
945
+ );
946
+ break;
947
+
948
+ case 'DiscussionForumPosting':
949
+ $meta_field = array(
950
+ array(
951
+ 'label' => 'mainEntityOfPage',
952
+ 'id' => 'saswp_dfp_main_entity_of_page_'.$schema_id,
953
+ 'type' => 'text',
954
+ 'default' => get_permalink()
955
+ ),
956
+ array(
957
+ 'label' => 'Headline',
958
+ 'id' => 'saswp_dfp_headline_'.$schema_id,
959
+ 'type' => 'text',
960
+ 'default' => saswp_get_the_title()
961
+ ),
962
+ array(
963
+ 'label' => 'Description',
964
+ 'id' => 'saswp_dfp_description_'.$schema_id,
965
+ 'type' => 'textarea',
966
+ 'default' => get_the_excerpt()
967
+ ) ,
968
+ array(
969
+ 'label' => 'URL',
970
+ 'id' => 'saswp_dfp_url_'.$schema_id,
971
+ 'type' => 'text',
972
+ 'default' => get_permalink()
973
+ ),
974
+ array(
975
+ 'label' => 'Image',
976
+ 'id' => 'saswp_dfp_image_'.$schema_id,
977
+ 'type' => 'media',
978
+ 'default' => $image_details[0]
979
+ ),
980
+ array(
981
+ 'label' => 'Date Published',
982
+ 'id' => 'saswp_dfp_date_published_'.$schema_id,
983
+ 'type' => 'text',
984
+ 'default' => get_the_date("Y-m-d")
985
+ ),
986
+ array(
987
+ 'label' => 'Date Modified',
988
+ 'id' => 'saswp_dfp_date_modified_'.$schema_id,
989
+ 'type' => 'text',
990
+ 'default' => get_the_modified_date("Y-m-d")
991
+ ),
992
+ array(
993
+ 'label' => 'Author Name',
994
+ 'id' => 'saswp_dfp_author_name_'.$schema_id,
995
+ 'type' => 'text',
996
+ 'default' => $current_user->display_name
997
+ ),
998
+ array(
999
+ 'label' => 'Author Description',
1000
+ 'id' => 'saswp_dfp_author_description_'.$schema_id,
1001
+ 'type' => 'textarea',
1002
+ 'default' => $author_desc
1003
+ ),
1004
+ array(
1005
+ 'label' => 'Organization Name',
1006
+ 'id' => 'saswp_dfp_organization_name_'.$schema_id,
1007
+ 'type' => 'text',
1008
+ 'default' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
1009
+ ),
1010
+ array(
1011
+ 'label' => 'Organization Logo',
1012
+ 'id' => 'saswp_dfp_organization_logo_'.$schema_id,
1013
+ 'type' => 'media',
1014
+ 'default' => $sd_data['sd_logo']['url']
1015
+ ),
1016
+
1017
+ );
1018
+ break;
1019
+
1020
+ case 'Recipe':
1021
+ $meta_field = array(
1022
+ array(
1023
+ 'label' => 'URL',
1024
+ 'id' => 'saswp_recipe_url_'.$schema_id,
1025
+ 'type' => 'text',
1026
+ 'default' => get_permalink(),
1027
+ ),
1028
+ array(
1029
+ 'label' => 'Name',
1030
+ 'id' => 'saswp_recipe_name_'.$schema_id,
1031
+ 'type' => 'text',
1032
+ 'default' => saswp_get_the_title()
1033
+ ),
1034
+ array(
1035
+ 'label' => 'Image',
1036
+ 'id' => 'saswp_recipe_image_'.$schema_id,
1037
+ 'type' => 'media'
1038
+ ),
1039
+ array(
1040
+ 'label' => 'Date Published',
1041
+ 'id' => 'saswp_recipe_date_published_'.$schema_id,
1042
+ 'type' => 'text',
1043
+ 'default' => get_the_date("Y-m-d")
1044
+ ),
1045
+ array(
1046
+ 'label' => 'Date Modified',
1047
+ 'id' => 'saswp_recipe_date_modified_'.$schema_id,
1048
+ 'type' => 'text',
1049
+ 'default' => get_the_modified_date("Y-m-d")
1050
+ ),
1051
+ array(
1052
+ 'label' => 'Description',
1053
+ 'id' => 'saswp_recipe_description_'.$schema_id,
1054
+ 'type' => 'textarea',
1055
+ 'default' => get_the_excerpt()
1056
+ ),
1057
+ array(
1058
+ 'label' => 'Main Entity Id',
1059
+ 'id' => 'saswp_recipe_main_entity_'.$schema_id,
1060
+ 'type' => 'text',
1061
+ 'default' => get_permalink()
1062
+ ),
1063
+ array(
1064
+ 'label' => 'Author Name',
1065
+ 'id' => 'saswp_recipe_author_name_'.$schema_id,
1066
+ 'type' => 'text',
1067
+ 'default' => $current_user->display_name
1068
+ ),
1069
+ array(
1070
+ 'label' => 'Author Description',
1071
+ 'id' => 'saswp_recipe_author_description_'.$schema_id,
1072
+ 'type' => 'textarea',
1073
+ 'default' => $author_desc
1074
+ ),
1075
+ array(
1076
+ 'label' => 'Author Image',
1077
+ 'id' => 'saswp_recipe_author_image_'.$schema_id,
1078
+ 'type' => 'media',
1079
+ 'default' => $author_details['url']
1080
+ ),
1081
+ array(
1082
+ 'label' => 'Organization Name',
1083
+ 'id' => 'saswp_recipe_organization_name_'.$schema_id,
1084
+ 'type' => 'text',
1085
+ 'default' => saswp_remove_warnings($sd_data, 'sd_name', 'saswp_string')
1086
+ ),
1087
+ array(
1088
+ 'label' => 'Organization Logo',
1089
+ 'id' => 'saswp_recipe_organization_logo_'.$schema_id,
1090
+ 'type' => 'media',
1091
+ 'default' => $sd_data['sd_logo']['url']
1092
+ ),
1093
+ array(
1094
+ 'label' => 'Prepare Time',
1095
+ 'id' => 'saswp_recipe_preptime_'.$schema_id,
1096
+ 'type' => 'text',
1097
+ 'attributes' => array(
1098
+ 'placeholder' => 'PT20M'
1099
+ ),
1100
+ ),
1101
+ array(
1102
+ 'label' => 'Cook Time',
1103
+ 'id' => 'saswp_recipe_cooktime_'.$schema_id,
1104
+ 'type' => 'text',
1105
+ 'attributes' => array(
1106
+ 'placeholder' => 'PT30M'
1107
+ ),
1108
+ ),
1109
+ array(
1110
+ 'label' => 'Total Time',
1111
+ 'id' => 'saswp_recipe_totaltime_'.$schema_id,
1112
+ 'type' => 'text',
1113
+ 'attributes' => array(
1114
+ 'placeholder' => 'PT50M'
1115
+ ),
1116
+ ),
1117
+ array(
1118
+ 'label' => 'Keywords',
1119
+ 'id' => 'saswp_recipe_keywords_'.$schema_id,
1120
+ 'type' => 'text',
1121
+ 'attributes' => array(
1122
+ 'placeholder' => 'cake for a party, coffee'
1123
+ ),
1124
+ ),
1125
+ array(
1126
+ 'label' => 'Recipe Yield',
1127
+ 'id' => 'saswp_recipe_recipeyield_'.$schema_id,
1128
+ 'type' => 'text',
1129
+ 'attributes' => array(
1130
+ 'placeholder' => '10 servings'
1131
+ ),
1132
+ ),
1133
+ array(
1134
+ 'label' => 'Recipe Category',
1135
+ 'id' => 'saswp_recipe_category_'.$schema_id,
1136
+ 'type' => 'text',
1137
+ 'attributes' => array(
1138
+ 'placeholder' => 'Dessert'
1139
+ ),
1140
+ ),
1141
+ array(
1142
+ 'label' => 'Recipe Cuisine',
1143
+ 'id' => 'saswp_recipe_cuisine_'.$schema_id,
1144
+ 'type' => 'text',
1145
+ 'attributes' => array(
1146
+ 'placeholder' => 'American'
1147
+ ),
1148
+ ),
1149
+ array(
1150
+ 'label' => 'Nutrition',
1151
+ 'id' => 'saswp_recipe_nutrition_'.$schema_id,
1152
+ 'type' => 'text',
1153
+ 'attributes' => array(
1154
+ 'placeholder' => '270 calories'
1155
+ ),
1156
+ ),
1157
+ array(
1158
+ 'label' => 'Recipe Ingredient',
1159
+ 'id' => 'saswp_recipe_ingredient_'.$schema_id,
1160
+ 'type' => 'textarea',
1161
+ 'attributes' => array(
1162
+ 'placeholder' => '2 cups of flour; 3/4 cup white sugar;'
1163
+ ),
1164
+ 'note' => 'Note: Separate Ingredient list by semicolon ( ; )'
1165
+ ),
1166
+ array(
1167
+ 'label' => 'Recipe Instructions',
1168
+ 'id' => 'saswp_recipe_instructions_'.$schema_id,
1169
+ 'type' => 'textarea',
1170
+ 'attributes' => array(
1171
+ 'placeholder' => 'Preheat the oven to 350 degrees F. Grease and flour a 9x9 inch pan; large bowl, combine flour, sugar, baking powder, and salt. pan.;'
1172
+ ),
1173
+ 'note' => 'Note: Separate Instructions step by semicolon ( ; )'
1174
+ ),
1175
+ array(
1176
+ 'label' => 'Video Name',
1177
+ 'id' => 'saswp_recipe_video_name_'.$schema_id,
1178
+ 'type' => 'text',
1179
+ 'attributes' => array(
1180
+ 'placeholder' => 'Video Name'
1181
+ ),
1182
+ ),
1183
+ array(
1184
+ 'label' => 'Video Description',
1185
+ 'id' => 'saswp_recipe_video_description_'.$schema_id,
1186
+ 'type' => 'text',
1187
+ 'attributes' => array(
1188
+ 'placeholder' => 'Video Description'
1189
+ ),
1190
+ ),
1191
+ array(
1192
+ 'label' => 'Video ThumbnailUrl',
1193
+ 'id' => 'saswp_recipe_video_thumbnailurl_'.$schema_id,
1194
+ 'type' => 'media',
1195
+
1196
+ ),
1197
+ array(
1198
+ 'label' => 'Video ContentUrl',
1199
+ 'id' => 'saswp_recipe_video_contenturl_'.$schema_id,
1200
+ 'type' => 'text',
1201
+ 'attributes' => array(
1202
+ 'placeholder' => 'http://www.example.com/video123.mp4'
1203
+ ),
1204
+ ),
1205
+ array(
1206
+ 'label' => 'Video EmbedUrl',
1207
+ 'id' => 'saswp_recipe_video_embedurl_'.$schema_id,
1208
+ 'type' => 'text',
1209
+ 'attributes' => array(
1210
+ 'placeholder' => 'http://www.example.com/videoplayer?video=123'
1211
+ ),
1212
+ ),
1213
+ array(
1214
+ 'label' => 'Video Upload Date',
1215
+ 'id' => 'saswp_recipe_video_upload_date_'.$schema_id,
1216
+ 'type' => 'text',
1217
+ 'attributes' => array(
1218
+ 'placeholder' => '2018-12-18'
1219
+ ),
1220
+ ),
1221
+ array(
1222
+ 'label' => 'Video Duration',
1223
+ 'id' => 'saswp_recipe_video_duration_'.$schema_id,
1224
+ 'type' => 'text',
1225
+ 'attributes' => array(
1226
+ 'placeholder' => 'PT1M33S'
1227
+ ),
1228
+ ),
1229
+ array(
1230
+ 'label' => 'Aggregate Rating',
1231
+ 'id' => 'saswp_recipe_schema_enable_rating_'.$schema_id,
1232
+ 'type' => 'checkbox',
1233
+ ),
1234
+ array(
1235
+ 'label' => 'Rating',
1236
+ 'id' => 'saswp_recipe_schema_rating_'.$schema_id,
1237
+ 'type' => 'text',
1238
+ ),
1239
+ array(
1240
+ 'label' => 'Number of Reviews',
1241
+ 'id' => 'saswp_recipe_schema_review_count_'.$schema_id,
1242
+ 'type' => 'text',
1243
+ )
1244
+
1245
+ );
1246
+ break;
1247
+
1248
+ case 'Product':
1249
+
1250
+ $service = new saswp_output_service();
1251
+ $product_details = $service->saswp_woocommerce_product_details($post_id);
1252
+
1253
+ $meta_field = array(
1254
+
1255
+ array(
1256
+ 'label' => 'Name',
1257
+ 'id' => 'saswp_product_schema_name_'.$schema_id,
1258
+ 'type' => 'text',
1259
+ 'default' => saswp_remove_warnings($product_details, 'product_name', 'saswp_string')
1260
+ ),
1261
+ array(
1262
+ 'label' => 'URL',
1263
+ 'id' => 'saswp_product_schema_url_'.$schema_id,
1264
+ 'type' => 'text',
1265
+ 'default' => get_permalink()
1266
+ ),
1267
+ array(
1268
+ 'label' => 'Description',
1269
+ 'id' => 'saswp_product_schema_description_'.$schema_id,
1270
+ 'type' => 'textarea',
1271
+ 'default' => saswp_remove_warnings($product_details, 'product_description', 'saswp_string')
1272
+ ),
1273
+ array(
1274
+ 'label' => 'Image',
1275
+ 'id' => 'saswp_product_schema_image_'.$schema_id,
1276
+ 'type' => 'media',
1277
+ ),
1278
+ array(
1279
+ 'label' => 'Brand Name',
1280
+ 'id' => 'saswp_product_schema_brand_name_'.$schema_id,
1281
+ 'type' => 'text',
1282
+ 'default' => saswp_remove_warnings($product_details, 'product_brand', 'saswp_string')
1283
+ ),
1284
+ array(
1285
+ 'label' => 'Price',
1286
+ 'id' => 'saswp_product_schema_price_'.$schema_id,
1287
+ 'type' => 'text',
1288
+ 'default' => saswp_remove_warnings($product_details, 'product_price', 'saswp_string')
1289
+ ),
1290
+ array(
1291
+ 'label' => 'Price Valid Until',
1292
+ 'id' => 'saswp_product_schema_priceValidUntil_'.$schema_id,
1293
+ 'type' => 'text',
1294
+ 'default' => saswp_remove_warnings($product_details, 'product_priceValidUntil', 'saswp_string')
1295
+ ),
1296
+ array(
1297
+ 'label' => 'Currency',
1298
+ 'id' => 'saswp_product_schema_currency_'.$schema_id,
1299
+ 'type' => 'text',
1300
+ 'default' => saswp_remove_warnings($product_details, 'product_currency', 'saswp_string')
1301
+ ),
1302
+ array(
1303
+ 'label' => 'Availability',
1304
+ 'id' => 'saswp_product_schema_availability_'.$schema_id,
1305
+ 'type' => 'select',
1306
+ 'options' => array(
1307
+ 'InStock' => 'In Stock',
1308
+ 'OutOfStock' => 'Out Of Stock',
1309
+ 'Discontinued' => 'Discontinued',
1310
+ 'PreOrder' => 'Pre Order',
1311
+ ),
1312
+ 'default' => saswp_remove_warnings($product_details, 'product_availability', 'saswp_string')
1313
+ ),
1314
+ array(
1315
+ 'label' => 'Condition',
1316
+ 'id' => 'saswp_product_schema_condition_'.$schema_id,
1317
+ 'type' => 'select',
1318
+ 'options' => array(
1319
+ 'NewCondition' => 'New',
1320
+ 'UsedCondition' => 'Used',
1321
+ 'RefurbishedCondition' => 'Refurbished',
1322
+ 'DamagedCondition' => 'Damaged',
1323
+ ),
1324
+ ),
1325
+ array(
1326
+ 'label' => 'SKU',
1327
+ 'id' => 'saswp_product_schema_sku_'.$schema_id,
1328
+ 'type' => 'text',
1329
+ 'default' => saswp_remove_warnings($product_details, 'product_sku', 'saswp_string')
1330
+ ),
1331
+ array(
1332
+ 'label' => 'MPN',
1333
+ 'id' => 'saswp_product_schema_mpn_'.$schema_id,
1334
+ 'type' => 'text',
1335
+ 'note' => 'OR',
1336
+ 'default' => saswp_remove_warnings($product_details, 'product_mpn', 'saswp_string')
1337
+ ),
1338
+ array(
1339
+ 'label' => 'GTIN8',
1340
+ 'id' => 'saswp_product_schema_gtin8_'.$schema_id,
1341
+ 'type' => 'text',
1342
+ 'default' => saswp_remove_warnings($product_details, 'product_gtin8', 'saswp_string')
1343
+ ),
1344
+ array(
1345
+ 'label' => 'Seller Organization',
1346
+ 'id' => 'saswp_product_schema_seller_'.$schema_id,
1347
+ 'type' => 'text',
1348
+ ),
1349
+ array(
1350
+ 'label' => 'Aggregate Rating',
1351
+ 'id' => 'saswp_product_schema_enable_rating_'.$schema_id,
1352
+ 'type' => 'checkbox',
1353
+ ),
1354
+ array(
1355
+ 'label' => 'Rating',
1356
+ 'id' => 'saswp_product_schema_rating_'.$schema_id,
1357
+ 'type' => 'text',
1358
+ 'default' => saswp_remove_warnings($product_details, 'product_average_rating', 'saswp_string')
1359
+ ),
1360
+ array(
1361
+ 'label' => 'Number of Reviews',
1362
+ 'id' => 'saswp_product_schema_review_count_'.$schema_id,
1363
+ 'type' => 'text',
1364
+ 'default' => saswp_remove_warnings($product_details, 'product_review_count', 'saswp_string')
1365
+ ),
1366
+
1367
+ );
1368
+
1369
+ break;
1370
+
1371
+ case 'Service':
1372
+
1373
+ $meta_field = array(
1374
+ array(
1375
+ 'label' => 'Name',
1376
+ 'id' => 'saswp_service_schema_name_'.$schema_id,
1377
+ 'type' => 'text',
1378
+ ),
1379
+ array(
1380
+ 'label' => 'URL',
1381
+ 'id' => 'saswp_service_schema_url_'.$schema_id,
1382
+ 'type' => 'text',
1383
+ ),
1384
+ array(
1385
+ 'label' => 'Service Type',
1386
+ 'id' => 'saswp_service_schema_type_'.$schema_id,
1387
+ 'type' => 'text',
1388
+ ),
1389
+ array(
1390
+ 'label' => 'Provider Name',
1391
+ 'id' => 'saswp_service_schema_provider_name_'.$schema_id,
1392
+ 'type' => 'text',
1393
+ ),
1394
+ array(
1395
+ 'label' => 'Provider Type',
1396
+ 'id' => 'saswp_service_schema_provider_type_'.$schema_id,
1397
+ 'type' => 'select',
1398
+ 'options' => array(
1399
+ 'Airline' => 'Airline',
1400
+ 'Corporation' => 'Corporation',
1401
+ 'EducationalOrganization' => 'Educational Organization',
1402
+ 'GovernmentOrganization' => 'Government Organization',
1403
+ 'LocalBusiness' => 'Local Business',
1404
+ 'MedicalOrganization' => 'Medical Organization',
1405
+ 'NGO' => 'NGO',
1406
+ 'PerformingGroup' => 'Performing Group',
1407
+ 'SportsOrganization' => 'Sports Organization',
1408
+ ),
1409
+ ),
1410
+ array(
1411
+ 'label' => 'Image',
1412
+ 'id' => 'saswp_service_schema_image_'.$schema_id,
1413
+ 'type' => 'media',
1414
+ ),
1415
+ array(
1416
+ 'label' => 'Locality',
1417
+ 'id' => 'saswp_service_schema_locality_'.$schema_id,
1418
+ 'type' => 'text',
1419
+ ),
1420
+ array(
1421
+ 'label' => 'Postal Code',
1422
+ 'id' => 'saswp_service_schema_postal_code_'.$schema_id,
1423
+ 'type' => 'text',
1424
+ ),
1425
+ array(
1426
+ 'label' => 'Address Country',
1427
+ 'id' => 'saswp_service_schema_country_'.$schema_id,
1428
+ 'type' => 'text',
1429
+ ),
1430
+ array(
1431
+ 'label' => 'Telephone',
1432
+ 'id' => 'saswp_service_schema_telephone_'.$schema_id,
1433
+ 'type' => 'text',
1434
+ ),
1435
+ array(
1436
+ 'label' => 'Price Range',
1437
+ 'id' => 'saswp_service_schema_price_range_'.$schema_id,
1438
+ 'type' => 'text',
1439
+ ),
1440
+ array(
1441
+ 'label' => 'Description',
1442
+ 'id' => 'saswp_service_schema_description_'.$schema_id,
1443
+ 'type' => 'textarea',
1444
+ ),
1445
+ array(
1446
+ 'label' => 'Area Served (City)',
1447
+ 'id' => 'saswp_service_schema_area_served_'.$schema_id,
1448
+ 'type' => 'textarea',
1449
+ 'note' => 'Note: Enter all the City name in comma separated',
1450
+ 'attributes' => array(
1451
+ 'placeholder' => 'New York, Los Angeles'
1452
+ ),
1453
+ ),
1454
+ array(
1455
+ 'label' => 'Service Offer',
1456
+ 'id' => 'saswp_service_schema_service_offer_'.$schema_id,
1457
+ 'type' => 'textarea',
1458
+ 'note' => 'Note: Enter all the service offer in comma separated',
1459
+ 'attributes' => array(
1460
+ 'placeholder' => 'Apartment light cleaning, carpet cleaning'
1461
+ )
1462
+ )
1463
+ );
1464
+ break;
1465
+
1466
+ case 'Review':
1467
+
1468
+ $meta_field[] = array(
1469
+ 'label' => 'Review Name',
1470
+ 'id' => 'saswp_review_name_'.$schema_id,
1471
+ 'type' => 'text',
1472
+ );
1473
+ $meta_field[] = array(
1474
+ 'label' => 'Review Description',
1475
+ 'id' => 'saswp_review_description_'.$schema_id,
1476
+ 'type' => 'textarea',
1477
+ );
1478
+ $meta_field[] = array(
1479
+ 'label' => 'Review Author',
1480
+ 'id' => 'saswp_review_author_'.$schema_id,
1481
+ 'type' => 'text',
1482
+ );
1483
+ $meta_field[] = array(
1484
+ 'label' => 'Review Author Profile URL',
1485
+ 'id' => 'saswp_review_author_url_'.$schema_id,
1486
+ 'type' => 'text',
1487
+ );
1488
+ $meta_field[] = array(
1489
+ 'label' => 'Review Publisher',
1490
+ 'id' => 'saswp_review_publisher_'.$schema_id,
1491
+ 'type' => 'text',
1492
+ );
1493
+ $meta_field[] = array(
1494
+ 'label' => 'Review Published Date',
1495
+ 'id' => 'saswp_review_date_published_'.$schema_id,
1496
+ 'type' => 'text',
1497
+ );
1498
+ $meta_field[] = array(
1499
+ 'label' => 'Review URL',
1500
+ 'id' => 'saswp_review_url_'.$schema_id,
1501
+ 'type' => 'text',
1502
+ );
1503
+ $meta_field[] = array(
1504
+ 'label' => 'Review Rating',
1505
+ 'id' => 'saswp_review_enable_rating_'.$schema_id,
1506
+ 'type' => 'checkbox',
1507
+ );
1508
+ $meta_field[] = array(
1509
+ 'label' => 'Rating Value',
1510
+ 'id' => 'saswp_review_rating_'.$schema_id,
1511
+ 'type' => 'text',
1512
+ );
1513
+ $meta_field[] = array(
1514
+ 'label' => 'Best Rating',
1515
+ 'id' => 'saswp_review_review_count_'.$schema_id,
1516
+ 'type' => 'text',
1517
+ );
1518
+
1519
+ if($manual == null){
1520
+
1521
+ $meta_field[] = array(
1522
+ 'label' => 'Item Reviewed Type',
1523
+ 'id' => 'saswp_review_item_reviewed_'.$schema_id,
1524
+ 'type' => 'select',
1525
+ 'options' => array(
1526
+ 'Book' => 'Book',
1527
+ 'Course' => 'Course',
1528
+ 'Event' => 'Event',
1529
+ 'HowTo' => 'HowTo',
1530
+ 'local_business' => 'LocalBusiness',
1531
+ 'MusicPlaylist' => 'Music Playlist',
1532
+ 'Product' => 'Product',
1533
+ 'Recipe' => 'Recipe',
1534
+ 'SoftwareApplication' => 'SoftwareApplication',
1535
+ 'VideoGame' => 'VideoGame',
1536
+ )
1537
+ );
1538
+
1539
+ }
1540
+
1541
+ break;
1542
+
1543
+ case 'AudioObject':
1544
+
1545
+ $meta_field = array(
1546
+
1547
+ array(
1548
+ 'label' => 'Name',
1549
+ 'id' => 'saswp_audio_schema_name_'.$schema_id,
1550
+ 'type' => 'text',
1551
+ ),
1552
+ array(
1553
+ 'label' => 'Description',
1554
+ 'id' => 'saswp_audio_schema_description_'.$schema_id,
1555
+ 'type' => 'textarea',
1556
+ ),
1557
+ array(
1558
+ 'label' => 'Content Url',
1559
+ 'id' => 'saswp_audio_schema_contenturl_'.$schema_id,
1560
+ 'type' => 'text',
1561
+ ),
1562
+ array(
1563
+ 'label' => 'Duration',
1564
+ 'id' => 'saswp_audio_schema_duration_'.$schema_id,
1565
+ 'type' => 'text',
1566
+ ),
1567
+ array(
1568
+ 'label' => 'Encoding Format',
1569
+ 'id' => 'saswp_audio_schema_encoding_format_'.$schema_id,
1570
+ 'type' => 'text',
1571
+ ),
1572
+ array(
1573
+ 'label' => 'Date Published',
1574
+ 'id' => 'saswp_audio_schema_date_published_'.$schema_id,
1575
+ 'type' => 'text',
1576
+ 'default' => get_the_date("Y-m-d")
1577
+ ),
1578
+ array(
1579
+ 'label' => 'Date Modified',
1580
+ 'id' => 'saswp_audio_schema_date_modified_'.$schema_id,
1581
+ 'type' => 'text',
1582
+ 'default' => get_the_modified_date("Y-m-d")
1583
+ ),
1584
+ array(
1585
+ 'label' => 'Author Name',
1586
+ 'id' => 'saswp_audio_schema_author_name_'.$schema_id,
1587
+ 'type' => 'text',
1588
+ ),
1589
+ array(
1590
+ 'label' => 'Author Description',
1591
+ 'id' => 'saswp_audio_schema_author_description_'.$schema_id,
1592
+ 'type' => 'textarea',
1593
+ 'default' => $author_desc
1594
+ )
1595
+
1596
+ );
1597
+ break;
1598
+
1599
+ case 'SoftwareApplication':
1600
+
1601
+ $meta_field = array(
1602
+
1603
+ array(
1604
+ 'label' => 'Name',
1605
+ 'id' => 'saswp_software_schema_name_'.$schema_id,
1606
+ 'type' => 'text',
1607
+ ),
1608
+ array(
1609
+ 'label' => 'Description',
1610
+ 'id' => 'saswp_software_schema_description_'.$schema_id,
1611
+ 'type' => 'textarea',
1612
+ ),
1613
+ array(
1614
+ 'label' => 'Image',
1615
+ 'id' => 'saswp_software_schema_image_'.$schema_id,
1616
+ 'type' => 'media',
1617
+ ),
1618
+ array(
1619
+ 'label' => 'Operating System',
1620
+ 'id' => 'saswp_software_schema_operating_system_'.$schema_id,
1621
+ 'type' => 'text',
1622
+ ),
1623
+ array(
1624
+ 'label' => 'Application Category',
1625
+ 'id' => 'saswp_software_schema_application_category_'.$schema_id,
1626
+ 'type' => 'text',
1627
+ ),
1628
+ array(
1629
+ 'label' => 'Price',
1630
+ 'id' => 'saswp_software_schema_price_'.$schema_id,
1631
+ 'type' => 'text',
1632
+ ),
1633
+ array(
1634
+ 'label' => 'Price Currency',
1635
+ 'id' => 'saswp_software_schema_price_currency_'.$schema_id,
1636
+ 'type' => 'text',
1637
+ ),
1638
+ array(
1639
+ 'label' => 'Date Published',
1640
+ 'id' => 'saswp_software_schema_date_published_'.$schema_id,
1641
+ 'type' => 'text',
1642
+ 'default' => get_the_date("Y-m-d")
1643
+ ),
1644
+ array(
1645
+ 'label' => 'Date Modified',
1646
+ 'id' => 'saswp_software_schema_date_modified_'.$schema_id,
1647
+ 'type' => 'text',
1648
+ 'default' => get_the_modified_date("Y-m-d")
1649
+ ),
1650
+ array(
1651
+ 'label' => 'Aggregate Rating',
1652
+ 'id' => 'saswp_software_schema_enable_rating_'.$schema_id,
1653
+ 'type' => 'checkbox',
1654
+ ),
1655
+ array(
1656
+ 'label' => 'Rating',
1657
+ 'id' => 'saswp_software_schema_rating_'.$schema_id,
1658
+ 'type' => 'text',
1659
+ ),
1660
+ array(
1661
+ 'label' => 'Rating Count',
1662
+ 'id' => 'saswp_software_schema_rating_count_'.$schema_id,
1663
+ 'type' => 'text',
1664
+ ),
1665
+ );
1666
+ break;
1667
+
1668
+ case 'VideoObject':
1669
+ $meta_field = array(
1670
+ array(
1671
+ 'label' => 'URL',
1672
+ 'id' => 'saswp_video_object_url_'.$schema_id,
1673
+ 'type' => 'text',
1674
+ 'default' => get_permalink()
1675
+ ),
1676
+ array(
1677
+ 'label' => 'Headline',
1678
+ 'id' => 'saswp_video_object_headline_'.$schema_id,
1679
+ 'type' => 'text',
1680
+ 'default' => saswp_get_the_title()
1681
+ ),
1682
+ array(
1683
+ 'label' => 'Date Published',
1684
+ 'id' => 'saswp_video_object_date_published_'.$schema_id,
1685
+ 'type' => 'text',
1686
+ 'default' => get_the_date("Y-m-d")
1687
+ ),
1688
+ array(
1689
+ 'label' => 'Date date Modified',
1690
+ 'id' => 'saswp_video_object_date_modified_'.$schema_id,
1691
+ 'type' => 'text',
1692
+ 'default' => get_the_modified_date("Y-m-d")
1693
+ ),
1694
+ array(
1695
+ 'label' => 'Description',
1696
+ 'id' => 'saswp_video_object_description_'.$schema_id,
1697
+ 'type' => 'textarea',
1698
+ 'default' => get_the_excerpt()
1699
+ ),
1700
+ array(
1701
+ 'label' => 'Name',
1702
+ 'id' => 'saswp_video_object_name_'.$schema_id,
1703
+ 'type' => 'text',
1704
+ 'default' => saswp_get_the_title()
1705
+ ),
1706
+ array(
1707
+ 'label' => 'Upload Date',
1708
+ 'id' => 'saswp_video_object_upload_date_'.$schema_id,
1709
+ 'type' => 'text',
1710
+ 'default' => get_the_date("Y-m-d")
1711
+ ),
1712
+ array(
1713
+ 'label' => 'Thumbnail Url',
1714
+ 'id' => 'saswp_video_object_thumbnail_url_'.$schema_id,
1715
+ 'type' => 'text',
1716
+ 'default' => $image_details[0]
1717
+ ),
1718
+ array(
1719
+ 'label' => 'Content Url',
1720
+ 'id' => 'saswp_video_object_content_url_'.$schema_id,
1721
+ 'type' => 'text',
1722
+ 'default' => get_permalink()
1723
+ ),
1724
+ array(
1725
+ 'label' => 'Duration',
1726
+ 'id' => 'saswp_video_object_duration_'.$schema_id,
1727
+ 'type' => 'text'
1728
+ ),
1729
+ array(
1730
+ 'label' => 'Embed Url',
1731
+ 'id' => 'saswp_video_object_embed_url_'.$schema_id,
1732
+ 'type' => 'text',
1733
+ 'default' => get_permalink()
1734
+ ),
1735
+ array(
1736
+ 'label' => 'Main Entity Id',
1737
+ 'id' => 'saswp_video_object_main_entity_id_'.$schema_id,
1738
+ 'type' => 'text',
1739
+ 'default' => get_permalink()
1740
+ ),
1741
+ array(
1742
+ 'label' => 'Author Name',
1743
+ 'id' => 'saswp_video_object_author_name_'.$schema_id,
1744
+ 'type' => 'text',
1745
+ 'default' => $current_user->display_name
1746
+ ),
1747
+ array(
1748
+ 'label' => 'Author Description',
1749
+ 'id' => 'saswp_video_object_author_description_'.$schema_id,
1750
+ 'type' => 'textarea',
1751
+ 'default' => $author_desc
1752
+ ),
1753
+ array(
1754
+ 'label' => 'Author Image',
1755
+ 'id' => 'saswp_video_object_author_image_'.$schema_id,
1756
+ 'type' => 'media',
1757
+ 'default' => $author_details['url']
1758
+ ),
1759
+ array(
1760
+ 'label' => 'Organization Name',
1761
+ 'id' => 'saswp_video_object_organization_name_'.$schema_id,
1762
+ 'type' => 'text',
1763
+ 'default' => $sd_data['sd_name']
1764
+ ),
1765
+ array(
1766
+ 'label' => 'Organization Logo',
1767
+ 'id' => 'saswp_video_object_organization_logo_'.$schema_id,
1768
+ 'type' => 'media',
1769
+ 'default' => $sd_data['sd_logo']['url']
1770
+ ),
1771
+ );
1772
+ break;
1773
+
1774
+ case 'ImageObject':
1775
+ $meta_field = array(
1776
+ array(
1777
+ 'label' => 'URL',
1778
+ 'id' => 'saswpimage_object_url_'.$schema_id,
1779
+ 'type' => 'text',
1780
+ 'default' => get_permalink()
1781
+ ),
1782
+ array(
1783
+ 'label' => 'Date Published',
1784
+ 'id' => 'saswpimage_object_date_published_'.$schema_id,
1785
+ 'type' => 'text',
1786
+ 'default' => get_the_date("Y-m-d")
1787
+ ),
1788
+ array(
1789
+ 'label' => 'Date date Modified',
1790
+ 'id' => 'saswpimage_object_date_modified_'.$schema_id,
1791
+ 'type' => 'text',
1792
+ 'default' => get_the_modified_date("Y-m-d")
1793
+ ),
1794
+ array(
1795
+ 'label' => 'Description',
1796
+ 'id' => 'saswpimage_object_description_'.$schema_id,
1797
+ 'type' => 'textarea',
1798
+ 'default' => get_the_excerpt()
1799
+ ),
1800
+ array(
1801
+ 'label' => 'Name',
1802
+ 'id' => 'saswpimage_object_name_'.$schema_id,
1803
+ 'type' => 'text',
1804
+ 'default' => saswp_get_the_title()
1805
+ ),
1806
+ array(
1807
+ 'label' => 'Upload Date',
1808
+ 'id' => 'saswpimage_object_upload_date_'.$schema_id,
1809
+ 'type' => 'text',
1810
+ 'default' => get_the_date("Y-m-d")
1811
+ ),
1812
+ array(
1813
+ 'label' => 'Content Url',
1814
+ 'id' => 'saswpimage_object_content_url_'.$schema_id,
1815
+ 'type' => 'text',
1816
+ 'default' => get_permalink()
1817
+ ),
1818
+ array(
1819
+ 'label' => 'Content Location',
1820
+ 'id' => 'saswpimage_object_content_location_'.$schema_id,
1821
+ 'type' => 'text'
1822
+ ),
1823
+ array(
1824
+ 'label' => 'Author Name',
1825
+ 'id' => 'saswpimage_object_author_name_'.$schema_id,
1826
+ 'type' => 'text',
1827
+ 'default' => $current_user->display_name
1828
+ ),
1829
+ array(
1830
+ 'label' => 'Author Description',
1831
+ 'id' => 'saswpimage_object_author_description_'.$schema_id,
1832
+ 'type' => 'textarea',
1833
+ 'default' => $author_desc
1834
+ ),
1835
+ array(
1836
+ 'label' => 'Author Image',
1837
+ 'id' => 'saswpimage_object_author_image_'.$schema_id,
1838
+ 'type' => 'media',
1839
+ 'default' => $author_details['url']
1840
+ ),
1841
+ array(
1842
+ 'label' => 'Organization Name',
1843
+ 'id' => 'saswpimage_object_organization_name_'.$schema_id,
1844
+ 'type' => 'text',
1845
+ 'default' => $sd_data['sd_name']
1846
+ ),
1847
+ array(
1848
+ 'label' => 'Organization Logo',
1849
+ 'id' => 'saswpimage_object_organization_logo_'.$schema_id,
1850
+ 'type' => 'media',
1851
+ 'default' => $sd_data['sd_logo']['url']
1852
+ ),
1853
+ );
1854
+ break;
1855
+
1856
+ case 'qanda':
1857
+
1858
+ $meta_field = array(
1859
+ array(
1860
+ 'label' => 'Question Title',
1861
+ 'id' => 'saswp_qa_question_title_'.$schema_id,
1862
+ 'type' => 'text',
1863
+ ),
1864
+ array(
1865
+ 'label' => 'Question Description',
1866
+ 'id' => 'saswp_qa_question_description_'.$schema_id,
1867
+ 'type' => 'text',
1868
+ ),
1869
+ array(
1870
+ 'label' => 'Question Upvote Count',
1871
+ 'id' => 'saswp_qa_upvote_count_'.$schema_id,
1872
+ 'type' => 'text',
1873
+ ),
1874
+ array(
1875
+ 'label' => 'Question Date Created',
1876
+ 'id' => 'saswp_qa_date_created_'.$schema_id,
1877
+ 'type' => 'text',
1878
+ ),
1879
+ array(
1880
+ 'label' => 'Author Name',
1881
+ 'id' => 'saswp_qa_question_author_name_'.$schema_id,
1882
+ 'type' => 'text',
1883
+ ),
1884
+ array(
1885
+ 'label' => 'Accepted Answer Text',
1886
+ 'id' => 'saswp_qa_accepted_answer_text_'.$schema_id,
1887
+ 'type' => 'text',
1888
+ ),
1889
+ array(
1890
+ 'label' => 'Accepted Answer Date Created',
1891
+ 'id' => 'saswp_qa_accepted_answer_date_created_'.$schema_id,
1892
+ 'type' => 'text',
1893
+ ),
1894
+ array(
1895
+ 'label' => 'Accepted Answer Upvote Count',
1896
+ 'id' => 'saswp_qa_accepted_answer_upvote_count_'.$schema_id,
1897
+ 'type' => 'text',
1898
+ ),
1899
+ array(
1900
+ 'label' => 'Accepted Answer Url',
1901
+ 'id' => 'saswp_qa_accepted_answer_url_'.$schema_id,
1902
+ 'type' => 'text',
1903
+ ),
1904
+ array(
1905
+ 'label' => 'Accepted Answer Author Name',
1906
+ 'id' => 'saswp_qa_accepted_author_name_'.$schema_id,
1907
+ 'type' => 'text',
1908
+ ),
1909
+
1910
+ array(
1911
+ 'label' => 'Suggested Answer Text',
1912
+ 'id' => 'saswp_qa_suggested_answer_text_'.$schema_id,
1913
+ 'type' => 'text',
1914
+ ),
1915
+ array(
1916
+ 'label' => 'Suggested Answer Date Created',
1917
+ 'id' => 'saswp_qa_suggested_answer_date_created_'.$schema_id,
1918
+ 'type' => 'text',
1919
+ ),
1920
+ array(
1921
+ 'label' => 'Suggested Answer Upvote Count',
1922
+ 'id' => 'saswp_qa_suggested_answer_upvote_count_'.$schema_id,
1923
+ 'type' => 'text',
1924
+ ),
1925
+ array(
1926
+ 'label' => 'Suggested Answer Url',
1927
+ 'id' => 'saswp_qa_suggested_answer_url_'.$schema_id,
1928
+ 'type' => 'text',
1929
+ ),
1930
+ array(
1931
+ 'label' => 'Suggested Answer Author Name',
1932
+ 'id' => 'saswp_qa_suggested_author_name_'.$schema_id,
1933
+ 'type' => 'text',
1934
+ ),
1935
+
1936
+ );
1937
+ break;
1938
+
1939
+ case 'HowTo':
1940
+
1941
+ $meta_field = array(
1942
+ array(
1943
+ 'label' => 'Name',
1944
+ 'id' => 'saswp_howto_schema_name_'.$schema_id,
1945
+ 'type' => 'text',
1946
+ 'attributes' => array(
1947
+ 'placeholder' => 'Name'
1948
+ ),
1949
+ ),
1950
+ array(
1951
+ 'label' => 'Description',
1952
+ 'id' => 'saswp_howto_schema_description_'.$schema_id,
1953
+ 'type' => 'textarea',
1954
+ ),
1955
+ array(
1956
+ 'label' => 'Image',
1957
+ 'id' => 'saswp_howto_schema_image_'.$schema_id,
1958
+ 'type' => 'media',
1959
+ ),
1960
+ array(
1961
+ 'label' => 'Estimated Cost Currency',
1962
+ 'id' => 'saswp_howto_ec_schema_currency_'.$schema_id,
1963
+ 'type' => 'text',
1964
+ 'attributes' => array(
1965
+ 'placeholder' => 'USD'
1966
+ ),
1967
+ ),
1968
+ array(
1969
+ 'label' => 'Estimated Cost Value',
1970
+ 'id' => 'saswp_howto_ec_schema_value_'.$schema_id,
1971
+ 'type' => 'text',
1972
+ 'attributes' => array(
1973
+ 'placeholder' => '20'
1974
+ ),
1975
+ ),
1976
+ array(
1977
+ 'label' => 'Total Time',
1978
+ 'id' => 'saswp_howto_schema_totaltime_'.$schema_id,
1979
+ 'type' => 'text',
1980
+ 'attributes' => array(
1981
+ 'placeholder' => 'PT30M'
1982
+ ),
1983
+ ),
1984
+ array(
1985
+ 'label' => 'Date Published',
1986
+ 'id' => 'saswp_howto_ec_schema_date_published_'.$schema_id,
1987
+ 'type' => 'text',
1988
+
1989
+ ),
1990
+ array(
1991
+ 'label' => 'Date Modified',
1992
+ 'id' => 'saswp_howto_ec_schema_date_modified_'.$schema_id,
1993
+ 'type' => 'text',
1994
+ )
1995
+ );
1996
+ break;
1997
+
1998
+ case 'MedicalCondition':
1999
+
2000
+ $meta_field = array(
2001
+ array(
2002
+ 'label' => 'Name',
2003
+ 'id' => 'saswp_mc_schema_name_'.$schema_id,
2004
+ 'type' => 'text',
2005
+ 'attributes' => array(
2006
+ 'placeholder' => 'Name'
2007
+ ),
2008
+ ),
2009
+ array(
2010
+ 'label' => 'Alternate Name',
2011
+ 'id' => 'saswp_mc_schema_alternate_name_'.$schema_id,
2012
+ 'type' => 'text',
2013
+ 'attributes' => array(
2014
+ 'placeholder' => 'Alternate Name'
2015
+ ),
2016
+ ),
2017
+ array(
2018
+ 'label' => 'Description',
2019
+ 'id' => 'saswp_mc_schema_description_'.$schema_id,
2020
+ 'type' => 'textarea',
2021
+ ),
2022
+ array(
2023
+ 'label' => 'Image',
2024
+ 'id' => 'saswp_mc_schema_image_'.$schema_id,
2025
+ 'type' => 'media',
2026
+ ),
2027
+ array(
2028
+ 'label' => 'Associated Anatomy Name',
2029
+ 'id' => 'saswp_mc_schema_anatomy_name_'.$schema_id,
2030
+ 'type' => 'text',
2031
+ 'attributes' => array(
2032
+ 'placeholder' => 'Name'
2033
+ ),
2034
+ ),
2035
+ array(
2036
+ 'label' => 'Medical Code',
2037
+ 'id' => 'saswp_mc_schema_medical_code_'.$schema_id,
2038
+ 'type' => 'text',
2039
+ 'attributes' => array(
2040
+ 'placeholder' => '413'
2041
+ ),
2042
+ ),
2043
+ array(
2044
+ 'label' => 'Coding System',
2045
+ 'id' => 'saswp_mc_schema_coding_system_'.$schema_id,
2046
+ 'type' => 'text',
2047
+ 'attributes' => array(
2048
+ 'placeholder' => 'ICD-9'
2049
+ ),
2050
+ ),
2051
+ array(
2052
+ 'label' => 'Diagnosis Name',
2053
+ 'id' => 'saswp_mc_schema_diagnosis_name_'.$schema_id,
2054
+ 'type' => 'text',
2055
+
2056
+ )
2057
+ );
2058
+ break;
2059
+
2060
+ case 'VideoGame':
2061
+
2062
+ $meta_field = array(
2063
+ array(
2064
+ 'label' => 'Name',
2065
+ 'id' => 'saswp_vg_schema_name_'.$schema_id,
2066
+ 'type' => 'text',
2067
+ 'attributes' => array(
2068
+ 'placeholder' => 'Name'
2069
+ ),
2070
+ ),
2071
+ array(
2072
+ 'label' => 'URL',
2073
+ 'id' => 'saswp_vg_schema_url_'.$schema_id,
2074
+ 'type' => 'text',
2075
+
2076
+ ),
2077
+ array(
2078
+ 'label' => 'Image',
2079
+ 'id' => 'saswp_vg_schema_image_'.$schema_id,
2080
+ 'type' => 'media',
2081
+
2082
+ ),
2083
+ array(
2084
+ 'label' => 'Description',
2085
+ 'id' => 'saswp_vg_schema_description_'.$schema_id,
2086
+ 'type' => 'textarea',
2087
+
2088
+ ),
2089
+ array(
2090
+ 'label' => 'Operating System',
2091
+ 'id' => 'saswp_vg_schema_operating_system_'.$schema_id,
2092
+ 'type' => 'text',
2093
+
2094
+ ),
2095
+ array(
2096
+ 'label' => 'Application Category',
2097
+ 'id' => 'saswp_vg_schema_application_category_'.$schema_id,
2098
+ 'type' => 'text',
2099
+
2100
+ ),
2101
+ array(
2102
+ 'label' => 'Author Name',
2103
+ 'id' => 'saswp_vg_schema_author_name_'.$schema_id,
2104
+ 'type' => 'text',
2105
+
2106
+ ),
2107
+ array(
2108
+ 'label' => 'Price',
2109
+ 'id' => 'saswp_vg_schema_price_'.$schema_id,
2110
+ 'type' => 'text',
2111
+
2112
+ ),
2113
+ array(
2114
+ 'label' => 'Price Currency',
2115
+ 'id' => 'saswp_vg_schema_price_currency_'.$schema_id,
2116
+ 'type' => 'text',
2117
+
2118
+ ),
2119
+ array(
2120
+ 'label' => 'Availability',
2121
+ 'id' => 'saswp_vg_schema_price_availability_'.$schema_id,
2122
+ 'type' => 'select',
2123
+ 'options' => array(
2124
+ 'InStock' => 'In Stock',
2125
+ 'OutOfStock' => 'Out Of Stock',
2126
+ 'Discontinued' => 'Discontinued',
2127
+ 'PreOrder' => 'Pre Order',
2128
+ )
2129
+ ),
2130
+ array(
2131
+ 'label' => 'Publisher',
2132
+ 'id' => 'saswp_vg_schema_publisher_'.$schema_id,
2133
+ 'type' => 'text',
2134
+
2135
+ ),
2136
+ array(
2137
+ 'label' => 'Genre',
2138
+ 'id' => 'saswp_vg_schema_genre_'.$schema_id,
2139
+ 'type' => 'text',
2140
+
2141
+ ),
2142
+ array(
2143
+ 'label' => 'Processor Requirements',
2144
+ 'id' => 'saswp_vg_schema_processor_requirements_'.$schema_id,
2145
+ 'type' => 'text',
2146
+
2147
+ ),
2148
+ array(
2149
+ 'label' => 'Memory Requirements',
2150
+ 'id' => 'saswp_vg_schema_memory_requirements_'.$schema_id,
2151
+ 'type' => 'text',
2152
+
2153
+ ),
2154
+ array(
2155
+ 'label' => 'Storage Requirements',
2156
+ 'id' => 'saswp_vg_schema_storage_requirements_'.$schema_id,
2157
+ 'type' => 'text',
2158
+
2159
+ ),
2160
+ array(
2161
+ 'label' => 'Game Platform',
2162
+ 'id' => 'saswp_vg_schema_game_platform_'.$schema_id,
2163
+ 'type' => 'text',
2164
+
2165
+ ),
2166
+ array(
2167
+ 'label' => 'Cheat Code',
2168
+ 'id' => 'saswp_vg_schema_cheat_code_'.$schema_id,
2169
+ 'type' => 'text',
2170
+
2171
+ ),
2172
+ array(
2173
+ 'label' => 'Aggregate Rating',
2174
+ 'id' => 'saswp_vg_schema_enable_rating_'.$schema_id,
2175
+ 'type' => 'checkbox',
2176
+ ),
2177
+ array(
2178
+ 'label' => 'Rating',
2179
+ 'id' => 'saswp_vg_schema_rating_'.$schema_id,
2180
+ 'type' => 'text',
2181
+ ),
2182
+ array(
2183
+ 'label' => 'Number of Reviews',
2184
+ 'id' => 'saswp_vg_schema_review_count_'.$schema_id,
2185
+ 'type' => 'text',
2186
+ ),
2187
+
2188
+ );
2189
+ break;
2190
+
2191
+ case 'TVSeries':
2192
+
2193
+ $meta_field = array(
2194
+ array(
2195
+ 'label' => 'Name',
2196
+ 'id' => 'saswp_tvseries_schema_name_'.$schema_id,
2197
+ 'type' => 'text',
2198
+ 'attributes' => array(
2199
+ 'placeholder' => 'Name'
2200
+ ),
2201
+ ),
2202
+ array(
2203
+ 'label' => 'Image',
2204
+ 'id' => 'saswp_tvseries_schema_image_'.$schema_id,
2205
+ 'type' => 'media'
2206
+ ),
2207
+ array(
2208
+ 'label' => 'Author Name',
2209
+ 'id' => 'saswp_tvseries_schema_author_name_'.$schema_id,
2210
+ 'type' => 'text',
2211
+ 'attributes' => array(
2212
+ 'placeholder' => 'Author Name'
2213
+ ),
2214
+ ),
2215
+ array(
2216
+ 'label' => 'Description',
2217
+ 'id' => 'saswp_tvseries_schema_description_'.$schema_id,
2218
+ 'type' => 'textarea'
2219
+ )
2220
+
2221
+ );
2222
+ break;
2223
+
2224
+ case 'Apartment':
2225
+
2226
+ $meta_field = array(
2227
+ array(
2228
+ 'label' => 'Name',
2229
+ 'id' => 'saswp_apartment_schema_name_'.$schema_id,
2230
+ 'type' => 'text',
2231
+ 'attributes' => array(
2232
+ 'placeholder' => 'Name'
2233
+ ),
2234
+ ),
2235
+ array(
2236
+ 'label' => 'URL',
2237
+ 'id' => 'saswp_apartment_schema_url_'.$schema_id,
2238
+ 'type' => 'text',
2239
+ 'default' => get_permalink()
2240
+ ),
2241
+ array(
2242
+ 'label' => 'Image',
2243
+ 'id' => 'saswp_apartment_schema_image_'.$schema_id,
2244
+ 'type' => 'media',
2245
+ 'default' => get_permalink()
2246
+ ),
2247
+ array(
2248
+ 'label' => 'Description',
2249
+ 'id' => 'saswp_apartment_schema_description_'.$schema_id,
2250
+ 'type' => 'textarea',
2251
+ 'attributes' => array(
2252
+ 'placeholder' => 'Description'
2253
+ ),
2254
+ ),
2255
+ array(
2256
+ 'label' => 'Number Of Rooms',
2257
+ 'id' => 'saswp_apartment_schema_numberofrooms_'.$schema_id,
2258
+ 'type' => 'text',
2259
+ 'attributes' => array(
2260
+ 'placeholder' => '5'
2261
+ ),
2262
+ ),
2263
+ array(
2264
+ 'label' => 'Floor Size',
2265
+ 'id' => 'saswp_apartment_schema_floor_size_'.$schema_id,
2266
+ 'type' => 'text',
2267
+ 'attributes' => array(
2268
+ 'placeholder' => '140 Sq.Ft'
2269
+ ),
2270
+ ),
2271
+ array(
2272
+ 'label' => 'Country',
2273
+ 'id' => 'saswp_apartment_schema_country_'.$schema_id,
2274
+ 'type' => 'text',
2275
+ ),
2276
+ array(
2277
+ 'label' => 'Locality',
2278
+ 'id' => 'saswp_apartment_schema_locality_'.$schema_id,
2279
+ 'type' => 'text',
2280
+ ),
2281
+ array(
2282
+ 'label' => 'Region',
2283
+ 'id' => 'saswp_apartment_schema_region_'.$schema_id,
2284
+ 'type' => 'text',
2285
+ ),
2286
+ array(
2287
+ 'label' => 'Postal Code',
2288
+ 'id' => 'saswp_apartment_schema_postalcode_'.$schema_id,
2289
+ 'type' => 'text',
2290
+ ),
2291
+ array(
2292
+ 'label' => 'Telephone',
2293
+ 'id' => 'saswp_apartment_schema_telephone_'.$schema_id,
2294
+ 'type' => 'text',
2295
+ ),
2296
+ array(
2297
+ 'label' => 'GeoCoordinates Latitude',
2298
+ 'id' => 'saswp_apartment_schema_latitude_'.$schema_id,
2299
+ 'type' => 'text',
2300
+ 'attributes' => array(
2301
+ 'placeholder' => '17.412'
2302
+ ),
2303
+ ),
2304
+ array(
2305
+ 'label' => 'GeoCoordinates Longitude',
2306
+ 'id' => 'saswp_apartment_schema_longitude_'.$schema_id,
2307
+ 'type' => 'text',
2308
+ 'attributes' => array(
2309
+ 'placeholder' => '78.433'
2310
+ ),
2311
+ ),
2312
+
2313
+ );
2314
+ break;
2315
+
2316
+ case 'House':
2317
+
2318
+ $meta_field = array(
2319
+ array(
2320
+ 'label' => 'Name',
2321
+ 'id' => 'saswp_house_schema_name_'.$schema_id,
2322
+ 'type' => 'text',
2323
+ 'attributes' => array(
2324
+ 'placeholder' => 'Name'
2325
+ ),
2326
+ ),
2327
+ array(
2328
+ 'label' => 'URL',
2329
+ 'id' => 'saswp_house_schema_url_'.$schema_id,
2330
+ 'type' => 'text',
2331
+ 'default' => get_permalink()
2332
+ ),
2333
+ array(
2334
+ 'label' => 'Image',
2335
+ 'id' => 'saswp_house_schema_image_'.$schema_id,
2336
+ 'type' => 'media',
2337
+ ),
2338
+ array(
2339
+ 'label' => 'Description',
2340
+ 'id' => 'saswp_house_schema_description_'.$schema_id,
2341
+ 'type' => 'textarea',
2342
+ 'attributes' => array(
2343
+ 'placeholder' => 'Description'
2344
+ ),
2345
+ ),
2346
+ array(
2347
+ 'label' => 'Pets Allowed',
2348
+ 'id' => 'saswp_house_schema_pets_allowed_'.$schema_id,
2349
+ 'type' => 'select',
2350
+ 'options' => array(
2351
+ 'yes' => 'Yes',
2352
+ 'no' => 'No'
2353
+ )
2354
+ ),
2355
+ array(
2356
+ 'label' => 'Country',
2357
+ 'id' => 'saswp_house_schema_country_'.$schema_id,
2358
+ 'type' => 'text',
2359
+ ),
2360
+ array(
2361
+ 'label' => 'Locality',
2362
+ 'id' => 'saswp_house_schema_locality_'.$schema_id,
2363
+ 'type' => 'text',
2364
+ ),
2365
+ array(
2366
+ 'label' => 'Region',
2367
+ 'id' => 'saswp_house_schema_region_'.$schema_id,
2368
+ 'type' => 'text',
2369
+ ),
2370
+ array(
2371
+ 'label' => 'Postal Code',
2372
+ 'id' => 'saswp_house_schema_postalcode_'.$schema_id,
2373
+ 'type' => 'text',
2374
+ ),
2375
+ array(
2376
+ 'label' => 'Telephone',
2377
+ 'id' => 'saswp_house_schema_telephone_'.$schema_id,
2378
+ 'type' => 'text',
2379
+ ),
2380
+ array(
2381
+ 'label' => 'Has Map',
2382
+ 'id' => 'saswp_house_schema_hasmap_'.$schema_id,
2383
+ 'type' => 'text',
2384
+ ),
2385
+ array(
2386
+ 'label' => 'Floor Size',
2387
+ 'id' => 'saswp_house_schema_floor_size_'.$schema_id,
2388
+ 'type' => 'text',
2389
+ ),
2390
+ array(
2391
+ 'label' => 'Number of Rooms',
2392
+ 'id' => 'saswp_house_schema_no_of_rooms_'.$schema_id,
2393
+ 'type' => 'text',
2394
+ )
2395
+ );
2396
+ break;
2397
+
2398
+ case 'SingleFamilyResidence':
2399
+
2400
+ $meta_field = array(
2401
+ array(
2402
+ 'label' => 'Name',
2403
+ 'id' => 'saswp_sfr_schema_name_'.$schema_id,
2404
+ 'type' => 'text',
2405
+ 'attributes' => array(
2406
+ 'placeholder' => 'Name'
2407
+ ),
2408
+ ),
2409
+ array(
2410
+ 'label' => 'URL',
2411
+ 'id' => 'saswp_sfr_schema_url_'.$schema_id,
2412
+ 'type' => 'text',
2413
+ 'default' => get_permalink()
2414
+ ),
2415
+ array(
2416
+ 'label' => 'Image',
2417
+ 'id' => 'saswp_sfr_schema_image_'.$schema_id,
2418
+ 'type' => 'media',
2419
+ ),
2420
+ array(
2421
+ 'label' => 'Description',
2422
+ 'id' => 'saswp_sfr_schema_description_'.$schema_id,
2423
+ 'type' => 'textarea',
2424
+ 'attributes' => array(
2425
+ 'placeholder' => 'Description'
2426
+ ),
2427
+ ),
2428
+ array(
2429
+ 'label' => 'Number Of Rooms',
2430
+ 'id' => 'saswp_sfr_schema_numberofrooms_'.$schema_id,
2431
+ 'type' => 'text',
2432
+ 'attributes' => array(
2433
+ 'placeholder' => '5'
2434
+ ),
2435
+ ),
2436
+ array(
2437
+ 'label' => 'Pets Allowed',
2438
+ 'id' => 'saswp_sfr_schema_pets_allowed_'.$schema_id,
2439
+ 'type' => 'select',
2440
+ 'options' => array(
2441
+ 'yes' => 'Yes',
2442
+ 'no' => 'No'
2443
+ )
2444
+ ),
2445
+ array(
2446
+ 'label' => 'Country',
2447
+ 'id' => 'saswp_sfr_schema_country_'.$schema_id,
2448
+ 'type' => 'text',
2449
+ ),
2450
+ array(
2451
+ 'label' => 'Locality',
2452
+ 'id' => 'saswp_sfr_schema_locality_'.$schema_id,
2453
+ 'type' => 'text',
2454
+ ),
2455
+ array(
2456
+ 'label' => 'Region',
2457
+ 'id' => 'saswp_sfr_schema_region_'.$schema_id,
2458
+ 'type' => 'text',
2459
+ ),
2460
+ array(
2461
+ 'label' => 'Postal Code',
2462
+ 'id' => 'saswp_sfr_schema_postalcode_'.$schema_id,
2463
+ 'type' => 'text',
2464
+ ),
2465
+ array(
2466
+ 'label' => 'Telephone',
2467
+ 'id' => 'saswp_sfr_schema_telephone_'.$schema_id,
2468
+ 'type' => 'text',
2469
+ ),
2470
+ array(
2471
+ 'label' => 'Has Map',
2472
+ 'id' => 'saswp_sfr_schema_hasmap_'.$schema_id,
2473
+ 'type' => 'text',
2474
+ ),
2475
+ array(
2476
+ 'label' => 'Floor Size',
2477
+ 'id' => 'saswp_sfr_schema_floor_size_'.$schema_id,
2478
+ 'type' => 'text',
2479
+ ),
2480
+ array(
2481
+ 'label' => 'Number of Rooms',
2482
+ 'id' => 'saswp_sfr_schema_no_of_rooms_'.$schema_id,
2483
+ 'type' => 'text',
2484
+ )
2485
+
2486
+ );
2487
+ break;
2488
+
2489
+ case 'TouristAttraction':
2490
+
2491
+ $meta_field = array(
2492
+ array(
2493
+ 'label' => 'Name',
2494
+ 'id' => 'saswp_ta_schema_name_'.$schema_id,
2495
+ 'type' => 'text',
2496
+ 'attributes' => array(
2497
+ 'placeholder' => 'Name'
2498
+ ),
2499
+ ),
2500
+ array(
2501
+ 'label' => 'Description',
2502
+ 'id' => 'saswp_ta_schema_description_'.$schema_id,
2503
+ 'type' => 'textarea',
2504
+ 'attributes' => array(
2505
+ 'placeholder' => 'Description'
2506
+ ),
2507
+ ),
2508
+ array(
2509
+ 'label' => 'Image',
2510
+ 'id' => 'saswp_ta_schema_image_'.$schema_id,
2511
+ 'type' => 'media',
2512
+ ),
2513
+ array(
2514
+ 'label' => 'URL',
2515
+ 'id' => 'saswp_ta_schema_url_'.$schema_id,
2516
+ 'type' => 'text',
2517
+ 'default' => get_permalink()
2518
+ ),
2519
+ array(
2520
+ 'label' => 'Is Accessible For Free',
2521
+ 'id' => 'saswp_ta_schema_is_acceesible_free_'.$schema_id,
2522
+ 'type' => 'select',
2523
+ 'options' => array(
2524
+ 'true' => 'True',
2525
+ 'false' => 'False',
2526
+ ),
2527
+ ),
2528
+ array(
2529
+ 'label' => 'Address Locality',
2530
+ 'id' => 'saswp_ta_schema_locality_'.$schema_id,
2531
+ 'type' => 'text',
2532
+ ),
2533
+ array(
2534
+ 'label' => 'Address Region',
2535
+ 'id' => 'saswp_ta_schema_region_'.$schema_id,
2536
+ 'type' => 'text',
2537
+ ),
2538
+ array(
2539
+ 'label' => 'Address Country',
2540
+ 'id' => 'saswp_ta_schema_country_'.$schema_id,
2541
+ 'type' => 'text',
2542
+ ),
2543
+ array(
2544
+ 'label' => 'Address PostalCode',
2545
+ 'id' => 'saswp_ta_schema_postal_code_'.$schema_id,
2546
+ 'type' => 'text',
2547
+ ),
2548
+ array(
2549
+ 'label' => 'Latitude',
2550
+ 'id' => 'saswp_ta_schema_latitude_'.$schema_id,
2551
+ 'type' => 'text',
2552
+ ),
2553
+ array(
2554
+ 'label' => 'Longitude',
2555
+ 'id' => 'saswp_ta_schema_longitude_'.$schema_id,
2556
+ 'type' => 'text',
2557
+ ),
2558
+
2559
+ );
2560
+ break;
2561
+
2562
+ case 'TouristDestination':
2563
+
2564
+ $meta_field = array(
2565
+ array(
2566
+ 'label' => 'Name',
2567
+ 'id' => 'saswp_td_schema_name_'.$schema_id,
2568
+ 'type' => 'text',
2569
+ 'attributes' => array(
2570
+ 'placeholder' => 'Name'
2571
+ ),
2572
+ ),
2573
+ array(
2574
+ 'label' => 'Description',
2575
+ 'id' => 'saswp_td_schema_description_'.$schema_id,
2576
+ 'type' => 'textarea',
2577
+ 'attributes' => array(
2578
+ 'placeholder' => 'Description'
2579
+ ),
2580
+ ),
2581
+ array(
2582
+ 'label' => 'Image',
2583
+ 'id' => 'saswp_td_schema_image_'.$schema_id,
2584
+ 'type' => 'media',
2585
+ ),
2586
+ array(
2587
+ 'label' => 'URL',
2588
+ 'id' => 'saswp_td_schema_url_'.$schema_id,
2589
+ 'type' => 'text',
2590
+ 'default' => get_permalink()
2591
+ ),
2592
+ array(
2593
+ 'label' => 'Address Locality',
2594
+ 'id' => 'saswp_td_schema_locality_'.$schema_id,
2595
+ 'type' => 'text',
2596
+ ),
2597
+ array(
2598
+ 'label' => 'Address Region',
2599
+ 'id' => 'saswp_td_schema_region_'.$schema_id,
2600
+ 'type' => 'text',
2601
+ ),
2602
+ array(
2603
+ 'label' => 'Address Country',
2604
+ 'id' => 'saswp_td_schema_country_'.$schema_id,
2605
+ 'type' => 'text',
2606
+ ),
2607
+ array(
2608
+ 'label' => 'Address PostalCode',
2609
+ 'id' => 'saswp_td_schema_postal_code_'.$schema_id,
2610
+ 'type' => 'text',
2611
+ ),
2612
+ array(
2613
+ 'label' => 'Latitude',
2614
+ 'id' => 'saswp_td_schema_latitude_'.$schema_id,
2615
+ 'type' => 'text',
2616
+ ),
2617
+ array(
2618
+ 'label' => 'Longitude',
2619
+ 'id' => 'saswp_td_schema_longitude_'.$schema_id,
2620
+ 'type' => 'text',
2621
+ ),
2622
+
2623
+ );
2624
+ break;
2625
+
2626
+ case 'LandmarksOrHistoricalBuildings':
2627
+
2628
+ $meta_field = array(
2629
+ array(
2630
+ 'label' => 'Name',
2631
+ 'id' => 'saswp_lorh_schema_name_'.$schema_id,
2632
+ 'type' => 'text',
2633
+ 'attributes' => array(
2634
+ 'placeholder' => 'Name'
2635
+ ),
2636
+ ),
2637
+ array(
2638
+ 'label' => 'Description',
2639
+ 'id' => 'saswp_lorh_schema_description_'.$schema_id,
2640
+ 'type' => 'textarea',
2641
+ 'attributes' => array(
2642
+ 'placeholder' => 'Description'
2643
+ ),
2644
+ ),
2645
+ array(
2646
+ 'label' => 'Image',
2647
+ 'id' => 'saswp_lorh_schema_image_'.$schema_id,
2648
+ 'type' => 'media',
2649
+ ),
2650
+ array(
2651
+ 'label' => 'URL',
2652
+ 'id' => 'saswp_lorh_schema_url_'.$schema_id,
2653
+ 'type' => 'text',
2654
+ 'default' => get_permalink()
2655
+ ),
2656
+ array(
2657
+ 'label' => 'Has Map',
2658
+ 'id' => 'saswp_lorh_schema_hasmap_'.$schema_id,
2659
+ 'type' => 'text',
2660
+ ),
2661
+ array(
2662
+ 'label' => 'Is Accessible For Free',
2663
+ 'id' => 'saswp_lorh_schema_is_acceesible_free_'.$schema_id,
2664
+ 'type' => 'select',
2665
+ 'options' => array(
2666
+ 'true' => 'True',
2667
+ 'false' => 'False',
2668
+ )
2669
+ ),
2670
+ array(
2671
+ 'label' => 'Maximum Attendee Capacity',
2672
+ 'id' => 'saswp_lorh_schema_maximum_a_capacity_'.$schema_id,
2673
+ 'type' => 'number',
2674
+ ),
2675
+ array(
2676
+ 'label' => 'Address Locality',
2677
+ 'id' => 'saswp_lorh_schema_locality_'.$schema_id,
2678
+ 'type' => 'text',
2679
+ ),
2680
+ array(
2681
+ 'label' => 'Address Region',
2682
+ 'id' => 'saswp_lorh_schema_region_'.$schema_id,
2683
+ 'type' => 'text',
2684
+ ),
2685
+ array(
2686
+ 'label' => 'Address Country',
2687
+ 'id' => 'saswp_lorh_schema_country_'.$schema_id,
2688
+ 'type' => 'text',
2689
+ ),
2690
+ array(
2691
+ 'label' => 'Address PostalCode',
2692
+ 'id' => 'saswp_lorh_schema_postal_code_'.$schema_id,
2693
+ 'type' => 'text',
2694
+ ),
2695
+ array(
2696
+ 'label' => 'Latitude',
2697
+ 'id' => 'saswp_lorh_schema_latitude_'.$schema_id,
2698
+ 'type' => 'text',
2699
+ ),
2700
+ array(
2701
+ 'label' => 'Longitude',
2702
+ 'id' => 'saswp_lorh_schema_longitude_'.$schema_id,
2703
+ 'type' => 'text',
2704
+ ),
2705
+
2706
+ );
2707
+ break;
2708
+
2709
+ case 'HinduTemple':
2710
+
2711
+ $meta_field = array(
2712
+ array(
2713
+ 'label' => 'Name',
2714
+ 'id' => 'saswp_hindutemple_schema_name_'.$schema_id,
2715
+ 'type' => 'text',
2716
+ 'attributes' => array(
2717
+ 'placeholder' => 'Name'
2718
+ ),
2719
+ ),
2720
+ array(
2721
+ 'label' => 'Description',
2722
+ 'id' => 'saswp_hindutemple_schema_description_'.$schema_id,
2723
+ 'type' => 'textarea',
2724
+ 'attributes' => array(
2725
+ 'placeholder' => 'Description'
2726
+ ),
2727
+ ),
2728
+ array(
2729
+ 'label' => 'Image',
2730
+ 'id' => 'saswp_hindutemple_schema_image_'.$schema_id,
2731
+ 'type' => 'media',
2732
+ ),
2733
+ array(
2734
+ 'label' => 'URL',
2735
+ 'id' => 'saswp_hindutemple_schema_url_'.$schema_id,
2736
+ 'type' => 'text',
2737
+ 'default' => get_permalink()
2738
+ ),
2739
+ array(
2740
+ 'label' => 'Has Map',
2741
+ 'id' => 'saswp_hindutemple_schema_hasmap_'.$schema_id,
2742
+ 'type' => 'text',
2743
+ ),
2744
+ array(
2745
+ 'label' => 'Is Accessible For Free',
2746
+ 'id' => 'saswp_hindutemple_schema_is_accesible_free_'.$schema_id,
2747
+ 'type' => 'select',
2748
+ 'options' => array(
2749
+ 'true' => 'True',
2750
+ 'false' => 'False',
2751
+ )
2752
+ ),
2753
+ array(
2754
+ 'label' => 'Maximum Attendee Capacity',
2755
+ 'id' => 'saswp_hindutemple_schema_maximum_a_capacity_'.$schema_id,
2756
+ 'type' => 'text',
2757
+ ),
2758
+ array(
2759
+ 'label' => 'Address Locality',
2760
+ 'id' => 'saswp_hindutemple_schema_locality_'.$schema_id,
2761
+ 'type' => 'text',
2762
+ ),
2763
+ array(
2764
+ 'label' => 'Address Region',
2765
+ 'id' => 'saswp_hindutemple_schema_region_'.$schema_id,
2766
+ 'type' => 'text',
2767
+ ),
2768
+ array(
2769
+ 'label' => 'Address Country',
2770
+ 'id' => 'saswp_hindutemple_schema_country_'.$schema_id,
2771
+ 'type' => 'text',
2772
+ ),
2773
+ array(
2774
+ 'label' => 'Address PostalCode',
2775
+ 'id' => 'saswp_hindutemple_schema_postal_code_'.$schema_id,
2776
+ 'type' => 'text',
2777
+ ),
2778
+ array(
2779
+ 'label' => 'Latitude',
2780
+ 'id' => 'saswp_hindutemple_schema_latitude_'.$schema_id,
2781
+ 'type' => 'text',
2782
+ ),
2783
+ array(
2784
+ 'label' => 'Longitude',
2785
+ 'id' => 'saswp_hindutemple_schema_longitude_'.$schema_id,
2786
+ 'type' => 'text',
2787
+ ),
2788
+
2789
+ );
2790
+ break;
2791
+
2792
+ case 'Church':
2793
+
2794
+ $meta_field = array(
2795
+ array(
2796
+ 'label' => 'Name',
2797
+ 'id' => 'saswp_church_schema_name_'.$schema_id,
2798
+ 'type' => 'text',
2799
+ 'attributes' => array(
2800
+ 'placeholder' => 'Name'
2801
+ ),
2802
+ ),
2803
+ array(
2804
+ 'label' => 'Description',
2805
+ 'id' => 'saswp_church_schema_description_'.$schema_id,
2806
+ 'type' => 'textarea',
2807
+ 'attributes' => array(
2808
+ 'placeholder' => 'Description'
2809
+ ),
2810
+ ),
2811
+ array(
2812
+ 'label' => 'Image',
2813
+ 'id' => 'saswp_church_schema_image_'.$schema_id,
2814
+ 'type' => 'media',
2815
+ ),
2816
+ array(
2817
+ 'label' => 'URL',
2818
+ 'id' => 'saswp_church_schema_url_'.$schema_id,
2819
+ 'type' => 'text',
2820
+ 'default' => get_permalink()
2821
+ ),
2822
+ array(
2823
+ 'label' => 'Has Map',
2824
+ 'id' => 'saswp_church_schema_hasmap_'.$schema_id,
2825
+ 'type' => 'text',
2826
+ ),
2827
+ array(
2828
+ 'label' => 'Is Accessible For Free',
2829
+ 'id' => 'saswp_church_schema_is_accesible_free_'.$schema_id,
2830
+ 'type' => 'select',
2831
+ 'options' => array(
2832
+ 'true' => 'True',
2833
+ 'false' => 'False',
2834
+ )
2835
+ ),
2836
+ array(
2837
+ 'label' => 'Maximum Attendee Capacity',
2838
+ 'id' => 'saswp_church_schema_maximum_a_capacity_'.$schema_id,
2839
+ 'type' => 'text',
2840
+ ),
2841
+ array(
2842
+ 'label' => 'Address Locality',
2843
+ 'id' => 'saswp_church_schema_locality_'.$schema_id,
2844
+ 'type' => 'text',
2845
+ ),
2846
+ array(
2847
+ 'label' => 'Address Region',
2848
+ 'id' => 'saswp_church_schema_region_'.$schema_id,
2849
+ 'type' => 'text',
2850
+ ),
2851
+ array(
2852
+ 'label' => 'Address Country',
2853
+ 'id' => 'saswp_church_schema_country_'.$schema_id,
2854
+ 'type' => 'text',
2855
+ ),
2856
+ array(
2857
+ 'label' => 'Address PostalCode',
2858
+ 'id' => 'saswp_church_schema_postal_code_'.$schema_id,
2859
+ 'type' => 'text',
2860
+ ),
2861
+ array(
2862
+ 'label' => 'Latitude',
2863
+ 'id' => 'saswp_church_schema_latitude_'.$schema_id,
2864
+ 'type' => 'text',
2865
+ ),
2866
+ array(
2867
+ 'label' => 'Longitude',
2868
+ 'id' => 'saswp_church_schema_longitude_'.$schema_id,
2869
+ 'type' => 'text',
2870
+ ),
2871
+
2872
+ );
2873
+ break;
2874
+
2875
+ case 'Mosque':
2876
+
2877
+ $meta_field = array(
2878
+ array(
2879
+ 'label' => 'Name',
2880
+ 'id' => 'saswp_mosque_schema_name_'.$schema_id,
2881
+ 'type' => 'text',
2882
+ 'attributes' => array(
2883
+ 'placeholder' => 'Name'
2884
+ ),
2885
+ ),
2886
+ array(
2887
+ 'label' => 'Description',
2888
+ 'id' => 'saswp_mosque_schema_description_'.$schema_id,
2889
+ 'type' => 'textarea',
2890
+ 'attributes' => array(
2891
+ 'placeholder' => 'Description'
2892
+ ),
2893
+ ),
2894
+ array(
2895
+ 'label' => 'Image',
2896
+ 'id' => 'saswp_mosque_schema_image_'.$schema_id,
2897
+ 'type' => 'media',
2898
+ ),
2899
+ array(
2900
+ 'label' => 'URL',
2901
+ 'id' => 'saswp_mosque_schema_url_'.$schema_id,
2902
+ 'type' => 'text',
2903
+ 'default' => get_permalink()
2904
+ ),
2905
+ array(
2906
+ 'label' => 'Has Map',
2907
+ 'id' => 'saswp_mosque_schema_hasmap_'.$schema_id,
2908
+ 'type' => 'text',
2909
+ ),
2910
+ array(
2911
+ 'label' => 'Is Accessible For Free',
2912
+ 'id' => 'saswp_mosque_schema_is_accesible_free_'.$schema_id,
2913
+ 'type' => 'select',
2914
+ 'options' => array(
2915
+ 'true' => 'True',
2916
+ 'false' => 'False',
2917
+ )
2918
+ ),
2919
+ array(
2920
+ 'label' => 'Maximum Attendee Capacity',
2921
+ 'id' => 'saswp_mosque_schema_maximum_a_capacity_'.$schema_id,
2922
+ 'type' => 'text',
2923
+ ),
2924
+ array(
2925
+ 'label' => 'Address Locality',
2926
+ 'id' => 'saswp_mosque_schema_locality_'.$schema_id,
2927
+ 'type' => 'text',
2928
+ ),
2929
+ array(
2930
+ 'label' => 'Address Region',
2931
+ 'id' => 'saswp_mosque_schema_region_'.$schema_id,
2932
+ 'type' => 'text',
2933
+ ),
2934
+ array(
2935
+ 'label' => 'Address Country',
2936
+ 'id' => 'saswp_mosque_schema_country_'.$schema_id,
2937
+ 'type' => 'text',
2938
+ ),
2939
+ array(
2940
+ 'label' => 'Address PostalCode',
2941
+ 'id' => 'saswp_mosque_schema_postal_code_'.$schema_id,
2942
+ 'type' => 'text',
2943
+ ),
2944
+ array(
2945
+ 'label' => 'Latitude',
2946
+ 'id' => 'saswp_mosque_schema_latitude_'.$schema_id,
2947
+ 'type' => 'text',
2948
+ ),
2949
+ array(
2950
+ 'label' => 'Longitude',
2951
+ 'id' => 'saswp_mosque_schema_longitude_'.$schema_id,
2952
+ 'type' => 'text',
2953
+ ),
2954
+
2955
+ );
2956
+ break;
2957
+
2958
+ case 'JobPosting':
2959
+
2960
+ $meta_field = array(
2961
+ array(
2962
+ 'label' => 'Title',
2963
+ 'id' => 'saswp_jobposting_schema_title_'.$schema_id,
2964
+ 'type' => 'text',
2965
+ 'attributes' => array(
2966
+ 'placeholder' => 'Title'
2967
+ ),
2968
+ ),
2969
+ array(
2970
+ 'label' => 'Description',
2971
+ 'id' => 'saswp_jobposting_schema_description_'.$schema_id,
2972
+ 'type' => 'textarea',
2973
+ 'attributes' => array(
2974
+ 'placeholder' => 'Description'
2975
+ ),
2976
+ ),
2977
+ array(
2978
+ 'label' => 'URL',
2979
+ 'id' => 'saswp_jobposting_schema_url_'.$schema_id,
2980
+ 'type' => 'text',
2981
+ 'default' => get_permalink()
2982
+ ),
2983
+ array(
2984
+ 'label' => 'Date Posted',
2985
+ 'id' => 'saswp_jobposting_schema_dateposted_'.$schema_id,
2986
+ 'type' => 'text',
2987
+ ),
2988
+ array(
2989
+ 'label' => 'Valid Through',
2990
+ 'id' => 'saswp_jobposting_schema_validthrough_'.$schema_id,
2991
+ 'type' => 'text',
2992
+ ),
2993
+ array(
2994
+ 'label' => 'Employment Type',
2995
+ 'id' => 'saswp_jobposting_schema_employment_type_'.$schema_id,
2996
+ 'type' => 'select',
2997
+ 'options' => array(
2998
+ 'Full-Time' => 'Full-Time',
2999
+ 'Part-Time' => 'Part-Time',
3000
+ 'Contractor' => 'Contractor',
3001
+ )
3002
+ ),
3003
+ array(
3004
+ 'label' => 'Hiring Organization Name',
3005
+ 'id' => 'saswp_jobposting_schema_ho_name_'.$schema_id,
3006
+ 'type' => 'text',
3007
+ ),
3008
+ array(
3009
+ 'label' => 'Hiring Organization URL',
3010
+ 'id' => 'saswp_jobposting_schema_ho_url_'.$schema_id,
3011
+ 'type' => 'text',
3012
+ ),
3013
+ array(
3014
+ 'label' => 'Hiring Organization Logo',
3015
+ 'id' => 'saswp_jobposting_schema_ho_logo_'.$schema_id,
3016
+ 'type' => 'media',
3017
+ ),
3018
+ array(
3019
+ 'label' => 'Street Address',
3020
+ 'id' => 'saswp_jobposting_schema_street_address_'.$schema_id,
3021
+ 'type' => 'text',
3022
+ ),
3023
+ array(
3024
+ 'label' => 'Address Locality',
3025
+ 'id' => 'saswp_jobposting_schema_locality_'.$schema_id,
3026
+ 'type' => 'text',
3027
+ ),
3028
+ array(
3029
+ 'label' => 'Address Region',
3030
+ 'id' => 'saswp_jobposting_schema_region_'.$schema_id,
3031
+ 'type' => 'text',
3032
+ ),
3033
+ array(
3034
+ 'label' => 'Address Postal Code',
3035
+ 'id' => 'saswp_jobposting_schema_postalcode_'.$schema_id,
3036
+ 'type' => 'text',
3037
+ ),
3038
+ array(
3039
+ 'label' => 'Address Country',
3040
+ 'id' => 'saswp_jobposting_schema_country_'.$schema_id,
3041
+ 'type' => 'text',
3042
+ ),
3043
+ array(
3044
+ 'label' => 'Base Salary Currency',
3045
+ 'id' => 'saswp_jobposting_schema_bs_currency_'.$schema_id,
3046
+ 'type' => 'text',
3047
+ 'attributes' => array(
3048
+ 'placeholder' => 'USD'
3049
+ )
3050
+ ),
3051
+ array(
3052
+ 'label' => 'Base Salary Value',
3053
+ 'id' => 'saswp_jobposting_schema_bs_value_'.$schema_id,
3054
+ 'type' => 'text',
3055
+ 'attributes' => array(
3056
+ 'placeholder' => '40.00'
3057
+ )
3058
+ ),
3059
+ array(
3060
+ 'label' => 'Base Salary Unit Text',
3061
+ 'id' => 'saswp_jobposting_schema_bs_unittext_'.$schema_id,
3062
+ 'type' => 'text',
3063
+ 'attributes' => array(
3064
+ 'placeholder' => 'Hour'
3065
+ )
3066
+ ),
3067
+
3068
+
3069
+ );
3070
+ break;
3071
+
3072
+ case 'Trip':
3073
+
3074
+ $meta_field = array(
3075
+ array(
3076
+ 'label' => 'Name',
3077
+ 'id' => 'saswp_trip_schema_name_'.$schema_id,
3078
+ 'type' => 'text',
3079
+ 'attributes' => array(
3080
+ 'placeholder' => 'Name'
3081
+ ),
3082
+ ),
3083
+ array(
3084
+ 'label' => 'Description',
3085
+ 'id' => 'saswp_trip_schema_description_'.$schema_id,
3086
+ 'type' => 'textarea',
3087
+ 'attributes' => array(
3088
+ 'placeholder' => 'Description'
3089
+ )
3090
+ ),
3091
+ array(
3092
+ 'label' => 'URL',
3093
+ 'id' => 'saswp_trip_schema_url_'.$schema_id,
3094
+ 'type' => 'text',
3095
+ 'default' => get_permalink()
3096
+ ),
3097
+ array(
3098
+ 'label' => 'Image',
3099
+ 'id' => 'saswp_trip_schema_image_'.$schema_id,
3100
+ 'type' => 'media'
3101
+ )
3102
+
3103
+
3104
+ );
3105
+ break;
3106
+
3107
+ case 'FAQ':
3108
+
3109
+ $meta_field = array(
3110
+ array(
3111
+ 'label' => 'Headline',
3112
+ 'id' => 'saswp_faq_headline_'.$schema_id,
3113
+ 'type' => 'text'
3114
+ ),
3115
+ array(
3116
+ 'label' => 'Tags',
3117
+ 'id' => 'saswp_faq_keywords_'.$schema_id,
3118
+ 'type' => 'text'
3119
+ ),
3120
+ array(
3121
+ 'label' => 'Author',
3122
+ 'id' => 'saswp_faq_author_'.$schema_id,
3123
+ 'type' => 'text'
3124
+ ),
3125
+ array(
3126
+ 'label' => 'DateCreated',
3127
+ 'id' => 'saswp_faq_date_created_'.$schema_id,
3128
+ 'type' => 'text'
3129
+ ),
3130
+ array(
3131
+ 'label' => 'DatePublished',
3132
+ 'id' => 'saswp_faq_date_published_'.$schema_id,
3133
+ 'type' => 'text'
3134
+ ),
3135
+ array(
3136
+ 'label' => 'DateModified',
3137
+ 'id' => 'saswp_faq_date_modified_'.$schema_id,
3138
+ 'type' => 'text'
3139
+ )
3140
+ );
3141
+
3142
+ break;
3143
+
3144
+ case 'Person':
3145
+
3146
+ $meta_field = array(
3147
+ array(
3148
+ 'label' => 'Name',
3149
+ 'id' => 'saswp_person_schema_name_'.$schema_id,
3150
+ 'type' => 'text',
3151
+ ),
3152
+ array(
3153
+ 'label' => 'Description',
3154
+ 'id' => 'saswp_person_schema_description_'.$schema_id,
3155
+ 'type' => 'textarea',
3156
+ ),
3157
+ array(
3158
+ 'label' => 'URL',
3159
+ 'id' => 'saswp_person_schema_url_'.$schema_id,
3160
+ 'type' => 'text',
3161
+ 'default' => get_permalink()
3162
+ ),
3163
+ array(
3164
+ 'label' => 'Street Address',
3165
+ 'id' => 'saswp_person_schema_street_address_'.$schema_id,
3166
+ 'type' => 'text',
3167
+
3168
+ ),
3169
+ array(
3170
+ 'label' => 'Locality',
3171
+ 'id' => 'saswp_person_schema_locality_'.$schema_id,
3172
+ 'type' => 'text',
3173
+
3174
+ ),
3175
+ array(
3176
+ 'label' => 'Region',
3177
+ 'id' => 'saswp_person_schema_region_'.$schema_id,
3178
+ 'type' => 'text',
3179
+ ),
3180
+ array(
3181
+ 'label' => 'Postal Code',
3182
+ 'id' => 'saswp_person_schema_postal_code_'.$schema_id,
3183
+ 'type' => 'text',
3184
+ ),
3185
+ array(
3186
+ 'label' => 'Country',
3187
+ 'id' => 'saswp_person_schema_country_'.$schema_id,
3188
+ 'type' => 'text',
3189
+ ),
3190
+ array(
3191
+ 'label' => 'Email',
3192
+ 'id' => 'saswp_person_schema_email_'.$schema_id,
3193
+ 'type' => 'text',
3194
+ ),
3195
+ array(
3196
+ 'label' => 'Telephone',
3197
+ 'id' => 'saswp_person_schema_telephone_'.$schema_id,
3198
+ 'type' => 'text',
3199
+ ),
3200
+ array(
3201
+ 'label' => 'Gender',
3202
+ 'id' => 'saswp_person_schema_gender_'.$schema_id,
3203
+ 'type' => 'select',
3204
+ 'options' => array(
3205
+ 'Male' => 'Male',
3206
+ 'Female' => 'Female',
3207
+ )
3208
+ ),
3209
+ array(
3210
+ 'label' => 'Date Of Birth',
3211
+ 'id' => 'saswp_person_schema_date_of_birth_'.$schema_id,
3212
+ 'type' => 'text',
3213
+ ),
3214
+ array(
3215
+ 'label' => 'Member Of',
3216
+ 'id' => 'saswp_person_schema_member_of_'.$schema_id,
3217
+ 'type' => 'text',
3218
+ ),
3219
+ array(
3220
+ 'label' => 'Nationality',
3221
+ 'id' => 'saswp_person_schema_nationality_'.$schema_id,
3222
+ 'type' => 'text',
3223
+ ),
3224
+ array(
3225
+ 'label' => 'Image',
3226
+ 'id' => 'saswp_person_schema_image_'.$schema_id,
3227
+ 'type' => 'media',
3228
+ ),
3229
+ array(
3230
+ 'label' => 'Job Title',
3231
+ 'id' => 'saswp_person_schema_job_title_'.$schema_id,
3232
+ 'type' => 'text',
3233
+ ),
3234
+ array(
3235
+ 'label' => 'Company',
3236
+ 'id' => 'saswp_person_schema_company_'.$schema_id,
3237
+ 'type' => 'text',
3238
+ ),
3239
+ array(
3240
+ 'label' => 'Website',
3241
+ 'id' => 'saswp_person_schema_website_'.$schema_id,
3242
+ 'type' => 'text',
3243
+ ),
3244
+
3245
+ );
3246
+ break;
3247
+
3248
+ case 'DataFeed':
3249
+
3250
+ $meta_field = array(
3251
+ array(
3252
+ 'label' => 'Name',
3253
+ 'id' => 'saswp_data_feed_schema_name_'.$schema_id,
3254
+ 'type' => 'text',
3255
+ ),
3256
+ array(
3257
+ 'label' => 'Description',
3258
+ 'id' => 'saswp_data_feed_schema_description_'.$schema_id,
3259
+ 'type' => 'text',
3260
+ ),
3261
+ array(
3262
+ 'label' => 'DateModified',
3263
+ 'id' => 'saswp_data_feed_schema_date_modified_'.$schema_id,
3264
+ 'type' => 'text',
3265
+ ),
3266
+ array(
3267
+ 'label' => 'License',
3268
+ 'id' => 'saswp_data_feed_schema_license_'.$schema_id,
3269
+ 'type' => 'text',
3270
+ )
3271
+ );
3272
+ break;
3273
+
3274
+ case 'MusicPlaylist':
3275
+
3276
+ $meta_field = array(
3277
+ array(
3278
+ 'label' => 'Name',
3279
+ 'id' => 'saswp_music_playlist_name_'.$schema_id,
3280
+ 'type' => 'text',
3281
+ ),
3282
+ array(
3283
+ 'label' => 'Description',
3284
+ 'id' => 'saswp_music_playlist_description_'.$schema_id,
3285
+ 'type' => 'textarea',
3286
+ ),
3287
+ array(
3288
+ 'label' => 'URL',
3289
+ 'id' => 'saswp_music_playlist_url_'.$schema_id,
3290
+ 'type' => 'text',
3291
+ )
3292
+
3293
+ );
3294
+ break;
3295
+
3296
+ case 'MusicAlbum':
3297
+
3298
+ $meta_field = array(
3299
+ array(
3300
+ 'label' => 'Name',
3301
+ 'id' => 'saswp_music_album_name_'.$schema_id,
3302
+ 'type' => 'text',
3303
+ ),
3304
+ array(
3305
+ 'label' => 'Description',
3306
+ 'id' => 'saswp_music_album_description_'.$schema_id,
3307
+ 'type' => 'textarea',
3308
+ ),
3309
+ array(
3310
+ 'label' => 'Genre',
3311
+ 'id' => 'saswp_music_album_genre_'.$schema_id,
3312
+ 'type' => 'text',
3313
+ ),
3314
+ array(
3315
+ 'label' => 'Image',
3316
+ 'id' => 'saswp_music_album_image_'.$schema_id,
3317
+ 'type' => 'media',
3318
+ ),
3319
+ array(
3320
+ 'label' => 'Artist',
3321
+ 'id' => 'saswp_music_album_artist_'.$schema_id,
3322
+ 'type' => 'text',
3323
+ ),
3324
+ array(
3325
+ 'label' => 'URL',
3326
+ 'id' => 'saswp_music_album_url_'.$schema_id,
3327
+ 'type' => 'text',
3328
+ )
3329
+
3330
+ );
3331
+ break;
3332
+
3333
+ case 'Book':
3334
+
3335
+ $meta_field = array(
3336
+ array(
3337
+ 'label' => 'Name',
3338
+ 'id' => 'saswp_book_name_'.$schema_id,
3339
+ 'type' => 'text',
3340
+ ),
3341
+ array(
3342
+ 'label' => 'Description',
3343
+ 'id' => 'saswp_book_description_'.$schema_id,
3344
+ 'type' => 'textarea',
3345
+ ),
3346
+ array(
3347
+ 'label' => 'URL',
3348
+ 'id' => 'saswp_book_url_'.$schema_id,
3349
+ 'type' => 'text',
3350
+ ),
3351
+ array(
3352
+ 'label' => 'Image',
3353
+ 'id' => 'saswp_book_image_'.$schema_id,
3354
+ 'type' => 'media',
3355
+ ),
3356
+ array(
3357
+ 'label' => 'Author',
3358
+ 'id' => 'saswp_book_author_'.$schema_id,
3359
+ 'type' => 'text',
3360
+ ),
3361
+ array(
3362
+ 'label' => 'Author Profile URL',
3363
+ 'id' => 'saswp_book_author_url_'.$schema_id,
3364
+ 'type' => 'text',
3365
+ ),
3366
+ array(
3367
+ 'label' => 'ISBN',
3368
+ 'id' => 'saswp_book_isbn_'.$schema_id,
3369
+ 'type' => 'text',
3370
+ ),
3371
+ array(
3372
+ 'label' => 'Number Of Page',
3373
+ 'id' => 'saswp_book_no_of_page_'.$schema_id,
3374
+ 'type' => 'text',
3375
+ ),
3376
+ array(
3377
+ 'label' => 'Publisher',
3378
+ 'id' => 'saswp_book_publisher_'.$schema_id,
3379
+ 'type' => 'text',
3380
+ ),
3381
+ array(
3382
+ 'label' => 'Published Date',
3383
+ 'id' => 'saswp_book_date_published_'.$schema_id,
3384
+ 'type' => 'text',
3385
+ ),
3386
+ array(
3387
+ 'label' => 'Availability',
3388
+ 'id' => 'saswp_book_availability_'.$schema_id,
3389
+ 'type' => 'select',
3390
+ 'options' => array(
3391
+ 'InStock' => 'In Stock',
3392
+ 'OutOfStock' => 'Out Of Stock',
3393
+ 'Discontinued' => 'Discontinued',
3394
+ 'PreOrder' => 'Pre Order',
3395
+ )
3396
+ ),
3397
+ array(
3398
+ 'label' => 'Price',
3399
+ 'id' => 'saswp_book_price_'.$schema_id,
3400
+ 'type' => 'text',
3401
+ ),
3402
+ array(
3403
+ 'label' => 'Price Currency',
3404
+ 'id' => 'saswp_book_price_currency_'.$schema_id,
3405
+ 'type' => 'text',
3406
+ ),
3407
+ array(
3408
+ 'label' => 'Aggregate Rating',
3409
+ 'id' => 'saswp_book_enable_rating_'.$schema_id,
3410
+ 'type' => 'checkbox',
3411
+ ),
3412
+ array(
3413
+ 'label' => 'Rating',
3414
+ 'id' => 'saswp_book_rating_value_'.$schema_id,
3415
+ 'type' => 'text',
3416
+
3417
+ ),
3418
+ array(
3419
+ 'label' => 'Rating Count',
3420
+ 'id' => 'saswp_book_rating_count_'.$schema_id,
3421
+ 'type' => 'text',
3422
+ ),
3423
+ );
3424
+ break;
3425
+
3426
+ default:
3427
+ break;
3428
+ }
3429
+
3430
+ return $meta_field;
3431
+ }
core/array-list/schemas.php CHANGED
@@ -18,6 +18,7 @@ return array(
18
  'DataFeed' => 'DataFeed',
19
  'FAQ' => 'FAQ',
20
  'HowTo' => 'HowTo',
 
21
  'MusicPlaylist' => 'MusicPlaylist',
22
  'MusicAlbum' => 'MusicAlbum',
23
  'NewsArticle' => 'NewsArticle',
18
  'DataFeed' => 'DataFeed',
19
  'FAQ' => 'FAQ',
20
  'HowTo' => 'HowTo',
21
+ 'ImageObject' => 'ImageObject',
22
  'MusicPlaylist' => 'MusicPlaylist',
23
  'MusicAlbum' => 'MusicAlbum',
24
  'NewsArticle' => 'NewsArticle',
google_review/google_review.php DELETED
@@ -1,303 +0,0 @@
1
- <?php
2
- /**
3
- * Google Review Class
4
- *
5
- * @author Magazine3
6
- * @category Admin
7
- * @path google_review/google_review
8
- * @Version 1.8
9
- */
10
-
11
- // Exit if accessed directly.
12
- if ( ! defined( 'ABSPATH' ) ) exit;
13
-
14
- class saswp_google_review{
15
-
16
- public function __construct() {
17
-
18
- }
19
- /**
20
- * List of hooks used in google review class
21
- * since @version 1.8
22
- */
23
- public function saswp_google_review_hooks(){
24
-
25
- add_action( 'init', array($this, 'saswp_add_google_review_menu_links'),20);
26
-
27
- add_shortcode('saswp_google_review', array($this,'saswp_google_review_shortcode'));
28
-
29
- if(is_admin()){
30
-
31
- add_filter('get_edit_post_link', array($this, 'saswp_get_edit_post_link'), 99, 3);
32
-
33
- }
34
-
35
- }
36
-
37
- public function saswp_get_edit_post_link($link, $post_id, $context){
38
-
39
- $scr = get_current_screen();
40
-
41
- $id = '';
42
-
43
- if(is_object($scr)){
44
- $id = $scr->id;
45
- }
46
-
47
- if ($id == 'edit-saswp-google-review' && $context == 'display') {
48
-
49
- return wp_nonce_url(admin_url('admin.php?post_id='.$post_id.'&page=collection'), '_wpnonce');
50
-
51
- } else {
52
-
53
- return $link;
54
-
55
- }
56
- }
57
- /**
58
- * Function to register google review post type
59
- * @since version 1.8
60
- */
61
- public function saswp_add_google_review_menu_links() {
62
-
63
- $collection_post_type = array(
64
- 'labels' => array(
65
- 'name' => esc_html__( 'Google Review', 'schema-and-structured-data-for-wp' ),
66
- 'add_new' => esc_html__( 'Add Place', 'schema-and-structured-data-for-wp' ),
67
- 'add_new_item' => esc_html__( 'Edit Collection', 'schema-and-structured-data-for-wp' ),
68
- 'edit_item' => esc_html__( 'Edit AD','schema-and-structured-data-for-wp'),
69
- ),
70
- 'public' => true,
71
- 'has_archive' => false,
72
- 'exclude_from_search' => true,
73
- 'publicly_queryable' => false,
74
- 'show_in_menu' => 'edit.php?post_type=saswp',
75
- 'show_ui' => true,
76
- 'show_in_nav_menus' => false,
77
- 'show_admin_column' => true,
78
- 'rewrite' => false,
79
- );
80
- register_post_type( 'saswp-google-review', $collection_post_type );
81
-
82
- }
83
- /**
84
- * Function to fetch all the google place post
85
- * @return type array
86
- * @since version 1.8
87
- */
88
- public function saswp_fetch_all_google_review_post(){
89
-
90
- $all_post = get_posts(
91
- array(
92
- 'post_type' => 'saswp-google-review',
93
- 'posts_per_page' => -1,
94
- 'post_status' => 'publish',
95
- )
96
- );
97
-
98
- return $all_post;
99
- }
100
- /**
101
- * Function to get google review list by using shortcode
102
- * @param type $attr
103
- * @return string
104
- * @since @version 1.8
105
- */
106
- public function saswp_google_review_shortcode($attr){
107
-
108
- $post_id = $attr['id'];
109
-
110
- if($post_id){
111
-
112
- if(saswp_global_option()){
113
-
114
- $schema_markup = $this->saswp_get_google_review_schema_markup($post_id);
115
-
116
- }
117
- $output = $this->saswp_google_review_front_output($post_id);
118
-
119
- if($schema_markup){
120
- $output = $output.$schema_markup;
121
- }
122
- return $output;
123
-
124
- }
125
-
126
- }
127
- /**
128
- * Function to generate google review schema markup
129
- * @global type $wpdb
130
- * @global type $sd_data
131
- * @param type $post_id
132
- * @return string
133
- * @since Version 1.8
134
- *
135
- */
136
- public function saswp_get_google_review_schema_markup($post_id){
137
-
138
- global $wpdb;
139
- global $sd_data;
140
- $html = '';
141
-
142
- $place_id = get_post_meta($post_id, $key='saswp_google_place_id', true );
143
-
144
- if($place_id){
145
-
146
- $place = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "saswp_google_place WHERE place_id = %s", $place_id));
147
-
148
- }
149
-
150
- $date = get_the_date("Y-m-d\TH:i:s\Z");
151
- $modified_date = get_the_modified_date("Y-m-d\TH:i:s\Z");
152
-
153
- if($place->rating && isset($sd_data['saswp-google-review']) && $sd_data['saswp-google-review'] == 1){
154
-
155
- $total_score = esc_attr(number_format((float)$place->rating, 2, '.', ''));
156
-
157
- $input1 = array(
158
- '@context' => 'http://schema.org',
159
- '@type' => 'Review',
160
- 'dateCreated' => esc_html($date),
161
- 'datePublished' => esc_html($date),
162
- 'dateModified' => esc_html($modified_date),
163
- 'headline' => saswp_get_the_title(),
164
- 'name' => saswp_get_the_title(),
165
- 'url' => get_permalink(),
166
- 'description' => saswp_get_the_excerpt(),
167
- 'copyrightYear' => get_the_time( 'Y' ),
168
- 'author' => saswp_get_author_details()
169
- );
170
-
171
- $input1['itemReviewed'] = array(
172
- '@type' => 'Thing',
173
- 'name' => saswp_get_the_title(),
174
- );
175
-
176
- $input1['reviewRating'] = array(
177
- '@type' => 'Rating',
178
- 'worstRating' => 1,
179
- 'bestRating' => 5,
180
- 'ratingValue' => esc_attr($total_score),
181
- );
182
-
183
- if(!empty($input1)){
184
-
185
- $html .= "\n";
186
- $html .= '<!-- Schema & Structured Data For Google Review v'.esc_attr(SASWP_VERSION).' - -->';
187
- $html .= "\n";
188
- $html .= '<script type="application/ld+json">';
189
- $html .= "\n";
190
- $html .= saswp_json_print_format($input1);
191
- $html .= "\n";
192
- $html .= '</script>';
193
- $html .= "\n\n";
194
-
195
- }
196
-
197
- }
198
-
199
- return $html;
200
- }
201
- /**
202
- * Function to show google review list at user end
203
- * @global type $wpdb
204
- * @param type $post_id
205
- * @return string
206
- * @since version 1.8
207
- */
208
- public function saswp_google_review_front_output($post_id){
209
-
210
- global $wpdb;
211
- $reviews = null;
212
- $output = '';
213
-
214
- $place_id = get_post_meta($post_id, $key='saswp_google_place_id', true );
215
-
216
- if($place_id){
217
-
218
- $place = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "saswp_google_place WHERE place_id = %s", $place_id));
219
-
220
- if($place->id){
221
-
222
- $reviews = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "saswp_google_review WHERE google_place_id = %d ORDER BY time DESC", $place->id));
223
-
224
- if($reviews){
225
-
226
- foreach ($reviews as $review){
227
-
228
- $review_rating = $review->rating;
229
-
230
- $starating = '';
231
-
232
- $starating .= '<div class="saswp-rvw-str">';
233
- for($j=0; $j<5; $j++){
234
-
235
- if($review_rating >$j){
236
-
237
- $explod = explode('.', $review_rating);
238
-
239
- if(isset($explod[1])){
240
-
241
- if($j <$explod[0]){
242
-
243
- $starating.='<span class="str-ic"></span>';
244
-
245
- }else{
246
-
247
- $starating.='<span class="half-str"></span>';
248
-
249
- }
250
- }else{
251
-
252
- $starating.='<span class="str-ic"></span>';
253
-
254
- }
255
-
256
- } else{
257
- $starating.='<span class="df-clr"></span>';
258
- }
259
- }
260
- $starating .= '</div>';
261
-
262
- $output.= '<div class="saswp-g-review-panel">
263
- <div class="saswp-glg-review-body">
264
- <div class="saswp-rv-img">
265
- <img src="'.esc_url($review->profile_photo_url).'" alt="'.$review->author_name.'">
266
- </div>
267
- <div class="saswp-rv-cnt">
268
- <div class="saswp-str-rtng">
269
- <div class="saswp-str">
270
- <span class="saswp-athr">'.$review->author_name.'</span>
271
- '.$starating.'
272
- </div>
273
- <span class="saswp-g-plus">
274
- <a href="#"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/google-img.png'.'"></a>
275
- </span>
276
- </div>
277
- <span class="saswp-pt-dt">'.gmdate("H:i d M y", $review->time).'</span>
278
- <p>'.substr($review->text,0,300).'</p>
279
- </div>
280
- </div>
281
- </div>';
282
-
283
- }
284
-
285
- }
286
-
287
- }
288
-
289
- }
290
-
291
- return $output;
292
-
293
- }
294
-
295
- }
296
-
297
- if (class_exists('saswp_google_review')) {
298
-
299
- $object = new saswp_google_review;
300
- $object->saswp_google_review_hooks();
301
-
302
- };
303
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
google_review/google_review_page.php DELETED
@@ -1,400 +0,0 @@
1
- <?php
2
- /**
3
- * Google Review Page
4
- *
5
- * @author Magazine3
6
- * @category Admin
7
- * @path google_review/google_review_page
8
- * @Version 1.8
9
- */
10
-
11
- // Exit if accessed directly.
12
- if ( ! defined( 'ABSPATH' ) ) exit;
13
-
14
- add_action('admin_init', 'saswp_add_google_places');
15
-
16
- /**
17
- * Function to save google place review by place id
18
- * Since @version 1.8
19
- */
20
- function saswp_add_google_places(){
21
-
22
- if(!function_exists('wp_get_current_user')) {
23
- include(ABSPATH . "wp-includes/pluggable.php");
24
- }
25
-
26
- if(isset($_POST['place_post_ID'])){
27
-
28
- $post_id = sanitize_text_field($_POST['place_post_ID']);
29
- $post_title = sanitize_text_field($_POST['saswp_g_review_title']);
30
-
31
- $post = array(
32
- 'ID' => $post_id,
33
- 'post_title' => $post_title,
34
- 'post_status' => 'publish',
35
- 'post_name' => $post_title,
36
- 'post_type' => 'saswp-google-review',
37
- );
38
-
39
- wp_update_post($post);
40
-
41
- $post_meta = array();
42
-
43
- $post_meta['saswp_google_place_id'] = sanitize_text_field($_POST['saswp_google_place_id']);
44
- $post_meta['saswp_language_list'] = sanitize_text_field($_POST['saswp_language_list']);
45
- $post_meta['saswp_googel_api'] = sanitize_text_field($_POST['saswp_googel_api']);
46
-
47
- if(!empty($post_meta)){
48
-
49
- foreach($post_meta as $meta_key => $meta_val){
50
-
51
- update_post_meta($post_id, $meta_key, $meta_val);
52
-
53
- }
54
-
55
- }
56
-
57
- if($_POST['saswp-page'] == 'collection'){
58
-
59
- $current_url = htmlspecialchars_decode(wp_nonce_url(admin_url('admin.php?post_id='.$post_id.'&page=collection'), '_wpnonce'));
60
- wp_redirect( $current_url );
61
- exit;
62
- }
63
-
64
- }
65
-
66
- }
67
-
68
- class saswp_google_review_page{
69
-
70
- public function __construct() {
71
-
72
- add_action( 'admin_menu', array($this, 'saswp_add_google_review_links'),20);
73
- add_action( 'wp_ajax_saswp_connect_google_place', array($this,'saswp_connect_google_place'));
74
-
75
- }
76
- /**
77
- * Ajax Function to connect google place api with place id
78
- * @return type json
79
- * Since @version 1.8
80
- */
81
- public function saswp_connect_google_place(){
82
-
83
- if ( ! isset( $_POST['saswp_security_nonce'] ) ){
84
- return;
85
- }
86
- if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
87
- return;
88
- }
89
-
90
- $place_id = '';
91
- $language = '';
92
- $google_api = '';
93
-
94
- if(isset($_POST['place_id'])){
95
- $place_id = sanitize_text_field($_POST['place_id']);
96
- }
97
- if(isset($_POST['language'])){
98
- $language = sanitize_text_field($_POST['language']);
99
- }
100
- if(isset($_POST['google_api'])){
101
- $google_api = sanitize_text_field($_POST['google_api']);
102
- }
103
-
104
- if($place_id){
105
-
106
- $result = saswp_get_google_review_data($place_id, $language);
107
-
108
- if($result){
109
-
110
- echo json_encode(array('status' => 't'));
111
-
112
- }else{
113
-
114
- echo json_encode(array('status' => 'f'));
115
-
116
- }
117
-
118
- }
119
-
120
- wp_die();
121
-
122
- }
123
-
124
- public function saswp_add_google_review_links() {
125
-
126
- add_submenu_page( 'edit.php?post_type=saswp',
127
- esc_html__( 'Structured Data', 'schema-and-structured-data-for-wp' ),
128
- esc_html__( '', 'schema-and-structured-data-for-wp' ),
129
- 'manage_options',
130
- 'collection',
131
- array($this, 'saswp_admin_google_review_interface_render'));
132
-
133
- }
134
- /**
135
- * Function to create google review page in admin area
136
- * @global type $wpdb
137
- * Since @version 1.8
138
- */
139
- public function saswp_admin_google_review_interface_render(){
140
-
141
- global $wpdb;
142
-
143
- $language = array(
144
- 'af' => 'Afrikanns',
145
- 'sq' => 'Albanian',
146
- 'ar' => 'Arabic',
147
- 'hy' => 'Armenian',
148
- 'eu' => 'Basque',
149
- 'bn' => 'Bengali',
150
- 'bg' => 'Bulgarian',
151
- 'ca' => 'Catalan',
152
- 'km' => 'Cambodian',
153
- 'zh' => 'Chinese (Mandarin)',
154
- 'hr' => 'Croation',
155
- 'cs' => 'Czech',
156
- 'da' => 'Danish',
157
- 'nl' => 'Dutch',
158
- 'en' => 'English',
159
- 'et' => 'Estonian',
160
- 'fj' => 'Fiji',
161
- 'fi' => 'Finnish',
162
- 'fr' => 'French',
163
- 'ka' => 'Georgian',
164
- 'de' => 'German',
165
- 'el' => 'Greek',
166
- 'gu' => 'Gujarati',
167
- 'he' => 'Hebrew',
168
- 'hi' => 'Hindi',
169
- 'hu' => 'Hungarian',
170
- 'is' => 'Icelandic',
171
- 'id' => 'Indonesian',
172
- 'ga' => 'Irish',
173
- 'it' => 'Italian',
174
- 'ja' => 'Japanese',
175
- 'jw' => 'Javanese',
176
- 'ko' => 'Korean',
177
- 'la' => 'Latin',
178
- 'lv' => 'Latvian',
179
- 'lt' => 'Lithuanian',
180
- 'mk' => 'Macedonian',
181
- 'ms' => 'Malay',
182
- 'ml' => 'Malayalam',
183
- 'mt' => 'Maltese',
184
- 'mi' => 'Maori',
185
- 'mr' => 'Marathi',
186
- 'mn' => 'Mongolian',
187
- 'ne' => 'Nepali',
188
- 'no' => 'Norwegian',
189
- 'fa' => 'Persian',
190
- 'pl' => 'Polish',
191
- 'pt' => 'Portuguese',
192
- 'pa' => 'Punjabi',
193
- 'qu' => 'Quechua',
194
- 'ro' => 'Romanian',
195
- 'ru' => 'Russian',
196
- 'sm' => 'Samoan',
197
- 'sr' => 'Serbian',
198
- 'sk' => 'Slovak',
199
- 'sl' => 'Slovenian',
200
- 'es' => 'Spanish',
201
- 'sw' => 'Swahili',
202
- 'sv' => 'Swedish ',
203
- 'ta' => 'Tamil',
204
- 'tt' => 'Tatar',
205
- 'te' => 'Telugu',
206
- 'th' => 'Thai',
207
- 'bo' => 'Tibetan',
208
- 'to' => 'Tonga',
209
- 'tr' => 'Turkish',
210
- 'uk' => 'Ukranian',
211
- 'ur' => 'Urdu',
212
- 'uz' => 'Uzbek',
213
- 'vi' => 'Vietnamese',
214
- 'cy' => 'Welsh',
215
- 'xh' => 'Xhosa'
216
- );
217
-
218
- $post_meta = array();
219
- $post_id = '';
220
- $reviews = null;
221
-
222
- if(isset($_GET['post_id'])){
223
-
224
- $post_id = intval($_GET['post_id']);
225
-
226
-
227
- $post_meta = get_post_meta($post_id, $key='', true );
228
-
229
-
230
- } else{
231
-
232
- $post = get_default_post_to_edit( 'saswp-google-review', true );
233
- $post_id = $post->ID;
234
- }
235
-
236
- if(isset($post_meta['saswp_google_place_id'])){
237
-
238
- $place_id = trim($post_meta['saswp_google_place_id'][0]);
239
- $place = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "saswp_google_place WHERE place_id = %s", $place_id));
240
-
241
- if(is_object($place)){
242
-
243
- $reviews = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "saswp_google_review WHERE google_place_id = %d ORDER BY time DESC", $place->id));
244
-
245
- }
246
-
247
- }
248
-
249
- ?>
250
- <div class="saswp-heading">
251
- <h1 class="wp-heading-inline"><?php echo esc_html__('Google Review','schema-and-structured-data-for-wp'); ?> </h1><span class="saswp-need-help"><a target="_blank" href="http://structured-data-for-wp.com/docs/article/how-to-display-google-review/"><?php echo esc_html__('Need Help?','schema-and-structured-data-for-wp'); ?></a></span>
252
- </div>
253
-
254
- <div class="saswp-g-review-container">
255
- <form method="post" action="post.php">
256
- <div class="saswp-g-review-header">
257
-
258
- <input type="hidden" name="post_type" value="saswp-google-review">
259
- <input type="hidden" name="saswp-page" value="collection">
260
- <input type="hidden" id="place_post_ID" name="place_post_ID" value="<?php echo $post_id; ?>">
261
- <input type="text" value="<?php if(get_the_title($post_id) == 'Auto Draft'){ echo 'Untitled'; }else{ echo get_the_title($post_id); } ?>" id="saswp_g_review_title" name="saswp_g_review_title" style="width: 30%;">
262
-
263
- <button type="submit" class="btn btn-success button-primary" > <?php echo esc_html__('Save','schema-and-structured-data-for-wp'); ?> </button>
264
- <div>Use ShortCode [saswp_google_review id="<?php echo $post_id; ?>"]</div>
265
-
266
- </div>
267
-
268
- <div class="saswp-g-review-body">
269
-
270
- <div class="saswp-review-list">
271
-
272
- <?php
273
-
274
- if($reviews){
275
-
276
- foreach ($reviews as $review){
277
-
278
- $review_rating = $review->rating;
279
-
280
- $starating = '';
281
-
282
- $starating .= '<div class="saswp-rvw-str">';
283
-
284
- for($j=0; $j<5; $j++){
285
-
286
- if($review_rating >$j){
287
-
288
- $explod = explode('.', $review_rating);
289
-
290
- if(isset($explod[1])){
291
-
292
- if($j <$explod[0]){
293
-
294
- $starating.='<span class="str-ic"></span>';
295
-
296
- }else{
297
-
298
- $starating.='<span class="half-str"></span>';
299
-
300
- }
301
- }else{
302
-
303
- $starating.='<span class="str-ic"></span>';
304
-
305
- }
306
-
307
- } else{
308
- $starating.='<span class="df-clr"></span>';
309
- }
310
- }
311
- $starating .= '</div>';
312
-
313
-
314
- echo '<div class="saswp-g-review-panel">
315
- <div class="saswp-glg-review-body">
316
- <div class="saswp-rv-img">
317
- <img src="'.esc_url($review->profile_photo_url).'" alt="'.esc_attr($review->author_name).'">
318
- </div>
319
- <div class="saswp-rv-cnt">
320
- <div class="saswp-str-rtng">
321
- <div class="saswp-str">
322
- <span class="saswp-athr">'.esc_attr($review->author_name).'</span>
323
- '.$starating.'
324
- </div>
325
- <span class="saswp-g-plus">
326
- <a href="#"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/google-img.png'.'"></a>
327
- </span>
328
- </div>
329
- <span class="saswp-pt-dt">'.gmdate("H:i d M y", $review->time).'</span>
330
- <p>'.substr($review->text,0,300).'</p>
331
- </div>
332
- </div>
333
- </div>';
334
-
335
- }
336
-
337
- }
338
-
339
- ?>
340
-
341
- </div>
342
-
343
- <div class="saswp-channel-list">
344
- <div class="saswp-panel">
345
- <h3><?php echo esc_html__('Google Review Settings','schema-and-structured-data-for-wp'); ?></h3>
346
- <div class="saswp-input-fields">
347
- <label><?php echo esc_html__('Place ID','schema-and-structured-data-for-wp'); ?>:</label><input value="<?php if(isset($post_meta['saswp_google_place_id'])){ echo $post_meta['saswp_google_place_id'][0];} ?>" type="text" id="saswp_google_place_id" name="saswp_google_place_id" placeholder="<?php echo esc_html__('Place Id', 'schema-and-structured-data-for-wp' ); ?>">
348
- </div>
349
-
350
- <div class="saswp-input-fields">
351
- <label><?php echo esc_html__('Languages','schema-and-structured-data-for-wp'); ?>:</label>
352
- <select name="saswp_language_list" id="saswp_language_list">
353
- <?php
354
-
355
- foreach ($language as $key => $value) {
356
-
357
- $sel = '';
358
-
359
- if(saswp_remove_warnings($post_meta, 'saswp_language_list', 'saswp_array')==$key){
360
-
361
- $sel = 'selected';
362
-
363
- }
364
-
365
- echo "<option value='".esc_attr($key)."' ".esc_attr($sel).">".esc_html__($value, 'schema-and-structured-data-for-wp' )."</option>";
366
-
367
- }
368
- ?>
369
- </select>
370
-
371
- </div>
372
-
373
- <div class="saswp-input-fields">
374
- <label><?php echo esc_html__('Goolge API','schema-and-structured-data-for-wp'); ?></label>
375
- <input value="<?php if(isset($post_meta['saswp_googel_api'])){ echo $post_meta['saswp_googel_api'][0];} ?>" type="text" id="saswp_googel_api" name="saswp_googel_api" placeholder="<?php echo esc_html__('Google API', 'schema-and-structured-data-for-wp' ); ?>">
376
- </div>
377
-
378
- <div class="saswp-input-fields">
379
- <a class="saswp_coonect_google_place btn btn-success button-primary" ><?php echo esc_html__('Connect Google','schema-and-structured-data-for-wp'); ?></a>
380
- </div>
381
-
382
- </div>
383
-
384
- </div>
385
-
386
-
387
- </div>
388
-
389
- </form>
390
- </div>
391
-
392
- <?php
393
- }
394
-
395
- }
396
-
397
- if (class_exists('saswp_google_review_page')) {
398
- new saswp_google_review_page;
399
- };
400
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
google_review/google_review_setup.php DELETED
@@ -1,245 +0,0 @@
1
- <?php
2
- /**
3
- * Google Review Setup Page
4
- *
5
- * @author Magazine3
6
- * @category Admin
7
- * @path google_review/google_review_setup
8
- * @Version 1.8
9
- */
10
-
11
- // Exit if accessed directly.
12
- if ( ! defined( 'ABSPATH' ) ) exit;
13
-
14
- add_action('admin_init', 'saswp_create_database_for_existing_users');
15
- add_action('the_post', 'saswp_create_database_for_existing_users');
16
-
17
- /**
18
- * Function to initiate database installation
19
- * @return type null
20
- * @Since version 1.8
21
- */
22
- function saswp_create_database_for_existing_users(){
23
-
24
- if ( ! current_user_can( 'manage_options' ) ) {
25
- return;
26
- }
27
- $status = get_option('saswp-database-on-first-load');
28
-
29
- if($status != 'enable'){
30
-
31
- saswp_google_review_database_install();
32
- update_option('saswp-database-on-first-load', 'enable');
33
-
34
- }
35
-
36
- }
37
- /**
38
- * Function to install database tables for google review
39
- * @global type $wpdb
40
- * @Since version 1.8
41
- */
42
- function saswp_google_review_database_install() {
43
-
44
- global $wpdb;
45
-
46
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
47
-
48
- $charset_collate = $engine = '';
49
-
50
-
51
- if(!empty($wpdb->charset)) {
52
- $charset_collate .= " DEFAULT CHARACTER SET {$wpdb->charset}";
53
- }
54
- if($wpdb->has_cap('collation') AND !empty($wpdb->collate)) {
55
- $charset_collate .= " COLLATE {$wpdb->collate}";
56
- }
57
-
58
- $found_engine = $wpdb->get_var("SELECT ENGINE FROM `information_schema`.`TABLES` WHERE `TABLE_SCHEMA` = '".DB_NAME."' AND `TABLE_NAME` = '{$wpdb->prefix}posts';");
59
-
60
- if(strtolower($found_engine) == 'innodb') {
61
- $engine = ' ENGINE=InnoDB';
62
- }
63
-
64
- $found_tables = $wpdb->get_col("SHOW TABLES LIKE '{$wpdb->prefix}saswp%';");
65
-
66
- if(!in_array("{$wpdb->prefix}saswp_google_place", $found_tables)) {
67
-
68
- dbDelta("CREATE TABLE `{$wpdb->prefix}saswp_google_place` (".
69
- "id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,".
70
- "place_id VARCHAR(80) NOT NULL,".
71
- "name VARCHAR(255) NOT NULL,".
72
- "photo VARCHAR(425),".
73
- "icon VARCHAR(255),".
74
- "address VARCHAR(255),".
75
- "rating DOUBLE PRECISION,".
76
- "url VARCHAR(255),".
77
- "website VARCHAR(255),".
78
- "updated BIGINT(20),".
79
- "PRIMARY KEY (`id`),".
80
- "UNIQUE INDEX saswp_place_id (`place_id`)".
81
- ") ".$charset_collate.$engine.";");
82
-
83
- }
84
-
85
- if(!in_array("{$wpdb->prefix}saswp_google_review", $found_tables)) {
86
-
87
- dbDelta("CREATE TABLE `{$wpdb->prefix}saswp_google_review` (".
88
- "id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,".
89
- "google_place_id BIGINT(20) UNSIGNED NOT NULL,".
90
- "hash VARCHAR(40) NOT NULL,".
91
- "rating INTEGER NOT NULL,".
92
- "text VARCHAR(10000),".
93
- "time INTEGER NOT NULL,".
94
- "language VARCHAR(10),".
95
- "author_name VARCHAR(255),".
96
- "author_url VARCHAR(255),".
97
- "profile_photo_url VARCHAR(255),".
98
- "PRIMARY KEY (`id`),".
99
- "UNIQUE INDEX saswp_google_review_hash (`hash`),".
100
- "INDEX saswp_google_place_id (`google_place_id`)".
101
- ") ".$charset_collate.$engine.";");
102
-
103
- }
104
-
105
- }
106
- /**
107
- * Function to retrive google review data from google with maps api
108
- * @param type $place_id
109
- * @param string $language
110
- * @return type array
111
- * @Since version 1.8
112
- */
113
- function saswp_get_google_review_data($place_id, $language=null){
114
-
115
- if($language){
116
-
117
- $language = '&language='.$language;
118
-
119
- }
120
-
121
- if($place_id){
122
-
123
- $result = wp_remote_get('https://maps.googleapis.com/maps/api/place/details/json?placeid='.$place_id.'&key=AIzaSyAQ1j_iD1npoqTRuhrIx-ADeVZjQddUqKs'.$language);
124
-
125
- if($result){
126
-
127
- $result = json_decode($result['body']);
128
- $result->result->business_photo = saswp_business_image($result->result);
129
- $response = saswp_save_google_reviews($result->result);
130
- return $response;
131
- }
132
-
133
- }
134
-
135
- }
136
- /**
137
- * Function to save retrived google review data from google place
138
- * @global type $wpdb
139
- * @param type $place
140
- * @return type string
141
- * @Since version 1.8
142
- */
143
- function saswp_save_google_reviews($place) {
144
-
145
- global $wpdb;
146
- $response = null;
147
-
148
- $google_place_id = $wpdb->get_var($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "saswp_google_place WHERE place_id = %s", $place->place_id));
149
-
150
- if ($google_place_id) {
151
-
152
- $response = $wpdb->update($wpdb->prefix . 'saswp_google_place', array(
153
- 'name' => $place->name,
154
- 'photo' => $place->business_photo,
155
- 'rating' => $place->rating
156
- ), array('ID' => $google_place_id));
157
-
158
- } else {
159
-
160
- $response = $wpdb->insert($wpdb->prefix . 'saswp_google_place', array(
161
- 'place_id' => $place->place_id,
162
- 'name' => $place->name,
163
- 'photo' => $place->business_photo,
164
- 'icon' => $place->icon,
165
- 'address' => $place->formatted_address,
166
- 'rating' => isset($place->rating) ? $place->rating : null,
167
- 'url' => isset($place->url) ? $place->url : null,
168
- 'website' => isset($place->website) ? $place->website : null
169
- ));
170
-
171
- $google_place_id = $wpdb->insert_id;
172
-
173
- }
174
-
175
- if ($place->reviews) {
176
-
177
- $reviews = $place->reviews;
178
-
179
- foreach ($reviews as $review) {
180
-
181
- $google_review_id = $wpdb->get_var($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "saswp_google_review WHERE time = %s", $review->time));
182
-
183
- if ($google_review_id) {
184
-
185
- $update_params = array(
186
- 'rating' => $review->rating,
187
- 'text' => $review->text
188
- );
189
-
190
- if (isset($review->profile_photo_url)) {
191
-
192
- $update_params['profile_photo_url'] = $review->profile_photo_url;
193
-
194
- }
195
-
196
- $response = $wpdb->update($wpdb->prefix . 'saswp_google_review', $update_params, array('id' => $google_review_id));
197
-
198
- } else {
199
-
200
- $response = $wpdb->insert($wpdb->prefix . 'saswp_google_review', array(
201
- 'google_place_id' => $google_place_id,
202
- 'hash' => $review->time,
203
- 'rating' => $review->rating,
204
- 'text' => $review->text,
205
- 'time' => $review->time,
206
- 'language' => $review->language,
207
- 'author_name' => $review->author_name,
208
- 'author_url' => isset($review->author_url) ? $review->author_url : null,
209
- 'profile_photo_url' => isset($review->profile_photo_url) ? $review->profile_photo_url : null
210
- ));
211
-
212
- }
213
- }
214
- }
215
-
216
- return $response;
217
- }
218
- /**
219
- * Function to retrive image from google place
220
- * @global type $sd_data
221
- * @param type $result_json
222
- * @return type string
223
- * @Since version 1.8
224
- */
225
- function saswp_business_image($result_json) {
226
-
227
- global $sd_data;
228
-
229
- if (isset($result_json->photos)) {
230
-
231
- $request_url = add_query_arg(
232
- array(
233
- 'photoreference' => $result_json->photos[0]->photo_reference,
234
- 'key' => isset($sd_data['google_place_api_key']) ? $sd_data['google_place_api_key']:'',
235
- 'maxwidth' => '300',
236
- 'maxheight' => '300',
237
- ),
238
- 'https://maps.googleapis.com/maps/api/place/photo'
239
- );
240
-
241
- return $request_url;
242
-
243
- }
244
- return null;
245
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
google_review/google_review_widget.php DELETED
@@ -1,129 +0,0 @@
1
- <?php
2
- /**
3
- * Google Review Widget Class
4
- *
5
- * @author Magazine3
6
- * @category Admin
7
- * @path google_review/google_review_widget
8
- * @Version 1.8
9
- */
10
-
11
- // Exit if accessed directly.
12
- if ( ! defined( 'ABSPATH' ) ) exit;
13
-
14
- /*
15
- * To change this license header, choose License Headers in Project Properties.
16
- * To change this template file, choose Tools | Templates
17
- * and open the template in the editor.
18
- */
19
- /**
20
- * Adds Saswp_Google_Review_Widget widget.
21
- */
22
- class Saswp_Google_Review_Widget extends WP_Widget {
23
-
24
- /**
25
- * Register widget with WordPress.
26
- */
27
- function __construct() {
28
- parent::__construct(
29
- 'saswp_google_review_widget', // Base ID
30
- esc_html__( 'Schema Google Review', 'schema-and-structured-data-for-wp' ), // Name
31
- array( 'description' => esc_html__( 'Widget to display google reviews', 'schema-and-structured-data-for-wp' ), ) // Args
32
- );
33
- }
34
-
35
- /**
36
- * Front-end display of widget.
37
- *
38
- * @see WP_Widget::widget()
39
- *
40
- * @param array $args Widget arguments.
41
- * @param array $instance Saved values from database.
42
- */
43
- public function widget( $args, $instance ) {
44
-
45
- echo html_entity_decode(esc_attr($args['before_widget']));
46
-
47
- if ( ! class_exists('saswp_google_review')) {
48
- require_once SASWP_DIR_NAME.'/google_review/google_review.php';
49
- }
50
-
51
- $object = new saswp_google_review();
52
- $all_ads = $object->saswp_fetch_all_google_review_post();
53
- $goolge_review_obj = new saswp_google_review();
54
-
55
- foreach($all_ads as $ad){
56
-
57
- if($ad->ID == $instance['g_review']){
58
-
59
- $ad_code = $object->saswp_google_review_front_output($instance['g_review']);
60
- $goolge_review = $goolge_review_obj->saswp_get_google_review_schema_markup($instance['g_review']);
61
-
62
- if($goolge_review){
63
- echo $ad_code . $goolge_review;
64
- } else {
65
- echo $ad_code;
66
- }
67
- }
68
- }
69
- echo html_entity_decode(esc_attr($args['after_widget']));
70
- }
71
-
72
- /**
73
- * Back-end widget form.
74
- *
75
- * @see WP_Widget::form()
76
- *
77
- * @param array $instance Previously saved values from database.
78
- */
79
- public function form( $instance ) {
80
-
81
- $title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( 'Review Title', 'schema-and-structured-data-for-wp' );
82
- $ads = ! empty( $instance['g_review'] ) ? $instance['g_review'] : esc_html__( 'review list to be display', 'schema-and-structured-data-for-wp' );?>
83
- <p>
84
- <label for="<?php echo esc_attr( $this->get_field_id( 'g_review' ) ); ?>">
85
- <?php esc_attr_e( 'Places :', 'schema-and-structured-data-for-wp' ); ?></label><?php
86
-
87
- $ads_select_html = '';
88
- if ( ! class_exists('saswp_google_review')) {
89
- require_once SASWP_DIR_NAME.'/google_review/google_review.php';
90
- }
91
- $object = new saswp_google_review();
92
- $all_ads = $object->saswp_fetch_all_google_review_post();
93
- foreach($all_ads as $ad){
94
- $ads_select_html .= '<option '. esc_attr(selected( $ads, $ad->ID, false)).' value="'.esc_attr($ad->ID).'">'.esc_html__($ad->post_title, 'schema-and-structured-data-for-wp').'</option>';
95
- }
96
- echo '<select id="'.esc_attr( $this->get_field_id( 'g_review' )).'" name="'.esc_attr( $this->get_field_name( 'g_review' )).'">'
97
- .$ads_select_html.
98
- '</select>';?>
99
- </p><?php
100
- }
101
-
102
- /**
103
- * Sanitize widget form values as they are saved.
104
- *
105
- * @see WP_Widget::update()
106
- *
107
- * @param array $new_instance Values just sent to be saved.
108
- * @param array $old_instance Previously saved values from database.
109
- *
110
- * @return array Updated safe values to be saved.
111
- */
112
- public function update( $new_instance, $old_instance ) {
113
-
114
- $instance = array();
115
- $instance['g_review'] = ( ! empty( $new_instance['g_review'] ) ) ? sanitize_text_field( $new_instance['g_review'] ) : '';
116
- return $instance;
117
-
118
- }
119
-
120
- } // class Saswp_Google_Review_Widget
121
-
122
- /**
123
- * We are registering our widget here in wordpress
124
- */
125
- function register_saswp_google_review_widget(){
126
- register_widget('Saswp_Google_Review_Widget');
127
- }
128
-
129
- add_action('widgets_init', 'register_saswp_google_review_widget');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
metaboxes/help.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
- /*
3
- * To change this license header, choose License Headers in Project Properties.
4
- * To change this template file, choose Tools | Templates
5
- * and open the template in the editor.
6
- */
7
- add_action( 'add_meta_boxes', 'saswp_help_meta_box' );
8
- function saswp_help_meta_box()
9
- {
10
- add_meta_box( 'saswp_help_meta_box_id',
11
- esc_html__('Help', 'schema-and-structured-data-for-wp' ),
12
- 'saswp_help_meta_box_cb',
13
- 'saswp',
14
- 'advanced', 'low'
15
- );
16
- }
17
-
18
- function saswp_help_meta_box_cb()
19
- {
20
- echo '<a href="admin.php?page=structured_data_options&tab=help">'.esc_html__('Need Help', 'schema-and-structured-data-for-wp').'</a>';
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
modules/gutenberg/assets/blocks/faq.js CHANGED
@@ -451,7 +451,7 @@
451
  }(
452
  window.wp.blocks,
453
  window.wp.element,
454
- window.wp.editor,
455
  window.wp.components,
456
  window.wp.i18n,
457
  ) );
451
  }(
452
  window.wp.blocks,
453
  window.wp.element,
454
+ window.wp.blockEditor,
455
  window.wp.components,
456
  window.wp.i18n,
457
  ) );
modules/gutenberg/assets/blocks/how-to.js CHANGED
@@ -802,7 +802,7 @@
802
  }(
803
  window.wp.blocks,
804
  window.wp.element,
805
- window.wp.editor,
806
  window.wp.components,
807
  window.wp.i18n,
808
  ) );
802
  }(
803
  window.wp.blocks,
804
  window.wp.element,
805
+ window.wp.blockEditor,
806
  window.wp.components,
807
  window.wp.i18n,
808
  ) );
modules/gutenberg/includes/class-gutenberg.php CHANGED
@@ -219,7 +219,7 @@ class SASWP_Gutenberg {
219
  }
220
 
221
  if($time_html !=''){
222
- echo '<span class="saswp-how-to-duration-time-text"><strong>Time Needed :</strong> </span>';
223
  echo $time_html;
224
  }
225
 
219
  }
220
 
221
  if($time_html !=''){
222
+ echo '<span class="saswp-how-to-duration-time-text"><strong>'.saswp_label_text('translation-time-needed').' :</strong> </span>';
223
  echo $time_html;
224
  }
225
 
{reviews → modules/reviews}/reviews_admin.php RENAMED
@@ -58,7 +58,7 @@ class saswp_reviews_admin {
58
 
59
  public function __construct() {
60
 
61
- add_action( 'add_meta_boxes', array( $this, 'saswp_add_meta_boxes' ) );
62
  add_action( 'save_post', array( $this, 'saswp_save_fields' ) );
63
  add_action( 'admin_init', array( $this, 'saswp_removing_reviews_wysiwig' ) );
64
 
@@ -70,7 +70,8 @@ class saswp_reviews_admin {
70
  */
71
  public function saswp_removing_reviews_wysiwig(){
72
 
73
- remove_post_type_support( 'saswp_reviews', 'editor');
 
74
 
75
  }
76
 
@@ -117,7 +118,7 @@ class saswp_reviews_admin {
117
  if(isset($meta_field['label'])){
118
  $label = $meta_field['label'];
119
  }
120
- $label = '<label for="' . $meta_field['id'] . '">' . esc_html__( $label, 'schema-and-structured-data-for-wp' ) . '</label>';
121
  $meta_value = get_post_meta( $post->ID, $meta_field['id'], true );
122
 
123
  if ( empty( $meta_value ) ) {
58
 
59
  public function __construct() {
60
 
61
+ add_action( 'add_meta_boxes', array( $this, 'saswp_add_meta_boxes' ),99 );
62
  add_action( 'save_post', array( $this, 'saswp_save_fields' ) );
63
  add_action( 'admin_init', array( $this, 'saswp_removing_reviews_wysiwig' ) );
64
 
70
  */
71
  public function saswp_removing_reviews_wysiwig(){
72
 
73
+ remove_post_type_support( 'saswp_reviews', 'editor');
74
+ remove_post_type_support( 'saswp-collections', 'editor');
75
 
76
  }
77
 
118
  if(isset($meta_field['label'])){
119
  $label = $meta_field['label'];
120
  }
121
+ $label = '<label for="' . esc_attr($meta_field['id']) . '">' . esc_html__( $label, 'schema-and-structured-data-for-wp' ) . '</label>';
122
  $meta_value = get_post_meta( $post->ID, $meta_field['id'], true );
123
 
124
  if ( empty( $meta_value ) ) {
modules/reviews/reviews_collection.php ADDED
@@ -0,0 +1,611 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Reviews Collection Class
4
+ *
5
+ * @author Magazine3
6
+ * @category Admin
7
+ * @path reviews/reviews_collection
8
+ * @Version 1.9.17
9
+ */
10
+
11
+ // Exit if accessed directly.
12
+ if ( ! defined( 'ABSPATH' ) ) exit;
13
+
14
+ class SASWP_Reviews_Collection {
15
+
16
+ /**
17
+ * Static private variable to hold instance this class
18
+ * @var type
19
+ */
20
+ private static $instance;
21
+ private $_service = null;
22
+
23
+ private function __construct() {
24
+
25
+ if($this->_service == null){
26
+
27
+ $this->_service = new saswp_reviews_service();
28
+
29
+ }
30
+
31
+ add_filter( 'get_edit_post_link', array($this, 'saswp_set_collection_edit_link' ), 99, 3);
32
+ add_action( 'admin_menu', array($this, 'saswp_add_collection_menu_links' ),20);
33
+ add_action( 'init', array($this, 'saswp_register_collection_post_type' ),20);
34
+ add_action( 'admin_init', array($this, 'saswp_save_collection_data' ));
35
+ add_action( 'wp_ajax_saswp_add_to_collection', array($this, 'saswp_add_to_collection' ));
36
+ add_action( 'wp_ajax_saswp_get_collection_platforms', array($this, 'saswp_get_collection_platforms' ));
37
+ add_action( 'amp_post_template_css', array($this, 'saswp_reviews_collection_amp_css'));
38
+ add_action( 'amp_post_template_data', array($this, 'saswp_reviews_collection_amp_script'));
39
+ add_shortcode( 'saswp-reviews-collection', array($this, 'saswp_reviews_collection_shortcode_render' ));
40
+
41
+ }
42
+
43
+ /**
44
+ * Return the unique instance
45
+ * @return type instance
46
+ * @since version 1.9.17
47
+ */
48
+ public static function get_instance() {
49
+ if ( null == self::$instance ) {
50
+ self::$instance = new self;
51
+ }
52
+ return self::$instance;
53
+ }
54
+
55
+ public static function saswp_add_collection_menu_links(){
56
+
57
+ add_submenu_page( 'edit.php?post_type=saswp',
58
+ esc_html__( 'Structured Data', 'schema-and-structured-data-for-wp' ),
59
+ esc_html__( '', 'schema-and-structured-data-for-wp' ),
60
+ 'manage_options',
61
+ 'collection',
62
+ array($this, 'saswp_admin_collection_interface_render'));
63
+
64
+ }
65
+
66
+ public static function saswp_set_collection_edit_link($link, $post_id, $context){
67
+
68
+ if (function_exists('get_current_screen') && (isset(get_current_screen()->id) && get_current_screen()->id == 'edit-saswp-collections' ) && $context == 'display') {
69
+
70
+ return wp_nonce_url(admin_url('admin.php?post_id='.$post_id.'&page=collection'), '_wpnonce');
71
+
72
+ } else {
73
+
74
+ return $link;
75
+
76
+ }
77
+
78
+ }
79
+
80
+ public function saswp_reviews_collection_amp_script($data){
81
+
82
+ $design = $this->_service->saswp_collection_desing_available();
83
+
84
+ if($design == 'gallery' || $design == 'fomo'){
85
+
86
+ if ( empty( $data['amp_component_scripts']['amp-carousel'] ) ) {
87
+ $data['amp_component_scripts']['amp-carousel'] = "https://cdn.ampproject.org/v0/amp-carousel-latest.js";
88
+ }
89
+ }
90
+
91
+ if($design == 'popup' || $design == 'gallery' || $design == 'fomo'){
92
+
93
+ if ( empty( $data['amp_component_scripts']['amp-bind'] ) ) {
94
+ $data['amp_component_scripts']['amp-bind'] = "https://cdn.ampproject.org/v0/amp-bind-latest.js";
95
+ }
96
+
97
+ }
98
+
99
+ return $data;
100
+
101
+ }
102
+
103
+ public function saswp_reviews_collection_amp_css(){
104
+
105
+ $global_css = SASWP_PLUGIN_DIR_PATH . 'admin_section/css/amp/collection-front-global.css';
106
+ $grid_css = SASWP_PLUGIN_DIR_PATH . 'admin_section/css/amp/collection-front-grid.css';
107
+ $fomo_css = SASWP_PLUGIN_DIR_PATH . 'admin_section/css/amp/collection-front-fomo.css';
108
+ $gallery_css = SASWP_PLUGIN_DIR_PATH . 'admin_section/css/amp/collection-front-gallery.css';
109
+ $popup_css = SASWP_PLUGIN_DIR_PATH . 'admin_section/css/amp/collection-front-popup.css';
110
+ $badge_css = SASWP_PLUGIN_DIR_PATH . 'admin_section/css/amp/collection-front-badge.css';
111
+
112
+ $design = $this->_service->saswp_collection_desing_available();
113
+
114
+ if($design){
115
+
116
+ echo @file_get_contents($global_css);
117
+
118
+ switch ($design) {
119
+ case 'grid':
120
+ echo @file_get_contents($grid_css);
121
+ break;
122
+ case 'gallery':
123
+ echo @file_get_contents($gallery_css);
124
+ break;
125
+ case 'badge':
126
+ echo @file_get_contents($badge_css);
127
+ break;
128
+ case 'popup':
129
+ echo @file_get_contents($popup_css);
130
+ break;
131
+ case 'fomo':
132
+ echo @file_get_contents($fomo_css);
133
+ break;
134
+
135
+ default:
136
+ break;
137
+ }
138
+
139
+ }
140
+
141
+ }
142
+
143
+ public function saswp_register_collection_post_type(){
144
+
145
+ $collections = array(
146
+ 'labels' => array(
147
+ 'name' => esc_html__( 'Collections', 'schema-and-structured-data-for-wp' ),
148
+ 'add_new' => esc_html__( 'Add Collection', 'schema-and-structured-data-for-wp' ),
149
+ 'add_new_item' => esc_html__( 'Edit Collection', 'schema-and-structured-data-for-wp' ),
150
+ 'edit_item' => esc_html__( 'Edit Collection','schema-and-structured-data-for-wp'),
151
+ ),
152
+ 'public' => true,
153
+ 'has_archive' => true,
154
+ 'exclude_from_search' => true,
155
+ 'publicly_queryable' => true,
156
+ //'show_in_menu' => 'edit.php?post_type=saswp',
157
+ 'show_in_menu' => false,
158
+ 'show_ui' => true,
159
+ 'show_in_nav_menus' => true,
160
+ 'show_admin_column' => true,
161
+ 'rewrite' => false,
162
+ );
163
+ register_post_type( 'saswp-collections', $collections );
164
+ }
165
+
166
+ public function saswp_get_collection_platforms(){
167
+
168
+ if ( ! isset( $_GET['saswp_security_nonce'] ) ){
169
+ return;
170
+ }
171
+ if ( !wp_verify_nonce( $_GET['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
172
+ return;
173
+ }
174
+
175
+ $collection_id = intval($_GET['collection_id']);
176
+
177
+ if($collection_id){
178
+
179
+ $reviews_list = get_post_meta($collection_id, 'saswp_platform_ids', true);
180
+
181
+ if($reviews_list){
182
+
183
+ echo json_encode(array('status' => true, 'message'=> $reviews_list));
184
+
185
+ }else{
186
+
187
+ echo json_encode(array('status' => false, 'message'=> 'Data not found'));
188
+
189
+ }
190
+
191
+ }else{
192
+
193
+ echo json_encode(array('status' => false, 'message'=> 'Collection id is missing'));
194
+
195
+ }
196
+
197
+ wp_die();
198
+ }
199
+
200
+ public function saswp_add_to_collection(){
201
+
202
+ if ( ! isset( $_GET['saswp_security_nonce'] ) ){
203
+ return;
204
+ }
205
+ if ( !wp_verify_nonce( $_GET['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
206
+ return;
207
+ }
208
+
209
+ $platform_id = intval($_GET['platform_id']);
210
+ $rvcount = intval($_GET['rvcount']);
211
+
212
+ if($platform_id && $rvcount){
213
+
214
+ $reviews_list = $this->_service->saswp_get_reviews_list_by_parameters(null, $platform_id, $rvcount);
215
+
216
+ if($reviews_list){
217
+
218
+ echo json_encode(array('status' => true, 'message'=> $reviews_list));
219
+
220
+ }else{
221
+
222
+ echo json_encode(array('status' => false, 'message'=> 'Data not found'));
223
+
224
+ }
225
+
226
+ }else{
227
+
228
+ echo json_encode(array('status' => false, 'message'=> 'Platform id or review count is missing'));
229
+
230
+ }
231
+
232
+ wp_die();
233
+ }
234
+
235
+ public function saswp_reviews_collection_shortcode_render($attr){
236
+
237
+ $html = $htmlp = '';
238
+
239
+ if(!is_admin()){
240
+
241
+ if(isset($attr['id'])){
242
+
243
+ $collection = array();
244
+ $total_collection = array();
245
+ $dots = $f_interval = $f_visibility = $arrow = 1;
246
+ $g_type = '';
247
+
248
+ $collection_data = get_post_meta($attr['id'], $key='', true);
249
+
250
+ $design = $collection_data['saswp_collection_design'][0];
251
+ $cols = $collection_data['saswp_collection_cols'][0];
252
+
253
+ if(isset($collection_data['saswp_gallery_arrow'][0])){
254
+
255
+ $arrow = $collection_data['saswp_gallery_arrow'][0];
256
+ }
257
+
258
+
259
+ if(isset($collection_data['saswp_gallery_dots'][0])){
260
+ $dots = $collection_data['saswp_gallery_dots'][0];
261
+ }
262
+
263
+ if(isset($collection_data['saswp_collection_gallery_type'][0])){
264
+ $g_type = $collection_data['saswp_collection_gallery_type'][0];
265
+ }
266
+
267
+ if(isset($collection_data['saswp_fomo_interval'][0])){
268
+ $f_interval = $collection_data['saswp_fomo_interval'][0];
269
+ }
270
+
271
+ if(isset($collection_data['saswp_fomo_visibility'][0])){
272
+ $f_visibility = $collection_data['saswp_fomo_visibility'][0];
273
+ }
274
+
275
+ $sorting = $collection_data['saswp_collection_sorting'][0];
276
+ $platform_id = unserialize($collection_data['saswp_platform_ids'][0]);
277
+
278
+ if($platform_id){
279
+
280
+ foreach ($platform_id as $key => $val){
281
+
282
+ $reviews_list = $this->_service->saswp_get_reviews_list_by_parameters(null, $key, $val);
283
+ $total_collection[] = $reviews_list;
284
+
285
+ if($reviews_list){
286
+
287
+ $collection = array_merge($collection, $reviews_list);
288
+ }
289
+
290
+ }
291
+
292
+ $collection = $this->_service->saswp_sort_collection($collection, $sorting);
293
+
294
+ }
295
+
296
+ if($collection){
297
+
298
+ switch($design) {
299
+
300
+ case "grid":
301
+
302
+ $html = $this->_service->saswp_create_collection_grid($cols, $collection);
303
+
304
+ break;
305
+
306
+ case 'gallery':
307
+
308
+ $html = $this->_service->saswp_create_collection_slider($g_type, $arrow, $dots, $collection);
309
+
310
+ break;
311
+
312
+ case 'badge':
313
+
314
+ $html = $this->_service->saswp_create_collection_badge($total_collection);
315
+
316
+ break;
317
+
318
+ case 'popup':
319
+
320
+ $html = $this->_service->saswp_create_collection_popup($collection);
321
+
322
+ break;
323
+
324
+ case 'fomo':
325
+
326
+ $html = $this->_service->saswp_create_collection_fomo($f_interval, $f_visibility, $collection);
327
+
328
+
329
+ break;
330
+
331
+ }
332
+
333
+ }
334
+
335
+ }
336
+
337
+
338
+ }
339
+
340
+ $htmlp .= '<div class="saswp-r">';
341
+ $htmlp .= $html;
342
+ $htmlp .= '</div>';
343
+ return $htmlp;
344
+
345
+ }
346
+
347
+ public function saswp_admin_collection_interface_render(){
348
+
349
+ if ( ! current_user_can( 'manage_options' ) ) return;
350
+ if ( !wp_verify_nonce( $_GET['_wpnonce'], '_wpnonce' ) ) return;
351
+
352
+ $post_meta = array();
353
+ $post_id = null;
354
+
355
+ if(isset($_GET['post_id'])){
356
+
357
+ $post_id = intval($_GET['post_id']);
358
+
359
+ $post_meta = get_post_meta($post_id, $key='', true );
360
+
361
+
362
+ } else{
363
+
364
+ $post = get_default_post_to_edit( 'saswp-google-review', true );
365
+ $post_id = intval($post->ID);
366
+ }
367
+
368
+ $coll_desing = array(
369
+ 'grid' => 'Grid',
370
+ 'gallery' => 'Gallery',
371
+ 'badge' => 'Badge',
372
+ 'popup' => 'PopUp',
373
+ 'fomo' => 'Fomo',
374
+ );
375
+
376
+ $coll_sorting = array(
377
+ 'recent' => 'Recent',
378
+ 'oldest' => 'Oldest',
379
+ 'newest' => 'Newest',
380
+ 'highest' => 'Highest Rating',
381
+ 'lowest' => 'Lowest Rating',
382
+ 'random' => 'Random'
383
+ );
384
+
385
+ $coll_display_type = array(
386
+ 'shortcode' => 'Shortcode',
387
+ // 'before_the_content' => 'Before the content',
388
+ // 'between_the_content' => 'Beetween the content',
389
+ // 'after_the_content' => 'After the content',
390
+ );
391
+
392
+ ?>
393
+
394
+ <div class="saswp-collection-wrapper">
395
+
396
+ <form method="post" action="post.php">
397
+ <input type="hidden" name="saswp_collection_nonce" value="<?php echo wp_create_nonce('saswp_collection_nonce_data'); ?>">
398
+ <input type="hidden" name="post_type" value="saswp-collections">
399
+ <input type="hidden" name="saswp-collection-page" value="1">
400
+ <input type="hidden" id="saswp_collection_id" name="saswp_collection_id" value="<?php echo esc_attr($post_id); ?>">
401
+
402
+ <div class="saswp-collection-container">
403
+ <div class="saswp-collection-body">
404
+ <div class="saswp-collection-lp">
405
+ <div class="saswp-collection-title">
406
+ <input type="text" value="<?php if(get_the_title($post_id) == 'Auto Draft'){ echo 'Untitled'; }else{ echo get_the_title($post_id); } ?>" id="saswp_collection_title" name="saswp_collection_title">
407
+ </div>
408
+ <span class="spinner saswp-spinner"></span>
409
+ <div class="saswp-collection-preview">
410
+ <!-- Collections html will be loaded on ajax call -->
411
+ </div>
412
+ </div><!-- /.saswp-collection-lp -->
413
+ <div class="saswp-collection-settings">
414
+ <ul>
415
+ <li>
416
+ <a class="saswp-accordion"><?php echo esc_html__('Reviews Source','schema-and-structured-data-for-wp'); ?></a>
417
+ <div class="saswp-accordion-panel">
418
+ <?php $platforms = saswp_get_terms_as_array();
419
+ if($platforms){
420
+ global $wpdb;
421
+ $exists_platforms = $wpdb->get_results("
422
+ SELECT meta_value, count(meta_value) as meta_count FROM {$wpdb->postmeta} WHERE `meta_key`='saswp_review_platform' group by meta_value",
423
+ ARRAY_A
424
+ ); ?>
425
+ <div class="saswp-plf-lst-rv-cnt">
426
+ <?php
427
+ echo '<select id="saswp-plaftorm-list" name="saswp-plaftorm-list">';
428
+
429
+ $active_options = '';
430
+ $inactive_options = '';
431
+
432
+ foreach($platforms as $key => $val){
433
+ if(in_array($key, array_column($exists_platforms, 'meta_value'))){
434
+ $active_options .= '<option value="'.esc_attr($key).'">'.esc_attr($val).'</option>';
435
+ }else{
436
+ $inactive_options.= '<option value="'.esc_attr($key).'" disabled>'.esc_attr($val).'</option>';
437
+ }
438
+ }
439
+
440
+ echo '<optgroup label="Active">';
441
+ echo $active_options;
442
+ echo '</optgroup>';
443
+ echo '<optgroup label="InActive">';
444
+ echo $inactive_options;
445
+ echo '</optgroup>';
446
+ echo '</select>';
447
+
448
+ } ?>
449
+ <input type="number" id="saswp-review-count" name="saswp-review-count" min="0" value="5">
450
+ <a class="button button-default saswp-add-to-collection"><?php echo esc_html__('Add','schema-and-structured-data-for-wp'); ?></a>
451
+ </div>
452
+ <div class="saswp-platform-added-list">
453
+
454
+ </div>
455
+ </div>
456
+ </li>
457
+ <li>
458
+ <a class="saswp-accordion"><?php echo esc_html__('Presentation','schema-and-structured-data-for-wp'); ?></a>
459
+ <div class="saswp-accordion-panel">
460
+ <div class="saswp-dp-dsg">
461
+ <lable><?php echo esc_html__('Design','schema-and-structured-data-for-wp'); ?></lable>
462
+ <select name="saswp_collection_design" class="saswp-collection-desing saswp-coll-settings-options">
463
+ <?php
464
+ foreach($coll_desing as $key => $val){
465
+
466
+ echo '<option value="'.esc_attr($key).'" '.($post_meta['saswp_collection_design'][0] == $key ? 'selected':'').' >'.esc_html__( $val , 'schema-and-structured-data-for-wp' ).'</option>';
467
+ }
468
+ ?>
469
+ </select>
470
+ </div>
471
+ <div class="saswp-dp-dsg saswp-coll-options saswp-grid-options saswp-dp-dtm">
472
+ <label><?php echo esc_html__( 'Columns', 'schema-and-structured-data-for-wp' ); ?></label>
473
+ <input type="number" id="saswp-collection-cols" name="saswp_collection_cols" min="0" value="<?php echo (isset($post_meta['saswp_collection_cols'][0]) ? $post_meta['saswp_collection_cols'][0] : '2' ); ?>" class="saswp-number-change saswp-coll-settings-options saswp-coll-options saswp-grid-options">
474
+ </div>
475
+ <div class="saswp-dp-dsg saswp-dp-dtm saswp-slider-options saswp-coll-options">
476
+ <label><?php echo esc_html__( 'Slider Type', 'schema-and-structured-data-for-wp' ); ?></label>
477
+ <select name="saswp_collection_gallery_type" id="saswp_collection_gallery_type" class="saswp-slider-type saswp-slider-options saswp_hide saswp-coll-settings-options saswp-coll-options">
478
+ <option value="slider" <?php echo (isset($post_meta['saswp_collection_gallery_type'][0]) && $post_meta['saswp_collection_gallery_type'][0] == 'slider' ? 'selected' : '' ); ?>><?php echo esc_html__( 'Slider', 'schema-and-structured-data-for-wp' ); ?></option>
479
+ <option value="carousel" <?php echo (isset($post_meta['saswp_collection_gallery_type'][0]) && $post_meta['saswp_collection_gallery_type'][0] == 'carousel' ? 'selected' : '' ); ?>><?php echo esc_html__( 'Carousel', 'schema-and-structured-data-for-wp' ); ?></option>
480
+ </select>
481
+ </div>
482
+ <div class="saswp-slider-display saswp-slider-options saswp_hide saswp-coll-settings-options saswp-coll-options">
483
+ <span><input type="checkbox" id="saswp_gallery_arrow" name="saswp_gallery_arrow" value="1" <?php echo (isset($post_meta['saswp_gallery_arrow'][0]) && $post_meta['saswp_gallery_arrow'][0] == 1 ? 'checked' : '' ); ?>> <?php echo esc_html__('Arrows','schema-and-structured-data-for-wp'); ?></span>
484
+ <span><input type="checkbox" id="saswp_gallery_dots" name="saswp_gallery_dots" value="1" <?php echo (isset($post_meta['saswp_gallery_dots'][0]) && $post_meta['saswp_gallery_dots'][0] == 1 ? 'checked' : '' ); ?>> <?php echo esc_html__('Dots','schema-and-structured-data-for-wp'); ?></span>
485
+ </div>
486
+
487
+ <div class="saswp-fomo-options saswp_hide saswp-coll-options">
488
+ <div class="saswp-dp-dsg saswp-dp-dtm">
489
+ <span><?php echo esc_html__('Delay Time','schema-and-structured-data-for-wp'); ?>
490
+ </span>
491
+ <input type="number" id="saswp_fomo_interval" name="saswp_fomo_interval" class="saswp-number-change" min="1" value="<?php echo (isset($post_meta['saswp_fomo_interval'][0]) ? $post_meta['saswp_fomo_interval'][0] : '3' ); ?>">
492
+ </div>
493
+ </div>
494
+ </div>
495
+ </li>
496
+ <li>
497
+
498
+ <a class="saswp-accordion"><?php echo esc_html__('Filter','schema-and-structured-data-for-wp'); ?></a>
499
+ <div class="saswp-accordion-panel">
500
+ <div class="saswp-dp-dsg">
501
+ <lable><?php echo esc_html__('Sorting','schema-and-structured-data-for-wp'); ?></lable>
502
+ <select name="saswp_collection_sorting" class="saswp-collection-sorting saswp-coll-settings-options">
503
+ <?php
504
+ foreach($coll_sorting as $key => $val){
505
+ echo '<option value="'.esc_attr($key).'" '.($post_meta['saswp_collection_sorting'][0] == $key ? 'selected':'').' >'.esc_html__( $val , 'schema-and-structured-data-for-wp' ).'</option>';
506
+
507
+ }
508
+
509
+ ?>
510
+ </select>
511
+ </div>
512
+ </div>
513
+ </li>
514
+ <li>
515
+ <a class="saswp-accordion"><?php echo esc_html__('Display','schema-and-structured-data-for-wp'); ?></a>
516
+ <div class="saswp-accordion-panel">
517
+ <div class="saswp-dp-dsg">
518
+ <label><?php echo esc_html__( 'Display Type', 'schema-and-structured-data-for-wp' ); ?></label>
519
+ <select class="saswp-collection-display-method" name="saswp_collection_display_type">
520
+ <?php
521
+ foreach($coll_display_type as $key => $val){
522
+
523
+ echo '<option value="'.esc_attr($key).'" '.($post_meta['saswp_collection_display_type'][0] == $key ? 'selected':'').' >'.esc_html__( $val , 'schema-and-structured-data-for-wp' ).'</option>';
524
+ }
525
+ ?>
526
+ </select>
527
+ </div>
528
+
529
+ <div id="motivatebox" class="saswp_hide saswp-collection-shortcode">
530
+ <span class="motivate">
531
+ [saswp-reviews-collection id="<?php echo $post_id; ?>"]
532
+ </span>
533
+ </div>
534
+
535
+ </div>
536
+ </li>
537
+ </ul>
538
+ <div class="saswp-sv-btn">
539
+ <button type="submit" class="button button-primary" >
540
+ <?php echo esc_html__('Save Menu','schema-and-structured-data-for-wp'); ?>
541
+ </button>
542
+ </div>
543
+ </div><!-- /.saswp-collection-body -->
544
+ </div><!-- /.saswp-collection-body -->
545
+ </div><!-- /.saswp-collection-container -->
546
+ </form>
547
+ </div><!-- /.saswp-collection-wrapper -->
548
+
549
+ <?php
550
+
551
+ }
552
+
553
+ public function saswp_save_collection_data(){
554
+
555
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
556
+ if ( ! current_user_can( 'manage_options' ) ) return ;
557
+ if ( ! isset( $_POST['saswp_collection_nonce'] ) || ! wp_verify_nonce( $_POST['saswp_collection_nonce'], 'saswp_collection_nonce_data' ) ) return;
558
+
559
+ if(isset($_POST['saswp_collection_id'])){
560
+
561
+ $post_id = intval($_POST['saswp_collection_id']);
562
+ $collection_page = intval($_POST['saswp-collection-page']);
563
+ $post_title = sanitize_text_field($_POST['saswp_collection_title']);
564
+
565
+ $post = array(
566
+ 'ID' => $post_id,
567
+ 'post_title' => $post_title,
568
+ 'post_status' => 'publish',
569
+ 'post_name' => $post_title,
570
+ 'post_type' => 'saswp-collections',
571
+ );
572
+
573
+ wp_update_post($post);
574
+ $post_meta = array();
575
+ $post_meta['saswp_collection_design'] = sanitize_text_field($_POST['saswp_collection_design']);
576
+ $post_meta['saswp_collection_sorting'] = sanitize_text_field($_POST['saswp_collection_sorting']);
577
+ $post_meta['saswp_collection_display_type'] = sanitize_text_field($_POST['saswp_collection_display_type']);
578
+ $post_meta['saswp_collection_gallery_type'] = sanitize_text_field($_POST['saswp_collection_gallery_type']);
579
+ $post_meta['saswp_collection_cols'] = intval($_POST['saswp_collection_cols']);
580
+ $post_meta['saswp_gallery_arrow'] = intval($_POST['saswp_gallery_arrow']);
581
+ $post_meta['saswp_gallery_dots'] = intval($_POST['saswp_gallery_dots']);
582
+ $post_meta['saswp_fomo_interval'] = intval($_POST['saswp_fomo_interval']);
583
+ $post_meta['saswp_fomo_visibility'] = intval($_POST['saswp_fomo_visibility']);
584
+ $post_meta['saswp_platform_ids'] = array_map('intval', $_POST['saswp_platform_ids']);
585
+
586
+ if(!empty($post_meta)){
587
+
588
+ foreach($post_meta as $meta_key => $meta_val){
589
+
590
+ update_post_meta($post_id, $meta_key, $meta_val);
591
+
592
+ }
593
+
594
+ }
595
+
596
+ if($collection_page == 1){
597
+
598
+ $current_url = htmlspecialchars_decode(wp_nonce_url(admin_url('admin.php?post_id='.$post_id.'&page=collection'), '_wpnonce'));
599
+ wp_redirect( $current_url );
600
+ exit;
601
+ }
602
+
603
+ }
604
+
605
+ }
606
+
607
+ }
608
+
609
+ if ( class_exists( 'SASWP_Reviews_Collection') ) {
610
+ SASWP_Reviews_Collection::get_instance();
611
+ }
modules/reviews/reviews_service.php ADDED
@@ -0,0 +1,1300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Newsletter class
4
+ *
5
+ * @author Magazine3
6
+ * @category Admin
7
+ * @path reviews/reviews_service
8
+ * @Version 1.9
9
+ */
10
+
11
+ // Exit if accessed directly.
12
+ if ( ! defined( 'ABSPATH' ) ) exit;
13
+
14
+ class saswp_reviews_service {
15
+
16
+ /**
17
+ * List of hooks used in this context
18
+ */
19
+ public function saswp_service_hooks(){
20
+ add_action( 'wp_ajax_saswp_fetch_google_reviews', array($this,'saswp_fetch_google_reviews'));
21
+ add_shortcode( 'saswp-reviews', array($this, 'saswp_reviews_shortcode' ));
22
+ }
23
+
24
+ /**
25
+ * Function to get reviews schema markup
26
+ * @global type $sd_data
27
+ * @return string
28
+ */
29
+ public function saswp_get_reviews_schema_markup($reviews){
30
+
31
+ $sumofrating = 0;
32
+ $avg_rating = 1;
33
+ $reviews_arr = array();
34
+ $input1 = array();
35
+
36
+ if($reviews){
37
+
38
+ foreach($reviews as $rv){
39
+
40
+ $sumofrating += $rv['saswp_review_rating'];
41
+
42
+ if($rv['saswp_review_rating'] && $rv['saswp_reviewer_name']){
43
+
44
+ $reviews_arr[] = array(
45
+ '@type' => 'Review',
46
+ 'author' => $rv['saswp_reviewer_name'],
47
+ 'datePublished' => $rv['saswp_review_date'],
48
+ 'description' => $rv['saswp_review_text'],
49
+ 'reviewRating' => array(
50
+ '@type' => 'Rating',
51
+ 'bestRating' => 5,
52
+ 'ratingValue' => $rv['saswp_review_rating'],
53
+ 'worstRating' => 1
54
+ ),
55
+ );
56
+
57
+ }
58
+
59
+ }
60
+
61
+ if($sumofrating> 0){
62
+ $avg_rating = $sumofrating / count($reviews);
63
+ }
64
+
65
+ if(!empty($reviews_arr)){
66
+
67
+ $input1['review'] = $reviews_arr;
68
+
69
+ }
70
+
71
+ $input1['aggregateRating'] = array(
72
+ '@type' => 'AggregateRating',
73
+ 'reviewCount' => count($reviews),
74
+ 'ratingValue' => esc_attr($avg_rating),
75
+ );
76
+
77
+ }
78
+ return $input1;
79
+
80
+ }
81
+
82
+ /**
83
+ * Function to generate reviews html
84
+ * @param type $reviews
85
+ * @return string
86
+ */
87
+ public function saswp_reviews_html_markup($reviews){
88
+
89
+ $output = '';
90
+ if($reviews){
91
+
92
+ foreach ($reviews as $review){
93
+
94
+ $review_rating = $review['saswp_review_rating'];
95
+
96
+ $starating = saswp_get_rating_html_by_value($review_rating);
97
+
98
+ $term = get_term( $review['saswp_review_platform'], 'platform' );
99
+ $term_slug = '';
100
+
101
+ if(is_object($term)){
102
+ $term_slug = $term->slug;
103
+ }
104
+
105
+ $img_src = SASWP_DIR_URI.'/admin_section/images/default_user.jpg';
106
+
107
+ if(isset($review['saswp_reviewer_image']) && $review['saswp_reviewer_image'] !=''){
108
+ $img_src = $review['saswp_reviewer_image'];
109
+ }
110
+
111
+ $output.= '<div class="saswp-g-review-panel">
112
+ <div class="saswp-glg-review-body">
113
+ <div class="saswp-rv-img">
114
+ <img src="'.esc_url($img_src).'" alt="'.esc_attr($review['saswp_reviewer_name']).'">
115
+ </div>
116
+ <div class="saswp-rv-cnt">
117
+ <div class="saswp-r5-rng">
118
+ <div class="saswp-str">
119
+ <span class="saswp-athr">'.esc_attr($review['saswp_reviewer_name']).'</span>
120
+ '.$starating.'
121
+ </div>
122
+ <span class="saswp-g-plus">
123
+ <a target="_blank" href="'.esc_attr($review['saswp_review_link']).'"><img src="'.SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/'.esc_attr($term_slug).'-img.png'.'"></a>
124
+ </span>
125
+ </div>
126
+ <p>'.substr($review['saswp_review_text'],0,300).'</p>
127
+ </div>
128
+ </div>
129
+ </div>';
130
+
131
+ }
132
+
133
+ wp_enqueue_style( 'saswp-style', SASWP_PLUGIN_URL . 'admin_section/css/saswp-style.min.css', false , SASWP_VERSION );
134
+
135
+ }
136
+ return $output;
137
+
138
+ }
139
+
140
+ public function saswp_fetch_google_reviews(){
141
+
142
+ if ( ! current_user_can( 'manage_options' ) ) {
143
+ return;
144
+ }
145
+
146
+ if ( ! isset( $_POST['saswp_security_nonce'] ) ){
147
+ return;
148
+ }
149
+
150
+ if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
151
+ return;
152
+ }
153
+
154
+ global $sd_data;
155
+
156
+ $location = $blocks = $premium_status = $g_api = $reviews_api = $reviews_api_status = '';
157
+
158
+ if(isset($_POST['reviews_api'])){
159
+ $reviews_api = sanitize_text_field($_POST['reviews_api']);
160
+ }
161
+
162
+ if(isset($_POST['reviews_api_status'])){
163
+ $reviews_api_status = sanitize_text_field($_POST['reviews_api_status']);
164
+ }
165
+
166
+ if(isset($_POST['location'])){
167
+ $location = sanitize_text_field($_POST['location']);
168
+ }
169
+
170
+ if(isset($_POST['g_api'])){
171
+ $g_api = sanitize_text_field($_POST['g_api']);
172
+ }
173
+
174
+ if(isset($_POST['premium_status'])){
175
+ $premium_status = sanitize_text_field($_POST['premium_status']);
176
+ }
177
+
178
+ if(isset($_POST['blocks'])){
179
+ $blocks = intval($_POST['blocks']);
180
+ }
181
+
182
+ if($location){
183
+
184
+ if(isset($sd_data['saswp_reviews_location_name'])){
185
+
186
+ if(!in_array($location, $sd_data['saswp_reviews_location_name'])){
187
+ array_push($sd_data['saswp_reviews_location_name'], $location);
188
+ }
189
+
190
+ }else{
191
+ $sd_data['saswp_reviews_location_name'] = array($location);
192
+
193
+ }
194
+
195
+ if(isset($sd_data['saswp_reviews_location_blocks'])){
196
+
197
+ if(!in_array($blocks, $sd_data['saswp_reviews_location_blocks'])){
198
+ array_push($sd_data['saswp_reviews_location_blocks'], $blocks);
199
+ }
200
+
201
+ }else{
202
+
203
+ $sd_data['saswp_reviews_location_blocks'] = array($blocks);
204
+
205
+ }
206
+
207
+ $sd_data['saswp-google-review'] = 1;
208
+ $sd_data['saswp_google_place_api_key'] = $g_api;
209
+ update_option('sd_data', $sd_data);
210
+
211
+ $result = null;
212
+ $user_id = get_option('reviews_addon_user_id');
213
+
214
+ if($reviews_api){
215
+
216
+ if($premium_status == 'premium'){
217
+
218
+ if($reviews_api_status == 'active'){
219
+
220
+ if($user_id){
221
+
222
+ if(function_exists('saswp_get_paid_reviews_data')){
223
+
224
+ $result = saswp_get_paid_reviews_data($location, $reviews_api, $user_id, $blocks);
225
+
226
+ if($result['status'] && is_numeric($result['message'])){
227
+
228
+ $rv_limits = get_option('reviews_addon_reviews_limits');
229
+
230
+ $result['message'] = esc_html__('Reviews fetched','schema-and-structured-data-for-wp').' : '. $rv_limits - $result['message']. ', '.esc_html__('Remains Limit','schema-and-structured-data-for-wp').' : '.$result['message'];
231
+
232
+ update_option('reviews_addon_reviews_limits', intval($result['message']));
233
+ }
234
+
235
+ }else{
236
+ $result['status'] = false;
237
+ $result['message'] = esc_html__( 'Reviews for schema plugin is not activated', 'schema-and-structured-data-for-wp' );
238
+ }
239
+
240
+ }else{
241
+ $result['status'] = false;
242
+ $result['message'] = esc_html__( 'User is not register', 'schema-and-structured-data-for-wp' );
243
+ }
244
+
245
+ }else{
246
+ $result['status'] = false;
247
+ $result['message'] = esc_html__( 'License key is not active', 'schema-and-structured-data-for-wp' );
248
+ }
249
+
250
+
251
+ }else{
252
+
253
+ if($g_api){
254
+
255
+ $result = $this->saswp_get_free_reviews_data($location, $g_api);
256
+
257
+ }
258
+
259
+ }
260
+
261
+ }else{
262
+
263
+ if($g_api){
264
+
265
+ $result = $this->saswp_get_free_reviews_data($location, $g_api);
266
+ }
267
+
268
+ }
269
+
270
+ echo json_encode($result);
271
+
272
+ }else{
273
+
274
+ echo json_encode(array('status' => false, 'message' => esc_html__( 'Place id is empty', 'schema-and-structured-data-for-wp' )));
275
+
276
+ }
277
+
278
+ wp_die();
279
+
280
+ }
281
+
282
+ /**
283
+ * Function to show value using shortcode "saswp-reviews"
284
+ * @param type $attr
285
+ * @return type
286
+ */
287
+ public function saswp_reviews_front_output($attr){
288
+
289
+ global $sd_data;
290
+ $reviews = $this->saswp_get_reviews_list_by_parameters($attr);
291
+
292
+ $output = $html = '';
293
+
294
+ if($reviews){
295
+
296
+ $output = $this->saswp_reviews_html_markup($reviews);
297
+
298
+ if(saswp_global_option()){
299
+
300
+ $rv_markup = $this->saswp_get_reviews_schema_markup($reviews);
301
+
302
+ if($rv_markup){
303
+
304
+ $input1['@context'] = saswp_context_url();
305
+ $input1['@type'] = (isset($sd_data['saswp_organization_type']) && $sd_data['saswp_organization_type'] !='' )? $sd_data['saswp_organization_type'] : 'Organization';
306
+ $input1['name'] = (isset($sd_data['sd_name']) && $sd_data['sd_name'] !='' )? $sd_data['sd_name'] : get_bloginfo();
307
+
308
+ $input1 = $input1 + $rv_markup;
309
+
310
+ $html .= "\n";
311
+ $html .= '<!-- Schema & Structured Data For Reviews v'.esc_attr(SASWP_VERSION).' - -->';
312
+ $html .= "\n";
313
+ $html .= '<script type="application/ld+json" class="saswp-reviews-markup">';
314
+ $html .= "\n";
315
+ $html .= saswp_json_print_format($input1);
316
+ $html .= "\n";
317
+ $html .= '</script>';
318
+ $html .= "\n\n";
319
+
320
+ $output = $output.$html;
321
+
322
+ }
323
+
324
+ }
325
+
326
+ }
327
+
328
+ return $output;
329
+
330
+ }
331
+
332
+ public function saswp_reviews_shortcode($attr){
333
+
334
+ $response = $this->saswp_reviews_front_output($attr);
335
+
336
+ return $response;
337
+
338
+ }
339
+
340
+ public function saswp_save_free_reviews_data($result, $place_id) {
341
+
342
+ $place_saved = array();
343
+ $reviews_saved = array();
344
+
345
+ if (isset($result['place_id']) && $result['place_id'] != '') {
346
+
347
+ $user_id = get_current_user_id();
348
+ $postarr = array(
349
+ 'post_author' => $user_id,
350
+ 'post_title' => $result['name'],
351
+ 'post_status' => 'publish',
352
+ 'post_name' => $result['name'],
353
+ 'post_type' => 'saswp_rvs_location',
354
+
355
+ );
356
+
357
+ $post_id = wp_insert_post( $postarr );
358
+ $place_saved[] = $post_id;
359
+ $review_meta = array(
360
+ 'saswp_rvs_loc_id' => $result['place_id'],
361
+ 'saswp_rvs_loc_review_count' => $result['user_ratings_total'],
362
+ 'saswp_rvs_loc_avg_rating' => $result['rating'],
363
+ 'saswp_rvs_loc_icon' => $result['icon'],
364
+ 'saswp_rvs_loc_address' => $result['formatted_address'],
365
+ );
366
+
367
+ if($post_id && !empty($review_meta) && is_array($review_meta)){
368
+
369
+ foreach ($review_meta as $key => $val){
370
+ update_post_meta($post_id, $key, $val);
371
+ }
372
+
373
+ }
374
+
375
+ }
376
+
377
+
378
+ if (isset($result['reviews'])) {
379
+
380
+ $reviews = $result['reviews'];
381
+
382
+ foreach ($reviews as $review) {
383
+
384
+ $user_id = get_current_user_id();
385
+ $postarr = array(
386
+ 'post_author' => $user_id,
387
+ 'post_title' => $review['author_name'],
388
+ 'post_status' => 'publish',
389
+ 'post_name' => 'Default Review',
390
+ 'post_type' => 'saswp_reviews',
391
+
392
+ );
393
+
394
+ $post_id = wp_insert_post( $postarr );
395
+ $reviews_saved[] = $post_id;
396
+ $term = get_term_by( 'slug','google', 'platform' );
397
+
398
+ $media_detail = array();
399
+
400
+ if(isset($review['profile_photo_url'])){
401
+
402
+ $image_details = saswp_get_attachment_details(array($review['profile_photo_url']));
403
+
404
+ $media_detail = array(
405
+ 'width' => $image_details[0][0],
406
+ 'height' => $image_details[0][1],
407
+ 'thumbnail' => $review['profile_photo_url'],
408
+ );
409
+
410
+ }
411
+
412
+ $review_meta = array(
413
+ 'saswp_review_platform' => $term->term_id,
414
+ 'saswp_review_location_id' => $place_id,
415
+ 'saswp_review_time' => $review['time'],
416
+ 'saswp_review_rating' => $review['rating'],
417
+ 'saswp_review_text' => $review['text'],
418
+ 'saswp_reviewer_lang' => $review['language'],
419
+ 'saswp_reviewer_name' => $review['author_name'],
420
+ 'saswp_review_link' => isset($review['author_url']) ? $review['author_url'] : null,
421
+ 'saswp_reviewer_image' => isset($review['profile_photo_url']) ? $review['profile_photo_url'] : SASWP_DIR_URI.'/admin_section/images/default_user.jpg',
422
+ 'saswp_reviewer_image_detail' => $media_detail
423
+ );
424
+
425
+ if($post_id && !empty($review_meta) && is_array($review_meta)){
426
+
427
+ foreach ($review_meta as $key => $val){
428
+ update_post_meta($post_id, $key, $val);
429
+ }
430
+
431
+ }
432
+
433
+ }
434
+ }
435
+
436
+ if(!empty($place_saved) || !empty($reviews_saved)){
437
+ return true;
438
+ }else{
439
+ return false;
440
+ }
441
+
442
+ }
443
+
444
+ public function saswp_get_free_reviews_data($place_id, $g_api){
445
+
446
+ $result = @wp_remote_get('https://maps.googleapis.com/maps/api/place/details/json?placeid='.trim($place_id).'&key='.trim($g_api));
447
+
448
+ if(isset($result['body'])){
449
+
450
+ $result = json_decode($result['body'],true);
451
+
452
+ if($result['result']){
453
+
454
+ $response = $this->saswp_save_free_reviews_data($result['result'], $place_id);
455
+
456
+ if($response){
457
+ return array('status' => true, 'message' => esc_html__( 'Fetched Successfully', 'schema-and-structured-data-for-wp' ));
458
+ }else{
459
+ return array('status' => false, 'message' => esc_html__( 'Not fetched', 'schema-and-structured-data-for-wp' ));
460
+ }
461
+
462
+ }else{
463
+ if($result['error_message']){
464
+ return array('status' => false, 'message' => $result['error_message']);
465
+ }else{
466
+ return array('status' => false, 'message' => esc_html__( 'Something went wrong', 'schema-and-structured-data-for-wp' ));
467
+ }
468
+ }
469
+
470
+ }else{
471
+ return null;
472
+ }
473
+
474
+ }
475
+
476
+ public function saswp_get_reviews_list_by_parameters($attr = null, $platform_id = null, $rvcount = null){
477
+
478
+ $response = array();
479
+
480
+ $arg = array();
481
+ $meta_query = array();
482
+
483
+ $arg['post_type'] = 'saswp_reviews';
484
+ $arg['numberposts'] = -1;
485
+ $arg['post_status'] = 'publish';
486
+
487
+ if($attr){
488
+
489
+ if(isset($attr['id'])){
490
+ $arg['attachment_id'] = $attr['id'];
491
+ }
492
+ if(isset($attr['title'])){
493
+ $arg['title'] = $attr['title'];
494
+ }
495
+ if(isset($attr['count'])){
496
+ $arg['posts_per_page'] = $attr['count'];
497
+ }
498
+
499
+ if(isset($attr['rating'])){
500
+ $meta_query[] = array(
501
+ 'key' => 'saswp_review_rating',
502
+ 'value' => $attr['rating'],
503
+ 'compare' => '='
504
+ );
505
+ }
506
+ if(isset($attr['platform'])){
507
+ $term = get_term_by( 'slug', $attr['platform'], 'platform' );
508
+
509
+ $meta_query[] = array(
510
+ 'key' => 'saswp_review_platform',
511
+ 'value' => $term->term_id,
512
+ 'compare' => '='
513
+ );
514
+ }
515
+ $meta_query_args = array(
516
+ array(
517
+ 'relation' => 'AND',
518
+ $meta_query
519
+ )
520
+ );
521
+ $arg['meta_query'] = $meta_query_args;
522
+ }
523
+
524
+
525
+ if($platform_id && $rvcount){
526
+
527
+ $arg['numberposts'] = $rvcount;
528
+ $arg['meta_query'] = array(
529
+ array(
530
+ 'key' => 'saswp_review_platform',
531
+ 'value' => $platform_id,
532
+ 'compare' => '==',
533
+ )
534
+ );
535
+
536
+ }
537
+
538
+ $posts_list = get_posts($arg);
539
+
540
+ if($posts_list){
541
+
542
+ $post_meta = array(
543
+ 'saswp_reviewer_image',
544
+ 'saswp_reviewer_name',
545
+ 'saswp_review_rating',
546
+ 'saswp_review_date',
547
+ 'saswp_review_text',
548
+ 'saswp_review_link',
549
+ 'saswp_review_platform',
550
+ 'saswp_review_platform_icon',
551
+ 'saswp_review_platform_name',
552
+ );
553
+
554
+ foreach($posts_list as $rv_post){
555
+
556
+ $review_data = array();
557
+
558
+ foreach($post_meta as $meta_key){
559
+
560
+ $review_data[$meta_key] = get_post_meta($rv_post->ID, $meta_key, true );
561
+
562
+ }
563
+
564
+ if(!$review_data['saswp_reviewer_image']){
565
+ $review_data['saswp_reviewer_image'] = SASWP_DIR_URI.'/admin_section/images/default_user.jpg';
566
+ }
567
+
568
+ $term = get_term( $review_data['saswp_review_platform'], 'platform' );
569
+
570
+ if(!$review_data['saswp_review_platform_icon']){
571
+
572
+ if(isset($term->slug)){
573
+
574
+ $review_data['saswp_review_platform_icon'] = SASWP_PLUGIN_URL.'/admin_section/images/reviews_platform_icon/'.esc_attr($term->slug).'-img.png';
575
+ }
576
+
577
+ }
578
+
579
+ if(!$review_data['saswp_review_platform_name']){
580
+ $review_data['saswp_review_platform_name'] = $term->name;
581
+ }
582
+
583
+ $review_data['saswp_review_post_id'] = $rv_post->ID;
584
+ $response[] = $review_data;
585
+ }
586
+
587
+ }
588
+
589
+ return $response;
590
+ }
591
+
592
+ public function saswp_sort_collection($collection, $sorting){
593
+
594
+ if($collection){
595
+
596
+ switch($sorting){
597
+
598
+ case 'lowest':
599
+
600
+ usort($collection, function($a, $b) {
601
+ return $a['saswp_review_rating'] - $b['saswp_review_rating'];
602
+ });
603
+
604
+ break;
605
+
606
+ case 'highest':
607
+
608
+ usort($collection, function($a, $b) {
609
+ return $a['saswp_review_rating'] - $b['saswp_review_rating'];
610
+ });
611
+
612
+ $collection = array_reverse($collection);
613
+
614
+
615
+ break;
616
+
617
+ case 'newest':
618
+ case 'recent':
619
+
620
+ usort($collection, function($a, $b) {
621
+ return strtotime($a['saswp_review_date']) - strtotime($b['saswp_review_date']);
622
+ });
623
+
624
+ $collection = array_reverse($collection);
625
+
626
+ break;
627
+
628
+ case 'oldest':
629
+
630
+ usort($collection, function($a, $b) {
631
+ return strtotime($a['saswp_review_date']) - strtotime($b['saswp_review_date']);
632
+ });
633
+
634
+ break;
635
+
636
+ case 'random':
637
+
638
+ shuffle($collection);
639
+
640
+ break;
641
+
642
+ }
643
+
644
+ }
645
+
646
+ return $collection;
647
+
648
+ }
649
+
650
+ public function saswp_convert_datetostring($date_str){
651
+
652
+ $response = array();
653
+
654
+ $response['date'] = date('Y-m-d', strtotime($date_str));
655
+ $response['time'] = date('G:i:s', strtotime($date_str));
656
+
657
+ return $response;
658
+
659
+ }
660
+
661
+ public function saswp_create_collection_grid($cols, $collection){
662
+
663
+ $html = '';
664
+ $grid_cols = '';
665
+
666
+ if($collection){
667
+
668
+
669
+ if(saswp_non_amp()){
670
+
671
+ $html .= '<div class="saswp-r1">';
672
+
673
+ for($i=1; $i <= $cols; $i++ ){
674
+ $grid_cols .=' 1fr';
675
+ }
676
+
677
+ if($cols > 5){
678
+
679
+ $html .= '<ul style="grid-template-columns:'.esc_attr($grid_cols).';overflow-x: scroll;">';
680
+ }else{
681
+ $html .= '<ul style="grid-template-columns:'.esc_attr($grid_cols).';overflow-x:hidden;">';
682
+ }
683
+
684
+
685
+ foreach ($collection as $value){
686
+
687
+ $date_str = $this->saswp_convert_datetostring($value['saswp_review_date']);
688
+
689
+ $html .= '<li>';
690
+ $html .= '<div class="saswp-rc">';
691
+ $html .= '<div class="saswp-rc-a">';
692
+ $html .= '<div class="saswp-r1-aimg">';
693
+ $html .= '<img src="'.esc_url($value['saswp_reviewer_image']).'" width="56" height="56"/>';
694
+ $html .= '</div>';
695
+ $html .= '<div class="saswp-rc-nm">';
696
+ $html .= '<a href="#">'.esc_attr($value['saswp_reviewer_name']).'</a>';
697
+ $html .= saswp_get_rating_html_by_value($value['saswp_review_rating']);
698
+ $html .= '<span class="saswp-rc-dt">'.esc_attr($date_str['date']).'</span>';
699
+ $html .= '</div>';
700
+ $html .= '</div>';
701
+
702
+ $html .= '<div class="saswp-rc-lg">';
703
+ $html .= '<img src="'.esc_url($value['saswp_review_platform_icon']).'"/>';
704
+ $html .= '</div>';
705
+
706
+ $html .= '</div>';
707
+ $html .='<div class="saswp-rc-cnt">';
708
+ $html .= '<p>'. esc_attr($value['saswp_review_text']).'</p>';
709
+ $html .= '</div>';
710
+ $html .= '</li>';
711
+
712
+ }
713
+
714
+ $html .= '</ul>';
715
+ $html .= '</div>';
716
+
717
+ }else{
718
+
719
+ $html .= '<div class="saswp-r1">';
720
+
721
+ for($i=1; $i <= $cols; $i++ ){
722
+ $grid_cols .=' 1fr';
723
+ }
724
+ if($cols > 4){
725
+
726
+ $html .= '<ul class="saswp-grid-scroll" style="grid-template-columns:'.esc_attr($grid_cols).';">';
727
+ }else{
728
+ $html .= '<ul class="saswp-grid-scroll-hidden" style="grid-template-columns:'.esc_attr($grid_cols).';">';
729
+ }
730
+
731
+ foreach ($collection as $value){
732
+
733
+ $date_str = $this->saswp_convert_datetostring($value['saswp_review_date']);
734
+
735
+ $html .= '<li>';
736
+ $html .= '<div class="saswp-rc">';
737
+ $html .= '<div class="saswp-rc-a">';
738
+ $html .= '<div class="saswp-r1-aimg">';
739
+ $html .= '<amp-img src="'.esc_url($value['saswp_reviewer_image']).'" width="70" height="56"></amp-img>';
740
+ $html .= '</div>';
741
+ $html .= '<div class="saswp-rc-nm">';
742
+ $html .= '<a href="#">'.esc_attr($value['saswp_reviewer_name']).'</a>';
743
+ $html .= saswp_get_rating_html_by_value($value['saswp_review_rating']);
744
+ $html .= '<span class="saswp-rc-dt">'.esc_attr($date_str['date']).'</span>';
745
+ $html .= '</div>';
746
+ $html .= '</div>';
747
+
748
+ $html .= '<div class="saswp-rc-lg">';
749
+ $html .= '<img src="'.esc_url($value['saswp_review_platform_icon']).'"/>';
750
+ $html .= '</div>';
751
+
752
+ $html .= '</div>';
753
+ $html .='<div class="saswp-rc-cnt">';
754
+ $html .= '<p>'. esc_attr($value['saswp_review_text']).'</p>';
755
+ $html .= '</div>';
756
+ $html .= '</li>';
757
+
758
+ }
759
+
760
+ $html .= '</ul>';
761
+ $html .= '</div>';
762
+
763
+
764
+ }
765
+
766
+ }
767
+ return $html;
768
+
769
+ }
770
+
771
+ public function saswp_review_desing_for_slider($value){
772
+
773
+ $html = '';
774
+ $date_str = $this->saswp_convert_datetostring($value['saswp_review_date']);
775
+
776
+ $html .= '<div class="saswp-r2-sli">';
777
+ $html .= '<div class="saswp-r2-b">';
778
+
779
+ $html .= '<div class="saswp-r2-q">';
780
+ $html .= '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="95.333px" height="95.332px" viewBox="0 0 95.333 95.332" style="enable-background:new 0 0 95.333 95.332;" xml:space="preserve"><path d="M30.512,43.939c-2.348-0.676-4.696-1.019-6.98-1.019c-3.527,0-6.47,0.806-8.752,1.793 c2.2-8.054,7.485-21.951,18.013-23.516c0.975-0.145,1.774-0.85,2.04-1.799l2.301-8.23c0.194-0.696,0.079-1.441-0.318-2.045 s-1.035-1.007-1.75-1.105c-0.777-0.106-1.569-0.16-2.354-0.16c-12.637,0-25.152,13.19-30.433,32.076 c-3.1,11.08-4.009,27.738,3.627,38.223c4.273,5.867,10.507,9,18.529,9.313c0.033,0.001,0.065,0.002,0.098,0.002 c9.898,0,18.675-6.666,21.345-16.209c1.595-5.705,0.874-11.688-2.032-16.851C40.971,49.307,36.236,45.586,30.512,43.939z"></path><path d="M92.471,54.413c-2.875-5.106-7.61-8.827-13.334-10.474c-2.348-0.676-4.696-1.019-6.979-1.019 c-3.527,0-6.471,0.806-8.753,1.793c2.2-8.054,7.485-21.951,18.014-23.516c0.975-0.145,1.773-0.85,2.04-1.799l2.301-8.23 c0.194-0.696,0.079-1.441-0.318-2.045c-0.396-0.604-1.034-1.007-1.75-1.105c-0.776-0.106-1.568-0.16-2.354-0.16 c-12.637,0-25.152,13.19-30.434,32.076c-3.099,11.08-4.008,27.738,3.629,38.225c4.272,5.866,10.507,9,18.528,9.312 c0.033,0.001,0.065,0.002,0.099,0.002c9.897,0,18.675-6.666,21.345-16.209C96.098,65.559,95.376,59.575,92.471,54.413z"></path></svg>';
781
+ $html .= '</div>';
782
+ $html .= '<div class="saswp-rc-cnt">';
783
+ $html .= '<p>';
784
+ $html .= esc_attr($value['saswp_review_text']);
785
+ $html .= '</p>';
786
+ $html .= '</div>';
787
+ $html .= '<div class="saswp-r2-strs">';
788
+ $html .= '<span class="saswp-r2-s">';
789
+ $html .= saswp_get_rating_html_by_value($value['saswp_review_rating']);
790
+ $html .= '</span>';
791
+ $html .= '</div>';
792
+ $html .= '</div>';
793
+ $html .= '<div class="saswp-rc">';
794
+ $html .= '<div class="saswp-rc-a">';
795
+ $html .= '<img src="'.esc_url($value['saswp_reviewer_image']).'"/>';
796
+ $html .= '<div class="saswp-rc-nm">';
797
+ $html .= '<a href="#">'. esc_attr($value['saswp_reviewer_name']).'</a>';
798
+ $html .= '<span class="saswp-rc-dt">'.esc_attr($date_str['date']).'</span>';
799
+ $html .= '</div>';
800
+ $html .= '</div>';
801
+ $html .= '<div class="saswp-rc-lg">';
802
+ $html .= '<img src="'.esc_attr($value['saswp_review_platform_icon']).'"/>';
803
+ $html .= '</div>';
804
+ $html .= '</div>';
805
+ $html .= '</div>';
806
+
807
+ return $html;
808
+
809
+ }
810
+
811
+ public function saswp_create_collection_slider($g_type, $arrow, $dots, $collection){
812
+
813
+ $html = '';
814
+
815
+ if($collection){
816
+
817
+ if(saswp_non_amp()){
818
+
819
+ if($g_type == 'slider'){
820
+ $html .= '<div class="saswp-cst">';
821
+ }else{
822
+ $html .= '<div class="saswp-cct">';
823
+ }
824
+
825
+
826
+ $html .= '<div class="saswp-cs">';
827
+ $html .= '<div class="saswp-sic">';
828
+
829
+ if($g_type == 'slider'){
830
+
831
+ foreach ($collection as $value){
832
+
833
+ $html .= '<div class="saswp-si">';
834
+
835
+ $html .= $this->saswp_review_desing_for_slider($value);
836
+
837
+ $html .= '</div>';
838
+
839
+ }
840
+
841
+ }
842
+
843
+ if($g_type == 'carousel'){
844
+
845
+ $chunkarr = array_chunk($collection,3);
846
+
847
+ if($chunkarr){
848
+
849
+ foreach($chunkarr as $coll){
850
+
851
+ $html .= '<div class="saswp-si">';
852
+
853
+ foreach($coll as $value){
854
+
855
+ $html .= $this->saswp_review_desing_for_slider($value);
856
+
857
+ }
858
+
859
+ $html .= '</div>';
860
+
861
+ }
862
+
863
+ }
864
+
865
+ }
866
+
867
+ $html .= '</div>';
868
+
869
+ if($arrow){
870
+ $html .= '<div class="saswp-slider-controls">';
871
+ $html .= '<a href="#" class="saswp-slider-prev-btn"></a>';
872
+ $html .= '<a href="#" class="saswp-slider-next-btn"></a>';
873
+ $html .= '</div>';
874
+ }
875
+
876
+ if($dots){
877
+
878
+ $html .= '<div class="saswp-sd">';
879
+ $html .= '</div>';
880
+
881
+ }
882
+
883
+ $html .= '</div>';
884
+ $html .= '</div>';
885
+
886
+ }else{
887
+
888
+ if($collection){
889
+
890
+ $slide_button = '';
891
+
892
+ if($g_type == 'carousel'){
893
+ $html .= '<amp-carousel class="carousel-type" id="carousel-with-preview" height="290" layout="fixed-height" type="carousel" delay="2000" on="slideChange:AMP.setState({currentClass: event.index})">';
894
+ }
895
+ if($g_type == 'slider'){
896
+ $html .= '<amp-carousel class="slider-type" id="carousel-with-preview" height="290" layout="fixed-height" type="slides" delay="2000" on="slideChange:AMP.setState({currentClass: event.index})">';
897
+ }
898
+
899
+ $i = 0;
900
+
901
+ foreach ($collection as $value){
902
+
903
+ $html .= '<li>';
904
+ $html .= $this->saswp_review_desing_for_slider($value);
905
+ $html .= '</li>';
906
+
907
+ if($i == 0){
908
+ $slide_button .= '<button on="tap:carousel-with-preview.goToSlide(index='.$i.'),AMP.setState({currentClass:'.$i.'})" [class]="currentClass=='.$i.' ? \'active\' : \'\' " class="active"></button>';
909
+ }else{
910
+ $slide_button .= '<button on="tap:carousel-with-preview.goToSlide(index='.$i.'),AMP.setState({currentClass:'.$i.'})" [class]="currentClass=='.$i.' ? \'active\' : \'\' "></button>';
911
+ }
912
+
913
+ $i++;
914
+ }
915
+
916
+ $html .= '</amp-carousel>';
917
+ $html .= '<div class="saswp-cp">';
918
+ $html .= $slide_button;
919
+ $html .= '</div>';
920
+
921
+ }
922
+
923
+ $html .= '<div class="saswp-rd2-warp">';
924
+
925
+ $html .= '</div>';
926
+
927
+
928
+ }
929
+
930
+ }
931
+
932
+ return $html;
933
+
934
+ }
935
+ public function saswp_create_collection_badge($collection){
936
+
937
+ $html = '';
938
+ if($collection){
939
+
940
+ if(saswp_non_amp()){
941
+
942
+ $html .= '<div class="saswp-r3">';
943
+ $html .= '<ul>';
944
+
945
+ foreach ($collection as $platform_wise){
946
+
947
+ $platform_icon = '';
948
+ $platform_name = '';
949
+ $review_count = 0;
950
+ $sum_of_rating = 0;
951
+ $average_rating = 1;
952
+
953
+ foreach ($platform_wise as $key => $value){
954
+
955
+ $platform_name = $value['saswp_review_platform_name'];
956
+ $platform_icon = $value['saswp_review_platform_icon'];
957
+ $sum_of_rating += $value['saswp_review_rating'];
958
+ $review_count++;
959
+
960
+ }
961
+
962
+ if($sum_of_rating > 0){
963
+
964
+ $average_rating = $sum_of_rating / $review_count;
965
+
966
+ }
967
+
968
+ $html .= '<li>';
969
+ $html .= '<a href="#">';
970
+ $html .= '<div class="saswp-r3-lg">';
971
+ $html .= '<span>';
972
+ $html .= '<img src="'.esc_url($platform_icon).'"/>';
973
+ $html .= '</span>';
974
+ $html .= '<span class="saswp-r3-tlt">'.esc_attr($platform_name).'</span>';
975
+ $html .= '</div>';
976
+ $html .= '<div class="saswp-r3-rtng">';
977
+ $html .= '<div class="saswp-r3-rtxt">';
978
+ $html .= '<span class="saswp-r3-num">';
979
+ $html .= esc_attr(number_format($average_rating,1));
980
+ $html .= '</span>';
981
+ $html .= '<span class="saswp-stars">';
982
+ $html .= saswp_get_rating_html_by_value($average_rating);
983
+ $html .= '</span>';
984
+ $html .= '</div>';
985
+ $html .= '<span class="saswp-r3-brv">';
986
+ $html .= esc_html__('Based on','schema-and-structured-data-for-wp').' '.esc_attr($review_count).' '.esc_html__('Reviews','schema-and-structured-data-for-wp');
987
+ $html .= '</span>';
988
+ $html .= '</div>';
989
+ $html .= '</a>';
990
+ $html .= '</li>';
991
+
992
+ }
993
+
994
+ $html .= '</ul>';
995
+ $html .= '</div>';
996
+
997
+ }else{
998
+
999
+ $html .= '<div class="saswp-r3">';
1000
+ $html .= '<ul>';
1001
+
1002
+ foreach ($collection as $platform_wise){
1003
+
1004
+ $platform_icon = '';
1005
+ $platform_name = '';
1006
+ $review_count = 0;
1007
+ $sum_of_rating = 0;
1008
+ $average_rating = 1;
1009
+
1010
+ foreach ($platform_wise as $key => $value){
1011
+
1012
+ $platform_name = $value['saswp_review_platform_name'];
1013
+ $platform_icon = $value['saswp_review_platform_icon'];
1014
+ $sum_of_rating += $value['saswp_review_rating'];
1015
+ $review_count++;
1016
+
1017
+ }
1018
+
1019
+ if($sum_of_rating > 0){
1020
+
1021
+ $average_rating = $sum_of_rating / $review_count;
1022
+
1023
+ }
1024
+
1025
+ $html .= '<li>';
1026
+ $html .= '<a href="#">';
1027
+ $html .= '<div class="saswp-r3-lg">';
1028
+ $html .= '<span>';
1029
+ $html .= '<amp-img src="'.esc_url($platform_icon).'" width="70" height="56"></amp-img>';
1030
+ $html .= '</span>';
1031
+ $html .= '<span class="saswp-r3-tlt">'.esc_attr($platform_name).'</span>';
1032
+ $html .= '</div>';
1033
+ $html .= '<div class="saswp-r3-rtng">';
1034
+ $html .= '<div class="saswp-r3-rtxt">';
1035
+ $html .= '<span class="saswp-r3-num">';
1036
+ $html .= esc_attr(number_format($average_rating, 1));
1037
+ $html .= '</span>';
1038
+ $html .= '<span class="saswp-stars">';
1039
+ $html .= saswp_get_rating_html_by_value($average_rating);
1040
+ $html .= '</span>';
1041
+ $html .= '</div>';
1042
+ $html .= '<span class="saswp-r3-brv">';
1043
+ $html .= esc_html__('Based on','schema-and-structured-data-for-wp').' '.esc_attr($review_count).' '.esc_html__('Reviews','schema-and-structured-data-for-wp');
1044
+ $html .= '</span>';
1045
+ $html .= '</div>';
1046
+ $html .= '</a>';
1047
+ $html .= '</li>';
1048
+
1049
+ }
1050
+
1051
+ $html .= '</ul>';
1052
+ $html .= '</div>';
1053
+
1054
+ }
1055
+
1056
+
1057
+ }
1058
+
1059
+ return $html;
1060
+
1061
+ }
1062
+ public function saswp_create_collection_popup($collection){
1063
+
1064
+ $html = '';
1065
+ $html_list = '';
1066
+
1067
+ if($collection){
1068
+
1069
+ $review_count = 0;
1070
+ $sum_of_rating = 0;
1071
+ $average_rating = 1;
1072
+
1073
+ foreach($collection as $value){
1074
+
1075
+ $sum_of_rating += $value['saswp_review_rating'];
1076
+ $review_count++;
1077
+
1078
+ $date_str = $this->saswp_convert_datetostring($value['saswp_review_date']);
1079
+
1080
+ $html_list .= '<li>';
1081
+ $html_list .= '<div class="saswp-r4-b">';
1082
+ $html_list .= '<span class="saswp-r4-str">';
1083
+ $html_list .= saswp_get_rating_html_by_value($value['saswp_review_rating']);
1084
+ $html_list .= '</span>';
1085
+ $html_list .= '<span class="saswp-r4-tx">'. esc_attr($date_str['date']).'</span>';
1086
+ $html_list .= '</div>';
1087
+
1088
+ $html_list .= '<div class="saswp-r4-cnt">';
1089
+ $html_list .= '<h3>'. esc_attr($value['saswp_reviewer_name']).'</h3>';
1090
+ $html_list .= '<p>'. esc_attr($value['saswp_review_text']).'</p>';
1091
+ $html_list .= '</div>';
1092
+
1093
+ $html_list .= '</li>';
1094
+
1095
+ }
1096
+
1097
+ if($sum_of_rating > 0){
1098
+
1099
+ $average_rating = $sum_of_rating / $review_count;
1100
+
1101
+ }
1102
+
1103
+ if($review_count > 0){
1104
+
1105
+ if(saswp_non_amp()){
1106
+ $html .= '<div id="saswp-sticky-review">';
1107
+ $html .= '<div class="saswp-open-class saswp-popup-btn">';
1108
+ $html .= '<div class="saswp-opn-cls-btn">';
1109
+
1110
+ $html .= '<div class="saswp-onclick-hide">';
1111
+ $html .= '<span>';
1112
+ $html .= saswp_get_rating_html_by_value($average_rating);
1113
+ $html .= '</span>';
1114
+ $html .= '<span class="saswp-r4-rnm">'.esc_attr(number_format ($average_rating, 1)).' from '.esc_attr($review_count).' '.esc_html__('reviews','schema-and-structured-data-for-wp').'</span>';
1115
+ $html .= '</div>';
1116
+
1117
+ $html .= '<div class="saswp-onclick-show">';
1118
+ $html .= '<span>'.esc_html__('Ratings and reviews','schema-and-structured-data-for-wp').'</span>';
1119
+ $html .= '<span class="saswp-mines"></span>';
1120
+ $html .= '</div>';
1121
+
1122
+ $html .= '</div>';
1123
+ $html .= '<div id="saswp-reviews-cntn">';
1124
+ $html .= '<div class="saswp-r4-info">';
1125
+ $html .= '<ul>';
1126
+
1127
+ $html .= '<li class="saswp-r4-r">';
1128
+ $html .= '<span>';
1129
+ $html .= saswp_get_rating_html_by_value($average_rating);
1130
+ $html .= '</span>';
1131
+ $html .= '<span class="saswp-r4-rnm">'. esc_attr(number_format ($average_rating, 1)).' from '. esc_attr($review_count).' '.esc_html__('reviews','schema-and-structured-data-for-wp').'</span>';
1132
+ $html .= '</li>';
1133
+ $html .= $html_list;
1134
+ $html .= '</ul>';
1135
+ $html .= '</div>';
1136
+ $html .= '</div>';
1137
+ $html .= '</div>';
1138
+ $html .= '</div>';
1139
+ }else{
1140
+
1141
+ $html .= '<div id="saswp-sticky-review">';
1142
+
1143
+ $html .= '<div class="btn" [class]="review==1 ? '."'open-class btn'".': '."'btn'".'" id="open" >';
1144
+
1145
+ $html .= '<div class="saswp-opn-cls-btn" role="1" tabindex="1" on="tap:AMP.setState({review: ( review==1? 0 : 1 ) })">';
1146
+ $html .= '<div class="saswp-onclick-hide">';
1147
+ $html .= '<span>';
1148
+ $html .= saswp_get_rating_html_by_value($average_rating);
1149
+ $html .= '</span>';
1150
+ $html .= '<span class="saswp-r4-rnm">'.esc_attr(number_format($average_rating, 1) ).' from '.esc_attr($review_count).' '.esc_html__('reviews','schema-and-structured-data-for-wp').'</span>';
1151
+ $html .= '</div>';
1152
+ $html .= '<div class="saswp-onclick-show">';
1153
+ $html .= '<span>'.esc_html__('Ratings and reviews','schema-and-structured-data-for-wp').'</span>';
1154
+ $html .= '<span class="saswp-mines"></span>';
1155
+ $html .= '</div>';
1156
+ $html .= '</div>';
1157
+
1158
+ $html .= '<div id="saswp-reviews-cntn">';
1159
+ $html .= '<div class="saswp-r4-info">';
1160
+ $html .= '<ul>';
1161
+
1162
+ $html .= '<li class="saswp-r4-r">';
1163
+ $html .= '<span>';
1164
+ $html .= saswp_get_rating_html_by_value($average_rating);
1165
+ $html .= '</span>';
1166
+ $html .= '<span class="saswp-r4-rnm">'. esc_attr(number_format($average_rating, 1)).' from '. esc_attr($review_count).' reviews</span>';
1167
+ $html .= '</li>';
1168
+ $html .= $html_list;
1169
+ $html .= '</ul>';
1170
+ $html .= '</div>';
1171
+ $html .= '</div>';
1172
+ $html .= '</div>';
1173
+ $html .= '</div>';
1174
+
1175
+ }
1176
+
1177
+ }
1178
+
1179
+ }
1180
+
1181
+ return $html;
1182
+
1183
+ }
1184
+ public function saswp_create_collection_fomo($f_interval, $f_visibility, $collection){
1185
+
1186
+
1187
+ $html = '';
1188
+ if($collection){
1189
+
1190
+ if(saswp_non_amp()){
1191
+
1192
+ $i=0;
1193
+
1194
+ $html .= '<input type="hidden" id="saswp_fomo_interval" value="'.esc_attr($f_interval).'">';
1195
+ foreach ($collection as $value){
1196
+
1197
+ $date_str = $this->saswp_convert_datetostring($value['saswp_review_date']);
1198
+
1199
+ $html .= '<div id="'.$i.'" class="saswp-r5">';
1200
+ $html .= '<div class="saswp-r5-r">';
1201
+ $html .= '<div class="saswp-r5-lg">';
1202
+ $html .= '<span>';
1203
+ $html .= '<img height="70" width="70" src="'. esc_attr($value['saswp_review_platform_icon']).'"/>';
1204
+ $html .= '</span>';
1205
+ $html .= '</div>';
1206
+ $html .= '<div class="saswp-r5-rng">';
1207
+ $html .= saswp_get_rating_html_by_value($value['saswp_review_rating']);
1208
+ $html .='<div class="saswp-r5-txrng">';
1209
+ $html .='<span>'. esc_attr($value['saswp_review_rating']).' Stars</span>';
1210
+ $html .='<span>by</span>';
1211
+ $html .= '<span>'.esc_attr($value['saswp_reviewer_name']).'</span>';
1212
+ $html .='</div>';
1213
+ $html .= '<span class="saswp-r5-dt">'.esc_attr($date_str['date']).'</span>';
1214
+ $html .= '</div>';
1215
+ $html .= '</div>';
1216
+ $html .= '</div>';
1217
+
1218
+ $i++;
1219
+ }
1220
+
1221
+
1222
+ }else{
1223
+
1224
+ $i=0;
1225
+
1226
+ $html .='<amp-carousel id="saswp-reviews-fomo-amp" height="50" layout="fixed-height" type="slides" autoplay delay="10000">';
1227
+
1228
+ foreach ($collection as $value){
1229
+
1230
+ $date_str = $this->saswp_convert_datetostring($value['saswp_review_date']);
1231
+
1232
+ $html .= '<div id="'.$i.'" class="saswp-r5">';
1233
+ $html .= '<div class="saswp-r5-r">';
1234
+ $html .= '<div class="saswp-r5-lg">';
1235
+ $html .= '<span>';
1236
+ $html .= '<img height="70" width="70" src="'. esc_attr($value['saswp_review_platform_icon']).'"/>';
1237
+ $html .= '</span>';
1238
+ $html .= '</div>';
1239
+ $html .= '<div class="saswp-r5-rng">';
1240
+ $html .= saswp_get_rating_html_by_value($value['saswp_review_rating']);
1241
+ $html .='<div class="saswp-r5-txrng">';
1242
+ $html .='<span>'. esc_attr($value['saswp_review_rating']).' Stars</span>';
1243
+ $html .='<span> by</span>';
1244
+ $html .= '<span>'.esc_attr($value['saswp_reviewer_name']).'</span>';
1245
+ $html .='</div>';
1246
+ $html .= '<span class="saswp-r5-dt">'.esc_attr($date_str['date']).'</span>';
1247
+ $html .= '</div>';
1248
+ $html .= '</div>';
1249
+ $html .= '</div>';
1250
+
1251
+ $i++;
1252
+ }
1253
+ $html .= ' </amp-carousel>';
1254
+
1255
+ }
1256
+ }
1257
+
1258
+ return $html;
1259
+
1260
+ }
1261
+
1262
+ public function saswp_collection_desing_available(){
1263
+
1264
+ global $post;
1265
+ $design = '';
1266
+
1267
+ if(is_object($post)){
1268
+
1269
+ $pattern = get_shortcode_regex();
1270
+
1271
+ if ( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches )
1272
+ && array_key_exists( 2, $matches )
1273
+ && in_array( 'saswp-reviews-collection', $matches[2] ) )
1274
+ {
1275
+
1276
+ foreach ($matches[0] as $matche){
1277
+
1278
+ $mached = rtrim($matche, ']');
1279
+ $mached = ltrim($mached, '[');
1280
+ $mached = trim($mached);
1281
+ $attr = shortcode_parse_atts('['.$mached.' ]');
1282
+
1283
+ $design = get_post_meta($attr['id'], 'saswp_collection_design',true);
1284
+
1285
+ break;
1286
+ }
1287
+
1288
+ }
1289
+
1290
+ }
1291
+
1292
+ return $design;
1293
+
1294
+ }
1295
+
1296
+ }
1297
+
1298
+ $saswp_service_obj = new saswp_reviews_service();
1299
+ $saswp_service_obj->saswp_service_hooks();
1300
+ ?>
{reviews → modules/reviews}/reviews_setup.php RENAMED
@@ -226,11 +226,8 @@ function saswp_enqueue_rateyo_script( $hook ) {
226
  }
227
  add_action( 'admin_enqueue_scripts', 'saswp_enqueue_rateyo_script' );
228
 
229
-
230
-
231
  add_action( 'init', 'saswp_create_platform_custom_taxonomy', 21 );
232
 
233
-
234
  function saswp_create_platform_custom_taxonomy() {
235
 
236
  $labels = array(
@@ -270,6 +267,7 @@ function saswp_insert_platform_terms(){
270
  'Agoda',
271
  'Avvo',
272
  'Angies List',
 
273
  'Expedia',
274
  'Facebook',
275
  'Google',
@@ -281,7 +279,8 @@ function saswp_insert_platform_terms(){
281
  'AliExpress',
282
  'AlternativeTo',
283
  'Amazon',
284
- 'BBB',
 
285
  'Booking.com',
286
  'Capterra',
287
  'CarGurus',
@@ -289,14 +288,18 @@ function saswp_insert_platform_terms(){
289
  'Citysearch',
290
  'Classpass',
291
  'Consumer Affairs',
 
292
  'CreditKarma',
293
  'CustomerLobby',
294
  'DealerRater',
295
  'Ebay',
296
  'Edmunds',
297
  'Etsy',
298
- 'Foursquare',
 
299
  'G2Crowd',
 
 
300
  'Glassdoor',
301
  'Healthgrades',
302
  'HomeAdvisor',
@@ -304,22 +307,25 @@ function saswp_insert_platform_terms(){
304
  'Houzz',
305
  'Hotels.com',
306
  'HungerStation',
307
- 'Indeed',
 
308
  'Insider Pages',
309
  'Jet',
310
  'Judge.me',
311
  'Lawyers.com',
312
  'Lending Tree',
313
- 'Mardindale',
314
  'Newegg',
315
  'OpenRice',
316
  'Opentable',
317
  'ProductHunt',
318
  'Playstore',
319
  'RateMDs',
320
- 'ReserveOut',
 
321
  'Sitejabber',
322
  'Siftery',
 
323
  'SoftwareAdvice',
324
  'Shopper Approved',
325
  'Talabat',
@@ -331,7 +337,8 @@ function saswp_insert_platform_terms(){
331
  'TrustRadius',
332
  'Vitals',
333
  'Walmart',
334
- 'WeddingWire',
 
335
  'Yell',
336
  'YellowPages',
337
  'ZocDoc'
226
  }
227
  add_action( 'admin_enqueue_scripts', 'saswp_enqueue_rateyo_script' );
228
 
 
 
229
  add_action( 'init', 'saswp_create_platform_custom_taxonomy', 21 );
230
 
 
231
  function saswp_create_platform_custom_taxonomy() {
232
 
233
  $labels = array(
267
  'Agoda',
268
  'Avvo',
269
  'Angies List',
270
+ 'Apple AppStore',
271
  'Expedia',
272
  'Facebook',
273
  'Google',
279
  'AliExpress',
280
  'AlternativeTo',
281
  'Amazon',
282
+ 'BBB',
283
+ 'BestBuy',
284
  'Booking.com',
285
  'Capterra',
286
  'CarGurus',
288
  'Citysearch',
289
  'Classpass',
290
  'Consumer Affairs',
291
+ 'Clutch',
292
  'CreditKarma',
293
  'CustomerLobby',
294
  'DealerRater',
295
  'Ebay',
296
  'Edmunds',
297
  'Etsy',
298
+ 'Foursquare',
299
+ 'Flipkart',
300
  'G2Crowd',
301
+ 'Gearbest',
302
+ 'Gartner',
303
  'Glassdoor',
304
  'Healthgrades',
305
  'HomeAdvisor',
307
  'Houzz',
308
  'Hotels.com',
309
  'HungerStation',
310
+ 'Indeed',
311
+ 'IMDB',
312
  'Insider Pages',
313
  'Jet',
314
  'Judge.me',
315
  'Lawyers.com',
316
  'Lending Tree',
317
+ 'Martindale',
318
  'Newegg',
319
  'OpenRice',
320
  'Opentable',
321
  'ProductHunt',
322
  'Playstore',
323
  'RateMDs',
324
+ 'ReserveOut',
325
+ 'Rotten Tomatoes',
326
  'Sitejabber',
327
  'Siftery',
328
+ 'Steam',
329
  'SoftwareAdvice',
330
  'Shopper Approved',
331
  'Talabat',
337
  'TrustRadius',
338
  'Vitals',
339
  'Walmart',
340
+ 'WeddingWire',
341
+ 'Wish',
342
  'Yell',
343
  'YellowPages',
344
  'ZocDoc'
{reviews → modules/reviews}/reviews_widget.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Google Review Widget Class
4
  *
5
  * @author Magazine3
6
  * @category Admin
1
  <?php
2
  /**
3
+ * Reviews Widget Class
4
  *
5
  * @author Magazine3
6
  * @category Admin
output/flexmls.php CHANGED
@@ -1,349 +0,0 @@
1
- <?php
2
- /**
3
- * Flexmls Class
4
- *
5
- * @author Magazine3
6
- * @category Frontend
7
- * @path output/flexmls
8
- * @Version 1.0.7
9
- */
10
-
11
- // Exit if accessed directly.
12
- if ( ! defined( 'ABSPATH' ) ) exit;
13
-
14
- class saswp_flexmls_list extends flexmlsConnectPageCore{
15
-
16
- public $shorcode = array();
17
- protected $search_criteria;
18
-
19
- function __construct() {
20
-
21
- global $fmc_api;
22
-
23
- if(!empty($fmc_api)){
24
-
25
- parent::__construct($fmc_api);
26
-
27
- }
28
-
29
- add_filter('the_content', array($this,'saswp_content'),9);
30
- add_action('wp_footer', array($this, 'saswp_get_flexidx_listing'));
31
- add_action('amp_post_template_footer',array($this, 'saswp_get_flexidx_listing'));
32
- }
33
- public function saswp_get_flexidx_listing(){
34
-
35
- global $fmc_api;
36
-
37
- if(!empty($fmc_api)){
38
-
39
- $settings = array();
40
-
41
- foreach ($this->shorcode[1] as $shortcodeAttr){
42
-
43
- if (preg_match_all('/(\b\w+)="(.*?(?="\s\w+=|$))/', $shortcodeAttr, $matches)) {
44
-
45
- $settings = array_combine ( $matches[1], $matches[2] );
46
-
47
- }
48
-
49
- $title = isset($settings['title']) ? ($settings['title']) : '';
50
- $source = isset($settings['source']) ? trim($settings['source']) : '';
51
- $display = isset($settings['display']) ? trim($settings['display']) : '';
52
- $days = isset($settings['days']) ? trim($settings['days']) : '';
53
- $property_type = isset($settings['property_type']) ? trim($settings['property_type']): '';
54
- $property_sub_type = isset($settings['property_sub_type']) ? trim($settings['property_sub_type']): '';
55
- $link = isset($settings['link']) ? trim($settings['link']) : '';
56
- $sort = isset($settings['sort']) ? trim($settings['sort']) : '';
57
- $agent = isset($settings['agent']) ? trim($settings['agent']) : '';
58
- $status = isset($settings['status']) ? trim($settings['status'], '"') : '';
59
- $locations = '';
60
-
61
- if ( isset($settings['location']) ) {
62
- $locations = html_entity_decode( flexmlsConnect::clean_comma_list( stripslashes( $settings['location'] ) ) );
63
- }
64
- if ($link == "default") {
65
- $link = flexmlsConnect::get_default_idx_link();
66
- }
67
- $source = (empty($source)) ? "my" : $source;
68
- $pure_conditions = array();
69
-
70
- if (isset($settings['days'])){
71
- $days = $settings['days'];
72
- }
73
- elseif ($display == "open_houses"){
74
- //For backward compatibility. Set # of days for open house default to 10
75
- $days = 10;
76
- }
77
- else{
78
- $days = 1;
79
- if (date("l") == "Monday")
80
- $days = 3;
81
- }
82
-
83
- $flexmls_temp_date = date_default_timezone_get();
84
- date_default_timezone_set('America/Chicago');
85
- $specific_time = date("Y-m-d\TH:i:s.u",strtotime("-".$days." days"));
86
- date_default_timezone_set($flexmls_temp_date);
87
-
88
- if ($display == "new") {
89
- $pure_conditions["OriginalOnMarketTimestamp"] = $specific_time;
90
- }
91
- elseif ($display == "open_houses") {
92
- $pure_conditions['OpenHouses'] = $days;
93
- }
94
- elseif ($display == "price_changes") {
95
- $pure_conditions["PriceChangeTimestamp"] = $specific_time;
96
- }
97
- elseif ($display == "recent_sales") {
98
- $pure_conditions["StatusChangeTimestamp"] = $specific_time;
99
- }
100
-
101
- if ($sort == "recently_changed") {
102
- $pure_conditions['OrderBy'] = "-ModificationTimestamp"; // special tag caught later
103
- }
104
- elseif ($sort == "price_low_high") {
105
- $pure_conditions['OrderBy'] = "+ListPrice";
106
- }
107
- elseif ($sort == "price_high_low") {
108
- $pure_conditions['OrderBy'] = "-ListPrice";
109
- }
110
- elseif ($sort == "open_house"){
111
- $pure_conditions['OrderBy'] = "+OpenHouses";
112
- }
113
- elseif ($sort == "sqft_low_high") {
114
- $pure_conditions['OrderBy'] = "+BuildingAreaTotal";
115
- }
116
- elseif ($sort == "sqft_high_low") {
117
- $pure_conditions['OrderBy'] = "-BuildingAreaTotal";
118
- }
119
- elseif ($sort == "year_built_high_low") {
120
- $pure_conditions['OrderBy'] = "-YearBuilt";
121
- }
122
- elseif ($sort == "year_built_low_high") {
123
- $pure_conditions['OrderBy'] = "+YearBuilt";
124
- }
125
-
126
- $apply_property_type = ($source == 'location') ? true : false;
127
-
128
- if ($source == 'agent') {
129
-
130
- $pure_conditions['ListAgentId'] = $agent;
131
-
132
- }
133
- // parse location search settings
134
- $locations = flexmlsConnect::parse_location_search_string($locations);
135
- if($locations){
136
-
137
- foreach ($locations as $loc) {
138
-
139
- if(array_key_exists($loc['f'], $pure_conditions)) {
140
- $pure_conditions[$loc['f']] .= ',' . $loc['v'];
141
- } else {
142
- $pure_conditions[$loc['f']] = $loc['v'];
143
- }
144
-
145
- }
146
- }
147
-
148
- if ($apply_property_type and !empty($property_type)) {
149
- $pure_conditions['PropertyType'] = $property_type;
150
- $pure_conditions['PropertySubType'] = $property_sub_type;
151
- }
152
-
153
- if ($link) {
154
- $link_details = $fmc_api->GetIDXLinkFromTinyId($link);
155
-
156
- if ($link_details['LinkType'] == "SavedSearch") {
157
- $pure_conditions['SavedSearch'] = $link_details['SearchId'];
158
- }
159
- }
160
-
161
- if ($source == "my") {
162
- // make a simple request to /my/listings with no _filter's
163
- $pure_conditions['My'] = 'listings';
164
- }
165
- elseif ($source == "office") {
166
- $pure_conditions['My'] = 'office';
167
- }
168
- elseif ($source == "company") {
169
- $pure_conditions['My'] = 'company';
170
- }
171
-
172
- if ($status) {
173
- $pure_conditions["StandardStatus"] = $status;
174
- }
175
-
176
- $custom_page = new flexmlsConnectPageSearchResults($fmc_api);
177
- $custom_page->title = $title;
178
- $custom_page->input_source = 'shortcode';
179
- $custom_page->input_data = $pure_conditions;
180
- list($params, $cleaned_raw_criteria, $context) = $custom_page->parse_search_parameters_into_api_request();
181
- unset($params['_select']);
182
- $this->search_criteria = $cleaned_raw_criteria;
183
-
184
- require_once( ABSPATH . '/wp-content/plugins/flexmls-idx/lib/flexmlsAPI/Core.php' );
185
- $flexcoreApi = new flexmlsAPI_Core();
186
-
187
- if ($context == "listings") {
188
- $results = $flexcoreApi->GetMyListings($params);
189
-
190
- }
191
- elseif ($context == "office") {
192
- $results = $flexcoreApi->GetOfficeListings($params);
193
- }
194
- elseif ($context == "company") {
195
- $results = $flexcoreApi->GetCompanyListings($params);
196
- }
197
- else {
198
- $cache_time = (strpos($params['_filter'],'ListingCart')!==false) ? 0 : '10m';
199
- $results = $flexcoreApi->GetListings($params, $cache_time);
200
- }
201
- $count = count($results);
202
- echo "\n";
203
- echo '<!-- Schema & Structured Data For WP v'.esc_attr(SASWP_VERSION) .' IDX - -->';
204
- echo "\n";
205
- echo '<script type="application/ld+json">';
206
- echo "\n";
207
- echo "[";
208
-
209
- foreach ($results as $result){
210
-
211
- if($count > 1){
212
-
213
- echo json_encode($this->saswp_generate_schema_markup($result)).',';
214
-
215
- }else{
216
-
217
- echo json_encode($this->saswp_generate_schema_markup($result));
218
-
219
- }
220
-
221
- $count --;
222
-
223
- }
224
- echo ']';
225
- echo "\n";
226
- echo '</script>';
227
- }
228
-
229
- }
230
-
231
- }
232
- public function saswp_content($content){
233
-
234
- preg_match_all("/[[]idx_listing_summary(.*?)[]]/", $content,$matches);
235
-
236
- $this->shorcode = $matches;
237
-
238
- return $content;
239
-
240
- }
241
- public function saswp_generate_schema_markup($result){
242
-
243
- global $sd_data;
244
- $sellername = '';
245
- $sellerurl = '';
246
- $sellerimage = '';
247
- $selleraddress = '';
248
- $sellertelephone = '';
249
- $sellerpricerange = '';
250
-
251
- if(isset($sd_data['saswp-flexmlx-compativility']) && $sd_data['saswp-flexmlx-compativility'] == 1 && is_plugin_active('flexmls-idx/flexmls_connect.php')){
252
-
253
- if(isset($sd_data['sd-seller-name'])){
254
- $sellername =$sd_data['sd-seller-name'];
255
- }
256
- if(isset($sd_data['sd-seller-url'])){
257
- $sellerurl =$sd_data['sd-seller-url'];
258
- }
259
- if(isset($sd_data['sd_seller_image']['thumbnail'])){
260
- $sellerimage = $sd_data['sd_seller_image']['thumbnail'];
261
- }
262
- if(isset($sd_data['sd-seller-address'])){
263
- $selleraddress =$sd_data['sd-seller-address'];
264
- }
265
- if(isset($sd_data['sd-seller-telephone'])){
266
- $sellertelephone =$sd_data['sd-seller-telephone'];
267
- }
268
- if(isset($sd_data['sd-seller-price-range'])){
269
- $sellerpricerange =$sd_data['sd-seller-price-range'];
270
- }
271
-
272
- $link_to_details_criteria = $this->search_criteria;
273
- $link_to_details = flexmlsConnect::make_nice_address_url($result['StandardFields'], $link_to_details_criteria, 'fmc_tag');
274
-
275
- $photos = array();
276
-
277
- if(isset($result['StandardFields'])){
278
-
279
- foreach ($result['StandardFields']['Photos'] as $photo){
280
-
281
- $photos[] = array(
282
- 'url' => $photo['UriThumb']
283
- );
284
-
285
- }
286
- }
287
-
288
- $input = array();
289
- $input = array(
290
- "@context" => saswp_context_url(),
291
- "@type" => ["Product", "Apartment"],
292
- "name" => esc_attr($result['StandardFields']['UnparsedFirstLineAddress']),
293
- "description" => isset($result['StandardFields']['PublicRemarks'])? $result['StandardFields']['PublicRemarks']:strip_tags(get_the_excerpt()),
294
- "sku" => esc_attr($result['StandardFields']['BuildingAreaTotal']),
295
- "brand" => get_bloginfo(),
296
- "mpn" => esc_attr($result['StandardFields']['YearBuilt']),
297
- "url" => esc_url($link_to_details),
298
- "aggregateRating" => array(
299
- "@type"=> "AggregateRating",
300
- "ratingValue" => '5.0',
301
- "reviewCount" => '1'
302
- ),
303
- "review" => array(
304
- '@type' => 'Review',
305
- 'author' => get_the_author(),
306
- 'datePublished' => $result['StandardFields']['ListingUpdateTimestamp'],
307
- 'reviewRating' => array(
308
- '@type' => 'Rating',
309
- 'bestRating' => '5.0',
310
- 'ratingValue' => '5.0',
311
- 'worstRating' => '1.0',
312
- )
313
- ),
314
- "image" => esc_url($result['StandardFields']['Photos'][0]['Uri300']),
315
- "offers" => array(
316
- "priceCurrency" => "USD",
317
- "price" => esc_attr($result['StandardFields']['ListPrice']),
318
- "availability" => 'InStock',
319
- "url" => esc_url($link_to_details),
320
- "priceValidUntil" => $result['StandardFields']['ListingUpdateTimestamp'],
321
- "seller" => array(
322
- array(
323
- "@type" => "RealEstateAgent",
324
- "name" => esc_attr($sellername),
325
- "url" => esc_url($sellerurl),
326
- "image" => esc_attr($sellerimage),
327
- "address" => esc_attr($selleraddress),
328
- "priceRange" => esc_attr($sellerpricerange),
329
- "telephone" => esc_attr($sellertelephone),
330
- )
331
- ),
332
- ),
333
- 'address' => esc_attr($result['StandardFields']['StreetNumber']).' '. esc_attr($result['StandardFields']['StreetName']).' '.esc_attr($result['StandardFields']['StreetSuffix']) .' '.esc_attr($result['StandardFields']['City']).' '. esc_attr($result['StandardFields']['PostalCode']),
334
- 'geo' => array(
335
- "@type" => "GeoCoordinates",
336
- "address" => esc_attr($result['StandardFields']['UnparsedFirstLineAddress']),
337
- "addressCountry" => esc_attr($result['StandardFields']['UnparsedFirstLineAddress']),
338
- ),
339
-
340
- 'photos' => $photos,
341
- );
342
-
343
- return $input;
344
- }
345
- }
346
- }
347
- if (class_exists('saswp_flexmls_list')) {
348
- new saswp_flexmls_list;
349
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
output/function.php CHANGED
@@ -797,13 +797,16 @@ function saswp_remove_microdata($content){
797
 
798
  if(saswp_global_option()){
799
  //Clean MicroData
800
- $content = preg_replace("/itemscope[\n|\s|]*itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
801
- $content = preg_replace("/itemscope[\n|\s|]*itemtype=(\'?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\'?)/", "", $content);
802
- $content = preg_replace("/itemscope=(\"?)itemscope(\"?) itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
803
- $content = preg_replace("/itemscope=(\"?)itemprop(\"?) itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
804
- $content = preg_replace("/itemscope itemprop=\"(.*?)\" itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement)(\"?)/", "", $content);
 
805
  $content = preg_replace("/itemprop='logo' itemscope itemtype='https:\/\/schema.org\/ImageObject'/", "", $content);
806
  $content = preg_replace('/itemprop="logo" itemscope="" itemtype="https:\/\/schema.org\/ImageObject"/', "", $content);
 
 
807
 
808
  //Clean json markup
809
  if(isset($sd_data['saswp-aiosp']) && $sd_data['saswp-aiosp'] == 1 ){
@@ -1004,894 +1007,418 @@ function saswp_wp_recipe_schema_json($recipe){
1004
  return $metadata;
1005
  }
1006
 
1007
- function saswp_append_fetched_reviews($input1){
1008
-
1009
- global $post;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1010
 
1011
- if(is_object($post)){
1012
 
1013
- $pattern = get_shortcode_regex();
 
 
 
 
 
 
1014
 
1015
  if ( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches )
1016
- && array_key_exists( 2, $matches )
1017
- && in_array( 'saswp-reviews', $matches[2] ) )
1018
  {
1019
-
1020
- $service = new saswp_reviews_service();
1021
-
1022
- foreach ($matches[0] as $matche){
1023
-
1024
- $mached = rtrim($matche, ']');
1025
- $mached = ltrim($mached, '[');
1026
- $mached = trim($mached);
1027
- $attr = shortcode_parse_atts('['.$mached.' ]');
 
 
 
 
 
1028
 
1029
- $reviews = $service->saswp_get_reviews_by_attr($attr);
1030
 
1031
- if($reviews){
1032
-
1033
- $rv_markup = $service->saswp_get_reviews_schema_markup($reviews);
1034
 
1035
- if(isset($input1['review'])){
1036
-
1037
- $input1['review'] = array_merge($input1['review'], $rv_markup['review']);
1038
-
1039
- }else{
1040
- $input1 = array_merge($input1, $rv_markup);
1041
- }
1042
 
1043
- }
 
 
 
1044
 
1045
- }
1046
-
1047
- }
1048
-
 
 
 
 
 
1049
 
1050
- }
1051
- return $input1;
1052
  }
1053
 
1054
- function saswp_book_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1055
-
1056
- $input1 = array();
1057
-
1058
- $howto_image = get_post_meta( get_the_ID(), 'saswp_book_image_'.$schema_id.'_detail',true);
1059
-
1060
- $input1['@context'] = saswp_context_url();
1061
- $input1['@type'] = 'Book';
1062
- $input1['@id'] = trailingslashit(get_permalink()).'#Book';
1063
- $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_book_url_'.$schema_id, 'saswp_array');
1064
- $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_book_name_'.$schema_id, 'saswp_array');
1065
- $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_book_description_'.$schema_id, 'saswp_array');
1066
-
1067
- if(!(empty($howto_image))){
1068
-
1069
- $input1['image']['@type'] = 'ImageObject';
1070
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1071
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1072
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1073
-
1074
- }
1075
-
1076
- if($all_post_meta['saswp_book_author_'.$schema_id][0]){
1077
- $input1['author']['@type'] = 'Person';
1078
- $input1['author']['name'] = $all_post_meta['saswp_book_author_'.$schema_id][0];
1079
-
1080
- if($all_post_meta['saswp_book_author_url_'.$schema_id][0]){
1081
- $input1['author']['sameAs'] = $all_post_meta['saswp_book_author_url_'.$schema_id][0];
1082
- }
1083
-
1084
- }
1085
-
1086
- $input1['datePublished'] = isset($all_post_meta['saswp_book_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_book_date_published_'.$schema_id][0])):'';
1087
- $input1['isbn'] = saswp_remove_warnings($all_post_meta, 'saswp_book_isbn_'.$schema_id, 'saswp_array');
1088
- $input1['numberOfPages'] = saswp_remove_warnings($all_post_meta, 'saswp_book_no_of_page_'.$schema_id, 'saswp_array');
1089
- $input1['publisher'] = saswp_remove_warnings($all_post_meta, 'saswp_book_publisher_'.$schema_id, 'saswp_array');
1090
-
1091
- if(isset($all_post_meta['saswp_book_price_'.$schema_id]) && isset($all_post_meta['saswp_book_price_currency_'.$schema_id])){
1092
- $input1['offers']['@type'] = 'Offer';
1093
- $input1['offers']['availability'] = saswp_remove_warnings($all_post_meta, 'saswp_book_availability_'.$schema_id, 'saswp_array');
1094
- $input1['offers']['price'] = $all_post_meta['saswp_book_price_'.$schema_id];
1095
- $input1['offers']['priceCurrency'] = $all_post_meta['saswp_book_price_currency_'.$schema_id];
1096
- }
1097
-
1098
- if(isset($all_post_meta['saswp_book_enable_rating_'.$schema_id]) && isset($all_post_meta['saswp_book_rating_value_'.$schema_id]) && isset($all_post_meta['saswp_book_rating_count_'.$schema_id])){
1099
- $input1['aggregateRating']['@type'] = 'aggregateRating';
1100
- $input1['aggregateRating']['ratingValue'] = $all_post_meta['saswp_book_rating_value_'.$schema_id];
1101
- $input1['aggregateRating']['ratingCount'] = $all_post_meta['saswp_book_rating_count_'.$schema_id];
1102
- }
1103
 
1104
- return $input1;
1105
- }
1106
-
1107
- function saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1108
-
1109
- $input1 = array();
1110
- $howto_image = get_post_meta( get_the_ID(), 'saswp_howto_schema_image_'.$schema_id.'_detail',true);
1111
-
1112
- $tool = get_post_meta($schema_post_id, 'howto_tool_'.$schema_id, true);
1113
- $step = get_post_meta($schema_post_id, 'howto_step_'.$schema_id, true);
1114
- $supply = get_post_meta($schema_post_id, 'howto_supply_'.$schema_id, true);
1115
-
1116
- $input1['@context'] = saswp_context_url();
1117
- $input1['@type'] = 'HowTo';
1118
- $input1['@id'] = trailingslashit(get_permalink()).'#HowTo';
1119
- $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_schema_name_'.$schema_id, 'saswp_array');
1120
- $input1['datePublished'] = isset($all_post_meta['saswp_howto_ec_schema_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_howto_ec_schema_date_published_'.$schema_id][0])):'';
1121
- $input1['dateModified'] = isset($all_post_meta['saswp_howto_ec_schema_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_howto_ec_schema_date_modified_'.$schema_id][0])):'';
1122
- $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_schema_description_'.$schema_id, 'saswp_array');
1123
-
1124
- if(!(empty($howto_image))){
1125
-
1126
- $input1['image']['@type'] = 'ImageObject';
1127
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1128
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1129
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1130
-
1131
- }
1132
-
1133
- if(saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_currency_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_value_'.$schema_id, 'saswp_array') !='')
1134
- {
1135
- $input1['estimatedCost']['@type'] = 'MonetaryAmount';
1136
- $input1['estimatedCost']['currency']= saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_currency_'.$schema_id, 'saswp_array');
1137
- $input1['estimatedCost']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_value_'.$schema_id, 'saswp_array');
1138
- }
1139
-
1140
-
1141
- $supply_arr = array();
1142
- if(!empty($supply)){
1143
-
1144
- foreach($supply as $val){
1145
-
1146
- $supply_data = array();
1147
-
1148
- if($val['saswp_howto_supply_name'] || $val['saswp_howto_supply_url']){
1149
- $supply_data['@type'] = 'HowToSupply';
1150
- $supply_data['name'] = $val['saswp_howto_supply_name'];
1151
- $supply_data['url'] = $val['saswp_howto_supply_url'];
1152
- }
1153
-
1154
-
1155
-
1156
- if(isset($val['saswp_howto_supply_image_id']) && $val['saswp_howto_supply_image_id'] !=''){
1157
-
1158
- $image_details = wp_get_attachment_image_src($val['saswp_howto_supply_image_id']);
1159
-
1160
- $supply_data['image']['@type'] = 'ImageObject';
1161
- $supply_data['image']['url'] = esc_url($image_details[0]);
1162
- $supply_data['image']['width'] = esc_attr($image_details[1]);
1163
- $supply_data['image']['height'] = esc_attr($image_details[2]);
1164
-
1165
-
1166
-
1167
- }
1168
- $supply_arr[] = $supply_data;
1169
- }
1170
- $input1['supply'] = $supply_arr;
1171
- }
1172
-
1173
- $tool_arr = array();
1174
- if(!empty($tool)){
1175
-
1176
- foreach($tool as $val){
1177
-
1178
- $supply_data = array();
1179
-
1180
- if($val['saswp_howto_tool_name'] || $val['saswp_howto_tool_url']){
1181
- $supply_data['@type'] = 'HowToTool';
1182
- $supply_data['name'] = $val['saswp_howto_tool_name'];
1183
- $supply_data['url'] = $val['saswp_howto_tool_url'];
1184
- }
1185
-
1186
- if(isset($val['saswp_howto_tool_image_id']) && $val['saswp_howto_tool_image_id'] !=''){
1187
-
1188
- $image_details = wp_get_attachment_image_src($val['saswp_howto_tool_image_id']);
1189
-
1190
- $supply_data['image']['@type'] = 'ImageObject';
1191
- $supply_data['image']['url'] = esc_url($image_details[0]);
1192
- $supply_data['image']['width'] = esc_attr($image_details[1]);
1193
- $supply_data['image']['height'] = esc_attr($image_details[2]);
1194
-
1195
-
1196
-
1197
- }
1198
- $tool_arr[] = $supply_data;
1199
- }
1200
- $input1['tool'] = $tool_arr;
1201
- }
1202
-
1203
- //step
1204
-
1205
- $step_arr = array();
1206
- if(!empty($step)){
1207
-
1208
- foreach($step as $key => $val){
1209
-
1210
- $supply_data = array();
1211
- $direction = array();
1212
- $tip = array();
1213
-
1214
- if($val['saswp_howto_direction_text']){
1215
- $direction['@type'] = 'HowToDirection';
1216
- $direction['text'] = $val['saswp_howto_direction_text'];
1217
- }
1218
-
1219
- if($val['saswp_howto_tip_text']){
1220
 
1221
- $tip['@type'] = 'HowToTip';
1222
- $tip['text'] = $val['saswp_howto_tip_text'];
1223
 
1224
- }
1225
 
1226
- $supply_data['@type'] = 'HowToStep';
1227
- $supply_data['url'] = trailingslashit(get_permalink()).'#step'.++$key;
1228
- $supply_data['name'] = $val['saswp_howto_step_name'];
1229
 
1230
- if($direction['text'] || $tip['text']){
1231
- $supply_data['itemListElement'] = array($direction, $tip);
1232
- }
1233
 
1234
- if(isset($val['saswp_howto_step_image_id']) && $val['saswp_howto_step_image_id'] !=''){
 
 
 
 
 
 
 
 
 
 
 
1235
 
1236
- $image_details = wp_get_attachment_image_src($val['saswp_howto_step_image_id']);
1237
- $supply_data['image']['@type'] = 'ImageObject';
1238
- $supply_data['image']['url'] = esc_url($image_details[0]);
1239
- $supply_data['image']['width'] = esc_attr($image_details[1]);
1240
- $supply_data['image']['height'] = esc_attr($image_details[2]);
1241
 
1242
- }
 
 
1243
 
1244
- $step_arr[] = $supply_data;
 
 
 
 
1245
 
1246
  }
1247
 
1248
- $input1['step'] = $step_arr;
1249
-
1250
- }
1251
-
1252
- $input1['totalTime'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_schema_totaltime_'.$schema_id, 'saswp_array');
1253
-
1254
- return $input1;
1255
  }
1256
 
1257
- function saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1258
 
1259
- $input1 = array();
1260
 
1261
- $event_image = get_post_meta( get_the_ID(), 'saswp_event_schema_image_'.$schema_id.'_detail',true);
1262
-
1263
- $input1 = array(
1264
- '@context' => saswp_context_url(),
1265
- '@type' => (isset($all_post_meta['saswp_event_schema_type_'.$schema_id][0]) && $all_post_meta['saswp_event_schema_type_'.$schema_id][0] !='') ? $all_post_meta['saswp_event_schema_type_'.$schema_id][0] : 'Event' ,
1266
- '@id' => trailingslashit(get_permalink()).'#event',
1267
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_name_'.$schema_id, 'saswp_array'),
1268
- 'description' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_description_'.$schema_id, 'saswp_array'),
1269
- 'image' => array(
1270
- '@type' =>'ImageObject',
1271
- 'url' => isset($event_image['thumbnail']) ? esc_url($event_image['thumbnail']):'' ,
1272
- 'width' => isset($event_image['width']) ? esc_attr($event_image['width']) :'' ,
1273
- 'height' => isset($event_image['height']) ? esc_attr($event_image['height']) :'' ,
1274
- ),
1275
- 'location' => array(
1276
- '@type' => 'Place',
1277
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_name_'.$schema_id, 'saswp_array'),
1278
- 'address' => array(
1279
- '@type' => 'PostalAddress',
1280
- 'streetAddress' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_streetaddress_'.$schema_id, 'saswp_array'),
1281
- 'addressLocality' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_locality_'.$schema_id, 'saswp_array'),
1282
- 'postalCode' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_postalcode_'.$schema_id, 'saswp_array'),
1283
- 'addressRegion' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_region_'.$schema_id, 'saswp_array'),
1284
- )
1285
- ),
1286
- 'offers' => array(
1287
- '@type' => 'Offer',
1288
- 'url' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_url_'.$schema_id, 'saswp_array'),
1289
- 'price' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_price_'.$schema_id, 'saswp_array'),
1290
- 'priceCurrency' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_price_currency_'.$schema_id, 'saswp_array'),
1291
- 'availability' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_availability_'.$schema_id, 'saswp_array'),
1292
- 'validFrom' => isset($all_post_meta['saswp_event_schema_validfrom_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_event_schema_validfrom_'.$schema_id][0])):'',
1293
- )
1294
- );
1295
 
 
 
 
 
 
 
 
 
1296
 
1297
- if(isset($all_post_meta['saswp_event_schema_start_date_'.$schema_id][0])){
1298
-
1299
- $date = $time = '';
1300
-
1301
- $date = $all_post_meta['saswp_event_schema_start_date_'.$schema_id][0];
1302
-
1303
- if(isset($all_post_meta['saswp_event_schema_start_time_'.$schema_id][0])){
1304
- $time = $all_post_meta['saswp_event_schema_start_time_'.$schema_id][0];
1305
- }
1306
-
1307
- $input1['startDate'] = saswp_format_date_time($date, $time);
1308
-
1309
- }
1310
 
1311
- if(isset($all_post_meta['saswp_event_schema_end_date_'.$schema_id][0])){
1312
 
1313
- $date = $time = '';
1314
-
1315
- $date = $all_post_meta['saswp_event_schema_end_date_'.$schema_id][0];
1316
-
1317
- if(isset($all_post_meta['saswp_event_schema_end_time_'.$schema_id][0])){
1318
- $time = $all_post_meta['saswp_event_schema_end_time_'.$schema_id][0];
1319
- }
1320
-
1321
- $input1['endDate'] = saswp_format_date_time($date, $time);
1322
 
1323
  }
1324
-
1325
-
1326
- $performer = get_post_meta($schema_post_id, 'performer_'.$schema_id, true);
1327
-
1328
- $performer_arr = array();
1329
-
1330
- if(!empty($performer)){
1331
-
1332
- foreach($performer as $val){
1333
-
1334
- $supply_data = array();
1335
- $supply_data['@type'] = $val['saswp_event_performer_type'];
1336
- $supply_data['name'] = $val['saswp_event_performer_name'];
1337
- $supply_data['url'] = $val['saswp_event_performer_url'];
1338
-
1339
- $performer_arr[] = $supply_data;
1340
- }
1341
-
1342
- $input1['performer'] = $performer_arr;
1343
-
1344
- }
1345
-
1346
-
1347
- return $input1;
1348
-
1349
-
1350
- }
1351
-
1352
- function saswp_course_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1353
-
1354
- $input1 = array();
1355
-
1356
- $input1 = array(
1357
- '@context' => saswp_context_url(),
1358
- '@type' => 'Course' ,
1359
- '@id' => trailingslashit(get_permalink()).'#course',
1360
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_course_name_'.$schema_id, 'saswp_array'),
1361
- 'description' => saswp_remove_warnings($all_post_meta, 'saswp_course_description_'.$schema_id, 'saswp_array'),
1362
- 'url' => saswp_remove_warnings($all_post_meta, 'saswp_course_url_'.$schema_id, 'saswp_array'),
1363
- 'datePublished' => isset($all_post_meta['saswp_course_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_course_date_published_'.$schema_id][0])):'',
1364
- 'dateModified' => isset($all_post_meta['saswp_course_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_course_date_modified_'.$schema_id][0])):'',
1365
- 'provider' => array(
1366
- '@type' => 'Organization',
1367
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_course_provider_name_'.$schema_id, 'saswp_array'),
1368
- 'sameAs' => saswp_remove_warnings($all_post_meta, 'saswp_course_sameas_'.$schema_id, 'saswp_array')
1369
- )
1370
- );
1371
-
1372
- return $input1;
1373
 
1374
  }
1375
 
1376
- function saswp_software_app_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1377
-
1378
- $input1 = array();
1379
-
1380
-
1381
- $input1 = array(
1382
- '@context' => saswp_context_url(),
1383
- '@type' => 'SoftwareApplication',
1384
- '@id' => trailingslashit(get_permalink()).'#softwareapplication',
1385
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_name_'.$schema_id, 'saswp_array'),
1386
- 'description' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_description_'.$schema_id, 'saswp_array'),
1387
- 'operatingSystem' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_operating_system_'.$schema_id, 'saswp_array'),
1388
- 'applicationCategory' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_application_category_'.$schema_id, 'saswp_array'),
1389
- 'offers' => array(
1390
- '@type' => 'Offer',
1391
- 'price' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_price_'.$schema_id, 'saswp_array'),
1392
- 'priceCurrency' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_price_currency_'.$schema_id, 'saswp_array'),
1393
- ),
1394
- 'datePublished' => isset($all_post_meta['saswp_software_schema_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_software_schema_date_published_'.$schema_id][0])):'',
1395
- 'dateModified' => isset($all_post_meta['saswp_software_schema_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_software_schema_date_modified_'.$schema_id][0])):'',
1396
-
1397
- );
1398
-
1399
- $soft_image = get_post_meta( get_the_ID(), 'saswp_software_schema_image_'.$schema_id.'_detail',true);
1400
-
1401
- if(!(empty($soft_image))){
1402
-
1403
- $input1['image']['@type'] = 'ImageObject';
1404
- $input1['image']['url'] = isset($soft_image['thumbnail']) ? esc_url($soft_image['thumbnail']):'';
1405
- $input1['image']['height'] = isset($soft_image['width']) ? esc_attr($soft_image['width']) :'';
1406
- $input1['image']['width'] = isset($soft_image['height']) ? esc_attr($soft_image['height']) :'';
1407
-
1408
- }
1409
-
1410
- if(saswp_remove_warnings($all_post_meta, 'saswp_software_schema_enable_rating_'.$schema_id, 'saswp_array') == 1){
1411
-
1412
- $input1['aggregateRating'] = array(
1413
- "@type" => "AggregateRating",
1414
- "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_rating_'.$schema_id, 'saswp_array'),
1415
- "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_rating_count_'.$schema_id, 'saswp_array')
1416
- );
1417
- }
1418
-
1419
 
1420
- return $input1;
1421
 
1422
- }
1423
-
1424
- function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1425
 
1426
- $input1 = array();
1427
-
1428
- $recipe_logo = get_post_meta( get_the_ID(), 'saswp_recipe_organization_logo_'.$schema_id.'_detail',true);
1429
- $recipe_image = get_post_meta( get_the_ID(), 'saswp_recipe_image_'.$schema_id.'_detail',true);
1430
- $recipe_author_image = get_post_meta( get_the_ID(), 'saswp_recipe_author_image_'.$schema_id.'_detail',true);
1431
-
1432
- $ingredient = array();
1433
- $instruction = array();
1434
-
1435
- if(isset($all_post_meta['saswp_recipe_ingredient_'.$schema_id])){
1436
-
1437
- $explod = explode(';', $all_post_meta['saswp_recipe_ingredient_'.$schema_id][0]);
1438
-
1439
- if($explod){
1440
 
1441
- foreach ($explod as $val){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1442
 
1443
- $ingredient[] = $val;
1444
 
 
 
1445
  }
1446
-
1447
  }
1448
-
1449
-
1450
-
1451
- }
1452
-
1453
- if(isset($all_post_meta['saswp_recipe_instructions_'.$schema_id])){
1454
-
1455
- $explod = explode(';', $all_post_meta['saswp_recipe_instructions_'.$schema_id][0]);
1456
-
1457
- if($explod){
1458
-
1459
- foreach ($explod as $val){
1460
-
1461
- $instruction[] = array(
1462
- '@type' => "HowToStep",
1463
- 'text' => $val,
1464
- );
1465
-
1466
- }
1467
-
1468
- }
1469
-
1470
- }
1471
-
1472
- $input1 = array(
1473
- '@context' => saswp_context_url(),
1474
- '@type' => 'Recipe' ,
1475
- '@id' => trailingslashit(get_permalink()).'#recipe',
1476
- 'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_url_'.$schema_id, 'saswp_array'),
1477
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_name_'.$schema_id, 'saswp_array'),
1478
- 'image' =>array(
1479
- '@type' => 'ImageObject',
1480
- 'url' => saswp_remove_warnings( $recipe_image, 'thumbnail', 'saswp_string'),
1481
- 'width' => saswp_remove_warnings( $recipe_image, 'width', 'saswp_string'),
1482
- 'height' => saswp_remove_warnings( $recipe_image , 'height', 'saswp_string'),
1483
- ),
1484
- 'author' => array(
1485
- '@type' => 'Person',
1486
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_author_name_'.$schema_id, 'saswp_array'),
1487
- 'description' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_author_description_'.$schema_id, 'saswp_array'),
1488
- 'Image' => array(
1489
- '@type' => 'ImageObject',
1490
- 'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_author_image_'.$schema_id, 'saswp_array'),
1491
- 'height' => saswp_remove_warnings($recipe_author_image, 'height', 'saswp_string'),
1492
- 'width' => saswp_remove_warnings($recipe_author_image, 'width', 'saswp_string')
1493
- ),
1494
- ),
1495
-
1496
-
1497
- 'prepTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_preptime_'.$schema_id, 'saswp_array'),
1498
- 'cookTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_cooktime_'.$schema_id, 'saswp_array'),
1499
- 'totalTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_totaltime_'.$schema_id, 'saswp_array'),
1500
- 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_keywords_'.$schema_id, 'saswp_array'),
1501
- 'recipeYield' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_recipeyield_'.$schema_id, 'saswp_array'),
1502
- 'recipeCategory' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_category_'.$schema_id, 'saswp_array'),
1503
- 'recipeCuisine' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_cuisine_'.$schema_id, 'saswp_array'),
1504
- 'nutrition' => array(
1505
- '@type' => "NutritionInformation",
1506
- 'calories' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_nutrition_'.$schema_id, 'saswp_array'),
1507
- ),
1508
- 'recipeIngredient' => $ingredient,
1509
- 'recipeInstructions' => $instruction,
1510
- 'datePublished' => isset($all_post_meta['saswp_recipe_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_recipe_date_published_'.$schema_id][0])):'',
1511
- 'dateModified' => isset($all_post_meta['saswp_recipe_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_recipe_date_modified_'.$schema_id][0])):'',
1512
- 'description' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_description_'.$schema_id, 'saswp_array'),
1513
- 'mainEntity' => array(
1514
- '@type' => 'WebPage',
1515
- '@id' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_main_entity_'.$schema_id, 'saswp_array'),
1516
- 'publisher' => array(
1517
- '@type' => 'Organization',
1518
- 'logo' => array(
1519
- '@type' => 'ImageObject',
1520
- 'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_organization_logo_'.$schema_id, 'saswp_array'),
1521
- 'width' => saswp_remove_warnings($recipe_logo, 'width', 'saswp_string'),
1522
- 'height' => saswp_remove_warnings($recipe_logo, 'height', 'saswp_string'),
1523
- ),
1524
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_organization_name_'.$schema_id, 'saswp_array'),
1525
- ),
1526
- ),
1527
-
1528
-
1529
- );
1530
-
1531
- if(saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_name_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_thumbnailurl_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_description_'.$schema_id, 'saswp_array') !=''){
1532
-
1533
- $input1['video']['@type'] = 'VideoObject';
1534
- $input1['video']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_name_'.$schema_id, 'saswp_array');
1535
- $input1['video']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_description_'.$schema_id, 'saswp_array');
1536
- $input1['video']['thumbnailUrl'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_thumbnailurl_'.$schema_id, 'saswp_array');
1537
- $input1['video']['contentUrl'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_contenturl_'.$schema_id, 'saswp_array');
1538
- $input1['video']['embedUrl'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_embedurl_'.$schema_id, 'saswp_array');
1539
- $input1['video']['uploadDate'] = isset($all_post_meta['saswp_recipe_video_upload_date_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_recipe_video_upload_date_'.$schema_id][0])):'';
1540
- $input1['video']['duration'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_duration_'.$schema_id, 'saswp_array');
1541
- }
1542
 
1543
- if(saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_review_count_'.$schema_id, 'saswp_array')){
1544
-
1545
- $input1['aggregateRating'] = array(
1546
- "@type" => "AggregateRating",
1547
- "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_rating_'.$schema_id, 'saswp_array'),
1548
- "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_review_count_'.$schema_id, 'saswp_array')
1549
- );
1550
- }
1551
-
1552
- return $input1;
1553
-
1554
- }
1555
-
1556
- function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1557
-
1558
- $input1 = array();
1559
 
1560
- $product_image = get_post_meta( get_the_ID(), 'saswp_product_schema_image_'.$schema_id.'_detail',true);
1561
- $input1 = array(
1562
- '@context' => saswp_context_url(),
1563
- '@type' => 'Product',
1564
- '@id' => trailingslashit(get_permalink()).'#product',
1565
- 'url' => trailingslashit(get_permalink()),
1566
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_name_'.$schema_id, 'saswp_array'),
1567
- 'sku' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_sku_'.$schema_id, 'saswp_array'),
1568
- 'description' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_description_'.$schema_id, 'saswp_array'),
1569
- 'image' =>array(
1570
- '@type' => 'ImageObject',
1571
- 'url' => saswp_remove_warnings($product_image, 'thumbnail', 'saswp_string'),
1572
- 'width' => saswp_remove_warnings($product_image, 'width', 'saswp_string'),
1573
- 'height' => saswp_remove_warnings($product_image, 'height', 'saswp_string'),
1574
- ),
1575
- 'offers' => array(
1576
- '@type' => 'Offer',
1577
- 'availability' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_availability_'.$schema_id, 'saswp_array'),
1578
- 'itemCondition' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_condition_'.$schema_id, 'saswp_array'),
1579
- 'price' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_price_'.$schema_id, 'saswp_array'),
1580
- 'priceCurrency' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_currency_'.$schema_id, 'saswp_array'),
1581
- 'url' => trailingslashit(get_permalink()),
1582
- 'priceValidUntil' => isset($all_post_meta['saswp_product_schema_priceValidUntil_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_product_schema_priceValidUntil_'.$schema_id][0])):'',
1583
- ),
1584
- 'brand' => array('@type' => 'Thing',
1585
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_brand_name_'.$schema_id, 'saswp_array'),
1586
- )
1587
- );
1588
-
1589
- if(isset($all_post_meta['saswp_product_schema_seller_'.$schema_id])){
1590
- $input1['offers']['seller']['@type'] = 'Organization';
1591
- $input1['offers']['seller']['name'] = esc_attr($all_post_meta['saswp_product_schema_seller_'.$schema_id][0]);
1592
- }
1593
- if(isset($all_post_meta['saswp_product_schema_gtin8_'.$schema_id])){
1594
- $input1['gtin8'] = esc_attr($all_post_meta['saswp_product_schema_gtin8_'.$schema_id][0]);
1595
- }
1596
- if(isset($all_post_meta['saswp_product_schema_mpn_'.$schema_id])){
1597
- $input1['mpn'] = esc_attr($all_post_meta['saswp_product_schema_mpn_'.$schema_id][0]);
1598
- }
1599
-
1600
- if(saswp_remove_warnings($all_post_meta, 'saswp_product_schema_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_product_schema_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_product_schema_review_count_'.$schema_id, 'saswp_array')){
1601
-
1602
- $input1['aggregateRating'] = array(
1603
- "@type" => "AggregateRating",
1604
- "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_rating_'.$schema_id, 'saswp_array'),
1605
- "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_review_count_'.$schema_id, 'saswp_array')
1606
- );
1607
- }
1608
-
1609
-
1610
- $itinerary = get_post_meta($schema_post_id, 'product_reviews_'.$schema_id, true);
1611
-
1612
- $itinerary_arr = array();
1613
-
1614
- if(!empty($itinerary)){
1615
-
1616
- foreach($itinerary as $review){
1617
-
1618
- $review_fields = array();
1619
-
1620
- $review_fields['@type'] = 'Review';
1621
- $review_fields['author'] = esc_attr($review['saswp_product_reviews_reviewer_name']);
1622
- $review_fields['datePublished'] = esc_html($review['saswp_product_reviews_created_date']);
1623
- $review_fields['description'] = esc_textarea($review['saswp_product_reviews_text']);
1624
-
1625
- if(is_int($review['saswp_product_reviews_reviewer_rating'])){
1626
-
1627
- $review_fields['reviewRating']['@type'] = 'Rating';
1628
- $review_fields['reviewRating']['bestRating'] = '5';
1629
- $review_fields['reviewRating']['ratingValue'] = esc_attr($review['saswp_product_reviews_reviewer_rating']);
1630
- $review_fields['reviewRating']['worstRating'] = '1';
1631
-
1632
- }
1633
-
1634
- $itinerary_arr[] = $review_fields;
1635
- }
1636
- $input1['review'] = $itinerary_arr;
1637
- }
1638
-
1639
- $service = new saswp_output_service();
1640
- $product_details = $service->saswp_woocommerce_product_details(get_the_ID());
1641
-
1642
-
1643
- if(!empty($product_details['product_reviews'])){
1644
-
1645
- $reviews = array();
1646
-
1647
- foreach ($product_details['product_reviews'] as $review){
1648
-
1649
- $review_fields = array();
1650
-
1651
- $review_fields['@type'] = 'Review';
1652
- $review_fields['author'] = esc_attr($review['author']);
1653
- $review_fields['datePublished'] = esc_html($review['datePublished']);
1654
- $review_fields['description'] = $review['description'];
1655
-
1656
- if(isset($review['reviewRating']) && $review['reviewRating'] !=''){
1657
-
1658
- $review_fields['reviewRating']['@type'] = 'Rating';
1659
- $review_fields['reviewRating']['bestRating'] = '5';
1660
- $review_fields['reviewRating']['ratingValue'] = esc_attr($review['reviewRating']);
1661
- $review_fields['reviewRating']['worstRating'] = '1';
1662
-
1663
- }
1664
-
1665
- $reviews[] = $review_fields;
1666
-
1667
- }
1668
- $input1['review'] = $reviews;
1669
- }
1670
 
 
1671
  return $input1;
1672
-
1673
  }
1674
 
1675
- function saswp_local_business_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1676
 
1677
- $input1 = array();
1678
-
1679
- $operation_days = explode( "rn", esc_html( stripslashes(saswp_remove_warnings($all_post_meta, 'saswp_dayofweek_'.$schema_id, 'saswp_array'))) );;
1680
- $business_sub_name = '';
1681
- $business_type = saswp_remove_warnings($all_post_meta, 'saswp_business_type_'.$schema_id, 'saswp_array');
1682
- $post_specific_obj = new saswp_post_specific();
1683
-
1684
- if(array_key_exists($business_type, $post_specific_obj->_local_sub_business)){
1685
-
1686
- $check_business_type = $post_specific_obj->_local_sub_business[$business_type];
1687
-
1688
- if(!empty($check_business_type)){
1689
-
1690
- $business_sub_name = saswp_remove_warnings($all_post_meta, 'saswp_business_name_'.$schema_id, 'saswp_array');
1691
-
1692
- }
1693
-
1694
- }
1695
-
1696
- if($business_sub_name){
1697
-
1698
- $local_business = $business_sub_name;
1699
-
1700
- }else if($business_type){
1701
-
1702
- $local_business = $business_type;
1703
-
1704
- }else{
1705
-
1706
- $local_business = 'LocalBusiness';
1707
-
1708
- }
1709
-
1710
- $local_image = get_post_meta( get_the_ID(), 'local_business_logo_'.$schema_id.'_detail',true);
1711
-
1712
- $input1 = array(
1713
- '@context' => saswp_context_url(),
1714
- '@type' => $local_business ,
1715
- '@id' => ((isset($all_post_meta['saswp_business_id_'.$schema_id][0]) && $all_post_meta['saswp_business_id_'.$schema_id][0] !='') ? $all_post_meta['saswp_business_id_'.$schema_id][0] : trailingslashit(get_permalink()).'#'.strtolower($local_business)),
1716
- 'name' => saswp_remove_warnings($all_post_meta, 'local_business_name_'.$schema_id, 'saswp_array'),
1717
- 'url' => saswp_remove_warnings($all_post_meta, 'local_business_name_url_'.$schema_id, 'saswp_array'),
1718
- 'description' => saswp_remove_warnings($all_post_meta, 'local_business_description_'.$schema_id, 'saswp_array'),
1719
- 'image' => array(
1720
- '@type' => 'ImageObject',
1721
- 'url' => saswp_remove_warnings($local_image, 'thumbnail', 'saswp_string'),
1722
- 'width' => saswp_remove_warnings($local_image, 'width', 'saswp_string'),
1723
- 'height' => saswp_remove_warnings($local_image, 'height', 'saswp_string'),
1724
- ),
1725
- 'address' => array(
1726
- "@type" => "PostalAddress",
1727
- "streetAddress" => saswp_remove_warnings($all_post_meta, 'local_street_address_'.$schema_id, 'saswp_array'),
1728
- "addressLocality" => saswp_remove_warnings($all_post_meta, 'local_city_'.$schema_id, 'saswp_array'),
1729
- "addressRegion" => saswp_remove_warnings($all_post_meta, 'local_state_'.$schema_id, 'saswp_array'),
1730
- "postalCode" => saswp_remove_warnings($all_post_meta, 'local_postal_code_'.$schema_id, 'saswp_array'),
1731
- ),
1732
- 'telephone' => saswp_remove_warnings($all_post_meta, 'local_phone_'.$schema_id, 'saswp_array'),
1733
- 'openingHours' => $operation_days,
1734
- );
1735
 
1736
- if(isset($all_post_meta['local_price_range_'.$schema_id][0])){
1737
- $input1['priceRange'] = esc_attr($all_post_meta['local_price_range_'.$schema_id][0]);
1738
- }
1739
-
1740
- if(isset($all_post_meta['local_accepts_reservations_'.$schema_id][0])){
1741
- $input1['acceptsReservations'] = esc_attr($all_post_meta['local_price_accepts_reservations_'.$schema_id][0]);
1742
- }
1743
-
1744
- if(isset($all_post_meta['local_serves_cuisine_'.$schema_id][0])){
1745
- $input1['servesCuisine'] = esc_attr($all_post_meta['local_serves_cuisine_'.$schema_id][0]);
1746
- }
1747
 
1748
- if(isset($all_post_meta['local_area_served_'.$schema_id][0])){
1749
-
1750
- $area_served = explode(',', $all_post_meta['local_area_served_'.$schema_id][0]);
1751
-
1752
- $input1['areaServed'] = $area_served;
1753
-
1754
- }
1755
-
1756
- //social fields starts here
1757
-
1758
- $local_social = array();
1759
-
1760
- if(isset($all_post_meta['local_facebook_'.$schema_id][0]) && $all_post_meta['local_facebook_'.$schema_id][0] !=''){
1761
- $local_social[] = esc_url($all_post_meta['local_facebook_'.$schema_id][0]);
1762
- }
1763
- if(isset($all_post_meta['local_twitter_'.$schema_id][0]) && $all_post_meta['local_twitter_'.$schema_id][0] !=''){
1764
- $local_social[] = esc_url($all_post_meta['local_twitter_'.$schema_id][0]);
1765
- }
1766
- if(isset($all_post_meta['local_instagram_'.$schema_id][0]) && $all_post_meta['local_instagram_'.$schema_id][0] !=''){
1767
- $local_social[] = esc_url($all_post_meta['local_instagram_'.$schema_id][0]);
1768
- }
1769
- if(isset($all_post_meta['local_pinterest_'.$schema_id][0]) && $all_post_meta['local_pinterest_'.$schema_id][0] !=''){
1770
- $local_social[] = esc_url($all_post_meta['local_pinterest_'.$schema_id][0]);
1771
- }
1772
- if(isset($all_post_meta['local_linkedin_'.$schema_id][0]) && $all_post_meta['local_linkedin_'.$schema_id][0] !=''){
1773
- $local_social[] = esc_url($all_post_meta['local_linkedin_'.$schema_id][0]);
1774
- }
1775
- if(isset($all_post_meta['local_soundcloud_'.$schema_id][0]) && $all_post_meta['local_soundcloud_'.$schema_id][0] !=''){
1776
- $local_social[] = esc_url($all_post_meta['local_soundcloud_'.$schema_id][0]);
1777
- }
1778
- if(isset($all_post_meta['local_tumblr_'.$schema_id][0]) && $all_post_meta['local_tumblr_'.$schema_id][0] !=''){
1779
- $local_social[] = esc_url($all_post_meta['local_tumblr_'.$schema_id][0]);
1780
- }
1781
- if(isset($all_post_meta['local_youtube_'.$schema_id][0]) && $all_post_meta['local_youtube_'.$schema_id][0] !=''){
1782
- $local_social[] = esc_url($all_post_meta['local_youtube_'.$schema_id][0]);
1783
- }
1784
-
1785
- if(!empty($local_social)){
1786
- $input1['sameAs'] = $local_social;
1787
- }
1788
- //social fields ends here
1789
-
1790
- if(isset($all_post_meta['local_menu_'.$schema_id][0])){
1791
- $input1['hasMenu'] = esc_url($all_post_meta['local_menu_'.$schema_id][0]);
1792
- }
1793
-
1794
- if(isset($all_post_meta['local_hasmap_'.$schema_id][0])){
1795
- $input1['hasMap'] = esc_url($all_post_meta['local_hasmap_'.$schema_id][0]);
1796
  }
1797
-
1798
- if(isset($all_post_meta['local_latitude_'.$schema_id][0]) && isset($all_post_meta['local_longitude_'.$schema_id][0])){
1799
-
1800
- $input1['geo']['@type'] = 'GeoCoordinates';
1801
- $input1['geo']['latitude'] = $all_post_meta['local_latitude_'.$schema_id][0];
1802
- $input1['geo']['longitude'] = $all_post_meta['local_longitude_'.$schema_id][0];
1803
-
 
 
 
 
1804
  }
1805
-
1806
- return $input1;
1807
- }
1808
-
1809
- function saswp_video_game_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1810
-
1811
- $input1 = array();
1812
-
1813
- $howto_image = get_post_meta( get_the_ID(), 'saswp_vg_schema_image_'.$schema_id.'_detail',true);
1814
-
1815
- $input1['@context'] = saswp_context_url();
1816
- $input1['@type'] = 'VideoGame';
1817
- $input1['@id'] = trailingslashit(get_permalink()).'#VideoGame';
1818
- $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_name_'.$schema_id, 'saswp_array');
1819
- $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_url_'.$schema_id, 'saswp_array');
1820
- $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_description_'.$schema_id, 'saswp_array');
1821
-
1822
- if(!(empty($howto_image))){
1823
-
1824
- $input1['image']['@type'] = 'ImageObject';
1825
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1826
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1827
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1828
-
1829
  }
1830
-
1831
- $input1['operatingSystem'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_operating_system_'.$schema_id, 'saswp_array');
1832
- $input1['applicationCategory'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_application_category_'.$schema_id, 'saswp_array');
1833
-
1834
- $input1['author']['@type'] = 'Organization';
1835
- $input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_author_name_'.$schema_id, 'saswp_array');
1836
-
1837
- $input1['offers']['@type'] = 'Offer';
1838
- $input1['offers']['price'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_price_'.$schema_id, 'saswp_array');
1839
- $input1['offers']['priceCurrency'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_price_currency_'.$schema_id, 'saswp_array');
1840
- $input1['offers']['availability'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_price_availability_'.$schema_id, 'saswp_array');
1841
-
1842
-
1843
- $input1['publisher'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_publisher_'.$schema_id, 'saswp_array');
1844
- $input1['genre'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_genre_'.$schema_id, 'saswp_array');
1845
- $input1['processorRequirements'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_processor_requirements_'.$schema_id, 'saswp_array');
1846
- $input1['memoryRequirements'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_memory_requirements_'.$schema_id, 'saswp_array');
1847
- $input1['storageRequirements'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_storage_requirements_'.$schema_id, 'saswp_array');
1848
- $input1['gamePlatform'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_game_platform_'.$schema_id, 'saswp_array');
1849
- $input1['cheatCode'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_cheat_code_'.$schema_id, 'saswp_array');
1850
-
1851
- if( saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_review_count_'.$schema_id, 'saswp_array')){
1852
-
1853
- $input1['aggregateRating']['@type'] = 'AggregateRating';
1854
- $input1['aggregateRating']['ratingValue'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_rating_'.$schema_id, 'saswp_array');
1855
- $input1['aggregateRating']['ratingCount'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_review_count_'.$schema_id, 'saswp_array');
1856
-
1857
  }
1858
-
1859
- return $input1;
 
 
 
1860
  }
1861
 
1862
- function saswp_music_playlist_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1863
-
1864
- $input1 = array();
1865
-
1866
- $input1['@context'] = saswp_context_url();
1867
- $input1['@type'] = 'MusicPlaylist';
1868
- $input1['@id'] = trailingslashit(get_permalink()).'#MusicPlaylist';
1869
- $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_music_playlist_url_'.$schema_id, 'saswp_array');
1870
- $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_music_playlist_name_'.$schema_id, 'saswp_array');
1871
- $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_music_playlist_description_'.$schema_id, 'saswp_array');
1872
 
1873
- $faq_question = get_post_meta($schema_post_id, 'music_playlist_track_'.$schema_id, true);
1874
 
1875
- $faq_question_arr = array();
1876
 
1877
- if(!empty($faq_question)){
 
 
1878
 
1879
- $input1['numTracks'] = count($faq_question);
 
 
 
 
 
 
 
 
 
1880
 
1881
- foreach($faq_question as $val){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1882
 
1883
- $supply_data = array();
1884
- $supply_data['@type'] = 'MusicRecording';
1885
- $supply_data['byArtist'] = $val['saswp_music_playlist_track_artist'];
1886
- $supply_data['duration'] = $val['saswp_music_playlist_track_duration'];
1887
- $supply_data['inAlbum'] = $val['saswp_music_playlist_track_inalbum'];
1888
- $supply_data['name'] = $val['saswp_music_playlist_track_name'];
1889
- $supply_data['url'] = $val['saswp_music_playlist_track_url'];
1890
 
1891
- $faq_question_arr[] = $supply_data;
 
 
1892
  }
1893
- $input1['track'] = $faq_question_arr;
1894
  }
1895
-
1896
  return $input1;
 
1897
  }
797
 
798
  if(saswp_global_option()){
799
  //Clean MicroData
800
+ $content = preg_replace("/itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement|Rating|worstRating|ratingValue|bestRating)(\"?)/", "", $content);
801
+ $content = preg_replace("/itemscope[\n|\s|]*itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement|Rating|worstRating|ratingValue|bestRating)(\"?)/", "", $content);
802
+ $content = preg_replace("/itemscope[\n|\s|]*itemtype=(\'?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement|Rating|worstRating|ratingValue|bestRating)(\'?)/", "", $content);
803
+ $content = preg_replace("/itemscope=(\"?)itemscope(\"?) itemtype=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement|Rating|worstRating|ratingValue|bestRating)(\"?)/", "", $content);
804
+ $content = preg_replace("/itemscope=(\"?)itemprop(\"?) itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement|Rating|worstRating|ratingValue|bestRating)(\"?)/", "", $content);
805
+ $content = preg_replace("/itemscope itemprop=\"(.*?)\" itemType=(\"?)http(s?):\/\/schema.org\/(Person|Mosque|SearchAction|Church|HinduTemple|LandmarksOrHistoricalBuildings|TouristDestination|TouristAttraction|Place|LocalBusiness|MedicalCondition|VideoObject|AudioObject|Trip|Service|JobPosting|VideoGame|Game|TechArticle|SoftwareApplication|TVSeries|Recipe|Review|HowTo|DiscussionForumPosting|Course|SingleFamilyResidence|House|Apartment|EventPosting|Event|Article|BlogPosting|Blog|BreadcrumbList|AggregateRating|WebPage|Person|Organization|NewsArticle|Product|CreativeWork|ImageObject|UserComments|WPHeader|WPSideBar|WPFooter|WPAdBlock|SiteNavigationElement|Rating|worstRating|ratingValue|bestRating)(\"?)/", "", $content);
806
  $content = preg_replace("/itemprop='logo' itemscope itemtype='https:\/\/schema.org\/ImageObject'/", "", $content);
807
  $content = preg_replace('/itemprop="logo" itemscope="" itemtype="https:\/\/schema.org\/ImageObject"/', "", $content);
808
+ $content = preg_replace('/itemprop=\"(worstRating|ratingValue|bestRating|aggregateRating|ratingCount|reviewBody|review|name|datePublished|author|reviewRating)\"/', "", $content);
809
+ $content = preg_replace('/itemscope/', "", $content);
810
 
811
  //Clean json markup
812
  if(isset($sd_data['saswp-aiosp']) && $sd_data['saswp-aiosp'] == 1 ){
1007
  return $metadata;
1008
  }
1009
 
1010
+ function saswp_get_testimonial_data($atts, $matche){
1011
+
1012
+ $reviews = array();
1013
+ $ratings = array();
1014
+ $testimonial = array();
1015
+
1016
+ switch ($matche) {
1017
+
1018
+ case 'single_testimonial':
1019
+
1020
+ $arg = array(
1021
+ 'post_type' => 'testimonial',
1022
+ 'post_status' => 'publish',
1023
+ 'post__in' => array($atts['id']),
1024
+ );
1025
+
1026
+
1027
+
1028
+ break;
1029
+ case 'random_testimonial':
1030
+
1031
+ $arg = array(
1032
+ 'post_type' => 'testimonial',
1033
+ 'post_status' => 'publish',
1034
+ 'posts_per_page' => $atts['count'],
1035
+ 'orderby' => 'rand',
1036
+ );
1037
+
1038
+ break;
1039
+
1040
+ case 'testimonials':
1041
+ case 'testimonials_cycle':
1042
+ case 'testimonials_grid':
1043
+
1044
+ $arg = array(
1045
+ 'post_type' => 'testimonial',
1046
+ 'post_status' => 'publish',
1047
+ 'posts_per_page' => $atts['count'],
1048
+ );
1049
+
1050
+ break;
1051
+
1052
+ }
1053
+
1054
+ $testimonial = get_posts( $arg);
1055
+
1056
+ if(!empty($testimonial)){
1057
+
1058
+ $sumofrating = 0;
1059
+ $avg_rating = 1;
1060
+
1061
+ foreach ($testimonial as $value){
1062
+
1063
+ $rating = get_post_meta($value->ID, $key='_ikcf_rating', true);
1064
+ $author = get_post_meta($value->ID, $key='_ikcf_client', true);
1065
+
1066
+ $sumofrating += $rating;
1067
+
1068
+ $reviews[] = array(
1069
+ '@type' => 'Review',
1070
+ 'author' => $author,
1071
+ 'datePublished' => saswp_format_date_time($value->post_date),
1072
+ 'description' => $value->post_content,
1073
+ 'reviewRating' => array(
1074
+ '@type' => 'Rating',
1075
+ 'bestRating' => '5',
1076
+ 'ratingValue' => $rating,
1077
+ 'worstRating' => '1',
1078
+ )
1079
+ );
1080
+
1081
+ }
1082
+
1083
+ if($sumofrating> 0){
1084
+ $avg_rating = $sumofrating / count($reviews);
1085
+ }
1086
+
1087
+ $ratings['aggregateRating'] = array(
1088
+ '@type' => 'AggregateRating',
1089
+ 'ratingValue' => $avg_rating,
1090
+ 'reviewCount' => count($testimonial)
1091
+ );
1092
+
1093
+ }
1094
+
1095
+ return array('reviews' => $reviews, 'rating' => $ratings);
1096
+ }
1097
+
1098
+ function saswp_get_easy_testomonials(){
1099
 
1100
+ $testimonial = array();
1101
 
1102
+ global $post, $sd_data;
1103
+
1104
+ if(isset($sd_data['saswp-easy-testimonials']) && $sd_data['saswp-easy-testimonials'] == 1){
1105
+
1106
+ if(is_object($post)){
1107
+
1108
+ $pattern = get_shortcode_regex();
1109
 
1110
  if ( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches )
1111
+ && array_key_exists( 2, $matches ) )
 
1112
  {
1113
+
1114
+ $testimo_str = '';
1115
+
1116
+ if(in_array( 'single_testimonial', $matches[2] )){
1117
+ $testimo_str = 'single_testimonial';
1118
+ }elseif(in_array( 'random_testimonial', $matches[2] )){
1119
+ $testimo_str = 'random_testimonial';
1120
+ }elseif(in_array( 'testimonials', $matches[2] )){
1121
+ $testimo_str = 'testimonials';
1122
+ }elseif(in_array( 'testimonials_cycle', $matches[2] )){
1123
+ $testimo_str = 'testimonials_cycle';
1124
+ }elseif(in_array( 'testimonials_grid', $matches[2] )){
1125
+ $testimo_str = 'testimonials_grid';
1126
+ }
1127
 
1128
+ if($testimo_str){
1129
 
1130
+ foreach ($matches[0] as $matche){
 
 
1131
 
1132
+ $mached = rtrim($matche, ']');
1133
+ $mached = ltrim($mached, '[');
1134
+ $mached = trim($mached);
1135
+ $atts = shortcode_parse_atts('['.$mached.' ]');
 
 
 
1136
 
1137
+ $testimonial = saswp_get_testimonial_data($atts, $testimo_str);
1138
+
1139
+ break;
1140
+ }
1141
 
1142
+ }
1143
+
1144
+ }
1145
+
1146
+ }
1147
+
1148
+ }
1149
+
1150
+ return $testimonial;
1151
 
 
 
1152
  }
1153
 
1154
+ function saswp_get_bne_testimonials_data($atts, $testimo_str){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1155
 
1156
+ $reviews = array();
1157
+ $ratings = array();
1158
+ $arg = array(
1159
+ 'post_type' => 'bne_testimonials',
1160
+ 'order' => $atts['order'],
1161
+ 'orderby' => $atts['orderby'],
1162
+ 'posts_per_page' => $atts['limit'],
1163
+ );
1164
+
1165
+ $testimonial = get_posts( $arg);
1166
+
1167
+ if(!empty($testimonial)){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1168
 
1169
+ $sumofrating = 0;
1170
+ $avg_rating = 1;
1171
 
1172
+ foreach ($testimonial as $value){
1173
 
1174
+ $rating = get_post_meta($value->ID, $key='rating', true);
1175
+ $author = get_post_meta($value->ID, $key='tagline', true);
 
1176
 
1177
+ $sumofrating += $rating;
 
 
1178
 
1179
+ $reviews[] = array(
1180
+ '@type' => 'Review',
1181
+ 'author' => $author,
1182
+ 'datePublished' => saswp_format_date_time($value->post_date),
1183
+ 'description' => $value->post_content,
1184
+ 'reviewRating' => array(
1185
+ '@type' => 'Rating',
1186
+ 'bestRating' => '5',
1187
+ 'ratingValue' => $rating,
1188
+ 'worstRating' => '1',
1189
+ )
1190
+ );
1191
 
1192
+ }
 
 
 
 
1193
 
1194
+ if($sumofrating> 0){
1195
+ $avg_rating = $sumofrating / count($reviews);
1196
+ }
1197
 
1198
+ $ratings['aggregateRating'] = array(
1199
+ '@type' => 'AggregateRating',
1200
+ 'ratingValue' => $avg_rating,
1201
+ 'reviewCount' => count($testimonial)
1202
+ );
1203
 
1204
  }
1205
 
1206
+ return array('reviews' => $reviews, 'rating' => $ratings);
1207
+
 
 
 
 
 
1208
  }
1209
 
1210
+ function saswp_get_bne_testomonials(){
1211
 
1212
+ $testimonial = array();
1213
 
1214
+ global $post, $sd_data;
1215
+
1216
+ if(isset($sd_data['saswp-bne-testimonials']) && $sd_data['saswp-bne-testimonials'] == 1){
1217
+
1218
+ if(is_object($post)){
1219
+
1220
+ $pattern = get_shortcode_regex();
1221
+
1222
+ if ( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches )
1223
+ && array_key_exists( 2, $matches ) )
1224
+ {
1225
+
1226
+ $testimo_str = '';
1227
+
1228
+ if(in_array( 'bne_testimonials', $matches[2] )){
1229
+ $testimo_str = 'bne_testimonials';
1230
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1231
 
1232
+ if($testimo_str){
1233
+
1234
+ foreach ($matches[0] as $matche){
1235
+
1236
+ $mached = rtrim($matche, ']');
1237
+ $mached = ltrim($mached, '[');
1238
+ $mached = trim($mached);
1239
+ $atts = shortcode_parse_atts('['.$mached.' ]');
1240
 
1241
+ $id = get_post_meta( $atts['custom'], '_bne_testimonials_sg_shortcode', true );
 
 
 
 
 
 
 
 
 
 
 
 
1242
 
1243
+ if($id){
1244
 
1245
+ $atts = shortcode_parse_atts($id);
1246
+
1247
+ $testimonial = saswp_get_bne_testimonials_data($atts, $testimo_str);
 
 
 
 
 
 
1248
 
1249
  }
1250
+
1251
+ break;
1252
+ }
1253
+
1254
+ }
1255
+
1256
+ }
1257
+
1258
+ }
1259
+
1260
+ }
1261
+
1262
+ return $testimonial;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1263
 
1264
  }
1265
 
1266
+ function saswp_append_fetched_reviews($input1){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1267
 
1268
+ global $post;
1269
 
1270
+ if(is_object($post)){
 
 
1271
 
1272
+ $pattern = get_shortcode_regex();
 
 
 
 
 
 
 
 
 
 
 
 
 
1273
 
1274
+ if ( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches )
1275
+ && array_key_exists( 2, $matches )
1276
+ && in_array( 'saswp-reviews', $matches[2] ) )
1277
+ {
1278
+
1279
+ $service = new saswp_reviews_service();
1280
+
1281
+ foreach ($matches[0] as $matche){
1282
+
1283
+ $mached = rtrim($matche, ']');
1284
+ $mached = ltrim($mached, '[');
1285
+ $mached = trim($mached);
1286
+ $attr = shortcode_parse_atts('['.$mached.' ]');
1287
+
1288
+ $reviews = $service->saswp_get_reviews_list_by_parameters($attr);
1289
+
1290
+ if($reviews){
1291
+
1292
+ $rv_markup = $service->saswp_get_reviews_schema_markup($reviews);
1293
+
1294
+ if($rv_markup){
1295
+
1296
+ if(isset($input1['review'])){
1297
 
1298
+ $input1['review'] = array_merge($input1['review'], $rv_markup['review']);
1299
 
1300
+ }else{
1301
+ $input1 = array_merge($input1, $rv_markup);
1302
  }
1303
+
1304
  }
1305
+
1306
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1307
 
1308
+ }
1309
+
1310
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
1311
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1312
 
1313
+ }
1314
  return $input1;
 
1315
  }
1316
 
1317
+ function saswp_get_mainEntity($schema_id){
1318
 
1319
+ global $post;
1320
+
1321
+ $response = array();
1322
+
1323
+ $item_list_enable = get_post_meta($schema_id, 'saswp_enable_itemlist_schema', true);
1324
+ $item_list_tags = get_post_meta($schema_id, 'saswp_item_list_tags', true);
1325
+ $item_list_custom = get_post_meta($schema_id, 'saswp_item_list_custom', true);
1326
+
1327
+ if($item_list_enable){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1328
 
1329
+ $listitem = array();
1330
+
1331
+ if($item_list_tags == 'custom'){
 
 
 
 
 
 
 
 
1332
 
1333
+ $regex = '/<([0-9a-z]*)\sclass="'.$item_list_custom.'"[^>]*>(.*?)<\/\1>/';
1334
+
1335
+ preg_match_all( $regex, $post->post_content, $matches , PREG_SET_ORDER );
1336
+
1337
+ foreach($matches as $match){
1338
+ $listitem[] = $match[2];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1339
  }
1340
+
1341
+ }else{
1342
+
1343
+ $regex = '/<'.$item_list_tags.'>(.*?)<\/'.$item_list_tags.'>/';
1344
+
1345
+ preg_match_all( $regex, $post->post_content, $matches , PREG_SET_ORDER );
1346
+
1347
+ if($matches){
1348
+ foreach($matches as $match){
1349
+ $listitem[] = $match[1];
1350
+ }
1351
  }
1352
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1353
  }
1354
+
1355
+ if($listitem){
1356
+
1357
+ $response['@type'] = 'ItemList';
1358
+ $response['itemListElement'] = $listitem;
1359
+ $response['itemListOrder'] = 'http://schema.org/ItemListOrderAscending ';
1360
+ $response['name'] = saswp_get_the_title();
1361
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1362
  }
1363
+
1364
+ }
1365
+
1366
+ return $response;
1367
+
1368
  }
1369
 
1370
+ function saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options){
1371
+
1372
+ if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] == 1){
 
 
 
 
 
 
 
1373
 
1374
+ if(isset($schema_options['saswp_modify_method'])){
1375
 
1376
+ if($schema_options['saswp_modify_method'] == 'automatic'){
1377
 
1378
+ $service = new saswp_output_service();
1379
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
1380
+ }
1381
 
1382
+ if($schema_options['saswp_modify_method'] == 'manual'){
1383
+
1384
+ $all_post_meta = get_post_meta($schema_post_id, $key='', true);
1385
+
1386
+ switch ($schema_type) {
1387
+
1388
+ case 'local_business':
1389
+
1390
+ $data = saswp_local_business_schema_markup($schema_post_id, $schema_post_id, $all_post_meta);
1391
+ $input1 = array_merge($data, $input1);
1392
 
1393
+ break;
1394
+
1395
+ case 'HowTo':
1396
+
1397
+ $data = saswp_howto_schema_markup($schema_post_id, $schema_post_id, $all_post_meta);
1398
+ $input1 = array_merge($input1, $data);
1399
+
1400
+ break;
1401
+
1402
+ case 'FAQ':
1403
+
1404
+ $data = saswp_faq_schema_markup($schema_post_id, $schema_post_id, $all_post_meta);
1405
+ $input1 = array_merge($input1, $data);
1406
+
1407
+ break;
1408
 
1409
+ default:
1410
+ break;
1411
+ }
1412
+
1413
+ }
 
 
1414
 
1415
+ }else{
1416
+ $service = new saswp_output_service();
1417
+ $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
1418
  }
1419
+
1420
  }
1421
+
1422
  return $input1;
1423
+
1424
  }
output/markup.php ADDED
@@ -0,0 +1,2419 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Json-ld Markup file
4
+ *
5
+ * @author Magazine3
6
+ * @category Frontend
7
+ * @path output/markup
8
+ * @Version 1.9.17
9
+ */
10
+
11
+ // Exit if accessed directly.
12
+ if ( ! defined( 'ABSPATH' ) ) exit;
13
+
14
+ function saswp_book_schema_markup($schema_id, $schema_post_id, $all_post_meta){
15
+
16
+ $input1 = array();
17
+
18
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_book_image_'.$schema_id.'_detail',true);
19
+
20
+ $input1['@context'] = saswp_context_url();
21
+ $input1['@type'] = 'Book';
22
+ $input1['@id'] = trailingslashit(get_permalink()).'#Book';
23
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_book_url_'.$schema_id, 'saswp_array');
24
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_book_name_'.$schema_id, 'saswp_array');
25
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_book_description_'.$schema_id, 'saswp_array');
26
+
27
+ if(!(empty($howto_image))){
28
+
29
+ $input1['image']['@type'] = 'ImageObject';
30
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
31
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
32
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
33
+
34
+ }
35
+
36
+ if($all_post_meta['saswp_book_author_'.$schema_id][0]){
37
+ $input1['author']['@type'] = 'Person';
38
+ $input1['author']['name'] = $all_post_meta['saswp_book_author_'.$schema_id][0];
39
+
40
+ if($all_post_meta['saswp_book_author_url_'.$schema_id][0]){
41
+ $input1['author']['sameAs'] = $all_post_meta['saswp_book_author_url_'.$schema_id][0];
42
+ }
43
+
44
+ }
45
+
46
+ $input1['datePublished'] = isset($all_post_meta['saswp_book_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_book_date_published_'.$schema_id][0])):'';
47
+ $input1['isbn'] = saswp_remove_warnings($all_post_meta, 'saswp_book_isbn_'.$schema_id, 'saswp_array');
48
+ $input1['numberOfPages'] = saswp_remove_warnings($all_post_meta, 'saswp_book_no_of_page_'.$schema_id, 'saswp_array');
49
+ $input1['publisher'] = saswp_remove_warnings($all_post_meta, 'saswp_book_publisher_'.$schema_id, 'saswp_array');
50
+
51
+ if(isset($all_post_meta['saswp_book_price_'.$schema_id]) && isset($all_post_meta['saswp_book_price_currency_'.$schema_id])){
52
+ $input1['offers']['@type'] = 'Offer';
53
+ $input1['offers']['availability'] = saswp_remove_warnings($all_post_meta, 'saswp_book_availability_'.$schema_id, 'saswp_array');
54
+ $input1['offers']['price'] = $all_post_meta['saswp_book_price_'.$schema_id];
55
+ $input1['offers']['priceCurrency'] = $all_post_meta['saswp_book_price_currency_'.$schema_id];
56
+ }
57
+
58
+ if(isset($all_post_meta['saswp_book_enable_rating_'.$schema_id]) && isset($all_post_meta['saswp_book_rating_value_'.$schema_id]) && isset($all_post_meta['saswp_book_rating_count_'.$schema_id])){
59
+ $input1['aggregateRating']['@type'] = 'aggregateRating';
60
+ $input1['aggregateRating']['ratingValue'] = $all_post_meta['saswp_book_rating_value_'.$schema_id];
61
+ $input1['aggregateRating']['ratingCount'] = $all_post_meta['saswp_book_rating_count_'.$schema_id];
62
+ }
63
+
64
+ return $input1;
65
+ }
66
+
67
+ function saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta){
68
+
69
+ $input1 = array();
70
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_howto_schema_image_'.$schema_id.'_detail',true);
71
+
72
+ $tool = get_post_meta($schema_post_id, 'howto_tool_'.$schema_id, true);
73
+ $step = get_post_meta($schema_post_id, 'howto_step_'.$schema_id, true);
74
+ $supply = get_post_meta($schema_post_id, 'howto_supply_'.$schema_id, true);
75
+
76
+ $input1['@context'] = saswp_context_url();
77
+ $input1['@type'] = 'HowTo';
78
+ $input1['@id'] = trailingslashit(get_permalink()).'#HowTo';
79
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_schema_name_'.$schema_id, 'saswp_array');
80
+ $input1['datePublished'] = isset($all_post_meta['saswp_howto_ec_schema_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_howto_ec_schema_date_published_'.$schema_id][0])):'';
81
+ $input1['dateModified'] = isset($all_post_meta['saswp_howto_ec_schema_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_howto_ec_schema_date_modified_'.$schema_id][0])):'';
82
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_schema_description_'.$schema_id, 'saswp_array');
83
+
84
+ if(!(empty($howto_image))){
85
+
86
+ $input1['image']['@type'] = 'ImageObject';
87
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
88
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
89
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
90
+
91
+ }
92
+
93
+ if(saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_currency_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_value_'.$schema_id, 'saswp_array') !='')
94
+ {
95
+ $input1['estimatedCost']['@type'] = 'MonetaryAmount';
96
+ $input1['estimatedCost']['currency']= saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_currency_'.$schema_id, 'saswp_array');
97
+ $input1['estimatedCost']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_ec_schema_value_'.$schema_id, 'saswp_array');
98
+ }
99
+
100
+
101
+ $supply_arr = array();
102
+ if(!empty($supply)){
103
+
104
+ foreach($supply as $val){
105
+
106
+ $supply_data = array();
107
+
108
+ if($val['saswp_howto_supply_name'] || $val['saswp_howto_supply_url']){
109
+ $supply_data['@type'] = 'HowToSupply';
110
+ $supply_data['name'] = $val['saswp_howto_supply_name'];
111
+ $supply_data['url'] = $val['saswp_howto_supply_url'];
112
+ }
113
+
114
+
115
+
116
+ if(isset($val['saswp_howto_supply_image_id']) && $val['saswp_howto_supply_image_id'] !=''){
117
+
118
+ $image_details = wp_get_attachment_image_src($val['saswp_howto_supply_image_id']);
119
+
120
+ $supply_data['image']['@type'] = 'ImageObject';
121
+ $supply_data['image']['url'] = esc_url($image_details[0]);
122
+ $supply_data['image']['width'] = esc_attr($image_details[1]);
123
+ $supply_data['image']['height'] = esc_attr($image_details[2]);
124
+
125
+
126
+
127
+ }
128
+ $supply_arr[] = $supply_data;
129
+ }
130
+ $input1['supply'] = $supply_arr;
131
+ }
132
+
133
+ $tool_arr = array();
134
+ if(!empty($tool)){
135
+
136
+ foreach($tool as $val){
137
+
138
+ $supply_data = array();
139
+
140
+ if($val['saswp_howto_tool_name'] || $val['saswp_howto_tool_url']){
141
+ $supply_data['@type'] = 'HowToTool';
142
+ $supply_data['name'] = $val['saswp_howto_tool_name'];
143
+ $supply_data['url'] = $val['saswp_howto_tool_url'];
144
+ }
145
+
146
+ if(isset($val['saswp_howto_tool_image_id']) && $val['saswp_howto_tool_image_id'] !=''){
147
+
148
+ $image_details = wp_get_attachment_image_src($val['saswp_howto_tool_image_id']);
149
+
150
+ $supply_data['image']['@type'] = 'ImageObject';
151
+ $supply_data['image']['url'] = esc_url($image_details[0]);
152
+ $supply_data['image']['width'] = esc_attr($image_details[1]);
153
+ $supply_data['image']['height'] = esc_attr($image_details[2]);
154
+
155
+
156
+
157
+ }
158
+ $tool_arr[] = $supply_data;
159
+ }
160
+ $input1['tool'] = $tool_arr;
161
+ }
162
+
163
+ //step
164
+
165
+ $step_arr = array();
166
+ if(!empty($step)){
167
+
168
+ foreach($step as $key => $val){
169
+
170
+ $supply_data = array();
171
+ $direction = array();
172
+ $tip = array();
173
+
174
+ if($val['saswp_howto_direction_text']){
175
+ $direction['@type'] = 'HowToDirection';
176
+ $direction['text'] = $val['saswp_howto_direction_text'];
177
+ }
178
+
179
+ if($val['saswp_howto_tip_text']){
180
+
181
+ $tip['@type'] = 'HowToTip';
182
+ $tip['text'] = $val['saswp_howto_tip_text'];
183
+
184
+ }
185
+
186
+ $supply_data['@type'] = 'HowToStep';
187
+ $supply_data['url'] = trailingslashit(get_permalink()).'#step'.++$key;
188
+ $supply_data['name'] = $val['saswp_howto_step_name'];
189
+
190
+ if($direction['text'] || $tip['text']){
191
+ $supply_data['itemListElement'] = array($direction, $tip);
192
+ }
193
+
194
+ if(isset($val['saswp_howto_step_image_id']) && $val['saswp_howto_step_image_id'] !=''){
195
+
196
+ $image_details = wp_get_attachment_image_src($val['saswp_howto_step_image_id']);
197
+ $supply_data['image']['@type'] = 'ImageObject';
198
+ $supply_data['image']['url'] = esc_url($image_details[0]);
199
+ $supply_data['image']['width'] = esc_attr($image_details[1]);
200
+ $supply_data['image']['height'] = esc_attr($image_details[2]);
201
+
202
+ }
203
+
204
+ $step_arr[] = $supply_data;
205
+
206
+ }
207
+
208
+ $input1['step'] = $step_arr;
209
+
210
+ }
211
+
212
+ $input1['totalTime'] = saswp_remove_warnings($all_post_meta, 'saswp_howto_schema_totaltime_'.$schema_id, 'saswp_array');
213
+
214
+ return $input1;
215
+ }
216
+
217
+ function saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta){
218
+
219
+ $input1 = array();
220
+
221
+ $event_image = get_post_meta( get_the_ID(), 'saswp_event_schema_image_'.$schema_id.'_detail',true);
222
+
223
+ $input1 = array(
224
+ '@context' => saswp_context_url(),
225
+ '@type' => (isset($all_post_meta['saswp_event_schema_type_'.$schema_id][0]) && $all_post_meta['saswp_event_schema_type_'.$schema_id][0] !='') ? $all_post_meta['saswp_event_schema_type_'.$schema_id][0] : 'Event' ,
226
+ '@id' => trailingslashit(get_permalink()).'#event',
227
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_name_'.$schema_id, 'saswp_array'),
228
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_description_'.$schema_id, 'saswp_array'),
229
+ 'image' => array(
230
+ '@type' =>'ImageObject',
231
+ 'url' => isset($event_image['thumbnail']) ? esc_url($event_image['thumbnail']):'' ,
232
+ 'width' => isset($event_image['width']) ? esc_attr($event_image['width']) :'' ,
233
+ 'height' => isset($event_image['height']) ? esc_attr($event_image['height']) :'' ,
234
+ ),
235
+ 'location' => array(
236
+ '@type' => 'Place',
237
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_name_'.$schema_id, 'saswp_array'),
238
+ 'address' => array(
239
+ '@type' => 'PostalAddress',
240
+ 'streetAddress' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_streetaddress_'.$schema_id, 'saswp_array'),
241
+ 'addressLocality' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_locality_'.$schema_id, 'saswp_array'),
242
+ 'postalCode' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_postalcode_'.$schema_id, 'saswp_array'),
243
+ 'addressRegion' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_region_'.$schema_id, 'saswp_array'),
244
+ 'addressCountry' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_location_country_'.$schema_id, 'saswp_array'),
245
+ )
246
+ ),
247
+ 'offers' => array(
248
+ '@type' => 'Offer',
249
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_url_'.$schema_id, 'saswp_array'),
250
+ 'price' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_price_'.$schema_id, 'saswp_array'),
251
+ 'priceCurrency' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_price_currency_'.$schema_id, 'saswp_array'),
252
+ 'availability' => saswp_remove_warnings($all_post_meta, 'saswp_event_schema_availability_'.$schema_id, 'saswp_array'),
253
+ 'validFrom' => isset($all_post_meta['saswp_event_schema_validfrom_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_event_schema_validfrom_'.$schema_id][0])):'',
254
+ )
255
+ );
256
+
257
+
258
+ if(isset($all_post_meta['saswp_event_schema_start_date_'.$schema_id][0])){
259
+
260
+ $date = $time = '';
261
+
262
+ $date = $all_post_meta['saswp_event_schema_start_date_'.$schema_id][0];
263
+
264
+ if(isset($all_post_meta['saswp_event_schema_start_time_'.$schema_id][0])){
265
+ $time = $all_post_meta['saswp_event_schema_start_time_'.$schema_id][0];
266
+ }
267
+
268
+ $input1['startDate'] = saswp_format_date_time($date, $time);
269
+
270
+ }
271
+
272
+ if(isset($all_post_meta['saswp_event_schema_end_date_'.$schema_id][0])){
273
+
274
+ $date = $time = '';
275
+
276
+ $date = $all_post_meta['saswp_event_schema_end_date_'.$schema_id][0];
277
+
278
+ if(isset($all_post_meta['saswp_event_schema_end_time_'.$schema_id][0])){
279
+ $time = $all_post_meta['saswp_event_schema_end_time_'.$schema_id][0];
280
+ }
281
+
282
+ $input1['endDate'] = saswp_format_date_time($date, $time);
283
+
284
+ }
285
+
286
+
287
+ $performer = get_post_meta($schema_post_id, 'performer_'.$schema_id, true);
288
+
289
+ $performer_arr = array();
290
+
291
+ if(!empty($performer)){
292
+
293
+ foreach($performer as $val){
294
+
295
+ $supply_data = array();
296
+ $supply_data['@type'] = $val['saswp_event_performer_type'];
297
+ $supply_data['name'] = $val['saswp_event_performer_name'];
298
+ $supply_data['url'] = $val['saswp_event_performer_url'];
299
+
300
+ $performer_arr[] = $supply_data;
301
+ }
302
+
303
+ $input1['performer'] = $performer_arr;
304
+
305
+ }
306
+
307
+
308
+ return $input1;
309
+
310
+
311
+ }
312
+
313
+ function saswp_course_schema_markup($schema_id, $schema_post_id, $all_post_meta){
314
+
315
+ $input1 = array();
316
+
317
+ $input1 = array(
318
+ '@context' => saswp_context_url(),
319
+ '@type' => 'Course' ,
320
+ '@id' => trailingslashit(get_permalink()).'#course',
321
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_course_name_'.$schema_id, 'saswp_array'),
322
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_course_description_'.$schema_id, 'saswp_array'),
323
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_course_url_'.$schema_id, 'saswp_array'),
324
+ 'datePublished' => isset($all_post_meta['saswp_course_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_course_date_published_'.$schema_id][0])):'',
325
+ 'dateModified' => isset($all_post_meta['saswp_course_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_course_date_modified_'.$schema_id][0])):'',
326
+ 'provider' => array(
327
+ '@type' => 'Organization',
328
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_course_provider_name_'.$schema_id, 'saswp_array'),
329
+ 'sameAs' => saswp_remove_warnings($all_post_meta, 'saswp_course_sameas_'.$schema_id, 'saswp_array')
330
+ )
331
+ );
332
+
333
+ return $input1;
334
+
335
+ }
336
+
337
+ function saswp_software_app_schema_markup($schema_id, $schema_post_id, $all_post_meta){
338
+
339
+ $input1 = array();
340
+
341
+
342
+ $input1 = array(
343
+ '@context' => saswp_context_url(),
344
+ '@type' => 'SoftwareApplication',
345
+ '@id' => trailingslashit(get_permalink()).'#softwareapplication',
346
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_name_'.$schema_id, 'saswp_array'),
347
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_description_'.$schema_id, 'saswp_array'),
348
+ 'operatingSystem' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_operating_system_'.$schema_id, 'saswp_array'),
349
+ 'applicationCategory' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_application_category_'.$schema_id, 'saswp_array'),
350
+ 'offers' => array(
351
+ '@type' => 'Offer',
352
+ 'price' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_price_'.$schema_id, 'saswp_array'),
353
+ 'priceCurrency' => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_price_currency_'.$schema_id, 'saswp_array'),
354
+ ),
355
+ 'datePublished' => isset($all_post_meta['saswp_software_schema_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_software_schema_date_published_'.$schema_id][0])):'',
356
+ 'dateModified' => isset($all_post_meta['saswp_software_schema_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_software_schema_date_modified_'.$schema_id][0])):'',
357
+
358
+ );
359
+
360
+ $soft_image = get_post_meta( get_the_ID(), 'saswp_software_schema_image_'.$schema_id.'_detail',true);
361
+
362
+ if(!(empty($soft_image))){
363
+
364
+ $input1['image']['@type'] = 'ImageObject';
365
+ $input1['image']['url'] = isset($soft_image['thumbnail']) ? esc_url($soft_image['thumbnail']):'';
366
+ $input1['image']['height'] = isset($soft_image['width']) ? esc_attr($soft_image['width']) :'';
367
+ $input1['image']['width'] = isset($soft_image['height']) ? esc_attr($soft_image['height']) :'';
368
+
369
+ }
370
+
371
+ if(saswp_remove_warnings($all_post_meta, 'saswp_software_schema_enable_rating_'.$schema_id, 'saswp_array') == 1){
372
+
373
+ $input1['aggregateRating'] = array(
374
+ "@type" => "AggregateRating",
375
+ "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_rating_'.$schema_id, 'saswp_array'),
376
+ "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_software_schema_rating_count_'.$schema_id, 'saswp_array')
377
+ );
378
+ }
379
+
380
+
381
+ return $input1;
382
+
383
+ }
384
+
385
+ function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta){
386
+
387
+ $input1 = array();
388
+
389
+ $recipe_logo = get_post_meta( get_the_ID(), 'saswp_recipe_organization_logo_'.$schema_id.'_detail',true);
390
+ $recipe_image = get_post_meta( get_the_ID(), 'saswp_recipe_image_'.$schema_id.'_detail',true);
391
+ $recipe_author_image = get_post_meta( get_the_ID(), 'saswp_recipe_author_image_'.$schema_id.'_detail',true);
392
+
393
+ $ingredient = array();
394
+ $instruction = array();
395
+
396
+ if(isset($all_post_meta['saswp_recipe_ingredient_'.$schema_id])){
397
+
398
+ $explod = explode(';', $all_post_meta['saswp_recipe_ingredient_'.$schema_id][0]);
399
+
400
+ if($explod){
401
+
402
+ foreach ($explod as $val){
403
+
404
+ $ingredient[] = $val;
405
+
406
+ }
407
+
408
+ }
409
+
410
+
411
+
412
+ }
413
+
414
+ if(isset($all_post_meta['saswp_recipe_instructions_'.$schema_id])){
415
+
416
+ $explod = explode(';', $all_post_meta['saswp_recipe_instructions_'.$schema_id][0]);
417
+
418
+ if($explod){
419
+
420
+ foreach ($explod as $val){
421
+
422
+ $instruction[] = array(
423
+ '@type' => "HowToStep",
424
+ 'text' => $val,
425
+ );
426
+
427
+ }
428
+
429
+ }
430
+
431
+ }
432
+
433
+ $input1 = array(
434
+ '@context' => saswp_context_url(),
435
+ '@type' => 'Recipe' ,
436
+ '@id' => trailingslashit(get_permalink()).'#recipe',
437
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_url_'.$schema_id, 'saswp_array'),
438
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_name_'.$schema_id, 'saswp_array'),
439
+ 'image' =>array(
440
+ '@type' => 'ImageObject',
441
+ 'url' => saswp_remove_warnings( $recipe_image, 'thumbnail', 'saswp_string'),
442
+ 'width' => saswp_remove_warnings( $recipe_image, 'width', 'saswp_string'),
443
+ 'height' => saswp_remove_warnings( $recipe_image , 'height', 'saswp_string'),
444
+ ),
445
+ 'author' => array(
446
+ '@type' => 'Person',
447
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_author_name_'.$schema_id, 'saswp_array'),
448
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_author_description_'.$schema_id, 'saswp_array'),
449
+ 'Image' => array(
450
+ '@type' => 'ImageObject',
451
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_author_image_'.$schema_id, 'saswp_array'),
452
+ 'height' => saswp_remove_warnings($recipe_author_image, 'height', 'saswp_string'),
453
+ 'width' => saswp_remove_warnings($recipe_author_image, 'width', 'saswp_string')
454
+ ),
455
+ ),
456
+
457
+
458
+ 'prepTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_preptime_'.$schema_id, 'saswp_array'),
459
+ 'cookTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_cooktime_'.$schema_id, 'saswp_array'),
460
+ 'totalTime' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_totaltime_'.$schema_id, 'saswp_array'),
461
+ 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_keywords_'.$schema_id, 'saswp_array'),
462
+ 'recipeYield' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_recipeyield_'.$schema_id, 'saswp_array'),
463
+ 'recipeCategory' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_category_'.$schema_id, 'saswp_array'),
464
+ 'recipeCuisine' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_cuisine_'.$schema_id, 'saswp_array'),
465
+ 'nutrition' => array(
466
+ '@type' => "NutritionInformation",
467
+ 'calories' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_nutrition_'.$schema_id, 'saswp_array'),
468
+ ),
469
+ 'recipeIngredient' => $ingredient,
470
+ 'recipeInstructions' => $instruction,
471
+ 'datePublished' => isset($all_post_meta['saswp_recipe_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_recipe_date_published_'.$schema_id][0])):'',
472
+ 'dateModified' => isset($all_post_meta['saswp_recipe_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_recipe_date_modified_'.$schema_id][0])):'',
473
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_description_'.$schema_id, 'saswp_array'),
474
+ 'mainEntity' => array(
475
+ '@type' => 'WebPage',
476
+ '@id' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_main_entity_'.$schema_id, 'saswp_array'),
477
+ 'publisher' => array(
478
+ '@type' => 'Organization',
479
+ 'logo' => array(
480
+ '@type' => 'ImageObject',
481
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_organization_logo_'.$schema_id, 'saswp_array'),
482
+ 'width' => saswp_remove_warnings($recipe_logo, 'width', 'saswp_string'),
483
+ 'height' => saswp_remove_warnings($recipe_logo, 'height', 'saswp_string'),
484
+ ),
485
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_recipe_organization_name_'.$schema_id, 'saswp_array'),
486
+ ),
487
+ ),
488
+
489
+
490
+ );
491
+
492
+ if(saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_name_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_thumbnailurl_'.$schema_id, 'saswp_array') !='' && saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_description_'.$schema_id, 'saswp_array') !=''){
493
+
494
+ $input1['video']['@type'] = 'VideoObject';
495
+ $input1['video']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_name_'.$schema_id, 'saswp_array');
496
+ $input1['video']['description'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_description_'.$schema_id, 'saswp_array');
497
+ $input1['video']['thumbnailUrl'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_thumbnailurl_'.$schema_id, 'saswp_array');
498
+ $input1['video']['contentUrl'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_contenturl_'.$schema_id, 'saswp_array');
499
+ $input1['video']['embedUrl'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_embedurl_'.$schema_id, 'saswp_array');
500
+ $input1['video']['uploadDate'] = isset($all_post_meta['saswp_recipe_video_upload_date_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_recipe_video_upload_date_'.$schema_id][0])):'';
501
+ $input1['video']['duration'] = saswp_remove_warnings($all_post_meta, 'saswp_recipe_video_duration_'.$schema_id, 'saswp_array');
502
+ }
503
+
504
+ if(saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_review_count_'.$schema_id, 'saswp_array')){
505
+
506
+ $input1['aggregateRating'] = array(
507
+ "@type" => "AggregateRating",
508
+ "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_rating_'.$schema_id, 'saswp_array'),
509
+ "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_recipe_schema_review_count_'.$schema_id, 'saswp_array')
510
+ );
511
+ }
512
+
513
+ return $input1;
514
+
515
+ }
516
+
517
+ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta){
518
+
519
+ $input1 = array();
520
+
521
+ $product_image = get_post_meta( get_the_ID(), 'saswp_product_schema_image_'.$schema_id.'_detail',true);
522
+ $input1 = array(
523
+ '@context' => saswp_context_url(),
524
+ '@type' => 'Product',
525
+ '@id' => trailingslashit(get_permalink()).'#product',
526
+ 'url' => trailingslashit(get_permalink()),
527
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_name_'.$schema_id, 'saswp_array'),
528
+ 'sku' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_sku_'.$schema_id, 'saswp_array'),
529
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_description_'.$schema_id, 'saswp_array'),
530
+ 'image' =>array(
531
+ '@type' => 'ImageObject',
532
+ 'url' => saswp_remove_warnings($product_image, 'thumbnail', 'saswp_string'),
533
+ 'width' => saswp_remove_warnings($product_image, 'width', 'saswp_string'),
534
+ 'height' => saswp_remove_warnings($product_image, 'height', 'saswp_string'),
535
+ ),
536
+ 'offers' => array(
537
+ '@type' => 'Offer',
538
+ 'availability' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_availability_'.$schema_id, 'saswp_array'),
539
+ 'itemCondition' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_condition_'.$schema_id, 'saswp_array'),
540
+ 'price' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_price_'.$schema_id, 'saswp_array'),
541
+ 'priceCurrency' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_currency_'.$schema_id, 'saswp_array'),
542
+ 'url' => trailingslashit(get_permalink()),
543
+ 'priceValidUntil' => isset($all_post_meta['saswp_product_schema_priceValidUntil_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_product_schema_priceValidUntil_'.$schema_id][0])):'',
544
+ ),
545
+ 'brand' => array('@type' => 'Thing',
546
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_brand_name_'.$schema_id, 'saswp_array'),
547
+ )
548
+ );
549
+
550
+ if(isset($all_post_meta['saswp_product_schema_seller_'.$schema_id])){
551
+ $input1['offers']['seller']['@type'] = 'Organization';
552
+ $input1['offers']['seller']['name'] = esc_attr($all_post_meta['saswp_product_schema_seller_'.$schema_id][0]);
553
+ }
554
+ if(isset($all_post_meta['saswp_product_schema_gtin8_'.$schema_id])){
555
+ $input1['gtin8'] = esc_attr($all_post_meta['saswp_product_schema_gtin8_'.$schema_id][0]);
556
+ }
557
+ if(isset($all_post_meta['saswp_product_schema_mpn_'.$schema_id])){
558
+ $input1['mpn'] = esc_attr($all_post_meta['saswp_product_schema_mpn_'.$schema_id][0]);
559
+ }
560
+
561
+ if(saswp_remove_warnings($all_post_meta, 'saswp_product_schema_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_product_schema_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_product_schema_review_count_'.$schema_id, 'saswp_array')){
562
+
563
+ $input1['aggregateRating'] = array(
564
+ "@type" => "AggregateRating",
565
+ "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_rating_'.$schema_id, 'saswp_array'),
566
+ "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_review_count_'.$schema_id, 'saswp_array')
567
+ );
568
+ }
569
+
570
+
571
+ $itinerary = get_post_meta($schema_post_id, 'product_reviews_'.$schema_id, true);
572
+
573
+ $itinerary_arr = array();
574
+
575
+ if(!empty($itinerary)){
576
+
577
+ foreach($itinerary as $review){
578
+
579
+ $review_fields = array();
580
+
581
+ $review_fields['@type'] = 'Review';
582
+ $review_fields['author'] = esc_attr($review['saswp_product_reviews_reviewer_name']);
583
+ $review_fields['datePublished'] = esc_html($review['saswp_product_reviews_created_date']);
584
+ $review_fields['description'] = esc_textarea($review['saswp_product_reviews_text']);
585
+
586
+ if(is_int($review['saswp_product_reviews_reviewer_rating'])){
587
+
588
+ $review_fields['reviewRating']['@type'] = 'Rating';
589
+ $review_fields['reviewRating']['bestRating'] = '5';
590
+ $review_fields['reviewRating']['ratingValue'] = esc_attr($review['saswp_product_reviews_reviewer_rating']);
591
+ $review_fields['reviewRating']['worstRating'] = '1';
592
+
593
+ }
594
+
595
+ $itinerary_arr[] = $review_fields;
596
+ }
597
+ $input1['review'] = $itinerary_arr;
598
+ }
599
+
600
+ $service = new saswp_output_service();
601
+ $product_details = $service->saswp_woocommerce_product_details(get_the_ID());
602
+
603
+
604
+ if(!empty($product_details['product_reviews'])){
605
+
606
+ $reviews = array();
607
+
608
+ foreach ($product_details['product_reviews'] as $review){
609
+
610
+ $review_fields = array();
611
+
612
+ $review_fields['@type'] = 'Review';
613
+ $review_fields['author'] = esc_attr($review['author']);
614
+ $review_fields['datePublished'] = esc_html($review['datePublished']);
615
+ $review_fields['description'] = $review['description'];
616
+
617
+ if(isset($review['reviewRating']) && $review['reviewRating'] !=''){
618
+
619
+ $review_fields['reviewRating']['@type'] = 'Rating';
620
+ $review_fields['reviewRating']['bestRating'] = '5';
621
+ $review_fields['reviewRating']['ratingValue'] = esc_attr($review['reviewRating']);
622
+ $review_fields['reviewRating']['worstRating'] = '1';
623
+
624
+ }
625
+
626
+ $reviews[] = $review_fields;
627
+
628
+ }
629
+ $input1['review'] = $reviews;
630
+ }
631
+
632
+ return $input1;
633
+
634
+ }
635
+
636
+ function saswp_local_business_schema_markup($schema_id, $schema_post_id, $all_post_meta){
637
+
638
+ $input1 = array();
639
+
640
+ $operation_days = explode( "rn", esc_html( stripslashes(saswp_remove_warnings($all_post_meta, 'saswp_dayofweek_'.$schema_id, 'saswp_array'))) );;
641
+ $business_sub_name = '';
642
+ $business_type = saswp_remove_warnings($all_post_meta, 'saswp_business_type_'.$schema_id, 'saswp_array');
643
+ $post_specific_obj = new saswp_post_specific();
644
+
645
+ if(array_key_exists($business_type, $post_specific_obj->_local_sub_business)){
646
+
647
+ $check_business_type = $post_specific_obj->_local_sub_business[$business_type];
648
+
649
+ if(!empty($check_business_type)){
650
+
651
+ $business_sub_name = saswp_remove_warnings($all_post_meta, 'saswp_business_name_'.$schema_id, 'saswp_array');
652
+
653
+ }
654
+
655
+ }
656
+
657
+ if($business_sub_name){
658
+
659
+ $local_business = $business_sub_name;
660
+
661
+ }else if($business_type){
662
+
663
+ $local_business = $business_type;
664
+
665
+ }else{
666
+
667
+ $local_business = 'LocalBusiness';
668
+
669
+ }
670
+
671
+ $local_image = get_post_meta( $schema_post_id, 'local_business_logo_'.$schema_id.'_detail',true);
672
+
673
+ $input1 = array(
674
+ '@context' => saswp_context_url(),
675
+ '@type' => $local_business ,
676
+ '@id' => ((isset($all_post_meta['local_business_id_'.$schema_id][0]) && $all_post_meta['local_business_id_'.$schema_id][0] !='') ? $all_post_meta['local_business_id_'.$schema_id][0] : trailingslashit(get_permalink()).'#'.strtolower($local_business)),
677
+ 'name' => saswp_remove_warnings($all_post_meta, 'local_business_name_'.$schema_id, 'saswp_array'),
678
+ 'url' => saswp_remove_warnings($all_post_meta, 'local_business_name_url_'.$schema_id, 'saswp_array'),
679
+ 'description' => saswp_remove_warnings($all_post_meta, 'local_business_description_'.$schema_id, 'saswp_array'),
680
+ 'image' => array(
681
+ '@type' => 'ImageObject',
682
+ 'url' => saswp_remove_warnings($local_image, 'thumbnail', 'saswp_string'),
683
+ 'width' => saswp_remove_warnings($local_image, 'width', 'saswp_string'),
684
+ 'height' => saswp_remove_warnings($local_image, 'height', 'saswp_string'),
685
+ ),
686
+ 'address' => array(
687
+ "@type" => "PostalAddress",
688
+ "streetAddress" => saswp_remove_warnings($all_post_meta, 'local_street_address_'.$schema_id, 'saswp_array'),
689
+ "addressLocality" => saswp_remove_warnings($all_post_meta, 'local_city_'.$schema_id, 'saswp_array'),
690
+ "addressRegion" => saswp_remove_warnings($all_post_meta, 'local_state_'.$schema_id, 'saswp_array'),
691
+ "postalCode" => saswp_remove_warnings($all_post_meta, 'local_postal_code_'.$schema_id, 'saswp_array'),
692
+ ),
693
+ 'telephone' => saswp_remove_warnings($all_post_meta, 'local_phone_'.$schema_id, 'saswp_array'),
694
+ 'openingHours' => $operation_days,
695
+ );
696
+
697
+ if(isset($all_post_meta['local_price_range_'.$schema_id][0])){
698
+ $input1['priceRange'] = esc_attr($all_post_meta['local_price_range_'.$schema_id][0]);
699
+ }
700
+
701
+ if(isset($all_post_meta['local_accepts_reservations_'.$schema_id][0])){
702
+ $input1['acceptsReservations'] = esc_attr($all_post_meta['local_price_accepts_reservations_'.$schema_id][0]);
703
+ }
704
+
705
+ if(isset($all_post_meta['local_serves_cuisine_'.$schema_id][0])){
706
+ $input1['servesCuisine'] = esc_attr($all_post_meta['local_serves_cuisine_'.$schema_id][0]);
707
+ }
708
+
709
+ if(isset($all_post_meta['local_area_served_'.$schema_id][0])){
710
+
711
+ $area_served = explode(',', $all_post_meta['local_area_served_'.$schema_id][0]);
712
+
713
+ $input1['areaServed'] = $area_served;
714
+
715
+ }
716
+
717
+ //social fields starts here
718
+
719
+ $local_social = array();
720
+
721
+ if(isset($all_post_meta['local_facebook_'.$schema_id][0]) && $all_post_meta['local_facebook_'.$schema_id][0] !=''){
722
+ $local_social[] = esc_url($all_post_meta['local_facebook_'.$schema_id][0]);
723
+ }
724
+ if(isset($all_post_meta['local_twitter_'.$schema_id][0]) && $all_post_meta['local_twitter_'.$schema_id][0] !=''){
725
+ $local_social[] = esc_url($all_post_meta['local_twitter_'.$schema_id][0]);
726
+ }
727
+ if(isset($all_post_meta['local_instagram_'.$schema_id][0]) && $all_post_meta['local_instagram_'.$schema_id][0] !=''){
728
+ $local_social[] = esc_url($all_post_meta['local_instagram_'.$schema_id][0]);
729
+ }
730
+ if(isset($all_post_meta['local_pinterest_'.$schema_id][0]) && $all_post_meta['local_pinterest_'.$schema_id][0] !=''){
731
+ $local_social[] = esc_url($all_post_meta['local_pinterest_'.$schema_id][0]);
732
+ }
733
+ if(isset($all_post_meta['local_linkedin_'.$schema_id][0]) && $all_post_meta['local_linkedin_'.$schema_id][0] !=''){
734
+ $local_social[] = esc_url($all_post_meta['local_linkedin_'.$schema_id][0]);
735
+ }
736
+ if(isset($all_post_meta['local_soundcloud_'.$schema_id][0]) && $all_post_meta['local_soundcloud_'.$schema_id][0] !=''){
737
+ $local_social[] = esc_url($all_post_meta['local_soundcloud_'.$schema_id][0]);
738
+ }
739
+ if(isset($all_post_meta['local_tumblr_'.$schema_id][0]) && $all_post_meta['local_tumblr_'.$schema_id][0] !=''){
740
+ $local_social[] = esc_url($all_post_meta['local_tumblr_'.$schema_id][0]);
741
+ }
742
+ if(isset($all_post_meta['local_youtube_'.$schema_id][0]) && $all_post_meta['local_youtube_'.$schema_id][0] !=''){
743
+ $local_social[] = esc_url($all_post_meta['local_youtube_'.$schema_id][0]);
744
+ }
745
+
746
+ if(!empty($local_social)){
747
+ $input1['sameAs'] = $local_social;
748
+ }
749
+ //social fields ends here
750
+
751
+ if(isset($all_post_meta['local_menu_'.$schema_id][0])){
752
+ $input1['hasMenu'] = esc_url($all_post_meta['local_menu_'.$schema_id][0]);
753
+ }
754
+
755
+ if(isset($all_post_meta['local_hasmap_'.$schema_id][0])){
756
+ $input1['hasMap'] = esc_url($all_post_meta['local_hasmap_'.$schema_id][0]);
757
+ }
758
+
759
+ if(isset($all_post_meta['local_latitude_'.$schema_id][0]) && isset($all_post_meta['local_longitude_'.$schema_id][0])){
760
+
761
+ $input1['geo']['@type'] = 'GeoCoordinates';
762
+ $input1['geo']['latitude'] = $all_post_meta['local_latitude_'.$schema_id][0];
763
+ $input1['geo']['longitude'] = $all_post_meta['local_longitude_'.$schema_id][0];
764
+
765
+ }
766
+
767
+ if(isset($all_post_meta['local_enable_rating_'.$schema_id]) && saswp_remove_warnings($all_post_meta, 'local_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'local_review_count_'.$schema_id, 'saswp_array')){
768
+
769
+ $input1['aggregateRating'] = array(
770
+ "@type" => "AggregateRating",
771
+ "ratingValue" => saswp_remove_warnings($all_post_meta, 'local_rating_'.$schema_id, 'saswp_array'),
772
+ "reviewCount" => saswp_remove_warnings($all_post_meta, 'local_review_count_'.$schema_id, 'saswp_array')
773
+ );
774
+ }
775
+
776
+ return $input1;
777
+ }
778
+
779
+ function saswp_video_game_schema_markup($schema_id, $schema_post_id, $all_post_meta){
780
+
781
+ $input1 = array();
782
+
783
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_vg_schema_image_'.$schema_id.'_detail',true);
784
+
785
+ $input1['@context'] = saswp_context_url();
786
+ $input1['@type'] = 'VideoGame';
787
+ $input1['@id'] = trailingslashit(get_permalink()).'#VideoGame';
788
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_name_'.$schema_id, 'saswp_array');
789
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_url_'.$schema_id, 'saswp_array');
790
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_description_'.$schema_id, 'saswp_array');
791
+
792
+ if(!(empty($howto_image))){
793
+
794
+ $input1['image']['@type'] = 'ImageObject';
795
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
796
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
797
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
798
+
799
+ }
800
+
801
+ $input1['operatingSystem'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_operating_system_'.$schema_id, 'saswp_array');
802
+ $input1['applicationCategory'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_application_category_'.$schema_id, 'saswp_array');
803
+
804
+ $input1['author']['@type'] = 'Organization';
805
+ $input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_author_name_'.$schema_id, 'saswp_array');
806
+
807
+ $input1['offers']['@type'] = 'Offer';
808
+ $input1['offers']['price'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_price_'.$schema_id, 'saswp_array');
809
+ $input1['offers']['priceCurrency'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_price_currency_'.$schema_id, 'saswp_array');
810
+ $input1['offers']['availability'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_price_availability_'.$schema_id, 'saswp_array');
811
+
812
+
813
+ $input1['publisher'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_publisher_'.$schema_id, 'saswp_array');
814
+ $input1['genre'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_genre_'.$schema_id, 'saswp_array');
815
+ $input1['processorRequirements'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_processor_requirements_'.$schema_id, 'saswp_array');
816
+ $input1['memoryRequirements'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_memory_requirements_'.$schema_id, 'saswp_array');
817
+ $input1['storageRequirements'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_storage_requirements_'.$schema_id, 'saswp_array');
818
+ $input1['gamePlatform'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_game_platform_'.$schema_id, 'saswp_array');
819
+ $input1['cheatCode'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_cheat_code_'.$schema_id, 'saswp_array');
820
+
821
+ if( saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_review_count_'.$schema_id, 'saswp_array')){
822
+
823
+ $input1['aggregateRating']['@type'] = 'AggregateRating';
824
+ $input1['aggregateRating']['ratingValue'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_rating_'.$schema_id, 'saswp_array');
825
+ $input1['aggregateRating']['ratingCount'] = saswp_remove_warnings($all_post_meta, 'saswp_vg_schema_review_count_'.$schema_id, 'saswp_array');
826
+
827
+ }
828
+
829
+ return $input1;
830
+ }
831
+
832
+ function saswp_music_playlist_schema_markup($schema_id, $schema_post_id, $all_post_meta){
833
+
834
+ $input1 = array();
835
+
836
+ $input1['@context'] = saswp_context_url();
837
+ $input1['@type'] = 'MusicPlaylist';
838
+ $input1['@id'] = trailingslashit(get_permalink()).'#MusicPlaylist';
839
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_music_playlist_url_'.$schema_id, 'saswp_array');
840
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_music_playlist_name_'.$schema_id, 'saswp_array');
841
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_music_playlist_description_'.$schema_id, 'saswp_array');
842
+
843
+ $faq_question = get_post_meta($schema_post_id, 'music_playlist_track_'.$schema_id, true);
844
+
845
+ $faq_question_arr = array();
846
+
847
+ if(!empty($faq_question)){
848
+
849
+ $input1['numTracks'] = count($faq_question);
850
+
851
+ foreach($faq_question as $val){
852
+
853
+ $supply_data = array();
854
+ $supply_data['@type'] = 'MusicRecording';
855
+ $supply_data['byArtist'] = $val['saswp_music_playlist_track_artist'];
856
+ $supply_data['duration'] = $val['saswp_music_playlist_track_duration'];
857
+ $supply_data['inAlbum'] = $val['saswp_music_playlist_track_inalbum'];
858
+ $supply_data['name'] = $val['saswp_music_playlist_track_name'];
859
+ $supply_data['url'] = $val['saswp_music_playlist_track_url'];
860
+
861
+ $faq_question_arr[] = $supply_data;
862
+ }
863
+ $input1['track'] = $faq_question_arr;
864
+ }
865
+
866
+ return $input1;
867
+ }
868
+
869
+ function saswp_person_schema_markup($schema_id, $schema_post_id, $all_post_meta){
870
+
871
+ $input1 = array();
872
+
873
+ $image = get_post_meta( get_the_ID(), 'saswp_trip_schema_image_'.$schema_id.'_detail',true);
874
+
875
+ $input1['@context'] = saswp_context_url();
876
+ $input1['@type'] = 'Person';
877
+ $input1['@id'] = trailingslashit(get_permalink()).'#Person';
878
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_url_'.$schema_id, 'saswp_array');
879
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_name_'.$schema_id, 'saswp_array');
880
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_description_'.$schema_id, 'saswp_array');
881
+ $input1['gender'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_gender_'.$schema_id, 'saswp_array');
882
+ $input1['birthDate'] = isset($all_post_meta['saswp_person_schema_date_of_birth_'.$schema_id][0])&& $all_post_meta['saswp_person_schema_date_of_birth_'.$schema_id][0] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_person_schema_date_of_birth_'.$schema_id][0])):'';
883
+ $input1['nationality'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_nationality_'.$schema_id, 'saswp_array');
884
+ $input1['jobTitle'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_job_title_'.$schema_id, 'saswp_array');
885
+
886
+ $input1['address']['@type'] = 'PostalAddress';
887
+ $input1['address']['streetAddress'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_street_address_'.$schema_id, 'saswp_array');
888
+ $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_country_'.$schema_id, 'saswp_array');
889
+ $input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_locality_'.$schema_id, 'saswp_array');
890
+ $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_region_'.$schema_id, 'saswp_array');
891
+ $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_postal_code_'.$schema_id, 'saswp_array');
892
+
893
+ $input1['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_telephone_'.$schema_id, 'saswp_array');
894
+ $input1['email'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_email_'.$schema_id, 'saswp_array');
895
+
896
+ if(!(empty($image))){
897
+
898
+ $input1['image']['@type'] = 'ImageObject';
899
+ $input1['image']['url'] = isset($image['thumbnail']) ? esc_url($image['thumbnail']):'';
900
+ $input1['image']['height'] = isset($image['width']) ? esc_attr($image['width']) :'';
901
+ $input1['image']['width'] = isset($image['height']) ? esc_attr($image['height']) :'';
902
+
903
+ }
904
+
905
+ return $input1;
906
+ }
907
+
908
+ function saswp_trip_schema_markup($schema_id, $schema_post_id, $all_post_meta){
909
+
910
+ $input1 = array();
911
+
912
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_trip_schema_image_'.$schema_id.'_detail',true);
913
+
914
+ $input1['@context'] = saswp_context_url();
915
+ $input1['@type'] = 'Trip';
916
+ $input1['@id'] = trailingslashit(get_permalink()).'#Trip';
917
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_url_'.$schema_id, 'saswp_array');
918
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_name_'.$schema_id, 'saswp_array');
919
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_description_'.$schema_id, 'saswp_array');
920
+
921
+ if(!(empty($howto_image))){
922
+
923
+ $input1['image']['@type'] = 'ImageObject';
924
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
925
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
926
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
927
+
928
+ }
929
+
930
+ $itinerary = get_post_meta($schema_post_id, 'trip_itinerary_'.$schema_id, true);
931
+
932
+ $itinerary_arr = array();
933
+
934
+ if(!empty($itinerary)){
935
+
936
+ foreach($itinerary as $val){
937
+
938
+ $supply_data = array();
939
+ $supply_data['@type'] = $val['saswp_trip_itinerary_type'];
940
+ $supply_data['name'] = $val['saswp_trip_itinerary_name'];
941
+ $supply_data['description'] = $val['saswp_trip_itinerary_description'];
942
+ $supply_data['url'] = $val['saswp_trip_itinerary_url'];
943
+
944
+
945
+ $itinerary_arr[] = $supply_data;
946
+ }
947
+ $input1['itinerary'] = $itinerary_arr;
948
+ }
949
+
950
+
951
+ return $input1;
952
+ }
953
+
954
+ function saswp_faq_schema_markup($schema_id, $schema_post_id, $all_post_meta){
955
+
956
+ $input1 = array();
957
+
958
+ $input1['@context'] = saswp_context_url();
959
+ $input1['@type'] = 'FAQPage';
960
+ $input1['@id'] = trailingslashit(get_permalink()).'#FAQPage';
961
+
962
+ $input1['headline'] = saswp_remove_warnings($all_post_meta, 'saswp_faq_headline_'.$schema_id, 'saswp_array');
963
+ $input1['keywords'] = saswp_remove_warnings($all_post_meta, 'saswp_faq_keywords_'.$schema_id, 'saswp_array');
964
+ $input1['datePublished'] = isset($all_post_meta['saswp_faq_date_published_'.$schema_id][0])&& $all_post_meta['saswp_faq_date_published_'.$schema_id][0] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_faq_date_published_'.$schema_id][0])):'';
965
+ $input1['dateModified'] = isset($all_post_meta['saswp_faq_date_modified_'.$schema_id][0])&& $all_post_meta['saswp_faq_date_modified_'.$schema_id][0] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_faq_date_modified_'.$schema_id][0])):'';
966
+ $input1['dateCreated'] = isset($all_post_meta['saswp_faq_date_created_'.$schema_id][0])&& $all_post_meta['saswp_faq_date_created_'.$schema_id][0] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_faq_date_created_'.$schema_id][0])):'';
967
+
968
+ if(isset($all_post_meta['saswp_faq_author_'.$schema_id][0])){
969
+ $input1['author']['@type'] = 'Person';
970
+ $input1['author']['name'] = $all_post_meta['saswp_faq_author_'.$schema_id][0];
971
+ }
972
+
973
+ $faq_question = get_post_meta($schema_post_id, 'faq_question_'.$schema_id, true);
974
+
975
+ $faq_question_arr = array();
976
+
977
+ if(!empty($faq_question)){
978
+
979
+ foreach($faq_question as $val){
980
+
981
+ $supply_data = array();
982
+ $supply_data['@type'] = 'Question';
983
+ $supply_data['name'] = $val['saswp_faq_question_name'];
984
+ $supply_data['acceptedAnswer']['@type'] = 'Answer';
985
+ $supply_data['acceptedAnswer']['text'] = $val['saswp_faq_question_answer'];
986
+
987
+ $faq_question_arr[] = $supply_data;
988
+ }
989
+ $input1['mainEntity'] = $faq_question_arr;
990
+ }
991
+
992
+ return $input1;
993
+
994
+ }
995
+
996
+ function saswp_music_album_schema_markup($schema_id, $schema_post_id, $all_post_meta){
997
+
998
+ $input1 = array();
999
+
1000
+ $input1['@context'] = saswp_context_url();
1001
+ $input1['@type'] = 'MusicAlbum';
1002
+ $input1['@id'] = trailingslashit(get_permalink()).'#MusicAlbum';
1003
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_music_album_url_'.$schema_id, 'saswp_array');
1004
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_music_album_name_'.$schema_id, 'saswp_array');
1005
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_music_album_description_'.$schema_id, 'saswp_array');
1006
+ $input1['genre'] = saswp_remove_warnings($all_post_meta, 'saswp_music_album_genre_'.$schema_id, 'saswp_array');
1007
+
1008
+
1009
+ if(isset($all_post_meta['saswp_music_album_artist_'.$schema_id][0])){
1010
+
1011
+ $input1['byArtist']['@type'] = 'MusicGroup';
1012
+ $input1['byArtist']['name'] = $all_post_meta['saswp_music_album_artist_'.$schema_id][0];
1013
+
1014
+ }
1015
+
1016
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_music_album_image_'.$schema_id.'_detail',true);
1017
+
1018
+ if(!(empty($howto_image))){
1019
+
1020
+ $input1['image']['@type'] = 'ImageObject';
1021
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1022
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1023
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1024
+
1025
+ }
1026
+
1027
+ $faq_question = get_post_meta($schema_post_id, 'music_album_track_'.$schema_id, true);
1028
+
1029
+ $faq_question_arr = array();
1030
+
1031
+ if(!empty($faq_question)){
1032
+
1033
+ $input1['numTracks'] = count($faq_question);
1034
+
1035
+ foreach($faq_question as $val){
1036
+
1037
+ $supply_data = array();
1038
+ $supply_data['@type'] = 'MusicRecording';
1039
+ $supply_data['duration'] = $val['saswp_music_album_track_duration'];
1040
+ $supply_data['name'] = $val['saswp_music_album_track_name'];
1041
+ $supply_data['url'] = $val['saswp_music_album_track_url'];
1042
+ $faq_question_arr[] = $supply_data;
1043
+ }
1044
+ $input1['track'] = $faq_question_arr;
1045
+ }
1046
+
1047
+ return $input1;
1048
+ }
1049
+
1050
+ function saswp_job_posting_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1051
+
1052
+ $input1 = array();
1053
+
1054
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_jobposting_schema_ho_logo_'.$schema_id.'_detail',true);
1055
+
1056
+ $input1['@context'] = saswp_context_url();
1057
+ $input1['@type'] = 'JobPosting';
1058
+ $input1['@id'] = trailingslashit(get_permalink()).'#JobPosting';
1059
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_url_'.$schema_id, 'saswp_array');
1060
+ $input1['title'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_title_'.$schema_id, 'saswp_array');
1061
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_description_'.$schema_id, 'saswp_array');
1062
+ $input1['datePosted'] = isset($all_post_meta['saswp_jobposting_schema_dateposted_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_jobposting_schema_dateposted_'.$schema_id][0])):'';
1063
+ $input1['validThrough'] = isset($all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_jobposting_schema_validthrough_'.$schema_id][0])):'';
1064
+ $input1['employmentType'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_employment_type_'.$schema_id, 'saswp_array');
1065
+
1066
+ $input1['hiringOrganization']['@type'] = 'Organization';
1067
+ $input1['hiringOrganization']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_ho_name_'.$schema_id, 'saswp_array');
1068
+ $input1['hiringOrganization']['sameAs'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_ho_url_'.$schema_id, 'saswp_array');
1069
+
1070
+ if(!(empty($howto_image))){
1071
+
1072
+ $input1['hiringOrganization']['logo']['@type'] = 'ImageObject';
1073
+ $input1['hiringOrganization']['logo']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1074
+ $input1['hiringOrganization']['logo']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1075
+ $input1['hiringOrganization']['logo']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1076
+
1077
+ }
1078
+
1079
+ $input1['jobLocation']['@type'] = 'Place';
1080
+ $input1['jobLocation']['address']['@type'] = 'PostalAddress';
1081
+ $input1['jobLocation']['address']['streetAddress'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_street_address_'.$schema_id, 'saswp_array');
1082
+ $input1['jobLocation']['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_locality_'.$schema_id, 'saswp_array');
1083
+ $input1['jobLocation']['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_region_'.$schema_id, 'saswp_array');
1084
+ $input1['jobLocation']['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_country_'.$schema_id, 'saswp_array');
1085
+ $input1['jobLocation']['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_postalcode_'.$schema_id, 'saswp_array');
1086
+
1087
+
1088
+ $input1['baseSalary']['@type'] = 'MonetaryAmount';
1089
+ $input1['baseSalary']['currency'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_currency_'.$schema_id, 'saswp_array');
1090
+ $input1['baseSalary']['value']['@type'] = 'QuantitativeValue';
1091
+ $input1['baseSalary']['value']['value'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_value_'.$schema_id, 'saswp_array');
1092
+ $input1['baseSalary']['value']['unitText'] = saswp_remove_warnings($all_post_meta, 'saswp_jobposting_schema_bs_unittext_'.$schema_id, 'saswp_array');
1093
+
1094
+ return $input1;
1095
+
1096
+ }
1097
+
1098
+ function saswp_mosque_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1099
+
1100
+ $input1 = array();
1101
+
1102
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_mosque_schema_image_'.$schema_id.'_detail',true);
1103
+
1104
+ $input1['@context'] = saswp_context_url();
1105
+ $input1['@type'] = 'Mosque';
1106
+ $input1['@id'] = trailingslashit(get_permalink()).'#Mosque';
1107
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_url_'.$schema_id, 'saswp_array');
1108
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_name_'.$schema_id, 'saswp_array');
1109
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_description_'.$schema_id, 'saswp_array');
1110
+
1111
+ if(!(empty($howto_image))){
1112
+
1113
+ $input1['image']['@type'] = 'ImageObject';
1114
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1115
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1116
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1117
+
1118
+ }
1119
+
1120
+ $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_is_accesible_free_'.$schema_id, 'saswp_array');
1121
+ $input1['maximumAttendeeCapacity'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_maximum_a_capacity_'.$schema_id, 'saswp_array');
1122
+ $input1['hasMap'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_hasmap_'.$schema_id, 'saswp_array');
1123
+
1124
+ $input1['address']['@type'] = 'PostalAddress';
1125
+ $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_country_'.$schema_id, 'saswp_array');
1126
+ $input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_locality_'.$schema_id, 'saswp_array');
1127
+ $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_region_'.$schema_id, 'saswp_array');
1128
+ $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_mosque_schema_postal_code_'.$schema_id, 'saswp_array');
1129
+
1130
+ return $input1;
1131
+
1132
+ }
1133
+
1134
+ function saswp_church_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1135
+
1136
+ $input1 = array();
1137
+
1138
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_church_schema_image_'.$schema_id.'_detail',true);
1139
+
1140
+ $input1['@context'] = saswp_context_url();
1141
+ $input1['@type'] = 'Church';
1142
+ $input1['@id'] = trailingslashit(get_permalink()).'#Church';
1143
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_url_'.$schema_id, 'saswp_array');
1144
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_name_'.$schema_id, 'saswp_array');
1145
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_description_'.$schema_id, 'saswp_array');
1146
+
1147
+ if(!(empty($howto_image))){
1148
+
1149
+ $input1['image']['@type'] = 'ImageObject';
1150
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1151
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1152
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1153
+
1154
+ }
1155
+
1156
+ $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_is_acceesible_free_'.$schema_id, 'saswp_array');
1157
+ $input1['maximumAttendeeCapacity'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_maximum_a_capacity_'.$schema_id, 'saswp_array');
1158
+ $input1['hasMap'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_hasmap_'.$schema_id, 'saswp_array');
1159
+
1160
+ $input1['address']['@type'] = 'PostalAddress';
1161
+ $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_country_'.$schema_id, 'saswp_array');
1162
+ $input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_locality_'.$schema_id, 'saswp_array');
1163
+ $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_region_'.$schema_id, 'saswp_array');
1164
+ $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_church_schema_postal_code_'.$schema_id, 'saswp_array');
1165
+
1166
+ return $input1;
1167
+
1168
+ }
1169
+
1170
+ function saswp_hindu_temple_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1171
+
1172
+ $input1 = array();
1173
+
1174
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_hindutemple_schema_image_'.$schema_id.'_detail',true);
1175
+
1176
+ $input1['@context'] = saswp_context_url();
1177
+ $input1['@type'] = 'HinduTemple';
1178
+ $input1['@id'] = trailingslashit(get_permalink()).'#HinduTemple';
1179
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_url_'.$schema_id, 'saswp_array');
1180
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_name_'.$schema_id, 'saswp_array');
1181
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_description_'.$schema_id, 'saswp_array');
1182
+
1183
+ if(!(empty($howto_image))){
1184
+
1185
+ $input1['image']['@type'] = 'ImageObject';
1186
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1187
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1188
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1189
+
1190
+ }
1191
+
1192
+ $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_is_accesible_free_'.$schema_id, 'saswp_array');
1193
+ $input1['maximumAttendeeCapacity'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_maximum_a_capacity_'.$schema_id, 'saswp_array');
1194
+ $input1['hasMap'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_hasmap_'.$schema_id, 'saswp_array');
1195
+
1196
+ $input1['address']['@type'] = 'PostalAddress';
1197
+ $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_country_'.$schema_id, 'saswp_array');
1198
+ $input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_locality_'.$schema_id, 'saswp_array');
1199
+ $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_region_'.$schema_id, 'saswp_array');
1200
+ $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_hindutemple_schema_postal_code_'.$schema_id, 'saswp_array');
1201
+
1202
+ return $input1;
1203
+
1204
+ }
1205
+
1206
+ function saswp_lorh_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1207
+
1208
+ $input1 = array();
1209
+
1210
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_lorh_schema_image_'.$schema_id.'_detail',true);
1211
+
1212
+ $input1['@context'] = saswp_context_url();
1213
+ $input1['@type'] = 'LandmarksOrHistoricalBuildings';
1214
+ $input1['@id'] = trailingslashit(get_permalink()).'#LandmarksOrHistoricalBuildings';
1215
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_url_'.$schema_id, 'saswp_array');
1216
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_name_'.$schema_id, 'saswp_array');
1217
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_description_'.$schema_id, 'saswp_array');
1218
+
1219
+ if(!(empty($howto_image))){
1220
+
1221
+ $input1['image']['@type'] = 'ImageObject';
1222
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1223
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1224
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1225
+
1226
+ }
1227
+
1228
+ $input1['hasMap'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_hasmap_'.$schema_id, 'saswp_array');
1229
+ $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_is_acceesible_free_'.$schema_id, 'saswp_array');
1230
+ $input1['maximumAttendeeCapacity'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_maximum_a_capacity_'.$schema_id, 'saswp_array');
1231
+
1232
+ $input1['address']['@type'] = 'PostalAddress';
1233
+ $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_address_country_'.$schema_id, 'saswp_array');
1234
+ $input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_address_locality_'.$schema_id, 'saswp_array');
1235
+ $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_address_region_'.$schema_id, 'saswp_array');
1236
+ $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_lorh_schema_address_postal_code_'.$schema_id, 'saswp_array');
1237
+
1238
+ return $input1;
1239
+
1240
+ }
1241
+
1242
+ function saswp_tourist_attraction_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1243
+
1244
+ $input1 = array();
1245
+
1246
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_ta_schema_image_'.$schema_id.'_detail',true);
1247
+
1248
+ $input1['@context'] = saswp_context_url();
1249
+ $input1['@type'] = 'TouristAttraction';
1250
+ $input1['@id'] = trailingslashit(get_permalink()).'#TouristAttraction';
1251
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_url_'.$schema_id, 'saswp_array');
1252
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_name_'.$schema_id, 'saswp_array');
1253
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_description_'.$schema_id, 'saswp_array');
1254
+
1255
+ if(!(empty($howto_image))){
1256
+
1257
+ $input1['image']['@type'] = 'ImageObject';
1258
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1259
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1260
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1261
+
1262
+ }
1263
+
1264
+ $input1['isAccessibleForFree'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_is_acceesible_free_'.$schema_id, 'saswp_array');
1265
+
1266
+ $input1['address']['@type'] = 'PostalAddress';
1267
+ $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_address_country_'.$schema_id, 'saswp_array');
1268
+ $input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_address_locality_'.$schema_id, 'saswp_array');
1269
+ $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_address_region_'.$schema_id, 'saswp_array');
1270
+ $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_ta_schema_address_postal_code_'.$schema_id, 'saswp_array');
1271
+
1272
+
1273
+ return $input1;
1274
+
1275
+ }
1276
+
1277
+ function saswp_tourist_destination_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1278
+
1279
+ $input1 = array();
1280
+
1281
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_td_schema_image_'.$schema_id.'_detail',true);
1282
+
1283
+ $input1['@context'] = saswp_context_url();
1284
+ $input1['@type'] = 'TouristDestination';
1285
+ $input1['@id'] = trailingslashit(get_permalink()).'#TouristDestination';
1286
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_url_'.$schema_id, 'saswp_array');
1287
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_name_'.$schema_id, 'saswp_array');
1288
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_description_'.$schema_id, 'saswp_array');
1289
+
1290
+ if(!(empty($howto_image))){
1291
+
1292
+ $input1['image']['@type'] = 'ImageObject';
1293
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1294
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1295
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1296
+
1297
+ }
1298
+
1299
+
1300
+ $input1['address']['@type'] = 'PostalAddress';
1301
+ $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_address_country_'.$schema_id, 'saswp_array');
1302
+ $input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_address_locality_'.$schema_id, 'saswp_array');
1303
+ $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_address_region_'.$schema_id, 'saswp_array');
1304
+ $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_td_schema_address_postal_code_'.$schema_id, 'saswp_array');
1305
+
1306
+ return $input1;
1307
+ }
1308
+
1309
+ function saswp_apartment_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1310
+
1311
+ $input1 = array();
1312
+
1313
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_apartment_schema_image_'.$schema_id.'_detail',true);
1314
+
1315
+ $input1['@context'] = saswp_context_url();
1316
+ $input1['@type'] = 'Apartment';
1317
+ $input1['@id'] = trailingslashit(get_permalink()).'#Apartment';
1318
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_url_'.$schema_id, 'saswp_array');
1319
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_name_'.$schema_id, 'saswp_array');
1320
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_description_'.$schema_id, 'saswp_array');
1321
+ $input1['floorSize'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_floor_size_'.$schema_id, 'saswp_array');
1322
+
1323
+ if(!(empty($howto_image))){
1324
+
1325
+ $input1['image']['@type'] = 'ImageObject';
1326
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1327
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1328
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1329
+
1330
+ }
1331
+
1332
+ $input1['numberOfRooms'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_numberofrooms_'.$schema_id, 'saswp_array');
1333
+
1334
+ $input1['address']['@type'] = 'PostalAddress';
1335
+ $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_country_'.$schema_id, 'saswp_array');
1336
+ $input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_locality_'.$schema_id, 'saswp_array');
1337
+ $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_region_'.$schema_id, 'saswp_array');
1338
+ $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_postalcode_'.$schema_id, 'saswp_array');
1339
+
1340
+ $input1['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_apartment_schema_telephone_'.$schema_id, 'saswp_array');
1341
+
1342
+ if(isset($all_post_meta['saswp_apartment_schema_latitude_'.$schema_id][0]) && isset($all_post_meta['saswp_apartment_schema_longitude_'.$schema_id][0])){
1343
+
1344
+ $input1['geo']['@type'] = 'GeoCoordinates';
1345
+ $input1['geo']['latitude'] = $all_post_meta['saswp_apartment_schema_latitude_'.$schema_id][0];
1346
+ $input1['geo']['longitude'] = $all_post_meta['saswp_apartment_schema_longitude_'.$schema_id][0];
1347
+
1348
+ }
1349
+
1350
+ $itinerary = get_post_meta($schema_post_id, 'apartment_amenities_'.$schema_id, true);
1351
+
1352
+ $itinerary_arr = array();
1353
+
1354
+ if(!empty($itinerary)){
1355
+
1356
+ foreach($itinerary as $val){
1357
+
1358
+ $supply_data = array();
1359
+ $supply_data['@type'] = 'LocationFeatureSpecification';
1360
+ $supply_data['name'] = $val['saswp_apartment_amenities_name'];
1361
+
1362
+ $itinerary_arr[] = $supply_data;
1363
+ }
1364
+
1365
+ $input1['amenityFeature'] = $itinerary_arr;
1366
+ }
1367
+
1368
+ $add_property = get_post_meta($schema_post_id, 'additional_property_'.$schema_id, true);
1369
+
1370
+ $add_property_arr = array();
1371
+
1372
+ if(!empty($add_property)){
1373
+
1374
+ foreach($add_property as $val){
1375
+
1376
+ $supply_data = array();
1377
+ $supply_data['@type'] = 'PropertyValue';
1378
+ $supply_data['name'] = $val['saswp_apartment_additional_property_name'];
1379
+ $supply_data[$val['saswp_apartment_additional_property_code_type']] = $val['saswp_apartment_additional_property_code_value'];
1380
+ $supply_data['value'] = $val['saswp_apartment_additional_property_value'];
1381
+
1382
+ $add_property_arr[] = $supply_data;
1383
+ }
1384
+
1385
+ $input1['additionalProperty'] = $add_property_arr;
1386
+ }
1387
+
1388
+ return $input1;
1389
+
1390
+ }
1391
+
1392
+ function saswp_house_schema_makrup($schema_id, $schema_post_id, $all_post_meta){
1393
+
1394
+ $input1 = array();
1395
+
1396
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_house_schema_image_'.$schema_id.'_detail',true);
1397
+
1398
+ $input1['@context'] = saswp_context_url();
1399
+ $input1['@type'] = 'House';
1400
+ $input1['@id'] = trailingslashit(get_permalink()).'#House';
1401
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_url_'.$schema_id, 'saswp_array');
1402
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_name_'.$schema_id, 'saswp_array');
1403
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_description_'.$schema_id, 'saswp_array');
1404
+
1405
+ if(!(empty($howto_image))){
1406
+
1407
+ $input1['image']['@type'] = 'ImageObject';
1408
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1409
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1410
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1411
+
1412
+ }
1413
+
1414
+ $input1['petsAllowed'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_pets_allowed_'.$schema_id, 'saswp_array');
1415
+
1416
+ $input1['address']['@type'] = 'PostalAddress';
1417
+ $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_country_'.$schema_id, 'saswp_array');
1418
+ $input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_locality_'.$schema_id, 'saswp_array');
1419
+ $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_region_'.$schema_id, 'saswp_array');
1420
+ $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_postalcode_'.$schema_id, 'saswp_array');
1421
+
1422
+ $input1['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_telephone_'.$schema_id, 'saswp_array');
1423
+
1424
+ $input1['hasMap'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_hasmap_'.$schema_id, 'saswp_array');
1425
+ $input1['floorSize'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_floor_size_'.$schema_id, 'saswp_array');
1426
+ $input1['numberOfRooms'] = saswp_remove_warnings($all_post_meta, 'saswp_house_schema_no_of_rooms_'.$schema_id, 'saswp_array');
1427
+
1428
+ return $input1;
1429
+
1430
+ }
1431
+
1432
+ function saswp_single_family_residence_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1433
+
1434
+ $input1 = array();
1435
+
1436
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_sfr_schema_image_'.$schema_id.'_detail',true);
1437
+
1438
+ $input1['@context'] = saswp_context_url();
1439
+ $input1['@type'] = 'SingleFamilyResidence';
1440
+ $input1['@id'] = trailingslashit(get_permalink()).'#SingleFamilyResidence';
1441
+ $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_url_'.$schema_id, 'saswp_array');
1442
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_name_'.$schema_id, 'saswp_array');
1443
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_description_'.$schema_id, 'saswp_array');
1444
+
1445
+ if(!(empty($howto_image))){
1446
+
1447
+ $input1['image']['@type'] = 'ImageObject';
1448
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1449
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1450
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1451
+
1452
+ }
1453
+ $input1['numberOfRooms'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_numberofrooms_'.$schema_id, 'saswp_array');
1454
+ $input1['petsAllowed'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_pets_allowed_'.$schema_id, 'saswp_array');
1455
+
1456
+ $input1['address']['@type'] = 'PostalAddress';
1457
+ $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_country_'.$schema_id, 'saswp_array');
1458
+ $input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_locality_'.$schema_id, 'saswp_array');
1459
+ $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_region_'.$schema_id, 'saswp_array');
1460
+ $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_postalcode_'.$schema_id, 'saswp_array');
1461
+
1462
+ $input1['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_telephone_'.$schema_id, 'saswp_array');
1463
+ $input1['hasMap'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_hasmap_'.$schema_id, 'saswp_array');
1464
+ $input1['floorSize'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_floor_size_'.$schema_id, 'saswp_array');
1465
+ $input1['numberOfRooms'] = saswp_remove_warnings($all_post_meta, 'saswp_sfr_schema_no_of_rooms_'.$schema_id, 'saswp_array');
1466
+
1467
+ return $input1;
1468
+
1469
+ }
1470
+
1471
+ function saswp_tv_series_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1472
+
1473
+ $input1 = array();
1474
+
1475
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_tvseries_schema_image_'.$schema_id.'_detail',true);
1476
+
1477
+ $actor = get_post_meta($schema_post_id, 'tvseries_actor_'.$schema_id, true);
1478
+ $season = get_post_meta($schema_post_id, 'tvseries_season_'.$schema_id, true);
1479
+
1480
+ $input1['@context'] = saswp_context_url();
1481
+ $input1['@type'] = 'TVSeries';
1482
+ $input1['@id'] = trailingslashit(get_permalink()).'#TVSeries';
1483
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_name_'.$schema_id, 'saswp_array');
1484
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_description_'.$schema_id, 'saswp_array');
1485
+
1486
+ if(!(empty($howto_image))){
1487
+
1488
+ $input1['image']['@type'] = 'ImageObject';
1489
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1490
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1491
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1492
+
1493
+ }
1494
+
1495
+ $input1['author']['@type'] = 'Person';
1496
+ $input1['author']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_tvseries_schema_author_name_'.$schema_id, 'saswp_array');
1497
+
1498
+ $supply_arr = array();
1499
+ if(!empty($actor)){
1500
+
1501
+ foreach($actor as $val){
1502
+
1503
+ $supply_data = array();
1504
+ $supply_data['@type'] = 'Person';
1505
+ $supply_data['name'] = $val['saswp_tvseries_actor_name'];
1506
+
1507
+ $supply_arr[] = $supply_data;
1508
+ }
1509
+ $input1['actor'] = $supply_arr;
1510
+ }
1511
+
1512
+ $tool_arr = array();
1513
+ if(!empty($season)){
1514
+
1515
+ foreach($season as $val){
1516
+
1517
+ $supply_data = array();
1518
+ $supply_data['@type'] = 'TVSeason';
1519
+ $supply_data['datePublished'] = $val['saswp_tvseries_season_published_date'];
1520
+ $supply_data['name'] = $val['saswp_tvseries_season_name'];
1521
+ $supply_data['numberOfEpisodes'] = $val['saswp_tvseries_season_episodes'];
1522
+
1523
+ $tool_arr[] = $supply_data;
1524
+ }
1525
+ $input1['containsSeason'] = $tool_arr;
1526
+ }
1527
+
1528
+ return $input1;
1529
+
1530
+ }
1531
+
1532
+ function saswp_medical_condition_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1533
+
1534
+ $input1 = array();
1535
+
1536
+ $howto_image = get_post_meta( get_the_ID(), 'saswp_mc_schema_image_'.$schema_id.'_detail',true);
1537
+
1538
+ $cause = get_post_meta($schema_post_id, 'mc_cause_'.$schema_id, true);
1539
+ $symptom = get_post_meta($schema_post_id, 'mc_symptom_'.$schema_id, true);
1540
+ $riskfactro = get_post_meta($schema_post_id, 'mc_risk_factor_'.$schema_id, true);
1541
+
1542
+ $input1['@context'] = saswp_context_url();
1543
+ $input1['@type'] = 'MedicalCondition';
1544
+ $input1['@id'] = trailingslashit(get_permalink()).'#MedicalCondition';
1545
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_name_'.$schema_id, 'saswp_array');
1546
+ $input1['alternateName'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_alternate_name_'.$schema_id, 'saswp_array');
1547
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_description_'.$schema_id, 'saswp_array');
1548
+
1549
+ if(!(empty($howto_image))){
1550
+
1551
+ $input1['image']['@type'] = 'ImageObject';
1552
+ $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
1553
+ $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
1554
+ $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
1555
+
1556
+ }
1557
+
1558
+ $input1['associatedAnatomy']['@type'] = 'AnatomicalStructure';
1559
+ $input1['associatedAnatomy']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_anatomy_name_'.$schema_id, 'saswp_array');
1560
+
1561
+ $input1['code']['@type'] = 'MedicalCode';
1562
+ $input1['code']['code'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_medical_code_'.$schema_id, 'saswp_array');
1563
+ $input1['code']['codingSystem'] = saswp_remove_warnings($all_post_meta, 'saswp_mc_schema_coding_system_'.$schema_id, 'saswp_array');
1564
+
1565
+ $cause_arr = array();
1566
+ if(!empty($cause)){
1567
+
1568
+ foreach($cause as $val){
1569
+
1570
+ $supply_data = array();
1571
+ $supply_data['@type'] = 'MedicalCause';
1572
+ $supply_data['name'] = $val['saswp_mc_cause_name'];
1573
+
1574
+ $cause_arr[] = $supply_data;
1575
+ }
1576
+ $input1['cause'] = $cause_arr;
1577
+ }
1578
+
1579
+ $symptom_arr = array();
1580
+ if(!empty($symptom)){
1581
+
1582
+ foreach($symptom as $val){
1583
+
1584
+ $supply_data = array();
1585
+ $supply_data['@type'] = 'MedicalSymptom';
1586
+ $supply_data['name'] = $val['saswp_mc_symptom_name'];
1587
+
1588
+ $symptom_arr[] = $supply_data;
1589
+ }
1590
+ $input1['signOrSymptom'] = $symptom_arr;
1591
+ }
1592
+
1593
+ $riskfactor_arr = array();
1594
+ if(!empty($riskfactro)){
1595
+
1596
+ foreach($riskfactro as $val){
1597
+
1598
+ $supply_data = array();
1599
+ $supply_data['@type'] = 'MedicalRiskFactor';
1600
+ $supply_data['name'] = $val['saswp_mc_risk_factor_name'];
1601
+
1602
+ $riskfactor_arr[] = $supply_data;
1603
+ }
1604
+ $input1['riskFactor'] = $riskfactor_arr;
1605
+ }
1606
+
1607
+ return $input1;
1608
+
1609
+ }
1610
+
1611
+ function saswp_qanda_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1612
+
1613
+ $input1 = array();
1614
+
1615
+ if(trim(saswp_remove_warnings($all_post_meta, 'saswp_qa_question_title_'.$schema_id, 'saswp_array')) ==''){
1616
+
1617
+ $service_object = new saswp_output_service();
1618
+ $input1 = $service_object->saswp_dw_question_answers_details(get_the_ID());
1619
+
1620
+ }else{
1621
+
1622
+ $input1 = array(
1623
+ '@context' => saswp_context_url(),
1624
+ '@type' => 'QAPage',
1625
+ '@id' => trailingslashit(get_permalink()).'#qapage',
1626
+ 'mainEntity' => array(
1627
+ '@type' => 'Question' ,
1628
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_qa_question_title_'.$schema_id, 'saswp_array'),
1629
+ 'text' => saswp_remove_warnings($all_post_meta, 'saswp_qa_question_description_'.$schema_id, 'saswp_array'),
1630
+ 'upvoteCount' => saswp_remove_warnings($all_post_meta, 'saswp_qa_upvote_count_'.$schema_id, 'saswp_array'),
1631
+ 'dateCreated' => isset($all_post_meta['saswp_qa_date_created_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_qa_date_created_'.$schema_id][0])):'',
1632
+ 'author' => array('@type' => 'Person','name' =>saswp_remove_warnings($all_post_meta, 'saswp_qa_question_author_name_'.$schema_id, 'saswp_array')) ,
1633
+ 'answerCount' => 2 ,
1634
+ 'acceptedAnswer' => array(
1635
+ '@type' => 'Answer',
1636
+ 'upvoteCount' => saswp_remove_warnings($all_post_meta, 'saswp_qa_accepted_answer_upvote_count_'.$schema_id, 'saswp_array'),
1637
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_qa_accepted_answer_url_'.$schema_id, 'saswp_array'),
1638
+ 'text' => saswp_remove_warnings($all_post_meta, 'saswp_qa_accepted_answer_text_'.$schema_id, 'saswp_array'),
1639
+ 'dateCreated' => isset($all_post_meta['saswp_qa_accepted_answer_date_created_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_qa_accepted_answer_date_created_'.$schema_id][0])):'',
1640
+ 'author' => array('@type' => 'Person', 'name' => saswp_remove_warnings($all_post_meta, 'saswp_qa_accepted_author_name_'.$schema_id, 'saswp_array')),
1641
+ ) ,
1642
+ 'suggestedAnswer' => array(
1643
+ '@type' => 'Answer',
1644
+ 'upvoteCount' => saswp_remove_warnings($all_post_meta, 'saswp_qa_suggested_answer_upvote_count_'.$schema_id, 'saswp_array'),
1645
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_qa_suggested_answer_url_'.$schema_id, 'saswp_array'),
1646
+ 'text' => saswp_remove_warnings($all_post_meta, 'saswp_qa_suggested_answer_text_'.$schema_id, 'saswp_array'),
1647
+ 'dateCreated' => isset($all_post_meta['saswp_qa_suggested_answer_date_created_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_qa_suggested_answer_date_created_'.$schema_id][0])):'',
1648
+ 'author' => array('@type' => 'Person', 'name' => saswp_remove_warnings($all_post_meta, 'saswp_qa_suggested_author_name_'.$schema_id, 'saswp_array')),
1649
+ ) ,
1650
+ )
1651
+ );
1652
+ }
1653
+
1654
+ return $input1;
1655
+
1656
+ }
1657
+
1658
+ function saswp_data_feed_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1659
+
1660
+ $input1 = array();
1661
+
1662
+ $input1 = array(
1663
+ '@context' => saswp_context_url(),
1664
+ '@type' => 'DataFeed' ,
1665
+ '@id' => trailingslashit(get_permalink()).'#DataFeed',
1666
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_data_feed_schema_name_'.$schema_id, 'saswp_array'),
1667
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_data_feed_schema_description_'.$schema_id, 'saswp_array'),
1668
+ 'dateModified' => isset($all_post_meta['saswp_data_feed_schema_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_data_feed_schema_date_modified_'.$schema_id][0])):'',
1669
+ 'license' => saswp_remove_warnings($all_post_meta, 'saswp_data_feed_schema_license_'.$schema_id, 'saswp_array'),
1670
+ );
1671
+
1672
+
1673
+ $performer = get_post_meta($schema_post_id, 'feed_element_'.$schema_id, true);
1674
+
1675
+ $performer_arr = array();
1676
+
1677
+ if(!empty($performer)){
1678
+
1679
+ foreach($performer as $val){
1680
+
1681
+ $supply_data = array();
1682
+ $supply_data['@type'] = 'DataFeedItem';
1683
+ $supply_data['dateCreated'] = isset($val['saswp_feed_element_date_created'])?date('Y-m-d\TH:i:s\Z',strtotime($val['saswp_feed_element_date_created'])):'';
1684
+ $supply_data['item'] = array(
1685
+ '@type' => 'Person',
1686
+ 'name' => $val['saswp_feed_element_name'],
1687
+ 'email' => $val['saswp_feed_element_email'],
1688
+ );
1689
+
1690
+ $performer_arr[] = $supply_data;
1691
+ }
1692
+
1693
+ $input1['dataFeedElement'] = $performer_arr;
1694
+
1695
+ }
1696
+
1697
+ return $input1;
1698
+
1699
+ }
1700
+
1701
+ function saswp_dfp_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1702
+
1703
+ $input1 = array();
1704
+
1705
+ $event_image = get_post_meta( get_the_ID(), 'saswp_dfp_image_'.$schema_id.'_detail',true);
1706
+ $slogo = get_post_meta( get_the_ID(), 'saswp_dfp_organization_logo_'.$schema_id.'_detail',true);
1707
+ $input1 = array(
1708
+ '@context' => saswp_context_url(),
1709
+ '@type' => 'DiscussionForumPosting' ,
1710
+ '@id' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_url_'.$schema_id, 'saswp_array').'#blogposting',
1711
+ 'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_main_entity_of_page_'.$schema_id, 'saswp_array'),
1712
+ 'headline' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_headline_'.$schema_id, 'saswp_array'),
1713
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_description_'.$schema_id, 'saswp_array'),
1714
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_url_'.$schema_id, 'saswp_array'),
1715
+ 'image' => array(
1716
+ '@type' =>'ImageObject',
1717
+ 'url' => isset($event_image['thumbnail']) ? esc_url($event_image['thumbnail']):'' ,
1718
+ 'width' => isset($event_image['width']) ? esc_attr($event_image['width']) :'' ,
1719
+ 'height' => isset($event_image['height']) ? esc_attr($event_image['height']) :'' ,
1720
+ ),
1721
+ 'datePublished' => isset($all_post_meta['saswp_dfp_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_published_'.$schema_id][0])):'',
1722
+ 'dateModified' => isset($all_post_meta['saswp_dfp_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_dfp_date_modified_'.$schema_id][0])):'',
1723
+ 'author' => array(
1724
+ '@type' => 'Person',
1725
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_author_name_'.$schema_id, 'saswp_array'),
1726
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_author_description_'.$schema_id, 'saswp_array')
1727
+ ),
1728
+ 'publisher' => array(
1729
+ '@type' => 'Organization',
1730
+ 'logo' => array(
1731
+ '@type' => 'ImageObject',
1732
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_organization_logo_'.$schema_id, 'saswp_array'),
1733
+ 'width' => saswp_remove_warnings($slogo, 'width', 'saswp_string'),
1734
+ 'height' => saswp_remove_warnings($slogo, 'height', 'saswp_string'),
1735
+ ),
1736
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_dfp_organization_name_'.$schema_id, 'saswp_array'),
1737
+ ),
1738
+ );
1739
+
1740
+ return $input1;
1741
+
1742
+ }
1743
+
1744
+ function saswp_blogposting_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1745
+
1746
+ $input1 = array();
1747
+
1748
+ $slogo = get_post_meta( get_the_ID(), 'saswp_blogposting_organization_logo_'.$schema_id.'_detail',true);
1749
+ $input1 = array(
1750
+ '@context' => saswp_context_url(),
1751
+ '@type' => 'Blogposting' ,
1752
+ '@id' => trailingslashit(get_permalink()).'#Blogposting',
1753
+ 'inLanguage' => get_bloginfo('language'),
1754
+ 'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_main_entity_of_page_'.$schema_id, 'saswp_array'),
1755
+ 'headline' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_headline_'.$schema_id, 'saswp_array'),
1756
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_description_'.$schema_id, 'saswp_array'),
1757
+ 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_keywords_'.$schema_id, 'saswp_array'),
1758
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_name_'.$schema_id, 'saswp_array'),
1759
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_url_'.$schema_id, 'saswp_array'),
1760
+ 'datePublished' => isset($all_post_meta['saswp_blogposting_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_blogposting_date_published_'.$schema_id][0])):'',
1761
+ 'dateModified' => isset($all_post_meta['saswp_blogposting_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_blogposting_date_modified_'.$schema_id][0])):'',
1762
+ 'author' => array(
1763
+ '@type' => 'Person',
1764
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_author_name_'.$schema_id, 'saswp_array'),
1765
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_author_description_'.$schema_id, 'saswp_array')
1766
+ ),
1767
+ 'publisher' => array(
1768
+ '@type' => 'Organization',
1769
+ 'logo' => array(
1770
+ '@type' => 'ImageObject',
1771
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_organization_logo_'.$schema_id, 'saswp_array'),
1772
+ 'width' => saswp_remove_warnings($slogo, 'width', 'saswp_string'),
1773
+ 'height' => saswp_remove_warnings($slogo, 'height', 'saswp_string'),
1774
+ ),
1775
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_organization_name_'.$schema_id, 'saswp_array'),
1776
+ ),
1777
+ );
1778
+
1779
+ $itemlist = get_post_meta($schema_post_id, 'blogposting_items_'.$schema_id, true);
1780
+
1781
+ if($itemlist){
1782
+
1783
+ $list_arr = array();
1784
+
1785
+ foreach ($itemlist as $list){
1786
+ $list_arr[] = $list['saswp_blogposting_items_name'];
1787
+ }
1788
+
1789
+ $input1['mainEntity']['@type'] = 'ItemList';
1790
+ $input1['mainEntity']['itemListElement'] = $list_arr;
1791
+ $input1['mainEntity']['itemListOrder'] = 'http://schema.org/ItemListOrderAscending ';
1792
+ $input1['mainEntity']['name'] = saswp_get_the_title();
1793
+
1794
+ }
1795
+
1796
+ if(isset($all_post_meta['saswp_blogposting_speakable_'.$schema_id]) && $all_post_meta['saswp_blogposting_speakable_'.$schema_id][0] == 1 ){
1797
+
1798
+ $input1['speakable']['@type'] = 'SpeakableSpecification';
1799
+ $input1['speakable']['xpath'] = array(
1800
+ "/html/head/title",
1801
+ "/html/head/meta[@name='description']/@content"
1802
+ );
1803
+
1804
+ }
1805
+ if(saswp_remove_warnings($all_post_meta, 'saswp_blogposting_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_blogposting_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_blogposting_review_count_'.$schema_id, 'saswp_array')){
1806
+
1807
+ $input1['aggregateRating'] = array(
1808
+ "@type" => "AggregateRating",
1809
+ "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_rating_'.$schema_id, 'saswp_array'),
1810
+ "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_blogposting_review_count_'.$schema_id, 'saswp_array')
1811
+ );
1812
+ }
1813
+
1814
+ return $input1;
1815
+
1816
+ }
1817
+
1818
+ function saswp_audio_object_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1819
+
1820
+ $input1 = array();
1821
+
1822
+ $input1 = array(
1823
+ '@context' => saswp_context_url(),
1824
+ '@type' => 'AudioObject',
1825
+ '@id' => trailingslashit(get_permalink()).'#audioobject',
1826
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_name_'.$schema_id, 'saswp_array'),
1827
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_description_'.$schema_id, 'saswp_array'),
1828
+ 'contentUrl' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_contenturl_'.$schema_id, 'saswp_array'),
1829
+ 'duration' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_duration_'.$schema_id, 'saswp_array'),
1830
+ 'encodingFormat' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_encoding_format_'.$schema_id, 'saswp_array'),
1831
+ 'datePublished' => isset($all_post_meta['saswp_audio_schema_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_audio_schema_date_published_'.$schema_id][0])):'',
1832
+ 'dateModified' => isset($all_post_meta['saswp_audio_schema_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_audio_schema_date_modified_'.$schema_id][0])):'',
1833
+ 'author' => array(
1834
+ '@type' => 'Person',
1835
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_author_name_'.$schema_id, 'saswp_array'),
1836
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_audio_schema_author_description_'.$schema_id, 'saswp_array')
1837
+ ),
1838
+
1839
+ );
1840
+
1841
+ return $input1;
1842
+
1843
+ }
1844
+
1845
+ function saswp_webpage_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1846
+
1847
+ $input1 = array();
1848
+
1849
+ $slogo = get_post_meta( get_the_ID(), 'saswp_webpage_organization_logo_'.$schema_id.'_detail',true);
1850
+ $input1 = array(
1851
+ '@context' => saswp_context_url(),
1852
+ '@type' => 'WebPage' ,
1853
+ '@id' => trailingslashit(get_permalink()).'#webpage',
1854
+ 'inLanguage' => get_bloginfo('language'),
1855
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_name_'.$schema_id, 'saswp_array'),
1856
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_url_'.$schema_id, 'saswp_array'),
1857
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_description_'.$schema_id, 'saswp_array'),
1858
+ 'mainEntity' => array(
1859
+ '@type' => 'Article',
1860
+ 'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_main_entity_of_page_'.$schema_id, 'saswp_array'),
1861
+ 'image' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_image_'.$schema_id, 'saswp_array'),
1862
+ 'headline' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_headline_'.$schema_id, 'saswp_array'),
1863
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_description_'.$schema_id, 'saswp_array'),
1864
+ 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_keywords_'.$schema_id, 'saswp_array'),
1865
+ 'datePublished' => isset($all_post_meta['saswp_webpage_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_webpage_date_published_'.$schema_id][0])):'',
1866
+ 'dateModified' => isset($all_post_meta['saswp_webpage_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_webpage_date_modified_'.$schema_id][0])):'',
1867
+ 'author' => array(
1868
+ '@type' => 'Person',
1869
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_author_name_'.$schema_id, 'saswp_array'),
1870
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_author_description_'.$schema_id, 'saswp_array'),
1871
+ ),
1872
+ 'publisher' => array(
1873
+ '@type' => 'Organization',
1874
+ 'logo' => array(
1875
+ '@type' => 'ImageObject',
1876
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_organization_logo_'.$schema_id, 'saswp_array'),
1877
+ 'width' => saswp_remove_warnings($slogo, 'width', 'saswp_string'),
1878
+ 'height' => saswp_remove_warnings($slogo, 'height', 'saswp_string'),
1879
+ ),
1880
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_webpage_organization_name_'.$schema_id, 'saswp_array'),
1881
+ ),
1882
+ ),
1883
+
1884
+
1885
+ );
1886
+
1887
+
1888
+ if(isset($all_post_meta['saswp_webpage_speakable_'.$schema_id]) && $all_post_meta['saswp_webpage_speakable_'.$schema_id][0] == 1){
1889
+
1890
+ $input1['speakable']['@type'] = 'SpeakableSpecification';
1891
+ $input1['speakable']['xpath'] = array(
1892
+ "/html/head/title",
1893
+ "/html/head/meta[@name='description']/@content"
1894
+ );
1895
+
1896
+ }
1897
+
1898
+ return $input1;
1899
+
1900
+ }
1901
+
1902
+ function saswp_article_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1903
+
1904
+ $input1 = array();
1905
+
1906
+ $slogo = get_post_meta( get_the_ID(), 'saswp_article_organization_logo_'.$schema_id.'_detail',true);
1907
+
1908
+ $input1 = array(
1909
+ '@context' => saswp_context_url(),
1910
+ '@type' => 'Article',
1911
+ '@id' => trailingslashit(get_permalink()).'#article',
1912
+ 'inLanguage' => get_bloginfo('language'),
1913
+ 'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_article_main_entity_of_page_'.$schema_id, 'saswp_array'),
1914
+ 'image' => saswp_remove_warnings($all_post_meta, 'saswp_article_image_'.$schema_id, 'saswp_array'),
1915
+ 'headline' => saswp_remove_warnings($all_post_meta, 'saswp_article_headline_'.$schema_id, 'saswp_array'),
1916
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_article_description_'.$schema_id, 'saswp_array'),
1917
+ 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_article_keywords_'.$schema_id, 'saswp_array'),
1918
+ 'datePublished' => isset($all_post_meta['saswp_article_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_article_date_published_'.$schema_id][0])):'',
1919
+ 'dateModified' => isset($all_post_meta['saswp_article_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_article_date_modified_'.$schema_id][0])):'',
1920
+ 'author' => array(
1921
+ '@type' => 'Person',
1922
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_article_author_name_'.$schema_id, 'saswp_array'),
1923
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_article_author_description_'.$schema_id, 'saswp_array')
1924
+ ),
1925
+ 'publisher' => array(
1926
+ '@type' => 'Organization',
1927
+ 'logo' => array(
1928
+ '@type' => 'ImageObject',
1929
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_article_organization_logo_'.$schema_id, 'saswp_array'),
1930
+ 'width' => saswp_remove_warnings($slogo, 'width', 'saswp_string'),
1931
+ 'height' => saswp_remove_warnings($slogo, 'height', 'saswp_string'),
1932
+ ),
1933
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_article_organization_name_'.$schema_id, 'saswp_array'),
1934
+ ),
1935
+
1936
+ );
1937
+
1938
+ $itemlist = get_post_meta($schema_post_id, 'article_items_'.$schema_id, true);
1939
+
1940
+ if($itemlist){
1941
+
1942
+ $list_arr = array();
1943
+
1944
+ foreach ($itemlist as $list){
1945
+ $list_arr[] = $list['saswp_article_items_name'];
1946
+ }
1947
+
1948
+ $input1['mainEntity']['@type'] = 'ItemList';
1949
+ $input1['mainEntity']['itemListElement'] = $list_arr;
1950
+ $input1['mainEntity']['itemListOrder'] = 'http://schema.org/ItemListOrderAscending ';
1951
+ $input1['mainEntity']['name'] = saswp_get_the_title();
1952
+
1953
+ }
1954
+
1955
+ if(isset($all_post_meta['saswp_article_speakable_'.$schema_id]) && $all_post_meta['saswp_article_speakable_'.$schema_id][0] == 1){
1956
+
1957
+ $input1['speakable']['@type'] = 'SpeakableSpecification';
1958
+ $input1['speakable']['xpath'] = array(
1959
+ "/html/head/title",
1960
+ "/html/head/meta[@name='description']/@content"
1961
+ );
1962
+
1963
+ }
1964
+
1965
+ return $input1;
1966
+
1967
+ }
1968
+
1969
+ function saswp_tech_article_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1970
+
1971
+ $input1 = array();
1972
+
1973
+ $slogo = get_post_meta( get_the_ID(), 'saswp_tech_article_organization_logo_'.$schema_id.'_detail',true);
1974
+
1975
+ $input1 = array(
1976
+ '@context' => saswp_context_url(),
1977
+ '@type' => 'TechArticle',
1978
+ '@id' => trailingslashit(get_permalink()).'#techarticle',
1979
+ 'inLanguage' => get_bloginfo('language'),
1980
+ 'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_main_entity_of_page_'.$schema_id, 'saswp_array'),
1981
+ 'image' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_image_'.$schema_id, 'saswp_array'),
1982
+ 'headline' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_headline_'.$schema_id, 'saswp_array'),
1983
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_description_'.$schema_id, 'saswp_array'),
1984
+ 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_keywords_'.$schema_id, 'saswp_array'),
1985
+ 'datePublished' => isset($all_post_meta['saswp_tech_article_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_tech_article_date_published_'.$schema_id][0])):'',
1986
+ 'dateModified' => isset($all_post_meta['saswp_tech_article_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_tech_article_date_modified_'.$schema_id][0])):'',
1987
+ 'author' => array(
1988
+ '@type' => 'Person',
1989
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_author_name_'.$schema_id, 'saswp_array'),
1990
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_author_description_'.$schema_id, 'saswp_array')
1991
+ ),
1992
+ 'publisher' => array(
1993
+ '@type' => 'Organization',
1994
+ 'logo' => array(
1995
+ '@type' => 'ImageObject',
1996
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_organization_logo_'.$schema_id, 'saswp_array'),
1997
+ 'width' => saswp_remove_warnings($slogo, 'width', 'saswp_string'),
1998
+ 'height' => saswp_remove_warnings($slogo, 'height', 'saswp_string'),
1999
+ ),
2000
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_organization_name_'.$schema_id, 'saswp_array'),
2001
+ ),
2002
+
2003
+ );
2004
+
2005
+ $itemlist = get_post_meta($schema_post_id, 'tech_article_items_'.$schema_id, true);
2006
+
2007
+ if($itemlist){
2008
+
2009
+ $list_arr = array();
2010
+
2011
+ foreach ($itemlist as $list){
2012
+ $list_arr[] = $list['saswp_tech_article_items_name'];
2013
+ }
2014
+
2015
+ $input1['mainEntity']['@type'] = 'ItemList';
2016
+ $input1['mainEntity']['itemListElement'] = $list_arr;
2017
+ $input1['mainEntity']['itemListOrder'] = 'http://schema.org/ItemListOrderAscending ';
2018
+ $input1['mainEntity']['name'] = saswp_get_the_title();
2019
+
2020
+ }
2021
+
2022
+ if(isset($all_post_meta['saswp_tech_article_speakable_'.$schema_id]) && $all_post_meta['saswp_tech_article_speakable_'.$schema_id][0] == 1){
2023
+
2024
+ $input1['speakable']['@type'] = 'SpeakableSpecification';
2025
+ $input1['speakable']['xpath'] = array(
2026
+ "/html/head/title",
2027
+ "/html/head/meta[@name='description']/@content"
2028
+ );
2029
+
2030
+ }
2031
+
2032
+ return $input1;
2033
+ }
2034
+
2035
+ function saswp_news_article_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2036
+
2037
+ $input1 = array();
2038
+
2039
+ $slogo = get_post_meta( get_the_ID(), 'saswp_newsarticle_organization_logo_'.$schema_id.'_detail',true);
2040
+ $author_image = get_post_meta( get_the_ID(), 'saswp_newsarticle_author_image_'.$schema_id.'_detail',true);
2041
+
2042
+ $input1 = array(
2043
+ '@context' => saswp_context_url(),
2044
+ '@type' => 'NewsArticle' ,
2045
+ '@id' => trailingslashit(get_permalink()).'#newsarticle',
2046
+ 'inLanguage' => get_bloginfo('language'),
2047
+ 'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_main_entity_of_page_'.$schema_id, 'saswp_array'),
2048
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_URL_'.$schema_id, 'saswp_array'),
2049
+ 'image' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_image_'.$schema_id, 'saswp_array'),
2050
+ 'headline' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_headline_'.$schema_id, 'saswp_array'),
2051
+ 'datePublished' => isset($all_post_meta['saswp_newsarticle_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_newsarticle_date_published_'.$schema_id][0])):'',
2052
+ 'dateModified' => isset($all_post_meta['saswp_newsarticle_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_newsarticle_date_modified_'.$schema_id][0])):'',
2053
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_description_'.$schema_id, 'saswp_array'),
2054
+ 'keywords' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_keywords_'.$schema_id, 'saswp_array'),
2055
+ 'articleSection' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_section_'.$schema_id, 'saswp_array'),
2056
+ 'articleBody' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_body_'.$schema_id, 'saswp_array'),
2057
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_name_'.$schema_id, 'saswp_array'),
2058
+ 'thumbnailUrl' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_thumbnailurl_'.$schema_id, 'saswp_array'),
2059
+ 'wordCount' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_word_count_'.$schema_id, 'saswp_array'),
2060
+ 'timeRequired' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_timerequired_'.$schema_id, 'saswp_array'),
2061
+ 'mainEntity' => array(
2062
+ '@type' => 'WebPage',
2063
+ '@id' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_main_entity_id_'.$schema_id, 'saswp_array'),
2064
+ ),
2065
+ 'author' => array(
2066
+ '@type' => 'Person',
2067
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_author_name_'.$schema_id, 'saswp_array'),
2068
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_author_description_'.$schema_id, 'saswp_array'),
2069
+ 'Image' => array(
2070
+ '@type' => 'ImageObject',
2071
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_author_image_'.$schema_id, 'saswp_array'),
2072
+ 'height' => saswp_remove_warnings($author_image, 'height', 'saswp_string'),
2073
+ 'width' => saswp_remove_warnings($author_image, 'width', 'saswp_string')
2074
+ ),
2075
+ ),
2076
+ 'publisher' => array(
2077
+ '@type' => 'Organization',
2078
+ 'logo' => array(
2079
+ '@type' => 'ImageObject',
2080
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_organization_logo_'.$schema_id, 'saswp_array'),
2081
+ 'width' => saswp_remove_warnings($slogo, 'width', 'saswp_string'),
2082
+ 'height' => saswp_remove_warnings($slogo, 'height', 'saswp_string'),
2083
+ ),
2084
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_organization_name_'.$schema_id, 'saswp_array'),
2085
+ ),
2086
+ );
2087
+
2088
+
2089
+ $itemlist = get_post_meta($schema_post_id, 'newsarticle_items_'.$schema_id, true);
2090
+
2091
+ if($itemlist){
2092
+
2093
+ $list_arr = array();
2094
+
2095
+ foreach ($itemlist as $list){
2096
+ $list_arr[] = $list['saswp_newsarticle_items_name'];
2097
+ }
2098
+
2099
+ $input1['mainEntity']['@type'] = 'ItemList';
2100
+ $input1['mainEntity']['itemListElement'] = $list_arr;
2101
+ $input1['mainEntity']['itemListOrder'] = 'http://schema.org/ItemListOrderAscending ';
2102
+ $input1['mainEntity']['name'] = saswp_get_the_title();
2103
+
2104
+ }
2105
+
2106
+ if(isset($all_post_meta['saswp_newsarticle_speakable_'.$schema_id]) && $all_post_meta['saswp_newsarticle_speakable_'.$schema_id][0] == 1){
2107
+
2108
+ $input1['speakable']['@type'] = 'SpeakableSpecification';
2109
+ $input1['speakable']['xpath'] = array(
2110
+ "/html/head/title",
2111
+ "/html/head/meta[@name='description']/@content"
2112
+ );
2113
+
2114
+ }
2115
+
2116
+ return $input1;
2117
+
2118
+ }
2119
+
2120
+ function saswp_video_object_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2121
+
2122
+ $input1 = array();
2123
+
2124
+ $slogo = get_post_meta( get_the_ID(), 'saswp_video_object_organization_logo_'.$schema_id.'_detail',true);
2125
+ $author_image = get_post_meta( get_the_ID(), 'saswp_video_object_author_image_'.$schema_id.'_detail',true);
2126
+
2127
+ $input1 = array(
2128
+ '@context' => saswp_context_url(),
2129
+ '@type' => 'VideoObject',
2130
+ '@id' => trailingslashit(get_permalink()).'#videoobject',
2131
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_url_'.$schema_id, 'saswp_array'),
2132
+ 'headline' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_headline_'.$schema_id, 'saswp_array'),
2133
+ 'datePublished' => isset($all_post_meta['saswp_video_object_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_video_object_date_published_'.$schema_id][0])):'',
2134
+ 'dateModified' => isset($all_post_meta['saswp_video_object_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_video_object_date_modified_'.$schema_id][0])):'',
2135
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_description_'.$schema_id, 'saswp_array'),
2136
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_name_'.$schema_id, 'saswp_array'),
2137
+ 'uploadDate' => isset($all_post_meta['saswp_video_object_upload_date_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_video_object_upload_date_'.$schema_id][0])):'',
2138
+ 'thumbnailUrl' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_thumbnail_url_'.$schema_id, 'saswp_array'),
2139
+ 'contentUrl' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_content_url_'.$schema_id, 'saswp_array'),
2140
+ 'embedUrl' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_embed_url_'.$schema_id, 'saswp_array'),
2141
+ 'mainEntity' => array(
2142
+ '@type' => 'WebPage',
2143
+ '@id' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_main_entity_id_'.$schema_id, 'saswp_array'),
2144
+ ),
2145
+ 'author' => array(
2146
+ '@type' => 'Person',
2147
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_author_name_'.$schema_id, 'saswp_array'),
2148
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_author_description_'.$schema_id, 'saswp_array'),
2149
+ 'Image' => array(
2150
+ '@type' => 'ImageObject',
2151
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_author_image_'.$schema_id, 'saswp_array'),
2152
+ 'height' => saswp_remove_warnings($author_image, 'height', 'saswp_string'),
2153
+ 'width' => saswp_remove_warnings($author_image, 'width', 'saswp_string')
2154
+ ),
2155
+ ),
2156
+ 'publisher' => array(
2157
+ '@type' => 'Organization',
2158
+ 'logo' => array(
2159
+ '@type' => 'ImageObject',
2160
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_organization_logo_'.$schema_id, 'saswp_array'),
2161
+ 'width' => saswp_remove_warnings($slogo, 'width', 'saswp_string'),
2162
+ 'height' => saswp_remove_warnings($slogo, 'height', 'saswp_string'),
2163
+ ),
2164
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_video_object_organization_name_'.$schema_id, 'saswp_array'),
2165
+ ),
2166
+ );
2167
+
2168
+
2169
+ return $input1;
2170
+
2171
+ }
2172
+
2173
+ function saswp_image_object_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2174
+
2175
+ $input1 = array();
2176
+
2177
+ $slogo = get_post_meta( get_the_ID(), 'saswpimage_object_organization_logo_'.$schema_id.'_detail',true);
2178
+ $author_image = get_post_meta( get_the_ID(), 'saswpimage_object_author_image_'.$schema_id.'_detail',true);
2179
+
2180
+ $input1 = array(
2181
+ '@context' => saswp_context_url(),
2182
+ '@type' => 'ImageObject',
2183
+ '@id' => trailingslashit(get_permalink()).'#imageobject',
2184
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_url_'.$schema_id, 'saswp_array'),
2185
+ 'datePublished' => isset($all_post_meta['saswpimage_object_date_published_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswpimage_object_date_published_'.$schema_id][0])):'',
2186
+ 'dateModified' => isset($all_post_meta['saswpimage_object_date_modified_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswpimage_object_date_modified_'.$schema_id][0])):'',
2187
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_description_'.$schema_id, 'saswp_array'),
2188
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_name_'.$schema_id, 'saswp_array'),
2189
+ 'uploadDate' => isset($all_post_meta['saswpimage_object_upload_date_'.$schema_id])?date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswpimage_object_upload_date_'.$schema_id][0])):'',
2190
+ 'contentUrl' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_content_url_'.$schema_id, 'saswp_array'),
2191
+ 'contentLocation' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_content_location_'.$schema_id, 'saswp_array'),
2192
+ 'author' => array(
2193
+ '@type' => 'Person',
2194
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_author_name_'.$schema_id, 'saswp_array'),
2195
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_author_description_'.$schema_id, 'saswp_array'),
2196
+ 'Image' => array(
2197
+ '@type' => 'ImageObject',
2198
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_author_image_'.$schema_id, 'saswp_array'),
2199
+ 'height' => saswp_remove_warnings($author_image, 'height', 'saswp_string'),
2200
+ 'width' => saswp_remove_warnings($author_image, 'width', 'saswp_string')
2201
+ ),
2202
+ ),
2203
+ 'publisher' => array(
2204
+ '@type' => 'Organization',
2205
+ 'logo' => array(
2206
+ '@type' => 'ImageObject',
2207
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_organization_logo_'.$schema_id, 'saswp_array'),
2208
+ 'width' => saswp_remove_warnings($slogo, 'width', 'saswp_string'),
2209
+ 'height' => saswp_remove_warnings($slogo, 'height', 'saswp_string'),
2210
+ ),
2211
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswpimage_object_organization_name_'.$schema_id, 'saswp_array'),
2212
+ ),
2213
+ );
2214
+
2215
+
2216
+
2217
+ $itinerary = get_post_meta($schema_post_id, 'image_object_exif_data_'.$schema_id, true);
2218
+
2219
+ $itinerary_arr = array();
2220
+
2221
+ if(!empty($itinerary)){
2222
+
2223
+ foreach($itinerary as $val){
2224
+
2225
+ $supply_data = array();
2226
+ $supply_data['@type'] = 'PropertyValue';
2227
+ $supply_data['name'] = $val['saswpimage_object_exif_data_name'];
2228
+ $supply_data['value'] = $val['saswpimage_object_exif_data_value'];
2229
+
2230
+ $itinerary_arr[] = $supply_data;
2231
+ }
2232
+ $input1['exifData'] = $itinerary_arr;
2233
+ }
2234
+
2235
+ return $input1;
2236
+
2237
+ }
2238
+
2239
+ function saswp_service_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2240
+
2241
+ $input1 = array();
2242
+
2243
+ $area_served_str = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_area_served_'.$schema_id, 'saswp_array');
2244
+ $area_served_arr = explode(',', $area_served_str);
2245
+
2246
+ $service_offer_str = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_service_offer_'.$schema_id, 'saswp_array');
2247
+ $service_offer_arr = explode(',', $service_offer_str);
2248
+
2249
+ $input1['@context'] = saswp_context_url();
2250
+ $input1['@type'] = 'Service';
2251
+ $input1['@id'] = trailingslashit(get_permalink()).'#service';
2252
+ $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_name_'.$schema_id, 'saswp_array');
2253
+ $input1['serviceType'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_type_'.$schema_id, 'saswp_array');
2254
+
2255
+ if(isset($all_post_meta['saswp_service_schema_provider_type_'.$schema_id][0])){
2256
+
2257
+ $input1['provider']['@type'] = $all_post_meta['saswp_service_schema_provider_type_'.$schema_id][0];
2258
+ $input1['provider']['name'] = $all_post_meta['saswp_service_schema_provider_name_'.$schema_id][0];
2259
+ $input1['provider']['image'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_image_'.$schema_id, 'saswp_array');
2260
+ $input1['provider']['priceRange'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_price_range_'.$schema_id, 'saswp_array');
2261
+ $input1['provider']['address']['@type'] = 'PostalAddress';
2262
+ $input1['provider']['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_locality_'.$schema_id, 'saswp_array');
2263
+ $input1['provider']['address']['postalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_postal_code_'.$schema_id, 'saswp_array');
2264
+ $input1['provider']['address']['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_telephone_'.$schema_id, 'saswp_array');
2265
+
2266
+ }
2267
+
2268
+ $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_service_schema_description_'.$schema_id, 'saswp_array');
2269
+
2270
+ $areaServed = array();
2271
+ foreach($area_served_arr as $area){
2272
+ $areaServed[] = array(
2273
+ '@type' => 'City',
2274
+ 'name' => $area
2275
+ );
2276
+ }
2277
+ $serviceOffer = array();
2278
+ foreach($service_offer_arr as $offer){
2279
+ $serviceOffer[] = array(
2280
+ '@type' => 'Offer',
2281
+ 'name' => $offer
2282
+ );
2283
+ }
2284
+ $input1['areaServed'] = $areaServed;
2285
+ $input1['hasOfferCatalog'] = array(
2286
+ '@type' => 'OfferCatalog',
2287
+ 'name' => saswp_remove_warnings($all_post_meta, 'saswp_service_schema_name_'.$schema_id, 'saswp_array'),
2288
+ 'itemListElement' => $serviceOffer
2289
+ );
2290
+
2291
+ return $input1;
2292
+
2293
+ }
2294
+
2295
+ function saswp_review_schema_markup($schema_id, $schema_post_id, $all_post_meta){
2296
+
2297
+ global $sd_data;
2298
+ $input = array();
2299
+
2300
+ if(isset($sd_data['saswp-tagyeem']) && $sd_data['saswp-tagyeem'] == 1 && (is_plugin_active('taqyeem/taqyeem.php') || get_template() != 'jannah')){
2301
+
2302
+ remove_action( 'TieLabs/after_post_entry', 'tie_article_schemas' );
2303
+
2304
+ }
2305
+
2306
+ $service = new saswp_output_service();
2307
+
2308
+ $input1['@context'] = saswp_context_url();
2309
+ $input1['@type'] = 'Review';
2310
+ $input1['@id'] = trailingslashit(get_permalink()).'#review';
2311
+ $input1['name'] = $all_post_meta['saswp_review_name_'.$schema_id][0];
2312
+ $input1['url'] = $all_post_meta['saswp_review_url_'.$schema_id][0];
2313
+ $input1['datePublished'] = isset($all_post_meta['saswp_review_date_published_'.$schema_id][0])&& $all_post_meta['saswp_review_date_published_'.$schema_id][0] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_review_date_published_'.$schema_id][0])):'';
2314
+
2315
+ if(isset($all_post_meta['saswp_review_publisher_'.$schema_id][0])){
2316
+ $input1['publisher']['@type'] = 'Organization';
2317
+ $input1['publisher']['name'] = $all_post_meta['saswp_review_publisher_'.$schema_id][0];
2318
+ }
2319
+
2320
+ if(isset($all_post_meta['saswp_review_description_'.$schema_id])){
2321
+ $input1['description'] = $all_post_meta['saswp_review_description_'.$schema_id][0];
2322
+ }
2323
+
2324
+ if(isset($all_post_meta['saswp_review_author_'.$schema_id])){
2325
+
2326
+ $review_author = $all_post_meta['saswp_review_author_'.$schema_id][0];
2327
+
2328
+ }
2329
+
2330
+ if($review_author){
2331
+
2332
+ $input1['author']['@type'] = 'Person';
2333
+ $input1['author']['name'] = esc_attr($review_author);
2334
+
2335
+ if(isset($all_post_meta['saswp_review_author_url_'.$schema_id])){
2336
+
2337
+ $input1['author']['sameAs'] = esc_url($all_post_meta['saswp_review_author_url_'.$schema_id][0]);
2338
+
2339
+ }
2340
+
2341
+ }
2342
+
2343
+ if(saswp_remove_warnings($all_post_meta, 'saswp_review_enable_rating_'.$schema_id, 'saswp_array') == 1){
2344
+
2345
+ $input1['reviewRating'] = array(
2346
+ "@type" => "Rating",
2347
+ "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_review_rating_'.$schema_id, 'saswp_array'),
2348
+ "bestRating" => saswp_remove_warnings($all_post_meta, 'saswp_review_review_count_'.$schema_id, 'saswp_array')
2349
+ );
2350
+ }
2351
+
2352
+ $item_reviewed = $all_post_meta['saswp_review_item_reviewed_'.$schema_id][0];
2353
+ $item_schema = array();
2354
+ switch ($item_reviewed) {
2355
+ case 'Book':
2356
+
2357
+ $item_schema = saswp_book_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2358
+
2359
+ break;
2360
+ case 'Course':
2361
+
2362
+ $item_schema = saswp_course_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2363
+
2364
+ break;
2365
+ case 'Event':
2366
+
2367
+ $item_schema = saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2368
+
2369
+ break;
2370
+ case 'HowTo':
2371
+
2372
+ $item_schema = saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2373
+
2374
+ break;
2375
+ case 'local_business':
2376
+
2377
+ $item_schema = saswp_local_business_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2378
+
2379
+ break;
2380
+ case 'MusicPlaylist':
2381
+
2382
+ $item_schema = saswp_music_playlist_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2383
+
2384
+ break;
2385
+ case 'Product':
2386
+
2387
+ $item_schema = saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2388
+
2389
+ break;
2390
+ case 'Recipe':
2391
+
2392
+ $item_schema = saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2393
+
2394
+ break;
2395
+ case 'SoftwareApplication':
2396
+
2397
+ $item_schema = saswp_software_app_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2398
+
2399
+ break;
2400
+ case 'VideoGame':
2401
+
2402
+ $item_schema = saswp_video_game_schema_markup($schema_id, $schema_post_id, $all_post_meta);
2403
+
2404
+ break;
2405
+
2406
+ default:
2407
+ break;
2408
+ }
2409
+
2410
+ if($item_schema){
2411
+ unset($item_schema['@context']);
2412
+ unset($item_schema['@id']);
2413
+ $input1['itemReviewed'] = $item_schema;
2414
+
2415
+ }
2416
+
2417
+ return $input;
2418
+
2419
+ }
output/output.php CHANGED
@@ -276,10 +276,7 @@ function saswp_schema_output() {
276
 
277
  $input1 = apply_filters('saswp_modify_faq_schema_output', $input1 );
278
 
279
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
280
- $service = new saswp_output_service();
281
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
282
- }
283
 
284
 
285
  }
@@ -296,10 +293,7 @@ function saswp_schema_output() {
296
 
297
  $input1 = apply_filters('saswp_modify_video_game_schema_output', $input1 );
298
 
299
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
300
- $service = new saswp_output_service();
301
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
302
- }
303
 
304
  }
305
 
@@ -313,10 +307,7 @@ function saswp_schema_output() {
313
 
314
  $input1 = apply_filters('saswp_modify_medical_condition_schema_output', $input1 );
315
 
316
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
317
- $service = new saswp_output_service();
318
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
319
- }
320
 
321
  }
322
 
@@ -331,10 +322,7 @@ function saswp_schema_output() {
331
 
332
  $input1 = apply_filters('saswp_modify_tvseries_schema_output', $input1 );
333
 
334
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
335
- $service = new saswp_output_service();
336
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
337
- }
338
 
339
  }
340
 
@@ -349,10 +337,7 @@ function saswp_schema_output() {
349
 
350
  $input1 = apply_filters('saswp_modify_howto_schema_output', $input1 );
351
 
352
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
353
- $service = new saswp_output_service();
354
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
355
- }
356
 
357
  }
358
 
@@ -364,10 +349,7 @@ function saswp_schema_output() {
364
 
365
  $input1 = apply_filters('saswp_modify_trip_schema_output', $input1 );
366
 
367
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
368
- $service = new saswp_output_service();
369
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
370
- }
371
 
372
  }
373
 
@@ -380,10 +362,7 @@ function saswp_schema_output() {
380
 
381
  $input1 = apply_filters('saswp_modify_apartment_schema_sfr', $input1 );
382
 
383
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
384
- $service = new saswp_output_service();
385
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
386
- }
387
 
388
  }
389
 
@@ -396,12 +375,8 @@ function saswp_schema_output() {
396
 
397
  $input1 = apply_filters('saswp_modify_apartment_schema_house', $input1 );
398
 
399
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
400
- $service = new saswp_output_service();
401
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
402
- }
403
-
404
-
405
  }
406
 
407
  if( 'Apartment' === $schema_type){
@@ -413,12 +388,8 @@ function saswp_schema_output() {
413
 
414
  $input1 = apply_filters('saswp_modify_apartment_schema_output', $input1 );
415
 
416
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
417
- $service = new saswp_output_service();
418
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
419
- }
420
-
421
-
422
  }
423
 
424
  if( 'MusicPlaylist' === $schema_type){
@@ -431,10 +402,7 @@ function saswp_schema_output() {
431
 
432
  $input1 = apply_filters('saswp_modify_music_playlist_schema_output', $input1 );
433
 
434
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
435
- $service = new saswp_output_service();
436
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
437
- }
438
 
439
  }
440
 
@@ -448,10 +416,7 @@ function saswp_schema_output() {
448
 
449
  $input1 = apply_filters('saswp_modify_music_playlist_schema_output', $input1 );
450
 
451
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
452
- $service = new saswp_output_service();
453
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
454
- }
455
 
456
  }
457
 
@@ -465,10 +430,7 @@ function saswp_schema_output() {
465
  $input1 = saswp_append_fetched_reviews($input1);
466
  $input1 = apply_filters('saswp_modify_music_album_schema_output', $input1 );
467
 
468
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
469
- $service = new saswp_output_service();
470
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
471
- }
472
 
473
  }
474
 
@@ -481,10 +443,7 @@ function saswp_schema_output() {
481
 
482
  $input1 = apply_filters('saswp_modify_tourist_destination_schema_output', $input1 );
483
 
484
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
485
- $service = new saswp_output_service();
486
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
487
- }
488
 
489
  }
490
 
@@ -497,10 +456,7 @@ function saswp_schema_output() {
497
 
498
  $input1 = apply_filters('saswp_modify_tourist_attraction_schema_output', $input1 );
499
 
500
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
501
- $service = new saswp_output_service();
502
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
503
- }
504
 
505
  }
506
 
@@ -513,10 +469,7 @@ function saswp_schema_output() {
513
 
514
  $input1 = apply_filters('saswp_modify_lorh_schema_output', $input1 );
515
 
516
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
517
- $service = new saswp_output_service();
518
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
519
- }
520
 
521
  }
522
 
@@ -529,10 +482,7 @@ function saswp_schema_output() {
529
 
530
  $input1 = apply_filters('saswp_modify_hindu_temple_schema_output', $input1 );
531
 
532
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
533
- $service = new saswp_output_service();
534
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
535
- }
536
 
537
  }
538
 
@@ -545,10 +495,7 @@ function saswp_schema_output() {
545
 
546
  $input1 = apply_filters('saswp_modify_church_schema_output', $input1 );
547
 
548
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
549
- $service = new saswp_output_service();
550
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
551
- }
552
 
553
  }
554
 
@@ -561,10 +508,7 @@ function saswp_schema_output() {
561
 
562
  $input1 = apply_filters('saswp_modify_mosque_schema_output', $input1 );
563
 
564
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
565
- $service = new saswp_output_service();
566
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
567
- }
568
 
569
  }
570
 
@@ -581,10 +525,7 @@ function saswp_schema_output() {
581
 
582
  $input1 = apply_filters('saswp_modify_jobposting_schema_output', $input1 );
583
 
584
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
585
- $service = new saswp_output_service();
586
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
587
- }
588
 
589
  }
590
 
@@ -597,10 +538,7 @@ function saswp_schema_output() {
597
 
598
  $input1 = apply_filters('saswp_modify_person_schema_output', $input1 );
599
 
600
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
601
- $service = new saswp_output_service();
602
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
603
- }
604
 
605
  }
606
 
@@ -641,10 +579,7 @@ function saswp_schema_output() {
641
 
642
  $input1 = apply_filters('saswp_modify_course_schema_output', $input1 );
643
 
644
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
645
- $service = new saswp_output_service();
646
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
647
- }
648
  }
649
 
650
  if( 'DiscussionForumPosting' === $schema_type){
@@ -658,7 +593,7 @@ function saswp_schema_output() {
658
  'headline' => bbp_get_topic_title(get_the_ID()),
659
  'description' => saswp_get_the_excerpt(),
660
  "articleSection" => bbp_get_forum_title(),
661
- "articleBody" => saswp_get_the_excerpt(),
662
  'url' => bbp_get_topic_permalink(),
663
  'datePublished' => esc_html($date),
664
  'dateModified' => esc_html($modified_date),
@@ -704,10 +639,7 @@ function saswp_schema_output() {
704
 
705
  $input1 = apply_filters('saswp_modify_d_forum_posting_schema_output', $input1 );
706
 
707
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
708
- $service = new saswp_output_service();
709
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
710
- }
711
  }
712
 
713
  if( 'Blogposting' === $schema_type){
@@ -716,17 +648,24 @@ function saswp_schema_output() {
716
  '@context' => saswp_context_url(),
717
  '@type' => 'BlogPosting' ,
718
  '@id' => trailingslashit(saswp_get_permalink()).'#blogposting',
 
 
719
  'mainEntityOfPage' => trailingslashit(saswp_get_permalink()),
720
  'headline' => saswp_get_the_title(),
721
  'description' => saswp_get_the_excerpt(),
722
  'articleBody' => saswp_get_the_content(),
723
  'keywords' => saswp_get_the_tags(),
724
- 'name' => saswp_get_the_title(),
725
- 'url' => trailingslashit(saswp_get_permalink()),
726
  'datePublished' => esc_html($date),
727
  'dateModified' => esc_html($modified_date),
728
  'author' => saswp_get_author_details()
729
  );
 
 
 
 
 
 
730
  if(!empty($publisher)){
731
 
732
  $input1 = array_merge($input1, $publisher);
@@ -745,21 +684,18 @@ function saswp_schema_output() {
745
 
746
  $input1 = apply_filters('saswp_modify_blogposting_schema_output', $input1 );
747
 
748
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
749
- $service = new saswp_output_service();
750
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
751
- }
752
  }
753
 
754
  if( 'AudioObject' === $schema_type){
755
 
756
- $input1 = array(
757
- '@context' => saswp_context_url(),
758
- '@type' => $schema_type ,
759
- '@id' => trailingslashit(saswp_get_permalink()).'#audioobject',
760
- 'datePublished' => esc_html($date),
761
- 'dateModified' => esc_html($modified_date),
762
- 'author' => saswp_get_author_details()
763
  );
764
  if(!empty($publisher)){
765
 
@@ -782,10 +718,7 @@ function saswp_schema_output() {
782
 
783
  $input1 = apply_filters('saswp_modify_audio_object_schema_output', $input1 );
784
 
785
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
786
- $service = new saswp_output_service();
787
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
788
- }
789
  }
790
 
791
  if( 'Event' === $schema_type){
@@ -810,10 +743,7 @@ function saswp_schema_output() {
810
 
811
  $input1 = apply_filters('saswp_modify_event_schema_output', $input1 );
812
 
813
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
814
- $service = new saswp_output_service();
815
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
816
- }
817
 
818
  }
819
 
@@ -846,10 +776,7 @@ function saswp_schema_output() {
846
 
847
  $input1 = apply_filters('saswp_modify_software_application_schema_output', $input1 );
848
 
849
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
850
- $service = new saswp_output_service();
851
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
852
- }
853
  }
854
 
855
  if( 'WebPage' === $schema_type){
@@ -869,32 +796,38 @@ function saswp_schema_output() {
869
 
870
  $input1 = apply_filters('saswp_modify_webpage_schema_output', $input1 );
871
 
872
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
873
- $service = new saswp_output_service();
874
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
875
- }
876
  }
877
 
878
  if( 'Article' === $schema_type ){
879
 
880
  $service = new saswp_output_service();
881
  $input1 = $service->saswp_schema_markup_generator($schema_type);
 
 
 
 
 
 
882
 
883
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
884
  $input1['comment'] = saswp_get_comments(get_the_ID());
885
  }
886
  $input1 = apply_filters('saswp_modify_article_schema_output', $input1 );
887
 
888
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
889
- $service = new saswp_output_service();
890
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
891
- }
892
  }
893
 
894
  if( 'TechArticle' === $schema_type ){
895
 
896
  $service = new saswp_output_service();
897
  $input1 = $service->saswp_schema_markup_generator($schema_type);
 
 
 
 
 
 
898
 
899
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
900
  $input1['comment'] = saswp_get_comments(get_the_ID());
@@ -905,10 +838,7 @@ function saswp_schema_output() {
905
 
906
  $input1 = apply_filters('saswp_modify_tech_article_schema_output', $input1 );
907
 
908
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] == 1){
909
- $service = new saswp_output_service();
910
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
911
- }
912
  }
913
 
914
  if( 'Recipe' === $schema_type){
@@ -966,10 +896,7 @@ function saswp_schema_output() {
966
 
967
  $input1 = apply_filters('saswp_modify_recipe_schema_output', $input1 );
968
 
969
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
970
- $service = new saswp_output_service();
971
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
972
- }
973
  }
974
 
975
  if( 'qanda' === $schema_type){
@@ -991,10 +918,7 @@ function saswp_schema_output() {
991
 
992
  $input1 = apply_filters('saswp_modify_qanda_schema_output', $input1 );
993
 
994
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
995
- $service = new saswp_output_service();
996
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
997
- }
998
  }
999
 
1000
  if( 'Product' === $schema_type){
@@ -1006,12 +930,7 @@ function saswp_schema_output() {
1006
 
1007
  $input1 = apply_filters('saswp_modify_product_schema_output', $input1 );
1008
 
1009
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
1010
-
1011
- $service = new saswp_output_service();
1012
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
1013
-
1014
- }
1015
  }
1016
 
1017
  if( 'NewsArticle' === $schema_type ){
@@ -1048,6 +967,13 @@ function saswp_schema_output() {
1048
  ),
1049
  'author' => saswp_get_author_details()
1050
  );
 
 
 
 
 
 
 
1051
  if(!empty($publisher)){
1052
 
1053
  $input1 = array_merge($input1, $publisher);
@@ -1066,10 +992,7 @@ function saswp_schema_output() {
1066
 
1067
  $input1 = apply_filters('saswp_modify_news_article_schema_output', $input1 );
1068
 
1069
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
1070
- $service = new saswp_output_service();
1071
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
1072
- }
1073
 
1074
  }
1075
 
@@ -1090,12 +1013,7 @@ function saswp_schema_output() {
1090
 
1091
  $input1 = apply_filters('saswp_modify_service_schema_output', $input1 );
1092
 
1093
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] == 1){
1094
-
1095
- $service = new saswp_output_service();
1096
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
1097
-
1098
- }
1099
 
1100
  }
1101
 
@@ -1230,12 +1148,51 @@ function saswp_schema_output() {
1230
  $input1 = saswp_append_fetched_reviews($input1);
1231
  $input1 = apply_filters('saswp_modify_video_object_schema_output', $input1 );
1232
 
1233
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] ==1){
1234
- $service = new saswp_output_service();
1235
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
1236
- }
1237
 
1238
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1239
 
1240
  if( 'local_business' === $schema_type){
1241
 
@@ -1244,11 +1201,11 @@ function saswp_schema_output() {
1244
 
1245
  if($business_name){
1246
 
1247
- $local_business = $business_name;
1248
 
1249
  }else if($business_type){
1250
 
1251
- $local_business = $business_type;
1252
 
1253
  }else{
1254
  $local_business = 'LocalBusiness';
@@ -1272,10 +1229,8 @@ function saswp_schema_output() {
1272
 
1273
  $input1 = apply_filters('saswp_modify_local_business_schema_output', $input1 );
1274
 
1275
- if(isset($schema_options['enable_custom_field']) && $schema_options['enable_custom_field'] == 1){
1276
- $service = new saswp_output_service();
1277
- $input1 = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
1278
- }
1279
  }
1280
 
1281
  //Speakable schema
@@ -1339,8 +1294,36 @@ function saswp_schema_output() {
1339
  }
1340
 
1341
  }
1342
-
1343
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1344
 
1345
  }
1346
 
@@ -1421,7 +1404,7 @@ function saswp_schema_breadcrumb_output(){
1421
 
1422
  $input['@context'] = saswp_context_url();
1423
  $input['@type'] = 'BreadcrumbList';
1424
- $input['@id'] = trailingslashit(saswp_get_permalink()).'#breadcrumb';
1425
  $input['itemListElement'] = $bread_crumb_list;
1426
 
1427
  return apply_filters('saswp_modify_breadcrumb_output', $input);
@@ -1455,7 +1438,7 @@ function saswp_kb_website_output(){
1455
  $input['@id'] = $site_url.'#website';
1456
  $input['headline'] = $site_name;
1457
  $input['name'] = $site_name;
1458
- $input['description'] = get_bloginfo('description');
1459
  $input['url'] = $site_url;
1460
 
1461
  if(isset($sd_data['saswp_search_box_schema']) && $sd_data['saswp_search_box_schema'] == 1 || !isset($sd_data['saswp_search_box_schema'])){
@@ -1873,6 +1856,7 @@ function saswp_gutenberg_how_to_schema(){
1873
  $input1 = array();
1874
 
1875
  if(function_exists('parse_blocks') && is_object($post)){
 
1876
 
1877
  $blocks = parse_blocks($post->post_content);
1878
 
276
 
277
  $input1 = apply_filters('saswp_modify_faq_schema_output', $input1 );
278
 
279
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
280
 
281
 
282
  }
293
 
294
  $input1 = apply_filters('saswp_modify_video_game_schema_output', $input1 );
295
 
296
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
297
 
298
  }
299
 
307
 
308
  $input1 = apply_filters('saswp_modify_medical_condition_schema_output', $input1 );
309
 
310
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
311
 
312
  }
313
 
322
 
323
  $input1 = apply_filters('saswp_modify_tvseries_schema_output', $input1 );
324
 
325
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
326
 
327
  }
328
 
337
 
338
  $input1 = apply_filters('saswp_modify_howto_schema_output', $input1 );
339
 
340
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
341
 
342
  }
343
 
349
 
350
  $input1 = apply_filters('saswp_modify_trip_schema_output', $input1 );
351
 
352
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
353
 
354
  }
355
 
362
 
363
  $input1 = apply_filters('saswp_modify_apartment_schema_sfr', $input1 );
364
 
365
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
366
 
367
  }
368
 
375
 
376
  $input1 = apply_filters('saswp_modify_apartment_schema_house', $input1 );
377
 
378
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
379
+
 
 
 
 
380
  }
381
 
382
  if( 'Apartment' === $schema_type){
388
 
389
  $input1 = apply_filters('saswp_modify_apartment_schema_output', $input1 );
390
 
391
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
392
+
 
 
 
 
393
  }
394
 
395
  if( 'MusicPlaylist' === $schema_type){
402
 
403
  $input1 = apply_filters('saswp_modify_music_playlist_schema_output', $input1 );
404
 
405
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
406
 
407
  }
408
 
416
 
417
  $input1 = apply_filters('saswp_modify_music_playlist_schema_output', $input1 );
418
 
419
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
420
 
421
  }
422
 
430
  $input1 = saswp_append_fetched_reviews($input1);
431
  $input1 = apply_filters('saswp_modify_music_album_schema_output', $input1 );
432
 
433
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
434
 
435
  }
436
 
443
 
444
  $input1 = apply_filters('saswp_modify_tourist_destination_schema_output', $input1 );
445
 
446
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
447
 
448
  }
449
 
456
 
457
  $input1 = apply_filters('saswp_modify_tourist_attraction_schema_output', $input1 );
458
 
459
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
460
 
461
  }
462
 
469
 
470
  $input1 = apply_filters('saswp_modify_lorh_schema_output', $input1 );
471
 
472
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
473
 
474
  }
475
 
482
 
483
  $input1 = apply_filters('saswp_modify_hindu_temple_schema_output', $input1 );
484
 
485
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
486
 
487
  }
488
 
495
 
496
  $input1 = apply_filters('saswp_modify_church_schema_output', $input1 );
497
 
498
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
499
 
500
  }
501
 
508
 
509
  $input1 = apply_filters('saswp_modify_mosque_schema_output', $input1 );
510
 
511
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
512
 
513
  }
514
 
525
 
526
  $input1 = apply_filters('saswp_modify_jobposting_schema_output', $input1 );
527
 
528
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
529
 
530
  }
531
 
538
 
539
  $input1 = apply_filters('saswp_modify_person_schema_output', $input1 );
540
 
541
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
542
 
543
  }
544
 
579
 
580
  $input1 = apply_filters('saswp_modify_course_schema_output', $input1 );
581
 
582
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
583
  }
584
 
585
  if( 'DiscussionForumPosting' === $schema_type){
593
  'headline' => bbp_get_topic_title(get_the_ID()),
594
  'description' => saswp_get_the_excerpt(),
595
  "articleSection" => bbp_get_forum_title(),
596
+ "articleBody" => saswp_get_the_content(),
597
  'url' => bbp_get_topic_permalink(),
598
  'datePublished' => esc_html($date),
599
  'dateModified' => esc_html($modified_date),
639
 
640
  $input1 = apply_filters('saswp_modify_d_forum_posting_schema_output', $input1 );
641
 
642
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
643
  }
644
 
645
  if( 'Blogposting' === $schema_type){
648
  '@context' => saswp_context_url(),
649
  '@type' => 'BlogPosting' ,
650
  '@id' => trailingslashit(saswp_get_permalink()).'#blogposting',
651
+ 'url' => trailingslashit(saswp_get_permalink()),
652
+ 'inLanguage' => get_bloginfo('language'),
653
  'mainEntityOfPage' => trailingslashit(saswp_get_permalink()),
654
  'headline' => saswp_get_the_title(),
655
  'description' => saswp_get_the_excerpt(),
656
  'articleBody' => saswp_get_the_content(),
657
  'keywords' => saswp_get_the_tags(),
658
+ 'name' => saswp_get_the_title(),
 
659
  'datePublished' => esc_html($date),
660
  'dateModified' => esc_html($modified_date),
661
  'author' => saswp_get_author_details()
662
  );
663
+
664
+ $mainentity = saswp_get_mainEntity($schema_post_id);
665
+
666
+ if($mainentity){
667
+ $input1['mainEntity'] = $mainentity;
668
+ }
669
  if(!empty($publisher)){
670
 
671
  $input1 = array_merge($input1, $publisher);
684
 
685
  $input1 = apply_filters('saswp_modify_blogposting_schema_output', $input1 );
686
 
687
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
688
  }
689
 
690
  if( 'AudioObject' === $schema_type){
691
 
692
+ $input1 = array(
693
+ '@context' => saswp_context_url(),
694
+ '@type' => $schema_type ,
695
+ '@id' => trailingslashit(saswp_get_permalink()).'#audioobject',
696
+ 'datePublished' => esc_html($date),
697
+ 'dateModified' => esc_html($modified_date),
698
+ 'author' => saswp_get_author_details()
699
  );
700
  if(!empty($publisher)){
701
 
718
 
719
  $input1 = apply_filters('saswp_modify_audio_object_schema_output', $input1 );
720
 
721
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
722
  }
723
 
724
  if( 'Event' === $schema_type){
743
 
744
  $input1 = apply_filters('saswp_modify_event_schema_output', $input1 );
745
 
746
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
747
 
748
  }
749
 
776
 
777
  $input1 = apply_filters('saswp_modify_software_application_schema_output', $input1 );
778
 
779
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
780
  }
781
 
782
  if( 'WebPage' === $schema_type){
796
 
797
  $input1 = apply_filters('saswp_modify_webpage_schema_output', $input1 );
798
 
799
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
800
  }
801
 
802
  if( 'Article' === $schema_type ){
803
 
804
  $service = new saswp_output_service();
805
  $input1 = $service->saswp_schema_markup_generator($schema_type);
806
+
807
+ $mainentity = saswp_get_mainEntity($schema_post_id);
808
+
809
+ if($mainentity){
810
+ $input1['mainEntity'] = $mainentity;
811
+ }
812
 
813
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
814
  $input1['comment'] = saswp_get_comments(get_the_ID());
815
  }
816
  $input1 = apply_filters('saswp_modify_article_schema_output', $input1 );
817
 
818
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
819
  }
820
 
821
  if( 'TechArticle' === $schema_type ){
822
 
823
  $service = new saswp_output_service();
824
  $input1 = $service->saswp_schema_markup_generator($schema_type);
825
+
826
+ $mainentity = saswp_get_mainEntity($schema_post_id);
827
+
828
+ if($mainentity){
829
+ $input1['mainEntity'] = $mainentity;
830
+ }
831
 
832
  if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
833
  $input1['comment'] = saswp_get_comments(get_the_ID());
838
 
839
  $input1 = apply_filters('saswp_modify_tech_article_schema_output', $input1 );
840
 
841
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
842
  }
843
 
844
  if( 'Recipe' === $schema_type){
896
 
897
  $input1 = apply_filters('saswp_modify_recipe_schema_output', $input1 );
898
 
899
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
900
  }
901
 
902
  if( 'qanda' === $schema_type){
918
 
919
  $input1 = apply_filters('saswp_modify_qanda_schema_output', $input1 );
920
 
921
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
922
  }
923
 
924
  if( 'Product' === $schema_type){
930
 
931
  $input1 = apply_filters('saswp_modify_product_schema_output', $input1 );
932
 
933
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
 
 
934
  }
935
 
936
  if( 'NewsArticle' === $schema_type ){
967
  ),
968
  'author' => saswp_get_author_details()
969
  );
970
+
971
+ $mainentity = saswp_get_mainEntity($schema_post_id);
972
+
973
+ if($mainentity){
974
+ $input1['mainEntity'] = $mainentity;
975
+ }
976
+
977
  if(!empty($publisher)){
978
 
979
  $input1 = array_merge($input1, $publisher);
992
 
993
  $input1 = apply_filters('saswp_modify_news_article_schema_output', $input1 );
994
 
995
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
996
 
997
  }
998
 
1013
 
1014
  $input1 = apply_filters('saswp_modify_service_schema_output', $input1 );
1015
 
1016
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
 
 
1017
 
1018
  }
1019
 
1148
  $input1 = saswp_append_fetched_reviews($input1);
1149
  $input1 = apply_filters('saswp_modify_video_object_schema_output', $input1 );
1150
 
1151
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
1152
 
1153
  }
1154
+
1155
+ if( 'ImageObject' === $schema_type){
1156
+
1157
+ $description = saswp_get_the_excerpt();
1158
+
1159
+ if(!$description){
1160
+ $description = get_bloginfo('description');
1161
+ }
1162
+ $input1 = array(
1163
+ '@context' => saswp_context_url(),
1164
+ '@type' => 'ImageObject',
1165
+ '@id' => trailingslashit(saswp_get_permalink()).'#imageobject',
1166
+ 'url' => trailingslashit(saswp_get_permalink()),
1167
+ 'datePublished' => esc_html($date),
1168
+ 'dateModified' => esc_html($modified_date),
1169
+ 'name' => saswp_get_the_title(),
1170
+ 'description' => $description,
1171
+ 'contentUrl' => trailingslashit(saswp_get_permalink()),
1172
+ 'uploadDate' => esc_html($date),
1173
+ 'author' => saswp_get_author_details()
1174
+ );
1175
+ if(!empty($publisher)){
1176
+
1177
+ $input1 = array_merge($input1, $publisher);
1178
+
1179
+ }
1180
+ if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1181
+ $input1['comment'] = saswp_get_comments(get_the_ID());
1182
+ }
1183
+ if(!empty($aggregateRating)){
1184
+ $input1['aggregateRating'] = $aggregateRating;
1185
+ }
1186
+ if(!empty($extra_theme_review)){
1187
+ $input1 = array_merge($input1, $extra_theme_review);
1188
+ }
1189
+
1190
+ $input1 = saswp_append_fetched_reviews($input1);
1191
+ $input1 = apply_filters('saswp_modify_image_object_schema_output', $input1 );
1192
+
1193
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1194
+
1195
+ }
1196
 
1197
  if( 'local_business' === $schema_type){
1198
 
1201
 
1202
  if($business_name){
1203
 
1204
+ $local_business = $business_name;
1205
 
1206
  }else if($business_type){
1207
 
1208
+ $local_business = $business_type;
1209
 
1210
  }else{
1211
  $local_business = 'LocalBusiness';
1229
 
1230
  $input1 = apply_filters('saswp_modify_local_business_schema_output', $input1 );
1231
 
1232
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1233
+
 
 
1234
  }
1235
 
1236
  //Speakable schema
1294
  }
1295
 
1296
  }
1297
+
1298
+ //BNE Testomonials
1299
+ $bne_testomonials = saswp_get_bne_testomonials();
1300
+
1301
+ if($bne_testomonials){
1302
+
1303
+ $input1 = array_merge($input1,$bne_testomonials['rating']);
1304
+
1305
+ if(isset($input1['review'])){
1306
+ $input1 = array_merge($input1['review'],$bne_testomonials['reviews']);
1307
+ }else{
1308
+ $input1['review'] = $bne_testomonials['reviews'];
1309
+ }
1310
+
1311
+ }
1312
+
1313
+ //Easy Testomonials
1314
+ $testomonials = saswp_get_easy_testomonials();
1315
+
1316
+ if($testomonials){
1317
+
1318
+ $input1 = array_merge($input1,$testomonials['rating']);
1319
+
1320
+ if(isset($input1['review'])){
1321
+ $input1 = array_merge($input1['review'],$testomonials['reviews']);
1322
+ }else{
1323
+ $input1['review'] = $testomonials['reviews'];
1324
+ }
1325
+
1326
+ }
1327
 
1328
  }
1329
 
1404
 
1405
  $input['@context'] = saswp_context_url();
1406
  $input['@type'] = 'BreadcrumbList';
1407
+ $input['@id'] = trailingslashit($sd_data['breadcrumb_url']).'#breadcrumb';
1408
  $input['itemListElement'] = $bread_crumb_list;
1409
 
1410
  return apply_filters('saswp_modify_breadcrumb_output', $input);
1438
  $input['@id'] = $site_url.'#website';
1439
  $input['headline'] = $site_name;
1440
  $input['name'] = $site_name;
1441
+ $input['description'] = saswp_get_blog_desc();
1442
  $input['url'] = $site_url;
1443
 
1444
  if(isset($sd_data['saswp_search_box_schema']) && $sd_data['saswp_search_box_schema'] == 1 || !isset($sd_data['saswp_search_box_schema'])){
1856
  $input1 = array();
1857
 
1858
  if(function_exists('parse_blocks') && is_object($post)){
1859
+
1860
 
1861
  $blocks = parse_blocks($post->post_content);
1862
 
output/output_post_specific.php DELETED
@@ -1,1680 +0,0 @@
1
- <?php
2
- /**
3
- * Output Page
4
- *
5
- * @author Magazine3
6
- * @category Frontend
7
- * @path output_post_specific/output_post_specific
8
- * @version 1.0
9
- */
10
- if (! defined('ABSPATH') ) exit;
11
-
12
- /**
13
- * Function generates json markup for the all added schema type in the current post metabox
14
- * @global type $post
15
- * @global type $sd_data
16
- * @return type json
17
- */
18
- function saswp_post_specific_schema_output() {
19
-
20
- global $post;
21
- global $sd_data;
22
-
23
- $logo = '';
24
- $height = '';
25
- $width = '';
26
- $site_name = '';
27
-
28
- $service_object = new saswp_output_service();
29
- $default_logo = $service_object->saswp_get_publisher(true);
30
-
31
- if(!empty($default_logo)){
32
-
33
- $logo = $default_logo['url'];
34
- $height = $default_logo['height'];
35
- $width = $default_logo['width'];
36
-
37
- }
38
-
39
- if(isset($sd_data['sd_name']) && $sd_data['sd_name'] !=''){
40
- $site_name = $sd_data['sd_name'];
41
- }else{
42
- $site_name = get_bloginfo();
43
- }
44
-
45
-
46
- $all_schema_output = array();
47
- $all_schemas = json_decode(get_transient('saswp_transient_schema_ids'), true);
48
-
49
- if(!$all_schemas){
50
-
51
- $all_schemas = saswp_get_saved_schema_ids();
52
-
53
- }
54
-
55
- $schema_enable = get_post_meta($post->ID, 'saswp_enable_disable_schema', true);
56
-
57
- if($all_schemas){
58
-
59
- foreach($all_schemas as $schema){
60
-
61
- $input1 = array();
62
-
63
- $schema_id = $schema;
64
- $schema_type = get_post_meta($schema_id, 'schema_type', true);
65
- $schema_post_id = $post->ID;
66
- $all_post_meta = get_post_meta($schema_post_id, $key='', true);
67
-
68
- if(is_singular() && (isset($schema_enable[$schema_id]) && $schema_enable[$schema_id] == 1 )){
69
-
70
- $saswp_review_details = get_post_meta(get_the_ID(), 'saswp_review_details', true);
71
-
72
- $aggregateRating = array();
73
- $saswp_over_all_rating ='';
74
-
75
- if(isset($saswp_review_details['saswp-review-item-over-all'])){
76
-
77
- $saswp_over_all_rating = $saswp_review_details['saswp-review-item-over-all'];
78
-
79
- }
80
- $saswp_review_item_enable = 0;
81
-
82
- if(isset($saswp_review_details['saswp-review-item-enable'])){
83
-
84
- $saswp_review_item_enable = $saswp_review_details['saswp-review-item-enable'];
85
-
86
- }
87
- $saswp_review_count = "1";
88
-
89
-
90
- if($saswp_over_all_rating && $saswp_review_count && $saswp_review_item_enable ==1 && isset($sd_data['saswp-review-module']) && $sd_data['saswp-review-module'] ==1){
91
-
92
- $aggregateRating = array(
93
- "@type" => "AggregateRating",
94
- "ratingValue" => esc_attr($saswp_over_all_rating),
95
- "reviewCount" => esc_attr($saswp_review_count)
96
- );
97
- }
98
-
99
- $extra_theme_review = array();
100
- $service_object = new saswp_output_service();
101
- $extra_theme_review = $service_object->saswp_extra_theme_review_details(get_the_ID());
102
-
103
-
104
- if( 'Person' === $schema_type){
105
-
106
- $image = get_post_meta( get_the_ID(), 'saswp_trip_schema_image_'.$schema_id.'_detail',true);
107
-
108
- $input1['@context'] = saswp_context_url();
109
- $input1['@type'] = 'Person';
110
- $input1['@id'] = trailingslashit(get_permalink()).'#Person';
111
- $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_url_'.$schema_id, 'saswp_array');
112
- $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_name_'.$schema_id, 'saswp_array');
113
- $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_description_'.$schema_id, 'saswp_array');
114
- $input1['gender'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_gender_'.$schema_id, 'saswp_array');
115
- $input1['birthDate'] = isset($all_post_meta['saswp_person_schema_date_of_birth_'.$schema_id][0])&& $all_post_meta['saswp_person_schema_date_of_birth_'.$schema_id][0] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_person_schema_date_of_birth_'.$schema_id][0])):'';
116
- $input1['nationality'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_nationality_'.$schema_id, 'saswp_array');
117
- $input1['jobTitle'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_job_title_'.$schema_id, 'saswp_array');
118
-
119
- $input1['address']['@type'] = 'PostalAddress';
120
- $input1['address']['streetAddress'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_street_address_'.$schema_id, 'saswp_array');
121
- $input1['address']['addressCountry'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_country_'.$schema_id, 'saswp_array');
122
- $input1['address']['addressLocality'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_locality_'.$schema_id, 'saswp_array');
123
- $input1['address']['addressRegion'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_region_'.$schema_id, 'saswp_array');
124
- $input1['address']['PostalCode'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_postal_code_'.$schema_id, 'saswp_array');
125
-
126
- $input1['telephone'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_telephone_'.$schema_id, 'saswp_array');
127
- $input1['email'] = saswp_remove_warnings($all_post_meta, 'saswp_person_schema_email_'.$schema_id, 'saswp_array');
128
-
129
- if(!(empty($image))){
130
-
131
- $input1['image']['@type'] = 'ImageObject';
132
- $input1['image']['url'] = isset($image['thumbnail']) ? esc_url($image['thumbnail']):'';
133
- $input1['image']['height'] = isset($image['width']) ? esc_attr($image['width']) :'';
134
- $input1['image']['width'] = isset($image['height']) ? esc_attr($image['height']) :'';
135
-
136
- }
137
-
138
- }
139
-
140
- if( 'Trip' === $schema_type){
141
-
142
- $howto_image = get_post_meta( get_the_ID(), 'saswp_trip_schema_image_'.$schema_id.'_detail',true);
143
-
144
-
145
- $input1['@context'] = saswp_context_url();
146
- $input1['@type'] = 'Trip';
147
- $input1['@id'] = trailingslashit(get_permalink()).'#Trip';
148
- $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_url_'.$schema_id, 'saswp_array');
149
- $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_name_'.$schema_id, 'saswp_array');
150
- $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_trip_schema_description_'.$schema_id, 'saswp_array');
151
-
152
- if(!(empty($howto_image))){
153
-
154
- $input1['image']['@type'] = 'ImageObject';
155
- $input1['image']['url'] = isset($howto_image['thumbnail']) ? esc_url($howto_image['thumbnail']):'';
156
- $input1['image']['height'] = isset($howto_image['width']) ? esc_attr($howto_image['width']) :'';
157
- $input1['image']['width'] = isset($howto_image['height']) ? esc_attr($howto_image['height']) :'';
158
-
159
- }
160
-
161
- $itinerary = get_post_meta($schema_post_id, 'trip_itinerary_'.$schema_id, true);
162
-
163
- $itinerary_arr = array();
164
-
165
- if(!empty($itinerary)){
166
-
167
- foreach($itinerary as $val){
168
-
169
- $supply_data = array();
170
- $supply_data['@type'] = $val['saswp_trip_itinerary_type'];
171
- $supply_data['name'] = $val['saswp_trip_itinerary_name'];
172
- $supply_data['description'] = $val['saswp_trip_itinerary_description'];
173
- $supply_data['url'] = $val['saswp_trip_itinerary_url'];
174
-
175
-
176
- $itinerary_arr[] = $supply_data;
177
- }
178
- $input1['itinerary'] = $itinerary_arr;
179
- }
180
-
181
- }
182
-
183
- if( 'FAQ' === $schema_type){
184
-
185
- $input1['@context'] = saswp_context_url();
186
- $input1['@type'] = 'FAQPage';
187
- $input1['@id'] = trailingslashit(get_permalink()).'#FAQPage';
188
-
189
- $input1['headline'] = saswp_remove_warnings($all_post_meta, 'saswp_faq_headline_'.$schema_id, 'saswp_array');
190
- $input1['keywords'] = saswp_remove_warnings($all_post_meta, 'saswp_faq_keywords_'.$schema_id, 'saswp_array');
191
- $input1['datePublished'] = isset($all_post_meta['saswp_faq_date_published_'.$schema_id][0])&& $all_post_meta['saswp_faq_date_published_'.$schema_id][0] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_faq_date_published_'.$schema_id][0])):'';
192
- $input1['dateModified'] = isset($all_post_meta['saswp_faq_date_modified_'.$schema_id][0])&& $all_post_meta['saswp_faq_date_modified_'.$schema_id][0] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_faq_date_modified_'.$schema_id][0])):'';
193
- $input1['dateCreated'] = isset($all_post_meta['saswp_faq_date_created_'.$schema_id][0])&& $all_post_meta['saswp_faq_date_created_'.$schema_id][0] !='' ? date('Y-m-d\TH:i:s\Z',strtotime($all_post_meta['saswp_faq_date_created_'.$schema_id][0])):'';
194
-
195
- if(isset($all_post_meta['saswp_faq_author_'.$schema_id][0])){
196
- $input1['author']['@type'] = 'Person';
197
- $input1['author']['name'] = $all_post_meta['saswp_faq_author_'.$schema_id][0];
198
- }
199
-
200
- $faq_question = get_post_meta($schema_post_id, 'faq_question_'.$schema_id, true);
201
-
202
- $faq_question_arr = array();
203
-
204
- if(!empty($faq_question)){
205
-
206
- foreach($faq_question as $val){
207
-
208
- $supply_data = array();
209
- $supply_data['@type'] = 'Question';
210
- $supply_data['name'] = $val['saswp_faq_question_name'];
211
- $supply_data['acceptedAnswer']['@type'] = 'Answer';
212
- $supply_data['acceptedAnswer']['text'] = $val['saswp_faq_question_answer'];
213
-
214
- $faq_question_arr[] = $supply_data;
215
- }
216
- $input1['mainEntity'] = $faq_question_arr;
217
- }
218
-
219
- }
220
-
221
- if( 'MusicPlaylist' === $schema_type){
222
-
223
- $input1 = saswp_music_playlist_schema_markup($schema_id, $schema_post_id, $all_post_meta);
224
-
225
- $input1 = saswp_append_fetched_reviews($input1);
226
-
227
- }
228
-
229
- if( 'MusicAlbum' === $schema_type){
230
-
231
- $input1['@context'] = saswp_context_url();
232
- $input1['@type'] = 'MusicAlbum';
233
- $input1['@id'] = trailingslashit(get_permalink()).'#MusicAlbum';
234
- $input1['url'] = saswp_remove_warnings($all_post_meta, 'saswp_music_album_url_'.$schema_id, 'saswp_array');
235
- $input1['name'] = saswp_remove_warnings($all_post_meta, 'saswp_music_album_name_'.$schema_id, 'saswp_array');
236
- $input1['description'] = saswp_remove_warnings($all_post_meta, 'saswp_music_album_description_'.$schema_id, 'saswp_array');
237
- $input1['genre'] = saswp_remove_warnings($all_post_meta, 'saswp_music_album_genre_'.$schema_id, 'saswp_array');
238
-
239
-
240
- if(isset($all_post_meta['saswp_music_album_artist_'.$schema_id][0])){
241
-
242
- $input1['byArtist']['@type'] = 'MusicGroup';
243
- $input1['byArtist']['name'] = $all_post_meta['saswp_music_album_artist_'.$schema_id][0];
244
-
245
- }
246
-