Schema & Structured Data for WP & AMP - Version 1.9.22

Version Description

(17 Jan 2020) =

  • Added: Pagination option in review collection
  • Added: Show review form on button click #713
  • Added: Compatibility of WP News Schema #709
  • Added: Collection to Attach reviews to this schema type section, #718
  • Added: ItemList schema type in main schema type dropdown #709
  • Added: Review, collection and accept review tab in review and collection post type menu #719
  • Fixed: Change the term "Taxonomy Terms" to "Taxonomy(Tag)" #697
  • Fixed: ACF compatibility does not work with ACF repeater fields #708
  • Fixed: ACF compatibility does not work with ACF repeater fields #708
  • Fixed: Role based access does not work properly with default role Administrator(Default)
  • Fixed: If review collection shortcode is in footer then markup is not loading. #699
  • Fixed: If review collection shortcode is in footer then markup is not loading. #699
  • Fixed: Organization schema appears twice when reviews exists #714
  • Fixed: Data tracking "Lear more" option redirecting to wrong tutorial. #727
  • Fixed: If price is not present in schema then offer should not show in schema markup. #723
  • Fixed: bbPress Compatiblity issue #724
  • Fixed: Division by zero #731
  • Fixed: Knowledge Graph Settings: Organization Type is optional but produce errors In Schema #720
  • Fixed: Notice & Warning fixes.
Download this release

Release Info

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

Code changes from version 1.9.21 to 1.9.22

Files changed (41) hide show
  1. admin_section/common-function.php +37 -33
  2. admin_section/css/amp/collection-front-grid.css +18 -0
  3. admin_section/css/amp/review-form.css +18 -1
  4. admin_section/css/collection-front.css +24 -0
  5. admin_section/css/collection-front.min.css +1 -1
  6. admin_section/css/main-style.css +124 -72
  7. admin_section/css/main-style.min.css +1 -1
  8. admin_section/css/review-form.css +7 -0
  9. admin_section/css/review-form.min.css +1 -1
  10. admin_section/js/functions-list.js +91 -21
  11. admin_section/js/functions-list.min.js +1 -1
  12. admin_section/js/main-script.js +193 -31
  13. admin_section/js/main-script.min.js +1 -1
  14. admin_section/js/review-form.js +5 -1
  15. admin_section/js/review-form.min.js +1 -1
  16. admin_section/settings.php +27 -8
  17. admin_section/structure_admin.php +1 -1
  18. admin_section/tracking/class-saswp-plugin-usage-tracker.php +3 -6
  19. core/array-list/compatibility-list.php +6 -0
  20. core/array-list/repeater-fields.php +4 -1
  21. core/array-list/schema-properties.php +39 -28
  22. core/array-list/schemas.php +1 -0
  23. core/global.php +57 -1
  24. modules/gutenberg/includes/class-gutenberg.php +3 -21
  25. modules/gutenberg/includes/render.php +11 -7
  26. modules/rating-box/backend.php +14 -12
  27. modules/rating-box/frontend.php +1 -1
  28. modules/reviews/reviews_collection.php +72 -34
  29. modules/reviews/reviews_form.php +17 -3
  30. modules/reviews/reviews_service.php +124 -150
  31. output/compatibility.php +7 -0
  32. output/function.php +136 -101
  33. output/markup.php +172 -33
  34. output/output.php +871 -589
  35. output/service.php +44 -14
  36. output/single.php +0 -620
  37. readme.txt +25 -1
  38. structured-data-for-wp.php +2 -3
  39. view/common.php +102 -49
  40. view/post_specific.php +189 -197
  41. view/schema_type.php +141 -26
admin_section/common-function.php CHANGED
@@ -19,21 +19,6 @@ if ( ! defined('ABSPATH') ) exit;
19
  add_action( 'plugins_loaded', 'saswp_defaultSettings' );
20
  add_action( 'wp_enqueue_scripts', 'saswp_frontend_enqueue' );
21
  add_action( 'amp_post_template_css','saswp_enqueue_amp_script');
22
-
23
-
24
- //global variable to store List of labels starts here
25
- $translation_labels = array(
26
- 'translation-pros' => 'Pros',
27
- 'translation-cons' => 'Cons',
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
- 'translation-name' => 'Name',
34
- 'translation-comment' => 'Comment',
35
- );
36
- //global variable to store List of labels ends here
37
 
38
  /**
39
  * Function to get manual translated text
@@ -2425,7 +2410,7 @@ function saswp_on_activation(){
2425
 
2426
  }
2427
 
2428
- $defaults = get_option('sd_data');
2429
 
2430
  $active_plugin = saswp_compatible_active_list();
2431
 
@@ -2588,7 +2573,8 @@ function saswp_remove_unwanted_notice_boxes(){
2588
  get_post_type() == 'saswp-collections' ||
2589
  $screen_id =='saswp_page_structured_data_options' ||
2590
  $screen_id =='edit-saswp' ||
2591
- $screen_id == 'saswp'
 
2592
  ){
2593
 
2594
  remove_all_actions('admin_notices');
@@ -2675,7 +2661,7 @@ function saswp_admin_notice(){
2675
 
2676
  function saswp_remove_anonymous_object_filter_or_action( $tag, $class, $method, $hook_type ){
2677
 
2678
- $filters = $GLOBALS['wp_filter'][ $tag ];
2679
  if ( empty ( $filters ) )
2680
  {
2681
  return;
@@ -2719,6 +2705,7 @@ function saswp_get_field_note($pname){
2719
 
2720
  $notes = array(
2721
  'easy_recipe' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/easyrecipe/">EasyRecipe</a>',
 
2722
  'strong_testimonials' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/strong-testimonials">Strong Testimonials</a>',
2723
  'wp_event_aggregator' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-event-aggregator/">WP Event Aggregator</a>',
2724
  'wordlift' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordlift/">WordLift</a>',
@@ -2756,7 +2743,7 @@ function saswp_get_field_note($pname){
2756
  'woocommerce_bookings' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce Bookings</a>',
2757
  'extra' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.elegantthemes.com/gallery/extra/">Extra Theme</a>',
2758
  'homeland' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/homeland-responsive-real-estate-theme-for-wordpress/6518965">Homeland</a>',
2759
- 'wpresidence' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wpresidence.net/">WP Residence</a>',
2760
  'realhomes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>',
2761
  'jannah' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/taqyeem-wordpress-review-plugin/4558799">Taqyeem</a>',
2762
  'soledad' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/soledad-multiconcept-blogmagazine-wp-theme/12945398">Soledad Theme</a>',
@@ -2871,19 +2858,6 @@ function saswp_get_capability_by_role($role){
2871
 
2872
  }
2873
 
2874
- function saswp_current_user_role(){
2875
-
2876
- if( is_user_logged_in() ) {
2877
-
2878
- $user = wp_get_current_user();
2879
- $role = (array) $user->roles;
2880
-
2881
- return $role[0];
2882
-
2883
- }
2884
-
2885
- }
2886
-
2887
  function saswp_current_user_allowed(){
2888
 
2889
  global $sd_data;
@@ -2917,7 +2891,7 @@ function saswp_post_type_capabilities(){
2917
 
2918
  $cap = saswp_current_user_can();
2919
 
2920
- if(saswp_current_user_role() != 'administrator'){
2921
 
2922
  $caplist = array(
2923
  'publish_posts' => $cap,
@@ -2957,4 +2931,34 @@ function saswp_get_image_by_id($image_id){
2957
 
2958
  return $response;
2959
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2960
  }
19
  add_action( 'plugins_loaded', 'saswp_defaultSettings' );
20
  add_action( 'wp_enqueue_scripts', 'saswp_frontend_enqueue' );
21
  add_action( 'amp_post_template_css','saswp_enqueue_amp_script');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  /**
24
  * Function to get manual translated text
2410
 
2411
  }
2412
 
2413
+ $defaults = get_option('sd_data', saswp_default_settings_array());
2414
 
2415
  $active_plugin = saswp_compatible_active_list();
2416
 
2573
  get_post_type() == 'saswp-collections' ||
2574
  $screen_id =='saswp_page_structured_data_options' ||
2575
  $screen_id =='edit-saswp' ||
2576
+ $screen_id == 'saswp' ||
2577
+ $screen_id == 'edit-saswp-collections'
2578
  ){
2579
 
2580
  remove_all_actions('admin_notices');
2661
 
2662
  function saswp_remove_anonymous_object_filter_or_action( $tag, $class, $method, $hook_type ){
2663
 
2664
+ $filters = $GLOBALS['wp_filter'][ $tag ];
2665
  if ( empty ( $filters ) )
2666
  {
2667
  return;
2705
 
2706
  $notes = array(
2707
  'easy_recipe' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/easyrecipe/">EasyRecipe</a>',
2708
+ 'wordpress_news' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="#">Wordpress News</a>',
2709
  'strong_testimonials' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/strong-testimonials">Strong Testimonials</a>',
2710
  'wp_event_aggregator' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wp-event-aggregator/">WP Event Aggregator</a>',
2711
  'wordlift' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/wordlift/">WordLift</a>',
2743
  'woocommerce_bookings' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wordpress.org/plugins/woocommerce/">Woocommerce Bookings</a>',
2744
  'extra' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://www.elegantthemes.com/gallery/extra/">Extra Theme</a>',
2745
  'homeland' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/homeland-responsive-real-estate-theme-for-wordpress/6518965">Homeland</a>',
2746
+ 'wpresidence' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://wpresidence.net/">WP Residence</a>',
2747
  'realhomes' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914">RealHomes</a>',
2748
  'jannah' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://codecanyon.net/item/taqyeem-wordpress-review-plugin/4558799">Taqyeem</a>',
2749
  'soledad' => esc_html__('Requires','schema-and-structured-data-for-wp').' <a target="_blank" href="https://themeforest.net/item/soledad-multiconcept-blogmagazine-wp-theme/12945398">Soledad Theme</a>',
2858
 
2859
  }
2860
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2861
  function saswp_current_user_allowed(){
2862
 
2863
  global $sd_data;
2891
 
2892
  $cap = saswp_current_user_can();
2893
 
2894
+ if(!is_super_admin()){
2895
 
2896
  $caplist = array(
2897
  'publish_posts' => $cap,
2931
 
2932
  return $response;
2933
 
2934
+ }
2935
+
2936
+ function saswp_is_date_field($date_str){
2937
+
2938
+ $response = false;
2939
+
2940
+ if (strpos($date_str, 'date_modified') !== false
2941
+ || strpos($date_str, 'date_published') !== false
2942
+ || strpos($date_str, 'published_date') !== false
2943
+ || strpos($date_str, 'video_upload_date') !== false
2944
+ || strpos($date_str, 'qa_date_created') !== false
2945
+ || strpos($date_str, 'accepted_answer_date_created') !== false
2946
+ || strpos($date_str, 'suggested_answer_date_created') !== false
2947
+ || strpos($date_str, 'priceValidUntil') !== false
2948
+ || strpos($date_str, 'priceValidUntil') !== false
2949
+ || strpos($date_str, 'priceValidUntil') !== false
2950
+ || strpos($date_str, 'start_date') !== false
2951
+ || strpos($date_str, 'end_date') !== false
2952
+ || strpos($date_str, 'validfrom') !== false
2953
+ || strpos($date_str, 'dateposted') !== false
2954
+ || strpos($date_str, 'validthrough') !== false
2955
+ || strpos($date_str, 'date_of_birth') !== false
2956
+ || strpos($date_str, 'date_created') !== false
2957
+ || strpos($date_str, 'created_date') !== false
2958
+ ) {
2959
+ $response = true;
2960
+ }
2961
+
2962
+ return $response;
2963
+
2964
  }
admin_section/css/amp/collection-front-grid.css CHANGED
@@ -1,4 +1,22 @@
1
  /** Review Design 1 **/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  .saswp-r1 ul{
3
  padding:0px;
4
  list-style-type:none;
1
  /** Review Design 1 **/
2
+
3
+ .saswp-grid-pagination{
4
+ display: inline-block;
5
+ padding: 20px;
6
+ }
7
+ .saswp-grid-pagination a{
8
+ color: black;
9
+ float: left;
10
+ padding: 8px 16px;
11
+ text-decoration: none;
12
+ }
13
+ .saswp-grid-pagination a.active {
14
+ background-color: #4CAF50;
15
+ color: white;
16
+ }
17
+ .saswp-grid-pagination a:hover:not(.active) {
18
+ background-color: #ddd;
19
+ }
20
  .saswp-r1 ul{
21
  padding:0px;
22
  list-style-type:none;
admin_section/css/amp/review-form.css CHANGED
@@ -54,7 +54,24 @@ Rating css starts here
54
  height: 16px;
55
  background-repeat: no-repeat;
56
  }
57
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  /*
60
  Rating css ends here
54
  height: 16px;
55
  background-repeat: no-repeat;
56
  }
57
+
58
+ .saswp-rv-form-btn{
59
+ padding:10px;
60
+ text-align: center;
61
+
62
+ }
63
+ .saswp-rv-form-btn span{
64
+ background: #005be2;
65
+ cursor: pointer;
66
+ padding: 12px 25px 12px 25px;
67
+ color: #fff;
68
+ border: none;
69
+ cursor: pointer;
70
+ font-size: 15px;
71
+ }
72
+ .saswp_hide{
73
+ display: none;
74
+ }
75
 
76
  /*
77
  Rating css ends here
admin_section/css/collection-front.css CHANGED
@@ -1,4 +1,28 @@
1
  /** Widgest Reviews CSS **/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  .widget .saswp-glg-review-body{
3
  display: inline-block;
4
  width: 100%;
1
  /** Widgest Reviews CSS **/
2
+ .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==)}
3
+ .saswp-r{
4
+ font-family: sans-serif;
5
+ margin-top:30px;
6
+ }
7
+ .saswp-grid-pagination{
8
+ display: inline-block;
9
+ padding: 20px;
10
+ }
11
+ .saswp-grid-pagination a{
12
+ color: black;
13
+ float: left;
14
+ padding: 8px 16px;
15
+ text-decoration: none;
16
+ box-shadow: 0 0px 0 0;
17
+ }
18
+ .saswp-grid-pagination a.active {
19
+ background-color: #4CAF50;
20
+ color: white;
21
+ }
22
+ .saswp-grid-pagination a:hover:not(.active) {
23
+ background-color: #ddd;
24
+ }
25
+
26
  .widget .saswp-glg-review-body{
27
  display: inline-block;
28
  width: 100%;
admin_section/css/collection-front.min.css CHANGED
@@ -1 +1 @@
1
- .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:1fr 1fr 1fr 1fr;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-r .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-rng{flex:1 0 60%;padding-left:15px}.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}}
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-r{font-family:sans-serif;margin-top:30px}.saswp-grid-pagination{display:inline-block;padding:20px}.saswp-grid-pagination a{color:#000;float:left;padding:8px 16px;text-decoration:none;box-shadow:0 0}.saswp-grid-pagination a.active{background-color:#4caf50;color:#fff}.saswp-grid-pagination a:hover:not(.active){background-color:#ddd}.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:1fr 1fr 1fr 1fr;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-r .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-rng{flex:1 0 60%;padding-left:15px}.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,33 @@ and open the template in the editor.
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;
@@ -43,6 +70,10 @@ and open the template in the editor.
43
  color: #ef6c00 !important;
44
  }
45
 
 
 
 
 
46
  .saswp_hide{
47
  display: none;
48
  }
@@ -246,7 +277,7 @@ Tooltip css ends here
246
  float:right;
247
  }
248
  .saswp-settings-first-div{
249
- width: 92%;
250
  }
251
  .saswp-settings-container{
252
  display: inline-flex;
@@ -256,7 +287,7 @@ Tooltip css ends here
256
  float: right;
257
  position: relative;
258
  top: 20px;
259
- margin-right: 30px;
260
  margin-top: 37px;
261
  }
262
  .saswp-feedback-panel{
@@ -385,8 +416,7 @@ clear: both;
385
  display: inline-block;
386
  width: 25%;
387
  vertical-align: top;
388
- box-sizing: border-box;
389
- padding-right:10px;
390
  }
391
  .saswp-post-specific-container{
392
  display: inline-block;
@@ -396,22 +426,28 @@ clear: both;
396
  .saswp-post-specific-wrapper{
397
  padding: 10px;
398
  }
399
- .saswp-tab a.selected {
400
- background-color: #ccc;
 
401
  }
402
  .saswp-tab-links{
403
  display: block;
404
- background-color: inherit;
405
- color: black;
406
- padding: 6px 10px;
407
- outline: none;
408
  text-align: left;
409
  cursor: pointer;
410
- transition: 0.3s;
411
  font-size: 15px;
412
- width: 130px;
413
  overflow: hidden;
414
- margin-right: 10px;
 
 
 
 
 
 
 
415
  }
416
  .saswp-star-rating{
417
  cursor: pointer;
@@ -527,10 +563,10 @@ Compatibility tab css ends
527
  On/Off Buttons starts here
528
  */
529
  .saswp-switch {
530
- position: relative;
531
  display: inline-block;
532
- width: 40px;
533
- height: 22px;
534
  border: 20px;
535
  }
536
 
@@ -541,31 +577,31 @@ On/Off Buttons starts here
541
  }
542
 
543
  .saswp-slider {
544
- position: absolute;
545
- cursor: pointer;
546
- top: 0;
547
- left: 0;
548
- right: 0;
549
- bottom: 0;
550
- background-color: #5a6783;
551
- transition: .4s;
552
- border-radius: 20px;
553
  }
554
 
555
  .saswp-slider:before {
556
  position: absolute;
557
  content: "";
558
- height: 15px;
559
- width: 15px;
560
- left: 4px;
561
- bottom: 4px;
562
- background-color: white;
563
  transition: .4s;
564
  border-radius: 20px;
565
  }
566
 
567
  input:checked + .saswp-slider {
568
- background-color: #61bd3b;
569
  border-radius: 30px;
570
  }
571
 
@@ -586,17 +622,20 @@ input:checked + .saswp-slider:before {
586
  .saswp-slider.saswp-round:before {
587
  border-radius: 50%;
588
  }
589
-
 
 
 
590
  .saswp-tab-nav li{
591
  display: flex;
592
  align-items: center;
593
  justify-content: space-between;
594
- margin-bottom:10px;
595
- border-bottom: 1px solid #eee;
596
  }
597
 
598
- .saswp-tab-nav .selected{
599
- background-color: #ccc;
 
600
  }
601
  .saswp-single-post-restore .saswp-switch{
602
  height: 28px;
@@ -981,12 +1020,13 @@ Google review module ends here
981
 
982
  /*** Upgrade Pro CSS ***/
983
  .saswp-upgrade-pro{
984
- background: #fff;
985
  padding: 25px;
986
  border: 1px solid #d8d8d8;
987
  display: inline-block;
988
  margin-top: 10px;
989
- width: 81%;
 
990
  }
991
  .saswp-upgrade-pro h2{
992
  font-size: 20px;
@@ -1304,6 +1344,23 @@ a.saswp-revws-lnk{
1304
  /*
1305
  Collection css starts here
1306
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1307
  .saswp-collection-body{
1308
  width:100%;
1309
  display:flex;
@@ -1363,11 +1420,11 @@ Collection css starts here
1363
  padding:0px 30px;
1364
  }
1365
 
1366
-
1367
  /** Review Design 1 **/
1368
 
1369
  .saswp-r1{
1370
  margin-bottom:50px;
 
1371
  }
1372
  .saswp-r1 ul{
1373
  padding:0px;
@@ -1428,6 +1485,7 @@ Collection css starts here
1428
  line-height: 1.1;
1429
  letter-spacing: 0;
1430
  width:80%;
 
1431
  }
1432
  .saswp-rc-dt{
1433
  margin-top:5px;
@@ -2211,14 +2269,6 @@ span.saswp-mines{
2211
  }
2212
  }
2213
  /*** Upgrade Pro CSS starts here***/
2214
- .saswp-upgrade-pro{
2215
- background: #fff;
2216
- padding: 25px;
2217
- border: 1px solid #d8d8d8;
2218
- display: inline-block;
2219
- margin-top: 10px;
2220
- width: 81%;
2221
- }
2222
  .saswp-upgrade-pro h2{
2223
  font-size: 20px;
2224
  margin: 0;
@@ -2237,17 +2287,6 @@ span.saswp-mines{
2237
  line-height: 1.4;
2238
  margin-bottom: 10px;
2239
  }
2240
- .saswp-upgrade-pro ul li:before {
2241
- content: "";
2242
- background-image: url(../images/check.png);
2243
- background-repeat: no-repeat;
2244
- background-size: 20px;
2245
- width: 20px;
2246
- height: 20px;
2247
- position: absolute;
2248
- left: 2px;
2249
- top: 2px;
2250
- }
2251
  .saswp-upgrade-pro a{
2252
  background: #d2150a;
2253
  padding: 10px 0px;
@@ -2321,18 +2360,6 @@ span.saswp-mines{
2321
  .saswp-settings-second-div a{
2322
  text-decoration: none;
2323
  }
2324
- .saswp-upgrade-pro ul li:before{
2325
- content: "\f147";
2326
- background-repeat: no-repeat;
2327
- font-family: dashicons;
2328
- position: absolute;
2329
- color: #46b450;
2330
- font-size: 25px;
2331
- left: 0px;
2332
- line-height: 1;
2333
- top: 0px;
2334
- }
2335
-
2336
  /* Add review thickbox csss starts here */
2337
 
2338
  .saswp-thick-box-container{
@@ -2341,17 +2368,42 @@ span.saswp-mines{
2341
  #saswp-add-rv-manual{
2342
  padding: 10px;
2343
  }
2344
- #saswp-add-rv-automatic{
2345
  padding: 10px;
2346
  box-sizing: border-box;
2347
  width: 100%;
2348
  overflow-y: scroll;
2349
  height: 260px;
2350
  }
2351
- .saswp-add-rv-loop{
2352
  padding-bottom: 10px;
2353
  }
2354
  .saswp-add-rv-title{
2355
  padding: 10px;
2356
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2357
  /* Add review thickbox csss ends here */
7
  Created on : Jul 27, 2018, 5:36:26 PM
8
  Author : Magazine3
9
  */
10
+ .saswp_review_form_toggle_check{
11
+ margin:10px !important;
12
+ }
13
+ .saswp-show-form-on-tab{
14
+ padding: 5px;
15
+ display: inline-block;
16
+ width: 100%;
17
+ }
18
+ .saswp-show-form-on-tab strong{
19
+ display: inline-block;
20
+ width: 30%;
21
+ }
22
+ .saswp-show-form-on-tab input{
23
+ width: 45%;
24
+ text-align: center;
25
+ }
26
+ .saswp-disable-btn-container{
27
+ float: right;
28
+ padding:10px;
29
+ }
30
+ .saswp-disable-label{
31
+ padding: 10px;
32
+ color: #999;
33
+ }
34
+ .saswp-setup-schema-btn{
35
+ margin: 5px !important;
36
+ }
37
  .saswp-static-container .spinner{
38
  padding: 5px;
39
  float: none;
70
  color: #ef6c00 !important;
71
  }
72
 
73
+ .saswp_hide_imp{
74
+ display: none !important;
75
+ }
76
+
77
  .saswp_hide{
78
  display: none;
79
  }
277
  float:right;
278
  }
279
  .saswp-settings-first-div{
280
+ width: 75%;
281
  }
282
  .saswp-settings-container{
283
  display: inline-flex;
287
  float: right;
288
  position: relative;
289
  top: 20px;
290
+ margin-right: 0;
291
  margin-top: 37px;
292
  }
293
  .saswp-feedback-panel{
416
  display: inline-block;
417
  width: 25%;
418
  vertical-align: top;
419
+ box-sizing: border-box;
 
420
  }
421
  .saswp-post-specific-container{
422
  display: inline-block;
426
  .saswp-post-specific-wrapper{
427
  padding: 10px;
428
  }
429
+ .saswp-tab a.selected {
430
+ color: #555;
431
+ background-color: #fff;
432
  }
433
  .saswp-tab-links{
434
  display: block;
435
+ padding: 12px 14px;
436
+ outline: 0;
 
 
437
  text-align: left;
438
  cursor: pointer;
439
+ transition: .3s;
440
  font-size: 15px;
441
+ width: 100%;
442
  overflow: hidden;
443
+ box-shadow: none;
444
+ text-decoration: none;
445
+ line-height: 20px!important;
446
+ border-bottom: 1px solid #eee;
447
+ }
448
+ #post_specific .inside{
449
+ padding: 0px;
450
+ margin: 0px;
451
  }
452
  .saswp-star-rating{
453
  cursor: pointer;
563
  On/Off Buttons starts here
564
  */
565
  .saswp-switch {
566
+ position: relative;
567
  display: inline-block;
568
+ width: 30px;
569
+ height: 16px;
570
  border: 20px;
571
  }
572
 
577
  }
578
 
579
  .saswp-slider {
580
+ position: absolute;
581
+ cursor: pointer;
582
+ top: 0;
583
+ left: 0;
584
+ right: 0;
585
+ bottom: 0;
586
+ background-color: #b5b5b5;
587
+ transition: .4s;
588
+ border-radius: 20px;
589
  }
590
 
591
  .saswp-slider:before {
592
  position: absolute;
593
  content: "";
594
+ height: 10px;
595
+ width: 10px;
596
+ left: 2px;
597
+ bottom: 3px;
598
+ background-color: #fff;
599
  transition: .4s;
600
  border-radius: 20px;
601
  }
602
 
603
  input:checked + .saswp-slider {
604
+ background-color: #00a0d2;
605
  border-radius: 30px;
606
  }
607
 
622
  .saswp-slider.saswp-round:before {
623
  border-radius: 50%;
624
  }
625
+ .saswp-tab-nav{
626
+ background-color: #f9f9f9;
627
+ margin-top: 0px;
628
+ }
629
  .saswp-tab-nav li{
630
  display: flex;
631
  align-items: center;
632
  justify-content: space-between;
633
+ margin-bottom:0px;
 
634
  }
635
 
636
+ .saswp-tab-nav .selected{
637
+ width: 100.5%;
638
+ z-index: 9999;
639
  }
640
  .saswp-single-post-restore .saswp-switch{
641
  height: 28px;
1020
 
1021
  /*** Upgrade Pro CSS ***/
1022
  .saswp-upgrade-pro{
1023
+ background: #fff;
1024
  padding: 25px;
1025
  border: 1px solid #d8d8d8;
1026
  display: inline-block;
1027
  margin-top: 10px;
1028
+ width: 100%;
1029
+ box-sizing: border-box;
1030
  }
1031
  .saswp-upgrade-pro h2{
1032
  font-size: 20px;
1344
  /*
1345
  Collection css starts here
1346
  */
1347
+ .saswp-grid-pagination{
1348
+ display: inline-block;
1349
+ padding: 20px;
1350
+ }
1351
+ .saswp-grid-pagination a{
1352
+ color: black;
1353
+ float: left;
1354
+ padding: 8px 16px;
1355
+ text-decoration: none;
1356
+ }
1357
+ .saswp-grid-pagination a.active {
1358
+ background-color: #4CAF50;
1359
+ color: white;
1360
+ }
1361
+ .saswp-grid-pagination a:hover:not(.active) {
1362
+ background-color: #ddd;
1363
+ }
1364
  .saswp-collection-body{
1365
  width:100%;
1366
  display:flex;
1420
  padding:0px 30px;
1421
  }
1422
 
 
1423
  /** Review Design 1 **/
1424
 
1425
  .saswp-r1{
1426
  margin-bottom:50px;
1427
+ text-align: center;
1428
  }
1429
  .saswp-r1 ul{
1430
  padding:0px;
1485
  line-height: 1.1;
1486
  letter-spacing: 0;
1487
  width:80%;
1488
+ text-align: left;
1489
  }
1490
  .saswp-rc-dt{
1491
  margin-top:5px;
2269
  }
2270
  }
2271
  /*** Upgrade Pro CSS starts here***/
 
 
 
 
 
 
 
 
2272
  .saswp-upgrade-pro h2{
2273
  font-size: 20px;
2274
  margin: 0;
2287
  line-height: 1.4;
2288
  margin-bottom: 10px;
2289
  }
 
 
 
 
 
 
 
 
 
 
 
2290
  .saswp-upgrade-pro a{
2291
  background: #d2150a;
2292
  padding: 10px 0px;
2360
  .saswp-settings-second-div a{
2361
  text-decoration: none;
2362
  }
 
 
 
 
 
 
 
 
 
 
 
 
2363
  /* Add review thickbox csss starts here */
2364
 
2365
  .saswp-thick-box-container{
2368
  #saswp-add-rv-manual{
2369
  padding: 10px;
2370
  }
2371
+ #saswp-add-rv-automatic, #saswp-add-rv-collection{
2372
  padding: 10px;
2373
  box-sizing: border-box;
2374
  width: 100%;
2375
  overflow-y: scroll;
2376
  height: 260px;
2377
  }
2378
+ .saswp-add-rv-loop, .saswp-add-collection-loop{
2379
  padding-bottom: 10px;
2380
  }
2381
  .saswp-add-rv-title{
2382
  padding: 10px;
2383
  }
2384
+ .close-attached-reviews-popup{
2385
+ float: right;
2386
+ margin-right: 20px !important;
2387
+ }
2388
+ .saswp-add-rv-note{
2389
+ padding-bottom: 10px;
2390
+ }
2391
+ .saswp-accept-rv-container{
2392
+ margin-right: 20px;
2393
+ }
2394
+ .saswp-post-specific-setting{
2395
+ border-bottom: 1px solid #eee;
2396
+ text-align: center;
2397
+ padding-bottom: 10px;
2398
+
2399
+ }
2400
+ .saswp-ps-text{
2401
+ padding: 20px 5px;
2402
+ }
2403
+ .saswp-ps-text span{
2404
+ font-weight:600;
2405
+ }
2406
+ .saswp-ps-toggle{
2407
+ padding: 10px;
2408
+ }
2409
  /* Add review thickbox csss ends here */
admin_section/css/main-style.min.css CHANGED
@@ -1 +1 @@
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{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#000;font-weight:500;margin-bottom:-1px}#saswp-global-tabs a{cursor:pointer}#saswp-global-tabs{padding-left:5px}#saswp-tools-tabs a{cursor:pointer}#saswp-review-tabs a{cursor:pointer}#saswp-tools-tabs{padding-left:5px}.saswp-need-help{padding-left:60px}.saswp-heading{display:inline-flex;align-items:baseline}.saswp-heading h2{margin-bottom:0}.saswp-view-docs a{margin-right:5px!important;margin-top:10px!important;float:right}.saswp-tabs .nav-tab{margin-left:4px}.saswp-panel{padding:7px 18px;background-color:#fff;box-shadow:0 0 20px 1px #d2cccc}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-input-fields select{width:100%}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-str{display:inline-block;width:100%;vertical-align:middle}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700;display:inline-block;vertical-align:middle}.saswp-r5-rng .saswp-rvw-str{display:inline-block;vertical-align:middle;padding-left:10px;width:auto}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px;border-radius:100%}.saswp-premium_features table th,.saswp-services table th{width:auto;padding:0}.saswp-features-blocks{display:inline-grid;grid-template-columns:1fr 1fr;grid-gap:20px}.saswp-features-blocks li{background:#fff;padding:25px;border:1px solid #d8d8d8}.saswp-features-blocks li a{text-decoration:none}.saswp-ele-ic{border-radius:256px;display:inline-block;padding:8px 10px 8px 10px;width:70px;margin-right:20px;height:70px;float:left}.saswp-ele-ic img{width:80%;left:10%;position:relative;top:9%}.saswp-ele-1{background:#96588a}.saswp-ele-2{background:#00a97e}.saswp-ele-3{background:#cacaca}.saswp-ele-4{background:#9c56cc}.saswp-ele-tlt h3{margin:0;font-size:18px;line-height:1.4}.saswp-ele-tlt p{margin-top:10px}.saswp-sts-btn{box-sizing:border-box;height:52px;margin-top:20px;padding:6px 15px;border:1px solid #e5e5e5;border-radius:3px;display:flex;align-items:center;justify-content:space-between}.saswp-d-btn{background:#d2150a;padding:6px 18px;border-radius:30px;font-size:14px;color:#fff}.form-wrap .saswp-sts-txt{font-size:16px;color:#000}.saswp-sts-txt span{color:#bebfc0;padding-left:5px}.saswp_review_platform .saswp-g-plus{float:left}.saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%;margin-top:5px}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px;width:100%}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px;width: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}.saswp-thick-box-container{width:580px}#saswp-add-rv-manual{padding:10px}#saswp-add-rv-automatic{padding:10px;box-sizing:border-box;width:100%;overflow-y:scroll;height:260px}.saswp-add-rv-loop{padding-bottom:10px}.saswp-add-rv-title{padding:10px}
1
+ .saswp_review_form_toggle_check{margin:10px!important}.saswp-show-form-on-tab{padding:5px;display:inline-block;width:100%}.saswp-show-form-on-tab strong{display:inline-block;width:30%}.saswp-show-form-on-tab input{width:45%;text-align:center}.saswp-disable-btn-container{float:right;padding:10px}.saswp-disable-label{padding:10px;color:#999}.saswp-setup-schema-btn{margin:5px!important}.saswp-static-container .spinner{padding:5px;float:none;margin:0 auto;display:block}.saswp-item-list-div{display:flex;width:100%;align-items:center}.saswp-enable-modify-schema{padding-top:10px;padding-left:10px}.saswp-enable-modify-schema strong{margin-right:10px}.saswp-item-list-div{display:flex;width:100%;align-items:center}#saswp_item_list_tags{width:100%;margin-left:10px}#saswp_item_list_custom{width:100%;margin-left:10px}.saswp_warning{color:#ef6c00!important}.saswp_hide_imp{display:none!important}.saswp_hide{display:none}.saswp-general table th{width:auto;font-weight:600;padding:0}.saswp-general table{margin-top:0}.saswp-general table td{padding:5px}.saswp-knowledge table th{width:auto;padding:0}.saswp-knowledge table{margin-top:0}.saswp-knowledge table td{padding:5px}.saswp-schema table th{width:auto;padding:0}.saswp-schema table{margin-top:0}.saswp-schema table td{padding:5px}.saswp-amp table th{width:auto;padding:0}.saswp-amp table{margin-top:0}.saswp-amp table td{padding:5px}.saswp-help table th{width:auto;padding:0}.saswp-support table th{width:auto;padding:0}.saswp-review table th{width:auto;padding:0}.saswp-help table{margin-top:0}.saswp-help table td{padding:5px}.saswp-settings-list{display:inline-block;width:100%}.saswp-settings-list li{padding-left:0}.saswp-settings-list li div label{font-weight:600}.saswp-general h2{margin-bottom:0}.saswp-knowledge h2{margin-bottom:0}.saswp-schema h2{margin-bottom:0}.saswp-help h2{margin-bottom:0}.saswp-settings-form p.submit{margin-top:0}.saswp_qanda_p{font-weight:500}.saswp-display-none{display:none!important}.saswp-placement-groups{border:1px solid #e5e5e5}.saswp-query-success{color:#060}.saswp-query-error{color:#bf3322}.saswp-tools table th{width:auto;padding:0}.saswp-tools table{margin-top:0}.saswp-tools table td{padding:5px}.saswp-tools-field-title strong{padding-right:130px}.saswp-tools .saswp-tooltip{width:230px}.saswp-tools .saswp-knowledge-label{float:left}.saswp-error{color:red!important}.saswp-tooltip{position:relative;display:inline-block}.saswp-tooltip .saswp-tooltiptext{visibility:hidden;width:200px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:100%;left:50%;margin-left:-25px}.saswp-tooltiptext::after{content:"";position:absolute;top:100%;left:10%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#000 transparent transparent transparent}.saswp-knowledge-base .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-knowledge-base .saswp-knowledge-field{width:75%;float:right}.saswp-social-fileds ul{display:grid;grid-template-columns:26.5% 1fr}.saswp-social-fileds li{display:flex}.saswp-social-fileds .saswp-knowledge-field{width:100%;margin-left:10px}.saswp-social-fileds .saswp-knowledge-field input{float:right;margin:inherit}.saswp-schema-type-fields .saswp-knowledge-label{width:200px;float:left;clear:both}.saswp-schema-type-fields .saswp-knowledge-field{width:75%;float:right}.saswp-settings-first-div{width:75%}.saswp-settings-container{display:inline-flex;width:100%}.saswp-settings-second-div{float:right;position:relative;top:20px;margin-right:0;margin-top:37px}.saswp-feedback-panel{height:200px;width:280px;background:#fff;position:relative}.saswp-start-quck-setup{position:relative;float:inherit;top:7px;left:15px}.saswp-feedback-panel ul{list-style-type:circle;list-style:decimal;padding-left:30px;font-size:15px}.saswp-feedback-panel a{text-decoration:none}.saswp-feedback-panel h2{text-align:center;padding-top:18px}.saswp-social-sharing-buttons{text-align:center;padding-top:20px}.saswp-facebook-share{background:#3b5998;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-right:5px}.saswp-social-sharing-buttons a{text-align:center;padding:8px}.twitter-share-button{background:#1b95e0!important;box-shadow:0 0 0 #1b95e0!important;color:#fff!important;line-height:20px!important;height:21px!important;border-radius:3px;margin-left:5px}.saswp-placement-button{padding:3px 10px;color:#0d0d0d;font-size:14px;border:1px solid #aaa;border-radius:2px;background:linear-gradient(#ededed,#fff)}.saswp-placement-table td{padding:5px 10px!important}.saswp-archive-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-archive-div .saswp-knowledge-label{float:left;clear:both}.saswp-amp .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-amp .saswp-knowledge-label{float:left;clear:both}.saswp-review .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-review .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-compativility-div .saswp-knowledge-label{float:left;clear:both}.saswp-compativility-div li{display:inline-flex}.saswp-seller-div .saswp-knowledge-label{float:left;clear:both}.saswp-seller-div .saswp-knowledge-field{float:left;width:70%}.saswp-post-specific-tab-wrapper{display:inline-block;width:25%;vertical-align:top;box-sizing:border-box}.saswp-post-specific-container{display:inline-block;width:calc(75% - 1px);border-left:1px solid #eee}.saswp-post-specific-wrapper{padding:10px}.saswp-tab a.selected{color:#555;background-color:#fff}.saswp-tab-links{display:block;padding:12px 14px;outline:0;text-align:left;cursor:pointer;transition:.3s;font-size:15px;width:100%;overflow:hidden;box-shadow:none;text-decoration:none;line-height:20px!important;border-bottom:1px solid #eee}#post_specific .inside{padding:0;margin:0}.saswp-star-rating{cursor:pointer}.saswp-post-specific-wrapper select{width:100%}.saswp-review-tables{width:100%}.saswp-over-all-raring{float:right}.saswp-review-pros-and-cons{position:relative;clear:both}.saswp-review-pros-and-cons>div:first{padding-left:10px}.saswp-review-pros-and-cons>div{width:49%;display:inline-block}.saswp-review-pros-and-cons>div:nth-child(2){padding-left:12px}.saswp-wp-ediot-desc{margin-bottom:-23px;display:block}.saswp-review-description{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saswp-review-pros-and-cons{margin-top:40px;padding-top:10px;border-top:1px solid #eee}.saspw-review-item-list{margin-top:20px;border-top:1px solid #eee}.saswp-review-item-list-table{padding-bottom:10px}#sasw-review input[type=text]{width:180px}#sasw-review input[type=number]{width:180px}#saswp-review-item-enable{width:10px}.saswp-enable-review-on-post{padding-bottom:10px}.saswp-enable-review-on-post label{font-weight:500}.saswp-compatibility table th{width:auto;padding:0}.saswp-compatibility .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-label{float:left;clear:both}.saswp-tools .saswp-knowledge-field{float:right;width:69%;padding-bottom: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:30px;height:16px;border:20px}.saswp-switch input{opacity:0;width:0;height:0}.saswp-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#b5b5b5;transition:.4s;border-radius:20px}.saswp-slider:before{position:absolute;content:"";height:10px;width:10px;left:2px;bottom:3px;background-color:#fff;transition:.4s;border-radius:20px}input:checked+.saswp-slider{background-color:#00a0d2;border-radius:30px}input:focus+.saswp-slider{box-shadow:0 0 1px #2196f3}input:checked+.saswp-slider:before{transform:translateX(15px)}.saswp-slider.saswp-round{border-radius:34px}.saswp-slider.saswp-round:before{border-radius:50%}.saswp-tab-nav{background-color:#f9f9f9;margin-top:0}.saswp-tab-nav li{display:flex;align-items:center;justify-content:space-between;margin-bottom:0}.saswp-tab-nav .selected{width:100.5%;z-index:9999}.saswp-single-post-restore .saswp-switch{height:28px}.saswp-single-post-restore .saswp-slider:before{height:20px}.option-table-class{width:100%}.option-table-class tr td{padding:10px 10px 10px 10px}.option-table-class tr>td{width:30%}.option-table-class tr td:last-child{width:60%}.saswp-custom-fields-table{width:100%}.saswp-custom-fields-table input{width:100%}.saswp-custom-fields-table tr td{padding:10px 10px 10px 10px}.saswp-custom-fields-table td{width:30%;vertical-align:top}.saswp-option-table-class input[type=text],.saswp-option-table-class select{width:100%}.saswp-paywall-table-class input[type=text],.saswp-paywall-table-class select{width:100%}.saswp-email_schema table th{width:auto;padding:0}.saswp-email_schema .saswp-knowledge-label{float:left;clear:both}.saswp-email_schema .saswp-knowledge-field{float:right;width:75%;padding-bottom:10px}.saswp-add-on-plugin label{margin-top:10px}.saswp-add-on-plugin span{width:250px;display:inline-block}.saswp-knowledge-label label[for=saswp_search_box_schema_checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-booking-checkbox]{padding-left:10px}.saswp-knowledge-label label[for=saswp-woocommerce-membership-checkbox]{padding-left:10px}.saswp-global-selected{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#000;font-weight:500;margin-bottom:-1px}#saswp-global-tabs a{cursor:pointer}#saswp-global-tabs{padding-left:5px}#saswp-tools-tabs a{cursor:pointer}#saswp-review-tabs a{cursor:pointer}#saswp-tools-tabs{padding-left:5px}.saswp-need-help{padding-left:60px}.saswp-heading{display:inline-flex;align-items:baseline}.saswp-heading h2{margin-bottom:0}.saswp-view-docs a{margin-right:5px!important;margin-top:10px!important;float:right}.saswp-tabs .nav-tab{margin-left:4px}.saswp-panel{padding:7px 18px;background-color:#fff;box-shadow:0 0 20px 1px #d2cccc}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-input-fields select{width:100%}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px}.saswp-rtng{padding-left:5px;font-size:14px}.saswp-pt-dt{font-size:12px;color:#999;font-weight:600;margin-top:5px;display:inline-block}.saswp-str{display:inline-block;width:100%;vertical-align:middle}.saswp-athr{font-size:15px;line-height:1.4;color:#000;font-weight:700;display:inline-block;vertical-align:middle}.saswp-r5-rng .saswp-rvw-str{display:inline-block;vertical-align:middle;padding-left:10px;width:auto}.saswp-rv-cnt p{font-size:16px;line-height:1.6;color:#000;margin:10px 0 0 0}.saswp-rv-img img{max-width:100px;border-radius:100%}.saswp-premium_features table th,.saswp-services table th{width:auto;padding:0}.saswp-features-blocks{display:inline-grid;grid-template-columns:1fr 1fr;grid-gap:20px}.saswp-features-blocks li{background:#fff;padding:25px;border:1px solid #d8d8d8}.saswp-features-blocks li a{text-decoration:none}.saswp-ele-ic{border-radius:256px;display:inline-block;padding:8px 10px 8px 10px;width:70px;margin-right:20px;height:70px;float:left}.saswp-ele-ic img{width:80%;left:10%;position:relative;top:9%}.saswp-ele-1{background:#96588a}.saswp-ele-2{background:#00a97e}.saswp-ele-3{background:#cacaca}.saswp-ele-4{background:#9c56cc}.saswp-ele-tlt h3{margin:0;font-size:18px;line-height:1.4}.saswp-ele-tlt p{margin-top:10px}.saswp-sts-btn{box-sizing:border-box;height:52px;margin-top:20px;padding:6px 15px;border:1px solid #e5e5e5;border-radius:3px;display:flex;align-items:center;justify-content:space-between}.saswp-d-btn{background:#d2150a;padding:6px 18px;border-radius:30px;font-size:14px;color:#fff}.form-wrap .saswp-sts-txt{font-size:16px;color:#000}.saswp-sts-txt span{color:#bebfc0;padding-left:5px}.saswp_review_platform .saswp-g-plus{float:left}.saswp-pc-wrap{background-color:#004f74;padding:15px 15px 15px 30px;color:#fff;display:inline-flex;width:100%;flex-wrap:wrap;margin-bottom:20px}.saswp-pc-wrap .saswp-lst span{font-size:18px;font-weight:500;margin-bottom:10px;display:inline-block;line-height:1.3}.saswp-pc-wrap .saswp-lst{flex:1 0 42%}.saswp-pc-wrap .saswp-lst ul{margin:0}.saswp-pc-wrap .saswp-lst p{list-style-type:none;font-size:15px;font-weight:lighter;line-height:1.2;margin-bottom:10px;position:relative;padding-left:20px;color:#eee}.saswp-pc-wrap .saswp-lst p:before{content:'';position:absolute;width:8px;height:8px;background-color:#ccc;left:0;top:6px;border-radius:10px}.sgl .saswp-rvw{width:100%;margin-bottom:34px;font-size:13px;border-bottom:1px solid #ededed}.saswp-rvw-hd span,.saswp-rvw-sm span{background-color:#222;color:#fff;display:inline-block;font-size:15px}.saswp-rvw-hd span{line-height:1.4;padding:8px 12px 6px;margin:26px 0}.saswp-rvw td{padding:7px 14px}.saswp-rvw td,.sgl table td{border:1px solid #ededed}.saswp-rvw tbody{width:100%}.saswp-rvw-sm span{padding:8px 12px 6px;margin-bottom:13px;position:relative;line-height:1.2}.saswp-rvw-fs{line-height:1.5;font-size:48px;font-weight:600;margin-bottom:5px}.saswp-rvw-ov .ovs{font-size:11px;font-weight:600}.sgl .saswp-rvw tr td{background:#fff;width:100%}.sgl .saswp-rvw tr:hover td{background-color:#fcfcfc}.saswp-rvw .saswp-rvw-sm{padding:21px 14px}.str-ic{font-size:18px;line-height:1.2}.saswp-rvw-str{display:inline-flex;width:100%;margin-top:5px}.saswp-rvw-str .df-clr,.saswp-rvw-str .half-str,.saswp-rvw-str .str-ic{display:inline-block;width:20px;height:16px;background-repeat:no-repeat}.saswp-rvw-ov{text-align:center}.saswp-rvw-str .half-str{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBkPSJNNDgyLjIwNywxODYuOTczbC0xNTkuNjk5LTMzLjcwNUwyNDEuMTA0LDExLjgwM2wtODEuNDA0LDE0MS40NjVMMCwxODYuOTczbDEwOS4zODgsMTIxLjEzNEw5Mi4wOTQsNDcwLjQwNGwxNDkuMDEtNjYuNiAgbDE0OS4wMSw2Ni42bC0xNy4yOTQtMTYyLjI5Nkw0ODIuMjA3LDE4Ni45NzN6IE0yNDEuMTA0LDM3MC45NDNWNzEuOTUzbDYyLjA5LDEwNy45TDQyNSwyMDUuNTYxbC04My40MzMsOTIuMzkzbDEzLjE5MSwxMjMuNzg4ICBMMjQxLjEwNCwzNzAuOTQzeiIgZmlsbD0iI2ZmZDcwMCIvPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K)}.saswp-rvw-str .str-ic{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiNmZmQ3MDAiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-rvw-str .df-clr{background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCA0ODIuMjA3IDQ4Mi4yMDciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ4Mi4yMDcgNDgyLjIwNzsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cG9seWdvbiBwb2ludHM9IjQ4Mi4yMDcsMTg2Ljk3MyAzMjIuNTA4LDE1My4yNjkgMjQxLjEwNCwxMS44MDMgMTU5LjY5OSwxNTMuMjY5IDAsMTg2Ljk3MyAxMDkuMzg4LDMwOC4xMDggOTIuMDk0LDQ3MC40MDQgICAyNDEuMTA0LDQwMy44MDMgMzkwLjExMyw0NzAuNDA0IDM3Mi44MTgsMzA4LjEwOCAiIGZpbGw9IiM2MzVlNjMiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}.saswp-g-review-header{margin-top:50px}.saswp-g-review-body{display:inline-grid;grid-template-columns:1fr 300px;grid-gap:30px;margin-top:30px;width:100%}.saswp-channel-list{margin-right:15px}.saswp-input-fields{display:inline-flex;align-items:center;margin-bottom:8px;width:100%}.saswp-input-fields label{width:130px}.saswp-panel h3{font-size:20px;line-height:1.4;color:#222;text-align:center;margin:10px 0 20px 0}.saswp-input-fields a.button-primary{margin-top:10px}.saswp-glg-review-body{display:grid;grid-template-columns:100px 1fr;grid-gap:20px;background:#fff;padding:20px;box-shadow:0 0 20px 1px #d2cccc;margin-bottom:30px}.saswp-g-plus{float:right;font-size:15px;width: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:100%;box-sizing:border-box}.saswp-upgrade-pro h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:14px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro ul li:before{content:"";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-grid-pagination{display:inline-block;padding:20px}.saswp-grid-pagination a{color:#000;float:left;padding:8px 16px;text-decoration:none}.saswp-grid-pagination a.active{background-color:#4caf50;color:#fff}.saswp-grid-pagination a:hover:not(.active){background-color:#ddd}.saswp-collection-body{width:100%;display:flex;flex-wrap:wrap}.saswp-collection-lp{flex:1 0 68%;margin-right:20px;width:68%;background:#fff;border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);padding-bottom:22px}.saswp-collection-settings{flex:1 0 27%;height:100%;width:28%}.saswp-collection-container{margin-top:60px;width:100%;display:inline-block;padding-right:20px;box-sizing:border-box}.saswp-collection-preview-table{width:100%}.saswp-collection-preview-table td{width:30%}.saswp-platform-added-list{display:inline-block;width:100%;margin-top:10px}.saswp-collection-title input{width: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;text-align:center}.saswp-r1 ul{padding:0;list-style-type:none;display:grid;width:100%;grid-template-columns:1fr 1fr 1fr;grid-gap:15px;margin:0}.saswp-r1 li{padding:20px;position:relative;color:#777;border:1px solid #ededed;background-color:#fafafa;border-radius:4px;margin:0}.saswp-rc{display:flex;width:100%;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;position:relative}.saswp-r1 .saswp-rc-lg{position:absolute;right:-5px}.saswp-r1-aimg img{float:left;max-width:56px;min-height:56px;max-height:56px;border-radius:100px}.saswp-rc-a>img{max-width:56px;min-height:56px;max-height:56px;margin-right:10px;border-radius:100px}.saswp-rc-lg img{width: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%;text-align:left}.saswp-rc-dt{margin-top:5px;font-size:12px;line-height:1.2;color:#999;display:block}.saswp-rc-a{flex:1 0 85%;display:flex;justify-content:flex-start}.saswp-rc-nm{width:100%;margin-left:10px}.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 h2{font-size:20px;margin:0;color:#23282d;font-weight:600;text-align:center}.saswp-upgrade-pro ul{margin:25px 0 20px 0;display:inline-block}.saswp-upgrade-pro ul li{position:relative;padding-left:30px;font-size:14px;line-height:1.4;margin-bottom:10px}.saswp-upgrade-pro a{background:#d2150a;padding:10px 0;display:block;text-align:center;color:#fff;text-decoration:none;font-size:16px;font-weight:600;letter-spacing:1px;border-radius:5px}.saswp-settings-second-div .saswp-upgrade-pro.promo-cpn{display:block}.saswp-upgrade-pro.promo-cpn{border:1px solid #558b2f}.saswp-hide{display:none}.saswp-settings-second-div .saswp-upgrade-pro.promo-cpn{display:block;margin:0}.saswp-upgrade-pro.promo-cpn{border:1px solid #558b2f;border-radius:8px}.saswp-upgrade-pro.promo-cpn h2{color:#2e7d32;font-size:24px;text-align:center;margin:0 0 20px 0}.saswp-upgrade-pro.promo-cpn span{text-align:center;font-size:14px;display:inline-block;color:#777;padding:0 20px;box-sizing:border-box;line-height:1.4;font-weight:400}.saswp-promo{font-size:20px;margin-top:15px;width:100%;text-align:center}.saswp-upgrade-pro.promo-cpn .prm-txt{display:block;line-height:1}.saswp-upgrade-pro.promo-cpn .saswp-promo .prm-cpn{border:1px dashed #1b5e20;border-radius:100px;margin-top:5px;color:#388e3c;font-size:20px;padding:2px 15px 2px 15px}.saswp-upgrade-pro a{background:#43a047}.saswp-upgrade-pro{border-radius:8px}.saswp-settings-second-div a{text-decoration:none}.saswp-thick-box-container{width:580px}#saswp-add-rv-manual{padding:10px}#saswp-add-rv-automatic,#saswp-add-rv-collection{padding:10px;box-sizing:border-box;width:100%;overflow-y:scroll;height:260px}.saswp-add-collection-loop,.saswp-add-rv-loop{padding-bottom:10px}.saswp-add-rv-title{padding:10px}.close-attached-reviews-popup{float:right;margin-right:20px!important}.saswp-add-rv-note{padding-bottom:10px}.saswp-accept-rv-container{margin-right:20px}.saswp-post-specific-setting{border-bottom:1px solid #eee;text-align:center;padding-bottom:10px}.saswp-ps-text{padding:20px 5px}.saswp-ps-text span{font-weight:600}.saswp-ps-toggle{padding:10px}
admin_section/css/review-form.css CHANGED
@@ -12,4 +12,11 @@
12
  }
13
  .saswp-rating-front-div{
14
  margin-bottom: 25px;
 
 
 
 
 
 
 
15
  }
12
  }
13
  .saswp-rating-front-div{
14
  margin-bottom: 25px;
15
+ }
16
+ .saswp-rv-form-btn{
17
+ padding:10px;
18
+ text-align: center;
19
+ }
20
+ .saswp_hide{
21
+ display: none;
22
  }
admin_section/css/review-form.min.css CHANGED
@@ -1 +1 @@
1
- .saswp-form-fld{display:inline-block;margin-bottom:25px;width:100%}.saswp-form-fld span{display:block;font-size:16px;line-height:1.2;font-weight:400;margin:0 0 5px 0}.saswp-rating-front-div{margin-bottom:25px}
1
+ .saswp-form-fld{display:inline-block;margin-bottom:25px;width:100%}.saswp-form-fld span{display:block;font-size:16px;line-height:1.2;font-weight:400;margin:0 0 5px 0}.saswp-rating-front-div{margin-bottom:25px}.saswp-rv-form-btn{padding:10px;text-align:center}.saswp_hide{display:none}
admin_section/js/functions-list.js CHANGED
@@ -4,7 +4,9 @@
4
  var saswp_taxonomy_term = [];
5
  var saswp_collection = [];
6
  var saswp_total_collection = [];
 
7
  var saswp_coll_json = null;
 
8
 
9
  function saswp_convert_datetostring(date_str){
10
 
@@ -135,8 +137,8 @@
135
  var item = current.val();
136
  var post_id = saswp_localize_data.post_id;
137
  var schema_id = jQuery(current).attr('data-id');
138
- var post_specific = jQuery(current).attr('post-specific');
139
- var append_id = '';
140
 
141
  if(manual == null){
142
  append_id = jQuery("#saswp_specific_"+schema_id);
@@ -145,7 +147,7 @@
145
  }
146
 
147
  jQuery.get(ajaxurl,
148
- { action:"saswp_get_item_reviewed_fields",schema_type:schema_type,schema_id:schema_id, post_specific:post_specific ,item:item, post_id:post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
149
  function(response){
150
 
151
  jQuery(append_id).find(".saswp-table-create-onajax").remove();
@@ -303,12 +305,12 @@
303
 
304
  }
305
 
306
- function saswp_get_post_specific_schema_fields(current_fly, index, meta_name, div_type, schema_id, fields_type){
307
 
308
  if (!saswp_meta_fields[fields_type]) {
309
 
310
  jQuery.get(ajaxurl,
311
- { action:"saswp_get_schema_dynamic_fields_ajax",meta_name:meta_name, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
312
  function(response){
313
  saswp_meta_fields[fields_type] = response;
314
  var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, response);
@@ -349,8 +351,9 @@
349
  jQuery.each(schema_fields, function(eachindex, element){
350
 
351
  var meta_class = "";
352
- if(element.name == 'saswp_tvseries_season_published_date' || element.name == 'saswp_feed_element_date_created' || element.name == 'saswp_product_reviews_created_date'){
353
- meta_class = "saswp-datepicker-picker";
 
354
  }
355
 
356
  switch(element.type) {
@@ -423,14 +426,13 @@
423
 
424
  var platform_list = '';
425
 
426
- saswp_total_collection = [];
427
-
428
  for(var key in saswp_collection){
429
 
430
  if(saswp_collection[key]){
431
 
432
- jQuery.each(saswp_collection[key], function(index, value){
433
-
434
  saswp_total_collection.push(value);
435
 
436
  });
@@ -438,7 +440,7 @@
438
  platform_list += saswp_function_added_platform(key, saswp_collection[key].length );
439
  }
440
 
441
- }
442
  jQuery(".saswp-platform-added-list").html('');
443
  jQuery(".saswp-platform-added-list").append(platform_list);
444
 
@@ -815,7 +817,7 @@
815
 
816
  html += '<div class="saswp-r3-rtxt">';
817
  html += '<span class="saswp-r3-num">';
818
- html += average_rating;
819
  html += '</span>';
820
  html += '<span class="saswp-stars">';
821
  html += saswp_create_rating_html_by_value(average_rating.toString());
@@ -1046,18 +1048,40 @@
1046
 
1047
  }
1048
 
1049
- function saswp_create_collection_grid(cols){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1050
 
1051
  var html = '';
1052
  var grid_cols = '';
 
1053
 
1054
  if(saswp_total_collection.length > 0){
1055
 
 
 
1056
  html += '<div class="saswp-r1">';
1057
 
1058
- for(var i=1; i <=cols; i++ ){
1059
  grid_cols +=' 1fr';
1060
-
1061
  }
1062
 
1063
  if(cols.length > 3){
@@ -1069,7 +1093,14 @@
1069
 
1070
  if(saswp_total_collection){
1071
 
1072
- jQuery.each(saswp_total_collection, function(index, value){
 
 
 
 
 
 
 
1073
 
1074
  var date_str = saswp_convert_datetostring(value.saswp_review_date);
1075
 
@@ -1106,6 +1137,28 @@
1106
  }
1107
 
1108
  html += '</ul>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1109
  html += '</div>';
1110
 
1111
  }
@@ -1114,13 +1167,13 @@
1114
 
1115
  }
1116
 
1117
- function saswp_create_collection_by_design(design, cols, slider, arrow, dots, fomo_inverval, fomo_visibility){
1118
 
1119
  switch(design) {
1120
 
1121
  case "grid":
1122
 
1123
- saswp_create_collection_grid(cols);
1124
 
1125
  break;
1126
 
@@ -1159,7 +1212,23 @@
1159
  var cols = jQuery("#saswp-collection-cols").val();
1160
  var slider = jQuery(".saswp-slider-type").val();
1161
 
1162
- var fomo_inverval = jQuery("#saswp_fomo_interval").val();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1163
  //var fomo_visibility = jQuery("#saswp_fomo_visibility").val();
1164
 
1165
  if(jQuery("#saswp_gallery_arrow").is(':checked')){
@@ -1176,7 +1245,8 @@
1176
 
1177
  saswp_create_total_collection();
1178
  saswp_collection_sorting(sorting);
1179
- saswp_create_collection_by_design(design, cols, slider, arrow, dots, fomo_inverval, fomo_inverval);
 
1180
 
1181
  }
1182
 
4
  var saswp_taxonomy_term = [];
5
  var saswp_collection = [];
6
  var saswp_total_collection = [];
7
+ var saswp_total_reviews = [];
8
  var saswp_coll_json = null;
9
+ var saswp_grid_page = 1;
10
 
11
  function saswp_convert_datetostring(date_str){
12
 
137
  var item = current.val();
138
  var post_id = saswp_localize_data.post_id;
139
  var schema_id = jQuery(current).attr('data-id');
140
+ var post_specific = jQuery(current).attr('post-specific');
141
+ var modify_this = jQuery(".saswp_modify_this_schema_hidden_"+schema_id).val();
142
 
143
  if(manual == null){
144
  append_id = jQuery("#saswp_specific_"+schema_id);
147
  }
148
 
149
  jQuery.get(ajaxurl,
150
+ { action:"saswp_get_item_reviewed_fields",modify_this:modify_this, schema_type:schema_type,schema_id:schema_id, post_specific:post_specific ,item:item, post_id:post_id, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
151
  function(response){
152
 
153
  jQuery(append_id).find(".saswp-table-create-onajax").remove();
305
 
306
  }
307
 
308
+ function saswp_get_post_specific_schema_fields(current_fly, index, meta_name, div_type, schema_id, fields_type, schema_type){
309
 
310
  if (!saswp_meta_fields[fields_type]) {
311
 
312
  jQuery.get(ajaxurl,
313
+ { action:"saswp_get_schema_dynamic_fields_ajax",schema_id:schema_id,schema_type:schema_type, meta_name:meta_name, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
314
  function(response){
315
  saswp_meta_fields[fields_type] = response;
316
  var html = saswp_fields_html_generator(index, schema_id, fields_type, div_type, response);
351
  jQuery.each(schema_fields, function(eachindex, element){
352
 
353
  var meta_class = "";
354
+
355
+ if(element.name.indexOf('published_date') > -1 || element.name.indexOf('date_created') > -1 || element.name.indexOf('created_date') > -1 || element.name.indexOf('modified_date') > -1 || element.name.indexOf('date_published') > -1 || element.name.indexOf('date_modified') > -1){
356
+ meta_class = "saswp-datepicker-picker";
357
  }
358
 
359
  switch(element.type) {
426
 
427
  var platform_list = '';
428
 
429
+ saswp_total_collection = [];
430
+
431
  for(var key in saswp_collection){
432
 
433
  if(saswp_collection[key]){
434
 
435
+ jQuery.each(saswp_collection[key], function(index, value){
 
436
  saswp_total_collection.push(value);
437
 
438
  });
440
  platform_list += saswp_function_added_platform(key, saswp_collection[key].length );
441
  }
442
 
443
+ }
444
  jQuery(".saswp-platform-added-list").html('');
445
  jQuery(".saswp-platform-added-list").append(platform_list);
446
 
817
 
818
  html += '<div class="saswp-r3-rtxt">';
819
  html += '<span class="saswp-r3-num">';
820
+ html += average_rating.toFixed(1);
821
  html += '</span>';
822
  html += '<span class="saswp-stars">';
823
  html += saswp_create_rating_html_by_value(average_rating.toString());
1048
 
1049
  }
1050
 
1051
+ function saswp_collection_total_reviews_id(){
1052
+
1053
+ if(saswp_total_collection.length > 0){
1054
+
1055
+ saswp_total_reviews = [];
1056
+
1057
+ jQuery.each(saswp_total_collection, function(index, value){
1058
+
1059
+ saswp_total_reviews.push(value.saswp_review_id);
1060
+
1061
+ });
1062
+
1063
+ var html = '<input type="hidden" name="saswp_total_reviews" value="'+JSON.stringify(saswp_total_reviews)+'">';
1064
+
1065
+ jQuery(".saswp-total-reviews-list").html('');
1066
+ jQuery(".saswp-total-reviews-list").append(html);
1067
+ }
1068
+
1069
+ }
1070
+
1071
+ function saswp_create_collection_grid(cols, pagination, perpage, offset, nextpage){
1072
 
1073
  var html = '';
1074
  var grid_cols = '';
1075
+ var page_count = 0;
1076
 
1077
  if(saswp_total_collection.length > 0){
1078
 
1079
+ page_count = Math.ceil(saswp_total_collection.length / perpage);
1080
+
1081
  html += '<div class="saswp-r1">';
1082
 
1083
+ for(var i=1; i <= cols; i++){
1084
  grid_cols +=' 1fr';
 
1085
  }
1086
 
1087
  if(cols.length > 3){
1093
 
1094
  if(saswp_total_collection){
1095
 
1096
+ var grid_col = saswp_total_collection;
1097
+
1098
+ if(pagination && perpage > 0){
1099
+
1100
+ grid_col = grid_col.slice(offset, nextpage);
1101
+
1102
+ }
1103
+ jQuery.each(grid_col, function(index, value){
1104
 
1105
  var date_str = saswp_convert_datetostring(value.saswp_review_date);
1106
 
1137
  }
1138
 
1139
  html += '</ul>';
1140
+
1141
+ if(page_count > 0 && pagination){
1142
+
1143
+ html += '<div class="saswp-grid-pagination">';
1144
+ html += '<a class="saswp-grid-page" data-id="1" href="#">&laquo;</a>';
1145
+
1146
+ for(var i=1; i <= page_count; i++){
1147
+
1148
+ if(i == saswp_grid_page){
1149
+ html += '<a class="active saswp-grid-page" data-id="'+i+'" href="#">'+i+'</a>';
1150
+ }else{
1151
+ html += '<a class="saswp-grid-page" data-id="'+i+'" href="#">'+i+'</a>';
1152
+ }
1153
+
1154
+ }
1155
+
1156
+ html += '<a class="saswp-grid-page" data-id="'+page_count+'" href="#">&raquo;</a>';
1157
+
1158
+ html += '</div>';
1159
+
1160
+ }
1161
+
1162
  html += '</div>';
1163
 
1164
  }
1167
 
1168
  }
1169
 
1170
+ function saswp_create_collection_by_design(design, cols, slider, arrow, dots, fomo_inverval, fomo_visibility, pagination, perpage, offset, nextpage){
1171
 
1172
  switch(design) {
1173
 
1174
  case "grid":
1175
 
1176
+ saswp_create_collection_grid(cols, pagination, perpage, offset, nextpage);
1177
 
1178
  break;
1179
 
1212
  var cols = jQuery("#saswp-collection-cols").val();
1213
  var slider = jQuery(".saswp-slider-type").val();
1214
 
1215
+ var fomo_inverval = jQuery("#saswp_fomo_interval").val();
1216
+ var perpage = parseInt(jQuery("#saswp-coll-per-page").val());
1217
+
1218
+ var pagination = false;
1219
+ var offset = 0;
1220
+ var nextpage = perpage;
1221
+
1222
+ if(jQuery("#saswp-coll-pagination").is(":checked")){
1223
+ pagination = true;
1224
+ var data_id = saswp_grid_page;
1225
+ if(data_id > 0){
1226
+ nextpage = data_id * perpage;
1227
+ }
1228
+ offset = nextpage - perpage;
1229
+
1230
+ }
1231
+
1232
  //var fomo_visibility = jQuery("#saswp_fomo_visibility").val();
1233
 
1234
  if(jQuery("#saswp_gallery_arrow").is(':checked')){
1245
 
1246
  saswp_create_total_collection();
1247
  saswp_collection_sorting(sorting);
1248
+ saswp_collection_total_reviews_id();
1249
+ saswp_create_collection_by_design(design, cols, slider, arrow, dots, fomo_inverval, fomo_inverval, pagination, perpage, offset, nextpage);
1250
 
1251
  }
1252
 
admin_section/js/functions-list.min.js CHANGED
@@ -1 +1 @@
1
- var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[],saswp_taxonomy_term=[],saswp_collection=[],saswp_total_collection=[],saswp_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,jQuery(this))}).change()}function saswp_compatibliy_notes(s,e){var a=e.replace("-checkbox",""),t=jQuery("#"+a).next("p").text();s.is(":checked")&&""!==t?jQuery("#"+a).next("p").removeClass("saswp_hide"):1==jQuery("#"+a).next("p").attr("data-id")?jQuery("#"+a).next("p").text("This feature is only available in pro version"):jQuery("#"+a).next("p").addClass("saswp_hide")}function saswp_meta_list_html(s,e,a,t,i,n){var p=t;null==p&&(p=Object.keys(a)[0]);var r="";if(r+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+p+']">',jQuery.each(e,function(s,e){r+='<optgroup label="'+e.label+'">',jQuery.each(e["meta-list"],function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),r+="</optgroup>"}),r+="</select>",a){var l=jQuery("select#schema_type option:selected").val(),c="";"Review"==l&&(c=jQuery("select.saswp-item-reivewed-list option:selected").val());var o="<tr>";o+="<td>",o+='<select class="saswp-custom-fields-name">',"Review"==l&&(o+='<optgroup label="Review">',o+='<option value="saswp_review_name">Review Name</option>',o+='<option value="saswp_review_description">Review Description</option>',o+='<option value="saswp_review_author">Review Author</option>',o+='<option value="saswp_review_author_url">Review Author Profile URL</option>',o+='<option value="saswp_review_publisher">Review Publisher</option>',o+='<option value="saswp_review_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")}
1
+ var saswp_meta_list=[],saswp_meta_fields=[],saswp_meta_list_fields=[],saswp_taxonomy_term=[],saswp_collection=[],saswp_total_collection=[],saswp_total_reviews=[],saswp_coll_json=null,saswp_grid_page=1;function saswp_convert_datetostring(s){var e={};if(s){var a=new Date(s);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=jQuery(".saswp_modify_this_schema_hidden_"+n).val();append_id=null==a?jQuery("#saswp_specific_"+n):jQuery(".saswp-manual-modification"),jQuery.get(ajaxurl,{action:"saswp_get_item_reviewed_fields",modify_this:r,schema_type:s,schema_id:n,post_specific:p,item:t,post_id:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){jQuery(append_id).find(".saswp-table-create-onajax").remove();var e=jQuery(append_id).find(".saswp-table-create-onload");jQuery.each(e,function(s,e){0!=s&&jQuery(this).remove()}),jQuery(append_id).append(s),saswp_schema_datepicker(),saswp_schema_timepicker()})}function saswp_item_reviewed_call(){jQuery(".saswp-item-reviewed").change(function(s){s.preventDefault();var e="";(jQuery("select#schema_type option:selected").val()&&(e=jQuery("select#schema_type option:selected").val()),jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")&&(e=jQuery(".saswp-tab-links.selected").attr("saswp-schema-type")),"Review"===e)&&saswp_item_reviewed_ajax(e,jQuery(this))}).change()}function saswp_compatibliy_notes(s,e){var a=e.replace("-checkbox",""),t=jQuery("#"+a).next("p").text();s.is(":checked")&&""!==t?jQuery("#"+a).next("p").removeClass("saswp_hide"):1==jQuery("#"+a).next("p").attr("data-id")?jQuery("#"+a).next("p").text("This feature is only available in pro version"):jQuery("#"+a).next("p").addClass("saswp_hide")}function saswp_meta_list_html(s,e,a,t,i,n){var p=t;null==p&&(p=Object.keys(a)[0]);var r="";if(r+='<select class="saswp-custom-meta-list" name="saswp_meta_list_val['+p+']">',jQuery.each(e,function(s,e){r+='<optgroup label="'+e.label+'">',jQuery.each(e["meta-list"],function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),r+="</optgroup>"}),r+="</select>",a){var l=jQuery("select#schema_type option:selected").val(),c="";"Review"==l&&(c=jQuery("select.saswp-item-reivewed-list option:selected").val());var o="<tr>";o+="<td>",o+='<select class="saswp-custom-fields-name">',"Review"==l&&(o+='<optgroup label="Review">',o+='<option value="saswp_review_name">Review Name</option>',o+='<option value="saswp_review_description">Review Description</option>',o+='<option value="saswp_review_author">Review Author</option>',o+='<option value="saswp_review_author_url">Review Author Profile URL</option>',o+='<option value="saswp_review_publisher">Review Publisher</option>',o+='<option value="saswp_review_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,p){if(saswp_meta_fields[n]){var r=saswp_fields_html_generator(e,i,n,t,saswp_meta_fields[n]);r&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(r),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))}else jQuery.get(ajaxurl,{action:"saswp_get_schema_dynamic_fields_ajax",schema_id:i,schema_type:p,meta_name:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(a){saswp_meta_fields[n]=a;var p=saswp_fields_html_generator(e,i,n,t,a);p&&(jQuery(".saswp-"+t+'-section[data-id="'+i+'"]').append(p),saswp_schema_datepicker(),saswp_schema_timepicker(),s.removeClass("updating-message"))},"json")}function saswp_fields_html_generator(s,e,a,t,i){var n="";return n+='<div class="saswp-'+t+'-table-div saswp-dynamic-properties" data-id="'+s+'"><a class="saswp-table-close">X</a><table class="form-table saswp-'+t+'-table">',jQuery.each(i,function(t,i){var p="";switch((i.name.indexOf("published_date")>-1||i.name.indexOf("date_created")>-1||i.name.indexOf("created_date")>-1||i.name.indexOf("modified_date")>-1||i.name.indexOf("date_published")>-1||i.name.indexOf("date_modified")>-1)&&(p="saswp-datepicker-picker"),i.type){case"number":case"text":n+="<tr><th>"+i.label+'</th><td><input class="'+p+'" style="width:100%" type="'+i.type+'" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']"></td></tr>';break;case"textarea":n+="<tr><th>"+i.label+'</th><td><textarea style="width: 100%" id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']" rows="5"></textarea></td></tr>';break;case"select":var r="";jQuery.each(i.options,function(s,e){r+='<option value="'+s+'">'+e+"</option>"}),n+="<tr><th>"+i.label+'</th><td><select id="'+i.name+"_"+s+"_"+e+'" name="'+a+e+"["+s+"]["+i.name+']">'+r+"</select></td></tr>";break;case"media":n+="<tr><th>"+i.label+'</th><td><fieldset><input style="width:80%" type="text" id="'+i.name+"_"+s+"_"+e+'" name="'+i.name+"_"+s+"_"+e+'"><input type="hidden" data-id="'+i.name+"_"+s+"_"+e+'_id" name="'+a+e+"["+s+"]["+i.name+'_id]" id="'+i.name+"_"+s+"_"+e+'_id"><input data-id="media" style="width: 19%" class="button" id="'+i.name+"_"+s+"_"+e+'_button" name="'+i.name+"_"+s+"_"+e+'_button" type="button" value="Upload"><div class="saswp_image_div_'+i.name+"_"+s+"_"+e+'"></div></fieldset></td></tr>'}}),n+="</table></div>"}function saswp_create_total_collection(){var s="";for(var e in saswp_total_collection=[],saswp_collection)saswp_collection[e]&&(jQuery.each(saswp_collection[e],function(s,e){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.toFixed(1),s+="</span>",s+='<span class="saswp-stars">',s+=saswp_create_rating_html_by_value(p.toString()),s+="</span>",s+="</div>",s+='<span class="saswp-r3-brv">',s+="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_collection_total_reviews_id(){if(saswp_total_collection.length>0){saswp_total_reviews=[],jQuery.each(saswp_total_collection,function(s,e){saswp_total_reviews.push(e.saswp_review_id)});var s='<input type="hidden" name="saswp_total_reviews" value="'+JSON.stringify(saswp_total_reviews)+'">';jQuery(".saswp-total-reviews-list").html(""),jQuery(".saswp-total-reviews-list").append(s)}}function saswp_create_collection_grid(s,e,a,t,i){var n="",p="",r=0;if(saswp_total_collection.length>0){r=Math.ceil(saswp_total_collection.length/a),n+='<div class="saswp-r1">';for(var l=1;l<=s;l++)p+=" 1fr";if(s.length>3?n+='<ul style="grid-template-columns:'+p+';overflow-y: scroll;">':n+='<ul style="grid-template-columns:'+p+';overflow-y:hidden;">',saswp_total_collection){var c=saswp_total_collection;e&&a>0&&(c=c.slice(t,i)),jQuery.each(c,function(s,e){var a=saswp_convert_datetostring(e.saswp_review_date);n+="<li>",n+='<div class="saswp-rc">',n+='<div class="saswp-rc-a">',n+='<div class="saswp-r1-aimg">',n+='<img src="'+e.saswp_reviewer_image+'" width="56" height="56"/>',n+="</div>",n+='<div class="saswp-rc-nm">',n+='<a href="#">'+e.saswp_reviewer_name+"</a>",n+=saswp_create_rating_html_by_value(e.saswp_review_rating),a.date&&(n+='<span class="saswp-rc-dt">'+a.date+"</span>"),n+="</div>",n+="</div>",n+='<div class="saswp-rc-lg">',n+='<img src="'+e.saswp_review_platform_icon+'"/>',n+="</div>",n+="</div>",n+='<div class="saswp-rc-cnt">',n+="<p>"+e.saswp_review_text+"</p>",n+="</div>",n+="</li>"})}if(n+="</ul>",r>0&&e){n+='<div class="saswp-grid-pagination">',n+='<a class="saswp-grid-page" data-id="1" href="#">&laquo;</a>';for(l=1;l<=r;l++)n+=l==saswp_grid_page?'<a class="active saswp-grid-page" data-id="'+l+'" href="#">'+l+"</a>":'<a class="saswp-grid-page" data-id="'+l+'" href="#">'+l+"</a>";n+='<a class="saswp-grid-page" data-id="'+r+'" href="#">&raquo;</a>',n+="</div>"}n+="</div>"}jQuery(".saswp-collection-preview").html(""),jQuery(".saswp-collection-preview").append(n)}function saswp_create_collection_by_design(s,e,a,t,i,n,p,r,l,c,o){switch(s){case"grid":saswp_create_collection_grid(e,r,l,c,o);break;case"gallery":saswp_create_collection_slider(a,t,i);break;case"badge":saswp_create_collection_badge();break;case"popup":saswp_create_collection_popup();break;case"fomo":saswp_create_collection_fomo(n,p)}}function saswp_on_collection_design_change(){var s=jQuery(".saswp-collection-sorting").val(),e=jQuery(".saswp-collection-desing").val(),a=jQuery("#saswp-collection-cols").val(),t=jQuery(".saswp-slider-type").val(),i=jQuery("#saswp_fomo_interval").val(),n=parseInt(jQuery("#saswp-coll-per-page").val()),p=!1,r=0,l=n;if(jQuery("#saswp-coll-pagination").is(":checked")){p=!0;saswp_grid_page>0&&(l=saswp_grid_page*n),r=l-n}if(jQuery("#saswp_gallery_arrow").is(":checked"))var c=!0;else c=!1;if(jQuery("#saswp_gallery_dots").is(":checked"))var o=!0;else o=!1;saswp_create_total_collection(),saswp_collection_sorting(s),saswp_collection_total_reviews_id(),saswp_create_collection_by_design(e,a,t,c,o,i,i,p,n,r,l)}function saswp_get_collection_data(s,e,a=null){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,4 +1,5 @@
1
- var saswp_attached_rv = [];
 
2
  jQuery(document).ready(function($){
3
 
4
  $(document).on("click", '.saswp-attach-reviews', function(){
@@ -13,37 +14,76 @@ jQuery(document).ready(function($){
13
 
14
  });
15
 
 
 
 
 
16
  if($("#saswp_attahced_reviews").val()){
17
  saswp_attached_rv = JSON.parse($("#saswp_attahced_reviews").val());
18
  }
 
 
 
19
 
20
  $(document).on("click", ".saswp-attach-rv-checkbox", function(){
21
 
22
  var review_id = null;
23
- review_id = parseInt($(this).parent().attr('review-id'));
 
 
24
 
25
  if($(this).is(":checked")){
26
 
27
- saswp_attached_rv.push(review_id);
 
 
 
 
 
 
 
28
 
29
  }else{
30
- saswp_attached_rv.splice( saswp_attached_rv.indexOf(review_id), 1 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  }
32
- $(".saswp-attached-rv-count").text(saswp_attached_rv.length+' Reviews Attached');
33
- $("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv));
 
34
 
35
  });
36
 
37
  $(".saswp-load-more-rv").on("click", function(e){
38
-
39
- var offset = $(".saswp-add-rv-loop").length;
 
40
  var paged = (offset/10)+1;
41
 
42
  $("#saswp-add-rv-automatic .spinner").addClass('is-active');
43
 
44
  e.preventDefault();
45
  $.get(ajaxurl,
46
- { action:"saswp_get_reviews_on_load", offset:offset, paged: paged, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
47
 
48
  function(response){
49
 
@@ -57,22 +97,37 @@ jQuery(document).ready(function($){
57
 
58
  var checked = '';
59
 
60
- if(saswp_attached_rv.includes(parseInt(e.saswp_review_id))){
 
61
  checked = "checked";
 
62
  }
63
 
64
- html += '<div class="saswp-add-rv-loop" review-id="'+e.saswp_review_id+'">';
65
- html += '<input class="saswp-attach-rv-checkbox" type="checkbox" '+checked+'> <strong> '+e.saswp_reviewer_name+' ( Rating - '+e.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+e.saswp_review_platform_icon+'"/></span></strong>';
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  html += '</div>';
67
 
68
  });
69
- $(".saswp-add-rv-automatic-list").append(html);
70
  }
71
 
72
  if(response['message']){
73
 
74
- $(".saswp-rv-not-found").removeClass('saswp_hide');
75
- $(".saswp-load-more-rv").addClass('saswp_hide');
76
 
77
  }
78
 
@@ -398,7 +453,15 @@ return false;
398
  $(".saswp-review-text-field-tr").show();
399
  $(".saswp-option-table-class tr").find('select').attr('disabled', false);
400
  $(".saswp-item-reivewed-list").change();
401
- }
 
 
 
 
 
 
 
 
402
  saswp_enable_rating_review();
403
 
404
  $(".saswp-manual-modification").html('');
@@ -485,6 +548,13 @@ return false;
485
  $(".saswp-review-text-field-tr").show();
486
  $(".saswp-review-text-field-tr").find('select').attr('disabled', false);
487
  }
 
 
 
 
 
 
 
488
  if(schematype == 'Event'){
489
  $(".saswp-event-text-field-tr").show();
490
  $(".saswp-option-table-class tr").find('select').attr('disabled', false);
@@ -1135,6 +1205,16 @@ return false;
1135
 
1136
  break;
1137
 
 
 
 
 
 
 
 
 
 
 
1138
  case 'saswp-ampwp-checkbox':
1139
 
1140
  saswp_compatibliy_notes(current, id);
@@ -1309,14 +1389,55 @@ return false;
1309
  });
1310
 
1311
  //Settings page jquery ends here
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1312
 
1313
  $(document).on("change",".saswp-schema-type-toggle", function(e){
1314
  var schema_id = $(this).attr("data-schema-id");
1315
  var post_id = $(this).attr("data-post-id");
 
1316
  if($(this).is(':checked')){
1317
- var status = 1;
 
 
 
 
 
 
 
1318
  }else{
1319
- var status = 0;
 
 
 
 
 
 
 
 
 
 
1320
  }
1321
  $.ajax({
1322
  type: "POST",
@@ -1534,7 +1655,7 @@ return false;
1534
 
1535
  saswp_item_reviewed_call();
1536
 
1537
- $('.saswp-local-schema-time-picker').timepicker({ 'timeFormat': 'H:i:s'});
1538
 
1539
  $(document).on("click",".saswp-add-custom-schema", function(e){
1540
 
@@ -1678,8 +1799,6 @@ return false;
1678
  $('.saswp-global-container:first').show();
1679
  }
1680
 
1681
-
1682
-
1683
  $('#saswp-global-tabs a').click(function(){
1684
  var t = $(this).attr('data-id');
1685
 
@@ -1795,6 +1914,7 @@ return false;
1795
  });
1796
 
1797
  $(document).on("click", ".saswp_add_schema_fields_on_fly", function(e){
 
1798
  e.preventDefault();
1799
 
1800
  var current_fly = $(this);
@@ -1804,7 +1924,7 @@ return false;
1804
  var schema_id = $(this).attr('data-id');
1805
  var fields_type = $(this).attr('fields_type');
1806
  var div_type = $(this).attr('div_type');
1807
-
1808
  var count = $("saswp_specific_"+schema_id+" , .saswp-"+div_type+"-table-div").length;
1809
  var index = $( "saswp_specific_"+schema_id+" , .saswp-"+div_type+"-table-div:nth-child("+count+")" ).attr('data-id');
1810
  index = ++index;
@@ -1813,7 +1933,7 @@ return false;
1813
  index = 0;
1814
  }
1815
 
1816
- saswp_get_post_specific_schema_fields(current_fly, index, fields_type, div_type, schema_id, fields_type+'_');
1817
 
1818
  });
1819
 
@@ -2016,15 +2136,39 @@ return false;
2016
 
2017
  //Adding settings button beside add schema type button on schema type list page
2018
 
2019
- if ('saswp' == saswp_localize_data.post_type && saswp_localize_data.page_now == 'edit.php') {
 
 
 
 
2020
 
2021
- jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>");
2022
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2023
  }
 
 
2024
 
2025
- if ('saswp_reviews' == saswp_localize_data.post_type && saswp_localize_data.page_now == 'edit.php') {
2026
-
2027
- jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.collections_page_url+"' id='' class='page-title-action'>Collections</a>");
2028
 
2029
  }
2030
 
@@ -2062,9 +2206,27 @@ return false;
2062
 
2063
  });
2064
 
2065
- //Collection js starst here
2066
 
2067
  saswpCollectionSlider();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2068
 
2069
  $(".saswp-accordion").click(function(){
2070
  $(this).toggleClass("active");
@@ -2114,7 +2276,7 @@ return false;
2114
 
2115
 
2116
  $(".saswp-coll-settings-options").change(function(){
2117
-
2118
  var design = $(".saswp-collection-desing").val();
2119
 
2120
  $(".saswp-coll-options").addClass('saswp_hide');
1
+ var saswp_attached_rv = [];
2
+ var saswp_attached_col = [];
3
  jQuery(document).ready(function($){
4
 
5
  $(document).on("click", '.saswp-attach-reviews', function(){
14
 
15
  });
16
 
17
+ $(".close-attached-reviews-popup").on('click', function(){
18
+ $("#TB_closeWindowButton").trigger('click');
19
+ });
20
+
21
  if($("#saswp_attahced_reviews").val()){
22
  saswp_attached_rv = JSON.parse($("#saswp_attahced_reviews").val());
23
  }
24
+ if($("#saswp_attached_collection").val()){
25
+ saswp_attached_col = JSON.parse($("#saswp_attached_collection").val());
26
+ }
27
 
28
  $(document).on("click", ".saswp-attach-rv-checkbox", function(){
29
 
30
  var review_id = null;
31
+ review_id = parseInt($(this).parent().attr('data-id'));
32
+
33
+ var data_type = $(this).parent().attr('data-type');
34
 
35
  if($(this).is(":checked")){
36
 
37
+ if(data_type == 'review'){
38
+ saswp_attached_rv.push(review_id);
39
+ }
40
+
41
+ if(data_type == 'collection'){
42
+ saswp_attached_col.push(review_id);
43
+ }
44
+
45
 
46
  }else{
47
+
48
+ if(data_type == 'review'){
49
+ saswp_attached_rv.splice( saswp_attached_rv.indexOf(review_id), 1 );
50
+ }
51
+
52
+ if(data_type == 'collection'){
53
+ saswp_attached_col.splice( saswp_attached_col.indexOf(review_id), 1 );
54
+ }
55
+
56
+ }
57
+
58
+ var review = saswp_attached_rv.length;
59
+ var collection = saswp_attached_col.length;
60
+ var rv_text = '';
61
+ if(review > 0){
62
+ rv_text += review+ ' Reviews, '
63
+ }
64
+ if(collection > 0){
65
+ rv_text += collection + ' Collection'
66
+ }
67
+ if(!rv_text){
68
+ rv_text = 0;
69
  }
70
+ $(".saswp-attached-rv-count").text('Attached '+rv_text);
71
+ $("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv));
72
+ $("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col));
73
 
74
  });
75
 
76
  $(".saswp-load-more-rv").on("click", function(e){
77
+
78
+ var data_type = $(this).attr('data-type');
79
+ var offset = $(".saswp-add-rv-loop[data-type="+data_type+"]").length;
80
  var paged = (offset/10)+1;
81
 
82
  $("#saswp-add-rv-automatic .spinner").addClass('is-active');
83
 
84
  e.preventDefault();
85
  $.get(ajaxurl,
86
+ { action:"saswp_get_reviews_on_load",data_type:data_type, offset:offset, paged: paged, saswp_security_nonce:saswp_localize_data.saswp_security_nonce},
87
 
88
  function(response){
89
 
97
 
98
  var checked = '';
99
 
100
+ if(data_type == 'review'){
101
+ if(saswp_attached_rv.includes(parseInt(e.saswp_review_id))){
102
  checked = "checked";
103
+ }
104
  }
105
 
106
+ if(data_type == 'collection'){
107
+ if(saswp_attached_col.includes(parseInt(e.saswp_review_id))){
108
+ checked = "checked";
109
+ }
110
+ }
111
+
112
+ html += '<div class="saswp-add-rv-loop" data-type="'+data_type+'" data-id="'+e.saswp_review_id+'">';
113
+
114
+ if(data_type == 'review'){
115
+ html += '<input class="saswp-attach-rv-checkbox" type="checkbox" '+checked+'> <strong> '+e.saswp_reviewer_name+' ( Rating - '+e.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+e.saswp_review_platform_icon+'"/></span></strong>';
116
+ }
117
+ if(data_type == 'collection'){
118
+ html += '<input class="saswp-attach-rv-checkbox" type="checkbox" '+checked+'> <strong> '+e.saswp_reviewer_name+' </strong>';
119
+ }
120
+
121
  html += '</div>';
122
 
123
  });
124
+ $(".saswp-add-rv-automatic-list[data-type="+data_type+"]").append(html);
125
  }
126
 
127
  if(response['message']){
128
 
129
+ $(".saswp-rv-not-found[data-type="+data_type+"]").removeClass('saswp_hide');
130
+ $(".saswp-load-more-rv[data-type="+data_type+"]").addClass('saswp_hide');
131
 
132
  }
133
 
453
  $(".saswp-review-text-field-tr").show();
454
  $(".saswp-option-table-class tr").find('select').attr('disabled', false);
455
  $(".saswp-item-reivewed-list").change();
456
+ }
457
+ if(schematype == 'ItemList'){
458
+ $(".saswp-schema-modify-section").hide();
459
+ $(".saswp-itemlist-text-field-tr").show();
460
+ $(".saswp-option-table-class tr").find('select').attr('disabled', false);
461
+ $(".saswp-itemlist-item-type-list").change();
462
+ }else{
463
+ $(".saswp-schema-modify-section").show();
464
+ }
465
  saswp_enable_rating_review();
466
 
467
  $(".saswp-manual-modification").html('');
548
  $(".saswp-review-text-field-tr").show();
549
  $(".saswp-review-text-field-tr").find('select').attr('disabled', false);
550
  }
551
+ if(schematype == 'ItemList'){
552
+ $(".saswp-schema-modify-section").hide();
553
+ $(".saswp-itemlist-text-field-tr").show();
554
+ $(".saswp-option-table-class tr").find('select').attr('disabled', false);
555
+ }else{
556
+ $(".saswp-schema-modify-section").hide();
557
+ }
558
  if(schematype == 'Event'){
559
  $(".saswp-event-text-field-tr").show();
560
  $(".saswp-option-table-class tr").find('select').attr('disabled', false);
1205
 
1206
  break;
1207
 
1208
+ case 'saswp-wordpress-news-checkbox':
1209
+ saswp_compatibliy_notes(current, id);
1210
+ if ($(this).is(':checked')) {
1211
+ $("#saswp-wordpress-news").val(1);
1212
+ }else{
1213
+ $("#saswp-wordpress-news").val(0);
1214
+ }
1215
+
1216
+ break;
1217
+
1218
  case 'saswp-ampwp-checkbox':
1219
 
1220
  saswp_compatibliy_notes(current, id);
1389
  });
1390
 
1391
  //Settings page jquery ends here
1392
+
1393
+ $(document).on("click", ".saswp-modify-schema", function(e){
1394
+ e.preventDefault();
1395
+
1396
+ var schema_id = $(this).attr('schema-id');
1397
+
1398
+ $(".saswp_modify_this_schema_hidden_"+schema_id).val(1);
1399
+ $(".saswp-restore-schema[schema-id="+schema_id+"]").parent().removeClass('saswp_hide');
1400
+ $(".saswp-modify-schema[schema-id="+schema_id+"]").parent().addClass('saswp_hide');
1401
+ $(".saswp-ps-toggle[schema-id="+schema_id+"]").removeClass('saswp_hide');
1402
+
1403
+ });
1404
+
1405
+ $(document).on("click", ".saswp-restore-schema", function(e){
1406
+ e.preventDefault();
1407
+
1408
+ var schema_id = $(this).attr('schema-id');
1409
+ $(".saswp_modify_this_schema_hidden_"+schema_id).val(0);
1410
+ $(".saswp-restore-schema[schema-id="+schema_id+"]").parent().addClass('saswp_hide');
1411
+ $(".saswp-modify-schema[schema-id="+schema_id+"]").parent().removeClass('saswp_hide');
1412
+ $(".saswp-ps-toggle[schema-id="+schema_id+"]").addClass('saswp_hide');
1413
+
1414
+ });
1415
 
1416
  $(document).on("change",".saswp-schema-type-toggle", function(e){
1417
  var schema_id = $(this).attr("data-schema-id");
1418
  var post_id = $(this).attr("data-post-id");
1419
+ var modified = $(".saswp_modify_this_schema_hidden_"+schema_id).val();
1420
  if($(this).is(':checked')){
1421
+ var status = 0;
1422
+
1423
+ $(".saswp-ps-toggle[schema-id="+schema_id+"]").addClass('saswp_hide');
1424
+ $(".saswp-restore-schema[schema-id="+schema_id+"]").parent().addClass('saswp_hide');
1425
+ $(".saswp-modify-schema[schema-id="+schema_id+"]").parent().addClass('saswp_hide');
1426
+
1427
+ $("#saswp_custom_schema_field[schema-id="+schema_id+"]").parent().addClass('saswp_hide');
1428
+
1429
  }else{
1430
+ $("#saswp_custom_schema_field[schema-id="+schema_id+"]").parent().removeClass('saswp_hide');
1431
+ if(modified == 1){
1432
+ $(".saswp-ps-toggle[schema-id="+schema_id+"]").removeClass('saswp_hide');
1433
+ $(".saswp-restore-schema[schema-id="+schema_id+"]").parent().removeClass('saswp_hide');
1434
+ }else{
1435
+ $(".saswp-modify-schema[schema-id="+schema_id+"]").parent().removeClass('saswp_hide');
1436
+ $(".saswp-ps-toggle[schema-id="+schema_id+"]").addClass('saswp_hide');
1437
+ $(".saswp-restore-schema[schema-id="+schema_id+"]").parent().addClass('saswp_hide');
1438
+ }
1439
+
1440
+ var status = 1;
1441
  }
1442
  $.ajax({
1443
  type: "POST",
1655
 
1656
  saswp_item_reviewed_call();
1657
 
1658
+ jQuery('.saswp-local-schema-time-picker').timepicker({ 'timeFormat': 'H:i:s'});
1659
 
1660
  $(document).on("click",".saswp-add-custom-schema", function(e){
1661
 
1799
  $('.saswp-global-container:first').show();
1800
  }
1801
 
 
 
1802
  $('#saswp-global-tabs a').click(function(){
1803
  var t = $(this).attr('data-id');
1804
 
1914
  });
1915
 
1916
  $(document).on("click", ".saswp_add_schema_fields_on_fly", function(e){
1917
+
1918
  e.preventDefault();
1919
 
1920
  var current_fly = $(this);
1924
  var schema_id = $(this).attr('data-id');
1925
  var fields_type = $(this).attr('fields_type');
1926
  var div_type = $(this).attr('div_type');
1927
+ var schema_type = 'Article';
1928
  var count = $("saswp_specific_"+schema_id+" , .saswp-"+div_type+"-table-div").length;
1929
  var index = $( "saswp_specific_"+schema_id+" , .saswp-"+div_type+"-table-div:nth-child("+count+")" ).attr('data-id');
1930
  index = ++index;
1933
  index = 0;
1934
  }
1935
 
1936
+ saswp_get_post_specific_schema_fields(current_fly, index, fields_type, div_type, schema_id, fields_type+'_', schema_type);
1937
 
1938
  });
1939
 
2136
 
2137
  //Adding settings button beside add schema type button on schema type list page
2138
 
2139
+ $(document).on('click', ".saswp-show-accept-rv-popup" , function(){
2140
+ tb_show("Reviews Form", "#TB_inline??width=600&height=400&inlineId=saswp-accept-reviews-popup");
2141
+ $(document).find('#TB_window').width(600).height(400).css({'top':'100px', 'margin-top': '0px'});
2142
+
2143
+ });
2144
 
2145
+ if( ( saswp_localize_data.post_type == 'saswp_reviews' || saswp_localize_data.post_type == 'saswp-collections' ) && (saswp_localize_data.page_now == 'edit.php')){
2146
+
2147
+ var html = '<div class="saswp-custom-post-tab">';
2148
+
2149
+ html += '<div style="display:none;" id="saswp-accept-reviews-popup">';
2150
+ html += '<div class="saswp-accept-rv-container">';
2151
+ html += '<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>';
2152
+ html += '<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>';
2153
+ html += '<div class="saswp-show-form-on-tab"><strong>Show form on button tap</strong> <input value="[saswp-reviews-form onbutton=&quot;1&quot;]" type="text" readonly></div>';
2154
+ html += '</div>';
2155
+ html += '</div>';
2156
+
2157
+ html += '<h2 class="nav-tab-wrapper">';
2158
+ html += '<a href='+saswp_localize_data.reviews_page_url+' class="nav-tab '+(saswp_localize_data.current_url == saswp_localize_data.reviews_page_url ? 'saswp-global-selected' : '' )+'">Reviews</a>';
2159
+ html += '<a href='+saswp_localize_data.collections_page_url+' class="nav-tab '+(saswp_localize_data.current_url == saswp_localize_data.collections_page_url ? 'saswp-global-selected' : '' )+'">Collections</a>';
2160
+ html += '<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>';
2161
+ html += '</h2>';
2162
+
2163
+ html += '</div>';
2164
+
2165
+ jQuery(jQuery(".wrap")).prepend(html);
2166
+
2167
  }
2168
+
2169
+ if ('saswp' == saswp_localize_data.post_type && saswp_localize_data.page_now == 'edit.php') {
2170
 
2171
+ jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>");
 
 
2172
 
2173
  }
2174
 
2206
 
2207
  });
2208
 
2209
+ //Collection js start here
2210
 
2211
  saswpCollectionSlider();
2212
+
2213
+
2214
+ $(document).on("click", ".saswp-grid-page", function(e){
2215
+ e.preventDefault();
2216
+ saswp_grid_page = $(this).attr('data-id');
2217
+ saswp_on_collection_design_change();
2218
+ });
2219
+
2220
+ $("#saswp-coll-pagination").change(function(){
2221
+ saswp_grid_page = 1;
2222
+ $("#saswp-coll-per-page").parent().addClass('saswp_hide_imp');
2223
+
2224
+ if($(this).is(":checked")){
2225
+ $("#saswp-coll-per-page").parent().removeClass('saswp_hide_imp');
2226
+ }
2227
+ saswp_on_collection_design_change();
2228
+
2229
+ });
2230
 
2231
  $(".saswp-accordion").click(function(){
2232
  $(this).toggleClass("active");
2276
 
2277
 
2278
  $(".saswp-coll-settings-options").change(function(){
2279
+ saswp_grid_page = 1;
2280
  var design = $(".saswp-collection-desing").val();
2281
 
2282
  $(".saswp-coll-options").addClass('saswp_hide');
admin_section/js/main-script.min.js CHANGED
@@ -1 +1 @@
1
- var saswp_attached_rv=[];jQuery(document).ready(function(s){if(s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show("Attach reviews to this schema type","#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e;e=parseInt(s(this).parent().attr("review-id")),s(this).is(":checked")?saswp_attached_rv.push(e):saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),s(".saswp-attached-rv-count").text(saswp_attached_rv.length+" Reviews Attached"),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(".saswp-add-rv-loop").length,t=a/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",offset:a,paged:t,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var a="";e.result&&(s.each(e.result,function(s,e){var t="";saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(t="checked"),a+='<div class="saswp-add-rv-loop" review-id="'+e.saswp_review_id+'">',a+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+t+"> <strong> "+e.saswp_reviewer_name+" ( Rating - "+e.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+e.saswp_review_platform_icon+'"/></span></strong>',a+="</div>"}),s(".saswp-add-rv-automatic-list").append(a)),e.message&&(s(".saswp-rv-not-found").removeClass("saswp_hide"),s(".saswp-load-more-rv").addClass("saswp_hide"))}else alert(e.message);s("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),s(".saswp-modify-schema-toggle").click(function(e){e.preventDefault(),s(".saswp-modify-container").slideToggle("300");var a=s("#saswp_enable_custom_field"),t=a.val();a.val("1"===t?"0":"1"),s(".saswp-enable-modify-schema-output").change()}),s(".saswp-enable-itemlist").change(function(){s(this).is(":checked")?(s("#saswp_item_list_tags").show(),s(".saspw-item-list-note").show(),"custom"==s("#saswp_item_list_tags").val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()):(s(".saspw-item-list-note").hide(),s("#saswp_item_list_tags").hide(),s("#saswp_item_list_custom").hide())}),s("#saswp_item_list_tags").change(function(){"custom"==s(this).val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()}),s(document).on("click",".saswp-add-g-location-btn",function(e){var a="";a=s("#saswp_google_place_api_key").length?'<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(),p=s("#saswp_google_place_api_key").val(),o=s("#reviews_addon_license_key").val(),c=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&&(o||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:c,reviews_api:o,location:t,blocks:i,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text("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"),""==p&&alert("Please enter api key"),""==o&&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||"Review"==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||"Review"==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-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-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").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-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").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-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0)}}).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 p="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(p='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+e.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+p)}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("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"),p=s("#"+i+"_addon_license_key").val();t&&i&&p?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:p,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(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(),t=s("#saswp_query_premium_cus").val();""!=s.trim(a)&&t?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",premium_cus:t,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()):(s(".saswp-query-success").hide(),s(".saswp-query-error").show())},error:function(s){console.log(s)}}):""==s.trim(a)&&""==t?alert("Please enter the message and select customer type"):(""==t&&alert("Select Customer type"),""==s.trim(a)&&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();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"),p=s(this).attr("div_type"),o=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div").length,c=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div:nth-child("+o+")").attr("data-id");(c=++c)||(c=0),saswp_get_post_specific_schema_fields(a,c,i,p,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(),p="",o=a.toLowerCase()+"_"+i,c="saswp_fixed_image["+i+"]";"manual_text"==t?(p+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(p+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(p),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,p+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(p),saswpCustomSelect2())},"json"):"custom_field"==t?(p+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',p+="</select></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"fixed_image"==t?(p+="<td>",p+="<fieldset>",p+='<input data-id="media" style="width: 30%;" class="button" id="'+o+'_button" name="'+o+'_button" type="button" value="Upload" />',p+='<input type="hidden" data-id="'+o+'_height" class="upload-height" name="'+c+'[height]" id="'+o+'_height" value="">',p+='<input type="hidden" data-id="'+o+'_width" class="upload-width" name="'+c+'[width]" id="'+o+'_width" value="">',p+='<input type="hidden" data-id="'+o+'_thumbnail" class="upload-thumbnail" name="'+c+'[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>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):(p+="<td></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var 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 p=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:p,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)}}),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,p,o=s("#saswp_collection_id").val();o&&(s(".spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_collection_platforms",collection_id:o,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(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 c=document.getElementById("motivatebox");c&&c.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(p),i.style.left=e.pageX-10+"px",i.style.top=e.pageY+15+"px",i.style.opacity=1,p=setTimeout(function(){i.style.opacity=0},500)}(s))},!1)});
1
+ var saswp_attached_rv=[],saswp_attached_col=[];jQuery(document).ready(function(s){if(s(document).on("click",".saswp-attach-reviews",function(){s(".saswp-enable-append-reviews").is(":checked")?(tb_show("Attach reviews to this schema type","#TB_inline??width=615&height=400&inlineId=saswp-embed-code-div"),s(document).find("#TB_window").width(600).height(415).css({top:"200px","margin-top":"0px"}),s(".saswp-attached-rv-count").show()):s(".saswp-attached-rv-count").hide()}),s(".close-attached-reviews-popup").on("click",function(){s("#TB_closeWindowButton").trigger("click")}),s("#saswp_attahced_reviews").val()&&(saswp_attached_rv=JSON.parse(s("#saswp_attahced_reviews").val())),s("#saswp_attached_collection").val()&&(saswp_attached_col=JSON.parse(s("#saswp_attached_collection").val())),s(document).on("click",".saswp-attach-rv-checkbox",function(){var e;e=parseInt(s(this).parent().attr("data-id"));var a=s(this).parent().attr("data-type");s(this).is(":checked")?("review"==a&&saswp_attached_rv.push(e),"collection"==a&&saswp_attached_col.push(e)):("review"==a&&saswp_attached_rv.splice(saswp_attached_rv.indexOf(e),1),"collection"==a&&saswp_attached_col.splice(saswp_attached_col.indexOf(e),1));var t=saswp_attached_rv.length,i=saswp_attached_col.length,p="";t>0&&(p+=t+" Reviews, "),i>0&&(p+=i+" Collection"),p||(p=0),s(".saswp-attached-rv-count").text("Attached "+p),s("#saswp_attahced_reviews").val(JSON.stringify(saswp_attached_rv)),s("#saswp_attached_collection").val(JSON.stringify(saswp_attached_col))}),s(".saswp-load-more-rv").on("click",function(e){var a=s(this).attr("data-type"),t=s(".saswp-add-rv-loop[data-type="+a+"]").length,i=t/10+1;s("#saswp-add-rv-automatic .spinner").addClass("is-active"),e.preventDefault(),s.get(ajaxurl,{action:"saswp_get_reviews_on_load",data_type:a,offset:t,paged:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(e){if("t"==e.status){var t="";e.result&&(s.each(e.result,function(s,e){var i="";"review"==a&&saswp_attached_rv.includes(parseInt(e.saswp_review_id))&&(i="checked"),"collection"==a&&saswp_attached_col.includes(parseInt(e.saswp_review_id))&&(i="checked"),t+='<div class="saswp-add-rv-loop" data-type="'+a+'" data-id="'+e.saswp_review_id+'">',"review"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" ( Rating - "+e.saswp_review_rating+' ) <span class="saswp-g-plus"><img src="'+e.saswp_review_platform_icon+'"/></span></strong>'),"collection"==a&&(t+='<input class="saswp-attach-rv-checkbox" type="checkbox" '+i+"> <strong> "+e.saswp_reviewer_name+" </strong>"),t+="</div>"}),s(".saswp-add-rv-automatic-list[data-type="+a+"]").append(t)),e.message&&(s(".saswp-rv-not-found[data-type="+a+"]").removeClass("saswp_hide"),s(".saswp-load-more-rv[data-type="+a+"]").addClass("saswp_hide"))}else alert(e.message);s("#saswp-add-rv-automatic .spinner").removeClass("is-active")},"json")}),s(".saswp-modify-schema-toggle").click(function(e){e.preventDefault(),s(".saswp-modify-container").slideToggle("300");var a=s("#saswp_enable_custom_field"),t=a.val();a.val("1"===t?"0":"1"),s(".saswp-enable-modify-schema-output").change()}),s(".saswp-enable-itemlist").change(function(){s(this).is(":checked")?(s("#saswp_item_list_tags").show(),s(".saspw-item-list-note").show(),"custom"==s("#saswp_item_list_tags").val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()):(s(".saspw-item-list-note").hide(),s("#saswp_item_list_tags").hide(),s("#saswp_item_list_custom").hide())}),s("#saswp_item_list_tags").change(function(){"custom"==s(this).val()?s("#saswp_item_list_custom").show():s("#saswp_item_list_custom").hide()}),s(document).on("click",".saswp-add-g-location-btn",function(e){var a="";a=s("#saswp_google_place_api_key").length?'<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(),p=s("#saswp_google_place_api_key").val(),o=s("#reviews_addon_license_key").val(),c=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&&(o||p)?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_fetch_google_reviews",reviews_api_status:c,reviews_api:o,location:t,blocks:i,g_api:p,premium_status:a,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(s){"t"==s.status?(e.parent().parent().find(".saswp-rv-fetched-msg").text("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"),""==p&&alert("Please enter api key"),""==o&&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()}if(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||"Review"==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()),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1),s(".saswp-itemlist-item-type-list").change()):s(".saswp-schema-modify-section").show(),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||"Review"==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)),"ItemList"==a?(s(".saswp-schema-modify-section").hide(),s(".saswp-itemlist-text-field-tr").show(),s(".saswp-option-table-class tr").find("select").attr("disabled",!1)):s(".saswp-schema-modify-section").hide(),"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-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-soledad-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-soledad").val(1):s("#saswp-soledad").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-wpresidence-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpresidence").val(1):s("#saswp-wpresidence").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-testimonial-pro-checkbox":s(this).is(":checked")?s("#saswp-testimonial-pro").val(1):s("#saswp-testimonial-pro").val(0);break;case"saswp-bne-testimonials-checkbox":s(this).is(":checked")?s("#saswp-bne-testimonials").val(1):s("#saswp-bne-testimonials").val(0);break;case"saswp-ampforwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampforwp").val(1):s("#saswp-ampforwp").val(0);break;case"saswp-ampbyautomatic-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampbyautomatic").val(1):s("#saswp-ampbyautomatic").val(0);break;case"saswp-wordpress-news-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordpress-news").val(1):s("#saswp-wordpress-news").val(0);break;case"saswp-ampwp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-ampwp").val(1):s("#saswp-ampwp").val(0);break;case"saswp-wp-event-aggregator-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wp-event-aggregator").val(1):s("#saswp-wp-event-aggregator").val(0);break;case"saswp-easy-recipe-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-easy-recipe").val(1):s("#saswp-easy-recipe").val(0);break;case"saswp-tevolution-events-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-tevolution-events").val(1):s("#saswp-tevolution-events").val(0);break;case"saswp-strong-testimonials-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-strong-testimonials").val(1):s("#saswp-strong-testimonials").val(0);break;case"saswp-wordlift-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wordlift").val(1):s("#saswp-wordlift").val(0);break;case"saswp-betteramp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-betteramp").val(1):s("#saswp-betteramp").val(0);break;case"saswp-wpamp-checkbox":saswp_compatibliy_notes(a,e),s(this).is(":checked")?s("#saswp-wpamp").val(1):s("#saswp-wpamp").val(0)}}).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 p="";"saswp_image_div_"+t=="saswp_image_div_sd_default_image"&&e.height<1200&&(p='<p class="saswp_warning">Image size is smaller than recommended size</p>'),s(".saswp_image_div_"+t).html('<div class="saswp_image_thumbnail"><img class="saswp_image_prev" src="'+e.url+'"/><a data-id="'+t+'" href="#" class="saswp_prev_close">X</a></div>'+p)}).open()}),s(document).on("click",".saswp_prev_close",function(e){e.preventDefault();var a=s(this).attr("data-id");s(this).parent().remove(),s("#"+a).val(""),s("input[data-id='"+a+"_id']").val(""),s("input[data-id='"+a+"_height']").val(""),s("input[data-id='"+a+"_width']").val(""),s("input[data-id='"+a+"_thumbnail']").val(""),"sd_default_image"===a&&(s("#sd_default_image_width").val(""),s("#sd_default_image_height").val(""))}),s(document).on("click",".saswp-modify-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id");s(".saswp_modify_this_schema_hidden_"+a).val(1),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide")}),s(document).on("click",".saswp-restore-schema",function(e){e.preventDefault();var a=s(this).attr("schema-id");s(".saswp_modify_this_schema_hidden_"+a).val(0),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide")}),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"),i=s(".saswp_modify_this_schema_hidden_"+a).val();if(s(this).is(":checked")){var p=0;s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s(".saswp-modify-schema[schema-id="+a+"]").parent().addClass("saswp_hide"),s("#saswp_custom_schema_field[schema-id="+a+"]").parent().addClass("saswp_hide")}else{s("#saswp_custom_schema_field[schema-id="+a+"]").parent().removeClass("saswp_hide"),1==i?(s(".saswp-ps-toggle[schema-id="+a+"]").removeClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().removeClass("saswp_hide")):(s(".saswp-modify-schema[schema-id="+a+"]").parent().removeClass("saswp_hide"),s(".saswp-ps-toggle[schema-id="+a+"]").addClass("saswp_hide"),s(".saswp-restore-schema[schema-id="+a+"]").parent().addClass("saswp_hide"));p=1}s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_enable_disable_schema_on_post",status:p,schema_id: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"),p=s("#"+i+"_addon_license_key").val();t&&i&&p?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_license_status_check",license_key:p,license_status:t,add_on:i,saswp_security_nonce:saswp_localize_data.saswp_security_nonce},success:function(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(),t=s("#saswp_query_premium_cus").val();""!=s.trim(a)&&t?s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"saswp_send_query_message",premium_cus:t,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()):(s(".saswp-query-success").hide(),s(".saswp-query-error").show())},error:function(s){console.log(s)}}):""==s.trim(a)&&""==t?alert("Please enter the message and select customer type"):(""==t&&alert("Select Customer type"),""==s.trim(a)&&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(),jQuery(".saswp-local-schema-time-picker").timepicker({timeFormat:"H:i:s"}),s(document).on("click",".saswp-add-custom-schema",function(e){e.preventDefault(),s(".saswp-add-custom-schema-field").removeClass("saswp_hide"),s(this).hide()}),s(document).on("click",".saswp-delete-custom-schema",function(e){e.preventDefault(),s("#saswp_custom_schema_field").val(""),s(".saswp-add-custom-schema-field").addClass("saswp_hide"),s(".saswp-add-custom-schema").show()}),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();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"),p=s(this).attr("div_type"),o=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div").length,c=s("saswp_specific_"+t+" , .saswp-"+p+"-table-div:nth-child("+o+")").attr("data-id");(c=++c)||(c=0),saswp_get_post_specific_schema_fields(a,c,i,p,t,i+"_","Article")}),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(),p="",o=a.toLowerCase()+"_"+i,c="saswp_fixed_image["+i+"]";"manual_text"==t?(p+='<td><input type="text" name="saswp_fixed_text['+i+']"></td>',p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"taxonomy_term"==t?saswp_taxonomy_term.taxonomy?(p+=saswp_taxonomy_term_html(saswp_taxonomy_term.taxonomy,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(p),saswpCustomSelect2()):s.get(ajaxurl,{action:"saswp_get_taxonomy_term_list",saswp_security_nonce:saswp_localize_data.saswp_security_nonce},function(s){s&&(saswp_taxonomy_term.taxonomy=s,p+=saswp_taxonomy_term_html(s,i),e.parent().parent("tr").find("td:gt(1)").remove(),e.parent().parent("tr").append(p),saswpCustomSelect2())},"json"):"custom_field"==t?(p+='<td><select class="saswp-custom-fields-select2" name="saswp_custom_meta_field['+i+']">',p+="</select></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):"fixed_image"==t?(p+="<td>",p+="<fieldset>",p+='<input data-id="media" style="width: 30%;" class="button" id="'+o+'_button" name="'+o+'_button" type="button" value="Upload" />',p+='<input type="hidden" data-id="'+o+'_height" class="upload-height" name="'+c+'[height]" id="'+o+'_height" value="">',p+='<input type="hidden" data-id="'+o+'_width" class="upload-width" name="'+c+'[width]" id="'+o+'_width" value="">',p+='<input type="hidden" data-id="'+o+'_thumbnail" class="upload-thumbnail" name="'+c+'[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>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2()):(p+="<td></td>",p+='<td><a class="button button-default saswp-rmv-modify_row">X</a></td>',s(this).parent().parent("tr").find("td:gt(1)").remove(),s(this).parent().parent("tr").append(p),saswpCustomSelect2())}),s(document).on("change",".saswp-item-reivewed-list",function(){s(".saswp-custom-fields-table").html(""),saswp_meta_list_fields=[];var 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 p=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:p,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>')}),s(document).on("click",".saswp-show-accept-rv-popup",function(){tb_show("Reviews Form","#TB_inline??width=600&height=400&inlineId=saswp-accept-reviews-popup"),s(document).find("#TB_window").width(600).height(400).css({top:"100px","margin-top":"0px"})}),("saswp_reviews"==saswp_localize_data.post_type||"saswp-collections"==saswp_localize_data.post_type)&&"edit.php"==saswp_localize_data.page_now){var i='<div class="saswp-custom-post-tab">';i+='<div style="display:none;" id="saswp-accept-reviews-popup">',i+='<div class="saswp-accept-rv-container">',i+="<p>Use Below shortcode to show reviews form in your website. Using this you can accept reviews from your website directly</p>",i+='<div class="saswp-show-form-on-tab"><strong>Simple Form</strong> <input value="[saswp-reviews-form]" type="text" readonly></div>',i+='<div class="saswp-show-form-on-tab"><strong>Show form on button tap</strong> <input value="[saswp-reviews-form onbutton=&quot;1&quot;]" type="text" readonly></div>',i+="</div>",i+="</div>",i+='<h2 class="nav-tab-wrapper">',i+="<a href="+saswp_localize_data.reviews_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.reviews_page_url?"saswp-global-selected":"")+'">Reviews</a>',i+="<a href="+saswp_localize_data.collections_page_url+' class="nav-tab '+(saswp_localize_data.current_url==saswp_localize_data.collections_page_url?"saswp-global-selected":"")+'">Collections</a>',i+='<a class="nav-tab saswp-show-accept-rv-popup">Accept Reviews</a>',i+="</h2>",i+="</div>",jQuery(jQuery(".wrap")).prepend(i)}"saswp"==saswp_localize_data.post_type&&"edit.php"==saswp_localize_data.page_now&&jQuery(jQuery(".wrap a")[0]).after("<a href='"+saswp_localize_data.saswp_settings_url+"' id='' class='page-title-action'>Settings</a>"),"undefined"!=typeof saswp_reviews_data&&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)}}),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(document).on("click",".saswp-grid-page",function(e){e.preventDefault(),saswp_grid_page=s(this).attr("data-id"),saswp_on_collection_design_change()}),s("#saswp-coll-pagination").change(function(){saswp_grid_page=1,s("#saswp-coll-per-page").parent().addClass("saswp_hide_imp"),s(this).is(":checked")&&s("#saswp-coll-per-page").parent().removeClass("saswp_hide_imp"),saswp_on_collection_design_change()}),s(".saswp-accordion").click(function(){s(this).toggleClass("active"),s(this).next(".saswp-accordion-panel").slideToggle(200)}),s(document).on("click",".saswp-opn-cls-btn",function(){s("#saswp-reviews-cntn").toggle(),s("#saswp-reviews-cntn").is(":visible")?(s(".saswp-onclick-show").css("display","flex"),s(".saswp-onclick-hide").hide(),s(".saswp-open-class").css("width","500px")):(s(".saswp-onclick-show").css("display","none"),s(".saswp-onclick-hide").show(),s(".saswp-open-class").css("width","300px"))}),s(".saswp-collection-display-method").change(function(){"shortcode"==s(this).val()?s(".saswp-collection-shortcode").removeClass("saswp_hide"):s(".saswp-collection-shortcode").addClass("saswp_hide")}).change(),s(document).on("click",".saswp-remove-platform",function(e){e.preventDefault();var a=s(this).attr("platform-id");saswp_collection.splice(a,1),s(this).parent().remove(),saswp_on_collection_design_change()}),s(".saswp-number-change").bind("keyup mouseup",function(){saswp_on_collection_design_change()}),s(".saswp-coll-settings-options").change(function(){saswp_grid_page=1;var e=s(".saswp-collection-desing").val();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 p,o,c=s("#saswp_collection_id").val();c&&(s(".spinner").addClass("is-active"),s.get(ajaxurl,{action:"saswp_get_collection_platforms",collection_id:c,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")),(p=document.createElement("div")).style.cssText="position:absolute; background:black; color:white; padding:4px 6px;z-index:10000;border-radius:2px; font-size:12px;box-shadow:3px 3px 3px rgba(0,0,0,.4);opacity:0;transition:opacity 0.3s",p.innerHTML="Copied!",document.body.appendChild(p);var n=document.getElementById("motivatebox");n&&n.addEventListener("mouseup",function(s){var 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),p.style.left=e.pageX-10+"px",p.style.top=e.pageY+15+"px",p.style.opacity=1,o=setTimeout(function(){p.style.opacity=0},500)}(s))},!1)});
admin_section/js/review-form.js CHANGED
@@ -1,10 +1,14 @@
1
  jQuery(document).ready(function($){
2
 
3
- $(".saswp-rating-front-div").rateYo({
4
  rating : 1,
5
  fullStar: true,
6
  onSet: function (rating, rateYoInstance) {
7
  $(this).next().val(rating);
8
  }
9
  });
 
 
 
 
10
  });
1
  jQuery(document).ready(function($){
2
 
3
+ jQuery(".saswp-rating-front-div").rateYo({
4
  rating : 1,
5
  fullStar: true,
6
  onSet: function (rating, rateYoInstance) {
7
  $(this).next().val(rating);
8
  }
9
  });
10
+ jQuery(".saswp-rv-form-btn a").on("click", function(e){
11
+ e.preventDefault();
12
+ $(".saswp-review-submission-form").slideToggle("fast");
13
+ });
14
  });
admin_section/js/review-form.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(t){t(".saswp-rating-front-div").rateYo({rating:1,fullStar:!0,onSet:function(n,a){t(this).next().val(n)}})});
1
+ jQuery(document).ready(function(n){jQuery(".saswp-rating-front-div").rateYo({rating:1,fullStar:!0,onSet:function(t,e){n(this).next().val(t)}}),jQuery(".saswp-rv-form-btn a").on("click",function(t){t.preventDefault(),n(".saswp-review-submission-form").slideToggle("fast")})});
admin_section/settings.php CHANGED
@@ -220,7 +220,7 @@ function saswp_admin_interface_render(){
220
  </form>
221
  </div>
222
  <div class="saswp-settings-second-div">
223
- <a target="_blank" href="http://structured-data-for-wp.com/pricing/">
224
  <div class="saswp-upgrade-pro promo-cpn">
225
  <h2><?php echo esc_html__('50% OFF on PRO','schema-and-structured-data-for-wp') ?></h2>
226
  <span><?php echo esc_html__('Limited Time Offer for this festive season','schema-and-structured-data-for-wp') ?></span>
@@ -229,7 +229,7 @@ function saswp_admin_interface_render(){
229
  <span class="prm-cpn"><?php echo esc_html__('BFCM2019','schema-and-structured-data-for-wp') ?></span>
230
  </div>
231
  </div>
232
- </a>
233
  <?php if(!saswp_ext_installed_status()) { ?>
234
  <div class="saswp-upgrade-pro">
235
  <h2><?php echo esc_html__('Upgrade to Pro!','schema-and-structured-data-for-wp') ?></h2>
@@ -1170,7 +1170,7 @@ function saswp_import_callback(){
1170
 
1171
  );
1172
 
1173
- if(saswp_current_user_role() == 'administrator'){
1174
 
1175
  $meta_fields[] = array(
1176
  'label' => 'Role Based Access',
@@ -1672,6 +1672,19 @@ function saswp_compatibility_page_callback(){
1672
 
1673
  $settings = saswp_defaultSettings();
1674
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1675
  $ampforwp = array(
1676
  'label' => 'AMPforWP',
1677
  'id' => 'saswp-ampforwp-checkbox',
@@ -2386,6 +2399,7 @@ function saswp_compatibility_page_callback(){
2386
  $bne_testimonials,
2387
  $testimonial_pro,
2388
  $strong_testimonials,
 
2389
  $WordLift,
2390
  $flex_lmx
2391
 
@@ -2590,7 +2604,8 @@ function saswp_enqueue_style_js( $hook ) {
2590
  $all_schema_array = include $mappings_file;
2591
  }
2592
 
2593
- $data = array(
 
2594
  'post_id' => get_the_ID(),
2595
  'ajax_url' => admin_url( 'admin-ajax.php' ),
2596
  'saswp_security_nonce' => wp_create_nonce('saswp_ajax_check_nonce'),
@@ -2598,7 +2613,8 @@ function saswp_enqueue_style_js( $hook ) {
2598
  'new_url_href' => htmlspecialchars_decode(wp_nonce_url(admin_url('index.php?page=saswp_add_new_data_type&'), '_wpnonce')),
2599
  'collection_post_add_url' => esc_url(admin_url()).'post-new.php?post_type=saswp-collections',
2600
  'collection_post_add_new_url' => htmlspecialchars_decode(wp_nonce_url(admin_url('admin.php?page=collection'), '_wpnonce')),
2601
- 'collections_page_url' => htmlspecialchars_decode(wp_nonce_url(admin_url('edit.php?post_type=saswp-collections'), '_wpnonce')),
 
2602
  'post_type' => $post_type,
2603
  'page_now' => $hook,
2604
  'saswp_settings_url' => esc_url(admin_url('edit.php?post_type=saswp&page=structured_data_options')),
@@ -2646,14 +2662,17 @@ add_filter( 'option_page_capability_sd_data_group', 'saswp_option_page_capabilit
2646
 
2647
  function saswp_pre_update_settings($value, $old_value, $option){
2648
 
2649
- if(saswp_current_user_role() != 'administrator'){
2650
 
2651
  if(isset($old_value['saswp-role-based-access'])){
2652
  $value['saswp-role-based-access'] = $old_value['saswp-role-based-access'];
2653
  }
2654
 
2655
- }
2656
-
 
 
 
2657
  return $value;
2658
  }
2659
 
220
  </form>
221
  </div>
222
  <div class="saswp-settings-second-div">
223
+ <!-- <a target="_blank" href="http://structured-data-for-wp.com/pricing/">
224
  <div class="saswp-upgrade-pro promo-cpn">
225
  <h2><?php echo esc_html__('50% OFF on PRO','schema-and-structured-data-for-wp') ?></h2>
226
  <span><?php echo esc_html__('Limited Time Offer for this festive season','schema-and-structured-data-for-wp') ?></span>
229
  <span class="prm-cpn"><?php echo esc_html__('BFCM2019','schema-and-structured-data-for-wp') ?></span>
230
  </div>
231
  </div>
232
+ </a>-->
233
  <?php if(!saswp_ext_installed_status()) { ?>
234
  <div class="saswp-upgrade-pro">
235
  <h2><?php echo esc_html__('Upgrade to Pro!','schema-and-structured-data-for-wp') ?></h2>
1170
 
1171
  );
1172
 
1173
+ if(is_super_admin()){
1174
 
1175
  $meta_fields[] = array(
1176
  'label' => 'Role Based Access',
1672
 
1673
  $settings = saswp_defaultSettings();
1674
 
1675
+ $wordpress_news = array(
1676
+ 'label' => 'Wordpress News',
1677
+ 'id' => 'saswp-wordpress-news-checkbox',
1678
+ 'name' => 'saswp-wordpress-news-checkbox',
1679
+ 'type' => 'checkbox',
1680
+ 'class' => 'checkbox saswp-checkbox',
1681
+ 'note' => saswp_get_field_note('wordpress_news'),
1682
+ 'hidden' => array(
1683
+ 'id' => 'saswp-wordpress-news',
1684
+ 'name' => 'sd_data[saswp-wordpress-news]',
1685
+ )
1686
+ );
1687
+
1688
  $ampforwp = array(
1689
  'label' => 'AMPforWP',
1690
  'id' => 'saswp-ampforwp-checkbox',
2399
  $bne_testimonials,
2400
  $testimonial_pro,
2401
  $strong_testimonials,
2402
+ $wordpress_news,
2403
  $WordLift,
2404
  $flex_lmx
2405
 
2604
  $all_schema_array = include $mappings_file;
2605
  }
2606
 
2607
+ $data = array(
2608
+ 'current_url' => saswp_get_current_url(),
2609
  'post_id' => get_the_ID(),
2610
  'ajax_url' => admin_url( 'admin-ajax.php' ),
2611
  'saswp_security_nonce' => wp_create_nonce('saswp_ajax_check_nonce'),
2613
  'new_url_href' => htmlspecialchars_decode(wp_nonce_url(admin_url('index.php?page=saswp_add_new_data_type&'), '_wpnonce')),
2614
  'collection_post_add_url' => esc_url(admin_url()).'post-new.php?post_type=saswp-collections',
2615
  'collection_post_add_new_url' => htmlspecialchars_decode(wp_nonce_url(admin_url('admin.php?page=collection'), '_wpnonce')),
2616
+ 'collections_page_url' => htmlspecialchars_decode(admin_url('edit.php?post_type=saswp-collections')),
2617
+ 'reviews_page_url' => htmlspecialchars_decode(admin_url('edit.php?post_type=saswp_reviews')),
2618
  'post_type' => $post_type,
2619
  'page_now' => $hook,
2620
  'saswp_settings_url' => esc_url(admin_url('edit.php?post_type=saswp&page=structured_data_options')),
2662
 
2663
  function saswp_pre_update_settings($value, $old_value, $option){
2664
 
2665
+ if(!is_super_admin()){
2666
 
2667
  if(isset($old_value['saswp-role-based-access'])){
2668
  $value['saswp-role-based-access'] = $old_value['saswp-role-based-access'];
2669
  }
2670
 
2671
+ }else{
2672
+ if(!in_array('administrator', $value['saswp-role-based-access'])){
2673
+ array_push($value['saswp-role-based-access'], 'administrator');
2674
+ }
2675
+ }
2676
  return $value;
2677
  }
2678
 
admin_section/structure_admin.php CHANGED
@@ -682,7 +682,7 @@ if(is_admin()){
682
  'page_template' => esc_html__("Page Template",'schema-and-structured-data-for-wp'),
683
  ),
684
  esc_html__("Other",'schema-and-structured-data-for-wp') => array(
685
- 'ef_taxonomy' => esc_html__("Taxonomy Term",'schema-and-structured-data-for-wp'),
686
  )
687
  );
688
 
682
  'page_template' => esc_html__("Page Template",'schema-and-structured-data-for-wp'),
683
  ),
684
  esc_html__("Other",'schema-and-structured-data-for-wp') => array(
685
+ 'ef_taxonomy' => esc_html__("Taxonomy (Tag)",'schema-and-structured-data-for-wp'),
686
  )
687
  );
688
 
admin_section/tracking/class-saswp-plugin-usage-tracker.php CHANGED
@@ -193,10 +193,8 @@ if( ! class_exists( 'SASWP_Plugin_Usage_Tracker') ) {
193
  'body' => $body,
194
  'user-agent' => 'PUT/1.0.0; ' . home_url()
195
  )
196
- );
197
- //print_r($request['body']); die;
198
 
199
-
200
  $this->set_track_time();
201
 
202
  if( is_wp_error( $request ) ) {
@@ -326,8 +324,7 @@ if( ! class_exists( 'SASWP_Plugin_Usage_Tracker') ) {
326
 
327
  if( false !== get_option( 'wisdom_deactivation_reason_' . $this->plugin_name ) ) {
328
  $body['deactivation_reason'] = get_option( 'wisdom_deactivation_reason_' . $this->plugin_name );
329
- }
330
- // print_r($body); die;
331
  // Return the data
332
  return $body;
333
 
@@ -731,7 +728,7 @@ if( ! class_exists( 'SASWP_Plugin_Usage_Tracker') ) {
731
 
732
  <div class="notice notice-info updated put-dismiss-notice">
733
  <p><?php echo '<strong>Love using Schema & Structured Data for WP & AMP?</strong>'; ?></p>
734
- <p><?php echo esc_html( $notice_text ); ?> <a href="https://structured-data-for-wp.com/docs/article/how-to-set-up-schema-for-local-business/" target="_blank"><?php echo esc_html__( 'Learn more.', 'singularity' ); ?></a></p>
735
  <p>
736
  <a href="<?php echo esc_url( $url_yes ); ?>" class="button-primary"><?php echo _e( 'Sure! I\'d love to help', 'singularity' ); ?></a>&nbsp;&nbsp;
737
  <a href="<?php echo esc_url( $url_no ); ?>" class="button-secondary"><?php echo _e( 'No thanks', 'singularity' ); ?></a>
193
  'body' => $body,
194
  'user-agent' => 'PUT/1.0.0; ' . home_url()
195
  )
196
+ );
 
197
 
 
198
  $this->set_track_time();
199
 
200
  if( is_wp_error( $request ) ) {
324
 
325
  if( false !== get_option( 'wisdom_deactivation_reason_' . $this->plugin_name ) ) {
326
  $body['deactivation_reason'] = get_option( 'wisdom_deactivation_reason_' . $this->plugin_name );
327
+ }
 
328
  // Return the data
329
  return $body;
330
 
728
 
729
  <div class="notice notice-info updated put-dismiss-notice">
730
  <p><?php echo '<strong>Love using Schema & Structured Data for WP & AMP?</strong>'; ?></p>
731
+ <p><?php echo esc_html( $notice_text ); ?> <a href="https://structured-data-for-wp.com/docs/article/usage-data-tracking/" target="_blank"><?php echo esc_html__( 'Learn more.', 'singularity' ); ?></a></p>
732
  <p>
733
  <a href="<?php echo esc_url( $url_yes ); ?>" class="button-primary"><?php echo _e( 'Sure! I\'d love to help', 'singularity' ); ?></a>&nbsp;&nbsp;
734
  <a href="<?php echo esc_url( $url_no ); ?>" class="button-secondary"><?php echo _e( 'No thanks', 'singularity' ); ?></a>
core/array-list/compatibility-list.php CHANGED
@@ -4,6 +4,12 @@ if ( ! defined( 'ABSPATH' ) ) exit;
4
 
5
  return array(
6
  'plugins' => array(
 
 
 
 
 
 
7
  'easy_recipe' => array(
8
  'name' => 'EasyRecipe',
9
  'free' => 'easyrecipe/easyrecipe.php',
4
 
5
  return array(
6
  'plugins' => array(
7
+ 'wordpress_news' => array(
8
+ 'name' => 'Wordpress News',
9
+ 'free' => 'wordpress-news/wp-news.php',
10
+ 'opt_name' => 'saswp-wordpress-news',
11
+ 'part_in' => 'free',
12
+ ),
13
  'easy_recipe' => array(
14
  'name' => 'EasyRecipe',
15
  'free' => 'easyrecipe/easyrecipe.php',
core/array-list/repeater-fields.php CHANGED
@@ -3,9 +3,12 @@
3
  if ( ! defined( 'ABSPATH' ) ) exit;
4
 
5
  return array( 'schema_type_element' => array(
 
 
 
6
  'MusicComposition' => array(
7
  'music_composer' => 'music_composer',
8
- ),
9
  'Movie' => array(
10
  'movie_actor' => 'movie_actor',
11
  ),
3
  if ( ! defined( 'ABSPATH' ) ) exit;
4
 
5
  return array( 'schema_type_element' => array(
6
+ 'ItemList' => array(
7
+ 'itemlist_item' => 'itemlist_item',
8
+ ),
9
  'MusicComposition' => array(
10
  'music_composer' => 'music_composer',
11
+ ),
12
  'Movie' => array(
13
  'movie_actor' => 'movie_actor',
14
  ),
core/array-list/schema-properties.php CHANGED
@@ -14,37 +14,42 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
14
  global $post;
15
  global $sd_data;
16
 
17
- $post_id = $post->ID;
18
-
19
-
20
- $current_user = wp_get_current_user();
21
- $author_desc = get_the_author_meta( 'user_description' );
22
- $author_url = get_the_author_meta( 'user_url' );
23
- $author_details = array();
24
-
25
- if(function_exists('get_avatar_data')){
26
- $author_details = get_avatar_data($current_user->ID);
27
- }
28
-
29
- $schema_type = get_post_meta($schema_id, 'schema_type', true);
30
-
31
  if($review_type){
32
  $schema_type = $review_type;
 
 
33
  }
34
- $business_type = '';
35
- $business_type = get_post_meta($schema_id, 'saswp_business_type', true);
36
- $business_name = get_post_meta($schema_id, 'saswp_business_name', true);
37
-
38
- $saswp_business_type_key = 'saswp_business_type_'.$schema_id;
39
- $saved_business_type = get_post_meta( $post->ID, $saswp_business_type_key, true );
40
- $saved_saswp_business_name = get_post_meta( $post->ID, 'saswp_business_name_'.$schema_id, true );
41
 
42
- if($saved_business_type){
43
- $business_type = $saved_business_type;
44
- }
45
- if($saved_saswp_business_name){
46
- $business_name = $saved_saswp_business_name;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
 
48
  $meta_field = array();
49
 
50
  switch ($schema_type) {
@@ -1276,8 +1281,14 @@ function saswp_get_fields_by_schema_type( $schema_id = null, $condition = null,
1276
 
1277
  case 'Product':
1278
 
1279
- $service = new saswp_output_service();
1280
- $product_details = $service->saswp_woocommerce_product_details($post_id);
 
 
 
 
 
 
1281
 
1282
  $meta_field = array(
1283
 
14
  global $post;
15
  global $sd_data;
16
 
17
+ $business_type = '';
18
+
 
 
 
 
 
 
 
 
 
 
 
 
19
  if($review_type){
20
  $schema_type = $review_type;
21
+ }else{
22
+ $schema_type = get_post_meta($schema_id, 'schema_type', true);
23
  }
 
 
 
 
 
 
 
24
 
25
+ if($manual == null){
26
+
27
+ $post_id = $post->ID;
28
+
29
+ $current_user = wp_get_current_user();
30
+ $author_desc = get_the_author_meta( 'user_description' );
31
+ $author_url = get_the_author_meta( 'user_url' );
32
+ $author_details = array();
33
+
34
+ if(function_exists('get_avatar_data')){
35
+ $author_details = get_avatar_data($current_user->ID);
36
+ }
37
+
38
+ $business_type = get_post_meta($schema_id, 'saswp_business_type', true);
39
+ $business_name = get_post_meta($schema_id, 'saswp_business_name', true);
40
+ $saswp_business_type_key = 'saswp_business_type_'.$schema_id;
41
+ $saved_business_type = get_post_meta( $post->ID, $saswp_business_type_key, true );
42
+ $saved_saswp_business_name = get_post_meta( $post->ID, 'saswp_business_name_'.$schema_id, true );
43
+
44
+ if($saved_business_type){
45
+ $business_type = $saved_business_type;
46
+ }
47
+ if($saved_saswp_business_name){
48
+ $business_name = $saved_saswp_business_name;
49
+ }
50
+
51
  }
52
+
53
  $meta_field = array();
54
 
55
  switch ($schema_type) {
1281
 
1282
  case 'Product':
1283
 
1284
+ $product_details = array();
1285
+
1286
+ if($manual == null){
1287
+
1288
+ $service = new saswp_output_service();
1289
+ $product_details = $service->saswp_woocommerce_product_details($post_id);
1290
+
1291
+ }
1292
 
1293
  $meta_field = array(
1294
 
core/array-list/schemas.php CHANGED
@@ -39,6 +39,7 @@ return array(
39
  'VideoGame' => 'VideoGame'
40
  ),
41
  'Intangible' => array(
 
42
  'JobPosting' => 'JobPosting',
43
  'Service' => 'Service',
44
  'Trip' => 'Trip',
39
  'VideoGame' => 'VideoGame'
40
  ),
41
  'Intangible' => array(
42
+ 'ItemList' => 'ItemList',
43
  'JobPosting' => 'JobPosting',
44
  'Service' => 'Service',
45
  'Trip' => 'Trip',
core/global.php CHANGED
@@ -3,4 +3,60 @@
3
  if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  }
6
- $saswp_post_reviews = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  }
6
+ $with_aggregate = array(
7
+ 'Book',
8
+ 'Course',
9
+ 'HowTo',
10
+ 'ImageObject',
11
+ 'MusicPlaylist',
12
+ 'MusicAlbum',
13
+ 'MusicComposition',
14
+ 'Movie',
15
+ 'Review',
16
+ 'Recipe',
17
+ 'TVSeries',
18
+ 'SoftwareApplication',
19
+ 'Event',
20
+ 'VideoGame',
21
+ 'AudioObject',
22
+ 'VideoObject',
23
+ 'local_business',
24
+ 'Product'
25
+ );
26
+ $without_aggregate = array(
27
+ 'Apartment',
28
+ 'House',
29
+ 'SingleFamilyResidence',
30
+ 'Article',
31
+ 'Blogposting',
32
+ 'DiscussionForumPosting',
33
+ 'DataFeed',
34
+ 'FAQ',
35
+ 'NewsArticle',
36
+ 'qanda',
37
+ 'TechArticle',
38
+ 'WebPage',
39
+ 'JobPosting',
40
+ 'Service',
41
+ 'Trip',
42
+ 'MedicalCondition',
43
+ 'TouristAttraction',
44
+ 'TouristDestination',
45
+ 'LandmarksOrHistoricalBuildings',
46
+ 'HinduTemple',
47
+ 'Church',
48
+ 'Mosque',
49
+ 'Person'
50
+ );
51
+ $translation_labels = array(
52
+ 'translation-pros' => 'Pros',
53
+ 'translation-cons' => 'Cons',
54
+ 'translation-review-overview' => 'Review Overview',
55
+ 'translation-overall-score' => 'Overall Score',
56
+ 'translation-tools' => 'Tools',
57
+ 'translation-materials' => 'Materials',
58
+ 'translation-time-needed' => 'Time Needed',
59
+ 'translation-name' => 'Name',
60
+ 'translation-comment' => 'Comment',
61
+ );
62
+ $saswp_post_reviews = array();
modules/gutenberg/includes/class-gutenberg.php CHANGED
@@ -212,31 +212,13 @@ class SASWP_Gutenberg {
212
  array( 'wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-editor' )
213
  );
214
 
215
-
216
  if($key == 'collection'){
217
 
218
- $collection = get_posts( array(
219
- 'posts_per_page' => -1,
220
- 'post_type' => 'saswp-collections',
221
- 'post_status' => 'publish',
222
-
223
- ));
224
 
225
- if($collection){
226
-
227
- $col_opt = array();
228
-
229
- foreach($collection as $col){
230
-
231
- $col_opt[] = array(
232
- 'value' => $col->ID,
233
- 'label' => $col->post_title
234
- );
235
-
236
- }
237
-
238
  $block['local']['collection'] = $col_opt;
239
-
240
  }else{
241
  $block['local']['collection_not_found'] = true;
242
  $block['local']['collection_url'] = wp_nonce_url(admin_url('admin.php?page=collection'), '_wpnonce');
212
  array( 'wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-editor' )
213
  );
214
 
 
215
  if($key == 'collection'){
216
 
217
+ $review_service = new saswp_reviews_service();
218
+ $col_opt = $review_service->saswp_get_collection_list();
 
 
 
 
219
 
220
+ if($col_opt){
 
 
 
 
 
 
 
 
 
 
 
 
221
  $block['local']['collection'] = $col_opt;
 
222
  }else{
223
  $block['local']['collection_not_found'] = true;
224
  $block['local']['collection_url'] = wp_nonce_url(admin_url('admin.php?page=collection'), '_wpnonce');
modules/gutenberg/includes/render.php CHANGED
@@ -174,16 +174,20 @@ class SASWP_Gutenberg_Render {
174
  }
175
 
176
  public function collection_block_data($attributes){
 
 
177
 
178
- $response = '';
179
-
180
- if(isset($attributes['id'])){
181
-
182
- $response = do_shortcode('[saswp-reviews-collection id="'.$attributes['id'].'"]');
183
-
 
 
184
  }
185
 
186
- return $response;
187
 
188
  }
189
 
174
  }
175
 
176
  public function collection_block_data($attributes){
177
+
178
+ $collection_id = null;
179
 
180
+ if(isset($attributes['id'])){
181
+ $collection_id = $attributes['id'];
182
+ }else{
183
+ $review_service = new saswp_reviews_service();
184
+ $col_opt = $review_service->saswp_get_collection_list(1);
185
+ if(isset($col_opt[0]['value'])){
186
+ $collection_id = $col_opt[0]['value'];
187
+ }
188
  }
189
 
190
+ return do_shortcode('[saswp-reviews-collection id="'.$collection_id.'"]');
191
 
192
  }
193
 
modules/rating-box/backend.php CHANGED
@@ -43,18 +43,20 @@ class saswp_rating_box_backend {
43
  if($this->screen){
44
 
45
  foreach ( $this->screen as $single_screen ) {
46
-
47
- add_meta_box(
48
- 'sasw-review',
49
- esc_html__( 'Review', 'schema-and-structured-data-for-wp' ),
50
- array( $this, 'saswp_meta_box_callback' ),
51
- $single_screen,
52
- 'advanced',
53
- 'default'
54
- );
55
-
56
- }
57
- }
 
 
58
  }
59
  }
60
  function saswp_review_get_meta( $value ) {
43
  if($this->screen){
44
 
45
  foreach ( $this->screen as $single_screen ) {
46
+
47
+ if(saswp_current_user_allowed()){
48
+
49
+ add_meta_box(
50
+ 'sasw-review',
51
+ esc_html__( 'Rating Box', 'schema-and-structured-data-for-wp' ),
52
+ array( $this, 'saswp_meta_box_callback' ),
53
+ $single_screen,
54
+ 'advanced',
55
+ 'default'
56
+ );
57
+ }
58
+ }
59
+ }
60
  }
61
  }
62
  function saswp_review_get_meta( $value ) {
modules/rating-box/frontend.php CHANGED
@@ -122,7 +122,7 @@ Class saswp_rating_box_frontend{
122
 
123
  echo '<!-- Schema & Structured Data For WP Rating Module v'.esc_attr(SASWP_VERSION).' - -->';
124
  echo "\n";
125
- echo '<script type="application/ld+json" class="saswp-schema-markup-output">';
126
  echo "\n";
127
  echo saswp_json_print_format($input1);
128
  echo "\n";
122
 
123
  echo '<!-- Schema & Structured Data For WP Rating Module v'.esc_attr(SASWP_VERSION).' - -->';
124
  echo "\n";
125
+ echo '<script type="application/ld+json" class="saswp-schema-markup-rating-module-output">';
126
  echo "\n";
127
  echo saswp_json_print_format($input1);
128
  echo "\n";
modules/reviews/reviews_collection.php CHANGED
@@ -252,9 +252,12 @@ class SASWP_Reviews_Collection {
252
 
253
  if(isset($attr['id'])){
254
 
255
- $collection = array();
256
- $total_collection = array();
 
257
  $platform_id = array();
 
 
258
  $dots = $f_interval = $f_visibility = $arrow = 1;
259
  $g_type = $design = $cols = $sorting = '';
260
 
@@ -298,39 +301,58 @@ class SASWP_Reviews_Collection {
298
  if(isset($collection_data['saswp_platform_ids'][0])){
299
  $platform_id = unserialize($collection_data['saswp_platform_ids'][0]);
300
  }
301
-
302
- if($platform_id){
303
-
304
- foreach ($platform_id as $key => $val){
305
-
306
- $reviews_list = $this->_service->saswp_get_reviews_list_by_parameters(null, $key, $val);
307
- $total_collection[] = $reviews_list;
308
-
309
- if($reviews_list){
310
-
311
- $collection = array_merge($collection, $reviews_list);
312
- }
313
-
314
- }
315
-
316
- $collection = $this->_service->saswp_sort_collection($collection, $sorting);
317
-
318
  }
319
 
320
- if($collection){
321
 
322
  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 );
323
  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 );
324
 
325
  add_action( 'amp_post_template_css', array($this, 'saswp_reviews_collection_amp_css'));
326
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
327
  $saswp_post_reviews = array_merge($saswp_post_reviews, $collection);
328
 
329
  switch($design) {
330
 
331
  case "grid":
332
 
333
- $html = $this->_service->saswp_create_collection_grid($cols, $collection);
334
 
335
  break;
336
 
@@ -342,7 +364,7 @@ class SASWP_Reviews_Collection {
342
 
343
  case 'badge':
344
 
345
- $html = $this->_service->saswp_create_collection_badge($total_collection);
346
 
347
  break;
348
 
@@ -482,6 +504,9 @@ class SASWP_Reviews_Collection {
482
  </div>
483
  <div class="saswp-platform-added-list">
484
 
 
 
 
485
  </div>
486
  </div>
487
  </li>
@@ -501,8 +526,19 @@ class SASWP_Reviews_Collection {
501
  </div>
502
  <div class="saswp-dp-dsg saswp-coll-options saswp-grid-options saswp-dp-dtm">
503
  <label><?php echo esc_html__( 'Columns', 'schema-and-structured-data-for-wp' ); ?></label>
504
- <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">
 
 
 
 
 
505
  </div>
 
 
 
 
 
 
506
  <div class="saswp-dp-dsg saswp-dp-dtm saswp-slider-options saswp-coll-options">
507
  <label><?php echo esc_html__( 'Slider Type', 'schema-and-structured-data-for-wp' ); ?></label>
508
  <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">
@@ -599,20 +635,22 @@ class SASWP_Reviews_Collection {
599
  'post_status' => 'publish',
600
  'post_name' => $post_title,
601
  'post_type' => 'saswp-collections',
602
- );
603
-
604
  wp_update_post($post);
605
  $post_meta = array();
606
- $post_meta['saswp_collection_design'] = sanitize_text_field($_POST['saswp_collection_design']);
607
- $post_meta['saswp_collection_sorting'] = sanitize_text_field($_POST['saswp_collection_sorting']);
608
- $post_meta['saswp_collection_display_type'] = sanitize_text_field($_POST['saswp_collection_display_type']);
609
- $post_meta['saswp_collection_gallery_type'] = sanitize_text_field($_POST['saswp_collection_gallery_type']);
610
- $post_meta['saswp_collection_cols'] = intval($_POST['saswp_collection_cols']);
611
- $post_meta['saswp_gallery_arrow'] = intval($_POST['saswp_gallery_arrow']);
612
- $post_meta['saswp_gallery_dots'] = intval($_POST['saswp_gallery_dots']);
613
- $post_meta['saswp_fomo_interval'] = intval($_POST['saswp_fomo_interval']);
614
- $post_meta['saswp_fomo_visibility'] = intval($_POST['saswp_fomo_visibility']);
 
 
615
  $post_meta['saswp_platform_ids'] = array_map('intval', $_POST['saswp_platform_ids']);
 
616
 
617
  if(!empty($post_meta)){
618
 
252
 
253
  if(isset($attr['id'])){
254
 
255
+ $total_reviews = array();
256
+ $total_reviews_count = 0;
257
+ $collection = array();
258
  $platform_id = array();
259
+ $pagination = null;
260
+ $perpage = null;
261
  $dots = $f_interval = $f_visibility = $arrow = 1;
262
  $g_type = $design = $cols = $sorting = '';
263
 
301
  if(isset($collection_data['saswp_platform_ids'][0])){
302
  $platform_id = unserialize($collection_data['saswp_platform_ids'][0]);
303
  }
304
+ if(isset($collection_data['saswp_platform_ids'][0])){
305
+ $total_reviews = unserialize($collection_data['saswp_total_reviews'][0]);
306
+ $total_reviews_count = count($total_reviews);
307
+ }
308
+ if(isset($collection_data['saswp_collection_pagination'][0])){
309
+ $pagination = $collection_data['saswp_collection_pagination'][0];
310
+ }
311
+ if(isset($collection_data['saswp_platform_ids'][0])){
312
+ $perpage = $collection_data['saswp_collection_per_page'][0];
 
 
 
 
 
 
 
 
313
  }
314
 
315
+ if($total_reviews){
316
 
317
  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 );
318
  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 );
319
 
320
  add_action( 'amp_post_template_css', array($this, 'saswp_reviews_collection_amp_css'));
321
 
322
+
323
+ if($design == 'grid'){
324
+
325
+ $nextpage = $perpage;
326
+ $offset = 0;
327
+
328
+ if($pagination){
329
+
330
+ $data_id = 1;
331
+
332
+ if(isset($_GET['rv_page'])){
333
+ $data_id = sanitize_text_field($_GET['rv_page']);
334
+ }
335
+
336
+ if($data_id > 0){
337
+ $nextpage = $data_id * $perpage;
338
+ }
339
+ $offset = $nextpage - $perpage;
340
+
341
+ $array_chunk = array_chunk($total_reviews,$perpage);
342
+ $total_reviews = $array_chunk[($data_id-1)];
343
+
344
+ }
345
+
346
+ }
347
+
348
+ $collection = $this->_service->saswp_get_reviews_list_by_design($design, $platform_id, $total_reviews, $sorting);
349
  $saswp_post_reviews = array_merge($saswp_post_reviews, $collection);
350
 
351
  switch($design) {
352
 
353
  case "grid":
354
 
355
+ $html = $this->_service->saswp_create_collection_grid($cols, $collection, $total_reviews, $pagination, $perpage, $offset, $nextpage, $data_id, $total_reviews_count);
356
 
357
  break;
358
 
364
 
365
  case 'badge':
366
 
367
+ $html = $this->_service->saswp_create_collection_badge($collection);
368
 
369
  break;
370
 
504
  </div>
505
  <div class="saswp-platform-added-list">
506
 
507
+ </div>
508
+ <div class="saswp-total-reviews-list">
509
+
510
  </div>
511
  </div>
512
  </li>
526
  </div>
527
  <div class="saswp-dp-dsg saswp-coll-options saswp-grid-options saswp-dp-dtm">
528
  <label><?php echo esc_html__( 'Columns', 'schema-and-structured-data-for-wp' ); ?></label>
529
+ <input type="number" id="saswp-collection-cols" name="saswp_collection_cols" min="1" 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">
530
+ </div>
531
+
532
+ <div class="saswp-dp-dsg saswp-coll-options saswp-grid-options saswp-dp-dtm">
533
+ <span><?php echo esc_html__( 'Pagination', 'schema-and-structured-data-for-wp' ); ?></span>
534
+ <span><input name="saswp_collection_pagination" type="checkbox" id="saswp-coll-pagination" class="saswp-coll-settings-options" value="1" <?php echo (isset($post_meta['saswp_collection_pagination'][0]) && $post_meta['saswp_collection_pagination'][0] == 1 ? 'checked' : '' ); ?>></span>
535
  </div>
536
+
537
+ <div class="saswp-dp-dsg saswp-coll-options saswp-grid-options saswp-dp-dtm saswp_hide_imp">
538
+ <label><?php echo esc_html__( 'Per Page', 'schema-and-structured-data-for-wp' ); ?></label>
539
+ <input name="saswp_collection_per_page" type="number" min="1" id="saswp-coll-per-page" class="saswp-coll-settings-options" value="<?php echo (isset($post_meta['saswp_collection_per_page'][0]) ? $post_meta['saswp_collection_per_page'][0] : '10' ); ?>">
540
+ </div>
541
+
542
  <div class="saswp-dp-dsg saswp-dp-dtm saswp-slider-options saswp-coll-options">
543
  <label><?php echo esc_html__( 'Slider Type', 'schema-and-structured-data-for-wp' ); ?></label>
544
  <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">
635
  'post_status' => 'publish',
636
  'post_name' => $post_title,
637
  'post_type' => 'saswp-collections',
638
+ );
 
639
  wp_update_post($post);
640
  $post_meta = array();
641
+ $post_meta['saswp_collection_design'] = isset($_POST['saswp_collection_design']) ? sanitize_text_field($_POST['saswp_collection_design']) : '';
642
+ $post_meta['saswp_collection_sorting'] = isset($_POST['saswp_collection_sorting']) ? sanitize_text_field($_POST['saswp_collection_sorting']) : '';
643
+ $post_meta['saswp_collection_display_type'] = isset($_POST['saswp_collection_display_type']) ? sanitize_text_field($_POST['saswp_collection_display_type']) : '';
644
+ $post_meta['saswp_collection_gallery_type'] = isset($_POST['saswp_collection_gallery_type']) ? sanitize_text_field($_POST['saswp_collection_gallery_type']) : '';
645
+ $post_meta['saswp_collection_cols'] = isset($_POST['saswp_collection_cols']) ? intval($_POST['saswp_collection_cols']) : '';
646
+ $post_meta['saswp_gallery_arrow'] = isset($_POST['saswp_gallery_arrow']) ? intval($_POST['saswp_gallery_arrow']) : '';
647
+ $post_meta['saswp_gallery_dots'] = isset($_POST['saswp_gallery_dots']) ? intval($_POST['saswp_gallery_dots']) : '';
648
+ $post_meta['saswp_collection_pagination'] = isset($_POST['saswp_collection_pagination']) ? intval($_POST['saswp_collection_pagination']) : '';
649
+ $post_meta['saswp_collection_per_page'] = isset($_POST['saswp_collection_per_page']) ? intval($_POST['saswp_collection_per_page']) : '';
650
+ $post_meta['saswp_fomo_interval'] = isset($_POST['saswp_fomo_interval']) ? intval($_POST['saswp_fomo_interval']) : '';
651
+ $post_meta['saswp_fomo_visibility'] = isset($_POST['saswp_fomo_visibility']) ? intval($_POST['saswp_fomo_visibility']) : '';
652
  $post_meta['saswp_platform_ids'] = array_map('intval', $_POST['saswp_platform_ids']);
653
+ $post_meta['saswp_total_reviews'] = array_map('intval', json_decode($_POST['saswp_total_reviews']));
654
 
655
  if(!empty($post_meta)){
656
 
modules/reviews/reviews_form.php CHANGED
@@ -153,7 +153,13 @@ class SASWP_Reviews_Form {
153
  }
154
 
155
  public function saswp_reviews_form_render($attr){
156
-
 
 
 
 
 
 
157
  $is_amp = false;
158
 
159
  if(!saswp_non_amp()){
@@ -181,14 +187,22 @@ class SASWP_Reviews_Form {
181
 
182
  if(!$is_amp){
183
 
 
 
 
 
184
  $rating_html = '<div class="saswp-rating-front-div"></div><input type="hidden" name="saswp_review_rating" value="5">';
185
- $form .= '<form action="'.esc_url( admin_url('admin-post.php') ).'" method="post" class="saswp-review-submission-form">';
186
 
187
  }else{
188
 
189
  add_action( 'amp_post_template_data', array($this, 'saswp_reviews_form_amp_script'));
190
 
191
- $form .= '<form action-xhr="'.esc_url( admin_url('admin-post.php') ).'" method="post" class="saswp-review-submission-form">';
 
 
 
 
192
 
193
  $rating_html = ''
194
  . '<input type="hidden" name="saswp_review_rating" [value]="saswp_review_rating">'
153
  }
154
 
155
  public function saswp_reviews_form_render($attr){
156
+
157
+ $on_button = false;
158
+
159
+ if(isset($attr['onbutton'])){
160
+ $on_button = true;
161
+ }
162
+
163
  $is_amp = false;
164
 
165
  if(!saswp_non_amp()){
187
 
188
  if(!$is_amp){
189
 
190
+ if($on_button){
191
+ $form .= '<div class="saswp-rv-form-btn"><a href="#" class="button button-default">Review Form</a></div>';
192
+ }
193
+
194
  $rating_html = '<div class="saswp-rating-front-div"></div><input type="hidden" name="saswp_review_rating" value="5">';
195
+ $form .= '<form action="'.esc_url( admin_url('admin-post.php') ).'" method="post" class="saswp-review-submission-form '.($on_button ? "saswp_hide" : "").'">';
196
 
197
  }else{
198
 
199
  add_action( 'amp_post_template_data', array($this, 'saswp_reviews_form_amp_script'));
200
 
201
+ if($on_button){
202
+ $form .= '<div class="saswp-rv-form-btn"><span href="#" class="button button-default" on="tap:AMP.setState({ saswp_review_form_toggle: !saswp_review_form_toggle })" role="button" tabindex="1">Review Form</span></div>';
203
+ }
204
+
205
+ $form .= '<form action-xhr="'.esc_url( admin_url('admin-post.php') ).'" method="post" class="saswp-review-submission-form '.($on_button ? "saswp_hide" : "").'" [class]="saswp_review_form_toggle ? \'saswp-review-submission-form\' : \'saswp_hide saswp-review-submission-form\' ">';
206
 
207
  $rating_html = ''
208
  . '<input type="hidden" name="saswp_review_rating" [value]="saswp_review_rating">'
modules/reviews/reviews_service.php CHANGED
@@ -19,9 +19,93 @@ class saswp_reviews_service {
19
  public function saswp_service_hooks(){
20
 
21
  add_action('wp_ajax_saswp_fetch_google_reviews', array($this,'saswp_fetch_google_reviews'));
22
- add_shortcode('saswp-reviews', array($this, 'saswp_reviews_shortcode' ),10);
23
- add_action ('wp_footer', array($this, 'saswp_fetched_reviews_schema_markup'),99);
24
- add_action ('amp_post_template_footer', array($this, 'saswp_fetched_reviews_schema_markup'),99);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
27
  public function saswp_review_form_process_data($form_data){
@@ -97,96 +181,7 @@ class saswp_reviews_service {
97
 
98
  return $post_id;
99
 
100
- }
101
-
102
- public function saswp_fetched_reviews_schema_markup(){
103
-
104
- global $sd_data, $saswp_post_reviews;
105
-
106
- $html = '';
107
-
108
- if($saswp_post_reviews){
109
-
110
- $rv_markup = $this->saswp_get_reviews_schema_markup(array_unique($saswp_post_reviews, SORT_REGULAR));
111
-
112
- $input1['@context'] = saswp_context_url();
113
- $input1['@type'] = (isset($sd_data['saswp_organization_type']) && $sd_data['saswp_organization_type'] !='' )? $sd_data['saswp_organization_type'] : 'Organization';
114
- $input1['name'] = (isset($sd_data['sd_name']) && $sd_data['sd_name'] !='' )? $sd_data['sd_name'] : get_bloginfo();
115
-
116
- $input1 = $input1 + $rv_markup;
117
-
118
- $html .= "\n";
119
- $html .= '<!-- Schema & Structured Data For Reviews v'.esc_attr(SASWP_VERSION).' - -->';
120
- $html .= "\n";
121
- $html .= '<script type="application/ld+json" class="saswp-reviews-markup">';
122
- $html .= "\n";
123
- $html .= saswp_json_print_format($input1);
124
- $html .= "\n";
125
- $html .= '</script>';
126
- $html .= "\n\n";
127
-
128
- }
129
-
130
- echo $html;
131
- }
132
- /**
133
- * Function to get reviews schema markup
134
- * @global type $sd_data
135
- * @return string
136
- */
137
- public function saswp_get_reviews_schema_markup($reviews){
138
-
139
- $sumofrating = 0;
140
- $avg_rating = 1;
141
- $reviews_arr = array();
142
- $input1 = array();
143
-
144
- if($reviews){
145
-
146
- foreach($reviews as $rv){
147
-
148
- $sumofrating += $rv['saswp_review_rating'];
149
-
150
- if($rv['saswp_review_rating'] && $rv['saswp_reviewer_name']){
151
-
152
- $reviews_arr[] = array(
153
- '@type' => 'Review',
154
- 'author' => $rv['saswp_reviewer_name'],
155
- 'datePublished' => $rv['saswp_review_date'],
156
- 'description' => $rv['saswp_review_text'],
157
- 'reviewRating' => array(
158
- '@type' => 'Rating',
159
- 'bestRating' => 5,
160
- 'ratingValue' => $rv['saswp_review_rating'],
161
- 'worstRating' => 1
162
- ),
163
- );
164
-
165
- }
166
-
167
- }
168
-
169
- if($sumofrating> 0){
170
- $avg_rating = $sumofrating / count($reviews);
171
- }
172
-
173
- if(!empty($reviews_arr)){
174
-
175
- $input1['review'] = $reviews_arr;
176
-
177
- }
178
-
179
- $input1['aggregateRating'] = array(
180
- '@type' => 'AggregateRating',
181
- 'reviewCount' => count($reviews),
182
- 'ratingValue' => esc_attr($avg_rating),
183
- );
184
-
185
- }
186
- return $input1;
187
-
188
- }
189
-
190
  /**
191
  * Function to generate reviews html
192
  * @param type $reviews
@@ -557,7 +552,10 @@ class saswp_reviews_service {
557
  $arg['post_status'] = 'publish';
558
 
559
  if($attr){
560
-
 
 
 
561
  if(isset($attr['id'])){
562
  $arg['attachment_id'] = $attr['id'];
563
  }
@@ -762,15 +760,14 @@ class saswp_reviews_service {
762
 
763
  }
764
 
765
- public function saswp_create_collection_grid($cols, $collection){
766
 
767
  $html = '';
768
  $grid_cols = '';
769
 
770
  if($collection){
771
 
772
- if(saswp_non_amp()){
773
-
774
  $html .= '<div class="saswp-r1">';
775
 
776
  for($i=1; $i <= $cols; $i++ ){
@@ -779,11 +776,10 @@ class saswp_reviews_service {
779
 
780
  if($cols > 5){
781
 
782
- $html .= '<ul style="grid-template-columns:'.esc_attr($grid_cols).';overflow-x: scroll;">';
783
- }else{
784
- $html .= '<ul style="grid-template-columns:'.esc_attr($grid_cols).';overflow-x:hidden;">';
785
- }
786
-
787
 
788
  foreach ($collection as $value){
789
 
@@ -815,56 +811,34 @@ class saswp_reviews_service {
815
  }
816
 
817
  $html .= '</ul>';
818
- $html .= '</div>';
819
-
820
- }else{
821
-
822
- $html .= '<div class="saswp-r1">';
823
-
824
- for($i=1; $i <= $cols; $i++ ){
825
- $grid_cols .=' 1fr';
826
- }
827
- if($cols > 4){
828
-
829
- $html .= '<ul class="saswp-grid-scroll" style="grid-template-columns:'.esc_attr($grid_cols).';">';
830
- }else{
831
- $html .= '<ul class="saswp-grid-scroll-hidden" style="grid-template-columns:'.esc_attr($grid_cols).';">';
832
- }
833
 
834
- foreach ($collection as $value){
835
-
836
- $date_str = $this->saswp_convert_datetostring($value['saswp_review_date']);
837
-
838
- $html .= '<li>';
839
- $html .= '<div class="saswp-rc">';
840
- $html .= '<div class="saswp-rc-a">';
841
- $html .= '<div class="saswp-r1-aimg">';
842
- $html .= '<amp-img src="'.esc_url($value['saswp_reviewer_image']).'" width="70" height="56"></amp-img>';
843
- $html .= '</div>';
844
- $html .= '<div class="saswp-rc-nm">';
845
- $html .= '<a target="_blank" href="'.esc_url($value['saswp_review_link']).'">'.esc_attr($value['saswp_reviewer_name']).'</a>';
846
- $html .= saswp_get_rating_html_by_value($value['saswp_review_rating']);
847
- $html .= '<span class="saswp-rc-dt">'.esc_attr($date_str['date']).'</span>';
848
- $html .= '</div>';
849
- $html .= '</div>';
850
-
851
- $html .= '<div class="saswp-rc-lg">';
852
- $html .= '<img src="'.esc_url($value['saswp_review_platform_icon']).'"/>';
853
- $html .= '</div>';
854
-
855
- $html .= '</div>';
856
- $html .='<div class="saswp-rc-cnt">';
857
- $html .= '<p>'. esc_attr($value['saswp_review_text']).'</p>';
858
- $html .= '</div>';
859
- $html .= '</li>';
860
-
861
- }
862
-
863
- $html .= '</ul>';
864
- $html .= '</div>';
865
-
866
 
867
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
868
 
869
  }
870
  return $html;
19
  public function saswp_service_hooks(){
20
 
21
  add_action('wp_ajax_saswp_fetch_google_reviews', array($this,'saswp_fetch_google_reviews'));
22
+ add_shortcode('saswp-reviews', array($this, 'saswp_reviews_shortcode' ),10);
23
+
24
+ }
25
+
26
+ public function saswp_get_reviews_list_by_design($design, $platform_id, $total_reviews, $sorting){
27
+
28
+ $badge_collection = array();
29
+ $collection = array();
30
+ $attr = array();
31
+
32
+ switch ($design) {
33
+
34
+ case 'grid':
35
+ $attr['in'] = $total_reviews;
36
+ $collection = $this->saswp_get_reviews_list_by_parameters($attr);
37
+ break;
38
+ case 'gallery':
39
+ case 'badge':
40
+ case 'popup':
41
+ case 'fomo':
42
+
43
+ if($platform_id){
44
+
45
+ foreach ($platform_id as $key => $val){
46
+
47
+ $reviews_list = $this->saswp_get_reviews_list_by_parameters(null, $key, $val);
48
+ $badge_collection[] = $reviews_list;
49
+
50
+ if($reviews_list){
51
+
52
+ $collection = array_merge($collection, $reviews_list);
53
+ }
54
+
55
+ }
56
+
57
+ }
58
+
59
+ if($design == 'badge'){
60
+ $collection = $badge_collection;
61
+ }
62
+ $collection = $this->saswp_sort_collection($collection, $sorting);
63
+ break;
64
+
65
+ default:
66
+ break;
67
+ }
68
+
69
+ return $collection;
70
+ }
71
+
72
+ public function saswp_get_collection_list($colcount = null, $paged = null, $offset = null){
73
+
74
+ $response = array();
75
+
76
+ $arg['post_type'] = 'saswp-collections';
77
+ $arg['numberposts'] = -1;
78
+ $arg['post_status'] = 'publish';
79
+
80
+ if($colcount){
81
+ $arg['numberposts'] = $colcount;
82
+ }
83
+ if($paged){
84
+ $arg['paged'] = $paged;
85
+ }
86
+ if($offset){
87
+ $arg['offset'] = $offset;
88
+ }
89
+
90
+ $collection = get_posts( $arg );
91
+
92
+ if($collection){
93
+
94
+ $col_opt = array();
95
+
96
+ foreach($collection as $col){
97
+
98
+ $col_opt[] = array(
99
+ 'value' => $col->ID,
100
+ 'label' => $col->post_title
101
+ );
102
+
103
+ }
104
+
105
+ $response = $col_opt;
106
+
107
+ }
108
+ return $response;
109
  }
110
 
111
  public function saswp_review_form_process_data($form_data){
181
 
182
  return $post_id;
183
 
184
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  /**
186
  * Function to generate reviews html
187
  * @param type $reviews
552
  $arg['post_status'] = 'publish';
553
 
554
  if($attr){
555
+
556
+ if(isset($attr['in'])){
557
+ $arg['post__in'] = $attr['in'];
558
+ }
559
  if(isset($attr['id'])){
560
  $arg['attachment_id'] = $attr['id'];
561
  }
760
 
761
  }
762
 
763
+ public function saswp_create_collection_grid($cols, $collection, $total_reviews, $pagination, $perpage, $offset, $nextpage, $data_id, $total_reviews_count){
764
 
765
  $html = '';
766
  $grid_cols = '';
767
 
768
  if($collection){
769
 
770
+ $page_count = ceil($total_reviews_count / $perpage);
 
771
  $html .= '<div class="saswp-r1">';
772
 
773
  for($i=1; $i <= $cols; $i++ ){
776
 
777
  if($cols > 5){
778
 
779
+ $html .= '<ul style="grid-template-columns:'.esc_attr($grid_cols).';overflow-x: scroll;">';
780
+ }else{
781
+ $html .= '<ul style="grid-template-columns:'.esc_attr($grid_cols).';overflow-x:hidden;">';
782
+ }
 
783
 
784
  foreach ($collection as $value){
785
 
811
  }
812
 
813
  $html .= '</ul>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
814
 
815
+ if($page_count > 0 && $pagination){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
816
 
817
+ $current_url = saswp_get_current_url();
818
+
819
+ if(strpos($current_url, "?rv_page") !== false){
820
+ $current_url = substr($current_url, 0, strpos($current_url, "?rv_page"));
821
+ }
822
+ $html .= '<div class="saswp-grid-pagination">';
823
+ $html .= '<a class="saswp-grid-page" data-id="1" href="'.esc_url($current_url).'">&laquo;</a>';
824
+
825
+ for($i=1; $i <= $page_count; $i++){
826
+
827
+ if($i == $data_id){
828
+ $html .= '<a class="active saswp-grid-page" href="'.esc_url($current_url.'?rv_page='.$i).'">'.$i.'</a>';
829
+ }else{
830
+ $html .= '<a class="saswp-grid-page" href="'.esc_url($current_url.'?rv_page='.$i).'">'.$i.'</a>';
831
+ }
832
+
833
+ }
834
+
835
+ $html .= '<a class="saswp-grid-page" href="'.esc_url($current_url.'?rv_page='.$page_count).'">&raquo;</a>';
836
+
837
+ $html .= '</div>';
838
+
839
+ }
840
+
841
+ $html .= '</div>';
842
 
843
  }
844
  return $html;
output/compatibility.php CHANGED
@@ -157,6 +157,10 @@ class saswp_output_compatibility{
157
 
158
  add_filter('easy_testimonials_json_ld', '__return_false');
159
 
 
 
 
 
160
  }
161
  public function saswp_testimonial_pro_override(){
162
 
@@ -422,6 +426,9 @@ class saswp_output_compatibility{
422
  public function easy_recipe_on_activation(){
423
  $this->saswp_update_option_on_compatibility_activation('saswp-easy-recipe');
424
  }
 
 
 
425
  public function saswp_update_option_on_compatibility_activation($opt_name){
426
  $defaults = get_option('sd_data');
427
  $defaults[$opt_name] = 1;
157
 
158
  add_filter('easy_testimonials_json_ld', '__return_false');
159
 
160
+ }
161
+ public function saswp_wordpress_news_override(){
162
+
163
+
164
  }
165
  public function saswp_testimonial_pro_override(){
166
 
426
  public function easy_recipe_on_activation(){
427
  $this->saswp_update_option_on_compatibility_activation('saswp-easy-recipe');
428
  }
429
+ public function wordpress_news_on_activation(){
430
+ $this->saswp_update_option_on_compatibility_activation('saswp-wordpress-news');
431
+ }
432
  public function saswp_update_option_on_compatibility_activation($opt_name){
433
  $defaults = get_option('sd_data');
434
  $defaults[$opt_name] = 1;
output/function.php CHANGED
@@ -11,8 +11,9 @@
11
  // Exit if accessed directly.
12
  if ( ! defined( 'ABSPATH' ) ) exit;
13
 
14
- add_filter( 'amp_init', 'saswp_schema_markup_hook_on_init' );
15
  add_action( 'init', 'saswp_schema_markup_hook_on_init');
 
16
 
17
  function saswp_schema_markup_hook_on_init() {
18
 
@@ -66,15 +67,70 @@ function saswp_schema_markup_hook_on_init() {
66
  }
67
  }
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  /**
70
  * This function collects all the schema markups and show them at one place either header or footer
71
  * @global type $sd_data
72
  * @global type json array
73
  */
74
- function saswp_schema_markup_output() {
75
 
76
  global $sd_data;
77
  global $post;
 
 
 
78
 
79
  $custom_markup = '';
80
  $output = '';
@@ -96,7 +152,8 @@ function saswp_schema_markup_output() {
96
  $contact_page_output = saswp_contact_page_output();
97
  $about_page_output = saswp_about_page_output();
98
  $author_output = saswp_author_output();
99
- $archive_output = saswp_archive_output();
 
100
 
101
  if($archive_output){
102
 
@@ -115,22 +172,12 @@ function saswp_schema_markup_output() {
115
  $kb_schema_output = saswp_kb_schema_output();
116
  }
117
 
118
- if(is_singular()){
119
-
120
- $post_specific_enable = get_option('modify_schema_post_enable_'.esc_attr($post->ID));
121
  $custom_markup = get_post_meta($post->ID, 'saswp_custom_schema_field', true);
122
-
123
  }
124
 
125
- if($post_specific_enable =='enable'){
126
-
127
- $schema_output = saswp_post_specific_schema_output();
128
-
129
- }else{
130
-
131
- $schema_output = saswp_schema_output();
132
-
133
- }
134
  if(saswp_global_option()) {
135
 
136
  if(!empty($contact_page_output)){
@@ -174,7 +221,7 @@ function saswp_schema_markup_output() {
174
  $output .= saswp_json_print_format($item_list);
175
  $output .= ",";
176
  $output .= "\n\n";
177
- }
178
  if(!empty($woo_cat_schema)){
179
 
180
  $output .= saswp_json_print_format($woo_cat_schema);
@@ -211,6 +258,12 @@ function saswp_schema_markup_output() {
211
  $output .= ",";
212
  $output .= "\n\n";
213
  }
 
 
 
 
 
 
214
  if(!empty($blog_page)){
215
 
216
  $output .= saswp_json_print_format($blog_page);
@@ -246,7 +299,7 @@ function saswp_schema_markup_output() {
246
  $kb_schema_output['@type'] = $sd_data['saswp_kb_type'];
247
 
248
  if($sd_data['saswp_kb_type'] == 'Organization'){
249
- $kb_schema_output['@type'] = isset($sd_data['saswp_organization_type']) ? $sd_data['saswp_organization_type'] : 'Organization';
250
  }
251
 
252
  }else{
@@ -397,29 +450,22 @@ function saswp_schema_markup_output() {
397
 
398
  if($custom_markup){
399
 
400
- $custom_output = '';
401
-
402
  $cus_regex = '/\<script type\=\"application\/ld\+json\"\>/';
403
  preg_match( $cus_regex, $custom_markup, $match );
404
 
405
  if(empty($match)){
406
 
407
- $custom_output .= '<script type="application/ld+json" class="saswp-schema-markup-output">';
408
  $custom_output .= $custom_markup;
409
  $custom_output .= '</script>';
410
 
411
  }else{
412
 
413
  $custom_output = $custom_markup;
414
- $custom_output = preg_replace($cus_regex, '<script type="application/ld+json" class="saswp-schema-markup-output">', $custom_output);
415
 
416
  }
417
-
418
- echo "\n";
419
- echo '<!-- Schema & Structured Data For WP Custom Markup v'.esc_attr(SASWP_VERSION).' - -->';
420
- echo "\n";
421
- echo $custom_output;
422
- echo "\n\n";
423
 
424
  }
425
 
@@ -428,17 +474,15 @@ function saswp_schema_markup_output() {
428
  if($output){
429
 
430
  $stroutput = '['. trim($output). ']';
431
- $filter_string = str_replace(',]', ']',$stroutput);
432
- echo "\n";
433
- echo '<!-- Schema & Structured Data For WP v'.esc_attr(SASWP_VERSION).' - -->';
434
- echo "\n";
435
- echo '<script type="application/ld+json" class="saswp-schema-markup-output">';
436
- echo "\n";
437
- echo $filter_string;
438
- echo "\n";
439
- echo '</script>';
440
- echo "\n\n";
441
  }
 
 
442
 
443
  }
444
 
@@ -658,9 +702,15 @@ function saswp_get_comments($post_id){
658
  global $sd_data;
659
 
660
  $comments = array();
661
- $post_comments = array();
 
 
 
 
 
 
662
 
663
- if(isset($sd_data['saswp-bbpress']) && $sd_data['saswp-bbpress'] == 1 && get_post_type($post_id) == 'topic'){
664
 
665
  $replies_query = array(
666
  'post_type' => 'reply',
@@ -671,7 +721,7 @@ function saswp_get_comments($post_id){
671
  while ( bbp_replies() ) : bbp_the_reply();
672
 
673
  $post_comments[] = (object) array(
674
- 'comment_date' => bbp_get_reply_post_date(bbp_get_reply_id(),'c'),
675
  'comment_content' => bbp_get_reply_content(),
676
  'comment_author' => bbp_get_reply_author(),
677
  'comment_author_url' => bbp_get_reply_author_url(),
@@ -697,7 +747,7 @@ function saswp_get_comments($post_id){
697
 
698
  $comments[] = array (
699
  '@type' => 'Comment',
700
- 'dateCreated' => saswp_format_date_time($comment->comment_date),
701
  'description' => strip_tags($comment->comment_content),
702
  'author' => array (
703
  '@type' => 'Person',
@@ -881,6 +931,11 @@ function saswp_remove_microdata($content){
881
  $content = preg_replace('/<script type=\"application\/ld\+json" class=\"aioseop-schema"\>(.*?)<\/script>/', "", $content);
882
  }
883
 
 
 
 
 
 
884
  if(isset($sd_data['saswp-wp-ultimate-recipe']) && $sd_data['saswp-wp-ultimate-recipe'] == 1 ){
885
 
886
  $regex = '/<script type=\"application\/ld\+json\">(.*?)<\/script>[\s\n]*<div id=\"wpurp\-container\-recipe\-([0-9]+)\"/';
@@ -1016,7 +1071,6 @@ function saswp_get_ids_from_content_by_type($type){
1016
 
1017
  return $gutenberg_matches + $classic_matches;
1018
 
1019
-
1020
  default:
1021
  break;
1022
  }
@@ -1633,68 +1687,25 @@ function saswp_get_bne_testomonials(){
1633
 
1634
  function saswp_append_fetched_reviews($input1, $schema_post_id = null){
1635
 
1636
- global $post;
1637
-
1638
- $content = '';
1639
-
1640
- if(is_object($post)){
1641
- $content = $post->post_content;
1642
- }
1643
-
1644
- if((function_exists('is_product_category') && is_product_category()) || is_category() ){
1645
 
1646
- $content = category_description();
1647
 
1648
- }
1649
-
1650
- if($content){
1651
-
1652
- $service = new saswp_reviews_service();
1653
-
1654
- $pattern = get_shortcode_regex();
1655
-
1656
- if ( preg_match_all( '/'. $pattern .'/s', $content, $matches )
1657
- && array_key_exists( 2, $matches )
1658
- && in_array( 'saswp-reviews', $matches[2] ) )
1659
- {
1660
-
1661
- foreach ($matches[0] as $matche){
1662
-
1663
- $mached = rtrim($matche, ']');
1664
- $mached = ltrim($mached, '[');
1665
- $mached = trim($mached);
1666
- $attr = shortcode_parse_atts('['.$mached.' ]');
1667
-
1668
- $reviews = $service->saswp_get_reviews_list_by_parameters($attr);
1669
-
1670
- if($reviews){
1671
-
1672
- $rv_markup = $service->saswp_get_reviews_schema_markup($reviews);
1673
-
1674
- if($rv_markup){
1675
-
1676
- if(isset($input1['review'])){
1677
-
1678
- $input1['review'] = array_merge($input1['review'], $rv_markup['review']);
1679
-
1680
- }else{
1681
- $input1 = array_merge($input1, $rv_markup);
1682
- }
1683
-
1684
- }
1685
-
1686
- }
1687
-
1688
- }
1689
 
1690
  }else{
1691
 
1692
  if($schema_post_id){
1693
-
1694
- $attached_rv = get_post_meta($schema_post_id, 'saswp_attahced_reviews', true);
1695
- $append_reviews = get_post_meta($schema_post_id, 'saswp_enable_append_reviews', true);
 
1696
 
1697
- if($append_reviews == 1 && $attached_rv){
1698
 
1699
  $total_rv = array();
1700
 
@@ -1706,9 +1717,34 @@ function saswp_append_fetched_reviews($input1, $schema_post_id = null){
1706
 
1707
  }
1708
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1709
  if($total_rv){
1710
 
1711
- $rv_markup = $service->saswp_get_reviews_schema_markup($total_rv);
1712
 
1713
  if($rv_markup){
1714
 
@@ -1729,8 +1765,7 @@ function saswp_append_fetched_reviews($input1, $schema_post_id = null){
1729
  }
1730
 
1731
  }
1732
-
1733
- }
1734
  return $input1;
1735
  }
1736
 
11
  // Exit if accessed directly.
12
  if ( ! defined( 'ABSPATH' ) ) exit;
13
 
14
+ add_action( 'amp_init', 'saswp_schema_markup_hook_on_init' );
15
  add_action( 'init', 'saswp_schema_markup_hook_on_init');
16
+ add_action( 'wp', 'saswp_wp_hook_operation',999 );
17
 
18
  function saswp_schema_markup_hook_on_init() {
19
 
67
  }
68
  }
69
 
70
+ function saswp_wp_hook_operation(){
71
+
72
+ ob_start('saswp_schema_markup_output_in_buffer');
73
+
74
+ }
75
+
76
+ function saswp_schema_markup_output_in_buffer($content){
77
+
78
+ global $saswp_post_reviews;
79
+
80
+ if($saswp_post_reviews){
81
+
82
+ $saswp_json_ld = saswp_get_all_schema_markup_output();
83
+
84
+ if(!empty($saswp_json_ld['saswp_json_ld'])){
85
+
86
+ $regex = '/<script type\=\"application\/ld\+json\" class\=\"saswp\-schema\-markup\-output\"\>(.*?)<\/script>/s';
87
+
88
+ $content = preg_replace($regex, $saswp_json_ld['saswp_json_ld'], $content);
89
+
90
+ }
91
+
92
+ }
93
+
94
+ return $content;
95
+ }
96
+
97
+ function saswp_schema_markup_output(){
98
+
99
+ $saswp_json_ld = saswp_get_all_schema_markup_output();
100
+
101
+ if(!empty($saswp_json_ld['saswp_json_ld'])){
102
+
103
+ echo "\n";
104
+ echo "<!-- Schema & Structured Data For WP v".esc_attr(SASWP_VERSION)." - -->";
105
+ echo "\n";
106
+ echo $saswp_json_ld['saswp_json_ld'];
107
+ echo "\n\n";
108
+
109
+ }
110
+
111
+ if(!empty($saswp_json_ld['saswp_custom_json_ld'])){
112
+
113
+ echo "\n";
114
+ echo '<!-- Schema & Structured Data For WP Custom Markup v'.esc_attr(SASWP_VERSION).' - -->';
115
+ echo "\n";
116
+ echo $saswp_json_ld['saswp_custom_json_ld'];
117
+ echo "\n\n";
118
+
119
+ }
120
+
121
+ }
122
  /**
123
  * This function collects all the schema markups and show them at one place either header or footer
124
  * @global type $sd_data
125
  * @global type json array
126
  */
127
+ function saswp_get_all_schema_markup_output() {
128
 
129
  global $sd_data;
130
  global $post;
131
+
132
+ $response_html = '';
133
+ $custom_output = '';
134
 
135
  $custom_markup = '';
136
  $output = '';
152
  $contact_page_output = saswp_contact_page_output();
153
  $about_page_output = saswp_about_page_output();
154
  $author_output = saswp_author_output();
155
+ $archive_output = saswp_archive_output();
156
+ $collection_output = saswp_fetched_reviews_json_ld();
157
 
158
  if($archive_output){
159
 
172
  $kb_schema_output = saswp_kb_schema_output();
173
  }
174
 
175
+ if(is_singular()){
 
 
176
  $custom_markup = get_post_meta($post->ID, 'saswp_custom_schema_field', true);
 
177
  }
178
 
179
+ $schema_output = saswp_schema_output();
180
+
 
 
 
 
 
 
 
181
  if(saswp_global_option()) {
182
 
183
  if(!empty($contact_page_output)){
221
  $output .= saswp_json_print_format($item_list);
222
  $output .= ",";
223
  $output .= "\n\n";
224
+ }
225
  if(!empty($woo_cat_schema)){
226
 
227
  $output .= saswp_json_print_format($woo_cat_schema);
258
  $output .= ",";
259
  $output .= "\n\n";
260
  }
261
+ if(!empty($collection_output)){
262
+
263
+ $output .= saswp_json_print_format($collection_output);
264
+ $output .= ",";
265
+ $output .= "\n\n";
266
+ }
267
  if(!empty($blog_page)){
268
 
269
  $output .= saswp_json_print_format($blog_page);
299
  $kb_schema_output['@type'] = $sd_data['saswp_kb_type'];
300
 
301
  if($sd_data['saswp_kb_type'] == 'Organization'){
302
+ $kb_schema_output['@type'] = (isset($sd_data['saswp_organization_type']) && !empty($sd_data['saswp_organization_type'])) ? $sd_data['saswp_organization_type'] : 'Organization';
303
  }
304
 
305
  }else{
450
 
451
  if($custom_markup){
452
 
 
 
453
  $cus_regex = '/\<script type\=\"application\/ld\+json\"\>/';
454
  preg_match( $cus_regex, $custom_markup, $match );
455
 
456
  if(empty($match)){
457
 
458
+ $custom_output .= '<script type="application/ld+json" class="saswp-custom-schema-markup-output">';
459
  $custom_output .= $custom_markup;
460
  $custom_output .= '</script>';
461
 
462
  }else{
463
 
464
  $custom_output = $custom_markup;
465
+ $custom_output = preg_replace($cus_regex, '<script type="application/ld+json" class="saswp-custom-schema-markup-output">', $custom_output);
466
 
467
  }
468
+
 
 
 
 
 
469
 
470
  }
471
 
474
  if($output){
475
 
476
  $stroutput = '['. trim($output). ']';
477
+ $filter_string = str_replace(',]', ']',$stroutput);
478
+ $response_html.= '<script type="application/ld+json" class="saswp-schema-markup-output">';
479
+ $response_html.= "\n";
480
+ $response_html.= $filter_string;
481
+ $response_html.= "\n";
482
+ $response_html.= '</script>';
 
 
 
 
483
  }
484
+
485
+ return array('saswp_json_ld' => $response_html, 'saswp_custom_json_ld' => $custom_output);
486
 
487
  }
488
 
702
  global $sd_data;
703
 
704
  $comments = array();
705
+ $post_comments = array();
706
+
707
+ $is_bbpress = false;
708
+
709
+ if(isset($sd_data['saswp-bbpress']) && $sd_data['saswp-bbpress'] == 1 && get_post_type($post_id) == 'topic'){
710
+ $is_bbpress = true;
711
+ }
712
 
713
+ if($is_bbpress){
714
 
715
  $replies_query = array(
716
  'post_type' => 'reply',
721
  while ( bbp_replies() ) : bbp_the_reply();
722
 
723
  $post_comments[] = (object) array(
724
+ 'comment_date' => get_post_time( DATE_ATOM, false, bbp_get_reply_id(), true ),
725
  'comment_content' => bbp_get_reply_content(),
726
  'comment_author' => bbp_get_reply_author(),
727
  'comment_author_url' => bbp_get_reply_author_url(),
747
 
748
  $comments[] = array (
749
  '@type' => 'Comment',
750
+ 'dateCreated' => $is_bbpress ? $comment->comment_date : saswp_format_date_time($comment->comment_date),
751
  'description' => strip_tags($comment->comment_content),
752
  'author' => array (
753
  '@type' => 'Person',
931
  $content = preg_replace('/<script type=\"application\/ld\+json" class=\"aioseop-schema"\>(.*?)<\/script>/', "", $content);
932
  }
933
 
934
+ //Clean json markup
935
+ if(isset($sd_data['saswp-wordpress-news']) && $sd_data['saswp-wordpress-news'] == 1 ){
936
+ $content = preg_replace("/<script type\=\'application\/ld\+json\' class\=\'wpnews-schema-graph(.*?)'\>(.*?)<\/script>/s", "", $content);
937
+ }
938
+
939
  if(isset($sd_data['saswp-wp-ultimate-recipe']) && $sd_data['saswp-wp-ultimate-recipe'] == 1 ){
940
 
941
  $regex = '/<script type=\"application\/ld\+json\">(.*?)<\/script>[\s\n]*<div id=\"wpurp\-container\-recipe\-([0-9]+)\"/';
1071
 
1072
  return $gutenberg_matches + $classic_matches;
1073
 
 
1074
  default:
1075
  break;
1076
  }
1687
 
1688
  function saswp_append_fetched_reviews($input1, $schema_post_id = null){
1689
 
1690
+ global $saswp_post_reviews;
 
 
 
 
 
 
 
 
1691
 
1692
+ $service = new saswp_reviews_service();
1693
 
1694
+ if ( $saswp_post_reviews ){
1695
+
1696
+ $rv_markup = saswp_get_reviews_schema_markup(array_unique($saswp_post_reviews, SORT_REGULAR));
1697
+
1698
+ $input1 = array_merge($input1, $rv_markup);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1699
 
1700
  }else{
1701
 
1702
  if($schema_post_id){
1703
+
1704
+ $attached_col = get_post_meta($schema_post_id, 'saswp_attached_collection', true);
1705
+ $attached_rv = get_post_meta($schema_post_id, 'saswp_attahced_reviews', true);
1706
+ $append_reviews = get_post_meta($schema_post_id, 'saswp_enable_append_reviews', true);
1707
 
1708
+ if($append_reviews == 1 && ($attached_rv || $attached_col)){
1709
 
1710
  $total_rv = array();
1711
 
1717
 
1718
  }
1719
 
1720
+ if($attached_col){
1721
+
1722
+ $total_col_rv = array();
1723
+
1724
+ foreach($attached_col as $col_id){
1725
+
1726
+ $collection_data = get_post_meta($col_id, $key='', true);
1727
+
1728
+ if(isset($collection_data['saswp_platform_ids'][0])){
1729
+ $platform_ids = unserialize($collection_data['saswp_platform_ids'][0]);
1730
+
1731
+ foreach($platform_ids as $key => $val){
1732
+
1733
+ $reviews_list = $service->saswp_get_reviews_list_by_parameters(null, $key, $val);
1734
+ $total_col_rv = array_merge($total_col_rv, $reviews_list);
1735
+
1736
+ }
1737
+
1738
+ }
1739
+
1740
+ }
1741
+
1742
+ $total_rv = array_merge($total_rv ,$total_col_rv);
1743
+ }
1744
+
1745
  if($total_rv){
1746
 
1747
+ $rv_markup = saswp_get_reviews_schema_markup(array_unique($total_rv, SORT_REGULAR));
1748
 
1749
  if($rv_markup){
1750
 
1765
  }
1766
 
1767
  }
1768
+
 
1769
  return $input1;
1770
  }
1771
 
output/markup.php CHANGED
@@ -11,6 +11,64 @@
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();
@@ -553,7 +611,7 @@ function saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta)
553
 
554
  function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta){
555
 
556
- $input1 = array();
557
 
558
  $product_image = get_post_meta( get_the_ID(), 'saswp_product_schema_image_'.$schema_id.'_detail',true);
559
  $input1 = array(
@@ -563,31 +621,37 @@ function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta
563
  'url' => trailingslashit(get_permalink()),
564
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_name_'.$schema_id, 'saswp_array'),
565
  'sku' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_sku_'.$schema_id, 'saswp_array'),
566
- 'description' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_description_'.$schema_id, 'saswp_array'),
567
- 'image' =>array(
568
- '@type' => 'ImageObject',
569
- 'url' => saswp_remove_warnings($product_image, 'thumbnail', 'saswp_string'),
570
- 'width' => saswp_remove_warnings($product_image, 'width', 'saswp_string'),
571
- 'height' => saswp_remove_warnings($product_image, 'height', 'saswp_string'),
572
- ),
573
- 'offers' => array(
574
- '@type' => 'Offer',
575
- 'availability' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_availability_'.$schema_id, 'saswp_array'),
576
- 'itemCondition' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_condition_'.$schema_id, 'saswp_array'),
577
- 'price' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_price_'.$schema_id, 'saswp_array'),
578
- 'priceCurrency' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_currency_'.$schema_id, 'saswp_array'),
579
- 'url' => trailingslashit(get_permalink()),
580
- '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])):'',
581
- ),
582
  'brand' => array('@type' => 'Thing',
583
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_brand_name_'.$schema_id, 'saswp_array'),
584
  )
585
  );
586
-
587
- if(isset($all_post_meta['saswp_product_schema_seller_'.$schema_id])){
588
- $input1['offers']['seller']['@type'] = 'Organization';
589
- $input1['offers']['seller']['name'] = esc_attr($all_post_meta['saswp_product_schema_seller_'.$schema_id][0]);
590
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
591
  if(isset($all_post_meta['saswp_product_schema_gtin8_'.$schema_id])){
592
  $input1['gtin8'] = esc_attr($all_post_meta['saswp_product_schema_gtin8_'.$schema_id][0]);
593
  }
@@ -1083,6 +1147,79 @@ function saswp_trip_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1083
  return $input1;
1084
  }
1085
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1086
  function saswp_faq_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1087
 
1088
  $input1 = array();
@@ -2046,6 +2183,7 @@ function saswp_article_schema_markup($schema_id, $schema_post_id, $all_post_meta
2046
  '@context' => saswp_context_url(),
2047
  '@type' => 'Article',
2048
  '@id' => trailingslashit(get_permalink()).'#article',
 
2049
  'inLanguage' => get_bloginfo('language'),
2050
  'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_article_main_entity_of_page_'.$schema_id, 'saswp_array'),
2051
  'image' => saswp_remove_warnings($all_post_meta, 'saswp_article_image_'.$schema_id, 'saswp_array'),
@@ -2059,20 +2197,21 @@ function saswp_article_schema_markup($schema_id, $schema_post_id, $all_post_meta
2059
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_article_author_name_'.$schema_id, 'saswp_array'),
2060
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_article_author_description_'.$schema_id, 'saswp_array'),
2061
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_article_author_url_'.$schema_id, 'saswp_array')
2062
- ),
2063
- 'publisher' => array(
2064
- '@type' => 'Organization',
2065
- 'logo' => array(
2066
- '@type' => 'ImageObject',
2067
- 'url' => saswp_remove_warnings($all_post_meta, 'saswp_article_organization_logo_'.$schema_id, 'saswp_array'),
2068
- 'width' => saswp_remove_warnings($slogo, 'width', 'saswp_string'),
2069
- 'height' => saswp_remove_warnings($slogo, 'height', 'saswp_string'),
2070
- ),
2071
- 'name' => saswp_remove_warnings($all_post_meta, 'saswp_article_organization_name_'.$schema_id, 'saswp_array'),
2072
- ),
2073
 
2074
  );
2075
 
 
 
 
 
 
 
 
 
 
 
 
2076
  $itemlist = get_post_meta($schema_post_id, 'article_items_'.$schema_id, true);
2077
 
2078
  if($itemlist){
11
  // Exit if accessed directly.
12
  if ( ! defined( 'ABSPATH' ) ) exit;
13
 
14
+ /**
15
+ * Function to get reviews schema markup
16
+ * @global type $sd_data
17
+ * @return string
18
+ */
19
+ function saswp_get_reviews_schema_markup($reviews){
20
+
21
+ $sumofrating = 0;
22
+ $avg_rating = 1;
23
+ $reviews_arr = array();
24
+ $input1 = array();
25
+
26
+ if($reviews){
27
+
28
+ foreach($reviews as $rv){
29
+
30
+ $sumofrating += $rv['saswp_review_rating'];
31
+
32
+ if($rv['saswp_review_rating'] && $rv['saswp_reviewer_name']){
33
+
34
+ $reviews_arr[] = array(
35
+ '@type' => 'Review',
36
+ 'author' => $rv['saswp_reviewer_name'],
37
+ 'datePublished' => $rv['saswp_review_date'],
38
+ 'description' => $rv['saswp_review_text'],
39
+ 'reviewRating' => array(
40
+ '@type' => 'Rating',
41
+ 'bestRating' => 5,
42
+ 'ratingValue' => $rv['saswp_review_rating'],
43
+ 'worstRating' => 1
44
+ ),
45
+ );
46
+
47
+ }
48
+
49
+ }
50
+
51
+ if($sumofrating> 0){
52
+ $avg_rating = $sumofrating / count($reviews);
53
+ }
54
+
55
+ if(!empty($reviews_arr)){
56
+
57
+ $input1['review'] = $reviews_arr;
58
+
59
+ }
60
+
61
+ $input1['aggregateRating'] = array(
62
+ '@type' => 'AggregateRating',
63
+ 'reviewCount' => count($reviews),
64
+ 'ratingValue' => esc_attr($avg_rating),
65
+ );
66
+
67
+ }
68
+ return $input1;
69
+
70
+ }
71
+
72
  function saswp_book_schema_markup($schema_id, $schema_post_id, $all_post_meta){
73
 
74
  $input1 = array();
611
 
612
  function saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta){
613
 
614
+ $input1 = array();
615
 
616
  $product_image = get_post_meta( get_the_ID(), 'saswp_product_schema_image_'.$schema_id.'_detail',true);
617
  $input1 = array(
621
  'url' => trailingslashit(get_permalink()),
622
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_name_'.$schema_id, 'saswp_array'),
623
  'sku' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_sku_'.$schema_id, 'saswp_array'),
624
+ 'description' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_description_'.$schema_id, 'saswp_array'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
625
  'brand' => array('@type' => 'Thing',
626
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_product_schema_brand_name_'.$schema_id, 'saswp_array'),
627
  )
628
  );
629
+
630
+ if(isset($product_image['thumbnail']) && $product_image['thumbnail']){
631
+
632
+ $input1['image']['@type'] = 'Offer';
633
+ $input1['image']['url'] = $product_image['thumbnail'];
634
+ $input1['image']['width'] = $product_image['width'];
635
+ $input1['image']['height'] = $product_image['height'];
636
+
637
+ }
638
+
639
+ if(isset($all_post_meta['saswp_product_schema_price_'.$schema_id][0]) && $all_post_meta['saswp_product_schema_price_'.$schema_id][0]){
640
+
641
+ $input1['offers']['@type'] = 'Offer';
642
+ $input1['offers']['availability'] = saswp_remove_warnings($all_post_meta, 'saswp_product_schema_availability_'.$schema_id, 'saswp_array');
643
+ $input1['offers']['itemCondition'] = saswp_remove_warnings($all_post_meta, 'saswp_product_schema_condition_'.$schema_id, 'saswp_array');
644
+ $input1['offers']['price'] = saswp_remove_warnings($all_post_meta, 'saswp_product_schema_price_'.$schema_id, 'saswp_array');
645
+ $input1['offers']['priceCurrency'] = saswp_remove_warnings($all_post_meta, 'saswp_product_schema_currency_'.$schema_id, 'saswp_array');
646
+ $input1['offers']['url'] = trailingslashit(saswp_get_permalink());
647
+ $input1['offers']['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])):'';
648
+
649
+ if(isset($all_post_meta['saswp_product_schema_seller_'.$schema_id])){
650
+ $input1['offers']['seller']['@type'] = 'Organization';
651
+ $input1['offers']['seller']['name'] = esc_attr($all_post_meta['saswp_product_schema_seller_'.$schema_id][0]);
652
+ }
653
+ }
654
+
655
  if(isset($all_post_meta['saswp_product_schema_gtin8_'.$schema_id])){
656
  $input1['gtin8'] = esc_attr($all_post_meta['saswp_product_schema_gtin8_'.$schema_id][0]);
657
  }
1147
  return $input1;
1148
  }
1149
 
1150
+
1151
+ function saswp_itemlist_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1152
+
1153
+ $response = array();
1154
+
1155
+ $itemlist = get_post_meta($schema_post_id, 'itemlist_item_'.$schema_id, true);
1156
+ $itemtype = get_post_meta($schema_id, 'saswp_itemlist_item_type', true);
1157
+ $type_func = 'saswp_'.$itemtype.'_schema_markup';
1158
+ $list_item = array();
1159
+ $image_details = array();
1160
+ $logo_details = array();
1161
+
1162
+ if($itemlist){
1163
+
1164
+ $i = 1;
1165
+ foreach($itemlist as $item_meta){
1166
+
1167
+ $all_post_meta = array();
1168
+
1169
+ foreach($item_meta as $key => $val){
1170
+
1171
+ $all_post_meta[$key.$schema_id] = array($val);
1172
+
1173
+ if( strpos($key, 'image__id') !== false ){
1174
+
1175
+ $image_details = saswp_get_image_by_id($val);
1176
+
1177
+ }
1178
+
1179
+ if( strpos($key, 'logo__id') !== false ){
1180
+
1181
+ $logo_details = saswp_get_image_by_id($val);
1182
+
1183
+ }
1184
+
1185
+ }
1186
+
1187
+ if(function_exists($type_func)){
1188
+
1189
+ $markup = call_user_func($type_func, $schema_id, $schema_post_id, $all_post_meta);
1190
+ unset($markup['@context'], $markup['@id']);
1191
+
1192
+ if($image_details){
1193
+ $markup['image'] = $image_details;
1194
+ }
1195
+ if($logo_details){
1196
+ $markup['publisher']['@type'] = 'Organization';
1197
+ $markup['publisher']['logo'] = $logo_details;
1198
+ }
1199
+
1200
+ $json_markup['@type'] = 'ListItem';
1201
+ $json_markup['position'] = $i;
1202
+ $json_markup['item'] = $markup;
1203
+
1204
+ $list_item[] = $json_markup;
1205
+
1206
+ }
1207
+
1208
+ $i++;
1209
+ }
1210
+
1211
+ $response['@context'] = saswp_context_url();
1212
+ $response['@context'] = saswp_context_url();
1213
+ $response['@type'] = 'ItemList';
1214
+ $response['url'] = saswp_get_permalink();
1215
+ $response['itemListElement'] = $list_item;
1216
+
1217
+ }
1218
+
1219
+ return $response;
1220
+
1221
+ }
1222
+
1223
  function saswp_faq_schema_markup($schema_id, $schema_post_id, $all_post_meta){
1224
 
1225
  $input1 = array();
2183
  '@context' => saswp_context_url(),
2184
  '@type' => 'Article',
2185
  '@id' => trailingslashit(get_permalink()).'#article',
2186
+ 'url' => saswp_remove_warnings($all_post_meta, 'saswp_article_url_'.$schema_id, 'saswp_array'),
2187
  'inLanguage' => get_bloginfo('language'),
2188
  'mainEntityOfPage' => saswp_remove_warnings($all_post_meta, 'saswp_article_main_entity_of_page_'.$schema_id, 'saswp_array'),
2189
  'image' => saswp_remove_warnings($all_post_meta, 'saswp_article_image_'.$schema_id, 'saswp_array'),
2197
  'name' => saswp_remove_warnings($all_post_meta, 'saswp_article_author_name_'.$schema_id, 'saswp_array'),
2198
  'description' => saswp_remove_warnings($all_post_meta, 'saswp_article_author_description_'.$schema_id, 'saswp_array'),
2199
  'url' => saswp_remove_warnings($all_post_meta, 'saswp_article_author_url_'.$schema_id, 'saswp_array')
2200
+ )
 
 
 
 
 
 
 
 
 
 
2201
 
2202
  );
2203
 
2204
+ if(isset($all_post_meta['saswp_article_organization_logo_'.$schema_id][0]) || isset($all_post_meta['saswp_article_organization_name_'.$schema_id][0])){
2205
+
2206
+ $input1['publisher']['@type'] = 'Organization';
2207
+ $input1['publisher']['logo']['@type'] = 'ImageObject';
2208
+ $input1['publisher']['logo']['url'] = saswp_remove_warnings($all_post_meta, 'saswp_article_organization_logo_'.$schema_id, 'saswp_array');
2209
+ $input1['publisher']['logo']['width'] = saswp_remove_warnings($slogo, 'width', 'saswp_string');
2210
+ $input1['publisher']['logo']['height'] = saswp_remove_warnings($slogo, 'height', 'saswp_string');
2211
+ $input1['publisher']['name'] = saswp_remove_warnings($all_post_meta, 'saswp_article_organization_name_'.$schema_id, 'saswp_array');
2212
+
2213
+ }
2214
+
2215
  $itemlist = get_post_meta($schema_post_id, 'article_items_'.$schema_id, true);
2216
 
2217
  if($itemlist){
output/output.php CHANGED
@@ -8,37 +8,6 @@
8
  * @version 1.0
9
  */
10
  if (! defined('ABSPATH') ) exit;
11
-
12
-
13
- /**
14
- * List of schema type who do not support aggregateRating directly
15
- */
16
- $without_aggregate = array(
17
- 'Apartment',
18
- 'House',
19
- 'SingleFamilyResidence',
20
- 'Article',
21
- 'Blogposting',
22
- 'DiscussionForumPosting',
23
- 'DataFeed',
24
- 'FAQ',
25
- 'NewsArticle',
26
- 'qanda',
27
- 'TechArticle',
28
- 'WebPage',
29
- 'JobPosting',
30
- 'Service',
31
- 'Trip',
32
- 'MedicalCondition',
33
- 'TouristAttraction',
34
- 'TouristDestination',
35
- 'LandmarksOrHistoricalBuildings',
36
- 'HinduTemple',
37
- 'Church',
38
- 'Mosque',
39
- 'Person'
40
- );
41
-
42
  /**
43
  * Function generates knowledge graph schema
44
  * @global type $sd_data
@@ -111,6 +80,12 @@ function saswp_kb_schema_output() {
111
  }
112
 
113
  $input = array_merge($input, $contact_info);
 
 
 
 
 
 
114
 
115
  }
116
  // Person
@@ -158,7 +133,7 @@ function saswp_kb_schema_output() {
158
  'telephone' => esc_attr($sd_data['sd-person-phone-number']),
159
  );
160
  }
161
-
162
  return apply_filters('saswp_modify_organization_output', $input);
163
  }
164
 
@@ -171,7 +146,7 @@ function saswp_schema_output() {
171
 
172
  global $sd_data;
173
 
174
- $Conditionals = saswp_get_all_schema_posts();
175
 
176
  if(!$Conditionals){
177
  return ;
@@ -263,373 +238,517 @@ function saswp_schema_output() {
263
  $extra_theme_review = array();
264
  $extra_theme_review = $service_object->saswp_extra_theme_review_details(get_the_ID());
265
 
266
- if( 'FAQ' === $schema_type){
267
-
268
- $input1['@context'] = saswp_context_url();
269
- $input1['@type'] = 'FAQPage';
270
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#FAQPage';
271
- $input1['headline'] = saswp_get_the_title();
272
- $input1['keywords'] = saswp_get_the_tags();
273
- $input1['datePublished'] = esc_html($date);
274
- $input1['dateModified'] = esc_html($modified_date);
275
- $input1['dateCreated'] = esc_html($date);
276
- $input1['author'] = saswp_get_author_details();
277
-
278
-
279
- $input1 = apply_filters('saswp_modify_faq_schema_output', $input1 );
280
-
281
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
282
-
283
-
284
- }
285
-
286
- if( 'VideoGame' === $schema_type){
287
-
288
- $input1['@context'] = saswp_context_url();
289
- $input1['@type'] = 'VideoGame';
290
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#VideoGame';
291
- $input1['author']['@type'] = 'Organization';
292
- $input1['offers']['@type'] = 'Offer';
293
-
294
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
295
-
296
- $input1 = apply_filters('saswp_modify_video_game_schema_output', $input1 );
297
-
298
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
299
-
300
- }
301
 
302
- if( 'MedicalCondition' === $schema_type){
303
-
304
- $input1['@context'] = saswp_context_url();
305
- $input1['@type'] = 'MedicalCondition';
306
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#MedicalCondition';
307
- $input1['associatedAnatomy']['@type'] = 'AnatomicalStructure';
308
- $input1['code']['@type'] = 'MedicalCode';
309
-
310
- $input1 = apply_filters('saswp_modify_medical_condition_schema_output', $input1 );
 
 
 
 
 
 
 
311
 
312
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
313
-
314
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
 
316
- if( 'TVSeries' === $schema_type){
317
-
318
- $input1['@context'] = saswp_context_url();
319
- $input1['@type'] = 'TVSeries';
320
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#TVSeries';
321
- $input1['author']['@type'] = 'Person';
322
-
323
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
 
 
 
 
 
 
 
 
 
 
 
 
324
 
325
- $input1 = apply_filters('saswp_modify_tvseries_schema_output', $input1 );
326
 
327
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
 
 
 
 
 
328
 
329
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
 
331
- if( 'Movie' === $schema_type){
332
 
333
- $input1['@context'] = saswp_context_url();
334
- $input1['@type'] = 'Movie';
335
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Movie';
336
-
337
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
338
-
339
- $input1 = apply_filters('saswp_modify_movie_schema_output', $input1 );
340
-
341
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
342
-
343
- }
344
-
345
- if( 'HowTo' === $schema_type){
 
 
 
 
 
346
 
347
- $input1['@context'] = saswp_context_url();
348
- $input1['@type'] = 'HowTo';
349
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#HowTo';
350
- $input1['estimatedCost']['@type'] = 'MonetaryAmount';
351
-
352
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
353
-
354
- $input1 = apply_filters('saswp_modify_howto_schema_output', $input1 );
355
-
356
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
 
 
357
 
358
- }
359
 
360
- if( 'Trip' === $schema_type){
361
 
362
- $input1['@context'] = saswp_context_url();
363
- $input1['@type'] = 'Trip';
364
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Trip';
365
-
366
- $input1 = apply_filters('saswp_modify_trip_schema_output', $input1 );
367
-
368
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
 
 
369
 
370
- }
371
 
372
- if( 'SingleFamilyResidence' === $schema_type){
373
 
374
- $input1['@context'] = saswp_context_url();
375
- $input1['@type'] = 'SingleFamilyResidence';
376
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#SingleFamilyResidence';
377
- $input1['address']['@type'] = 'PostalAddress';
378
-
379
- $input1 = apply_filters('saswp_modify_apartment_schema_sfr', $input1 );
380
-
381
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
 
 
382
 
383
- }
384
 
385
- if( 'House' === $schema_type){
386
 
387
- $input1['@context'] = saswp_context_url();
388
- $input1['@type'] = 'House';
389
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#House';
390
- $input1['address']['@type'] = 'PostalAddress';
391
-
392
- $input1 = apply_filters('saswp_modify_apartment_schema_house', $input1 );
393
-
394
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
395
-
396
- }
397
-
398
- if( 'Apartment' === $schema_type){
 
 
 
 
 
399
 
400
- $input1['@context'] = saswp_context_url();
401
- $input1['@type'] = 'Apartment';
402
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Apartment';
403
- $input1['address']['@type'] = 'PostalAddress';
404
-
405
- $input1 = apply_filters('saswp_modify_apartment_schema_output', $input1 );
406
-
407
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
 
 
408
 
409
- }
410
-
411
- if( 'MusicPlaylist' === $schema_type){
412
-
413
- $input1['@context'] = saswp_context_url();
414
- $input1['@type'] = 'MusicPlaylist';
415
- $input1['@id'] = trailingslashit(get_permalink()).'#MusicPlaylist';
416
-
417
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
418
-
419
- $input1 = apply_filters('saswp_modify_music_playlist_schema_output', $input1 );
420
-
421
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
422
-
423
- }
424
-
425
- if( 'MusicComposition' === $schema_type){
426
-
427
- $input1['@context'] = saswp_context_url();
428
- $input1['@type'] = 'MusicComposition';
429
- $input1['@id'] = trailingslashit(get_permalink()).'#MusicComposition';
430
- $input1['inLanguage'] = get_bloginfo('language');
431
- $input1['datePublished'] = esc_html($date);
432
-
433
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
434
-
435
- $input1 = apply_filters('saswp_modify_music_composition_schema_output', $input1 );
436
-
437
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
438
-
439
- }
440
-
441
- if( 'Book' === $schema_type){
442
 
443
- $input1['@context'] = saswp_context_url();
444
- $input1['@type'] = 'Book';
445
- $input1['@id'] = trailingslashit(get_permalink()).'#Book';
446
-
447
- $service = new saswp_output_service();
448
- $woo_markp = $service->saswp_schema_markup_generator($schema_type);
 
 
 
449
 
450
- if($woo_markp){
451
- $input1 = array_merge($input1, $woo_markp);
452
- }
 
 
 
 
 
 
 
 
 
 
 
453
 
454
- unset($input1['brand'], $input1['mpn'], $input1['sku'],$input1['gtin8']);
455
-
456
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
457
-
458
- $input1 = apply_filters('saswp_modify_music_playlist_schema_output', $input1 );
459
-
460
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
461
-
462
- }
463
-
464
- if( 'MusicAlbum' === $schema_type){
 
 
 
465
 
466
- $input1['@context'] = saswp_context_url();
467
- $input1['@type'] = 'MusicAlbum';
468
- $input1['@id'] = trailingslashit(get_permalink()).'#MusicAlbum';
469
-
470
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
471
- $input1 = apply_filters('saswp_modify_music_album_schema_output', $input1 );
472
-
473
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
474
-
475
- }
476
-
477
- if( 'TouristDestination' === $schema_type){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
478
 
479
- $input1['@context'] = saswp_context_url();
480
- $input1['@type'] = 'TouristDestination';
481
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#TouristDestination';
482
- $input1['address']['@type'] = 'PostalAddress';
483
-
484
- $input1 = apply_filters('saswp_modify_tourist_destination_schema_output', $input1 );
485
-
486
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
487
-
488
- }
 
 
 
 
 
489
 
490
- if( 'TouristAttraction' === $schema_type){
491
 
492
- $input1['@context'] = saswp_context_url();
493
- $input1['@type'] = 'TouristAttraction';
494
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#TouristAttraction';
495
- $input1['address']['@type'] = 'PostalAddress';
496
-
497
- $input1 = apply_filters('saswp_modify_tourist_attraction_schema_output', $input1 );
498
-
499
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
500
-
501
- }
 
 
 
 
 
502
 
503
- if( 'LandmarksOrHistoricalBuildings' === $schema_type){
504
 
505
- $input1['@context'] = saswp_context_url();
506
- $input1['@type'] = 'LandmarksOrHistoricalBuildings';
507
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#LandmarksOrHistoricalBuildings';
508
- $input1['address']['@type'] = 'PostalAddress';
509
-
510
- $input1 = apply_filters('saswp_modify_lorh_schema_output', $input1 );
511
-
512
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
513
-
514
- }
515
-
516
- if( 'HinduTemple' === $schema_type){
517
-
518
- $input1['@context'] = saswp_context_url();
519
- $input1['@type'] = 'HinduTemple';
520
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#HinduTemple';
521
- $input1['address']['@type'] = 'PostalAddress';
522
-
523
- $input1 = apply_filters('saswp_modify_hindu_temple_schema_output', $input1 );
524
 
525
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
526
 
527
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
528
 
529
- if( 'Church' === $schema_type){
530
 
531
- $input1['@context'] = saswp_context_url();
532
- $input1['@type'] = 'Church';
533
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Church';
534
- $input1['address']['@type'] = 'PostalAddress';
535
-
536
- $input1 = apply_filters('saswp_modify_church_schema_output', $input1 );
537
-
538
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
539
-
540
- }
 
 
 
 
 
541
 
542
- if( 'Mosque' === $schema_type){
543
 
544
- $input1['@context'] = saswp_context_url();
545
- $input1['@type'] = 'Mosque';
546
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Mosque';
547
- $input1['address']['@type'] = 'PostalAddress';
548
-
549
- $input1 = apply_filters('saswp_modify_mosque_schema_output', $input1 );
550
-
551
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
552
-
553
- }
 
 
 
 
 
554
 
555
- if( 'JobPosting' === $schema_type){
556
 
557
- $input1['@context'] = saswp_context_url();
558
- $input1['@type'] = 'JobPosting';
559
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#JobPosting';
560
- $input1['hiringOrganization']['@type'] = 'Organization';
561
- $input1['jobLocation']['@type'] = 'Place';
562
- $input1['jobLocation']['address']['@type'] = 'PostalAddress';
563
- $input1['baseSalary']['@type'] = 'MonetaryAmount';
564
- $input1['baseSalary']['value']['@type'] = 'QuantitativeValue';
565
-
566
- $input1 = apply_filters('saswp_modify_jobposting_schema_output', $input1 );
567
-
568
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
569
-
570
- }
 
 
 
 
 
571
 
572
- if( 'Person' === $schema_type){
573
 
574
- $input1['@context'] = saswp_context_url();
575
- $input1['@type'] = 'Person';
576
- $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Person';
577
- $input1['address']['@type'] = 'PostalAddress';
578
-
579
- $input1 = apply_filters('saswp_modify_person_schema_output', $input1 );
580
-
581
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
 
 
582
 
583
- }
584
 
585
- if( 'Course' === $schema_type){
586
-
587
- $description = saswp_get_the_excerpt();
588
 
589
- if(!$description){
590
- $description = get_bloginfo('description');
591
- }
592
-
593
- $input1 = array(
594
- '@context' => saswp_context_url(),
595
- '@type' => $schema_type ,
596
- '@id' => trailingslashit(saswp_get_permalink()).'#course',
597
- 'name' => saswp_get_the_title(),
598
- 'description' => $description,
599
- 'url' => trailingslashit(saswp_get_permalink()),
600
- 'datePublished' => esc_html($date),
601
- 'dateModified' => esc_html($modified_date),
602
- 'author' => saswp_get_author_details(),
603
- 'provider' => array(
604
- '@type' => 'Organization',
605
- 'name' => get_bloginfo(),
606
- 'sameAs' => get_home_url()
607
- )
608
- );
609
-
610
- if(!empty($aggregateRating)){
611
- $input1['aggregateRating'] = $aggregateRating;
612
- }
613
- if(!empty($extra_theme_review)){
614
- $input1 = array_merge($input1, $extra_theme_review);
615
- }
616
- if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
617
- $input1['comment'] = saswp_get_comments(get_the_ID());
618
  }
619
-
620
- $input1 = apply_filters('saswp_modify_course_schema_output', $input1 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
621
 
622
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
623
- }
624
-
625
- if( 'DiscussionForumPosting' === $schema_type){
626
 
627
  if(isset($sd_data['saswp-bbpress']) && $sd_data['saswp-bbpress'] == 1 && is_plugin_active('bbpress/bbpress.php')){
628
 
629
-
630
- $bbp_date = get_post_time( get_option( 'date_format' ), get_the_ID(), true );
631
- $bbp_time = get_post_time( get_option( 'time_format' ), get_the_ID(), true );
632
-
633
  $input1 = array(
634
  '@context' => saswp_context_url(),
635
  '@type' => 'DiscussionForumPosting' ,
@@ -640,7 +759,7 @@ function saswp_schema_output() {
640
  "articleSection" => bbp_get_forum_title(),
641
  "articleBody" => saswp_get_the_content(),
642
  'url' => bbp_get_topic_permalink(),
643
- 'datePublished' => saswp_format_date_time($bbp_date, $bbp_time),
644
  'dateModified' => esc_html($modified_date),
645
  'author' => saswp_get_author_details(),
646
  'interactionStatistic' => array(
@@ -685,89 +804,110 @@ function saswp_schema_output() {
685
  $input1 = apply_filters('saswp_modify_d_forum_posting_schema_output', $input1 );
686
 
687
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
688
- }
689
-
690
- if( 'Blogposting' === $schema_type){
691
-
692
- $input1 = array(
693
- '@context' => saswp_context_url(),
694
- '@type' => 'BlogPosting' ,
695
- '@id' => trailingslashit(saswp_get_permalink()).'#blogposting',
696
- 'url' => trailingslashit(saswp_get_permalink()),
697
- 'inLanguage' => get_bloginfo('language'),
698
- 'mainEntityOfPage' => trailingslashit(saswp_get_permalink()),
699
- 'headline' => saswp_get_the_title(),
700
- 'description' => saswp_get_the_excerpt(),
701
- 'articleBody' => saswp_get_the_content(),
702
- 'keywords' => saswp_get_the_tags(),
703
- 'name' => saswp_get_the_title(),
704
- 'datePublished' => esc_html($date),
705
- 'dateModified' => esc_html($modified_date),
706
- 'author' => saswp_get_author_details()
707
- );
708
-
709
- $mainentity = saswp_get_mainEntity($schema_post_id);
710
-
711
- if($mainentity){
712
- $input1['mainEntity'] = $mainentity;
713
- }
714
- if(!empty($publisher)){
715
-
716
- $input1 = array_merge($input1, $publisher);
717
-
718
- }
719
-
720
- if(!empty($aggregateRating)){
721
- $input1['aggregateRating'] = $aggregateRating;
722
- }
723
- if(!empty($extra_theme_review)){
724
- $input1 = array_merge($input1, $extra_theme_review);
725
- }
726
- if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
727
- $input1['comment'] = saswp_get_comments(get_the_ID());
728
- }
729
-
730
- $input1 = apply_filters('saswp_modify_blogposting_schema_output', $input1 );
731
-
732
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
733
- }
734
-
735
- if( 'AudioObject' === $schema_type){
736
-
737
- $input1 = array(
738
- '@context' => saswp_context_url(),
739
- '@type' => $schema_type ,
740
- '@id' => trailingslashit(saswp_get_permalink()).'#audioobject',
741
- 'datePublished' => esc_html($date),
742
- 'dateModified' => esc_html($modified_date),
743
- 'author' => saswp_get_author_details()
744
- );
745
- if(!empty($publisher)){
746
-
747
- $input1 = array_merge($input1, $publisher);
748
-
749
  }
750
-
751
- if(!empty($aggregateRating)){
752
- $input1['aggregateRating'] = $aggregateRating;
753
- }
754
- if(!empty($extra_theme_review)){
755
- $input1 = array_merge($input1, $extra_theme_review);
756
- }
757
- if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
758
- $input1['comment'] = saswp_get_comments(get_the_ID());
759
- }
760
 
761
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
762
-
 
763
 
764
- $input1 = apply_filters('saswp_modify_audio_object_schema_output', $input1 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
765
 
766
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
767
- }
768
 
769
- if( 'Event' === $schema_type){
770
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
771
  $event_type = get_post_meta($schema_post_id, 'saswp_event_type', true);
772
 
773
  $input1['@context'] = saswp_context_url();
@@ -785,10 +925,15 @@ function saswp_schema_output() {
785
  $input1 = apply_filters('saswp_modify_event_schema_output', $input1 );
786
 
787
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
 
 
788
 
789
- }
790
 
791
- if( 'SoftwareApplication' === $schema_type){
792
 
793
  $input1 = array(
794
  '@context' => saswp_context_url(),
@@ -826,9 +971,15 @@ function saswp_schema_output() {
826
  $input1 = apply_filters('saswp_modify_software_application_schema_output', $input1 );
827
 
828
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
829
- }
830
-
831
- if( 'WebPage' === $schema_type){
 
 
 
 
 
 
832
 
833
  $service = new saswp_output_service();
834
  $input1 = $service->saswp_schema_markup_generator($schema_type);
@@ -846,10 +997,16 @@ function saswp_schema_output() {
846
  $input1 = apply_filters('saswp_modify_webpage_schema_output', $input1 );
847
 
848
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
849
- }
850
-
851
- if( 'Article' === $schema_type ){
 
 
 
 
852
 
 
 
853
  $service = new saswp_output_service();
854
  $input1 = $service->saswp_schema_markup_generator($schema_type);
855
 
@@ -865,9 +1022,15 @@ function saswp_schema_output() {
865
  $input1 = apply_filters('saswp_modify_article_schema_output', $input1 );
866
 
867
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
868
- }
 
 
 
 
 
 
869
 
870
- if( 'TechArticle' === $schema_type ){
871
 
872
  $service = new saswp_output_service();
873
  $input1 = $service->saswp_schema_markup_generator($schema_type);
@@ -888,10 +1051,16 @@ function saswp_schema_output() {
888
  $input1 = apply_filters('saswp_modify_tech_article_schema_output', $input1 );
889
 
890
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
891
- }
892
-
893
- if( 'Recipe' === $schema_type){
 
 
 
 
894
 
 
 
895
  if(isset($sd_data['saswp-wp-recipe-maker']) && $sd_data['saswp-wp-recipe-maker'] == 1){
896
 
897
  $recipe_ids = saswp_get_ids_from_content_by_type('wp_recipe_maker');
@@ -942,32 +1111,43 @@ function saswp_schema_output() {
942
  $input1 = apply_filters('saswp_modify_recipe_schema_output', $input1 );
943
 
944
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
945
- }
946
-
947
- if( 'qanda' === $schema_type){
 
 
 
 
 
 
948
 
949
- if(isset($sd_data['saswp-dw-question-answer']) && $sd_data['saswp-dw-question-answer'] ==1){
950
-
951
- $service_object = new saswp_output_service();
952
- $input1 = $service_object->saswp_dw_question_answers_details(get_the_ID());
953
-
954
- }
955
 
956
- if(isset($sd_data['saswp-bbpress']) && $sd_data['saswp-bbpress'] ==1){
957
-
958
- $service_object = new saswp_output_service();
959
- $input1 = $service_object->saswp_bb_press_topic_details(get_the_ID());
 
 
 
 
 
 
 
 
 
 
 
960
 
961
- }
962
-
963
-
964
- $input1 = apply_filters('saswp_modify_qanda_schema_output', $input1 );
965
-
966
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
967
- }
968
-
969
- if( 'Product' === $schema_type){
970
-
971
  $service = new saswp_output_service();
972
  $input1 = $service->saswp_schema_markup_generator($schema_type);
973
 
@@ -976,20 +1156,26 @@ function saswp_schema_output() {
976
  $input1 = apply_filters('saswp_modify_product_schema_output', $input1 );
977
 
978
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
979
- }
980
-
981
- if( 'NewsArticle' === $schema_type ){
982
-
983
- $image_details = wp_get_attachment_image_src($image_id);
984
-
985
- $category_detail = get_the_category(get_the_ID());//$post->ID
986
- $article_section = '';
987
-
988
- foreach($category_detail as $cd){
989
 
990
- $article_section = $cd->cat_name;
991
-
992
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
993
  $word_count = saswp_reading_time_and_word_count();
994
  $input1 = array(
995
  '@context' => saswp_context_url(),
@@ -1041,9 +1227,14 @@ function saswp_schema_output() {
1041
 
1042
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1043
 
1044
- }
1045
-
1046
- if( 'Service' === $schema_type ){
 
 
 
 
 
1047
 
1048
  $input1['@context'] = saswp_context_url();
1049
  $input1['@type'] = $schema_type;
@@ -1062,9 +1253,14 @@ function saswp_schema_output() {
1062
 
1063
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1064
 
1065
- }
1066
-
1067
- if('Review' === $schema_type){
 
 
 
 
 
1068
 
1069
  $service = new saswp_output_service();
1070
  $review_markup = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
@@ -1153,98 +1349,113 @@ function saswp_schema_output() {
1153
  }
1154
 
1155
  $input1 = apply_filters('saswp_modify_service_schema_output', $input1 );
1156
-
1157
- }
1158
-
1159
- if( 'VideoObject' === $schema_type){
1160
-
1161
- $image_details = wp_get_attachment_image_src($image_id);
1162
-
1163
- $description = saswp_get_the_excerpt();
1164
-
1165
- if(!$description){
1166
- $description = get_bloginfo('description');
1167
- }
1168
- $input1 = array(
1169
- '@context' => saswp_context_url(),
1170
- '@type' => 'VideoObject',
1171
- '@id' => trailingslashit(saswp_get_permalink()).'#videoobject',
1172
- 'url' => trailingslashit(saswp_get_permalink()),
1173
- 'headline' => saswp_get_the_title(),
1174
- 'datePublished' => esc_html($date),
1175
- 'dateModified' => esc_html($modified_date),
1176
- 'description' => $description,
1177
- 'name' => saswp_get_the_title(),
1178
- 'uploadDate' => esc_html($date),
1179
- 'thumbnailUrl' => isset($image_details[0]) ? esc_url($image_details[0]):'',
1180
- 'author' => saswp_get_author_details()
1181
- );
1182
- if(!empty($publisher)){
1183
-
1184
- $input1 = array_merge($input1, $publisher);
1185
-
1186
- }
1187
- if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1188
- $input1['comment'] = saswp_get_comments(get_the_ID());
1189
- }
1190
- if(!empty($aggregateRating)){
1191
- $input1['aggregateRating'] = $aggregateRating;
1192
- }
1193
- if(!empty($extra_theme_review)){
1194
- $input1 = array_merge($input1, $extra_theme_review);
1195
- }
1196
-
1197
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
1198
- $input1 = apply_filters('saswp_modify_video_object_schema_output', $input1 );
1199
-
1200
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1201
-
1202
- }
1203
 
1204
- if( 'ImageObject' === $schema_type){
1205
-
1206
- $description = saswp_get_the_excerpt();
1207
-
1208
- if(!$description){
1209
- $description = get_bloginfo('description');
1210
- }
1211
- $input1 = array(
1212
- '@context' => saswp_context_url(),
1213
- '@type' => 'ImageObject',
1214
- '@id' => trailingslashit(saswp_get_permalink()).'#imageobject',
1215
- 'url' => trailingslashit(saswp_get_permalink()),
1216
- 'datePublished' => esc_html($date),
1217
- 'dateModified' => esc_html($modified_date),
1218
- 'name' => saswp_get_the_title(),
1219
- 'description' => $description,
1220
- 'contentUrl' => trailingslashit(saswp_get_permalink()),
1221
- 'uploadDate' => esc_html($date),
1222
- 'author' => saswp_get_author_details()
1223
- );
1224
- if(!empty($publisher)){
1225
-
1226
- $input1 = array_merge($input1, $publisher);
1227
-
1228
- }
1229
- if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1230
- $input1['comment'] = saswp_get_comments(get_the_ID());
1231
- }
1232
- if(!empty($aggregateRating)){
1233
- $input1['aggregateRating'] = $aggregateRating;
1234
- }
1235
- if(!empty($extra_theme_review)){
1236
- $input1 = array_merge($input1, $extra_theme_review);
1237
- }
1238
-
1239
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
1240
- $input1 = apply_filters('saswp_modify_image_object_schema_output', $input1 );
1241
-
1242
- $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1243
-
1244
- }
1245
-
1246
- if( 'local_business' === $schema_type){
1247
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1248
  $business_type = get_post_meta($schema_post_id, 'saswp_business_type', true);
1249
  $business_name = get_post_meta($schema_post_id, 'saswp_business_name', true);
1250
 
@@ -1279,9 +1490,19 @@ function saswp_schema_output() {
1279
  $input1 = apply_filters('saswp_modify_local_business_schema_output', $input1 );
1280
 
1281
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1282
-
1283
- }
1284
-
 
 
 
 
 
 
 
 
 
 
1285
  //Speakable schema
1286
 
1287
  if($schema_type == 'TechArticle' || $schema_type == 'Article' || $schema_type == 'Blogposting' || $schema_type == 'NewsArticle' || $schema_type == 'WebPage'){
@@ -1297,8 +1518,7 @@ function saswp_schema_output() {
1297
  );
1298
 
1299
  }
1300
-
1301
-
1302
  }
1303
 
1304
  global $without_aggregate;
@@ -1422,7 +1642,7 @@ function saswp_schema_output() {
1422
  }
1423
  }
1424
 
1425
- if(isset($schema_options['notAccessibleForFree']) && $schema_options['notAccessibleForFree'] == 1){
1426
 
1427
  add_filter( 'amp_post_template_data', 'saswp_structure_data_access_scripts');
1428
 
@@ -1453,16 +1673,15 @@ function saswp_schema_output() {
1453
 
1454
  if(!empty($input1)){
1455
  $all_schema_output[] = $input1;
1456
- }
1457
-
1458
  }
1459
 
1460
  if($recipe_json){
1461
  foreach($recipe_json as $json){
1462
  array_push($all_schema_output, $json);
1463
  }
1464
- }
1465
-
1466
  return apply_filters('saswp_modify_schema_output', $all_schema_output);
1467
  }
1468
  /**
@@ -2009,4 +2228,67 @@ function saswp_site_navigation_output(){
2009
  }
2010
 
2011
  return apply_filters('saswp_modify_sitenavigation_output', $input);
2012
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  * @version 1.0
9
  */
10
  if (! defined('ABSPATH') ) exit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  /**
12
  * Function generates knowledge graph schema
13
  * @global type $sd_data
80
  }
81
 
82
  $input = array_merge($input, $contact_info);
83
+
84
+ $reviews = saswp_fetched_reviews_schema_markup();
85
+
86
+ if($reviews){
87
+ $input = array_merge($input, $reviews);
88
+ }
89
 
90
  }
91
  // Person
133
  'telephone' => esc_attr($sd_data['sd-person-phone-number']),
134
  );
135
  }
136
+
137
  return apply_filters('saswp_modify_organization_output', $input);
138
  }
139
 
146
 
147
  global $sd_data;
148
 
149
+ $Conditionals = saswp_get_all_schema_posts();
150
 
151
  if(!$Conditionals){
152
  return ;
238
  $extra_theme_review = array();
239
  $extra_theme_review = $service_object->saswp_extra_theme_review_details(get_the_ID());
240
 
241
+ $modify_option = get_option('modify_schema_post_enable_'.get_the_ID());
242
+ $modified_schema = get_post_meta(get_the_ID(), 'saswp_modify_this_schema_'.$schema_post_id, true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
 
244
+ $schema_enable = get_post_meta(get_the_ID(), 'saswp_enable_disable_schema', true);
245
+ $all_post_meta = get_post_meta(get_the_ID(), $key='', true);
246
+
247
+ if($modify_option == 'enable' && (isset($schema_enable[$schema_post_id]) && $schema_enable[$schema_post_id] == 1)){
248
+
249
+ $modified_schema = 1;
250
+
251
+ }
252
+
253
+ if( (isset($schema_enable[$schema_post_id]) && $schema_enable[$schema_post_id] == 0 ) ||
254
+ ($modify_option == 'enable' && !isset($schema_enable[$schema_post_id]))
255
+ ){
256
+ continue;
257
+ }
258
+
259
+ switch ($schema_type) {
260
 
261
+ case 'ItemList':
262
+
263
+ $input1['@context'] = saswp_context_url();
264
+ $input1['@type'] = 'ItemList';
265
+ $input1['url'] = saswp_get_permalink();
266
+
267
+ $input1 = apply_filters('saswp_modify_itemlist_schema_output', $input1 );
268
+
269
+ $input1 = saswp_itemlist_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
270
+
271
+ break;
272
+
273
+ case 'FAQ':
274
+
275
+ $input1['@context'] = saswp_context_url();
276
+ $input1['@type'] = 'FAQPage';
277
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#FAQPage';
278
+ $input1['headline'] = saswp_get_the_title();
279
+ $input1['keywords'] = saswp_get_the_tags();
280
+ $input1['datePublished'] = esc_html($date);
281
+ $input1['dateModified'] = esc_html($modified_date);
282
+ $input1['dateCreated'] = esc_html($date);
283
+ $input1['author'] = saswp_get_author_details();
284
+
285
+
286
+ $input1 = apply_filters('saswp_modify_faq_schema_output', $input1 );
287
+
288
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
289
+
290
+ if($modified_schema == 1){
291
+
292
+ $input1 = saswp_faq_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
293
+ }
294
+
295
+ break;
296
 
297
+ case 'VideoGame':
298
+
299
+ $input1['@context'] = saswp_context_url();
300
+ $input1['@type'] = 'VideoGame';
301
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#VideoGame';
302
+ $input1['author']['@type'] = 'Organization';
303
+ $input1['offers']['@type'] = 'Offer';
304
+
305
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
306
+
307
+ $input1 = apply_filters('saswp_modify_video_game_schema_output', $input1 );
308
+
309
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
310
+
311
+ if($modified_schema == 1){
312
+
313
+ $input1 = saswp_video_game_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
314
+ }
315
+
316
+ break;
317
 
318
+ case 'MedicalCondition':
319
 
320
+ $input1['@context'] = saswp_context_url();
321
+ $input1['@type'] = 'MedicalCondition';
322
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#MedicalCondition';
323
+ $input1['associatedAnatomy']['@type'] = 'AnatomicalStructure';
324
+ $input1['code']['@type'] = 'MedicalCode';
325
+
326
+ $input1 = apply_filters('saswp_modify_medical_condition_schema_output', $input1 );
327
+
328
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
329
 
330
+ if($modified_schema == 1){
331
+
332
+ $input1 = saswp_medical_condition_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
333
+ }
334
+
335
+ break;
336
+
337
+ case 'TVSeries':
338
+
339
+ $input1['@context'] = saswp_context_url();
340
+ $input1['@type'] = 'TVSeries';
341
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#TVSeries';
342
+ $input1['author']['@type'] = 'Person';
343
+
344
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
345
+
346
+ $input1 = apply_filters('saswp_modify_tvseries_schema_output', $input1 );
347
+
348
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
349
+
350
+ if($modified_schema == 1){
351
+
352
+ $input1 = saswp_tv_series_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
353
+ }
354
+
355
+ break;
356
 
357
+ case 'Movie':
358
 
359
+ $input1['@context'] = saswp_context_url();
360
+ $input1['@type'] = 'Movie';
361
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Movie';
362
+
363
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
364
+
365
+ $input1 = apply_filters('saswp_modify_movie_schema_output', $input1 );
366
+
367
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
368
+
369
+ if($modified_schema == 1){
370
+
371
+ $input1 = saswp_movie_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
372
+ }
373
+
374
+ break;
375
+
376
+ case 'HowTo':
377
 
378
+ $input1['@context'] = saswp_context_url();
379
+ $input1['@type'] = 'HowTo';
380
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#HowTo';
381
+ $input1['estimatedCost']['@type'] = 'MonetaryAmount';
382
+
383
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
384
+
385
+ $input1 = apply_filters('saswp_modify_howto_schema_output', $input1 );
386
+
387
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
388
+
389
+ if($modified_schema == 1){
390
+
391
+ $input1 = saswp_howto_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
392
+ }
393
 
394
+ break;
395
 
396
+ case 'Trip':
397
 
398
+ $input1['@context'] = saswp_context_url();
399
+ $input1['@type'] = 'Trip';
400
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Trip';
401
+
402
+ $input1 = apply_filters('saswp_modify_trip_schema_output', $input1 );
403
+
404
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
405
+
406
+ if($modified_schema == 1){
407
+
408
+ $input1 = saswp_trip_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
409
+ }
410
 
411
+ break;
412
 
413
+ case 'SingleFamilyResidence':
414
 
415
+ $input1['@context'] = saswp_context_url();
416
+ $input1['@type'] = 'SingleFamilyResidence';
417
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#SingleFamilyResidence';
418
+ $input1['address']['@type'] = 'PostalAddress';
419
+
420
+ $input1 = apply_filters('saswp_modify_apartment_schema_sfr', $input1 );
421
+
422
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
423
+
424
+ if($modified_schema == 1){
425
+
426
+ $input1 = saswp_single_family_residence_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
427
+ }
428
 
429
+ break;
430
 
431
+ case 'House':
432
 
433
+ $input1['@context'] = saswp_context_url();
434
+ $input1['@type'] = 'House';
435
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#House';
436
+ $input1['address']['@type'] = 'PostalAddress';
437
+
438
+ $input1 = apply_filters('saswp_modify_apartment_schema_house', $input1 );
439
+
440
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
441
+
442
+ if($modified_schema == 1){
443
+
444
+ $input1 = saswp_house_schema_makrup($schema_post_id, get_the_ID(), $all_post_meta);
445
+ }
446
+
447
+ break;
448
+
449
+ case 'Apartment':
450
 
451
+ $input1['@context'] = saswp_context_url();
452
+ $input1['@type'] = 'Apartment';
453
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Apartment';
454
+ $input1['address']['@type'] = 'PostalAddress';
455
+
456
+ $input1 = apply_filters('saswp_modify_apartment_schema_output', $input1 );
457
+
458
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
459
+
460
+ if($modified_schema == 1){
461
+
462
+ $input1 = saswp_apartment_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
463
+ }
464
 
465
+ break;
466
+
467
+ case 'MusicPlaylist':
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
468
 
469
+ $input1['@context'] = saswp_context_url();
470
+ $input1['@type'] = 'MusicPlaylist';
471
+ $input1['@id'] = trailingslashit(get_permalink()).'#MusicPlaylist';
472
+
473
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
474
+
475
+ $input1 = apply_filters('saswp_modify_music_playlist_schema_output', $input1 );
476
+
477
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
478
 
479
+ if($modified_schema == 1){
480
+
481
+ $input1 = saswp_music_playlist_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
482
+ }
483
+
484
+ break;
485
+
486
+ case 'MusicComposition':
487
+
488
+ $input1['@context'] = saswp_context_url();
489
+ $input1['@type'] = 'MusicComposition';
490
+ $input1['@id'] = trailingslashit(get_permalink()).'#MusicComposition';
491
+ $input1['inLanguage'] = get_bloginfo('language');
492
+ $input1['datePublished'] = esc_html($date);
493
 
494
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
495
+
496
+ $input1 = apply_filters('saswp_modify_music_composition_schema_output', $input1 );
497
+
498
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
499
+
500
+ if($modified_schema == 1){
501
+
502
+ $input1 = saswp_music_composition_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
503
+ }
504
+
505
+ break;
506
+
507
+ case 'Book':
508
 
509
+ $input1['@context'] = saswp_context_url();
510
+ $input1['@type'] = 'Book';
511
+ $input1['@id'] = trailingslashit(get_permalink()).'#Book';
512
+
513
+ $service = new saswp_output_service();
514
+ $woo_markp = $service->saswp_schema_markup_generator($schema_type);
515
+
516
+ if($woo_markp){
517
+ $input1 = array_merge($input1, $woo_markp);
518
+ }
519
+
520
+ unset($input1['brand'], $input1['mpn'], $input1['sku'],$input1['gtin8']);
521
+
522
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
523
+
524
+ $input1 = apply_filters('saswp_modify_music_playlist_schema_output', $input1 );
525
+
526
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
527
+
528
+ if($modified_schema == 1){
529
+
530
+ $input1 = saswp_book_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
531
+ }
532
+
533
+ break;
534
+
535
+ case 'MusicAlbum':
536
+
537
+ $input1['@context'] = saswp_context_url();
538
+ $input1['@type'] = 'MusicAlbum';
539
+ $input1['@id'] = trailingslashit(get_permalink()).'#MusicAlbum';
540
+
541
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
542
+ $input1 = apply_filters('saswp_modify_music_album_schema_output', $input1 );
543
+
544
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
545
+
546
+ if($modified_schema == 1){
547
+
548
+ $input1 = saswp_music_album_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
549
+ }
550
+
551
+ break;
552
+
553
+ case 'TouristDestination':
554
 
555
+ $input1['@context'] = saswp_context_url();
556
+ $input1['@type'] = 'TouristDestination';
557
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#TouristDestination';
558
+ $input1['address']['@type'] = 'PostalAddress';
559
+
560
+ $input1 = apply_filters('saswp_modify_tourist_destination_schema_output', $input1 );
561
+
562
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
563
+
564
+ if($modified_schema == 1){
565
+
566
+ $input1 = saswp_tourist_destination_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
567
+ }
568
+
569
+ break;
570
 
571
+ case 'TouristAttraction':
572
 
573
+ $input1['@context'] = saswp_context_url();
574
+ $input1['@type'] = 'TouristAttraction';
575
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#TouristAttraction';
576
+ $input1['address']['@type'] = 'PostalAddress';
577
+
578
+ $input1 = apply_filters('saswp_modify_tourist_attraction_schema_output', $input1 );
579
+
580
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
581
+
582
+ if($modified_schema == 1){
583
+
584
+ $input1 = saswp_tourist_attraction_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
585
+ }
586
+
587
+ break;
588
 
589
+ case 'LandmarksOrHistoricalBuildings':
590
 
591
+ $input1['@context'] = saswp_context_url();
592
+ $input1['@type'] = 'LandmarksOrHistoricalBuildings';
593
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#LandmarksOrHistoricalBuildings';
594
+ $input1['address']['@type'] = 'PostalAddress';
595
+
596
+ $input1 = apply_filters('saswp_modify_lorh_schema_output', $input1 );
597
+
598
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
599
+
600
+ if($modified_schema == 1){
601
+
602
+ $input1 = saswp_lorh_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
603
+ }
604
+
605
+ break;
 
 
 
 
606
 
607
+ case 'HinduTemple':
608
 
609
+ $input1['@context'] = saswp_context_url();
610
+ $input1['@type'] = 'HinduTemple';
611
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#HinduTemple';
612
+ $input1['address']['@type'] = 'PostalAddress';
613
+
614
+ $input1 = apply_filters('saswp_modify_hindu_temple_schema_output', $input1 );
615
+
616
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
617
+
618
+ if($modified_schema == 1){
619
+
620
+ $input1 = saswp_hindu_temple_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
621
+ }
622
+
623
+ break;
624
 
625
+ case 'Church':
626
 
627
+ $input1['@context'] = saswp_context_url();
628
+ $input1['@type'] = 'Church';
629
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Church';
630
+ $input1['address']['@type'] = 'PostalAddress';
631
+
632
+ $input1 = apply_filters('saswp_modify_church_schema_output', $input1 );
633
+
634
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
635
+
636
+ if($modified_schema == 1){
637
+
638
+ $input1 = saswp_church_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
639
+ }
640
+
641
+ break;
642
 
643
+ case 'Mosque':
644
 
645
+ $input1['@context'] = saswp_context_url();
646
+ $input1['@type'] = 'Mosque';
647
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Mosque';
648
+ $input1['address']['@type'] = 'PostalAddress';
649
+
650
+ $input1 = apply_filters('saswp_modify_mosque_schema_output', $input1 );
651
+
652
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
653
+
654
+ if($modified_schema == 1){
655
+
656
+ $input1 = saswp_mosque_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
657
+ }
658
+
659
+ break;
660
 
661
+ case 'JobPosting':
662
 
663
+ $input1['@context'] = saswp_context_url();
664
+ $input1['@type'] = 'JobPosting';
665
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#JobPosting';
666
+ $input1['hiringOrganization']['@type'] = 'Organization';
667
+ $input1['jobLocation']['@type'] = 'Place';
668
+ $input1['jobLocation']['address']['@type'] = 'PostalAddress';
669
+ $input1['baseSalary']['@type'] = 'MonetaryAmount';
670
+ $input1['baseSalary']['value']['@type'] = 'QuantitativeValue';
671
+
672
+ $input1 = apply_filters('saswp_modify_jobposting_schema_output', $input1 );
673
+
674
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
675
+
676
+ if($modified_schema == 1){
677
+
678
+ $input1 = saswp_job_posting_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
679
+ }
680
+
681
+ break;
682
 
683
+ case 'Person':
684
 
685
+ $input1['@context'] = saswp_context_url();
686
+ $input1['@type'] = 'Person';
687
+ $input1['@id'] = trailingslashit(saswp_get_permalink()).'#Person';
688
+ $input1['address']['@type'] = 'PostalAddress';
689
+
690
+ $input1 = apply_filters('saswp_modify_person_schema_output', $input1 );
691
+
692
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
693
+
694
+ if($modified_schema == 1){
695
+
696
+ $input1 = saswp_person_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
697
+ }
698
 
699
+ break;
700
 
701
+ case 'Course':
702
+
703
+ $description = saswp_get_the_excerpt();
704
 
705
+ if(!$description){
706
+ $description = get_bloginfo('description');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
707
  }
708
+
709
+ $input1 = array(
710
+ '@context' => saswp_context_url(),
711
+ '@type' => $schema_type ,
712
+ '@id' => trailingslashit(saswp_get_permalink()).'#course',
713
+ 'name' => saswp_get_the_title(),
714
+ 'description' => $description,
715
+ 'url' => trailingslashit(saswp_get_permalink()),
716
+ 'datePublished' => esc_html($date),
717
+ 'dateModified' => esc_html($modified_date),
718
+ 'author' => saswp_get_author_details(),
719
+ 'provider' => array(
720
+ '@type' => 'Organization',
721
+ 'name' => get_bloginfo(),
722
+ 'sameAs' => get_home_url()
723
+ )
724
+ );
725
+
726
+ if(!empty($aggregateRating)){
727
+ $input1['aggregateRating'] = $aggregateRating;
728
+ }
729
+ if(!empty($extra_theme_review)){
730
+ $input1 = array_merge($input1, $extra_theme_review);
731
+ }
732
+ if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
733
+ $input1['comment'] = saswp_get_comments(get_the_ID());
734
+ }
735
+
736
+ $input1 = apply_filters('saswp_modify_course_schema_output', $input1 );
737
+
738
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
739
+
740
+ if($modified_schema == 1){
741
+
742
+ $input1 = saswp_course_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
743
+ }
744
+
745
 
746
+ break;
747
+
748
+ case 'DiscussionForumPosting':
 
749
 
750
  if(isset($sd_data['saswp-bbpress']) && $sd_data['saswp-bbpress'] == 1 && is_plugin_active('bbpress/bbpress.php')){
751
 
 
 
 
 
752
  $input1 = array(
753
  '@context' => saswp_context_url(),
754
  '@type' => 'DiscussionForumPosting' ,
759
  "articleSection" => bbp_get_forum_title(),
760
  "articleBody" => saswp_get_the_content(),
761
  'url' => bbp_get_topic_permalink(),
762
+ 'datePublished' => get_post_time( DATE_ATOM, false, get_the_ID(), true ),
763
  'dateModified' => esc_html($modified_date),
764
  'author' => saswp_get_author_details(),
765
  'interactionStatistic' => array(
804
  $input1 = apply_filters('saswp_modify_d_forum_posting_schema_output', $input1 );
805
 
806
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
807
+
808
+ if($modified_schema == 1){
809
+
810
+ $input1 = saswp_dfp_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
811
  }
812
+
 
 
 
 
 
 
 
 
 
813
 
814
+ break;
815
+
816
+ case 'Blogposting':
817
 
818
+ $input1 = array(
819
+ '@context' => saswp_context_url(),
820
+ '@type' => 'BlogPosting' ,
821
+ '@id' => trailingslashit(saswp_get_permalink()).'#blogposting',
822
+ 'url' => trailingslashit(saswp_get_permalink()),
823
+ 'inLanguage' => get_bloginfo('language'),
824
+ 'mainEntityOfPage' => trailingslashit(saswp_get_permalink()),
825
+ 'headline' => saswp_get_the_title(),
826
+ 'description' => saswp_get_the_excerpt(),
827
+ 'articleBody' => saswp_get_the_content(),
828
+ 'keywords' => saswp_get_the_tags(),
829
+ 'name' => saswp_get_the_title(),
830
+ 'datePublished' => esc_html($date),
831
+ 'dateModified' => esc_html($modified_date),
832
+ 'author' => saswp_get_author_details()
833
+ );
834
+
835
+ $mainentity = saswp_get_mainEntity($schema_post_id);
836
+
837
+ if($mainentity){
838
+ $input1['mainEntity'] = $mainentity;
839
+ }
840
+ if(!empty($publisher)){
841
+
842
+ $input1 = array_merge($input1, $publisher);
843
+
844
+ }
845
+
846
+ if(!empty($aggregateRating)){
847
+ $input1['aggregateRating'] = $aggregateRating;
848
+ }
849
+ if(!empty($extra_theme_review)){
850
+ $input1 = array_merge($input1, $extra_theme_review);
851
+ }
852
+ if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] == 1){
853
+ $input1['comment'] = saswp_get_comments(get_the_ID());
854
+ }
855
+
856
+ $input1 = apply_filters('saswp_modify_blogposting_schema_output', $input1 );
857
+
858
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
859
+
860
+ if($modified_schema == 1){
861
+
862
+ $input1 = saswp_blogposting_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
863
+ }
864
+
865
 
866
+ break;
 
867
 
868
+ case 'AudioObject':
869
+
870
+ $input1 = array(
871
+ '@context' => saswp_context_url(),
872
+ '@type' => $schema_type ,
873
+ '@id' => trailingslashit(saswp_get_permalink()).'#audioobject',
874
+ 'datePublished' => esc_html($date),
875
+ 'dateModified' => esc_html($modified_date),
876
+ 'author' => saswp_get_author_details()
877
+ );
878
+ if(!empty($publisher)){
879
+
880
+ $input1 = array_merge($input1, $publisher);
881
+
882
+ }
883
+
884
+ if(!empty($aggregateRating)){
885
+ $input1['aggregateRating'] = $aggregateRating;
886
+ }
887
+ if(!empty($extra_theme_review)){
888
+ $input1 = array_merge($input1, $extra_theme_review);
889
+ }
890
+ if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
891
+ $input1['comment'] = saswp_get_comments(get_the_ID());
892
+ }
893
+
894
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
895
+
896
+
897
+ $input1 = apply_filters('saswp_modify_audio_object_schema_output', $input1 );
898
+
899
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
900
+
901
+ if($modified_schema == 1){
902
+
903
+ $input1 = saswp_audio_object_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
904
+ }
905
+
906
+
907
+ break;
908
+
909
+ case 'Event':
910
+
911
  $event_type = get_post_meta($schema_post_id, 'saswp_event_type', true);
912
 
913
  $input1['@context'] = saswp_context_url();
925
  $input1 = apply_filters('saswp_modify_event_schema_output', $input1 );
926
 
927
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
928
+
929
+ if($modified_schema == 1){
930
+
931
+ $input1 = saswp_event_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
932
+ }
933
 
934
+ break;
935
 
936
+ case 'SoftwareApplication':
937
 
938
  $input1 = array(
939
  '@context' => saswp_context_url(),
971
  $input1 = apply_filters('saswp_modify_software_application_schema_output', $input1 );
972
 
973
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
974
+
975
+ if($modified_schema == 1){
976
+
977
+ $input1 = saswp_software_app_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
978
+ }
979
+
980
+ break;
981
+
982
+ case 'WebPage':
983
 
984
  $service = new saswp_output_service();
985
  $input1 = $service->saswp_schema_markup_generator($schema_type);
997
  $input1 = apply_filters('saswp_modify_webpage_schema_output', $input1 );
998
 
999
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1000
+
1001
+ if($modified_schema == 1){
1002
+
1003
+ $input1 = saswp_webpage_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1004
+ }
1005
+
1006
+ break;
1007
 
1008
+ case 'Article':
1009
+
1010
  $service = new saswp_output_service();
1011
  $input1 = $service->saswp_schema_markup_generator($schema_type);
1012
 
1022
  $input1 = apply_filters('saswp_modify_article_schema_output', $input1 );
1023
 
1024
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1025
+
1026
+ if($modified_schema == 1){
1027
+
1028
+ $input1 = saswp_article_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1029
+ }
1030
+
1031
+ break;
1032
 
1033
+ case 'TechArticle':
1034
 
1035
  $service = new saswp_output_service();
1036
  $input1 = $service->saswp_schema_markup_generator($schema_type);
1051
  $input1 = apply_filters('saswp_modify_tech_article_schema_output', $input1 );
1052
 
1053
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1054
+
1055
+ if($modified_schema == 1){
1056
+
1057
+ $input1 = saswp_tech_article_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1058
+ }
1059
+
1060
+ break;
1061
 
1062
+ case 'Recipe':
1063
+
1064
  if(isset($sd_data['saswp-wp-recipe-maker']) && $sd_data['saswp-wp-recipe-maker'] == 1){
1065
 
1066
  $recipe_ids = saswp_get_ids_from_content_by_type('wp_recipe_maker');
1111
  $input1 = apply_filters('saswp_modify_recipe_schema_output', $input1 );
1112
 
1113
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1114
+
1115
+ if($modified_schema == 1){
1116
+
1117
+ $input1 = saswp_recipe_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1118
+ }
1119
+
1120
+ break;
1121
+
1122
+ case 'qanda':
1123
 
1124
+ if(isset($sd_data['saswp-dw-question-answer']) && $sd_data['saswp-dw-question-answer'] ==1){
 
 
 
 
 
1125
 
1126
+ $service_object = new saswp_output_service();
1127
+ $input1 = $service_object->saswp_dw_question_answers_details(get_the_ID());
1128
+
1129
+ }
1130
+
1131
+ if(isset($sd_data['saswp-bbpress']) && $sd_data['saswp-bbpress'] ==1){
1132
+
1133
+ $service_object = new saswp_output_service();
1134
+ $input1 = $service_object->saswp_bb_press_topic_details(get_the_ID());
1135
+
1136
+ }
1137
+
1138
+ $input1 = apply_filters('saswp_modify_qanda_schema_output', $input1 );
1139
+
1140
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1141
 
1142
+ if($modified_schema == 1){
1143
+
1144
+ $input1 = saswp_qanda_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1145
+ }
1146
+
1147
+ break;
1148
+
1149
+ case 'Product':
1150
+
 
1151
  $service = new saswp_output_service();
1152
  $input1 = $service->saswp_schema_markup_generator($schema_type);
1153
 
1156
  $input1 = apply_filters('saswp_modify_product_schema_output', $input1 );
1157
 
1158
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
 
 
 
 
 
 
 
 
 
 
1159
 
1160
+ if($modified_schema == 1){
1161
+
1162
+ $input1 = saswp_product_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1163
+ }
1164
+
1165
+ break;
1166
+
1167
+ case 'NewsArticle':
1168
+
1169
+ $image_details = wp_get_attachment_image_src($image_id);
1170
+
1171
+ $category_detail = get_the_category(get_the_ID());//$post->ID
1172
+ $article_section = '';
1173
+
1174
+ foreach($category_detail as $cd){
1175
+
1176
+ $article_section = $cd->cat_name;
1177
+
1178
+ }
1179
  $word_count = saswp_reading_time_and_word_count();
1180
  $input1 = array(
1181
  '@context' => saswp_context_url(),
1227
 
1228
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1229
 
1230
+ if($modified_schema == 1){
1231
+
1232
+ $input1 = saswp_news_article_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1233
+ }
1234
+
1235
+ break;
1236
+
1237
+ case 'Service':
1238
 
1239
  $input1['@context'] = saswp_context_url();
1240
  $input1['@type'] = $schema_type;
1253
 
1254
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1255
 
1256
+ if($modified_schema == 1){
1257
+
1258
+ $input1 = saswp_service_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1259
+ }
1260
+
1261
+ break;
1262
+
1263
+ case 'Review':
1264
 
1265
  $service = new saswp_output_service();
1266
  $review_markup = $service->saswp_replace_with_custom_fields_value($input1, $schema_post_id);
1349
  }
1350
 
1351
  $input1 = apply_filters('saswp_modify_service_schema_output', $input1 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1352
 
1353
+ if($modified_schema == 1){
1354
+
1355
+ $input1 = saswp_review_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1356
+ }
1357
+
1358
+ break;
1359
+
1360
+ case 'VideoObject':
1361
+
1362
+ $image_details = wp_get_attachment_image_src($image_id);
1363
+
1364
+ $description = saswp_get_the_excerpt();
1365
+
1366
+ if(!$description){
1367
+ $description = get_bloginfo('description');
1368
+ }
1369
+ $input1 = array(
1370
+ '@context' => saswp_context_url(),
1371
+ '@type' => 'VideoObject',
1372
+ '@id' => trailingslashit(saswp_get_permalink()).'#videoobject',
1373
+ 'url' => trailingslashit(saswp_get_permalink()),
1374
+ 'headline' => saswp_get_the_title(),
1375
+ 'datePublished' => esc_html($date),
1376
+ 'dateModified' => esc_html($modified_date),
1377
+ 'description' => $description,
1378
+ 'name' => saswp_get_the_title(),
1379
+ 'uploadDate' => esc_html($date),
1380
+ 'thumbnailUrl' => isset($image_details[0]) ? esc_url($image_details[0]):'',
1381
+ 'author' => saswp_get_author_details()
1382
+ );
1383
+ if(!empty($publisher)){
1384
+
1385
+ $input1 = array_merge($input1, $publisher);
1386
+
1387
+ }
1388
+ if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1389
+ $input1['comment'] = saswp_get_comments(get_the_ID());
1390
+ }
1391
+ if(!empty($aggregateRating)){
1392
+ $input1['aggregateRating'] = $aggregateRating;
1393
+ }
1394
+ if(!empty($extra_theme_review)){
1395
+ $input1 = array_merge($input1, $extra_theme_review);
1396
+ }
1397
+
1398
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
1399
+ $input1 = apply_filters('saswp_modify_video_object_schema_output', $input1 );
1400
+
1401
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1402
+
1403
+ if($modified_schema == 1){
1404
+
1405
+ $input1 = saswp_video_object_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1406
+ }
1407
+
1408
+ break;
1409
+
1410
+ case 'ImageObject':
1411
+
1412
+ $description = saswp_get_the_excerpt();
1413
+
1414
+ if(!$description){
1415
+ $description = get_bloginfo('description');
1416
+ }
1417
+ $input1 = array(
1418
+ '@context' => saswp_context_url(),
1419
+ '@type' => 'ImageObject',
1420
+ '@id' => trailingslashit(saswp_get_permalink()).'#imageobject',
1421
+ 'url' => trailingslashit(saswp_get_permalink()),
1422
+ 'datePublished' => esc_html($date),
1423
+ 'dateModified' => esc_html($modified_date),
1424
+ 'name' => saswp_get_the_title(),
1425
+ 'description' => $description,
1426
+ 'contentUrl' => trailingslashit(saswp_get_permalink()),
1427
+ 'uploadDate' => esc_html($date),
1428
+ 'author' => saswp_get_author_details()
1429
+ );
1430
+ if(!empty($publisher)){
1431
+
1432
+ $input1 = array_merge($input1, $publisher);
1433
+
1434
+ }
1435
+ if(isset($sd_data['saswp_comments_schema']) && $sd_data['saswp_comments_schema'] ==1){
1436
+ $input1['comment'] = saswp_get_comments(get_the_ID());
1437
+ }
1438
+ if(!empty($aggregateRating)){
1439
+ $input1['aggregateRating'] = $aggregateRating;
1440
+ }
1441
+ if(!empty($extra_theme_review)){
1442
+ $input1 = array_merge($input1, $extra_theme_review);
1443
+ }
1444
+
1445
+ $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
1446
+ $input1 = apply_filters('saswp_modify_image_object_schema_output', $input1 );
1447
+
1448
+ $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1449
+
1450
+ if($modified_schema == 1){
1451
+
1452
+ $input1 = saswp_image_object_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1453
+ }
1454
+
1455
+ break;
1456
+
1457
+ case 'local_business':
1458
+
1459
  $business_type = get_post_meta($schema_post_id, 'saswp_business_type', true);
1460
  $business_name = get_post_meta($schema_post_id, 'saswp_business_name', true);
1461
 
1490
  $input1 = apply_filters('saswp_modify_local_business_schema_output', $input1 );
1491
 
1492
  $input1 = saswp_get_modified_markup($input1, $schema_type, $schema_post_id, $schema_options);
1493
+
1494
+ if($modified_schema == 1){
1495
+
1496
+ $input1 = saswp_local_business_schema_markup($schema_post_id, get_the_ID(), $all_post_meta);
1497
+ }
1498
+
1499
+ break;
1500
+
1501
+ default:
1502
+ break;
1503
+
1504
+ }
1505
+
1506
  //Speakable schema
1507
 
1508
  if($schema_type == 'TechArticle' || $schema_type == 'Article' || $schema_type == 'Blogposting' || $schema_type == 'NewsArticle' || $schema_type == 'WebPage'){
1518
  );
1519
 
1520
  }
1521
+
 
1522
  }
1523
 
1524
  global $without_aggregate;
1642
  }
1643
  }
1644
 
1645
+ if(isset($schema_options['notAccessibleForFree']) && $schema_options['notAccessibleForFree'] == 1){
1646
 
1647
  add_filter( 'amp_post_template_data', 'saswp_structure_data_access_scripts');
1648
 
1673
 
1674
  if(!empty($input1)){
1675
  $all_schema_output[] = $input1;
1676
+ }
1677
+
1678
  }
1679
 
1680
  if($recipe_json){
1681
  foreach($recipe_json as $json){
1682
  array_push($all_schema_output, $json);
1683
  }
1684
+ }
 
1685
  return apply_filters('saswp_modify_schema_output', $all_schema_output);
1686
  }
1687
  /**
2228
  }
2229
 
2230
  return apply_filters('saswp_modify_sitenavigation_output', $input);
2231
+ }
2232
+
2233
+ function saswp_fetched_reviews_json_ld(){
2234
+
2235
+ global $sd_data;
2236
+ $input1 = array();
2237
+
2238
+ if(!(is_home() || is_front_page() || ( function_exists('ampforwp_is_home') && ampforwp_is_home())) || (isset($sd_data['saswp_kb_type']) && $sd_data['saswp_kb_type'] == 'Person') ){
2239
+
2240
+ $json_ld = saswp_fetched_reviews_schema_markup();
2241
+
2242
+ if($json_ld){
2243
+
2244
+ $input1['@context'] = saswp_context_url();
2245
+ $input1['@type'] = (isset($sd_data['saswp_organization_type']) && $sd_data['saswp_organization_type'] !='' && (isset($sd_data['saswp_kb_type']) && $sd_data['saswp_kb_type'] == 'Organization' ) )? $sd_data['saswp_organization_type'] : 'Organization';
2246
+ $input1['name'] = (isset($sd_data['sd_name']) && $sd_data['sd_name'] !='' )? $sd_data['sd_name'] : get_bloginfo();
2247
+
2248
+ $input1 = array_merge($input1, $json_ld);
2249
+
2250
+ }
2251
+
2252
+ }
2253
+
2254
+ return $input1;
2255
+
2256
+ }
2257
+
2258
+ function saswp_fetched_reviews_schema_markup(){
2259
+
2260
+ global $saswp_post_reviews, $with_aggregate;
2261
+
2262
+ $input1 = array();
2263
+
2264
+ if($saswp_post_reviews){
2265
+
2266
+ $added_type = array();
2267
+
2268
+ $all_schema = saswp_get_all_schema_posts();
2269
+
2270
+ if(is_array($all_schema)){
2271
+ $added_type = array_column($all_schema, 'schema_type');
2272
+ }
2273
+
2274
+ $status = false;
2275
+
2276
+ foreach($with_aggregate as $value){
2277
+
2278
+ if(in_array($value, $added_type)){
2279
+
2280
+ $status = true;
2281
+ break;
2282
+
2283
+ }
2284
+
2285
+ }
2286
+
2287
+ if(!$status){
2288
+ $input1 = saswp_get_reviews_schema_markup(array_unique($saswp_post_reviews, SORT_REGULAR));
2289
+ }
2290
+
2291
+ }
2292
+
2293
+ return $input1;
2294
+ }
output/service.php CHANGED
@@ -312,7 +312,7 @@ Class saswp_output_service{
312
  if(function_exists('get_field_object')){
313
 
314
  $acf_obj = get_field_object($field);
315
-
316
  if($acf_obj){
317
 
318
  if($acf_obj['type'] == 'image'){
@@ -320,6 +320,16 @@ Class saswp_output_service{
320
  $image_id = get_post_meta($post->ID, $field, true );
321
  $response = saswp_get_image_by_id($image_id);
322
 
 
 
 
 
 
 
 
 
 
 
323
  }else{
324
  $response = get_post_meta($post->ID, $field, true );
325
  }
@@ -1237,11 +1247,21 @@ Class saswp_output_service{
1237
  $input1['nutrition']['calories'] = $custom_fields['saswp_recipe_nutrition'];
1238
  }
1239
 
1240
- if(isset($custom_fields['saswp_recipe_ingredient'])){
1241
- $input1['recipeIngredient'] = saswp_explod_by_semicolon($custom_fields['saswp_recipe_ingredient']);
1242
- }
1243
- if(isset($custom_fields['saswp_recipe_instructions'])){
1244
- $input1['recipeInstructions'] = saswp_explod_by_semicolon($custom_fields['saswp_recipe_instructions']);
 
 
 
 
 
 
 
 
 
 
1245
  }
1246
  if(isset($custom_fields['saswp_recipe_video_name'])){
1247
  $input1['video']['name'] = $custom_fields['saswp_recipe_video_name'];
@@ -3022,12 +3042,16 @@ Class saswp_output_service{
3022
  $image_id = get_post_thumbnail_id();
3023
  $image_details = wp_get_attachment_image_src($image_id, 'full');
3024
 
3025
- if( is_array($image_details) ){
3026
 
3027
  if(isset($image_details[1]) && ($image_details[1] < 1200) && function_exists('saswp_aq_resize')){
3028
-
3029
- $img_ratio = $image_details[1] / $image_details[2];
3030
- $targetHeight = 1200 / $img_ratio;
 
 
 
 
3031
 
3032
  $width = array(1200, 1200, 1200);
3033
  $height = array($targetHeight, 900, 675);
@@ -3119,7 +3143,7 @@ Class saswp_output_service{
3119
 
3120
  foreach ($attachments[2] as $attachment) {
3121
 
3122
- if(!empty($attach_details)){
3123
 
3124
  $attach_images['image'][$k]['@type'] = 'ImageObject';
3125
  $attach_images['image'][$k]['url'] = esc_url($attachment);
@@ -3155,9 +3179,15 @@ Class saswp_output_service{
3155
  if($image['width'] < 1200){
3156
 
3157
  $resized_image = saswp_aq_resize( $image['url'], 1200, 675, true, false, true );
3158
- $attach_images['image'][$key]['url'] = $resized_image[0];
3159
- $attach_images['image'][$key]['width'] = $resized_image[1];
3160
- $attach_images['image'][$key]['height'] = $resized_image[2];
 
 
 
 
 
 
3161
  }
3162
  $attach_images['image'][$key]['@id'] = saswp_get_permalink().'#primaryimage';
3163
  }
312
  if(function_exists('get_field_object')){
313
 
314
  $acf_obj = get_field_object($field);
315
+
316
  if($acf_obj){
317
 
318
  if($acf_obj['type'] == 'image'){
320
  $image_id = get_post_meta($post->ID, $field, true );
321
  $response = saswp_get_image_by_id($image_id);
322
 
323
+ }else if($acf_obj['type'] == 'repeater'){
324
+
325
+ if(isset($acf_obj['value'])){
326
+ foreach($acf_obj['value'] as $value){
327
+ foreach ($value as $val){
328
+ $response[] = $val;
329
+ }
330
+ }
331
+ }
332
+
333
  }else{
334
  $response = get_post_meta($post->ID, $field, true );
335
  }
1247
  $input1['nutrition']['calories'] = $custom_fields['saswp_recipe_nutrition'];
1248
  }
1249
 
1250
+ if(isset($custom_fields['saswp_recipe_ingredient'])){
1251
+
1252
+ if(is_array($custom_fields['saswp_recipe_ingredient'])){
1253
+ $input1['recipeIngredient'] = $custom_fields['saswp_recipe_ingredient'];
1254
+ }else{
1255
+ $input1['recipeIngredient'] = saswp_explod_by_semicolon($custom_fields['saswp_recipe_ingredient']);
1256
+ }
1257
+
1258
+ }
1259
+ if(isset($custom_fields['saswp_recipe_instructions'])){
1260
+ if(is_array($custom_fields['saswp_recipe_instructions'])){
1261
+ $input1['recipeInstructions'] = $custom_fields['saswp_recipe_instructions'];
1262
+ }else{
1263
+ $input1['recipeInstructions'] = saswp_explod_by_semicolon($custom_fields['saswp_recipe_instructions']);
1264
+ }
1265
  }
1266
  if(isset($custom_fields['saswp_recipe_video_name'])){
1267
  $input1['video']['name'] = $custom_fields['saswp_recipe_video_name'];
3042
  $image_id = get_post_thumbnail_id();
3043
  $image_details = wp_get_attachment_image_src($image_id, 'full');
3044
 
3045
+ if( is_array($image_details) && !empty($image_details)){
3046
 
3047
  if(isset($image_details[1]) && ($image_details[1] < 1200) && function_exists('saswp_aq_resize')){
3048
+
3049
+ $targetHeight = 1200;
3050
+
3051
+ if( ($image_details[1] > 0) && ($image_details[2] > 0) ){
3052
+ $img_ratio = $image_details[1] / $image_details[2];
3053
+ $targetHeight = 1200 / $img_ratio;
3054
+ }
3055
 
3056
  $width = array(1200, 1200, 1200);
3057
  $height = array($targetHeight, 900, 675);
3143
 
3144
  foreach ($attachments[2] as $attachment) {
3145
 
3146
+ if(is_array($attach_details) && !empty($attach_details)){
3147
 
3148
  $attach_images['image'][$k]['@type'] = 'ImageObject';
3149
  $attach_images['image'][$k]['url'] = esc_url($attachment);
3179
  if($image['width'] < 1200){
3180
 
3181
  $resized_image = saswp_aq_resize( $image['url'], 1200, 675, true, false, true );
3182
+
3183
+ if(is_array($resized_image) && !empty($resized_image)){
3184
+
3185
+ $attach_images['image'][$key]['url'] = $resized_image[0];
3186
+ $attach_images['image'][$key]['width'] = $resized_image[1];
3187
+ $attach_images['image'][$key]['height'] = $resized_image[2];
3188
+
3189
+ }
3190
+
3191
  }
3192
  $attach_images['image'][$key]['@id'] = saswp_get_permalink().'#primaryimage';
3193
  }
output/single.php DELETED
@@ -1,620 +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
- if( 'Person' === $schema_type){
104
-
105
- $input1 = saswp_person_schema_markup($schema_id, $schema_post_id, $all_post_meta);
106
-
107
- }
108
-
109
- if( 'Trip' === $schema_type){
110
-
111
- $input1 = saswp_trip_schema_markup($schema_id, $schema_post_id, $all_post_meta);
112
-
113
- }
114
-
115
- if( 'FAQ' === $schema_type){
116
-
117
- $input1 = saswp_faq_schema_markup($schema_id, $schema_post_id, $all_post_meta);
118
-
119
- }
120
-
121
- if( 'MusicPlaylist' === $schema_type){
122
-
123
- $input1 = saswp_music_playlist_schema_markup($schema_id, $schema_post_id, $all_post_meta);
124
-
125
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
126
-
127
- }
128
- if( 'MusicComposition' === $schema_type){
129
-
130
- $input1 = saswp_music_composition_schema_markup($schema_id, $schema_post_id, $all_post_meta);
131
-
132
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
133
-
134
- }
135
-
136
- if( 'MusicAlbum' === $schema_type){
137
-
138
- $input1 = saswp_music_album_schema_markup($schema_id, $schema_post_id, $all_post_meta);
139
-
140
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
141
-
142
- }
143
-
144
- if( 'JobPosting' === $schema_type){
145
-
146
- $input1 = saswp_job_posting_schema_markup($schema_id, $schema_post_id, $all_post_meta);
147
-
148
- }
149
-
150
- if( 'Mosque' === $schema_type){
151
-
152
- $input1 = saswp_mosque_schema_markup($schema_id, $schema_post_id, $all_post_meta);
153
-
154
- }
155
-
156
- if( 'Church' === $schema_type){
157
-
158
- $input1 = saswp_church_schema_markup($schema_id, $schema_post_id, $all_post_meta);
159
-
160
- }
161
-
162
- if( 'HinduTemple' === $schema_type){
163
-
164
- $input1 = saswp_hindu_temple_schema_markup($schema_id, $schema_post_id, $all_post_meta);
165
-
166
- }
167
-
168
- if( 'LandmarksOrHistoricalBuildings' === $schema_type){
169
-
170
- $input1 = saswp_lorh_schema_markup($schema_id, $schema_post_id, $all_post_meta);
171
-
172
- }
173
-
174
- if( 'Book' === $schema_type){
175
-
176
- $input1 = saswp_book_schema_markup($schema_id, $schema_post_id, $all_post_meta);
177
-
178
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
179
-
180
- }
181
-
182
- if( 'TouristAttraction' === $schema_type){
183
-
184
- $input1 = saswp_tourist_attraction_schema_markup($schema_id, $schema_post_id, $all_post_meta);
185
-
186
- }
187
-
188
- if( 'TouristDestination' === $schema_type){
189
-
190
- $input1 = saswp_tourist_destination_schema_markup($schema_id, $schema_post_id, $all_post_meta);
191
-
192
- }
193
-
194
- if( 'Apartment' === $schema_type){
195
-
196
- $input1 = saswp_apartment_schema_markup($schema_id, $schema_post_id, $all_post_meta);
197
-
198
- }
199
-
200
- if( 'House' === $schema_type){
201
-
202
- $input1 = saswp_house_schema_makrup($schema_id, $schema_post_id, $all_post_meta);
203
-
204
- }
205
-
206
- if( 'SingleFamilyResidence' === $schema_type){
207
-
208
- $input1 = saswp_single_family_residence_schema_markup($schema_id, $schema_post_id, $all_post_meta);
209
-
210
- }
211
-
212
- if( 'Movie' === $schema_type){
213
-
214
- $input1 = saswp_movie_schema_markup($schema_id, $schema_post_id, $all_post_meta);
215
-
216
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
217
-
218
- }
219
-
220
- if( 'HowTo' === $schema_type){
221
-
222
- $input1 = saswp_howto_schema_markup($schema_id, $schema_post_id, $all_post_meta);
223
-
224
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
225
-
226
- }
227
-
228
- if( 'TVSeries' === $schema_type){
229
-
230
- $input1 = saswp_tv_series_schema_markup($schema_id, $schema_post_id, $all_post_meta);
231
-
232
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
233
-
234
- }
235
-
236
- if( 'MedicalCondition' === $schema_type){
237
-
238
- $input1 = saswp_medical_condition_schema_markup($schema_id, $schema_post_id, $all_post_meta);
239
-
240
- }
241
-
242
- if( 'VideoGame' === $schema_type){
243
-
244
- $input1 = saswp_video_game_schema_markup($schema_id, $schema_post_id, $all_post_meta);
245
-
246
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
247
-
248
- }
249
-
250
- if( 'qanda' === $schema_type){
251
-
252
- $input1 = saswp_qanda_schema_markup($schema_id, $schema_post_id, $all_post_meta);
253
- }
254
-
255
- if( 'DataFeed' === $schema_type){
256
-
257
- $input1 = saswp_data_feed_schema_markup($schema_id, $schema_post_id, $all_post_meta);
258
-
259
- }
260
-
261
- if( 'Event' === $schema_type){
262
-
263
- $input1 = saswp_event_schema_markup($schema_id, $schema_post_id, $all_post_meta);
264
-
265
- if(!empty($aggregateRating)){
266
- $input1['aggregateRating'] = $aggregateRating;
267
- }
268
- if(!empty($extra_theme_review)){
269
- $input1 = array_merge($input1, $extra_theme_review);
270
- }
271
-
272
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
273
-
274
- }
275
-
276
- if( 'DiscussionForumPosting' === $schema_type){
277
-
278
- $input1 = saswp_dfp_schema_markup($schema_id, $schema_post_id, $all_post_meta);
279
- }
280
-
281
- if( 'Course' === $schema_type){
282
-
283
- $input1 = saswp_course_schema_markup($schema_id, $schema_post_id, $all_post_meta);
284
-
285
- if(!empty($aggregateRating)){
286
-
287
- $input1['aggregateRating'] = $aggregateRating;
288
-
289
- }
290
- if(!empty($extra_theme_review)){
291
-
292
- $input1 = array_merge($input1, $extra_theme_review);
293
-
294
- }
295
-
296
- }
297
-
298
- if( 'Blogposting' === $schema_type){
299
-
300
- $input1 = saswp_blogposting_schema_markup($schema_id, $schema_post_id, $all_post_meta);
301
-
302
- if(!empty($aggregateRating)){
303
- $input1['aggregateRating'] = $aggregateRating;
304
- }
305
- if(!empty($extra_theme_review)){
306
- $input1 = array_merge($input1, $extra_theme_review);
307
- }
308
- }
309
-
310
- if( 'AudioObject' === $schema_type){
311
-
312
- $input1 = saswp_audio_object_schema_markup($schema_id, $schema_post_id, $all_post_meta);
313
-
314
- if(!empty($aggregateRating)){
315
- $input1['aggregateRating'] = $aggregateRating;
316
- }
317
- if(!empty($extra_theme_review)){
318
- $input1 = array_merge($input1, $extra_theme_review);
319
- }
320
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
321
- }
322
-
323
- if( 'SoftwareApplication' === $schema_type){
324
-
325
- $input1 = saswp_software_app_schema_markup($schema_id, $schema_post_id, $all_post_meta);
326
-
327
- if(!empty($aggregateRating)){
328
- $input1['aggregateRating'] = $aggregateRating;
329
- }
330
- if(!empty($extra_theme_review)){
331
- $input1 = array_merge($input1, $extra_theme_review);
332
- }
333
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
334
- }
335
-
336
- if( 'WebPage' === $schema_type){
337
-
338
- $input1 = saswp_webpage_schema_markup($schema_id, $schema_post_id, $all_post_meta);
339
-
340
- if(!empty($aggregateRating)){
341
-
342
- $input1['mainEntity']['aggregateRating'] = $aggregateRating;
343
-
344
- }
345
-
346
- if(!empty($extra_theme_review)){
347
-
348
- $input1 = array_merge($input1, $extra_theme_review);
349
-
350
- }
351
- }
352
-
353
- if( 'Article' === $schema_type ){
354
-
355
- $input1 = saswp_article_schema_markup($schema_id, $schema_post_id, $all_post_meta);
356
-
357
- if(saswp_remove_warnings($all_post_meta, 'saswp_article_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_article_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_article_review_count_'.$schema_id, 'saswp_array')){
358
-
359
- $input1['aggregateRating'] = array(
360
- "@type" => "AggregateRating",
361
- "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_article_rating_'.$schema_id, 'saswp_array'),
362
- "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_article_review_count_'.$schema_id, 'saswp_array')
363
- );
364
- }
365
-
366
- if(!empty($extra_theme_review)){
367
-
368
- $input1 = array_merge($input1, $extra_theme_review);
369
-
370
- }
371
- }
372
-
373
- if( 'TechArticle' === $schema_type ){
374
-
375
- $input1 = saswp_tech_article_schema_markup($schema_id, $schema_post_id, $all_post_meta);
376
-
377
- if(saswp_remove_warnings($all_post_meta, 'saswp_tech_article_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_tech_article_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_tech_article_review_count_'.$schema_id, 'saswp_array')){
378
-
379
- $input1['aggregateRating'] = array(
380
- "@type" => "AggregateRating",
381
- "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_rating_'.$schema_id, 'saswp_array'),
382
- "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_tech_article_review_count_'.$schema_id, 'saswp_array')
383
- );
384
- }
385
-
386
-
387
- if(!empty($extra_theme_review)){
388
-
389
- $input1 = array_merge($input1, $extra_theme_review);
390
-
391
- }
392
- }
393
-
394
- if( 'Recipe' === $schema_type){
395
-
396
- $input1 = saswp_recipe_schema_markup($schema_id, $schema_post_id, $all_post_meta);
397
-
398
- if(!empty($aggregateRating)){
399
- $input1['aggregateRating'] = $aggregateRating;
400
- }
401
- if(!empty($extra_theme_review)){
402
- $input1 = array_merge($input1, $extra_theme_review);
403
- }
404
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
405
- }
406
-
407
- if( 'Product' === $schema_type){
408
-
409
- $input1 = saswp_product_schema_markup($schema_id, $schema_post_id, $all_post_meta);
410
-
411
- if(!empty($aggregateRating)){
412
- $input1['aggregateRating'] = $aggregateRating;
413
- }
414
- if(!empty($extra_theme_review)){
415
- $input1 = array_merge($input1, $extra_theme_review);
416
- }
417
-
418
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
419
- }
420
-
421
- if( 'NewsArticle' === $schema_type ){
422
-
423
- $input1 = saswp_news_article_schema_markup($schema_id, $schema_post_id, $all_post_meta);
424
-
425
- if(saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_enable_rating_'.$schema_id, 'saswp_array') == 1 && saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_rating_'.$schema_id, 'saswp_array') && saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_review_count_'.$schema_id, 'saswp_array')){
426
-
427
- $input1['aggregateRating'] = array(
428
- "@type" => "AggregateRating",
429
- "ratingValue" => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_rating_'.$schema_id, 'saswp_array'),
430
- "reviewCount" => saswp_remove_warnings($all_post_meta, 'saswp_newsarticle_review_count_'.$schema_id, 'saswp_array')
431
- );
432
- }
433
-
434
- if(!empty($aggregateRating)){
435
- $input1['aggregateRating'] = $aggregateRating;
436
- }
437
- }
438
-
439
- if( 'VideoObject' === $schema_type){
440
-
441
- $input1 = saswp_video_object_schema_markup($schema_id, $schema_post_id, $all_post_meta);
442
-
443
- if(!empty($aggregateRating)){
444
- $input1['aggregateRating'] = $aggregateRating;
445
- }
446
- if(!empty($extra_theme_review)){
447
- $input1 = array_merge($input1, $extra_theme_review);
448
- }
449
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
450
- }
451
-
452
- if( 'ImageObject' === $schema_type){
453
-
454
- $input1 = saswp_image_object_schema_markup($schema_id, $schema_post_id, $all_post_meta);
455
-
456
- if(!empty($aggregateRating)){
457
- $input1['aggregateRating'] = $aggregateRating;
458
- }
459
- if(!empty($extra_theme_review)){
460
- $input1 = array_merge($input1, $extra_theme_review);
461
- }
462
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
463
-
464
- }
465
-
466
- if( 'Service' === $schema_type ){
467
-
468
- $input1 = saswp_service_schema_markup($schema_id, $schema_post_id, $all_post_meta);
469
-
470
- }
471
-
472
- if( 'Review' === $schema_type ){
473
-
474
- $input1 = saswp_review_schema_markup($schema_id, $schema_post_id, $all_post_meta);
475
-
476
- }
477
-
478
- if( 'local_business' === $schema_type){
479
-
480
- $input1 = saswp_local_business_schema_markup($schema_id, $schema_post_id, $all_post_meta);
481
-
482
- if(!empty($aggregateRating)){
483
- $input1['aggregateRating'] = $aggregateRating;
484
- }
485
- if(!empty($extra_theme_review)){
486
- $input1 = array_merge($input1, $extra_theme_review);
487
- }
488
-
489
- $input1 = saswp_append_fetched_reviews($input1, $schema_post_id);
490
- }
491
-
492
- global $without_aggregate;
493
-
494
- if(!in_array($schema_type, $without_aggregate)){
495
-
496
- if($schema_type == 'Review'){
497
-
498
- //kk star rating
499
-
500
- $kkstar_aggregateRating = saswp_extract_kk_star_ratings();
501
-
502
- if(!empty($kkstar_aggregateRating)){
503
- $input1['itemReviewed']['aggregateRating'] = $kkstar_aggregateRating;
504
- }
505
-
506
- //wp post-rating star rating
507
-
508
- $wp_post_rating_ar = saswp_extract_wp_post_ratings();
509
-
510
- if(!empty($wp_post_rating_ar)){
511
- $input1['itemReviewed']['aggregateRating'] = $wp_post_rating_ar;
512
- }
513
-
514
- }else{
515
-
516
- //kk star rating
517
-
518
- $kkstar_aggregateRating = saswp_extract_kk_star_ratings();
519
-
520
- if(!empty($kkstar_aggregateRating)){
521
- $input1['aggregateRating'] = $kkstar_aggregateRating;
522
- }
523
-
524
- //wp post-rating star rating
525
-
526
- $wp_post_rating_ar = saswp_extract_wp_post_ratings();
527
-
528
- if(!empty($wp_post_rating_ar)){
529
- $input1['aggregateRating'] = $wp_post_rating_ar;
530
- }
531
-
532
- }
533
-
534
- //BNE Testomonials
535
- $bne_testomonials = saswp_get_bne_testomonials();
536
-
537
- if($bne_testomonials){
538
-
539
- $input1 = array_merge($input1,$bne_testomonials['rating']);
540
-
541
- if(isset($input1['review'])){
542
- $input1 = array_merge($input1['review'],$bne_testomonials['reviews']);
543
- }else{
544
- $input1['review'] = $bne_testomonials['reviews'];
545
- }
546
-
547
- }
548
-
549
- //Easy Testomonials
550
- $testomonials = saswp_get_easy_testomonials();
551
-
552
- if($testomonials){
553
-
554
- $input1 = array_merge($input1,$testomonials['rating']);
555
-
556
- if(isset($input1['review'])){
557
- $input1 = array_merge($input1['review'],$testomonials['reviews']);
558
- }else{
559
- $input1['review'] = $testomonials['reviews'];
560
- }
561
-
562
- }
563
-
564
- // Testomonial Pro
565
- $testomonial_pro = saswp_get_testomonial_pro();
566
-
567
- if($testomonial_pro){
568
-
569
- $input1 = array_merge($input1,$testomonial_pro['rating']);
570
-
571
- if(isset($input1['review'])){
572
- $input1 = array_merge($input1['review'],$testomonial_pro['reviews']);
573
- }else{
574
- $input1['review'] = $testomonial_pro['reviews'];
575
- }
576
-
577
- }
578
-
579
- // Testomonial Pro
580
- $strong_testimonials = saswp_get_strong_testimonials();
581
-
582
- if($strong_testimonials){
583
-
584
- $input1 = array_merge($input1,$strong_testimonials['rating']);
585
-
586
- if(isset($input1['review'])){
587
- $input1 = array_merge($input1['review'],$strong_testimonials['reviews']);
588
- }else{
589
- $input1['review'] = $strong_testimonials['reviews'];
590
- }
591
-
592
- }
593
-
594
- }
595
-
596
- if( !empty($input1) && !isset($input1['image'])){
597
-
598
- $service_object = new saswp_output_service();
599
- $input2 = $service_object->saswp_get_fetaure_image();
600
-
601
- if(!empty($input2)){
602
-
603
- $input1 = array_merge($input1,$input2);
604
-
605
- }
606
- }
607
-
608
- $input1 = apply_filters('saswp_modify_woocommerce_membership_schema', $input1);
609
-
610
- if(!empty($input1)){
611
-
612
- $all_schema_output[] = $input1;
613
-
614
- }
615
- }
616
- }
617
- }
618
-
619
- return apply_filters('saswp_modify_schema_output', $all_schema_output);
620
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: magazine3
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.3
6
- Stable tag: 1.9.21
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -118,6 +118,30 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
118
 
119
  == Changelog ==
120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  = 1.9.21 (06 Jan 2020) =
122
 
123
  * Added: Schema Blocks (Event, Job, Course, Review/Collection ) #436
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.3
6
+ Stable tag: 1.9.22
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
118
 
119
  == Changelog ==
120
 
121
+
122
+ = 1.9.22 (17 Jan 2020) =
123
+
124
+ * Added: Pagination option in review collection
125
+ * Added: Show review form on button click #713
126
+ * Added: Compatibility of WP News Schema #709
127
+ * Added: Collection to Attach reviews to this schema type section, #718
128
+ * Added: ItemList schema type in main schema type dropdown #709
129
+ * Added: Review, collection and accept review tab in review and collection post type menu #719
130
+ * Fixed: Change the term "Taxonomy Terms" to "Taxonomy(Tag)" #697
131
+ * Fixed: ACF compatibility does not work with ACF repeater fields #708
132
+ * Fixed: ACF compatibility does not work with ACF repeater fields #708
133
+ * Fixed: Role based access does not work properly with default role Administrator(Default)
134
+ * Fixed: If review collection shortcode is in footer then markup is not loading. #699
135
+ * Fixed: If review collection shortcode is in footer then markup is not loading. #699
136
+ * Fixed: Organization schema appears twice when reviews exists #714
137
+ * Fixed: Data tracking "Lear more" option redirecting to wrong tutorial. #727
138
+ * Fixed: If price is not present in schema then offer should not show in schema markup. #723
139
+ * Fixed: bbPress Compatiblity issue #724
140
+ * Fixed: Division by zero #731
141
+ * Fixed: Knowledge Graph Settings: Organization Type is optional but produce errors In Schema #720
142
+ * Fixed: Notice & Warning fixes.
143
+
144
+
145
  = 1.9.21 (06 Jan 2020) =
146
 
147
  * Added: Schema Blocks (Event, Job, Course, Review/Collection ) #436
structured-data-for-wp.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Schema & Structured Data for WP & AMP
4
  Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
5
- Version: 1.9.21
6
  Text Domain: schema-and-structured-data-for-wp
7
  Domain Path: /languages
8
  Author: Magazine3
@@ -13,7 +13,7 @@ License: GPL2
13
  // Exit if accessed directly.
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
- define('SASWP_VERSION', '1.9.21');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
@@ -34,7 +34,6 @@ require_once SASWP_DIR_NAME .'/output/function.php';
34
  require_once SASWP_DIR_NAME .'/output/output.php';
35
  require_once SASWP_DIR_NAME .'/output/markup.php';
36
  require_once SASWP_DIR_NAME .'/output/gutenberg.php';
37
- require_once SASWP_DIR_NAME .'/output/single.php';
38
 
39
  if ( ! function_exists( 'is_plugin_active' ) )
40
  require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
2
  /*
3
  Plugin Name: Schema & Structured Data for WP & AMP
4
  Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
5
+ Version: 1.9.22
6
  Text Domain: schema-and-structured-data-for-wp
7
  Domain Path: /languages
8
  Author: Magazine3
13
  // Exit if accessed directly.
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
+ define('SASWP_VERSION', '1.9.22');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
34
  require_once SASWP_DIR_NAME .'/output/output.php';
35
  require_once SASWP_DIR_NAME .'/output/markup.php';
36
  require_once SASWP_DIR_NAME .'/output/gutenberg.php';
 
37
 
38
  if ( ! function_exists( 'is_plugin_active' ) )
39
  require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
view/common.php CHANGED
@@ -15,10 +15,19 @@ class saswp_view_common_class {
15
 
16
  public $_meta_name = array();
17
  public $schema_type_element = array();
 
 
 
 
 
 
 
 
18
 
19
  public function __construct() {
20
-
21
  $mapping_repeater = SASWP_DIR_NAME . '/core/array-list/repeater-fields.php';
 
22
 
23
  if ( file_exists( $mapping_repeater ) ) {
24
 
@@ -27,14 +36,35 @@ class saswp_view_common_class {
27
  $this->schema_type_element = $repeater_fields['schema_type_element'];
28
  $this->_meta_name = $repeater_fields['meta_name'];
29
 
30
- }
 
 
 
 
31
 
32
  }
33
 
34
  public function saswp_get_dynamic_html($schema_id, $meta_name, $index, $data){
35
-
36
- $meta_fields = $this->_meta_name[$meta_name];
37
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  $output = '';
39
  foreach ( $meta_fields as $meta_field ) {
40
 
@@ -100,19 +130,28 @@ class saswp_view_common_class {
100
  );
101
  }
102
  $input .= '</select>';
103
- break;
 
 
 
 
 
 
 
 
 
 
104
 
105
  default:
106
 
107
  $class = '';
108
-
109
- if ((strpos($meta_field['name'].'_'.$index.'_'.$schema_id, 'published_date') !== false) || (strpos($meta_field['name'].'_'.$index.'_'.$schema_id, 'date_created') !== false) || (strpos($meta_field['name'].'_'.$index.'_'.$schema_id, 'created_date') !== false)){
110
-
111
- $class = 'class="saswp-datepicker-picker"';
112
  }
113
 
114
  $input = sprintf(
115
- '<input %s style="width:100%%" id="%s" name="%s" type="%s" value="%s">',
116
  $class,
117
  esc_attr($meta_field['name']).'_'.esc_attr($index).'_'.esc_attr($schema_id),
118
  esc_attr($meta_name).'_'.esc_attr($schema_id).'['.esc_attr($index).']['.esc_attr($meta_field['name']).']',
@@ -132,7 +171,7 @@ class saswp_view_common_class {
132
 
133
  }
134
 
135
- public function saswp_schema_fields_html_on_the_fly($schema_type, $schema_id, $post_id){
136
 
137
  $howto_data = array();
138
  $tabs_fields = '';
@@ -142,25 +181,41 @@ class saswp_view_common_class {
142
  $type_fields = array_key_exists($schema_type, $schema_type_fields) ? $schema_type_fields[$schema_type]:'';
143
 
144
  if($type_fields){
 
 
145
 
146
- $tabs_fields .= '<div class="saswp-table-create-onajax">';
147
 
148
- foreach($type_fields as $key => $value){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
 
150
- $howto_data[$value.'_'.$schema_id] = get_post_meta($post_id, $value.'_'.$schema_id, true);
151
-
152
- $tabs_fields .= '<div class="saswp-'.$key.'-section-main">';
153
- $tabs_fields .= '<div class="saswp-'.$key.'-section" data-id="'.esc_attr($schema_id).'">';
154
  if(isset($howto_data[$value.'_'.$schema_id])){
155
 
156
  $howto_supply = $howto_data[$value.'_'.$schema_id];
157
  $supply_html = '';
158
 
159
  if(!empty($howto_supply)){
160
-
161
  $i = 0;
162
  foreach ($howto_supply as $supply){
163
-
164
  $supply_html .= '<div class="saswp-'.$key.'-table-div saswp-dynamic-properties" data-id="'.$i.'">';
165
  $supply_html .= '<a class="saswp-table-close">X</a>';
166
  $supply_html .= $this->saswp_get_dynamic_html($schema_id, $value, $i, $supply);
@@ -203,7 +258,7 @@ class saswp_view_common_class {
203
 
204
  }
205
 
206
- public function saswp_saswp_post_specific($schema_type, $saswp_meta_fields, $post_id, $schema_id=null, $item_reviewed = null) {
207
 
208
  global $sd_data;
209
 
@@ -435,25 +490,8 @@ class saswp_view_common_class {
435
  if (strpos($meta_field['id'], 'closes_time') !== false || strpos($meta_field['id'], 'opens_time') !== false || strpos($meta_field['id'], 'start_time') !== false || strpos($meta_field['id'], 'end_time') !== false){
436
  $class='saswp-timepicker';
437
  }
438
- if (strpos($meta_field['id'], 'date_modified') !== false
439
- || strpos($meta_field['id'], 'date_published') !== false
440
- || strpos($meta_field['id'], 'video_upload_date') !== false
441
- || strpos($meta_field['id'], 'qa_date_created') !== false
442
- || strpos($meta_field['id'], 'accepted_answer_date_created') !== false
443
- || strpos($meta_field['id'], 'suggested_answer_date_created') !== false
444
- || strpos($meta_field['id'], 'priceValidUntil') !== false
445
- || strpos($meta_field['id'], 'priceValidUntil') !== false
446
- || strpos($meta_field['id'], 'priceValidUntil') !== false
447
- || strpos($meta_field['id'], 'start_date') !== false
448
- || strpos($meta_field['id'], 'end_date') !== false
449
- || strpos($meta_field['id'], 'validfrom') !== false
450
- || strpos($meta_field['id'], 'dateposted') !== false
451
- || strpos($meta_field['id'], 'validthrough') !== false
452
- || strpos($meta_field['id'], 'date_of_birth') !== false
453
- || strpos($meta_field['id'], 'date_created') !== false
454
- || strpos($meta_field['id'], 'created_date') !== false
455
- ) {
456
- $class='saswp-datepicker-picker';
457
  }
458
 
459
  $input = sprintf(
@@ -503,16 +541,30 @@ class saswp_view_common_class {
503
 
504
  }
505
 
506
- $tabs_fields = '';
507
- $tabs_fields .= '<div class="saswp-table-create-onload">';
 
 
 
 
 
 
 
 
 
 
 
 
 
508
  //$output variable is already escaped above
509
  $tabs_fields .= '<table class="form-table"><tbody>' . $output . '</tbody></table>';
510
  $tabs_fields .= '</div>';
511
 
512
  if($item_reviewed){
513
- $tabs_fields .= $this->saswp_schema_fields_html_on_the_fly($item_reviewed, $schema_id, $post_id);
514
  }else{
515
- $tabs_fields .= $this->saswp_schema_fields_html_on_the_fly($schema_type, $schema_id, $post_id);
 
516
  }
517
 
518
 
@@ -580,15 +632,17 @@ class saswp_view_common_class {
580
  if($schema_count > 0){
581
 
582
  foreach($all_schema as $schema){
 
 
583
 
584
  foreach ($this->schema_type_element as $element){
585
-
586
  foreach($element as $key => $val){
587
 
588
  $element_val = array();
589
 
590
  $data = (array) $_POST[$val.'_'.$schema->ID];
591
-
592
  foreach ($data as $supply){
593
 
594
  $sanitize_data = array();
@@ -599,10 +653,9 @@ class saswp_view_common_class {
599
 
600
  $element_val[] = $sanitize_data;
601
 
602
- }
603
-
604
  update_post_meta( $post_id, $val.'_'.intval($schema->ID), $element_val);
605
-
606
  }
607
 
608
  }
15
 
16
  public $_meta_name = array();
17
  public $schema_type_element = array();
18
+ public $itemlist_meta = array();
19
+ public $item_list_item = array(
20
+ 'Article' => 'Article',
21
+ 'Course' => 'Course',
22
+ 'Movie' => 'Movie',
23
+ 'Product' => 'Product',
24
+ 'Recipe' => 'Recipe',
25
+ );
26
 
27
  public function __construct() {
28
+
29
  $mapping_repeater = SASWP_DIR_NAME . '/core/array-list/repeater-fields.php';
30
+ require_once SASWP_DIR_NAME.'/core/array-list/schema-properties.php';
31
 
32
  if ( file_exists( $mapping_repeater ) ) {
33
 
36
  $this->schema_type_element = $repeater_fields['schema_type_element'];
37
  $this->_meta_name = $repeater_fields['meta_name'];
38
 
39
+ foreach($this->item_list_item as $item){
40
+ $this->itemlist_meta[$item] = saswp_get_fields_by_schema_type(null, null, $item, 'manual');
41
+ }
42
+ $this->_meta_name['itemlist_item'] = $this->itemlist_meta;
43
+ }
44
 
45
  }
46
 
47
  public function saswp_get_dynamic_html($schema_id, $meta_name, $index, $data){
48
+
49
+ $item_type = get_post_meta($schema_id, 'saswp_itemlist_item_type', true);
50
+
51
+ if($meta_name == 'itemlist_item'){
52
+
53
+ $itemval = $this->_meta_name[$meta_name][$item_type];
54
+ if($itemval){
55
+
56
+ foreach($itemval as $key => $val){
57
+ $itemval[$key]['name'] = $val['id'];
58
+ unset($itemval[$key]['id']);
59
+ }
60
+
61
+ }
62
+
63
+ $meta_fields = $itemval;
64
+ }else{
65
+ $meta_fields = $this->_meta_name[$meta_name];
66
+ }
67
+
68
  $output = '';
69
  foreach ( $meta_fields as $meta_field ) {
70
 
130
  );
131
  }
132
  $input .= '</select>';
133
+ break;
134
+
135
+ case 'checkbox':
136
+
137
+ $input = sprintf(
138
+ '<input id="%s" name="%s" type="checkbox" value="1" %s>',
139
+ esc_attr($meta_field['name']).'_'.esc_attr($index).'_'.esc_attr($schema_id),
140
+ esc_attr($meta_name).'_'.esc_attr($schema_id).'['.esc_attr($index).']['.esc_attr($meta_field['name']).']',
141
+ $data[$meta_field['name']] === '1' ? 'checked' : ''
142
+ );
143
+ break;
144
 
145
  default:
146
 
147
  $class = '';
148
+
149
+ if (saswp_is_date_field($meta_field['name'].'_'.$index.'_'.$schema_id)) {
150
+ $class='saswp-datepicker-picker';
 
151
  }
152
 
153
  $input = sprintf(
154
+ '<input class="%s" style="width:100%%" id="%s" name="%s" type="%s" value="%s">',
155
  $class,
156
  esc_attr($meta_field['name']).'_'.esc_attr($index).'_'.esc_attr($schema_id),
157
  esc_attr($meta_name).'_'.esc_attr($schema_id).'['.esc_attr($index).']['.esc_attr($meta_field['name']).']',
171
 
172
  }
173
 
174
+ public function saswp_schema_fields_html_on_the_fly($schema_type, $schema_id, $post_id, $disabled_schema=null, $modify_this=null, $modified = null){
175
 
176
  $howto_data = array();
177
  $tabs_fields = '';
181
  $type_fields = array_key_exists($schema_type, $schema_type_fields) ? $schema_type_fields[$schema_type]:'';
182
 
183
  if($type_fields){
184
+
185
+ if($schema_type == 'ItemList'){
186
 
187
+ $tabs_fields .= '<div schema-id="'.esc_attr($schema_id).'" class="saswp-table-create-onajax saswp-ps-toggle">';
188
 
189
+ }else{
190
+
191
+ if(empty($disabled_schema)){
192
+
193
+ if( $modified || $modify_this == 1){
194
+ $tabs_fields .= '<div schema-id="'.esc_attr($schema_id).'" class="saswp-table-create-onajax saswp-ps-toggle">';
195
+ }else{
196
+ $tabs_fields .= '<div schema-id="'.esc_attr($schema_id).'" class="saswp-table-create-onajax saswp-ps-toggle saswp_hide">';
197
+ }
198
+
199
+ }else{
200
+ $tabs_fields .= '<div schema-id="'.esc_attr($schema_id).'" class="saswp-table-create-onajax saswp-ps-toggle saswp_hide">';
201
+ }
202
+
203
+ }
204
+
205
+ foreach($type_fields as $key => $value){
206
 
207
+ $howto_data[$value.'_'.$schema_id] = get_post_meta($post_id, $value.'_'.$schema_id, true);
208
+ $tabs_fields .= '<div class="saswp-'.esc_attr($key).'-section-main">';
209
+ $tabs_fields .= '<div class="saswp-'.esc_attr($key).'-section" data-id="'.esc_attr($schema_id).'">';
 
210
  if(isset($howto_data[$value.'_'.$schema_id])){
211
 
212
  $howto_supply = $howto_data[$value.'_'.$schema_id];
213
  $supply_html = '';
214
 
215
  if(!empty($howto_supply)){
216
+
217
  $i = 0;
218
  foreach ($howto_supply as $supply){
 
219
  $supply_html .= '<div class="saswp-'.$key.'-table-div saswp-dynamic-properties" data-id="'.$i.'">';
220
  $supply_html .= '<a class="saswp-table-close">X</a>';
221
  $supply_html .= $this->saswp_get_dynamic_html($schema_id, $value, $i, $supply);
258
 
259
  }
260
 
261
+ public function saswp_saswp_post_specific($schema_type, $saswp_meta_fields, $post_id, $schema_id=null, $item_reviewed = null, $disabled_schema=null, $modify_this=null, $modified= null) {
262
 
263
  global $sd_data;
264
 
490
  if (strpos($meta_field['id'], 'closes_time') !== false || strpos($meta_field['id'], 'opens_time') !== false || strpos($meta_field['id'], 'start_time') !== false || strpos($meta_field['id'], 'end_time') !== false){
491
  $class='saswp-timepicker';
492
  }
493
+ if (saswp_is_date_field($meta_field['id'])) {
494
+ $class='saswp-datepicker-picker';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
495
  }
496
 
497
  $input = sprintf(
541
 
542
  }
543
 
544
+ $tabs_fields = '';
545
+
546
+ if(empty($disabled_schema)){
547
+
548
+ if($modified ||$modify_this == 1){
549
+ $tabs_fields .= '<div schema-id="'.esc_attr($schema_id).'" class="saswp-table-create-onload saswp-ps-toggle">';
550
+ }else{
551
+ $tabs_fields .= '<div schema-id="'.esc_attr($schema_id).'" class="saswp-table-create-onload saswp-ps-toggle saswp_hide">';
552
+ }
553
+
554
+ }else{
555
+ $tabs_fields .= '<div schema-id="'.esc_attr($schema_id).'" class="saswp-table-create-onload saswp-ps-toggle saswp_hide">';
556
+ }
557
+
558
+
559
  //$output variable is already escaped above
560
  $tabs_fields .= '<table class="form-table"><tbody>' . $output . '</tbody></table>';
561
  $tabs_fields .= '</div>';
562
 
563
  if($item_reviewed){
564
+ $tabs_fields .= $this->saswp_schema_fields_html_on_the_fly($item_reviewed, $schema_id, $post_id, $disabled_schema, $modify_this, $modified);
565
  }else{
566
+
567
+ $tabs_fields .= $this->saswp_schema_fields_html_on_the_fly($schema_type, $schema_id, $post_id, $disabled_schema, $modify_this, $modified);
568
  }
569
 
570
 
632
  if($schema_count > 0){
633
 
634
  foreach($all_schema as $schema){
635
+
636
+ update_post_meta( $post_id, 'saswp_modify_this_schema_'.$schema->ID, intval($_POST['saswp_modify_this_schema_'.$schema->ID]));
637
 
638
  foreach ($this->schema_type_element as $element){
639
+
640
  foreach($element as $key => $val){
641
 
642
  $element_val = array();
643
 
644
  $data = (array) $_POST[$val.'_'.$schema->ID];
645
+
646
  foreach ($data as $supply){
647
 
648
  $sanitize_data = array();
653
 
654
  $element_val[] = $sanitize_data;
655
 
656
+ }
 
657
  update_post_meta( $post_id, $val.'_'.intval($schema->ID), $element_val);
658
+
659
  }
660
 
661
  }
view/post_specific.php CHANGED
@@ -49,12 +49,7 @@ class saswp_post_specific {
49
  add_action( 'save_post', array( $this, 'saswp_post_specific_save_fields' ) );
50
  add_action( 'wp_ajax_saswp_get_sub_business_ajax', array($this,'saswp_get_sub_business_ajax'));
51
 
52
- add_action( 'wp_ajax_saswp_get_schema_dynamic_fields_ajax', array($this,'saswp_get_schema_dynamic_fields_ajax'));
53
-
54
- add_action( 'wp_ajax_saswp_modify_schema_post_enable', array($this,'saswp_modify_schema_post_enable'));
55
-
56
- add_action( 'wp_ajax_saswp_restore_schema', array($this,'saswp_restore_schema'));
57
-
58
  add_action( 'wp_ajax_saswp_enable_disable_schema_on_post', array($this,'saswp_enable_disable_schema_on_post'));
59
 
60
  }
@@ -74,14 +69,23 @@ class saswp_post_specific {
74
  }
75
 
76
  $output = '';
 
 
77
  $item_reviewed = sanitize_text_field($_GET['item']);
78
  $schema_id = sanitize_text_field($_GET['schema_id']);
79
  $schema_type = sanitize_text_field($_GET['schema_type']);
80
  $post_id = intval($_GET['post_id']);
81
-
 
 
 
 
 
 
 
82
  $response = saswp_get_fields_by_schema_type($schema_id, null, $item_reviewed);
83
  $saswp_meta_fields = array_filter($response);
84
- $output = $this->_common_view->saswp_saswp_post_specific($schema_type, $saswp_meta_fields, $post_id, $schema_id, $item_reviewed);
85
 
86
  echo $output;
87
 
@@ -101,7 +105,7 @@ class saswp_post_specific {
101
 
102
  $schema_enable = array();
103
  $post_id = intval($_POST['post_id']);
104
- $schema_id = intval($_POST['schema_id']);
105
  $status = sanitize_text_field($_POST['status']);
106
 
107
  $schema_enable_status = get_post_meta($post_id, 'saswp_enable_disable_schema', true);
@@ -150,17 +154,11 @@ class saswp_post_specific {
150
 
151
  global $post;
152
 
153
- $post_specific_id = '';
154
- $schema_count = 0;
155
 
156
  if(is_object($post)){
157
  $post_specific_id = $post->ID;
158
  }
159
- if(!empty($this->all_schema)){
160
- $schema_count = count($this->all_schema);
161
- }
162
-
163
- if($schema_count > 0){
164
 
165
  $show_post_types = get_post_types();
166
  unset($show_post_types['adsforwp'],$show_post_types['saswp'],$show_post_types['attachment'], $show_post_types['revision'], $show_post_types['nav_menu_item'], $show_post_types['user_request'], $show_post_types['custom_css']);
@@ -175,7 +173,7 @@ class saswp_post_specific {
175
 
176
  add_meta_box(
177
  'post_specific',
178
- esc_html__( 'Post Specific Schema', 'schema-and-structured-data-for-wp' ),
179
  array( $this, 'saswp_post_meta_box_callback' ),
180
  $single_screen,
181
  'advanced',
@@ -186,7 +184,7 @@ class saswp_post_specific {
186
  }
187
  }
188
 
189
- }
190
  }
191
 
192
  public function saswp_get_schema_dynamic_fields_ajax(){
@@ -197,12 +195,37 @@ class saswp_post_specific {
197
  if ( !wp_verify_nonce( $_GET['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
198
  return;
199
  }
200
- $meta_name = '';
201
- $meta_array = array();
202
- if(isset($_GET['meta_name'])){
203
- $meta_name = sanitize_text_field($_GET['meta_name']);
204
- $meta_array = $this->_common_view->_meta_name[$meta_name];
 
 
205
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  if(!empty($meta_array)){
207
  echo json_encode($meta_array);
208
  }
@@ -215,9 +238,27 @@ class saswp_post_specific {
215
  $tabs = '';
216
  $tabs_fields = '';
217
  $schema_ids = array();
218
-
219
- $schema_enable = get_post_meta($post->ID, 'saswp_enable_disable_schema', true);
220
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  if(!empty($this->all_schema)){
222
 
223
  foreach($this->all_schema as $key => $schema){
@@ -227,18 +268,38 @@ class saswp_post_specific {
227
  if($advnace_status !== 1){
228
  continue;
229
  }
230
-
231
- $checked = '';
 
 
232
 
233
- if(isset($schema_enable[$schema->ID]) && $schema_enable[$schema->ID] == 1){
234
 
235
- $checked = 'checked';
 
 
 
 
 
 
 
 
 
 
236
 
237
- }
 
 
 
 
238
  $schema_type = get_post_meta($schema->ID, 'schema_type', true);
239
- $response = saswp_get_fields_by_schema_type($schema->ID);
240
  $saswp_meta_fields = array_filter($response);
241
- $output = $this->_common_view->saswp_saswp_post_specific($schema_type, $saswp_meta_fields, $post->ID, $schema->ID );
 
 
 
 
242
 
243
  if($schema_type == 'Review'){
244
 
@@ -248,33 +309,84 @@ class saswp_post_specific {
248
  }
249
  $response = saswp_get_fields_by_schema_type($schema->ID, null, $item_reviewed);
250
  $saswp_meta_fields = array_filter($response);
251
- $output .= $this->_common_view->saswp_saswp_post_specific($schema_type, $saswp_meta_fields, $post->ID, $schema->ID ,$item_reviewed);
252
 
253
  }
254
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  if($key==0){
256
 
257
- $tabs .='<li class="selected"><a saswp-schema-type="'.esc_attr($schema_type).'" data-id="saswp_specific_'.esc_attr($schema->ID).'" class="saswp-tab-links selected">'.esc_attr($schema_type == 'local_business'? 'LocalBusiness': $schema_type).'</a>'
258
- . '<label class="saswp-switch">'
259
- . '<input type="checkbox" class="saswp-schema-type-toggle" value="1" data-schema-id="'.esc_attr($schema->ID).'" data-post-id="'.esc_attr($post->ID).'" '.$checked.'>'
260
- . '<span class="saswp-slider"></span>'
261
  . '</li>';
262
 
263
- $tabs_fields .= '<div data-id="'.esc_attr($schema->ID).'" id="saswp_specific_'.esc_attr($schema->ID).'" class="saswp-post-specific-wrapper">';
264
- $tabs_fields .= $output;
 
 
265
  $tabs_fields .= '</div>';
266
 
267
  }else{
268
 
269
  $tabs .='<li>'
270
- . '<a saswp-schema-type="'.esc_attr($schema_type).'" data-id="saswp_specific_'.esc_attr($schema->ID).'" class="saswp-tab-links">'.esc_attr($schema_type == 'local_business'? 'LocalBusiness': $schema_type).'</a>'
271
- . '<label class="saswp-switch">'
272
- . '<input type="checkbox" class="saswp-schema-type-toggle" value="1" data-schema-id="'.esc_attr($schema->ID).'" data-post-id="'.esc_attr($post->ID).'" '.$checked.'>'
273
- . '<span class="saswp-slider"></span>'
274
  . '</li>';
275
 
276
- $tabs_fields .= '<div data-id="'.esc_attr($schema->ID).'" id="saswp_specific_'.esc_attr($schema->ID).'" class="saswp-post-specific-wrapper saswp_hide">';
277
- $tabs_fields .= $output;
 
 
278
  $tabs_fields .= '</div>';
279
 
280
  }
@@ -282,48 +394,41 @@ class saswp_post_specific {
282
  $schema_ids[] =$schema->ID;
283
  }
284
 
285
- $response_html .= '<div>';
286
- $response_html .= '<div><a href="#" class="saswp-restore-post-schema button">'.esc_html__( 'Restore Default', 'schema-and-structured-data-for-wp' ).'</a></div>';
287
  $response_html .= '<div class="saswp-tab saswp-post-specific-tab-wrapper">';
288
  $response_html .= '<ul class="saswp-tab-nav">';
289
- $response_html .= $tabs;
 
 
 
 
290
  $response_html .= '</ul>';
291
  $response_html .= '</div>';
292
  $response_html .= '<div class="saswp-post-specific-container">';
293
- $response_html .= $tabs_fields;
 
294
  $response_html .= '</div>';
295
-
296
- //custom schema starts here
297
-
298
- $custom_markup = get_post_meta($post->ID, 'saswp_custom_schema_field', true);
299
-
300
- $response_html .= '<div class="saswp-add-custom-schema-div">';
301
-
302
- if($custom_markup){
303
-
304
- $response_html .= '<a style="display:none;" class="button saswp-add-custom-schema">'.esc_html__( 'Add Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
305
- $response_html .= '<div class="saswp-add-custom-schema-field">';
306
-
307
- }else{
308
-
309
- $response_html .= '<a class="button saswp-add-custom-schema">'.esc_html__( 'Add Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
310
- $response_html .= '<div class="saswp-add-custom-schema-field saswp_hide">';
311
- }
312
-
313
- $response_html .= '<a class="button saswp-delete-custom-schema">'.esc_html__( 'Delete Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>';
314
- $response_html .= '<textarea style="margin-left:5px;" placeholder="{ Json Markup }" id="saswp_custom_schema_field" name="saswp_custom_schema_field" rows="5" cols="100">'
315
- . $custom_markup
316
- . '</textarea>';
317
-
318
- $response_html .= '</div>';
319
- $response_html .= '</div>';
320
-
321
- //custom schema ends here
322
-
323
  $response_html .= '<input class="saswp-post-specific-schema-ids" type="hidden" value="'. json_encode($schema_ids).'">';
324
  $response_html .= '</div>';
325
 
326
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
327
 
328
  return $response_html;
329
  }
@@ -352,43 +457,9 @@ class saswp_post_specific {
352
  }
353
 
354
  }
355
-
356
- $modify_option = get_option('modify_schema_post_enable_'.esc_attr($post->ID));
357
-
358
- if($modify_option == 'enable' && $schema_avail){
359
-
360
- $response_html .= $this->saswp_post_meta_box_fields($post);
361
 
362
- }else{
363
-
364
- if($advnace_status){
365
- $response_html .= '<a class="button saswp-modify_schema_post_enable">'.esc_html__( 'Modify Current Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
366
- }
367
- $custom_markup = get_post_meta($post->ID, 'saswp_custom_schema_field', true);
368
-
369
- $response_html .= '<div class="saswp-add-custom-schema-div">';
370
-
371
- if($custom_markup){
372
-
373
- $response_html .= '<a style="display:none;" class="button saswp-add-custom-schema">'.esc_html__( 'Add Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
374
- $response_html .= '<div class="saswp-add-custom-schema-field">';
375
-
376
- }else{
377
-
378
- $response_html .= '<a class="button saswp-add-custom-schema">'.esc_html__( 'Add Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>' ;
379
- $response_html .= '<div class="saswp-add-custom-schema-field saswp_hide">';
380
- }
381
-
382
- $response_html .= '<a class="button saswp-delete-custom-schema">'.esc_html__( 'Delete Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>';
383
- $response_html .= '<textarea style="margin-left:5px;" placeholder="{ Json Markup }" id="saswp_custom_schema_field" name="saswp_custom_schema_field" rows="5" cols="100">'
384
- . $custom_markup
385
- . '</textarea>';
386
- $response_html .= '</div>';
387
- $response_html .= '</div>';
388
-
389
-
390
- }
391
-
392
  return $response_html;
393
  }
394
 
@@ -398,82 +469,7 @@ class saswp_post_specific {
398
  wp_nonce_field( 'post_specific_data', 'post_specific_nonce' );
399
  echo $this->saswp_post_meta_box_html($post);
400
 
401
- }
402
- /**
403
- * Function to restoere all the post specific schema on a particular post/page
404
- * @return type string
405
- * @since version 1.0.4
406
- */
407
- public function saswp_restore_schema(){
408
-
409
- if ( ! isset( $_POST['saswp_security_nonce'] ) ){
410
- return;
411
- }
412
- if ( !wp_verify_nonce( $_POST['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
413
- return;
414
- }
415
-
416
- $result = '';
417
- $post_id = intval($_POST['post_id']);
418
- $schema_ids = array_map( 'sanitize_text_field', $_POST['schema_ids'] );
419
-
420
- if($schema_ids){
421
-
422
- foreach($schema_ids as $id){
423
-
424
- $meta_field = saswp_get_fields_by_schema_type($id);
425
-
426
- foreach($meta_field as $field){
427
-
428
- $result = delete_post_meta($post_id, $field['id']);
429
-
430
- }
431
-
432
- }
433
-
434
- }
435
-
436
- update_post_meta($post_id, 'saswp_custom_schema_field', '');
437
- update_option('modify_schema_post_enable_'.$post_id, 'disable');
438
-
439
- if($result){
440
-
441
- echo json_encode(array('status'=> 't', 'msg'=>esc_html__( 'Schema has been restored', 'schema-and-structured-data-for-wp' )));
442
-
443
- }else{
444
-
445
- echo json_encode(array('status'=> 'f', 'msg'=>esc_html__( 'Schema has already been restored', 'schema-and-structured-data-for-wp' )));
446
-
447
- }
448
- wp_die();
449
- }
450
- /**
451
- * Generate the post specific metabox html with dynamic values on ajax call
452
- * @return type string
453
- * @since version 1.0.4
454
- */
455
- public function saswp_modify_schema_post_enable(){
456
-
457
- if ( ! isset( $_GET['saswp_security_nonce'] ) ){
458
- return;
459
- }
460
- if ( !wp_verify_nonce( $_GET['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
461
- return;
462
- }
463
-
464
- $post_id = intval($_GET['post_id']);
465
-
466
- update_option('modify_schema_post_enable_'.$post_id, 'enable');
467
-
468
- $post = get_post($post_id);
469
-
470
- $response = $this->saswp_post_meta_box_html($post);
471
-
472
- echo $response;
473
-
474
- wp_die();
475
-
476
- }
477
 
478
  /**
479
  * Function to save post specific metabox fields value
@@ -489,14 +485,10 @@ class saswp_post_specific {
489
  if ( ! current_user_can( 'edit_post', $post_id ) ) return $post_id;
490
 
491
  $allowed_html = saswp_expanded_allowed_tags();
492
-
493
- $option = get_option('modify_schema_post_enable_'.$post_id);
494
  $custom_schema = wp_kses(wp_unslash($_POST['saswp_custom_schema_field']), $allowed_html);
495
  update_post_meta( $post_id, 'saswp_custom_schema_field', $custom_schema );
496
-
497
- if($option != 'enable'){
498
- return;
499
- }
500
 
501
  $this->_common_view->saswp_save_common_view($post_id, $this->all_schema);
502
  }
49
  add_action( 'save_post', array( $this, 'saswp_post_specific_save_fields' ) );
50
  add_action( 'wp_ajax_saswp_get_sub_business_ajax', array($this,'saswp_get_sub_business_ajax'));
51
 
52
+ add_action( 'wp_ajax_saswp_get_schema_dynamic_fields_ajax', array($this,'saswp_get_schema_dynamic_fields_ajax'));
 
 
 
 
 
53
  add_action( 'wp_ajax_saswp_enable_disable_schema_on_post', array($this,'saswp_enable_disable_schema_on_post'));
54
 
55
  }
69
  }
70
 
71
  $output = '';
72
+ $disabled = '';
73
+
74
  $item_reviewed = sanitize_text_field($_GET['item']);
75
  $schema_id = sanitize_text_field($_GET['schema_id']);
76
  $schema_type = sanitize_text_field($_GET['schema_type']);
77
  $post_id = intval($_GET['post_id']);
78
+ $modify_this = intval($_GET['modify_this']);
79
+
80
+ $schema_enable = get_post_meta($post_id, 'saswp_enable_disable_schema', true);
81
+
82
+ if(isset($schema_enable[$schema_id]) && $schema_enable[$schema_id] == 0){
83
+ $disabled = 'checked';
84
+ }
85
+
86
  $response = saswp_get_fields_by_schema_type($schema_id, null, $item_reviewed);
87
  $saswp_meta_fields = array_filter($response);
88
+ $output = $this->_common_view->saswp_saswp_post_specific($schema_type, $saswp_meta_fields, $post_id, $schema_id, $item_reviewed, $disabled, $modify_this);
89
 
90
  echo $output;
91
 
105
 
106
  $schema_enable = array();
107
  $post_id = intval($_POST['post_id']);
108
+ $schema_id = sanitize_text_field($_POST['schema_id']);
109
  $status = sanitize_text_field($_POST['status']);
110
 
111
  $schema_enable_status = get_post_meta($post_id, 'saswp_enable_disable_schema', true);
154
 
155
  global $post;
156
 
157
+ $post_specific_id = '';
 
158
 
159
  if(is_object($post)){
160
  $post_specific_id = $post->ID;
161
  }
 
 
 
 
 
162
 
163
  $show_post_types = get_post_types();
164
  unset($show_post_types['adsforwp'],$show_post_types['saswp'],$show_post_types['attachment'], $show_post_types['revision'], $show_post_types['nav_menu_item'], $show_post_types['user_request'], $show_post_types['custom_css']);
173
 
174
  add_meta_box(
175
  'post_specific',
176
+ esc_html__( 'Schema & Structured Data on this post', 'schema-and-structured-data-for-wp' ),
177
  array( $this, 'saswp_post_meta_box_callback' ),
178
  $single_screen,
179
  'advanced',
184
  }
185
  }
186
 
187
+
188
  }
189
 
190
  public function saswp_get_schema_dynamic_fields_ajax(){
195
  if ( !wp_verify_nonce( $_GET['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
196
  return;
197
  }
198
+ $meta_name = '';
199
+ $meta_array = array();
200
+ $schema_id = null;
201
+ $schema_type = '';
202
+
203
+ if(isset($_GET['schema_id'])){
204
+ $schema_id = intval($_GET['schema_id']);
205
  }
206
+ if(isset($_GET['schema_type'])){
207
+ $schema_type = sanitize_text_field($_GET['schema_type']);
208
+ }
209
+ if(isset($_GET['meta_name'])){
210
+
211
+ $meta_name = sanitize_text_field($_GET['meta_name']);
212
+ if($meta_name == 'itemlist_item'){
213
+
214
+ $itemval = $this->_common_view->_meta_name[$meta_name][$schema_type];
215
+ if($itemval){
216
+
217
+ foreach($itemval as $key => $val){
218
+ $itemval[$key]['name'] = $val['id'];
219
+ unset($itemval[$key]['id']);
220
+ }
221
+
222
+ }
223
+
224
+ $meta_array = $itemval;
225
+ }else{
226
+ $meta_array = $this->_common_view->_meta_name[$meta_name];
227
+ }
228
+ }
229
  if(!empty($meta_array)){
230
  echo json_encode($meta_array);
231
  }
238
  $tabs = '';
239
  $tabs_fields = '';
240
  $schema_ids = array();
241
+
242
+ $modify_option = get_option('modify_schema_post_enable_'.esc_attr($post->ID));
243
+ $schema_enable = get_post_meta($post->ID, 'saswp_enable_disable_schema', true);
244
+ $custom_markp = get_post_meta($post->ID, 'saswp_custom_schema_field', true);
245
+ $disable_btn.= '<div class="saswp-disable-btn-container">'
246
+ . '<span class="saswp-disable-label">'.esc_html__( 'Disable on this page', 'schema-and-structured-data-for-wp' ).'</span>'
247
+ . '<label class="saswp-switch">'
248
+ . '<input type="checkbox" class="saswp-schema-type-toggle" value="1" data-schema-id="custom" data-post-id="'.esc_attr($post->ID).'" '.( (isset($schema_enable['custom']) && $schema_enable['custom'] == 0) ? 'checked' : '' ).'>'
249
+ . '<span class="saswp-slider"></span>'
250
+ . '</label>'
251
+ . '</div>';
252
+
253
+ $cus_schema .= '<div id="saswp_specific_custom" class="saswp-post-specific-wrapper saswp_hide">';
254
+ $cus_schema .= '<div class="'.((isset($schema_enable['custom']) && $schema_enable['custom'] == 0) ? 'saswp_hide' : '').'"><textarea style="margin-left:5px;" placeholder="JSON-LD" schema-id="custom" id="saswp_custom_schema_field" name="saswp_custom_schema_field" rows="5" cols="95">'
255
+ . $custom_markp
256
+ . '</textarea>';
257
+ $cus_schema .= '<span><strong>'.esc_html__( 'Note', 'schema-and-structured-data-for-wp' ).': </strong>'.esc_html__( 'Please enter the valid Json-ld. Whatever you enter will be added in page source', 'schema-and-structured-data-for-wp' ).'</span>';
258
+ $cus_schema .= '</div>';
259
+ $cus_schema .= $disable_btn;
260
+ $cus_schema .= '</div>';
261
+
262
  if(!empty($this->all_schema)){
263
 
264
  foreach($this->all_schema as $key => $schema){
268
  if($advnace_status !== 1){
269
  continue;
270
  }
271
+
272
+ $disabled = '';
273
+ $modified = false;
274
+ $item_type = '';
275
 
276
+ if(isset($schema_enable[$schema->ID]) && $schema_enable[$schema->ID] == 0){
277
 
278
+ $disabled = 'checked';
279
+
280
+ }
281
+
282
+ if($modify_option == 'enable' && !isset($schema_enable[$schema->ID])){
283
+
284
+ $disabled = 'checked';
285
+
286
+ }
287
+
288
+ if($modify_option == 'enable' && (isset($schema_enable[$schema->ID]) && $schema_enable[$schema->ID] == 1)){
289
 
290
+ $modified = true;
291
+
292
+ }
293
+
294
+ $modify_this = get_post_meta($post->ID, 'saswp_modify_this_schema_'.$schema->ID, true);
295
  $schema_type = get_post_meta($schema->ID, 'schema_type', true);
296
+ $response = saswp_get_fields_by_schema_type($schema->ID);
297
  $saswp_meta_fields = array_filter($response);
298
+ $output = $this->_common_view->saswp_saswp_post_specific($schema_type, $saswp_meta_fields, $post->ID, $schema->ID, null, $disabled, $modify_this, $modified );
299
+
300
+ if($schema_type == 'ItemList'){
301
+ $item_type = '('.get_post_meta($schema->ID, 'saswp_itemlist_item_type', true).')';
302
+ }
303
 
304
  if($schema_type == 'Review'){
305
 
309
  }
310
  $response = saswp_get_fields_by_schema_type($schema->ID, null, $item_reviewed);
311
  $saswp_meta_fields = array_filter($response);
312
+ $output .= $this->_common_view->saswp_saswp_post_specific($schema_type, $saswp_meta_fields, $post->ID, $schema->ID ,$item_reviewed, $disabled, $modify_this, $modified);
313
 
314
  }
315
+
316
+ if($schema_type == 'ItemList'){
317
+ $setting_options = '<div class="saswp-post-specific-setting saswp_hide">';
318
+ }else{
319
+ $setting_options = '<div class="saswp-post-specific-setting">';
320
+ }
321
+
322
+ $setting_options.= '<div class="saswp-ps-buttons">';
323
+
324
+ if($schema_type == 'ItemList'){
325
+ $setting_options .= '<input class="saswp_modify_this_schema_hidden_'.esc_attr($schema->ID).'" type="hidden" name="saswp_modify_this_schema_'.esc_attr($schema->ID).'" value="1">';
326
+ }else{
327
+ $setting_options .= '<input class="saswp_modify_this_schema_hidden_'.esc_attr($schema->ID).'" type="hidden" name="saswp_modify_this_schema_'.esc_attr($schema->ID).'" value="'.( ($modify_this || $modified ) ? 1 : 0).'">';
328
+ }
329
+
330
+ if(!empty($disabled)){
331
+ $setting_options .= '<div class="saswp-ps-text saswp_hide">';
332
+ }else{
333
+ $setting_options .= '<div class="saswp-ps-text '.( ($modify_this || $modified ) ? '' : 'saswp_hide').'">';
334
+ }
335
+
336
+ $setting_options .= '<a class="button button-default saswp-restore-schema button" schema-id="'.esc_attr($schema->ID).'">'.esc_html__( 'Restore to Auto Fetch', 'schema-and-structured-data-for-wp' ).'</a>';
337
+ $setting_options .= '</div>';
338
+
339
+ if(!empty($disabled)){
340
+ $setting_options .= '<div class="saswp-ps-text saswp_hide">';
341
+ }else{
342
+ $setting_options .= '<div class="saswp-ps-text '.(($modify_this || $modified ) ? 'saswp_hide' : '').'">';
343
+ }
344
+
345
+ $schema_type_txt = $schema_type;
346
+
347
+ if($schema_type == 'local_business'){
348
+ $schema_type_txt = 'Local Business';
349
+ }
350
+ if($schema_type == 'qanda'){
351
+ $schema_type_txt = 'Q&A';
352
+ }
353
+
354
+ $setting_options .= '<span>'.esc_html__( $schema_type_txt.' schema is fetched automatically', 'schema-and-structured-data-for-wp' ).'</span><br><br>';
355
+ $setting_options .= '<a class="button button-default saswp-modify-schema button" schema-id="'.esc_attr($schema->ID).'">'.esc_html__( 'Modify '.$schema_type.' Schema Output', 'schema-and-structured-data-for-wp' ).'</a>';
356
+ $setting_options .= '</div>';
357
+
358
+ $setting_options.= '</div>';
359
+ $setting_options.= '</div>';
360
+
361
+ $btn_in_loop = '<div class="saswp-disable-btn-container">'
362
+ . '<span class="saswp-disable-label">'.esc_html__( 'Disable on this page', 'schema-and-structured-data-for-wp' ).'</span>'
363
+ . '<label class="saswp-switch">'
364
+ . '<input type="checkbox" class="saswp-schema-type-toggle" value="1" data-schema-id="'.esc_attr($schema->ID).'" data-post-id="'.esc_attr($post->ID).'" '.$disabled.'>'
365
+ . '<span class="saswp-slider"></span>'
366
+ . '</label>'
367
+ . '</div>';
368
+
369
  if($key==0){
370
 
371
+ $tabs .='<li class="selected"><a saswp-schema-type="'.esc_attr($schema_type).'" data-id="saswp_specific_'.esc_attr($schema->ID).'" class="saswp-tab-links selected">'.esc_attr($schema_type == 'local_business'? 'LocalBusiness': $schema_type.' '.$item_type ).'</a>'
 
 
 
372
  . '</li>';
373
 
374
+ $tabs_fields .= '<div data-id="'.esc_attr($schema->ID).'" id="saswp_specific_'.esc_attr($schema->ID).'" class="saswp-post-specific-wrapper">';
375
+ $tabs_fields .= $setting_options;
376
+ $tabs_fields .= $output;
377
+ $tabs_fields .= $btn_in_loop;
378
  $tabs_fields .= '</div>';
379
 
380
  }else{
381
 
382
  $tabs .='<li>'
383
+ . '<a saswp-schema-type="'.esc_attr($schema_type).'" data-id="saswp_specific_'.esc_attr($schema->ID).'" class="saswp-tab-links">'.esc_attr($schema_type == 'local_business'? 'LocalBusiness': $schema_type.' '.$item_type ).'</a>'
 
 
 
384
  . '</li>';
385
 
386
+ $tabs_fields .= '<div data-id="'.esc_attr($schema->ID).'" id="saswp_specific_'.esc_attr($schema->ID).'" class="saswp-post-specific-wrapper saswp_hide">';
387
+ $tabs_fields .= $setting_options;
388
+ $tabs_fields .= $output;
389
+ $tabs_fields .= $btn_in_loop;
390
  $tabs_fields .= '</div>';
391
 
392
  }
394
  $schema_ids[] =$schema->ID;
395
  }
396
 
397
+ $response_html .= '<div>';
 
398
  $response_html .= '<div class="saswp-tab saswp-post-specific-tab-wrapper">';
399
  $response_html .= '<ul class="saswp-tab-nav">';
400
+ $response_html .= $tabs;
401
+
402
+ $response_html .='<li>'
403
+ . '<a class="saswp-tab-links" data-id="saswp_specific_custom">'.esc_html__( 'Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>'
404
+ . '</li>';
405
  $response_html .= '</ul>';
406
  $response_html .= '</div>';
407
  $response_html .= '<div class="saswp-post-specific-container">';
408
+ $response_html .= $tabs_fields;
409
+ $response_html .= $cus_schema;
410
  $response_html .= '</div>';
411
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
412
  $response_html .= '<input class="saswp-post-specific-schema-ids" type="hidden" value="'. json_encode($schema_ids).'">';
413
  $response_html .= '</div>';
414
 
415
  }
416
+ else{
417
+
418
+
419
+ $response_html .= '<div class="saswp-tab saswp-post-specific-tab-wrapper">';
420
+ $response_html .= '<div><a href="'.esc_url( admin_url( 'edit.php?post_type=saswp' ) ).'" class="button button-default saswp-setup-schema-btn">'.esc_html__( 'Setup Schema', 'schema-and-structured-data-for-wp' ).'</div>';
421
+ $response_html .= '<ul class="saswp-tab-nav">';
422
+ $response_html .= '<li class="selected">'
423
+ . '<a class="saswp-tab-links" data-id="saswp_specific_custom">'.esc_html__( 'Custom Schema', 'schema-and-structured-data-for-wp' ).'</a>'
424
+ . '</li>';
425
+ $response_html .= '</ul>';
426
+ $response_html .= '</div>';
427
+ $response_html .= '<div class="saswp-post-specific-container">';
428
+ $response_html .= $cus_schema;
429
+ $response_html .= '</div>';
430
+
431
+ }
432
 
433
  return $response_html;
434
  }
457
  }
458
 
459
  }
460
+
461
+ $response_html .= $this->saswp_post_meta_box_fields($post);
 
 
 
 
462
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
463
  return $response_html;
464
  }
465
 
469
  wp_nonce_field( 'post_specific_data', 'post_specific_nonce' );
470
  echo $this->saswp_post_meta_box_html($post);
471
 
472
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
473
 
474
  /**
475
  * Function to save post specific metabox fields value
485
  if ( ! current_user_can( 'edit_post', $post_id ) ) return $post_id;
486
 
487
  $allowed_html = saswp_expanded_allowed_tags();
488
+
 
489
  $custom_schema = wp_kses(wp_unslash($_POST['saswp_custom_schema_field']), $allowed_html);
490
  update_post_meta( $post_id, 'saswp_custom_schema_field', $custom_schema );
491
+ update_option('modify_schema_post_enable_'.$post_id, '');
 
 
 
492
 
493
  $this->_common_view->saswp_save_common_view($post_id, $this->all_schema);
494
  }
view/schema_type.php CHANGED
@@ -156,7 +156,15 @@ function saswp_schema_type_meta_box_callback( $post) {
156
  $style_business_name = 'style="display:none"';
157
 
158
  }
159
- }
 
 
 
 
 
 
 
 
160
  $item_reviewed = array(
161
  'Book' => 'Book',
162
  'Course' => 'Course',
@@ -508,7 +516,29 @@ function saswp_schema_type_meta_box_callback( $post) {
508
  </select>
509
  </td>
510
  </tr>
511
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
512
  <!-- Review Schema type starts here -->
513
  <tr class="saswp-review-text-field-tr" <?php echo $style_review_name; ?>>
514
  <td><?php echo esc_html__('Item Reviewed Type', 'schema-and-structured-data-for-wp' ); ?></td>
@@ -606,34 +636,54 @@ function saswp_schema_type_meta_box_callback( $post) {
606
  $attached_rv_json = json_encode($attached_rv);
607
  }
608
 
 
 
 
 
 
 
609
  if($append_reviews == 1){
610
 
 
 
 
 
 
 
 
 
 
 
 
 
 
611
  if(is_array($attached_rv)){
612
- echo '<span class="saswp-attached-rv-count"> '.esc_attr(count($attached_rv)).' Reviews Attached</span>';
613
  }else{
614
- echo '<span class="saswp-attached-rv-count"> 0 Reviews Attached</span>';
615
  }
616
 
617
  }else{
618
- echo '<span class="saswp-attached-rv-count saswp_hide"> 0 Reviews Attached</span>';
619
  }
620
 
621
  ?>
622
  </a>
623
  <div style="display:none;" id="saswp-embed-code-div">
624
- <div class="saswp-add-rv-title"><?php echo esc_html__('Get reviews attached to the schema type with two different method.' ,'schema-and-structured-data-for-wp');?> <a href="#"><?php echo esc_html__('Learn More...' ,'schema-and-structured-data-for-wp');?></a></div>
625
  <div class="saswp-thick-box-container">
626
 
627
  <div class="saswp-add-rv-popup" id="saswp-global-tabs">
628
  <h2 class="nav-tab-wrapper">
629
- <a class="nav-tab" data-id="saswp-add-rv-automatic"><?php echo esc_html__( 'Automatic' ,'schema-and-structured-data-for-wp');?></a>
630
- <a class="nav-tab" data-id="saswp-add-rv-manual"><?php echo esc_html__( 'Manual' ,'schema-and-structured-data-for-wp');?></a>
 
631
  </h2>
632
  </div>
633
-
634
  <div class="saswp-global-container" id="saswp-add-rv-automatic">
635
-
636
- <div class="saswp-add-rv-automatic-list">
637
 
638
  <?php
639
 
@@ -646,7 +696,7 @@ function saswp_schema_type_meta_box_callback( $post) {
646
  foreach($reviews as $key => $val){
647
 
648
  $checked = '';
649
- echo '<div class="saswp-add-rv-loop" review-id="'.esc_attr($val['saswp_review_id']).'">';
650
 
651
  if(is_array($attached_rv) && in_array($val['saswp_review_id'], $attached_rv)){
652
  $checked = 'checked';
@@ -667,19 +717,61 @@ function saswp_schema_type_meta_box_callback( $post) {
667
  echo '<input id="saswp_attahced_reviews" type="hidden" name="saswp_attahced_reviews" value="'. esc_attr($attached_rv_json).'">';
668
  ?>
669
 
670
- <div class="saswp-rv-not-found saswp_hide"><?php echo esc_html__( 'Reviews not found' ,'schema-and-structured-data-for-wp');?></div>
671
- <span class="spinner"></span>
672
- <div><a class="saswp-load-more-rv"><?php echo esc_html__( 'Load More...' ,'schema-and-structured-data-for-wp');?></a></div>
673
 
674
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
675
 
676
  <div class="saswp-global-container" id="saswp-add-rv-manual">
677
  <p> <?php echo esc_html__('Output reviews in front and its schema markup in source by using below shortcode' ,'schema-and-structured-data-for-wp');?> </p>
678
  <strong>[saswp-reviews]</strong><br>OR<br>
679
  <strong>[saswp-reviews-collection id="your collection id"]</strong>
680
  </div>
681
-
682
  </div>
 
683
  </div>
684
  </td>
685
  </tr>
@@ -953,7 +1045,7 @@ function saswp_schema_type_meta_box_callback( $post) {
953
  $schema_type = get_post_meta($post->ID, 'schema_type', true);
954
 
955
  $schema_fields = saswp_get_fields_by_schema_type($post->ID, null, $schema_type, 'manual');
956
- $output = $common_obj->saswp_saswp_post_specific($schema_type, $schema_fields, $post->ID, $post->ID);
957
 
958
  if($schema_type == 'Review'){
959
 
@@ -962,7 +1054,7 @@ function saswp_schema_type_meta_box_callback( $post) {
962
  $item_reviewed = 'Book';
963
  }
964
  $response = saswp_get_fields_by_schema_type($post->ID, null, $item_reviewed);
965
- $output .= $common_obj->saswp_saswp_post_specific($schema_type, $response, $post->ID, $post->ID ,$item_reviewed);
966
 
967
  }
968
 
@@ -992,15 +1084,37 @@ function saswp_get_reviews_on_load(){
992
  if ( !wp_verify_nonce( $_GET['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
993
  return;
994
  }
995
-
996
- $offset = intval($_GET['offset']);
997
- $paged = intval($_GET['paged']);
 
998
 
999
  if($paged && $offset){
1000
 
1001
- $reviews_service = new saswp_reviews_service();
1002
-
1003
- $reviews = $reviews_service->saswp_get_reviews_list_by_parameters(null, null, 10, $paged, $offset);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1004
 
1005
  if($reviews){
1006
  echo json_encode(array('status' => 't', 'result' => $reviews));
@@ -1030,7 +1144,7 @@ function saswp_get_manual_fields_on_ajax(){
1030
 
1031
  $schema_fields = saswp_get_fields_by_schema_type($post_id, null, $schema_type, 'manual');
1032
 
1033
- $output = $common_obj->saswp_saswp_post_specific($schema_type, $schema_fields, $post_id, $post_id);
1034
 
1035
  echo $output;
1036
 
@@ -1063,8 +1177,10 @@ function saswp_schema_type_add_meta_box_save( $post_id ) {
1063
  update_post_meta( $post_id, 'saswp_item_list_tags', sanitize_text_field($_POST['saswp_item_list_tags']) );
1064
  update_post_meta( $post_id, 'saswp_item_list_custom', sanitize_text_field($_POST['saswp_item_list_custom']) );
1065
  update_post_meta( $post_id, 'saswp_review_item_reviewed_'.$post_id, sanitize_text_field($_POST['saswp_review_item_reviewed_'.$post_id]) );
 
1066
 
1067
  update_post_meta( $post_id, 'saswp_attahced_reviews', json_decode(wp_unslash($_POST['saswp_attahced_reviews'])) );
 
1068
 
1069
  $common_obj = new saswp_view_common_class();
1070
 
@@ -1076,4 +1192,3 @@ function saswp_schema_type_add_meta_box_save( $post_id ) {
1076
 
1077
  }
1078
 
1079
-
156
  $style_business_name = 'style="display:none"';
157
 
158
  }
159
+ }
160
+ $item_list_item = array(
161
+ 'Article' => 'Article',
162
+ 'Course' => 'Course',
163
+ 'Movie' => 'Movie',
164
+ 'Product' => 'Product',
165
+ 'Recipe' => 'Recipe',
166
+ );
167
+
168
  $item_reviewed = array(
169
  'Book' => 'Book',
170
  'Course' => 'Course',
516
  </select>
517
  </td>
518
  </tr>
519
+
520
+ <!-- ItemList Schema type starts here -->
521
+ <tr class="saswp-itemlist-text-field-tr" <?php echo $style_review_name; ?>>
522
+ <td><?php echo esc_html__('Item Type', 'schema-and-structured-data-for-wp' ); ?></td>
523
+ <td>
524
+
525
+ <select data-id="<?php if(is_object($post)){ echo esc_attr($post->ID); } ?>" name="saswp_itemlist_item_type" class="saswp-itemlist-item-type-list">
526
+ <?php
527
+
528
+ $item = get_post_meta($post->ID, 'saswp_itemlist_item_type', true);
529
+ foreach ($item_list_item as $key => $value) {
530
+ $sel = '';
531
+ if($item == $key){
532
+ $sel = 'selected';
533
+ }
534
+ echo "<option value='".esc_attr($key)."' ".esc_attr($sel).">".esc_html__($value, 'schema-and-structured-data-for-wp' )."</option>";
535
+ }
536
+ ?>
537
+ </select>
538
+ </td>
539
+ </tr>
540
+ <!-- ItemList Schema type ends here -->
541
+
542
  <!-- Review Schema type starts here -->
543
  <tr class="saswp-review-text-field-tr" <?php echo $style_review_name; ?>>
544
  <td><?php echo esc_html__('Item Reviewed Type', 'schema-and-structured-data-for-wp' ); ?></td>
636
  $attached_rv_json = json_encode($attached_rv);
637
  }
638
 
639
+ $attached_col_json = '';
640
+ $attached_col = get_post_meta($post->ID, 'saswp_attached_collection', true);
641
+ if($attached_col){
642
+ $attached_col_json = json_encode($attached_col);
643
+ }
644
+
645
  if($append_reviews == 1){
646
 
647
+ $rv_text = '';
648
+
649
+ if(count($attached_rv) > 0){
650
+ $rv_text .= count($attached_rv). ' Reviews, ';
651
+ }
652
+
653
+ if(count($attached_col) > 0){
654
+ $rv_text .= count($attached_col). ' Collection';
655
+ }
656
+ if(!$rv_text){
657
+ $rv_text = 0;
658
+ }
659
+
660
  if(is_array($attached_rv)){
661
+ echo '<span class="saswp-attached-rv-count">Attached '.esc_html($rv_text).'</span>';
662
  }else{
663
+ echo '<span class="saswp-attached-rv-count">Attached 0</span>';
664
  }
665
 
666
  }else{
667
+ echo '<span class="saswp-attached-rv-count saswp_hide"> Attached 0</span>';
668
  }
669
 
670
  ?>
671
  </a>
672
  <div style="display:none;" id="saswp-embed-code-div">
673
+ <div class="saswp-add-rv-title"><?php echo esc_html__('Get reviews attached to the schema type with three different method.' ,'schema-and-structured-data-for-wp');?> <a target="_blank" href="https://structured-data-for-wp.com/docs/article/how-to-append-fetched-reviews-in-schema-markup/"><?php echo esc_html__('Learn More...' ,'schema-and-structured-data-for-wp');?></a></div>
674
  <div class="saswp-thick-box-container">
675
 
676
  <div class="saswp-add-rv-popup" id="saswp-global-tabs">
677
  <h2 class="nav-tab-wrapper">
678
+ <a class="nav-tab" data-id="saswp-add-rv-automatic"><?php echo esc_html__( 'Reviews' ,'schema-and-structured-data-for-wp');?></a>
679
+ <a class="nav-tab" data-id="saswp-add-rv-collection"><?php echo esc_html__( 'Collection' ,'schema-and-structured-data-for-wp');?></a>
680
+ <a class="nav-tab" data-id="saswp-add-rv-manual"><?php echo esc_html__( 'Shortcode' ,'schema-and-structured-data-for-wp');?></a>
681
  </h2>
682
  </div>
683
+
684
  <div class="saswp-global-container" id="saswp-add-rv-automatic">
685
+ <div class="saswp-add-rv-note"><strong><?php echo esc_html__( 'Note:' ,'schema-and-structured-data-for-wp');?></strong> <span><?php echo esc_html__( 'The attached reviews will only be added in Json-ld' ,'schema-and-structured-data-for-wp');?></span> </div>
686
+ <div data-type="review" class="saswp-add-rv-automatic-list">
687
 
688
  <?php
689
 
696
  foreach($reviews as $key => $val){
697
 
698
  $checked = '';
699
+ echo '<div class="saswp-add-rv-loop" data-type="review" data-id="'.esc_attr($val['saswp_review_id']).'">';
700
 
701
  if(is_array($attached_rv) && in_array($val['saswp_review_id'], $attached_rv)){
702
  $checked = 'checked';
717
  echo '<input id="saswp_attahced_reviews" type="hidden" name="saswp_attahced_reviews" value="'. esc_attr($attached_rv_json).'">';
718
  ?>
719
 
720
+ <div class="saswp-rv-not-found saswp_hide" data-type="review"><?php echo esc_html__( 'Reviews not found' ,'schema-and-structured-data-for-wp');?></div>
721
+ <span class="spinner" data-type="review"></span>
722
+ <div><a class="saswp-load-more-rv" data-type="review"><?php echo esc_html__( 'Load More...' ,'schema-and-structured-data-for-wp');?></a></div>
723
 
724
  </div>
725
+
726
+ <div class="saswp-global-container" id="saswp-add-rv-collection">
727
+ <div class="saswp-add-rv-note"><strong>Note:</strong> <span><?php echo esc_html__( 'The attached collection will only be added in Json-ld' ,'schema-and-structured-data-for-wp');?></span> </div>
728
+ <div data-type="collection" class="saswp-add-rv-automatic-list">
729
+
730
+ <?php
731
+
732
+ $review_service = new saswp_reviews_service();
733
+ $reviews = $review_service->saswp_get_collection_list(10,1);
734
+
735
+ if($reviews){
736
+
737
+ foreach($reviews as $key => $val){
738
+
739
+ $checked = '';
740
+ echo '<div class="saswp-add-rv-loop" data-type="collection" data-id="'.esc_attr($val['value']).'">';
741
+
742
+ if(is_array($attached_col) && in_array($val['value'], $attached_col)){
743
+ $checked = 'checked';
744
+ }
745
+
746
+ echo '<input class="saswp-attach-rv-checkbox" type="checkbox" '.$checked.'> <strong> '.esc_attr($val['label']).' </strong>';
747
+ echo '</div>';
748
+
749
+ }
750
+
751
+ }
752
+
753
+ ?>
754
+
755
+ </div>
756
+
757
+ <?php
758
+ echo '<input id="saswp_attached_collection" type="hidden" name="saswp_attached_collection" value="'. esc_attr($attached_col_json).'">';
759
+ ?>
760
+
761
+ <div class="saswp-rv-not-found saswp_hide" data-type="collection"><?php echo esc_html__( 'Reviews not found' ,'schema-and-structured-data-for-wp');?></div>
762
+ <span class="spinner" data-type="collection"></span>
763
+ <div><a class="saswp-load-more-rv" data-type="collection"><?php echo esc_html__( 'Load More...' ,'schema-and-structured-data-for-wp');?></a></div>
764
+
765
+ </div>
766
 
767
  <div class="saswp-global-container" id="saswp-add-rv-manual">
768
  <p> <?php echo esc_html__('Output reviews in front and its schema markup in source by using below shortcode' ,'schema-and-structured-data-for-wp');?> </p>
769
  <strong>[saswp-reviews]</strong><br>OR<br>
770
  <strong>[saswp-reviews-collection id="your collection id"]</strong>
771
  </div>
772
+ <a class="button button-default close-attached-reviews-popup"><?php echo esc_html__( 'OK' ,'schema-and-structured-data-for-wp');?></a>
773
  </div>
774
+
775
  </div>
776
  </td>
777
  </tr>
1045
  $schema_type = get_post_meta($post->ID, 'schema_type', true);
1046
 
1047
  $schema_fields = saswp_get_fields_by_schema_type($post->ID, null, $schema_type, 'manual');
1048
+ $output = $common_obj->saswp_saswp_post_specific($schema_type, $schema_fields, $post->ID, $post->ID, null, null, 1);
1049
 
1050
  if($schema_type == 'Review'){
1051
 
1054
  $item_reviewed = 'Book';
1055
  }
1056
  $response = saswp_get_fields_by_schema_type($post->ID, null, $item_reviewed);
1057
+ $output .= $common_obj->saswp_saswp_post_specific($schema_type, $response, $post->ID, $post->ID ,$item_reviewed, null, 1);
1058
 
1059
  }
1060
 
1084
  if ( !wp_verify_nonce( $_GET['saswp_security_nonce'], 'saswp_ajax_check_nonce' ) ){
1085
  return;
1086
  }
1087
+ $reviews = array();
1088
+ $offset = intval($_GET['offset']);
1089
+ $paged = intval($_GET['paged']);
1090
+ $data_type = sanitize_text_field($_GET['data_type']);
1091
 
1092
  if($paged && $offset){
1093
 
1094
+ $reviews_service = new saswp_reviews_service();
1095
+
1096
+ if($data_type == 'review'){
1097
+
1098
+ $reviews = $reviews_service->saswp_get_reviews_list_by_parameters(null, null, 10, $paged, $offset);
1099
+ }
1100
+
1101
+ if($data_type == 'collection'){
1102
+
1103
+ $collection = $reviews_service->saswp_get_collection_list(10, $paged, $offset);
1104
+
1105
+ if($collection){
1106
+
1107
+ foreach($collection as $col){
1108
+
1109
+ $reviews[] = array(
1110
+ 'saswp_review_id' => $col['value'],
1111
+ 'saswp_reviewer_name' => $col['label']
1112
+ );
1113
+
1114
+ }
1115
+ }
1116
+
1117
+ }
1118
 
1119
  if($reviews){
1120
  echo json_encode(array('status' => 't', 'result' => $reviews));
1144
 
1145
  $schema_fields = saswp_get_fields_by_schema_type($post_id, null, $schema_type, 'manual');
1146
 
1147
+ $output = $common_obj->saswp_saswp_post_specific($schema_type, $schema_fields, $post_id, $post_id, null, null, 1);
1148
 
1149
  echo $output;
1150
 
1177
  update_post_meta( $post_id, 'saswp_item_list_tags', sanitize_text_field($_POST['saswp_item_list_tags']) );
1178
  update_post_meta( $post_id, 'saswp_item_list_custom', sanitize_text_field($_POST['saswp_item_list_custom']) );
1179
  update_post_meta( $post_id, 'saswp_review_item_reviewed_'.$post_id, sanitize_text_field($_POST['saswp_review_item_reviewed_'.$post_id]) );
1180
+ update_post_meta( $post_id, 'saswp_itemlist_item_type', sanitize_text_field($_POST['saswp_itemlist_item_type']) );
1181
 
1182
  update_post_meta( $post_id, 'saswp_attahced_reviews', json_decode(wp_unslash($_POST['saswp_attahced_reviews'])) );
1183
+ update_post_meta( $post_id, 'saswp_attached_collection', json_decode(wp_unslash($_POST['saswp_attached_collection'])) );
1184
 
1185
  $common_obj = new saswp_view_common_class();
1186
 
1192
 
1193
  }
1194