Strong Testimonials - Version 2.32.2

Version Description

  • Dec 4, 2018 =
  • Add adjustable responsive breakpoints for carousels.
Download this release

Release Info

Developer cdillon27
Plugin Icon 128x128 Strong Testimonials
Version 2.32.2
Comparing to
See all releases

Code changes from version 2.32.1 to 2.32.2

Files changed (40) hide show
  1. admin/class-strong-testimonials-admin-list.php +19 -3
  2. admin/class-strong-testimonials-defaults.php +38 -5
  3. admin/class-strong-testimonials-page-shortcodes.php +1 -1
  4. admin/class-strong-testimonials-post-editor.php +18 -0
  5. admin/class-strong-testimonials-updater.php +59 -4
  6. admin/css/admin.css +4 -0
  7. admin/css/views.css +60 -10
  8. admin/js/admin-fields.js +1 -1
  9. admin/js/views.js +114 -19
  10. admin/partials/views/group-slideshow.php +1 -1
  11. admin/partials/views/option-client-section.php +6 -3
  12. admin/partials/views/option-slideshow-breakpoints.php +95 -0
  13. admin/partials/views/option-slideshow-navigation.php +1 -1
  14. admin/partials/views/option-slideshow-num.php +3 -47
  15. admin/partials/views/option-slideshow-transition.php +2 -2
  16. admin/partials/views/option-slideshow-type.php +19 -0
  17. admin/scss/_partials/_custom-fields.scss +0 -4
  18. admin/scss/_partials/_inner-table.scss +32 -0
  19. admin/scss/_partials/_misc.scss +44 -0
  20. admin/scss/_partials/_view-info.scss +8 -7
  21. admin/scss/views.scss +1 -0
  22. admin/settings/class-strong-testimonials-settings-compat.php +1 -1
  23. admin/views-ajax.php +14 -0
  24. admin/views-validate.php +29 -7
  25. admin/views.php +1 -1
  26. includes/class-strong-view-slideshow.php +31 -14
  27. includes/class-strong-view.php +1 -1
  28. includes/functions-activation.php +1 -1
  29. includes/functions-views.php +1 -1
  30. includes/functions.php +5 -1
  31. languages/strong-testimonials.pot +109 -44
  32. public/js/lib/form-validation/form-validation.js +1 -1
  33. public/js/lib/form-validation/form-validation.min.js +1 -1
  34. public/js/lib/strongslider/jquery.strongslider.js +95 -23
  35. public/js/lib/strongslider/jquery.strongslider.min.js +1 -1
  36. readme.txt +10 -1
  37. strong-testimonials.php +2 -2
  38. templates-scss/_partials/_structure-form.scss +1 -0
  39. templates/default-form/form.css +1 -0
  40. templates/simple-form/form.css +1 -0
admin/class-strong-testimonials-admin-list.php CHANGED
@@ -28,6 +28,24 @@ class Strong_Testimonials_Admin_List {
28
  add_action( 'restrict_manage_posts', array( __CLASS__, 'add_taxonomy_filters' ) );
29
  add_filter( 'manage_edit-wpm-testimonial_sortable_columns', array( __CLASS__, 'manage_sortable_columns' ) );
30
  add_action( 'manage_wpm-testimonial_posts_custom_column', array( __CLASS__, 'custom_columns' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  }
32
 
33
  /**
@@ -64,9 +82,7 @@ class Strong_Testimonials_Admin_List {
64
  }
65
 
66
  // 2. insert [order] after [cb]
67
- if ( ! self::is_column_sorted()
68
- && ! self::is_viewing_trash()
69
- && class_exists( 'Strong_Testimonials_Order' ) ) {
70
  $columns = array_merge(
71
  array_slice( $columns, 0, 1 ),
72
  array( 'handle' => 'Order' ),
28
  add_action( 'restrict_manage_posts', array( __CLASS__, 'add_taxonomy_filters' ) );
29
  add_filter( 'manage_edit-wpm-testimonial_sortable_columns', array( __CLASS__, 'manage_sortable_columns' ) );
30
  add_action( 'manage_wpm-testimonial_posts_custom_column', array( __CLASS__, 'custom_columns' ) );
31
+ add_filter( 'post_row_actions', array( __CLASS__, 'post_row_actions' ), 10, 2 );
32
+ }
33
+
34
+ /**
35
+ * Add post ID to post row actions.
36
+ *
37
+ * @param $actions
38
+ * @param $post
39
+ * @since 2.32.2
40
+ *
41
+ * @return array
42
+ */
43
+ public static function post_row_actions( $actions, $post ) {
44
+ if ( 'wpm-testimonial' == $post->post_type ) {
45
+ $actions = array( 'id' => '<span>ID: ' . $post->ID . '</span>' ) + $actions;
46
+ }
47
+
48
+ return $actions;
49
  }
50
 
51
  /**
82
  }
83
 
84
  // 2. insert [order] after [cb]
85
+ if ( ! self::is_column_sorted() && ! self::is_viewing_trash() && class_exists( 'Strong_Testimonials_Order' ) ) {
 
 
86
  $columns = array_merge(
87
  array_slice( $columns, 0, 1 ),
88
  array( 'handle' => 'Order' ),
admin/class-strong-testimonials-defaults.php CHANGED
@@ -721,15 +721,48 @@ class Strong_Testimonials_Defaults {
721
  'end_size' => 1,
722
  'mid_size' => 2,
723
  'prev_next' => 1,
724
- 'prev_text' => '&laquo; Previous',
725
- 'next_text' => 'Next &raquo;',
726
  'before_page_number' => '',
727
  'after_page_number' => '',
728
  ),
729
  'slideshow_settings' => array(
730
- 'max_slides' => 1,
731
- 'move_slides' => 1,
732
- 'margin' => 20,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
733
  'effect' => 'fade',
734
  'speed' => 1,
735
  'pause' => 8,
721
  'end_size' => 1,
722
  'mid_size' => 2,
723
  'prev_next' => 1,
724
+ 'prev_text' => __( '&laquo; Previous', 'strong-testimonials' ),
725
+ 'next_text' => __( 'Next &raquo;', 'strong-testimonials' ),
726
  'before_page_number' => '',
727
  'after_page_number' => '',
728
  ),
729
  'slideshow_settings' => array(
730
+ 'type' => 'show_single', // or show_multiple
731
+ 'show_single' => array(
732
+ 'max_slides' => 1,
733
+ 'move_slides' => 1,
734
+ 'margin' => 1,
735
+ ),
736
+ 'breakpoints' => array(
737
+ 'desktop' => array(
738
+ 'description' => 'Desktop',
739
+ 'width' => 1200,
740
+ 'max_slides' => 2,
741
+ 'move_slides' => 1,
742
+ 'margin' => 20,
743
+ ),
744
+ 'large' => array(
745
+ 'description' => 'Large',
746
+ 'width' => 1024,
747
+ 'max_slides' => 2,
748
+ 'move_slides' => 1,
749
+ 'margin' => 20,
750
+ ),
751
+ 'medium' => array(
752
+ 'description' => 'Medium',
753
+ 'width' => 640,
754
+ 'max_slides' => 1,
755
+ 'move_slides' => 1,
756
+ 'margin' => 10,
757
+ ),
758
+ 'small' => array(
759
+ 'description' => 'Small',
760
+ 'width' => 480,
761
+ 'max_slides' => 1,
762
+ 'move_slides' => 1,
763
+ 'margin' => 1,
764
+ ),
765
+ ),
766
  'effect' => 'fade',
767
  'speed' => 1,
768
  'pause' => 8,
admin/class-strong-testimonials-page-shortcodes.php CHANGED
@@ -31,7 +31,7 @@ class Strong_Testimonials_Page_Shortcodes {
31
 
32
  <h1><?php _e( 'Shortcodes', 'strong-testimonials' ); ?></h1>
33
 
34
- <p><?php printf( wp_kses( __( 'Open a <a href="%s" target="_blank">support ticket</a> if you need help.', 'strong-testimonials' ), $tags ), esc_url( 'https://support.strongplugins.com/new-ticket/' ) ); ?></p>
35
 
36
  <h2><?php _e( 'Testimonial Views', 'strong-testimonials' ); ?></h2>
37
 
31
 
32
  <h1><?php _e( 'Shortcodes', 'strong-testimonials' ); ?></h1>
33
 
34
+ <p><?php printf( wp_kses( __( 'Open a <a href="%s" target="_blank">support ticket</a> if you need help.', 'strong-testimonials' ), $tags ), wpmtst_support_url() ); ?></p>
35
 
36
  <h2><?php _e( 'Testimonial Views', 'strong-testimonials' ); ?></h2>
37
 
admin/class-strong-testimonials-post-editor.php CHANGED
@@ -27,6 +27,7 @@ class Strong_Testimonials_Post_Editor {
27
  add_action( 'add_meta_boxes_wpm-testimonial', array( __CLASS__, 'add_meta_boxes' ) );
28
  add_action( 'save_post_wpm-testimonial', array( __CLASS__, 'save_details' ) );
29
  add_action( 'wp_ajax_wpmtst_edit_rating', array( __CLASS__, 'edit_rating' ) );
 
30
  }
31
 
32
  /**
@@ -303,6 +304,23 @@ class Strong_Testimonials_Post_Editor {
303
  }
304
  }
305
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
306
  /**
307
  * Ajax handler to edit a rating.
308
  *
27
  add_action( 'add_meta_boxes_wpm-testimonial', array( __CLASS__, 'add_meta_boxes' ) );
28
  add_action( 'save_post_wpm-testimonial', array( __CLASS__, 'save_details' ) );
29
  add_action( 'wp_ajax_wpmtst_edit_rating', array( __CLASS__, 'edit_rating' ) );
30
+ add_filter( 'wp_insert_post_data', array( __CLASS__, 'prevent_shortcode' ), 10, 2 );
31
  }
32
 
33
  /**
304
  }
305
  }
306
 
307
+ /**
308
+ * Prevent use of this plugin's shortcode in a testimonial.
309
+ *
310
+ * @since 2.32.2
311
+ * @param $data
312
+ * @param $postarr
313
+ *
314
+ * @return mixed
315
+ */
316
+ public static function prevent_shortcode( $data, $postarr ) {
317
+ if ( 'wpm-testimonial' == $data['post_type'] ) {
318
+ $data['post_content'] = preg_replace( "/\[testimonial_view (.*)\]/", '', $data['post_content'] );
319
+ }
320
+
321
+ return $data;
322
+ }
323
+
324
  /**
325
  * Ajax handler to edit a rating.
326
  *
admin/class-strong-testimonials-updater.php CHANGED
@@ -753,6 +753,16 @@ class Strong_Testimonials_Updater {
753
  $this->update_history_log( '2.30_new_template_structure' );
754
  }
755
 
 
 
 
 
 
 
 
 
 
 
756
  /**
757
  * Merge in new default values.
758
  * Merge nested arrays individually. Don't use array_merge_recursive.
@@ -782,8 +792,7 @@ class Strong_Testimonials_Updater {
782
  if ( ! isset( $view['data']['pagination_settings']['per_page'] ) || ! $view['data']['pagination_settings']['per_page'] ) {
783
  $view['data']['pagination_settings']['per_page'] = 5;
784
  }
785
- }
786
- else {
787
  $view['data']['pagination_settings'] = $default_view['pagination_settings'];
788
  }
789
 
@@ -792,8 +801,7 @@ class Strong_Testimonials_Updater {
792
  */
793
  if ( isset( $view_data['slideshow_settings'] ) ) {
794
  $view['data']['slideshow_settings'] = array_merge( $default_view['slideshow_settings'], $view_data['slideshow_settings'] );
795
- }
796
- else {
797
  $view['data']['slideshow_settings'] = $default_view['slideshow_settings'];
798
  }
799
  ksort( $view['data']['slideshow_settings'] );
@@ -806,6 +814,53 @@ class Strong_Testimonials_Updater {
806
  } // foreach $view
807
  }
808
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
809
  /**
810
  * Convert template naming structure.
811
  *
753
  $this->update_history_log( '2.30_new_template_structure' );
754
  }
755
 
756
+ /**
757
+ * Add carousel breakpoints.
758
+ *
759
+ * @since 2.32.2
760
+ */
761
+ if ( ! isset( $history['2.32.2_carousel_breakpoints'] ) ) {
762
+ $view['data'] = $this->add_carousel_breakpoints( $view_data );
763
+ $this->update_history_log( '2.32.2_carousel_breakpoints' );
764
+ }
765
+
766
  /**
767
  * Merge in new default values.
768
  * Merge nested arrays individually. Don't use array_merge_recursive.
792
  if ( ! isset( $view['data']['pagination_settings']['per_page'] ) || ! $view['data']['pagination_settings']['per_page'] ) {
793
  $view['data']['pagination_settings']['per_page'] = 5;
794
  }
795
+ } else {
 
796
  $view['data']['pagination_settings'] = $default_view['pagination_settings'];
797
  }
798
 
801
  */
802
  if ( isset( $view_data['slideshow_settings'] ) ) {
803
  $view['data']['slideshow_settings'] = array_merge( $default_view['slideshow_settings'], $view_data['slideshow_settings'] );
804
+ } else {
 
805
  $view['data']['slideshow_settings'] = $default_view['slideshow_settings'];
806
  }
807
  ksort( $view['data']['slideshow_settings'] );
814
  } // foreach $view
815
  }
816
 
817
+ /**
818
+ * Add carousel breakpoints.
819
+ *
820
+ * @param array $view_data
821
+ * @since 2.32.2
822
+ *
823
+ * @return array
824
+ */
825
+ public function add_carousel_breakpoints( $view_data ) {
826
+ if ( ! isset( $view_data['slideshow_settings']['max_slides'] ) ) {
827
+ return $view_data;
828
+ }
829
+
830
+ if ( 1 == $view_data['slideshow_settings']['max_slides'] ) {
831
+
832
+ // Convert to single
833
+ $view_data['slideshow_settings']['type'] = 'show_single';
834
+
835
+ $view_data['slideshow_settings']['show_single'] = array(
836
+ 'max_slides' => $view_data['slideshow_settings']['max_slides'],
837
+ 'move_slides' => $view_data['slideshow_settings']['move_slides'],
838
+ 'margin' => 1,
839
+ );
840
+
841
+ } else {
842
+
843
+ // Convert to multiple
844
+ $view_data['slideshow_settings']['type'] = 'show_multiple';
845
+
846
+ $view_data['slideshow_settings']['breakpoints']['desktop'] = array(
847
+ 'max_slides' => $view_data['slideshow_settings']['max_slides'],
848
+ 'move_slides' => $view_data['slideshow_settings']['move_slides'],
849
+ 'margin' => 1,
850
+ );
851
+
852
+ }
853
+
854
+ // Remove old values
855
+ unset(
856
+ $view_data['slideshow_settings']['max_slides'],
857
+ $view_data['slideshow_settings']['move_slides'],
858
+ $view_data['slideshow_settings']['margin']
859
+ );
860
+
861
+ return $view_data;
862
+ }
863
+
864
  /**
865
  * Convert template naming structure.
866
  *
admin/css/admin.css CHANGED
@@ -816,4 +816,8 @@ ul.standard {
816
  }
817
  .wpmtst.shortcodes table.inner tr:first-child td {
818
  border-bottom: 1px solid #DDD;
 
 
 
 
819
  }
816
  }
817
  .wpmtst.shortcodes table.inner tr:first-child td {
818
  border-bottom: 1px solid #DDD;
819
+ }
820
+
821
+ .wp-list-table .type-wpm-testimonial .row-actions span.id span {
822
+ color: #777;
823
  }
admin/css/views.css CHANGED
@@ -83,23 +83,23 @@ optgroup option {
83
  Copy shortcode button
84
  ------------------------------------------------- */
85
  #copy-shortcode {
86
- display: inline-block;
87
- margin: 5px 1em 0;
88
  line-height: 26px; }
89
 
90
  #copy-message {
91
  opacity: 0;
92
  font-size: 14px;
93
- line-height: 22px;
94
- height: 24px;
95
- padding: 0 6px;
 
96
  display: inline-block;
97
  background: #00A4F3;
98
  color: #FFF;
99
  border-radius: 3px;
100
- box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.4);
101
  position: relative;
102
- top: -2px; }
103
 
104
  #copy-message.copied {
105
  opacity: 0;
@@ -275,6 +275,38 @@ td.rowspan {
275
  .label-not-adjacent {
276
  margin-right: 0.3em; }
277
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  .screenshot {
279
  margin: 10px; }
280
  .screenshot > div {
@@ -872,9 +904,6 @@ div.help {
872
  font-style: italic;
873
  padding-bottom: 5px; }
874
 
875
- #add-field-bar {
876
- margin-top: 10px; }
877
-
878
  @-moz-document url-prefix() {
879
  select optgroup {
880
  font-style: normal;
@@ -951,6 +980,27 @@ table.wpmtst-help-tab {
951
  right: 0;
952
  background: rgba(255, 255, 255, 0.7); }
953
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
954
  .form-table td p.description.normal {
955
  font-style: normal; }
956
 
83
  Copy shortcode button
84
  ------------------------------------------------- */
85
  #copy-shortcode {
86
+ margin: 5px 1em;
 
87
  line-height: 26px; }
88
 
89
  #copy-message {
90
  opacity: 0;
91
  font-size: 14px;
92
+ line-height: 26px;
93
+ height: 26px;
94
+ padding: 0 10px;
95
+ margin: 0;
96
  display: inline-block;
97
  background: #00A4F3;
98
  color: #FFF;
99
  border-radius: 3px;
100
+ box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);
101
  position: relative;
102
+ top: -1px; }
103
 
104
  #copy-message.copied {
105
  opacity: 0;
275
  .label-not-adjacent {
276
  margin-right: 0.3em; }
277
 
278
+ .is-below {
279
+ margin-top: 10px; }
280
+
281
+ /* -------------------------------------------------
282
+ Restore Default Breakpoints button
283
+ ------------------------------------------------- */
284
+ #restored-message {
285
+ opacity: 0;
286
+ line-height: 26px;
287
+ height: 26px;
288
+ padding: 0 10px;
289
+ margin: 1px 1em;
290
+ display: inline-block;
291
+ background: #00A4F3;
292
+ color: #FFF;
293
+ border-radius: 3px;
294
+ box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);
295
+ position: relative;
296
+ top: -1px; }
297
+
298
+ #restored-message.copied {
299
+ opacity: 0;
300
+ will-change: opacity;
301
+ animation: showcopied 2s ease; }
302
+
303
+ @keyframes showcopied {
304
+ 0% {
305
+ opacity: 0; }
306
+ 70% {
307
+ opacity: 1; }
308
+ 100% {
309
+ opacity: 0; } }
310
  .screenshot {
311
  margin: 10px; }
312
  .screenshot > div {
904
  font-style: italic;
905
  padding-bottom: 5px; }
906
 
 
 
 
907
  @-moz-document url-prefix() {
908
  select optgroup {
909
  font-style: normal;
980
  right: 0;
981
  background: rgba(255, 255, 255, 0.7); }
982
 
983
+ /* -------------------------------------------------
984
+ Inner table
985
+ ------------------------------------------------- */
986
+ .inner-table {
987
+ display: table; }
988
+
989
+ .inner-table-row {
990
+ display: table-row; }
991
+ .inner-table-row.bordered {
992
+ border: 1px solid #DDD; }
993
+ .inner-table-row.header .inner-table-cell {
994
+ text-align: center;
995
+ padding: 0 10px;
996
+ background: #f6f6f6; }
997
+
998
+ .inner-table-cell {
999
+ display: table-cell;
1000
+ padding: 5px 10px; }
1001
+ .inner-table-cell:not(:last-child) {
1002
+ border-right: 1px dashed #e2e2e2; }
1003
+
1004
  .form-table td p.description.normal {
1005
  font-style: normal; }
1006
 
admin/js/admin-fields.js CHANGED
@@ -169,7 +169,7 @@ function sanitizeName(label) {
169
  /**
170
  * Prevent single click on handle from opening accordion
171
  */
172
- $fieldList.on("click", "span.handle", function () {
173
  e.stopImmediatePropagation();
174
  e.preventDefault();
175
  });
169
  /**
170
  * Prevent single click on handle from opening accordion
171
  */
172
+ $fieldList.on("click", "span.handle", function (e) {
173
  e.stopImmediatePropagation();
174
  e.preventDefault();
175
  });
admin/js/views.js CHANGED
@@ -1112,50 +1112,145 @@ jQuery(document).ready(function ($) {
1112
  /**
1113
  * Slider|Carousel change listener
1114
  */
1115
- var $maxSlides = $('#view-max_slides');
1116
  var $effect = $('#view-effect');
1117
  var $position = $('view-slideshow_nav_position');
1118
 
1119
- var maxSlidesUpdate = function () {
1120
- var maxSlidesValue = parseInt($maxSlides.val());
1121
- if (maxSlidesValue > 1) {
1122
  $effect.find('option[value=\'horizontal\']').prop('selected', true);
1123
  $position.find('option[value=\'outside\']').prop('selected', true);
1124
 
1125
- $maxSlides.siblings('.option-desc.singular').hide();
1126
- $maxSlides.siblings('.option-desc.plural').showInlineBlock();
1127
  } else {
1128
- $maxSlides.siblings('.option-desc.singular').showInlineBlock();
1129
- $maxSlides.siblings('.option-desc.plural').hide();
1130
  }
1131
 
1132
  $effect.change();
1133
  $position.change();
1134
  };
1135
 
1136
- maxSlidesUpdate();
1137
 
1138
- $maxSlides.on('change', maxSlidesUpdate);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1139
 
1140
  /**
1141
  * MoveSlides change listener
1142
  */
1143
- var $moveSlides = $('#view-move_slides');
1144
 
1145
- var moveSlidesUpdate = function () {
1146
- var moveSlidesValue = parseInt($moveSlides.val());
 
 
1147
  if (moveSlidesValue > 1) {
1148
- $moveSlides.siblings('.option-desc.singular').hide();
1149
- $moveSlides.siblings('.option-desc.plural').showInlineBlock();
1150
  } else {
1151
- $moveSlides.siblings('.option-desc.singular').showInlineBlock();
1152
- $moveSlides.siblings('.option-desc.plural').hide();
1153
  }
1154
  };
1155
 
1156
- moveSlidesUpdate();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1157
 
1158
- $moveSlides.on('change', moveSlidesUpdate);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1159
 
1160
  })(jQuery);
1161
 
1112
  /**
1113
  * Slider|Carousel change listener
1114
  */
1115
+ var $sliderType = $('#view-slider_type');
1116
  var $effect = $('#view-effect');
1117
  var $position = $('view-slideshow_nav_position');
1118
 
1119
+ var sliderTypeUpdate = function () {
1120
+ if ($sliderType.val() === 'show_multiple') {
 
1121
  $effect.find('option[value=\'horizontal\']').prop('selected', true);
1122
  $position.find('option[value=\'outside\']').prop('selected', true);
1123
 
1124
+ $sliderType.parent().siblings('.option-desc.singular').hide();
1125
+ $sliderType.parent().siblings('.option-desc.plural').showInlineBlock();
1126
  } else {
1127
+ $sliderType.parent().siblings('.option-desc.singular').showInlineBlock();
1128
+ $sliderType.parent().siblings('.option-desc.plural').hide();
1129
  }
1130
 
1131
  $effect.change();
1132
  $position.change();
1133
  };
1134
 
1135
+ sliderTypeUpdate();
1136
 
1137
+ $sliderType.on('change', sliderTypeUpdate);
1138
+
1139
+ /**
1140
+ * MaxSlides change listener
1141
+ */
1142
+ var $maxSlides = $('[id^=\'view-max_slides\']');
1143
+
1144
+ // Update display
1145
+ var maxSlidesUpdateValue = function (el) {
1146
+ var $el = $(el);
1147
+ var maxSlidesValue = parseInt($el.val());
1148
+ if (maxSlidesValue > 1) {
1149
+ $el.parent().siblings('.option-desc.singular').hide();
1150
+ $el.parent().siblings('.option-desc.plural').showInlineBlock();
1151
+ } else {
1152
+ $el.parent().siblings('.option-desc.singular').showInlineBlock();
1153
+ $el.parent().siblings('.option-desc.plural').hide();
1154
+ }
1155
+ };
1156
+
1157
+ // Initial display
1158
+ $maxSlides.each( function (index, el) {
1159
+ maxSlidesUpdateValue(el);
1160
+ });
1161
+
1162
+ // Update on change
1163
+ var maxSlidesUpdate = function (e) {
1164
+ maxSlidesUpdateValue( $(e.target) );
1165
+ };
1166
+
1167
+ // Event listener
1168
+ $maxSlides.each( function (index, el) {
1169
+ $(el).on('change', maxSlidesUpdate);
1170
+ });
1171
 
1172
  /**
1173
  * MoveSlides change listener
1174
  */
1175
+ var $moveSlides = $('[id^=\'view-move_slides\']');
1176
 
1177
+ // Update display
1178
+ var moveSlidesUpdateValue = function (el) {
1179
+ var $el = $(el);
1180
+ var moveSlidesValue = parseInt($el.val());
1181
  if (moveSlidesValue > 1) {
1182
+ $el.parent().siblings('.option-desc.singular').hide();
1183
+ $el.parent().siblings('.option-desc.plural').showInlineBlock();
1184
  } else {
1185
+ $el.parent().siblings('.option-desc.singular').showInlineBlock();
1186
+ $el.parent().siblings('.option-desc.plural').hide();
1187
  }
1188
  };
1189
 
1190
+ // Initial display
1191
+ $moveSlides.each( function (index, el) {
1192
+ moveSlidesUpdateValue(el);
1193
+ });
1194
+
1195
+ // Update on change
1196
+ var moveSlidesUpdate = function (e) {
1197
+ moveSlidesUpdateValue( $(e.target) );
1198
+ };
1199
+
1200
+ // Event listener
1201
+ $moveSlides.each( function (index, el) {
1202
+ $(el).on('change', moveSlidesUpdate);
1203
+ });
1204
+
1205
+ /**
1206
+ * Restore default breakpoints
1207
+ */
1208
+ $('#restore-default-breakpoints').click(function (e) {
1209
+ var data = {
1210
+ 'action': 'wpmtst_restore_default_breakpoints'
1211
+ };
1212
+
1213
+ $.get(ajaxurl, data, function (response) {
1214
+
1215
+ var object = JSON.parse(response);
1216
+ var targetId;
1217
+ var el;
1218
+
1219
+ for (var key in object) {
1220
+
1221
+ if (object.hasOwnProperty(key)) {
1222
+
1223
+ // width
1224
+ targetId = 'view-breakpoint_' + key;
1225
+ el = $('[id="' + targetId + '"]');
1226
+ el.val(parseInt(object[key].width));
1227
+
1228
+ // max_slides
1229
+ targetId = 'view-max_slides_' + key;
1230
+ el = $('[id="' + targetId + '"]');
1231
+ el.val(parseInt(object[key].max_slides));
1232
 
1233
+ // margin
1234
+ targetId = 'view-margin_' + key;
1235
+ el = $('[id="' + targetId + '"]');
1236
+ el.val(parseInt(object[key].margin));
1237
+
1238
+ // move_slides
1239
+ targetId = 'view-move_slides_' + key;
1240
+ el = $('[id="' + targetId + '"]');
1241
+ el.val(parseInt(object[key].move_slides));
1242
+
1243
+ }
1244
+
1245
+ }
1246
+
1247
+ document.getElementById('restored-message').classList.add('copied');
1248
+ setTimeout(function () {
1249
+ document.getElementById('restored-message').classList.remove('copied');
1250
+ }, 2000);
1251
+
1252
+ });
1253
+ });
1254
 
1255
  })(jQuery);
1256
 
admin/partials/views/group-slideshow.php CHANGED
@@ -15,7 +15,7 @@ $then_classes = array(
15
  </h3>
16
  <table class="form-table multiple group-select">
17
  <tr>
18
- <?php include( 'option-slideshow-num.php' ); ?>
19
  </tr>
20
  <tr>
21
  <?php include( 'option-slideshow-transition.php' ); ?>
15
  </h3>
16
  <table class="form-table multiple group-select">
17
  <tr>
18
+ <?php include( 'option-slideshow-num.php' ); ?>
19
  </tr>
20
  <tr>
21
  <?php include( 'option-slideshow-transition.php' ); ?>
admin/partials/views/option-client-section.php CHANGED
@@ -18,9 +18,12 @@
18
 
19
  </div>
20
 
21
- <div id="add-field-bar">
22
- <input id="add-field" type="button" class="button-secondary" name="add-field"
23
- value="<?php _e( 'Add Field', 'strong-testimonials' ); ?>">
 
 
 
24
  </div>
25
 
26
  </td>
18
 
19
  </div>
20
 
21
+ <div id="add-field-bar" class="is-below">
22
+ <input id="add-field"
23
+ type="button"
24
+ name="add-field"
25
+ value="<?php _e( 'Add Field', 'strong-testimonials' ); ?>"
26
+ class="button-secondary" />
27
  </div>
28
 
29
  </td>
admin/partials/views/option-slideshow-breakpoints.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /* translators: In the view editor. */ ?>
2
+ <div class="inline then then_slider_type then_not_show_single then_show_multiple" style="display: none;">
3
+ <div class="row">
4
+
5
+ <div class="inner-table is-below">
6
+ <div class="inner-table-row bordered header">
7
+ <div class="inner-table-cell">
8
+ <?php _e( 'minimum screen width', 'strong-testimonials' ); ?>
9
+ </div>
10
+ <div class="inner-table-cell">
11
+ <?php _e( 'show', 'strong-testimonials' ); ?>
12
+ </div>
13
+ <div class="inner-table-cell">
14
+ <?php _e( 'margin', 'strong-testimonials' ); ?>
15
+ </div>
16
+ <div class="inner-table-cell">
17
+ <?php _e( 'move', 'strong-testimonials' ); ?>
18
+ </div>
19
+ </div>
20
+
21
+ <?php foreach ( $view['slideshow_settings']['breakpoints'] as $key => $breakpoint ) : ?>
22
+ <div class="inner-table-row bordered">
23
+
24
+ <div class="inner-table-cell">
25
+ <label>
26
+ <input id="view-breakpoint_<?php echo $key; ?>"
27
+ name="view[data][slideshow_settings][breakpoints][<?php echo $key; ?>][width]"
28
+ value="<?php echo $breakpoint['width']; ?>"
29
+ type="number"
30
+ class="input-incremental"> px
31
+ </label>
32
+ </div>
33
+
34
+ <div class="inner-table-cell">
35
+ <label>
36
+ <select id="view-max_slides_<?php echo $key; ?>"
37
+ name="view[data][slideshow_settings][breakpoints][<?php echo $key; ?>][max_slides]"
38
+ class="if selectgroup">
39
+ <option value="1" <?php selected( $breakpoint['max_slides'], 1 ); ?>>1</option>
40
+ <option value="2" <?php selected( $breakpoint['max_slides'], 2 ); ?>>2</option>
41
+ <option value="3" <?php selected( $breakpoint['max_slides'], 3 ); ?>>3</option>
42
+ <option value="4" <?php selected( $breakpoint['max_slides'], 4 ); ?>>4</option>
43
+ </select>
44
+ </label>
45
+ <div class="option-desc singular" style="display: none;">
46
+ <?php _e( 'slide', 'strong-testimonials' ); ?>
47
+ </div>
48
+ <div class="option-desc plural" style="display: none;">
49
+ <?php _e( 'slides', 'strong-testimonials' ); ?>
50
+ </div>
51
+ </div>
52
+
53
+ <div class="inner-table-cell">
54
+ <input id="view-margin_<?php echo $key; ?>"
55
+ name="view[data][slideshow_settings][breakpoints][<?php echo $key; ?>][margin]"
56
+ value="<?php echo $breakpoint['margin']; ?>"
57
+ type="number" min="1" step="1" size="3"
58
+ class="input-incremental"/> px
59
+ </div>
60
+
61
+ <div class="inner-table-cell">
62
+ <label>
63
+ <select id="view-move_slides_<?php echo $key; ?>"
64
+ name="view[data][slideshow_settings][breakpoints][<?php echo $key; ?>][move_slides]"
65
+ class="if selectgroup">
66
+ <option value="1" <?php selected( $breakpoint['move_slides'], 1 ); ?>>1</option>
67
+ <option value="2" <?php selected( $breakpoint['move_slides'], 2 ); ?>>2</option>
68
+ <option value="3" <?php selected( $breakpoint['move_slides'], 3 ); ?>>3</option>
69
+ <option value="4" <?php selected( $breakpoint['move_slides'], 4 ); ?>>4</option>
70
+ </select>
71
+ </label>
72
+ <div class="option-desc singular" style="display: none;">
73
+ <?php _e( 'slide', 'strong-testimonials' ); ?>
74
+ </div>
75
+ <div class="option-desc plural" style="display: none;">
76
+ <?php _e( 'slides', 'strong-testimonials' ); ?>
77
+ </div>
78
+ </div>
79
+
80
+ </div>
81
+
82
+ <?php endforeach; ?>
83
+ </div>
84
+
85
+ </div>
86
+
87
+ <div class="is-below">
88
+ <input id="restore-default-breakpoints"
89
+ type="button"
90
+ name="restore-default-breakpoints"
91
+ value="<?php _e( 'Restore Default Breakpoints', 'strong-testimonials' ); ?>"
92
+ class="button-secondary" />
93
+ <span id="restored-message"><?php _e( 'defaults restored', 'strong-testimonials' ); ?></span>
94
+ </div>
95
+ </div>
admin/partials/views/option-slideshow-navigation.php CHANGED
@@ -82,7 +82,7 @@
82
  <div class="row">
83
  <div class="row-inner">
84
 
85
- <div class="then then_max_slides then_1 then_not_2 then_not_3" style="display: none;">
86
  <div class="inline then then_has-position" style="display: none;">
87
  <label for="view-slideshow_nav_position"><?php _e( 'Position', 'strong-testimonials' ); ?></label>
88
 
82
  <div class="row">
83
  <div class="row-inner">
84
 
85
+ <div class="then then_slider_type then_show_single then_not_show_multiple" style="display: none;">
86
  <div class="inline then then_has-position" style="display: none;">
87
  <label for="view-slideshow_nav_position"><?php _e( 'Position', 'strong-testimonials' ); ?></label>
88
 
admin/partials/views/option-slideshow-num.php CHANGED
@@ -1,52 +1,8 @@
1
  <?php /* translators: In the view editor. */ ?>
2
  <th>
3
- <?php _e( 'Number', 'strong-testimonials' ); ?>
4
  </th>
5
  <td>
6
- <div class="row">
7
-
8
- <div class="inline inline-middle">
9
- <label for="view-max_slides">
10
- <?php _e( 'Show', 'strong-testimonials' ); ?>
11
- </label>
12
- <select id="view-max_slides" name="view[data][slideshow_settings][max_slides]" class="if selectgroup">
13
- <option value="1" <?php selected( $view['slideshow_settings']['max_slides'], 1 ); ?>>1</option>
14
- <option value="2" <?php selected( $view['slideshow_settings']['max_slides'], 2 ); ?>>2</option>
15
- <option value="3" <?php selected( $view['slideshow_settings']['max_slides'], 3 ); ?>>3</option>
16
- </select>
17
- <div class="option-desc singular" style="display: none;">
18
- <?php _e( 'slide at a time', 'strong-testimonials' ); ?>
19
- </div>
20
- <div class="option-desc plural" style="display: none;">
21
- <?php _e( 'slides at a time', 'strong-testimonials' ); ?>
22
- </div>
23
- </div>
24
-
25
- <div class="inline inline-middle then then_max_slides then_not_1 then_2 then_3" style="display: none;">
26
- <label for="view-margin">
27
- <?php _ex( 'with a margin of', 'strong-testimonials' ); ?>
28
- </label>
29
- <input type="number" id="view-margin" class="input-incremental"
30
- name="view[data][slideshow_settings][margin]" min="1" step="1"
31
- value="<?php echo $view['slideshow_settings']['margin']; ?>" size="3"/> px
32
- </div>
33
-
34
- <div class="inline inline-middle then then_max_slides then_not_1 then_2 then_3" style="display: none;">
35
- <label for="view-move_slides">
36
- <?php _ex( 'and move', 'strong-testimonials' ); ?>
37
- </label>
38
- <select id="view-move_slides" name="view[data][slideshow_settings][move_slides]" class="if selectgroup">
39
- <option value="1" <?php selected( $view['slideshow_settings']['move_slides'], 1 ); ?>>1</option>
40
- <option value="2" <?php selected( $view['slideshow_settings']['move_slides'], 2 ); ?>>2</option>
41
- <option value="3" <?php selected( $view['slideshow_settings']['move_slides'], 3 ); ?>>3</option>
42
- </select>
43
- <div class="option-desc singular" style="display: none;">
44
- <?php _e( 'slide at a time', 'strong-testimonials' ); ?>
45
- </div>
46
- <div class="option-desc plural" style="display: none;">
47
- <?php _e( 'slides at a time', 'strong-testimonials' ); ?>
48
- </div>
49
- </div>
50
-
51
- </div>
52
  </td>
1
  <?php /* translators: In the view editor. */ ?>
2
  <th>
3
+ <?php _e( 'Show', 'strong-testimonials' ); ?>
4
  </th>
5
  <td>
6
+ <?php include( 'option-slideshow-type.php' ); ?>
7
+ <?php include( 'option-slideshow-breakpoints.php' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  </td>
admin/partials/views/option-slideshow-transition.php CHANGED
@@ -15,7 +15,7 @@
15
  <?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
16
  </div>
17
 
18
- <div class="inline inline-middle then then_max_slides then_1 then_not_2 then_not_3 fast" style="display: none;">
19
  <label for="view-effect">
20
  <?php _e( 'then', 'strong-testimonials' ); ?>
21
  </label>
@@ -28,7 +28,7 @@
28
  </select>
29
  </div>
30
 
31
- <div class="inline inline-middle then then_max_slides then_not_1 then_2 then_3 fast" style="display: none;">
32
  <?php _e( 'then', 'strong-testimonials' ); ?> <?php _ex( 'scroll horizontally', 'slideshow transition option', 'strong-testimonials' ); ?>
33
  </div>
34
 
15
  <?php _ex( 'seconds', 'time setting', 'strong-testimonials' ); ?>
16
  </div>
17
 
18
+ <div class="inline inline-middle then then_slider_type then_show_single then_not_show_multiple fast" style="display: none;">
19
  <label for="view-effect">
20
  <?php _e( 'then', 'strong-testimonials' ); ?>
21
  </label>
28
  </select>
29
  </div>
30
 
31
+ <div class="inline inline-middle then then_slider_type then_not_show_single then_show_multiple fast" style="display: none;">
32
  <?php _e( 'then', 'strong-testimonials' ); ?> <?php _ex( 'scroll horizontally', 'slideshow transition option', 'strong-testimonials' ); ?>
33
  </div>
34
 
admin/partials/views/option-slideshow-type.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /* translators: In the view editor. */ ?>
2
+ <div class="row">
3
+
4
+ <div class="inline inline-middle">
5
+ <label>
6
+ <select id="view-slider_type" name="view[data][slideshow_settings][type]" class="if selectgroup">
7
+ <option value="show_single" <?php selected( $view['slideshow_settings']['type'], 'show_single' ); ?>><?php _e( 'single', 'strong-testimonials' ); ?></option>
8
+ <option value="show_multiple" <?php selected( $view['slideshow_settings']['type'], 'show_multiple' ); ?>><?php _e( 'multiple', 'strong-testimonials' ); ?></option>
9
+ </select>
10
+ </label>
11
+ <div class="option-desc singular" style="display: none;">
12
+ <?php _e( 'slide at a time', 'strong-testimonials' ); ?>
13
+ </div>
14
+ <div class="option-desc plural" style="display: none;">
15
+ <?php _e( 'slides at a time with these responsive breakpoints:', 'strong-testimonials' ); ?>
16
+ </div>
17
+ </div>
18
+
19
+ </div>
admin/scss/_partials/_custom-fields.scss CHANGED
@@ -160,10 +160,6 @@ div.help {
160
  padding-bottom: 5px;
161
  }
162
 
163
- #add-field-bar {
164
- margin-top: 10px;
165
- }
166
-
167
  @-moz-document url-prefix() {
168
  select optgroup {
169
  font-style: normal;
160
  padding-bottom: 5px;
161
  }
162
 
 
 
 
 
163
  @-moz-document url-prefix() {
164
  select optgroup {
165
  font-style: normal;
admin/scss/_partials/_inner-table.scss ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* -------------------------------------------------
2
+ Inner table
3
+ ------------------------------------------------- */
4
+
5
+ .inner-table {
6
+ display: table;
7
+ }
8
+
9
+ .inner-table-row {
10
+ display: table-row;
11
+
12
+ &.bordered {
13
+ border: 1px solid #DDD;
14
+ }
15
+
16
+ &.header {
17
+ .inner-table-cell {
18
+ text-align: center;
19
+ padding: 0 10px;
20
+ background: #f6f6f6;
21
+ }
22
+ }
23
+ }
24
+
25
+ .inner-table-cell {
26
+ display: table-cell;
27
+ padding: 5px 10px;
28
+
29
+ &:not(:last-child) {
30
+ border-right: 1px dashed #e2e2e2;
31
+ }
32
+ }
admin/scss/_partials/_misc.scss CHANGED
@@ -47,3 +47,47 @@ td.rowspan {
47
  .label-not-adjacent {
48
  margin-right: 0.3em;
49
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  .label-not-adjacent {
48
  margin-right: 0.3em;
49
  }
50
+
51
+ .is-below {
52
+ margin-top: 10px;
53
+ }
54
+
55
+ /* -------------------------------------------------
56
+ Restore Default Breakpoints button
57
+ ------------------------------------------------- */
58
+
59
+ #restore-default-breakpoints {
60
+ }
61
+
62
+ #restored-message {
63
+ opacity: 0;
64
+ line-height: 26px;
65
+ height: 26px;
66
+ padding: 0 10px;
67
+ margin: 1px 1em;
68
+ display: inline-block;
69
+ background: #00A4F3;
70
+ color: #FFF;
71
+ border-radius: 3px;
72
+ box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);
73
+ position: relative;
74
+ top: -1px;
75
+ }
76
+
77
+ #restored-message.copied {
78
+ opacity: 0;
79
+ will-change: opacity;
80
+ animation: showcopied 2s ease;
81
+ }
82
+
83
+ @keyframes showcopied {
84
+ 0% {
85
+ opacity: 0;
86
+ }
87
+ 70% {
88
+ opacity: 1;
89
+ }
90
+ 100% {
91
+ opacity: 0;
92
+ }
93
+ }
admin/scss/_partials/_view-info.scss CHANGED
@@ -68,24 +68,25 @@
68
  ------------------------------------------------- */
69
 
70
  #copy-shortcode {
71
- display: inline-block;
72
- margin: 5px 1em 0;
73
  line-height: 26px;
74
  }
75
 
76
  #copy-message {
77
  opacity: 0;
78
  font-size: 14px;
79
- line-height: 22px;
80
- height: 24px;
81
- padding: 0 6px;
 
82
  display: inline-block;
83
  background: #00A4F3;
84
  color: #FFF;
85
  border-radius: 3px;
86
- box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.4);
87
  position: relative;
88
- top: -2px;
89
  }
90
 
91
  #copy-message.copied {
68
  ------------------------------------------------- */
69
 
70
  #copy-shortcode {
71
+ //display: inline-block;
72
+ margin: 5px 1em;
73
  line-height: 26px;
74
  }
75
 
76
  #copy-message {
77
  opacity: 0;
78
  font-size: 14px;
79
+ line-height: 26px;
80
+ height: 26px;
81
+ padding: 0 10px;
82
+ margin: 0;
83
  display: inline-block;
84
  background: #00A4F3;
85
  color: #FFF;
86
  border-radius: 3px;
87
+ box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);
88
  position: relative;
89
+ top: -1px;
90
  }
91
 
92
  #copy-message.copied {
admin/scss/views.scss CHANGED
@@ -31,6 +31,7 @@ $grayedout: #888;
31
  @import "_partials/custom-fields";
32
  @import "_partials/help-tab";
33
  @import "_partials/sticky-views";
 
34
 
35
  // TODO Find a home for these in partials.
36
  .form-table td p.description.normal {
31
  @import "_partials/custom-fields";
32
  @import "_partials/help-tab";
33
  @import "_partials/sticky-views";
34
+ @import "_partials/inner-table";
35
 
36
  // TODO Find a home for these in partials.
37
  .form-table td p.description.normal {
admin/settings/class-strong-testimonials-settings-compat.php CHANGED
@@ -245,7 +245,7 @@ class Strong_Testimonials_Settings_Compat {
245
 
246
  <h2><?php _e( 'Compatibility Settings', 'strong-testimonials' ); ?></h2>
247
 
248
- <p class="about"><?php printf( __( '<a href="%s" target="_blank">Start a support ticket</a> if you need help with these options.', 'strong-testimonials' ), esc_url( 'https://support.strongplugins.com/new-ticket/' ) ); ?></p>
249
 
250
  <?php
251
  }
245
 
246
  <h2><?php _e( 'Compatibility Settings', 'strong-testimonials' ); ?></h2>
247
 
248
+ <p class="about"><?php printf( __( '<a href="%s" target="_blank">Start a support ticket</a> if you need help with these options.', 'strong-testimonials' ), wpmtst_support_url() ); ?></p>
249
 
250
  <?php
251
  }
admin/views-ajax.php CHANGED
@@ -103,3 +103,17 @@ function wpmtst_get_background_preset_colors() {
103
  wp_die();
104
  }
105
  add_action( 'wp_ajax_wpmtst_get_background_preset_colors', 'wpmtst_get_background_preset_colors' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  wp_die();
104
  }
105
  add_action( 'wp_ajax_wpmtst_get_background_preset_colors', 'wpmtst_get_background_preset_colors' );
106
+
107
+
108
+ /**
109
+ * [Restore Default Breakpoints] Ajax receiver.
110
+ *
111
+ * @since 2.32.2
112
+ */
113
+ function wpmtst_restore_default_breakpoints_function() {
114
+ $options = Strong_Testimonials_Defaults::get_default_view();
115
+ $breakpoints = $options['slideshow_settings']['breakpoints'];
116
+ echo json_encode( $breakpoints );
117
+ wp_die();
118
+ }
119
+ add_action( 'wp_ajax_wpmtst_restore_default_breakpoints', 'wpmtst_restore_default_breakpoints_function' );
admin/views-validate.php CHANGED
@@ -345,14 +345,36 @@ function wpmtst_sanitize_view_pagination( $in ) {
345
  function wpmtst_sanitize_view_slideshow( $in ) {
346
  $out = array();
347
 
348
- $out['max_slides'] = intval( sanitize_text_field( $in['max_slides'] ) );
349
- $out['move_slides'] = intval( sanitize_text_field( $in['move_slides'] ) );
350
- if ( $out['move_slides'] > $out['max_slides'] ) {
351
- $out['move_slides'] = $out['max_slides'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
  }
353
- $out['margin'] = intval( sanitize_text_field( $in['margin'] ) );
354
 
355
- if ( $out['max_slides'] > 1 ) {
 
356
  $out['effect'] = 'horizontal';
357
  } else {
358
  $out['effect'] = sanitize_text_field( $in['effect'] );
@@ -388,7 +410,7 @@ function wpmtst_sanitize_view_slideshow( $in ) {
388
 
389
  // Position is shared by Controls and Pagination
390
  if ( $out['controls_type'] || $out['pager_type'] ) {
391
- if ( $out['max_slides'] > 1 ) {
392
  $out['nav_position'] = 'outside';
393
  } else {
394
  $out['nav_position'] = sanitize_text_field( $in['nav_position'] );
345
  function wpmtst_sanitize_view_slideshow( $in ) {
346
  $out = array();
347
 
348
+ $out['type'] = sanitize_text_field( $in['type'] );
349
+
350
+ // Insert unused defaults.
351
+ $out['show_single'] = array(
352
+ 'max_slides' => 1,
353
+ 'move_slides' => 1,
354
+ 'margin' => 1,
355
+ );
356
+
357
+ // Save carousel breakpoints.
358
+ $breakpoints = $in['breakpoints'];
359
+
360
+ foreach ( $breakpoints as $key => $breakpoint ) {
361
+
362
+ $out['breakpoints'][ $key ]['width'] = intval( sanitize_text_field( $breakpoint['width'] ) );
363
+
364
+ $out['breakpoints'][ $key ]['max_slides'] = intval( sanitize_text_field( $breakpoint['max_slides'] ) );
365
+
366
+ $out['breakpoints'][ $key ]['move_slides'] = intval( sanitize_text_field( $breakpoint['move_slides'] ) );
367
+
368
+ if ( $out['breakpoints'][ $key ]['move_slides'] > $out['breakpoints'][ $key ]['max_slides'] ) {
369
+ $out['breakpoints'][ $key ]['move_slides'] = $out['breakpoints'][ $key ]['max_slides'];
370
+ }
371
+
372
+ $out['breakpoints'][ $key ]['margin'] = intval( sanitize_text_field( $breakpoint['margin'] ) );
373
+
374
  }
 
375
 
376
+ // Carousel requires horizontal scroll.
377
+ if ( 'show_multiple' == $out['type'] ) {
378
  $out['effect'] = 'horizontal';
379
  } else {
380
  $out['effect'] = sanitize_text_field( $in['effect'] );
410
 
411
  // Position is shared by Controls and Pagination
412
  if ( $out['controls_type'] || $out['pager_type'] ) {
413
+ if ( 'show_multiple' == $out['type'] ) {
414
  $out['nav_position'] = 'outside';
415
  } else {
416
  $out['nav_position'] = sanitize_text_field( $in['nav_position'] );
admin/views.php CHANGED
@@ -48,7 +48,7 @@ function wpmtst_views_admin() {
48
 
49
  echo '<h1>' . __( 'Edit View', 'strong-testimonials' ) . '</h1>';
50
 
51
- $message = __( 'An error occurred.', 'strong-testimonials' ) . ' ' . sprintf( wp_kses( __( 'Please <a href="%s" target="_blank">open a support ticket</a>.', 'strong-testimonials' ), $tags ), esc_url( 'https://support.strongplugins.com/new-ticket/' ) );
52
 
53
  wp_die( sprintf( '<div class="notice notice-error"><p>%s</p></div>', $message ) );
54
 
48
 
49
  echo '<h1>' . __( 'Edit View', 'strong-testimonials' ) . '</h1>';
50
 
51
+ $message = __( 'An error occurred.', 'strong-testimonials' ) . ' ' . sprintf( wp_kses( __( 'Please <a href="%s" target="_blank">open a support ticket</a>.', 'strong-testimonials' ), $tags ), wpmtst_support_url() );
52
 
53
  wp_die( sprintf( '<div class="notice notice-error"><p>%s</p></div>', $message ) );
54
 
includes/class-strong-view-slideshow.php CHANGED
@@ -168,7 +168,7 @@ class Strong_View_Slideshow extends Strong_View_Display {
168
 
169
  $container_class_list[] = 'slider-container';
170
 
171
- if ( $settings['max_slides'] > 1 ) {
172
  $container_class_list[] = 'carousel';
173
  }
174
 
@@ -176,8 +176,7 @@ class Strong_View_Slideshow extends Strong_View_Display {
176
 
177
  if ( $settings['adapt_height'] ) {
178
  $container_class_list[] = 'slider-adaptive';
179
- }
180
- elseif ( $settings['stretch'] ) {
181
  $container_class_list[] = 'slider-stretch';
182
  }
183
 
@@ -191,7 +190,7 @@ class Strong_View_Slideshow extends Strong_View_Display {
191
  // Controls
192
  if ( isset( $nav_methods['controls'][ $control ]['class'] ) && $nav_methods['controls'][ $control ]['class'] ) {
193
  if ( 'sides' == $control ) {
194
- if ( $settings['max_slides'] == 1 ) {
195
  $container_class_list[] = $nav_methods['controls'][ $control ]['class'];
196
  } else {
197
  $container_class_list[] = $nav_methods['controls'][ $control ]['class'] . '-outside';
@@ -219,7 +218,7 @@ class Strong_View_Slideshow extends Strong_View_Display {
219
  // Position
220
  // TODO Simplify logic.
221
  if ( 'none' != $pager || ( 'none' != $control && 'sides' != $control ) ) {
222
- if ( $settings['max_slides'] > 1 ) {
223
  $settings['nav_position'] = 'outside';
224
  }
225
  $container_class_list[] = 'nav-position-' . $settings['nav_position'];
@@ -236,9 +235,9 @@ class Strong_View_Slideshow extends Strong_View_Display {
236
  * Filter classes.
237
  */
238
  $this->atts['container_data'] = apply_filters( 'wpmtst_view_container_data', $container_data_list, $this->atts );
239
- $this->atts['container_class'] = join( ' ', apply_filters( 'wpmtst_view_container_class', $container_class_list, $this->atts ) );
240
- $this->atts['content_class'] = join( ' ', apply_filters( 'wpmtst_view_content_class', $content_class_list, $this->atts ) );
241
- $this->atts['post_class'] = join( ' ', apply_filters( 'wpmtst_view_post_class', $post_class_list, $this->atts ) );
242
 
243
  /**
244
  * Store updated atts.
@@ -263,7 +262,7 @@ class Strong_View_Slideshow extends Strong_View_Display {
263
  if ( isset( $settings['controls_type'] ) && 'none' != $settings['controls_type'] ) {
264
 
265
  $controls_type = $settings['controls_type'];
266
- if ( 'sides' == $controls_type && $settings['max_slides'] > 1 ) {
267
  $controls_type .= '-outside';
268
  }
269
 
@@ -362,7 +361,27 @@ class Strong_View_Slideshow extends Strong_View_Display {
362
  'classes' => $pairs,
363
  );
364
 
365
- $slide_margin = $this->atts['slideshow_settings']['max_slides'] > 1 ? $this->atts['slideshow_settings']['margin'] : 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
366
 
367
  $args = array(
368
  'mode' => $this->atts['slideshow_settings']['effect'],
@@ -380,10 +399,8 @@ class Strong_View_Slideshow extends Strong_View_Display {
380
  'debug' => defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG,
381
  'compat' => $compat,
382
  'touchEnabled' => $options['touch_enabled'],
383
- 'maxSlides' => $this->atts['slideshow_settings']['max_slides'],
384
- 'moveSlides' => $this->atts['slideshow_settings']['move_slides'],
385
- 'slideMargin' => $slide_margin,
386
- 'minThreshold' => 480,
387
  );
388
 
389
  if ( ! $this->atts['slideshow_settings']['adapt_height'] ) {
168
 
169
  $container_class_list[] = 'slider-container';
170
 
171
+ if ( 'show_multiple' == $settings['type'] ) {
172
  $container_class_list[] = 'carousel';
173
  }
174
 
176
 
177
  if ( $settings['adapt_height'] ) {
178
  $container_class_list[] = 'slider-adaptive';
179
+ } elseif ( $settings['stretch'] ) {
 
180
  $container_class_list[] = 'slider-stretch';
181
  }
182
 
190
  // Controls
191
  if ( isset( $nav_methods['controls'][ $control ]['class'] ) && $nav_methods['controls'][ $control ]['class'] ) {
192
  if ( 'sides' == $control ) {
193
+ if ( 'show_single' == $settings['type'] ) {
194
  $container_class_list[] = $nav_methods['controls'][ $control ]['class'];
195
  } else {
196
  $container_class_list[] = $nav_methods['controls'][ $control ]['class'] . '-outside';
218
  // Position
219
  // TODO Simplify logic.
220
  if ( 'none' != $pager || ( 'none' != $control && 'sides' != $control ) ) {
221
+ if ( 'show_multiple' == $settings['type'] ) {
222
  $settings['nav_position'] = 'outside';
223
  }
224
  $container_class_list[] = 'nav-position-' . $settings['nav_position'];
235
  * Filter classes.
236
  */
237
  $this->atts['container_data'] = apply_filters( 'wpmtst_view_container_data', $container_data_list, $this->atts );
238
+ $this->atts['container_class'] = join( ' ', apply_filters( 'wpmtst_view_container_class', array_filter( $container_class_list ), $this->atts ) );
239
+ $this->atts['content_class'] = join( ' ', apply_filters( 'wpmtst_view_content_class', array_filter( $content_class_list ), $this->atts ) );
240
+ $this->atts['post_class'] = join( ' ', apply_filters( 'wpmtst_view_post_class', array_filter( $post_class_list ), $this->atts ) );
241
 
242
  /**
243
  * Store updated atts.
262
  if ( isset( $settings['controls_type'] ) && 'none' != $settings['controls_type'] ) {
263
 
264
  $controls_type = $settings['controls_type'];
265
+ if ( 'sides' == $controls_type && 'show_multiple' == $settings['type'] ) {
266
  $controls_type .= '-outside';
267
  }
268
 
361
  'classes' => $pairs,
362
  );
363
 
364
+
365
+ // Convert breakpoint variable names
366
+ // TODO Refactor to make this unnecessary.
367
+ $new_breakpoints = array();
368
+
369
+ // Fallback
370
+ $new_breakpoints['single'] = array(
371
+ 'maxSlides' => $this->atts['slideshow_settings']['show_single']['max_slides'],
372
+ 'moveSlides' => $this->atts['slideshow_settings']['show_single']['move_slides'],
373
+ 'slideMargin' => $this->atts['slideshow_settings']['show_single']['margin'],
374
+ );
375
+
376
+ $breakpoints = $this->atts['slideshow_settings']['breakpoints'];
377
+ foreach ( $breakpoints as $key => $breakpoint ) {
378
+ $new_breakpoints['multiple'][ $key ] = array(
379
+ 'width' => $breakpoints[ $key ]['width'],
380
+ 'maxSlides' => $breakpoints[ $key ]['max_slides'],
381
+ 'moveSlides' => $breakpoints[ $key ]['move_slides'],
382
+ 'slideMargin' => $breakpoints[ $key ]['margin'],
383
+ );
384
+ }
385
 
386
  $args = array(
387
  'mode' => $this->atts['slideshow_settings']['effect'],
399
  'debug' => defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG,
400
  'compat' => $compat,
401
  'touchEnabled' => $options['touch_enabled'],
402
+ 'type' => $this->atts['slideshow_settings']['type'],
403
+ 'breakpoints' => $new_breakpoints,
 
 
404
  );
405
 
406
  if ( ! $this->atts['slideshow_settings']['adapt_height'] ) {
includes/class-strong-view.php CHANGED
@@ -252,7 +252,7 @@ class Strong_View {
252
 
253
  }
254
 
255
- return $class_list;
256
  }
257
 
258
  /**
252
 
253
  }
254
 
255
+ return array_filter( $class_list );
256
  }
257
 
258
  /**
includes/functions-activation.php CHANGED
@@ -31,7 +31,7 @@ function wpmtst_update_tables() {
31
  $message .= __( 'The plugin has been deactivated.', 'strong-testimonials' );
32
  $message .= '</p>';
33
  $message .= '<p><code>' . $wpdb->last_error . '</code></p>';
34
- $message .= '<p>' . sprintf( __( 'Please <a href="%s" target="_blank">open a support ticket</a>.', 'strong-testimonials' ), esc_url( 'https://support.strongplugins.com/new-ticket/' ) ) . '</p>';
35
  $message .= '<p>' . sprintf( __( '<a href="%s">Go back to Dashboard</a>', 'strong-testimonials' ), esc_url( admin_url() ) ) . '</p>';
36
 
37
  wp_die( sprintf( '<div class="error strong-view-error">%s</div>', $message ) );
31
  $message .= __( 'The plugin has been deactivated.', 'strong-testimonials' );
32
  $message .= '</p>';
33
  $message .= '<p><code>' . $wpdb->last_error . '</code></p>';
34
+ $message .= '<p>' . sprintf( __( 'Please <a href="%s" target="_blank">open a support ticket</a>.', 'strong-testimonials' ), wpmtst_support_url() ) . '</p>';
35
  $message .= '<p>' . sprintf( __( '<a href="%s">Go back to Dashboard</a>', 'strong-testimonials' ), esc_url( admin_url() ) ) . '</p>';
36
 
37
  wp_die( sprintf( '<div class="error strong-view-error">%s</div>', $message ) );
includes/functions-views.php CHANGED
@@ -37,7 +37,7 @@ function wpmtst_get_views() {
37
  $message = '<p><span style="color: #CD0000;">';
38
  $message .= __( 'An error occurred.', 'strong-testimonials' ) . '</span>&nbsp;';
39
  $message .= __( 'The plugin has been deactivated.', 'strong-testimonials' ) . '&nbsp;';
40
- $message .= sprintf( __( 'Please <a href="%s" target="_blank">open a support ticket</a>.', 'strong-testimonials' ), esc_url( 'https://support.strongplugins.com/new-ticket/' ) ) . '</p>';
41
  $message .= '<p>' . sprintf( __( '<a href="%s">Go back to Dashboard</a>', 'strong-testimonials' ), esc_url( admin_url() ) ) . '</p>';
42
  wp_die( sprintf( '<div class="error strong-view-error">%s</div>', $message ) );
43
  }
37
  $message = '<p><span style="color: #CD0000;">';
38
  $message .= __( 'An error occurred.', 'strong-testimonials' ) . '</span>&nbsp;';
39
  $message .= __( 'The plugin has been deactivated.', 'strong-testimonials' ) . '&nbsp;';
40
+ $message .= sprintf( __( 'Please <a href="%s" target="_blank">open a support ticket</a>.', 'strong-testimonials' ), wpmtst_support_url() ) . '</p>';
41
  $message .= '<p>' . sprintf( __( '<a href="%s">Go back to Dashboard</a>', 'strong-testimonials' ), esc_url( admin_url() ) ) . '</p>';
42
  wp_die( sprintf( '<div class="error strong-view-error">%s</div>', $message ) );
43
  }
includes/functions.php CHANGED
@@ -5,6 +5,10 @@
5
  * @package Strong_Testimonials
6
  */
7
 
 
 
 
 
8
  /**
9
  * Return default translation from po/mo files if no active translation plugin.
10
  *
@@ -57,7 +61,7 @@ function wpmtst_get_post( $post ) {
57
  */
58
  function wpmtst_get_website( $url ) {
59
  if ( !preg_match( "~^(?:f|ht)tps?://~i", $url ) )
60
- $url = 'http://' . $url;
61
 
62
  return $url;
63
  }
5
  * @package Strong_Testimonials
6
  */
7
 
8
+ function wpmtst_support_url() {
9
+ return esc_url( 'https://strongplugins.com/support/' );
10
+ }
11
+
12
  /**
13
  * Return default translation from po/mo files if no active translation plugin.
14
  *
61
  */
62
  function wpmtst_get_website( $url ) {
63
  if ( !preg_match( "~^(?:f|ht)tps?://~i", $url ) )
64
+ $url = 'https://' . $url;
65
 
66
  return $url;
67
  }
languages/strong-testimonials.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the Strong Testimonials package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Strong Testimonials 2.31.10\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/strong-"
7
  "testimonials\n"
8
- "POT-Creation-Date: 2018-08-02 19:18:06+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -395,26 +395,26 @@ msgstr ""
395
  msgid "Posts"
396
  msgstr ""
397
 
398
- #: admin/class-strong-testimonials-admin-list.php:80
399
  msgid "Excerpt"
400
  msgstr ""
401
 
402
- #: admin/class-strong-testimonials-admin-list.php:90
403
- #: admin/class-strong-testimonials-admin-list.php:212
404
  msgid "Thumbnail"
405
  msgstr ""
406
 
407
- #: admin/class-strong-testimonials-admin-list.php:92
408
  msgid "Rating"
409
  msgstr ""
410
 
411
  #. translators: On the Views admin screen.
412
- #: admin/class-strong-testimonials-admin-list.php:104
413
  #: admin/partials/views/option-category.php:4 includes/post-types.php:128
414
  msgid "Categories"
415
  msgstr ""
416
 
417
- #: admin/class-strong-testimonials-admin-list.php:111
418
  msgid "Date"
419
  msgstr ""
420
 
@@ -710,6 +710,7 @@ msgid "fade"
710
  msgstr ""
711
 
712
  #: admin/class-strong-testimonials-defaults.php:510
 
713
  msgctxt "slideshow transition option"
714
  msgid "scroll horizontally"
715
  msgstr ""
@@ -781,21 +782,25 @@ msgid "text"
781
  msgstr ""
782
 
783
  #: admin/class-strong-testimonials-defaults.php:614
 
784
  msgctxt "slideshow control"
785
  msgid "Play"
786
  msgstr ""
787
 
788
  #: admin/class-strong-testimonials-defaults.php:615
 
789
  msgctxt "slideshow control"
790
  msgid "Pause"
791
  msgstr ""
792
 
793
  #: admin/class-strong-testimonials-defaults.php:616
 
794
  msgctxt "slideshow_control"
795
  msgid "Previous"
796
  msgstr ""
797
 
798
  #: admin/class-strong-testimonials-defaults.php:617
 
799
  msgctxt "slideshow_control"
800
  msgid "Next"
801
  msgstr ""
@@ -825,13 +830,23 @@ msgctxt "link"
825
  msgid "Read more testimonials"
826
  msgstr ""
827
 
828
- #: admin/class-strong-testimonials-defaults.php:809
 
 
 
 
 
 
 
 
 
 
829
  msgid ""
830
  "<strong>Recommended.</strong> The best choice for both Invisible reCAPTCHA "
831
  "and reCAPTCHA V2 (\"I'm not a robot\" checkbox)."
832
  msgstr ""
833
 
834
- #: admin/class-strong-testimonials-defaults.php:820
835
  msgid "An excellent plugin for math- and image-based captchas."
836
  msgstr ""
837
 
@@ -1068,14 +1083,14 @@ msgstr ""
1068
 
1069
  #: admin/class-strong-testimonials-help.php:182
1070
  #: admin/class-strong-testimonials-help.php:187
1071
- #: admin/class-strong-testimonials-post-editor.php:169
1072
  #: admin/partials/views/option-boilerplate.php:11
1073
  msgid "yes"
1074
  msgstr ""
1075
 
1076
  #: admin/class-strong-testimonials-help.php:183
1077
  #: admin/class-strong-testimonials-help.php:188
1078
- #: admin/class-strong-testimonials-post-editor.php:170
1079
  #: admin/partials/views/option-boilerplate.php:14
1080
  msgid "no"
1081
  msgstr ""
@@ -1087,7 +1102,7 @@ msgstr ""
1087
  #. translators: On the Views admin screen.
1088
  #: admin/class-strong-testimonials-help.php:197
1089
  #: admin/partials/views/option-pagination.php:13
1090
- #: admin/partials/views/option-slideshow-navigation.php:46
1091
  msgid "Pagination"
1092
  msgstr ""
1093
 
@@ -1291,38 +1306,38 @@ msgid ""
1291
  "using <code>element</code>."
1292
  msgstr ""
1293
 
1294
- #: admin/class-strong-testimonials-post-editor.php:38
1295
  msgctxt "post editor"
1296
  msgid "Client Details"
1297
  msgstr ""
1298
 
1299
- #: admin/class-strong-testimonials-post-editor.php:59
1300
  msgctxt "post editor"
1301
  msgid "To add a photo or logo, use the Featured Image option."
1302
  msgstr ""
1303
 
1304
- #: admin/class-strong-testimonials-post-editor.php:168
1305
  msgid "default"
1306
  msgstr ""
1307
 
1308
- #: admin/class-strong-testimonials-post-editor.php:214
1309
  msgid "Zero"
1310
  msgstr ""
1311
 
1312
- #: admin/class-strong-testimonials-post-editor.php:215
1313
  msgid "OK"
1314
  msgstr ""
1315
 
1316
- #: admin/class-strong-testimonials-post-editor.php:216
1317
  msgid "Cancel"
1318
  msgstr ""
1319
 
1320
- #: admin/class-strong-testimonials-post-editor.php:232
1321
  #: admin/class-strong-views-list-table.php:127
1322
  msgid "Edit"
1323
  msgstr ""
1324
 
1325
- #: admin/class-strong-testimonials-post-editor.php:255
1326
  msgid "shortcode %s not found"
1327
  msgstr ""
1328
 
@@ -1655,8 +1670,8 @@ msgstr ""
1655
 
1656
  #. translators: On the Views admin screen.
1657
  #: admin/partials/views/group-style.php:14
1658
- #: admin/partials/views/option-slideshow-navigation.php:29
1659
- #: admin/partials/views/option-slideshow-navigation.php:60
1660
  msgid "Style"
1661
  msgstr ""
1662
 
@@ -1759,7 +1774,7 @@ msgstr ""
1759
  msgid "Separate class names by spaces."
1760
  msgstr ""
1761
 
1762
- #: admin/partials/views/option-client-section.php:23
1763
  msgid "Add Field"
1764
  msgstr ""
1765
 
@@ -2198,7 +2213,7 @@ msgstr ""
2198
 
2199
  #: admin/partials/views/option-slideshow-behavior.php:71
2200
  #: admin/partials/views/option-slideshow-transition.php:15
2201
- #: admin/partials/views/option-slideshow-transition.php:38
2202
  msgctxt "time setting"
2203
  msgid "seconds"
2204
  msgstr ""
@@ -2211,18 +2226,58 @@ msgstr ""
2211
  msgid "The slideshow will pause if the browser window becomes inactive."
2212
  msgstr ""
2213
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2214
  #: admin/partials/views/option-slideshow-navigation.php:15
2215
  msgid "Controls"
2216
  msgstr ""
2217
 
2218
- #: admin/partials/views/option-slideshow-navigation.php:76
2219
  msgid "Position"
2220
  msgstr ""
2221
 
2222
- #: admin/partials/views/option-slideshow-navigation.php:82
2223
  msgid "the testimonial frame"
2224
  msgstr ""
2225
 
 
 
 
 
 
2226
  #. translators: In the view editor.
2227
  #: admin/partials/views/option-slideshow-transition.php:3
2228
  msgid "Transition"
@@ -2230,17 +2285,35 @@ msgstr ""
2230
 
2231
  #: admin/partials/views/option-slideshow-transition.php:10
2232
  msgctxt "slideshow setting"
2233
- msgid "Show each for"
2234
  msgstr ""
2235
 
2236
  #: admin/partials/views/option-slideshow-transition.php:20
 
2237
  msgid "then"
2238
  msgstr ""
2239
 
2240
- #: admin/partials/views/option-slideshow-transition.php:33
2241
  msgid "for"
2242
  msgstr ""
2243
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2244
  #: admin/partials/views/option-thumbnail.php:26
2245
  msgid "width"
2246
  msgstr ""
@@ -3298,40 +3371,32 @@ msgctxt "Word count type. Do not translate!"
3298
  msgid "words"
3299
  msgstr ""
3300
 
3301
- #: includes/functions-template.php:543
3302
- msgid "&laquo; Previous"
3303
- msgstr ""
3304
-
3305
- #: includes/functions-template.php:544
3306
- msgid "Next &raquo;"
3307
- msgstr ""
3308
-
3309
  #. translators: Publish box date format, see https://secure.php.net/date
3310
- #: includes/functions.php:534 includes/post-types.php:202
3311
  msgid "M j, Y @ H:i"
3312
  msgstr ""
3313
 
3314
- #: includes/functions.php:566
3315
  msgid "light blue gradient"
3316
  msgstr ""
3317
 
3318
- #: includes/functions.php:571
3319
  msgid "light gray gradient"
3320
  msgstr ""
3321
 
3322
- #: includes/functions.php:576
3323
  msgid "light green mist gradient"
3324
  msgstr ""
3325
 
3326
- #: includes/functions.php:581
3327
  msgid "light latte gradient"
3328
  msgstr ""
3329
 
3330
- #: includes/functions.php:586
3331
  msgid "light plum gradient"
3332
  msgstr ""
3333
 
3334
- #: includes/functions.php:591
3335
  msgid "sky blue gradient"
3336
  msgstr ""
3337
 
2
  # This file is distributed under the same license as the Strong Testimonials package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Strong Testimonials 2.32.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/strong-"
7
  "testimonials\n"
8
+ "POT-Creation-Date: 2018-12-04 08:48:43+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
395
  msgid "Posts"
396
  msgstr ""
397
 
398
+ #: admin/class-strong-testimonials-admin-list.php:96
399
  msgid "Excerpt"
400
  msgstr ""
401
 
402
+ #: admin/class-strong-testimonials-admin-list.php:106
403
+ #: admin/class-strong-testimonials-admin-list.php:228
404
  msgid "Thumbnail"
405
  msgstr ""
406
 
407
+ #: admin/class-strong-testimonials-admin-list.php:108
408
  msgid "Rating"
409
  msgstr ""
410
 
411
  #. translators: On the Views admin screen.
412
+ #: admin/class-strong-testimonials-admin-list.php:120
413
  #: admin/partials/views/option-category.php:4 includes/post-types.php:128
414
  msgid "Categories"
415
  msgstr ""
416
 
417
+ #: admin/class-strong-testimonials-admin-list.php:127
418
  msgid "Date"
419
  msgstr ""
420
 
710
  msgstr ""
711
 
712
  #: admin/class-strong-testimonials-defaults.php:510
713
+ #: admin/partials/views/option-slideshow-transition.php:32
714
  msgctxt "slideshow transition option"
715
  msgid "scroll horizontally"
716
  msgstr ""
782
  msgstr ""
783
 
784
  #: admin/class-strong-testimonials-defaults.php:614
785
+ #: includes/class-strong-view-slideshow.php:438
786
  msgctxt "slideshow control"
787
  msgid "Play"
788
  msgstr ""
789
 
790
  #: admin/class-strong-testimonials-defaults.php:615
791
+ #: includes/class-strong-view-slideshow.php:439
792
  msgctxt "slideshow control"
793
  msgid "Pause"
794
  msgstr ""
795
 
796
  #: admin/class-strong-testimonials-defaults.php:616
797
+ #: includes/class-strong-view-slideshow.php:440
798
  msgctxt "slideshow_control"
799
  msgid "Previous"
800
  msgstr ""
801
 
802
  #: admin/class-strong-testimonials-defaults.php:617
803
+ #: includes/class-strong-view-slideshow.php:441
804
  msgctxt "slideshow_control"
805
  msgid "Next"
806
  msgstr ""
830
  msgid "Read more testimonials"
831
  msgstr ""
832
 
833
+ #: admin/class-strong-testimonials-defaults.php:724
834
+ #: includes/functions-template.php:543
835
+ msgid "&laquo; Previous"
836
+ msgstr ""
837
+
838
+ #: admin/class-strong-testimonials-defaults.php:725
839
+ #: includes/functions-template.php:544
840
+ msgid "Next &raquo;"
841
+ msgstr ""
842
+
843
+ #: admin/class-strong-testimonials-defaults.php:845
844
  msgid ""
845
  "<strong>Recommended.</strong> The best choice for both Invisible reCAPTCHA "
846
  "and reCAPTCHA V2 (\"I'm not a robot\" checkbox)."
847
  msgstr ""
848
 
849
+ #: admin/class-strong-testimonials-defaults.php:856
850
  msgid "An excellent plugin for math- and image-based captchas."
851
  msgstr ""
852
 
1083
 
1084
  #: admin/class-strong-testimonials-help.php:182
1085
  #: admin/class-strong-testimonials-help.php:187
1086
+ #: admin/class-strong-testimonials-post-editor.php:170
1087
  #: admin/partials/views/option-boilerplate.php:11
1088
  msgid "yes"
1089
  msgstr ""
1090
 
1091
  #: admin/class-strong-testimonials-help.php:183
1092
  #: admin/class-strong-testimonials-help.php:188
1093
+ #: admin/class-strong-testimonials-post-editor.php:171
1094
  #: admin/partials/views/option-boilerplate.php:14
1095
  msgid "no"
1096
  msgstr ""
1102
  #. translators: On the Views admin screen.
1103
  #: admin/class-strong-testimonials-help.php:197
1104
  #: admin/partials/views/option-pagination.php:13
1105
+ #: admin/partials/views/option-slideshow-navigation.php:50
1106
  msgid "Pagination"
1107
  msgstr ""
1108
 
1306
  "using <code>element</code>."
1307
  msgstr ""
1308
 
1309
+ #: admin/class-strong-testimonials-post-editor.php:39
1310
  msgctxt "post editor"
1311
  msgid "Client Details"
1312
  msgstr ""
1313
 
1314
+ #: admin/class-strong-testimonials-post-editor.php:60
1315
  msgctxt "post editor"
1316
  msgid "To add a photo or logo, use the Featured Image option."
1317
  msgstr ""
1318
 
1319
+ #: admin/class-strong-testimonials-post-editor.php:169
1320
  msgid "default"
1321
  msgstr ""
1322
 
1323
+ #: admin/class-strong-testimonials-post-editor.php:215
1324
  msgid "Zero"
1325
  msgstr ""
1326
 
1327
+ #: admin/class-strong-testimonials-post-editor.php:216
1328
  msgid "OK"
1329
  msgstr ""
1330
 
1331
+ #: admin/class-strong-testimonials-post-editor.php:217
1332
  msgid "Cancel"
1333
  msgstr ""
1334
 
1335
+ #: admin/class-strong-testimonials-post-editor.php:233
1336
  #: admin/class-strong-views-list-table.php:127
1337
  msgid "Edit"
1338
  msgstr ""
1339
 
1340
+ #: admin/class-strong-testimonials-post-editor.php:256
1341
  msgid "shortcode %s not found"
1342
  msgstr ""
1343
 
1670
 
1671
  #. translators: On the Views admin screen.
1672
  #: admin/partials/views/group-style.php:14
1673
+ #: admin/partials/views/option-slideshow-navigation.php:33
1674
+ #: admin/partials/views/option-slideshow-navigation.php:68
1675
  msgid "Style"
1676
  msgstr ""
1677
 
1774
  msgid "Separate class names by spaces."
1775
  msgstr ""
1776
 
1777
+ #: admin/partials/views/option-client-section.php:25
1778
  msgid "Add Field"
1779
  msgstr ""
1780
 
2213
 
2214
  #: admin/partials/views/option-slideshow-behavior.php:71
2215
  #: admin/partials/views/option-slideshow-transition.php:15
2216
+ #: admin/partials/views/option-slideshow-transition.php:42
2217
  msgctxt "time setting"
2218
  msgid "seconds"
2219
  msgstr ""
2226
  msgid "The slideshow will pause if the browser window becomes inactive."
2227
  msgstr ""
2228
 
2229
+ #. translators: In the view editor.
2230
+ #: admin/partials/views/option-slideshow-breakpoints.php:8
2231
+ msgid "minimum screen width"
2232
+ msgstr ""
2233
+
2234
+ #: admin/partials/views/option-slideshow-breakpoints.php:11
2235
+ msgid "show"
2236
+ msgstr ""
2237
+
2238
+ #: admin/partials/views/option-slideshow-breakpoints.php:14
2239
+ msgid "margin"
2240
+ msgstr ""
2241
+
2242
+ #: admin/partials/views/option-slideshow-breakpoints.php:17
2243
+ msgid "move"
2244
+ msgstr ""
2245
+
2246
+ #: admin/partials/views/option-slideshow-breakpoints.php:46
2247
+ #: admin/partials/views/option-slideshow-breakpoints.php:73
2248
+ msgid "slide"
2249
+ msgstr ""
2250
+
2251
+ #: admin/partials/views/option-slideshow-breakpoints.php:49
2252
+ #: admin/partials/views/option-slideshow-breakpoints.php:76
2253
+ msgid "slides"
2254
+ msgstr ""
2255
+
2256
+ #: admin/partials/views/option-slideshow-breakpoints.php:91
2257
+ msgid "Restore Default Breakpoints"
2258
+ msgstr ""
2259
+
2260
+ #: admin/partials/views/option-slideshow-breakpoints.php:93
2261
+ msgid "defaults restored"
2262
+ msgstr ""
2263
+
2264
  #: admin/partials/views/option-slideshow-navigation.php:15
2265
  msgid "Controls"
2266
  msgstr ""
2267
 
2268
+ #: admin/partials/views/option-slideshow-navigation.php:87
2269
  msgid "Position"
2270
  msgstr ""
2271
 
2272
+ #: admin/partials/views/option-slideshow-navigation.php:97
2273
  msgid "the testimonial frame"
2274
  msgstr ""
2275
 
2276
+ #. translators: In the view editor.
2277
+ #: admin/partials/views/option-slideshow-num.php:3
2278
+ msgid "Show"
2279
+ msgstr ""
2280
+
2281
  #. translators: In the view editor.
2282
  #: admin/partials/views/option-slideshow-transition.php:3
2283
  msgid "Transition"
2285
 
2286
  #: admin/partials/views/option-slideshow-transition.php:10
2287
  msgctxt "slideshow setting"
2288
+ msgid "Show slides for"
2289
  msgstr ""
2290
 
2291
  #: admin/partials/views/option-slideshow-transition.php:20
2292
+ #: admin/partials/views/option-slideshow-transition.php:32
2293
  msgid "then"
2294
  msgstr ""
2295
 
2296
+ #: admin/partials/views/option-slideshow-transition.php:37
2297
  msgid "for"
2298
  msgstr ""
2299
 
2300
+ #. translators: In the view editor.
2301
+ #: admin/partials/views/option-slideshow-type.php:7
2302
+ msgid "single"
2303
+ msgstr ""
2304
+
2305
+ #: admin/partials/views/option-slideshow-type.php:8
2306
+ msgid "multiple"
2307
+ msgstr ""
2308
+
2309
+ #: admin/partials/views/option-slideshow-type.php:12
2310
+ msgid "slide at a time"
2311
+ msgstr ""
2312
+
2313
+ #: admin/partials/views/option-slideshow-type.php:15
2314
+ msgid "slides at a time with these responsive breakpoints:"
2315
+ msgstr ""
2316
+
2317
  #: admin/partials/views/option-thumbnail.php:26
2318
  msgid "width"
2319
  msgstr ""
3371
  msgid "words"
3372
  msgstr ""
3373
 
 
 
 
 
 
 
 
 
3374
  #. translators: Publish box date format, see https://secure.php.net/date
3375
+ #: includes/functions.php:538 includes/post-types.php:202
3376
  msgid "M j, Y @ H:i"
3377
  msgstr ""
3378
 
3379
+ #: includes/functions.php:570
3380
  msgid "light blue gradient"
3381
  msgstr ""
3382
 
3383
+ #: includes/functions.php:575
3384
  msgid "light gray gradient"
3385
  msgstr ""
3386
 
3387
+ #: includes/functions.php:580
3388
  msgid "light green mist gradient"
3389
  msgstr ""
3390
 
3391
+ #: includes/functions.php:585
3392
  msgid "light latte gradient"
3393
  msgstr ""
3394
 
3395
+ #: includes/functions.php:590
3396
  msgid "light plum gradient"
3397
  msgstr ""
3398
 
3399
+ #: includes/functions.php:595
3400
  msgid "sky blue gradient"
3401
  msgstr ""
3402
 
public/js/lib/form-validation/form-validation.js CHANGED
@@ -80,7 +80,7 @@ var strongValidation = {
80
  // Thanks http://stackoverflow.com/a/36429927/51600
81
  jQuery('input[type=url]').change(function () {
82
  if (this.value.length && !/^https*:\/\//.test(this.value)) {
83
- this.value = 'http://' + this.value;
84
  }
85
  });
86
 
80
  // Thanks http://stackoverflow.com/a/36429927/51600
81
  jQuery('input[type=url]').change(function () {
82
  if (this.value.length && !/^https*:\/\//.test(this.value)) {
83
+ this.value = 'https://' + this.value;
84
  }
85
  });
86
 
public/js/lib/form-validation/form-validation.min.js CHANGED
@@ -1 +1 @@
1
- var strongValidation={defaults:{ajaxUrl:"",display:{successMessage:false},scroll:{onError:true,onErrorOffset:100,onSuccess:true,onSuccessOffset:100},fields:{}},settings:{},setOpts:function(options){this.settings=jQuery.extend({},this.defaults,options)},rules:{},setRules:function(){for(var i=0;i<this.settings.fields.length;i++){if("rating"===this.settings.fields[i].type){if(1===this.settings.fields[i].required){this.rules[this.settings.fields[i].name]={ratingRequired:true}}}}},init:function(){var strongForm={};if(typeof window["strongForm"]!=="undefined"){strongForm=window["strongForm"]}this.setOpts(strongForm);if(this.settings.display.successMessage){this.scrollOnSuccess()}else{this.setRules();this.changeEvents();this.customValidators();this.validateForm()}},changeEvents:function(){jQuery('input[type="text"], input[type="url"], input[type="email"], textarea',"#wpmtst-submission-form").on("change blur",function(e){e.target.value=e.target.value.trim()});jQuery("input[type=url]").change(function(){if(this.value.length&&!/^https*:\/\//.test(this.value)){this.value="http://"+this.value}});var ratings=document.getElementsByClassName("strong-rating");for(var i=0;i<ratings.length;i++){ratings[i].addEventListener("click",this.handleRadioEvent,true);ratings[i].addEventListener("keyup",this.handleRadioEvent,true);ratings[i].addEventListener("change",function(){jQuery(this).valid()},true)}},handleRadioEvent:function(e){if(e.keyCode>=48&&e.keyCode<=53){var key=e.keyCode-48;jQuery(this).find('input[type="radio"][value='+key+"]").click()}},customValidators:function(){jQuery.validator.addMethod("ratingRequired",function(value,element){return jQuery(element).find("input:checked").val()>0},jQuery.validator.messages.required)},validateForm:function(){var theForm=jQuery("#wpmtst-submission-form");theForm.validate({onfocusout:false,focusInvalid:false,invalidHandler:function(form,validator){var errors=validator.numberOfInvalids();if(errors){if(strongValidation.settings.scroll.onError){if(typeof validator.errorList[0]!=="undefined"){var firstError=jQuery(validator.errorList[0].element);var fieldOffset=firstError.closest(".form-field").offset();var scrollTop=fieldOffset.top-strongValidation.settings.scroll.onErrorOffset;jQuery("html, body").animate({scrollTop:scrollTop},800,function(){firstError.focus()})}}else{validator.errorList[0].element.focus()}}},submitHandler:function(form){strongValidation.disableForm();if(strongValidation.settings.ajaxUrl!==""){window.onbeforeunload=function(){return"Please wait while the form is submitted."};var formOptions={url:strongValidation.settings.ajaxUrl,data:{action:"wpmtst_form2"},success:strongValidation.showResponse};jQuery(form).ajaxSubmit(formOptions)}else{form.submit()}},rules:strongValidation.rules,errorPlacement:function(error,element){error.appendTo(element.closest("div.form-field"))},highlight:function(element,errorClass,validClass){if(element.type==="checkbox"){jQuery(element).closest(".field-wrap").addClass(errorClass).removeClass(validClass)}else if("rating"===jQuery(element).data("fieldType")){jQuery(element).closest(".field-wrap").addClass(errorClass).removeClass(validClass)}else{jQuery(element).addClass(errorClass).removeClass(validClass)}},unhighlight:function(element,errorClass,validClass){if(element.type==="checkbox"){jQuery(element).closest(".field-wrap").removeClass(errorClass).addClass(validClass)}else if("rating"===jQuery(element).data("fieldType")){jQuery(element).closest(".field-wrap").removeClass(errorClass).addClass(validClass)}else{jQuery(element).removeClass(errorClass).addClass(validClass)}}})},showResponse:function(response){window.onbeforeunload=null;strongValidation.enableForm();var obj=JSON.parse(response);if(obj.success){jQuery("#wpmtst-form").html(obj.message);strongValidation.scrollOnSuccess()}else{for(var key in obj.errors){if(obj.errors.hasOwnProperty(key)){jQuery("div.wpmtst-"+key).find("span.error").remove().end().append('<span class="error">'+obj.errors[key]+"</span>")}}}},scrollOnSuccess:function(){if(strongValidation.settings.scroll.onSuccess){var containerOffset,scrollTop;containerOffset=jQuery(".testimonial-success").offset();if(containerOffset){scrollTop=containerOffset.top-strongValidation.settings.scroll.onSuccessOffset;if(jQuery("#wpadminbar").length){scrollTop-=32}jQuery("html, body").animate({scrollTop:scrollTop},800)}}},disableForm:function(){jQuery(".strong-form-wait").show();jQuery("#wpmtst_submit_testimonial").prop("disabled",true)},enableForm:function(){jQuery(".strong-form-wait").hide();jQuery("#wpmtst_submit_testimonial").prop("disabled",false)}};
1
+ var strongValidation={defaults:{ajaxUrl:"",display:{successMessage:false},scroll:{onError:true,onErrorOffset:100,onSuccess:true,onSuccessOffset:100},fields:{}},settings:{},setOpts:function(options){this.settings=jQuery.extend({},this.defaults,options)},rules:{},setRules:function(){for(var i=0;i<this.settings.fields.length;i++){if("rating"===this.settings.fields[i].type){if(1===this.settings.fields[i].required){this.rules[this.settings.fields[i].name]={ratingRequired:true}}}}},init:function(){var strongForm={};if(typeof window["strongForm"]!=="undefined"){strongForm=window["strongForm"]}this.setOpts(strongForm);if(this.settings.display.successMessage){this.scrollOnSuccess()}else{this.setRules();this.changeEvents();this.customValidators();this.validateForm()}},changeEvents:function(){jQuery('input[type="text"], input[type="url"], input[type="email"], textarea',"#wpmtst-submission-form").on("change blur",function(e){e.target.value=e.target.value.trim()});jQuery("input[type=url]").change(function(){if(this.value.length&&!/^https*:\/\//.test(this.value)){this.value="https://"+this.value}});var ratings=document.getElementsByClassName("strong-rating");for(var i=0;i<ratings.length;i++){ratings[i].addEventListener("click",this.handleRadioEvent,true);ratings[i].addEventListener("keyup",this.handleRadioEvent,true);ratings[i].addEventListener("change",function(){jQuery(this).valid()},true)}},handleRadioEvent:function(e){if(e.keyCode>=48&&e.keyCode<=53){var key=e.keyCode-48;jQuery(this).find('input[type="radio"][value='+key+"]").click()}},customValidators:function(){jQuery.validator.addMethod("ratingRequired",function(value,element){return jQuery(element).find("input:checked").val()>0},jQuery.validator.messages.required)},validateForm:function(){var theForm=jQuery("#wpmtst-submission-form");theForm.validate({onfocusout:false,focusInvalid:false,invalidHandler:function(form,validator){var errors=validator.numberOfInvalids();if(errors){if(strongValidation.settings.scroll.onError){if(typeof validator.errorList[0]!=="undefined"){var firstError=jQuery(validator.errorList[0].element);var fieldOffset=firstError.closest(".form-field").offset();var scrollTop=fieldOffset.top-strongValidation.settings.scroll.onErrorOffset;jQuery("html, body").animate({scrollTop:scrollTop},800,function(){firstError.focus()})}}else{validator.errorList[0].element.focus()}}},submitHandler:function(form){strongValidation.disableForm();if(strongValidation.settings.ajaxUrl!==""){window.onbeforeunload=function(){return"Please wait while the form is submitted."};var formOptions={url:strongValidation.settings.ajaxUrl,data:{action:"wpmtst_form2"},success:strongValidation.showResponse};jQuery(form).ajaxSubmit(formOptions)}else{form.submit()}},rules:strongValidation.rules,errorPlacement:function(error,element){error.appendTo(element.closest("div.form-field"))},highlight:function(element,errorClass,validClass){if(element.type==="checkbox"){jQuery(element).closest(".field-wrap").addClass(errorClass).removeClass(validClass)}else if("rating"===jQuery(element).data("fieldType")){jQuery(element).closest(".field-wrap").addClass(errorClass).removeClass(validClass)}else{jQuery(element).addClass(errorClass).removeClass(validClass)}},unhighlight:function(element,errorClass,validClass){if(element.type==="checkbox"){jQuery(element).closest(".field-wrap").removeClass(errorClass).addClass(validClass)}else if("rating"===jQuery(element).data("fieldType")){jQuery(element).closest(".field-wrap").removeClass(errorClass).addClass(validClass)}else{jQuery(element).removeClass(errorClass).addClass(validClass)}}})},showResponse:function(response){window.onbeforeunload=null;strongValidation.enableForm();var obj=JSON.parse(response);if(obj.success){jQuery("#wpmtst-form").html(obj.message);strongValidation.scrollOnSuccess()}else{for(var key in obj.errors){if(obj.errors.hasOwnProperty(key)){jQuery("div.wpmtst-"+key).find("span.error").remove().end().append('<span class="error">'+obj.errors[key]+"</span>")}}}},scrollOnSuccess:function(){if(strongValidation.settings.scroll.onSuccess){var containerOffset,scrollTop;containerOffset=jQuery(".testimonial-success").offset();if(containerOffset){scrollTop=containerOffset.top-strongValidation.settings.scroll.onSuccessOffset;if(jQuery("#wpadminbar").length){scrollTop-=32}jQuery("html, body").animate({scrollTop:scrollTop},800)}}},disableForm:function(){jQuery(".strong-form-wait").show();jQuery("#wpmtst_submit_testimonial").prop("disabled",true)},enableForm:function(){jQuery(".strong-form-wait").hide();jQuery("#wpmtst_submit_testimonial").prop("disabled",false)}};
public/js/lib/strongslider/jquery.strongslider.js CHANGED
@@ -96,7 +96,6 @@
96
  minSlides: 1,
97
  maxSlides: 1,
98
  moveSlides: 0,
99
- minThreshold: 480,
100
 
101
  // CALLBACKS
102
  onSliderLoad: function () { return true; },
@@ -151,6 +150,7 @@
151
  slider.settings = $.extend({}, defaults, config, options);
152
  slider.debug = slider.settings.debug;
153
  slider.logAs = slider.settings.logAs;
 
154
  if (slider.debug) console.log(slider.logAs, 'slider.settings', slider.settings);
155
 
156
  // store the original children
@@ -173,7 +173,9 @@
173
  slider.active = {index: slider.settings.startSlide};
174
 
175
  // store if the slider is in carousel mode (displaying / moving multiple slides)
176
- slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1;
 
 
177
 
178
  // if carousel, force preloadImages = 'all'
179
  if (slider.carousel) {
@@ -361,15 +363,7 @@
361
  });
362
 
363
  // apply the calculated width after the float is applied to prevent scrollbar interference
364
- // Maybe copy to redrawSlider function.
365
- var wrapWidth = slider.viewport.width();
366
- if (slider.debug) console.log('wrapWidth', wrapWidth);
367
- if (wrapWidth < slider.settings.minThreshold) {
368
- slider.settings.maxSlides = 1;
369
- slider.settings.moveSlides = 0;
370
- slider.settings.slideMargin = 10;
371
- }
372
- slider.children.css('width', getSlideWidth2());
373
 
374
  // if slideMargin is supplied, add the css
375
  if (slider.settings.mode === 'horizontal' && slider.settings.slideMargin > 0) {
@@ -434,6 +428,51 @@
434
  }
435
  };
436
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
437
  var loadElements = function(selector, callback) {
438
  var total = selector.find('img:not([src=""]), iframe').length,
439
  count = 0;
@@ -472,7 +511,7 @@
472
  slider.loader.remove();
473
 
474
  // set the left / top position of "el"
475
- setSlidePosition();
476
 
477
  // if "vertical" mode, always use adaptiveHeight to prevent odd behavior
478
  if (slider.settings.mode === 'vertical') {
@@ -480,12 +519,12 @@
480
  }
481
 
482
  // set the viewport height
483
- slider.viewport.height(getViewportHeight());
484
 
485
  // if stretch, set t-slide height to 100%
486
- if (slider.settings.stretch) {
487
- setSlideHeight();
488
- }
489
 
490
  // make sure everything is positioned just right (same as a window resize)
491
  el.redrawSlider();
@@ -564,7 +603,10 @@
564
  };
565
 
566
  // Debounced resize event.
567
- var updateLayout = _.debounce(function () { resizeWindow(); }, 250);
 
 
 
568
 
569
  // General visibility check.
570
  var visibilityCheck = function () {
@@ -607,6 +649,9 @@
607
  }
608
  };
609
 
 
 
 
610
  var setSlideHeight = function () {
611
  var heights = slider.children.map(function () {
612
  return jQuery(this).actual('outerHeight');
@@ -616,6 +661,13 @@
616
  slider.children.height(maxHeight);
617
  };
618
 
 
 
 
 
 
 
 
619
  // Function to get the max value in array
620
  var arrayMax = function (array) {
621
  return Math.max.apply(Math, array);
@@ -643,10 +695,11 @@
643
  if (!slider.carousel) {
644
 
645
  children = slider.children.eq(slider.active.index);
646
- // if carousel, return a slice of children
647
 
648
  } else {
649
 
 
 
650
  // get the individual slide index
651
  var currentIndex = slider.settings.moveSlides === 1 ? slider.active.index : slider.active.index * getMoveBy();
652
 
@@ -695,6 +748,13 @@
695
  return height;
696
  };
697
 
 
 
 
 
 
 
 
698
  /**
699
  * Returns the calculated width to be used for the outer wrapper / viewport
700
  */
@@ -708,8 +768,7 @@
708
  var getSlideWidth2 = function () {
709
  var wrapWidth = slider.viewport.width();
710
  var margins = slider.settings.slideMargin * (slider.settings.maxSlides - 1);
711
- var newElWidth = (wrapWidth - margins) / slider.settings.maxSlides;
712
- return newElWidth;
713
  };
714
 
715
  /**
@@ -1473,10 +1532,12 @@
1473
  var resizeWindow = function (e) {
1474
  // don't do anything if slider isn't initialized.
1475
  if (!slider.initialized) {
 
1476
  return;
1477
  }
1478
  // Delay if slider working.
1479
  if (slider.working) {
 
1480
  window.setTimeout(resizeWindow, 10);
1481
  } else {
1482
  // update all dynamic elements
@@ -1794,11 +1855,22 @@
1794
  * Update all dynamic slider elements
1795
  */
1796
  el.redrawSlider = function () {
1797
- // resize all children in ratio to new screen size
1798
- slider.children.add(el.find('.wpmslider-clone')).outerWidth(getSlideWidth2());
 
 
1799
 
1800
  // adjust the height
1801
- slider.viewport.css('height', getViewportHeight());
 
 
 
 
 
 
 
 
 
1802
 
1803
  // update the slide position
1804
  setSlidePosition();
96
  minSlides: 1,
97
  maxSlides: 1,
98
  moveSlides: 0,
 
99
 
100
  // CALLBACKS
101
  onSliderLoad: function () { return true; },
150
  slider.settings = $.extend({}, defaults, config, options);
151
  slider.debug = slider.settings.debug;
152
  slider.logAs = slider.settings.logAs;
153
+
154
  if (slider.debug) console.log(slider.logAs, 'slider.settings', slider.settings);
155
 
156
  // store the original children
173
  slider.active = {index: slider.settings.startSlide};
174
 
175
  // store if the slider is in carousel mode (displaying / moving multiple slides)
176
+ setBreakpoint();
177
+ // slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1;
178
+ console.log('init',slider.carousel);
179
 
180
  // if carousel, force preloadImages = 'all'
181
  if (slider.carousel) {
363
  });
364
 
365
  // apply the calculated width after the float is applied to prevent scrollbar interference
366
+ updateWidth();
 
 
 
 
 
 
 
 
367
 
368
  // if slideMargin is supplied, add the css
369
  if (slider.settings.mode === 'horizontal' && slider.settings.slideMargin > 0) {
428
  }
429
  };
430
 
431
+ /**
432
+ *
433
+ */
434
+ var setBreakpoint = function () {
435
+ if (slider.debug) console.log(slider.logAs, 'setBreakpoint');
436
+
437
+ // fallback
438
+ var currentBreakpoint = slider.settings.breakpoints.single;
439
+ var breakpoints = slider.settings.breakpoints.multiple;
440
+
441
+ if (slider.settings.type === 'show_multiple') {
442
+
443
+ for (var key in breakpoints) {
444
+ if (breakpoints.hasOwnProperty(key)) {
445
+ if (verge.viewportW() >= breakpoints[key].width) {
446
+ currentBreakpoint = breakpoints[key];
447
+ break;
448
+ }
449
+ }
450
+ }
451
+
452
+ }
453
+
454
+ if (slider.debug) console.log('current breakpoint', currentBreakpoint);
455
+
456
+ slider.settings.maxSlides = currentBreakpoint.maxSlides;
457
+ slider.settings.moveSlides = currentBreakpoint.moveSlides;
458
+ slider.settings.slideMargin = currentBreakpoint.slideMargin;
459
+
460
+ slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1;
461
+ };
462
+
463
+ /**
464
+ *
465
+ */
466
+ var updateWidth = function () {
467
+ setBreakpoint();
468
+ slider.children.css('width', getSlideWidth2());
469
+ };
470
+
471
+ /**
472
+ *
473
+ * @param selector
474
+ * @param callback
475
+ */
476
  var loadElements = function(selector, callback) {
477
  var total = selector.find('img:not([src=""]), iframe').length,
478
  count = 0;
511
  slider.loader.remove();
512
 
513
  // set the left / top position of "el"
514
+ // setSlidePosition();
515
 
516
  // if "vertical" mode, always use adaptiveHeight to prevent odd behavior
517
  if (slider.settings.mode === 'vertical') {
519
  }
520
 
521
  // set the viewport height
522
+ // setViewportHeight();
523
 
524
  // if stretch, set t-slide height to 100%
525
+ // if (slider.settings.stretch) {
526
+ // setSlideHeight();
527
+ // }
528
 
529
  // make sure everything is positioned just right (same as a window resize)
530
  el.redrawSlider();
603
  };
604
 
605
  // Debounced resize event.
606
+ var updateLayout = _.debounce(function () {
607
+ if (slider.debug) console.log(slider.logAs, 'updateLayout');
608
+ resizeWindow();
609
+ }, 250);
610
 
611
  // General visibility check.
612
  var visibilityCheck = function () {
649
  }
650
  };
651
 
652
+ /**
653
+ *
654
+ */
655
  var setSlideHeight = function () {
656
  var heights = slider.children.map(function () {
657
  return jQuery(this).actual('outerHeight');
661
  slider.children.height(maxHeight);
662
  };
663
 
664
+ /**
665
+ *
666
+ */
667
+ var unsetSlideHeight = function () {
668
+ slider.children.height('auto');
669
+ };
670
+
671
  // Function to get the max value in array
672
  var arrayMax = function (array) {
673
  return Math.max.apply(Math, array);
695
  if (!slider.carousel) {
696
 
697
  children = slider.children.eq(slider.active.index);
 
698
 
699
  } else {
700
 
701
+ // if carousel, return a slice of children
702
+
703
  // get the individual slide index
704
  var currentIndex = slider.settings.moveSlides === 1 ? slider.active.index : slider.active.index * getMoveBy();
705
 
748
  return height;
749
  };
750
 
751
+ /**
752
+ *
753
+ */
754
+ var setViewportHeight = function () {
755
+ slider.viewport.height(getViewportHeight());
756
+ };
757
+
758
  /**
759
  * Returns the calculated width to be used for the outer wrapper / viewport
760
  */
768
  var getSlideWidth2 = function () {
769
  var wrapWidth = slider.viewport.width();
770
  var margins = slider.settings.slideMargin * (slider.settings.maxSlides - 1);
771
+ return Math.floor( (wrapWidth - margins) / slider.settings.maxSlides );
 
772
  };
773
 
774
  /**
1532
  var resizeWindow = function (e) {
1533
  // don't do anything if slider isn't initialized.
1534
  if (!slider.initialized) {
1535
+ if (slider.debug) console.log(slider.logAs, 'slider not initialized');
1536
  return;
1537
  }
1538
  // Delay if slider working.
1539
  if (slider.working) {
1540
+ if (slider.debug) console.log(slider.logAs, 'slider working');
1541
  window.setTimeout(resizeWindow, 10);
1542
  } else {
1543
  // update all dynamic elements
1855
  * Update all dynamic slider elements
1856
  */
1857
  el.redrawSlider = function () {
1858
+ if (slider.debug) console.log(slider.logAs, 'redrawSlider');
1859
+
1860
+ // maybe set/revert carousel
1861
+ updateWidth();
1862
 
1863
  // adjust the height
1864
+ unsetSlideHeight();
1865
+ setViewportHeight();
1866
+
1867
+ // if stretch, set t-slide height to 100%
1868
+ if (slider.settings.stretch) {
1869
+ setSlideHeight();
1870
+ }
1871
+
1872
+ // resize all children in ratio to new screen size
1873
+ slider.children.add(el.find('.wpmslider-clone')).outerWidth(getSlideWidth2());
1874
 
1875
  // update the slide position
1876
  setSlidePosition();
public/js/lib/strongslider/jquery.strongslider.min.js CHANGED
@@ -1 +1 @@
1
- (function($){var defaults={debug:false,logAs:"strongSlider",compat:{lazyload:{active:false,classes:{}}},mode:"horizontal",slideSelector:"div.t-slide",infiniteLoop:true,hideControlOnEnd:false,speed:500,easing:null,slideMargin:10,startSlide:0,randomStart:false,captions:false,adaptiveHeight:false,adaptiveHeightSpeed:500,video:false,useCSS:true,preloadImages:"visible",responsive:true,slideZIndex:50,wrapperClass:"wpmslider-wrapper",stretch:false,imagesLoaded:true,touchEnabled:true,swipeThreshold:50,oneToOneTouch:true,preventDefaultSwipeX:true,preventDefaultSwipeY:false,ariaLive:true,ariaHidden:true,keyboardEnabled:false,pager:true,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:true,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:false,startText:"Start",stopText:"Stop",autoControlsCombine:false,autoControlsSelector:null,auto:true,pause:4e3,autoStart:true,autoDirection:"next",stopAutoOnClick:false,autoHover:false,autoDelay:0,autoSlideForOnePage:false,minSlides:1,maxSlides:1,moveSlides:0,minThreshold:480,onSliderLoad:function(){return true},onSlideBefore:function(){return true},onSlideAfter:function(){return true},onSlideNext:function(){return true},onSlidePrev:function(){return true},onSliderResize:function(){return true},onAutoChange:function(){return true}};$.fn.strongSlider=function(options){if(this.length===0){return this}var slider={},viewEl=this,el=this.find(".wpmslider-content");if($(el).data("strongSlider")){return}var init=function(){if($(el).data("strongSlider")){return}slider.visibilityInterval=0;slider.hidden=false;var sliderVar=viewEl.data("slider-var");var config={};if(typeof window[sliderVar]!=="undefined"){config=window[sliderVar].config}slider.settings=$.extend({},defaults,config,options);slider.debug=slider.settings.debug;slider.logAs=slider.settings.logAs;if(slider.debug)console.log(slider.logAs,"slider.settings",slider.settings);slider.children=el.children(slider.settings.slideSelector);if(slider.children.length<slider.settings.minSlides){slider.settings.minSlides=slider.children.length}if(slider.children.length<slider.settings.maxSlides){slider.settings.maxSlides=slider.children.length}if(slider.settings.randomStart){slider.settings.startSlide=Math.floor(Math.random()*slider.children.length)}slider.active={index:slider.settings.startSlide};slider.carousel=slider.settings.minSlides>1||slider.settings.maxSlides>1;if(slider.carousel){slider.settings.preloadImages="all"}slider.working=false;slider.controls={};slider.interval=null;slider.animProp=slider.settings.mode==="vertical"?"top":"left";slider.usingCSS=slider.settings.useCSS&&slider.settings.mode!=="fade"&&function(){var div=document.createElement("div"),props=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i=0;i<props.length;i++){if(div.style[props[i]]!==undefined){slider.cssPrefix=props[i].replace("Perspective","").toLowerCase();slider.animProp="-"+slider.cssPrefix+"-transform";return true}}return false}();if(slider.settings.mode==="vertical"){slider.settings.maxSlides=slider.settings.minSlides}el.data("origStyle",el.attr("style"));el.children(slider.settings.slideSelector).each(function(){$(this).data("origStyle",$(this).attr("style"))});if(!el.getSlideCount()){return}if(slider.settings.imagesLoaded){viewEl.imagesLoaded(function(){initVisibilityCheck()})}else{initVisibilityCheck()}};var reallyVisible=function(){return viewEl.is(":visible")&&viewEl.css("visibility")!=="hidden"};var compatCheck=function(){if(slider.settings.compat.lazyload){var inProgress=false;for(var i=0,len=slider.settings.compat.lazyload.classes.length;i<len;i++){var startClass=slider.settings.compat.lazyload.classes[i].start;var finishClass=slider.settings.compat.lazyload.classes[i].finish;if(startClass&&finishClass){if(viewEl.find("img."+startClass).length&&!viewEl.find("img."+finishClass).length){inProgress=true}}else if(startClass){if(viewEl.find("img."+startClass).length){inProgress=true}}else if(finishClass){if(!viewEl.find("img."+finishClass).length){inProgress=true}}}if(inProgress){if(slider.debug)console.log(slider.logAs,"lazy loading...");return false}}if(slider.debug)console.log(slider.logAs,"compat check complete");return true};var initVisibilityCheck=function(){if(reallyVisible()&&compatCheck()){clearInterval(slider.visibilityInterval);setup()}else{if(slider.visibilityInterval===0){slider.visibilityInterval=setInterval(initVisibilityCheck,1e3*4)}}};var setup=function(){var preloadSelector=slider.children.eq(slider.settings.startSlide);el.wrap('<div class="'+slider.settings.wrapperClass+'"><div class="wpmslider-viewport"></div></div>');slider.viewport=el.parent();if(slider.settings.ariaLive){slider.viewport.attr("aria-live","polite")}slider.loader=$('<div class="wpmslider-loading" />');slider.viewport.prepend(slider.loader);el.css({width:slider.settings.mode==="horizontal"?slider.children.length*1e3+215+"%":"auto",position:"relative"});if(slider.usingCSS&&slider.settings.easing){el.css("-"+slider.cssPrefix+"-transition-timing-function",slider.settings.easing)}else if(!slider.settings.easing){slider.settings.easing="swing"}slider.viewport.css({width:"100%",overflow:"hidden",position:"relative"});slider.viewport.parent().css({maxWidth:getViewportMaxWidth2()});if(!slider.settings.pager&&!slider.settings.controls){slider.viewport.parent().css({margin:"0 auto"})}slider.children.css({float:slider.settings.mode==="horizontal"?"left":"none",listStyle:"none",position:"relative"});var wrapWidth=slider.viewport.width();if(slider.debug)console.log("wrapWidth",wrapWidth);if(wrapWidth<slider.settings.minThreshold){slider.settings.maxSlides=1;slider.settings.moveSlides=0;slider.settings.slideMargin=10}slider.children.css("width",getSlideWidth2());if(slider.settings.mode==="horizontal"&&slider.settings.slideMargin>0){slider.children.css("marginRight",slider.settings.slideMargin)}if(slider.settings.mode==="vertical"&&slider.settings.slideMargin>0){slider.children.css("marginBottom",slider.settings.slideMargin)}if(slider.settings.mode==="fade"){slider.children.css({position:"absolute",zIndex:0,display:"none"});slider.children.eq(slider.settings.startSlide).css({zIndex:slider.settings.slideZIndex,display:"block"})}else{slider.children.css({display:"block"})}slider.controls.el=$('<div class="wpmslider-controls" />');if(slider.settings.captions){appendCaptions()}slider.active.last=slider.settings.startSlide===getPagerQty()-1;if(slider.settings.video){el.fitVids()}if(slider.settings.preloadImages==="none"){preloadSelector=null}else if(slider.settings.preloadImages==="all"){preloadSelector=slider.children}if(slider.settings.controls){appendControlPrev()}if(slider.settings.auto&&slider.settings.autoControls){appendControlsAuto()}if(slider.settings.pager){appendPager()}if(slider.settings.controls){appendControlNext()}if(slider.settings.controls||slider.settings.autoControls||slider.settings.pager){slider.viewport.after(slider.controls.el)}if(preloadSelector===null){start()}else{loadElements(preloadSelector,start)}};var loadElements=function(selector,callback){var total=selector.find('img:not([src=""]), iframe').length,count=0;if(total===0){callback();return}selector.find('img:not([src=""]), iframe').each(function(){$(this).one("load error",function(){if(++count===total){callback()}}).each(function(){if(this.complete||this.src===""){$(this).trigger("load")}})})};var start=function(){if(slider.settings.infiniteLoop&&slider.settings.mode!=="fade"){var slice=slider.settings.mode==="vertical"?slider.settings.minSlides:slider.settings.maxSlides,sliceAppend=slider.children.slice(0,slice).clone(true).addClass("wpmslider-clone"),slicePrepend=slider.children.slice(-slice).clone(true).addClass("wpmslider-clone");if(slider.settings.ariaHidden){sliceAppend.attr("aria-hidden",true);slicePrepend.attr("aria-hidden",true)}el.append(sliceAppend).prepend(slicePrepend)}slider.loader.remove();setSlidePosition();if(slider.settings.mode==="vertical"){slider.settings.adaptiveHeight=true}slider.viewport.height(getViewportHeight());if(slider.settings.stretch){setSlideHeight()}el.redrawSlider();slider.settings.onSliderLoad.call(el,slider.active.index);slider.initialized=true;slider.visibilityInterval=setInterval(visibilityCheck,500);if(slider.settings.responsive){attachListeners()}if(slider.settings.auto&&slider.settings.autoStart&&(getPagerQty()>1||slider.settings.autoSlideForOnePage)){initAuto()}if(slider.settings.pager){updatePagerActive(slider.settings.startSlide)}if(slider.settings.controls){updateDirectionControls()}if(slider.settings.touchEnabled){initTouch()}if(slider.settings.keyboardEnabled){$(document).keydown(keyPress)}};var attachListeners=function(){window.addEventListener("resize",updateLayout,false);window.addEventListener("orientationchange",updateLayout,false);window.addEventListener("blur",function(){pauseEvent("blur")});window.addEventListener("focus",function(){playEvent("blur")})};var updateLayout=_.debounce(function(){resizeWindow()},250);var visibilityCheck=function(){if(!slider.settings.auto){return}if(!reallyVisible()){pauseEvent("hide")}else{playEvent("hide")}if(!verge.inViewport(el)){pauseEvent("scroll")}else{playEvent("scroll")}};var pauseEvent=function(action){if(slider.interval){el.stopAuto(true);slider.autoPaused=action;if(slider.debug)console.log(slider.logAs,"pause",action)}};var playEvent=function(action){if(slider.autoPaused===action){el.startAuto(true);slider.autoPaused=null;if(slider.debug)console.log(slider.logAs,"play",action)}};var setSlideHeight=function(){var heights=slider.children.map(function(){return jQuery(this).actual("outerHeight")}).get();var maxHeight=arrayMax(heights);slider.children.height(maxHeight)};var arrayMax=function(array){return Math.max.apply(Math,array)};var getViewportHeight=function(){var height=0;var children=$();if(slider.settings.mode!=="vertical"&&!slider.settings.adaptiveHeight){children=slider.children}else{if(!slider.carousel){children=slider.children.eq(slider.active.index)}else{var currentIndex=slider.settings.moveSlides===1?slider.active.index:slider.active.index*getMoveBy();children=slider.children.eq(currentIndex);for(var i=1;i<=slider.settings.maxSlides-1;i++){if(currentIndex+i>=slider.children.length){children=children.add(slider.children.eq(i-1))}else{children=children.add(slider.children.eq(currentIndex+i))}}}}if(slider.settings.mode==="vertical"){children.each(function(index){height+=$(this).outerHeight()});if(slider.settings.slideMargin>0){height+=slider.settings.slideMargin*(slider.settings.minSlides-1)}}else{height=Math.max.apply(Math,children.map(function(){return $(this).outerHeight(false)}).get())}if(slider.viewport.css("box-sizing")==="border-box"){height+=parseFloat(slider.viewport.css("padding-top"))+parseFloat(slider.viewport.css("padding-bottom"))+parseFloat(slider.viewport.css("border-top-width"))+parseFloat(slider.viewport.css("border-bottom-width"))}else if(slider.viewport.css("box-sizing")==="padding-box"){height+=parseFloat(slider.viewport.css("padding-top"))+parseFloat(slider.viewport.css("padding-bottom"))}return height};var getViewportMaxWidth2=function(){return"100%"};var getSlideWidth2=function(){var wrapWidth=slider.viewport.width();var margins=slider.settings.slideMargin*(slider.settings.maxSlides-1);var newElWidth=(wrapWidth-margins)/slider.settings.maxSlides;return newElWidth};var getNumberSlidesShowing2=function(){return slider.settings.maxSlides};var getPagerQty=function(){var pagerQty=0,breakPoint=0,counter=0;if(slider.settings.moveSlides>0){if(slider.settings.infiniteLoop){pagerQty=Math.ceil(slider.children.length/getMoveBy())}else{while(breakPoint<slider.children.length){++pagerQty;breakPoint=counter+getNumberSlidesShowing2();counter+=slider.settings.moveSlides<=getNumberSlidesShowing2()?slider.settings.moveSlides:getNumberSlidesShowing2()}return counter}}else{pagerQty=Math.ceil(slider.children.length/getNumberSlidesShowing2())}return pagerQty};var getMoveBy=function(){if(slider.settings.moveSlides>0&&slider.settings.moveSlides<=getNumberSlidesShowing2()){return slider.settings.moveSlides}return getNumberSlidesShowing2()};var setSlidePosition=function(){var position,lastChild,lastShowingIndex;if(slider.children.length>slider.settings.maxSlides&&slider.active.last&&!slider.settings.infiniteLoop){if(slider.settings.mode==="horizontal"){lastChild=slider.children.last();position=lastChild.position();setPositionProperty(-(position.left-(slider.viewport.width()-lastChild.outerWidth())),"reset",0)}else if(slider.settings.mode==="vertical"){lastShowingIndex=slider.children.length-slider.settings.minSlides;position=slider.children.eq(lastShowingIndex).position();setPositionProperty(-position.top,"reset",0)}}else{position=slider.children.eq(slider.active.index*getMoveBy()).position();if(slider.active.index===getPagerQty()-1){slider.active.last=true}if(position!==undefined){if(slider.settings.mode==="horizontal"){setPositionProperty(-position.left,"reset",0)}else if(slider.settings.mode==="vertical"){setPositionProperty(-position.top,"reset",0)}else if(slider.settings.mode==="none"){setPositionProperty(-position.top,"reset",0)}}}};var setPositionProperty=function(value,type,duration,params){var animateObj,propValue;if(slider.usingCSS){if(slider.settings.mode==="vertical"){propValue="translateY("+value+"px)"}else if(slider.settings.mode==="horizontal"){propValue="translateX("+value+"px"}else if(slider.settings.mode==="none"){propValue="translateY("+value+"px)";duration=0}el.css("-"+slider.cssPrefix+"-transition-duration",duration/1e3+"s");if(type==="slide"){el.css(slider.animProp,propValue);if(duration!==0){el.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){if(!$(e.target).is(el)){return}el.off("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd");updateAfterSlideTransition()})}else{updateAfterSlideTransition()}}else if(type==="reset"){el.css(slider.animProp,propValue)}}else{animateObj={};animateObj[slider.animProp]=value;if(type==="slide"){el.animate(animateObj,duration,slider.settings.easing,function(){updateAfterSlideTransition()})}else if(type==="reset"){el.css(slider.animProp,value)}}};var populatePager=function(){var pagerHtml="",linkContent="",pagerQty=getPagerQty();for(var i=0;i<pagerQty;i++){linkContent="";if(slider.settings.buildPager){if(slider.settings.buildPager==="icons"){linkContent=""}if($.isFunction(slider.settings.buildPager)||slider.settings.pagerCustom){linkContent=slider.settings.buildPager(i)}slider.pagerEl.addClass("wpmslider-custom-pager")}else{linkContent=i+1;slider.pagerEl.addClass("wpmslider-default-pager")}pagerHtml+='<div class="wpmslider-pager-item"><a href="" data-slide-index="'+i+'" class="wpmslider-pager-link">'+linkContent+"</a></div>"}slider.pagerEl.html(pagerHtml)};var appendPager=function(){if(!slider.settings.pagerCustom){slider.pagerEl=$('<div class="wpmslider-pager" />');if(slider.settings.pagerSelector){$(slider.settings.pagerSelector).html(slider.pagerEl)}else{slider.controls.el.addClass("wpmslider-has-pager").append(slider.pagerEl)}populatePager()}else{slider.pagerEl=$(slider.settings.pagerCustom)}slider.pagerEl.on("click touchend","a",clickPagerBind)};var appendControlPrev=function(){slider.controls.prev=$('<a class="wpmslider-prev" href="">'+slider.settings.prevText+"</a>");slider.controls.prev.on("click touchend",clickPrevBind);if(slider.settings.prevSelector){$(slider.settings.prevSelector).append(slider.controls.prev)}if(!slider.settings.prevSelector){slider.controls.directionEl=$('<div class="wpmslider-controls-direction" />');slider.controls.directionEl.append(slider.controls.prev);slider.controls.el.addClass("wpmslider-has-controls-direction").append(slider.controls.directionEl)}};var appendControlNext=function(){slider.controls.next=$('<a class="wpmslider-next" href="">'+slider.settings.nextText+"</a>");slider.controls.next.on("click touchend",clickNextBind);if(slider.settings.nextSelector){$(slider.settings.nextSelector).append(slider.controls.next)}if(!slider.settings.nextSelector){slider.controls.directionEl=$('<div class="wpmslider-controls-direction" />');slider.controls.directionEl.append(slider.controls.next);slider.controls.el.addClass("wpmslider-has-controls-direction").append(slider.controls.directionEl)}};var appendControlsAuto=function(){slider.controls.start=$('<div class="wpmslider-controls-auto-item"><a class="wpmslider-start" href="">'+slider.settings.startText+"</a></div>");slider.controls.stop=$('<div class="wpmslider-controls-auto-item"><a class="wpmslider-stop" href="">'+slider.settings.stopText+"</a></div>");slider.controls.autoEl=$('<div class="wpmslider-controls-auto" />');slider.controls.autoEl.on("click",".wpmslider-start",clickStartBind);slider.controls.autoEl.on("click",".wpmslider-stop",clickStopBind);if(slider.settings.autoControlsCombine){slider.controls.autoEl.append(slider.controls.start)}else{slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop)}if(slider.settings.autoControlsSelector){$(slider.settings.autoControlsSelector).html(slider.controls.autoEl)}else{slider.controls.el.addClass("wpmslider-has-controls-auto").append(slider.controls.autoEl)}updateAutoControls(slider.settings.autoStart?"stop":"start")};var appendCaptions=function(){slider.children.each(function(index){var title=$(this).find("img:first").attr("title");if(title!==undefined&&(""+title).length){$(this).append('<div class="wpmslider-caption"><span>'+title+"</span></div>")}})};var clickNextBind=function(e){e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}el.goToNextSlide()};var clickPrevBind=function(e){e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}el.goToPrevSlide()};var clickStartBind=function(e){el.startAuto();e.preventDefault();e.stopPropagation()};var clickStopBind=function(e){el.stopAuto();e.preventDefault();e.stopPropagation()};var clickPagerBind=function(e){var pagerLink,pagerIndex;e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}pagerLink=$(e.currentTarget);if(pagerLink.attr("data-slide-index")!==undefined){pagerIndex=parseInt(pagerLink.attr("data-slide-index"));if(pagerIndex!==slider.active.index){el.goToSlide(pagerIndex)}}};var updatePagerActive=function(slideIndex){var len=slider.children.length;if(slider.settings.pagerType==="short"){if(slider.settings.maxSlides>1){len=Math.ceil(slider.children.length/slider.settings.maxSlides)}slider.pagerEl.html(slideIndex+1+slider.settings.pagerShortSeparator+len);return}slider.pagerEl.find("a").removeClass("active");slider.pagerEl.each(function(i,el){$(el).find("a").eq(slideIndex).addClass("active")})};var updateAfterSlideTransition=function(){if(slider.settings.infiniteLoop){var position="";if(slider.active.index===0){position=slider.children.eq(0).position()}else if(slider.active.index===getPagerQty()-1&&slider.carousel){position=slider.children.eq((getPagerQty()-1)*getMoveBy()).position()}else if(slider.active.index===slider.children.length-1){position=slider.children.eq(slider.children.length-1).position()}if(position){if(slider.settings.mode==="horizontal"){setPositionProperty(-position.left,"reset",0)}else if(slider.settings.mode==="vertical"){setPositionProperty(-position.top,"reset",0)}}}slider.working=false;slider.settings.onSlideAfter.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)};var updateAutoControls=function(state){if(slider.settings.autoControlsCombine){slider.controls.autoEl.html(slider.controls[state])}else{slider.controls.autoEl.find("a").removeClass("active");slider.controls.autoEl.find("a:not(.wpmslider-"+state+")").addClass("active")}};var updateDirectionControls=function(){if(getPagerQty()===1){slider.controls.prev.addClass("disabled");slider.controls.next.addClass("disabled")}else if(!slider.settings.infiniteLoop&&slider.settings.hideControlOnEnd){if(slider.active.index===0){slider.controls.prev.addClass("disabled");slider.controls.next.removeClass("disabled")}else if(slider.active.index===getPagerQty()-1){slider.controls.next.addClass("disabled");slider.controls.prev.removeClass("disabled")}else{slider.controls.prev.removeClass("disabled");slider.controls.next.removeClass("disabled")}}};var initAuto=function(){if(slider.settings.autoDelay>0){setTimeout(el.startAuto,slider.settings.autoDelay)}else{el.startAuto()}if(slider.settings.autoHover){el.hover(function(){pauseEvent("hover")},function(){playEvent("hover")})}};var keyPress=function(e){var activeElementTag=document.activeElement.tagName.toLowerCase(),tagFilters="input|textarea",p=new RegExp(activeElementTag,["i"]),result=p.exec(tagFilters);if(result===null&&verge.inViewport(el)){if(e.keyCode===39){clickNextBind(e);return false}else if(e.keyCode===37){clickPrevBind(e);return false}}};var initTouch=function(){slider.touch={start:{x:0,y:0},end:{x:0,y:0}};slider.viewport.on("touchstart MSPointerDown pointerdown",onTouchStart);slider.viewport.on("click",".wpmslider a",function(e){if(slider.viewport.hasClass("click-disabled")){e.preventDefault();e.stopPropagation();slider.viewport.removeClass("click-disabled")}})};var onTouchStart=function(e){if(e.type!=="touchstart"&&e.button!==0){return}slider.controls.el.addClass("disabled");if(slider.working){e.preventDefault();e.stopPropagation();slider.controls.el.removeClass("disabled")}else{slider.touch.originalPos=el.position();var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig];var chromePointerEvents=typeof PointerEvent==="function";if(chromePointerEvents){if(orig.pointerId===undefined){return}}slider.touch.start.x=touchPoints[0].pageX;slider.touch.start.y=touchPoints[0].pageY;if(slider.viewport.get(0).setPointerCapture){slider.pointerId=orig.pointerId;slider.viewport.get(0).setPointerCapture(slider.pointerId)}slider.originalClickTarget=orig.originalTarget||orig.target;slider.originalClickButton=orig.button;slider.originalClickButtons=orig.buttons;slider.originalEventType=orig.type;slider.hasMove=false;slider.viewport.on("touchmove MSPointerMove pointermove",onTouchMove);slider.viewport.on("touchend MSPointerUp pointerup",onTouchEnd);slider.viewport.on("MSPointerCancel pointercancel",onPointerCancel)}};var onPointerCancel=function(e){e.preventDefault();setPositionProperty(slider.touch.originalPos.left,"reset",0);slider.controls.el.removeClass("disabled");slider.viewport.off("MSPointerCancel pointercancel",onPointerCancel);slider.viewport.off("touchmove MSPointerMove pointermove",onTouchMove);slider.viewport.off("touchend MSPointerUp pointerup",onTouchEnd);if(slider.viewport.get(0).releasePointerCapture){slider.viewport.get(0).releasePointerCapture(slider.pointerId)}};var onTouchMove=function(e){var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig],xMovement=Math.abs(touchPoints[0].pageX-slider.touch.start.x),yMovement=Math.abs(touchPoints[0].pageY-slider.touch.start.y),value=0,change=0;slider.hasMove=true;if(xMovement*3>yMovement&&slider.settings.preventDefaultSwipeX){e.preventDefault();e.stopPropagation()}else if(yMovement*3>xMovement&&slider.settings.preventDefaultSwipeY){e.preventDefault();e.stopPropagation()}if(e.type!=="touchmove"){e.preventDefault()}if(slider.settings.mode!=="fade"&&slider.settings.oneToOneTouch){if(slider.settings.mode==="horizontal"){change=touchPoints[0].pageX-slider.touch.start.x;value=slider.touch.originalPos.left+change}else{change=touchPoints[0].pageY-slider.touch.start.y;value=slider.touch.originalPos.top+change}setPositionProperty(value,"reset",0)}};var onTouchEnd=function(e){e.preventDefault();slider.viewport.off("touchmove MSPointerMove pointermove",onTouchMove);slider.controls.el.removeClass("disabled");var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig],value=0,distance=0;slider.touch.end.x=touchPoints[0].pageX;slider.touch.end.y=touchPoints[0].pageY;if(slider.settings.mode==="fade"){distance=Math.abs(slider.touch.start.x-slider.touch.end.x);if(distance>=slider.settings.swipeThreshold){if(slider.touch.start.x>slider.touch.end.x){el.goToNextSlide()}else{el.goToPrevSlide()}el.stopAuto()}}else{if(slider.settings.mode==="horizontal"){distance=slider.touch.end.x-slider.touch.start.x;value=slider.touch.originalPos.left}else{distance=slider.touch.end.y-slider.touch.start.y;value=slider.touch.originalPos.top}if(!slider.settings.infiniteLoop&&(slider.active.index===0&&distance>0||slider.active.last&&distance<0)){setPositionProperty(value,"reset",200)}else{if(Math.abs(distance)>=slider.settings.swipeThreshold){if(distance<0){el.goToNextSlide()}else{el.goToPrevSlide()}el.stopAuto()}else{setPositionProperty(value,"reset",200)}}}slider.viewport.off("touchend MSPointerUp pointerup",onTouchEnd);if(slider.viewport.get(0).releasePointerCapture){slider.viewport.get(0).releasePointerCapture(slider.pointerId)}if(slider.hasMove===false&&(slider.originalClickButton===0||slider.originalEventType==="touchstart")){$(slider.originalClickTarget).trigger({type:"click",button:slider.originalClickButton,buttons:slider.originalClickButtons})}};var resizeWindow=function(e){if(!slider.initialized){return}if(slider.working){window.setTimeout(resizeWindow,10)}else{el.redrawSlider();slider.settings.onSliderResize.call(el,slider.active.index)}};var applyAriaHiddenAttributes=function(startVisibleIndex){var numberOfSlidesShowing=getNumberSlidesShowing2();if(slider.settings.ariaHidden){slider.children.attr("aria-hidden","true");slider.children.slice(startVisibleIndex,startVisibleIndex+numberOfSlidesShowing).attr("aria-hidden","false")}};var setSlideIndex=function(slideIndex){if(slideIndex<0){if(slider.settings.infiniteLoop){return getPagerQty()-1}else{return slider.active.index}}else if(slideIndex>=getPagerQty()){if(slider.settings.infiniteLoop){return 0}else{return slider.active.index}}else{return slideIndex}};el.goToSlide=function(slideIndex,direction){var performTransition=true,moveBy=0,position={left:0,top:0},lastChild=null,lastShowingIndex,eq,value,requestEl;slider.oldIndex=slider.active.index;slider.active.index=setSlideIndex(slideIndex);if(slider.working||slider.active.index===slider.oldIndex){return}slider.working=true;performTransition=slider.settings.onSlideBefore.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index);if(typeof performTransition!=="undefined"&&!performTransition){slider.active.index=slider.oldIndex;slider.working=false;return}if(direction==="next"){if(!slider.settings.onSlideNext.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)){performTransition=false}}else if(direction==="prev"){if(!slider.settings.onSlidePrev.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)){performTransition=false}}slider.active.last=slider.active.index>=getPagerQty()-1;if(slider.settings.pager||slider.settings.pagerCustom){updatePagerActive(slider.active.index)}if(slider.settings.controls){updateDirectionControls()}if(slider.settings.mode==="fade"){if(slider.settings.adaptiveHeight&&slider.viewport.height()!==getViewportHeight()){slider.viewport.animate({height:getViewportHeight()},slider.settings.adaptiveHeightSpeed)}slider.children.filter(":visible").fadeOut(slider.settings.speed).css({zIndex:0});slider.children.eq(slider.active.index).css("zIndex",slider.settings.slideZIndex+1).fadeIn(slider.settings.speed,function(){$(this).css("zIndex",slider.settings.slideZIndex);updateAfterSlideTransition()})}else{if(slider.settings.adaptiveHeight&&slider.viewport.height()!==getViewportHeight()){slider.viewport.animate({height:getViewportHeight()},slider.settings.adaptiveHeightSpeed)}if(!slider.settings.infiniteLoop&&slider.carousel&&slider.active.last){if(slider.settings.mode==="horizontal"){lastChild=slider.children.eq(slider.children.length-1);position=lastChild.position();moveBy=slider.viewport.width()-lastChild.outerWidth()}else{lastShowingIndex=slider.children.length-slider.settings.minSlides;position=slider.children.eq(lastShowingIndex).position()}}else if(slider.carousel&&slider.active.last&&direction==="prev"){eq=slider.settings.moveSlides===1?slider.settings.maxSlides-getMoveBy():(getPagerQty()-1)*getMoveBy()-(slider.children.length-slider.settings.maxSlides);lastChild=el.children(".wpmslider-clone").eq(eq);position=lastChild.position()}else if(direction==="next"&&slider.active.index===0){position=el.find("> .wpmslider-clone").eq(slider.settings.maxSlides).position();slider.active.last=false}else if(slideIndex>=0){requestEl=slideIndex*parseInt(getMoveBy());position=slider.children.eq(requestEl).position()}if(typeof position!=="undefined"){value=slider.settings.mode==="horizontal"?-(position.left-moveBy):-position.top;setPositionProperty(value,"slide",slider.settings.speed)}slider.working=false}if(slider.settings.ariaHidden){applyAriaHiddenAttributes(slider.active.index*getMoveBy())}};el.goToNextSlide=function(){if(!slider.settings.infiniteLoop&&slider.active.last){return}if(slider.working===true){return}var pagerIndex=parseInt(slider.active.index)+1;el.goToSlide(pagerIndex,"next")};el.goToPrevSlide=function(){if(!slider.settings.infiniteLoop&&slider.active.index===0){return}if(slider.working===true){return}var pagerIndex=parseInt(slider.active.index)-1;el.goToSlide(pagerIndex,"prev")};el.startAuto=function(preventControlUpdate){if(slider.interval){return}slider.interval=setInterval(function(){if(slider.settings.autoDirection==="next"){el.goToNextSlide()}else{el.goToPrevSlide()}},slider.settings.pause);slider.settings.onAutoChange.call(el,true);if(slider.settings.autoControls&&preventControlUpdate!==true){updateAutoControls("stop")}};el.stopAuto=function(preventControlUpdate){if(slider.autoPaused)slider.autoPaused=false;if(!slider.interval){return}clearInterval(slider.interval);slider.interval=null;slider.settings.onAutoChange.call(el,false);if(slider.settings.autoControls&&preventControlUpdate!==true){updateAutoControls("start")}};el.getCurrentSlide=function(){return slider.active.index};el.getCurrentSlideElement=function(){return slider.children.eq(slider.active.index)};el.getSlideElement=function(index){return slider.children.eq(index)};el.getSlideCount=function(){return slider.children.length};el.isWorking=function(){return slider.working};el.redrawSlider=function(){slider.children.add(el.find(".wpmslider-clone")).outerWidth(getSlideWidth2());slider.viewport.css("height",getViewportHeight());setSlidePosition();if(slider.active.last){slider.active.index=getPagerQty()-1}if(slider.active.index>=getPagerQty()){slider.active.last=true}if(slider.settings.pager&&!slider.settings.pagerCustom){populatePager();updatePagerActive(slider.active.index)}if(slider.settings.ariaHidden){applyAriaHiddenAttributes(slider.active.index*getMoveBy())}};el.destroySlider=function(){if(!slider.initialized){return}slider.initialized=false;$(".wpmslider-clone",this).remove();slider.children.each(function(){if($(this).data("origStyle")!==undefined){$(this).attr("style",$(this).data("origStyle"))}else{$(this).removeAttr("style")}});if($(this).data("origStyle")!==undefined){this.attr("style",$(this).data("origStyle"))}else{$(this).removeAttr("style")}$(this).unwrap().unwrap();if(slider.controls.el){slider.controls.el.remove()}if(slider.controls.next){slider.controls.next.remove()}if(slider.controls.prev){slider.controls.prev.remove()}if(slider.pagerEl&&slider.settings.controls&&!slider.settings.pagerCustom){slider.pagerEl.remove()}$(".wpmslider-caption",this).remove();if(slider.controls.autoEl){slider.controls.autoEl.remove()}clearInterval(slider.interval);clearInterval(slider.visibilityInterval);if(slider.settings.responsive){$(window).off("resize",resizeWindow)}if(slider.settings.keyboardEnabled){$(document).off("keydown",keyPress)}$(this).removeData("strongSlider")};el.reloadSlider=function(settings){if(settings!==undefined){options=settings}el.destroySlider();init();$(el).data("strongSlider",this)};init();$(el).data("strongSlider",this);viewEl.attr("data-state","init");if(slider.debug)console.log(slider.logAs,"viewport",verge.viewportW(),"x",verge.viewportH());return this}})(jQuery);
1
+ (function($){var defaults={debug:false,logAs:"strongSlider",compat:{lazyload:{active:false,classes:{}}},mode:"horizontal",slideSelector:"div.t-slide",infiniteLoop:true,hideControlOnEnd:false,speed:500,easing:null,slideMargin:10,startSlide:0,randomStart:false,captions:false,adaptiveHeight:false,adaptiveHeightSpeed:500,video:false,useCSS:true,preloadImages:"visible",responsive:true,slideZIndex:50,wrapperClass:"wpmslider-wrapper",stretch:false,imagesLoaded:true,touchEnabled:true,swipeThreshold:50,oneToOneTouch:true,preventDefaultSwipeX:true,preventDefaultSwipeY:false,ariaLive:true,ariaHidden:true,keyboardEnabled:false,pager:true,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:true,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:false,startText:"Start",stopText:"Stop",autoControlsCombine:false,autoControlsSelector:null,auto:true,pause:4e3,autoStart:true,autoDirection:"next",stopAutoOnClick:false,autoHover:false,autoDelay:0,autoSlideForOnePage:false,minSlides:1,maxSlides:1,moveSlides:0,onSliderLoad:function(){return true},onSlideBefore:function(){return true},onSlideAfter:function(){return true},onSlideNext:function(){return true},onSlidePrev:function(){return true},onSliderResize:function(){return true},onAutoChange:function(){return true}};$.fn.strongSlider=function(options){if(this.length===0){return this}var slider={},viewEl=this,el=this.find(".wpmslider-content");if($(el).data("strongSlider")){return}var init=function(){if($(el).data("strongSlider")){return}slider.visibilityInterval=0;slider.hidden=false;var sliderVar=viewEl.data("slider-var");var config={};if(typeof window[sliderVar]!=="undefined"){config=window[sliderVar].config}slider.settings=$.extend({},defaults,config,options);slider.debug=slider.settings.debug;slider.logAs=slider.settings.logAs;if(slider.debug)console.log(slider.logAs,"slider.settings",slider.settings);slider.children=el.children(slider.settings.slideSelector);if(slider.children.length<slider.settings.minSlides){slider.settings.minSlides=slider.children.length}if(slider.children.length<slider.settings.maxSlides){slider.settings.maxSlides=slider.children.length}if(slider.settings.randomStart){slider.settings.startSlide=Math.floor(Math.random()*slider.children.length)}slider.active={index:slider.settings.startSlide};setBreakpoint();console.log("init",slider.carousel);if(slider.carousel){slider.settings.preloadImages="all"}slider.working=false;slider.controls={};slider.interval=null;slider.animProp=slider.settings.mode==="vertical"?"top":"left";slider.usingCSS=slider.settings.useCSS&&slider.settings.mode!=="fade"&&function(){var div=document.createElement("div"),props=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i=0;i<props.length;i++){if(div.style[props[i]]!==undefined){slider.cssPrefix=props[i].replace("Perspective","").toLowerCase();slider.animProp="-"+slider.cssPrefix+"-transform";return true}}return false}();if(slider.settings.mode==="vertical"){slider.settings.maxSlides=slider.settings.minSlides}el.data("origStyle",el.attr("style"));el.children(slider.settings.slideSelector).each(function(){$(this).data("origStyle",$(this).attr("style"))});if(!el.getSlideCount()){return}if(slider.settings.imagesLoaded){viewEl.imagesLoaded(function(){initVisibilityCheck()})}else{initVisibilityCheck()}};var reallyVisible=function(){return viewEl.is(":visible")&&viewEl.css("visibility")!=="hidden"};var compatCheck=function(){if(slider.settings.compat.lazyload){var inProgress=false;for(var i=0,len=slider.settings.compat.lazyload.classes.length;i<len;i++){var startClass=slider.settings.compat.lazyload.classes[i].start;var finishClass=slider.settings.compat.lazyload.classes[i].finish;if(startClass&&finishClass){if(viewEl.find("img."+startClass).length&&!viewEl.find("img."+finishClass).length){inProgress=true}}else if(startClass){if(viewEl.find("img."+startClass).length){inProgress=true}}else if(finishClass){if(!viewEl.find("img."+finishClass).length){inProgress=true}}}if(inProgress){if(slider.debug)console.log(slider.logAs,"lazy loading...");return false}}if(slider.debug)console.log(slider.logAs,"compat check complete");return true};var initVisibilityCheck=function(){if(reallyVisible()&&compatCheck()){clearInterval(slider.visibilityInterval);setup()}else{if(slider.visibilityInterval===0){slider.visibilityInterval=setInterval(initVisibilityCheck,1e3*4)}}};var setup=function(){var preloadSelector=slider.children.eq(slider.settings.startSlide);el.wrap('<div class="'+slider.settings.wrapperClass+'"><div class="wpmslider-viewport"></div></div>');slider.viewport=el.parent();if(slider.settings.ariaLive){slider.viewport.attr("aria-live","polite")}slider.loader=$('<div class="wpmslider-loading" />');slider.viewport.prepend(slider.loader);el.css({width:slider.settings.mode==="horizontal"?slider.children.length*1e3+215+"%":"auto",position:"relative"});if(slider.usingCSS&&slider.settings.easing){el.css("-"+slider.cssPrefix+"-transition-timing-function",slider.settings.easing)}else if(!slider.settings.easing){slider.settings.easing="swing"}slider.viewport.css({width:"100%",overflow:"hidden",position:"relative"});slider.viewport.parent().css({maxWidth:getViewportMaxWidth2()});if(!slider.settings.pager&&!slider.settings.controls){slider.viewport.parent().css({margin:"0 auto"})}slider.children.css({float:slider.settings.mode==="horizontal"?"left":"none",listStyle:"none",position:"relative"});updateWidth();if(slider.settings.mode==="horizontal"&&slider.settings.slideMargin>0){slider.children.css("marginRight",slider.settings.slideMargin)}if(slider.settings.mode==="vertical"&&slider.settings.slideMargin>0){slider.children.css("marginBottom",slider.settings.slideMargin)}if(slider.settings.mode==="fade"){slider.children.css({position:"absolute",zIndex:0,display:"none"});slider.children.eq(slider.settings.startSlide).css({zIndex:slider.settings.slideZIndex,display:"block"})}else{slider.children.css({display:"block"})}slider.controls.el=$('<div class="wpmslider-controls" />');if(slider.settings.captions){appendCaptions()}slider.active.last=slider.settings.startSlide===getPagerQty()-1;if(slider.settings.video){el.fitVids()}if(slider.settings.preloadImages==="none"){preloadSelector=null}else if(slider.settings.preloadImages==="all"){preloadSelector=slider.children}if(slider.settings.controls){appendControlPrev()}if(slider.settings.auto&&slider.settings.autoControls){appendControlsAuto()}if(slider.settings.pager){appendPager()}if(slider.settings.controls){appendControlNext()}if(slider.settings.controls||slider.settings.autoControls||slider.settings.pager){slider.viewport.after(slider.controls.el)}if(preloadSelector===null){start()}else{loadElements(preloadSelector,start)}};var setBreakpoint=function(){if(slider.debug)console.log(slider.logAs,"setBreakpoint");var currentBreakpoint=slider.settings.breakpoints.single;var breakpoints=slider.settings.breakpoints.multiple;if(slider.settings.type==="show_multiple"){for(var key in breakpoints){if(breakpoints.hasOwnProperty(key)){if(verge.viewportW()>=breakpoints[key].width){currentBreakpoint=breakpoints[key];break}}}}if(slider.debug)console.log("current breakpoint",currentBreakpoint);slider.settings.maxSlides=currentBreakpoint.maxSlides;slider.settings.moveSlides=currentBreakpoint.moveSlides;slider.settings.slideMargin=currentBreakpoint.slideMargin;slider.carousel=slider.settings.minSlides>1||slider.settings.maxSlides>1};var updateWidth=function(){setBreakpoint();slider.children.css("width",getSlideWidth2())};var loadElements=function(selector,callback){var total=selector.find('img:not([src=""]), iframe').length,count=0;if(total===0){callback();return}selector.find('img:not([src=""]), iframe').each(function(){$(this).one("load error",function(){if(++count===total){callback()}}).each(function(){if(this.complete||this.src===""){$(this).trigger("load")}})})};var start=function(){if(slider.settings.infiniteLoop&&slider.settings.mode!=="fade"){var slice=slider.settings.mode==="vertical"?slider.settings.minSlides:slider.settings.maxSlides,sliceAppend=slider.children.slice(0,slice).clone(true).addClass("wpmslider-clone"),slicePrepend=slider.children.slice(-slice).clone(true).addClass("wpmslider-clone");if(slider.settings.ariaHidden){sliceAppend.attr("aria-hidden",true);slicePrepend.attr("aria-hidden",true)}el.append(sliceAppend).prepend(slicePrepend)}slider.loader.remove();if(slider.settings.mode==="vertical"){slider.settings.adaptiveHeight=true}el.redrawSlider();slider.settings.onSliderLoad.call(el,slider.active.index);slider.initialized=true;slider.visibilityInterval=setInterval(visibilityCheck,500);if(slider.settings.responsive){attachListeners()}if(slider.settings.auto&&slider.settings.autoStart&&(getPagerQty()>1||slider.settings.autoSlideForOnePage)){initAuto()}if(slider.settings.pager){updatePagerActive(slider.settings.startSlide)}if(slider.settings.controls){updateDirectionControls()}if(slider.settings.touchEnabled){initTouch()}if(slider.settings.keyboardEnabled){$(document).keydown(keyPress)}};var attachListeners=function(){window.addEventListener("resize",updateLayout,false);window.addEventListener("orientationchange",updateLayout,false);window.addEventListener("blur",function(){pauseEvent("blur")});window.addEventListener("focus",function(){playEvent("blur")})};var updateLayout=_.debounce(function(){if(slider.debug)console.log(slider.logAs,"updateLayout");resizeWindow()},250);var visibilityCheck=function(){if(!slider.settings.auto){return}if(!reallyVisible()){pauseEvent("hide")}else{playEvent("hide")}if(!verge.inViewport(el)){pauseEvent("scroll")}else{playEvent("scroll")}};var pauseEvent=function(action){if(slider.interval){el.stopAuto(true);slider.autoPaused=action;if(slider.debug)console.log(slider.logAs,"pause",action)}};var playEvent=function(action){if(slider.autoPaused===action){el.startAuto(true);slider.autoPaused=null;if(slider.debug)console.log(slider.logAs,"play",action)}};var setSlideHeight=function(){var heights=slider.children.map(function(){return jQuery(this).actual("outerHeight")}).get();var maxHeight=arrayMax(heights);slider.children.height(maxHeight)};var unsetSlideHeight=function(){slider.children.height("auto")};var arrayMax=function(array){return Math.max.apply(Math,array)};var getViewportHeight=function(){var height=0;var children=$();if(slider.settings.mode!=="vertical"&&!slider.settings.adaptiveHeight){children=slider.children}else{if(!slider.carousel){children=slider.children.eq(slider.active.index)}else{var currentIndex=slider.settings.moveSlides===1?slider.active.index:slider.active.index*getMoveBy();children=slider.children.eq(currentIndex);for(var i=1;i<=slider.settings.maxSlides-1;i++){if(currentIndex+i>=slider.children.length){children=children.add(slider.children.eq(i-1))}else{children=children.add(slider.children.eq(currentIndex+i))}}}}if(slider.settings.mode==="vertical"){children.each(function(index){height+=$(this).outerHeight()});if(slider.settings.slideMargin>0){height+=slider.settings.slideMargin*(slider.settings.minSlides-1)}}else{height=Math.max.apply(Math,children.map(function(){return $(this).outerHeight(false)}).get())}if(slider.viewport.css("box-sizing")==="border-box"){height+=parseFloat(slider.viewport.css("padding-top"))+parseFloat(slider.viewport.css("padding-bottom"))+parseFloat(slider.viewport.css("border-top-width"))+parseFloat(slider.viewport.css("border-bottom-width"))}else if(slider.viewport.css("box-sizing")==="padding-box"){height+=parseFloat(slider.viewport.css("padding-top"))+parseFloat(slider.viewport.css("padding-bottom"))}return height};var setViewportHeight=function(){slider.viewport.height(getViewportHeight())};var getViewportMaxWidth2=function(){return"100%"};var getSlideWidth2=function(){var wrapWidth=slider.viewport.width();var margins=slider.settings.slideMargin*(slider.settings.maxSlides-1);return Math.floor((wrapWidth-margins)/slider.settings.maxSlides)};var getNumberSlidesShowing2=function(){return slider.settings.maxSlides};var getPagerQty=function(){var pagerQty=0,breakPoint=0,counter=0;if(slider.settings.moveSlides>0){if(slider.settings.infiniteLoop){pagerQty=Math.ceil(slider.children.length/getMoveBy())}else{while(breakPoint<slider.children.length){++pagerQty;breakPoint=counter+getNumberSlidesShowing2();counter+=slider.settings.moveSlides<=getNumberSlidesShowing2()?slider.settings.moveSlides:getNumberSlidesShowing2()}return counter}}else{pagerQty=Math.ceil(slider.children.length/getNumberSlidesShowing2())}return pagerQty};var getMoveBy=function(){if(slider.settings.moveSlides>0&&slider.settings.moveSlides<=getNumberSlidesShowing2()){return slider.settings.moveSlides}return getNumberSlidesShowing2()};var setSlidePosition=function(){var position,lastChild,lastShowingIndex;if(slider.children.length>slider.settings.maxSlides&&slider.active.last&&!slider.settings.infiniteLoop){if(slider.settings.mode==="horizontal"){lastChild=slider.children.last();position=lastChild.position();setPositionProperty(-(position.left-(slider.viewport.width()-lastChild.outerWidth())),"reset",0)}else if(slider.settings.mode==="vertical"){lastShowingIndex=slider.children.length-slider.settings.minSlides;position=slider.children.eq(lastShowingIndex).position();setPositionProperty(-position.top,"reset",0)}}else{position=slider.children.eq(slider.active.index*getMoveBy()).position();if(slider.active.index===getPagerQty()-1){slider.active.last=true}if(position!==undefined){if(slider.settings.mode==="horizontal"){setPositionProperty(-position.left,"reset",0)}else if(slider.settings.mode==="vertical"){setPositionProperty(-position.top,"reset",0)}else if(slider.settings.mode==="none"){setPositionProperty(-position.top,"reset",0)}}}};var setPositionProperty=function(value,type,duration,params){var animateObj,propValue;if(slider.usingCSS){if(slider.settings.mode==="vertical"){propValue="translateY("+value+"px)"}else if(slider.settings.mode==="horizontal"){propValue="translateX("+value+"px"}else if(slider.settings.mode==="none"){propValue="translateY("+value+"px)";duration=0}el.css("-"+slider.cssPrefix+"-transition-duration",duration/1e3+"s");if(type==="slide"){el.css(slider.animProp,propValue);if(duration!==0){el.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){if(!$(e.target).is(el)){return}el.off("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd");updateAfterSlideTransition()})}else{updateAfterSlideTransition()}}else if(type==="reset"){el.css(slider.animProp,propValue)}}else{animateObj={};animateObj[slider.animProp]=value;if(type==="slide"){el.animate(animateObj,duration,slider.settings.easing,function(){updateAfterSlideTransition()})}else if(type==="reset"){el.css(slider.animProp,value)}}};var populatePager=function(){var pagerHtml="",linkContent="",pagerQty=getPagerQty();for(var i=0;i<pagerQty;i++){linkContent="";if(slider.settings.buildPager){if(slider.settings.buildPager==="icons"){linkContent=""}if($.isFunction(slider.settings.buildPager)||slider.settings.pagerCustom){linkContent=slider.settings.buildPager(i)}slider.pagerEl.addClass("wpmslider-custom-pager")}else{linkContent=i+1;slider.pagerEl.addClass("wpmslider-default-pager")}pagerHtml+='<div class="wpmslider-pager-item"><a href="" data-slide-index="'+i+'" class="wpmslider-pager-link">'+linkContent+"</a></div>"}slider.pagerEl.html(pagerHtml)};var appendPager=function(){if(!slider.settings.pagerCustom){slider.pagerEl=$('<div class="wpmslider-pager" />');if(slider.settings.pagerSelector){$(slider.settings.pagerSelector).html(slider.pagerEl)}else{slider.controls.el.addClass("wpmslider-has-pager").append(slider.pagerEl)}populatePager()}else{slider.pagerEl=$(slider.settings.pagerCustom)}slider.pagerEl.on("click touchend","a",clickPagerBind)};var appendControlPrev=function(){slider.controls.prev=$('<a class="wpmslider-prev" href="">'+slider.settings.prevText+"</a>");slider.controls.prev.on("click touchend",clickPrevBind);if(slider.settings.prevSelector){$(slider.settings.prevSelector).append(slider.controls.prev)}if(!slider.settings.prevSelector){slider.controls.directionEl=$('<div class="wpmslider-controls-direction" />');slider.controls.directionEl.append(slider.controls.prev);slider.controls.el.addClass("wpmslider-has-controls-direction").append(slider.controls.directionEl)}};var appendControlNext=function(){slider.controls.next=$('<a class="wpmslider-next" href="">'+slider.settings.nextText+"</a>");slider.controls.next.on("click touchend",clickNextBind);if(slider.settings.nextSelector){$(slider.settings.nextSelector).append(slider.controls.next)}if(!slider.settings.nextSelector){slider.controls.directionEl=$('<div class="wpmslider-controls-direction" />');slider.controls.directionEl.append(slider.controls.next);slider.controls.el.addClass("wpmslider-has-controls-direction").append(slider.controls.directionEl)}};var appendControlsAuto=function(){slider.controls.start=$('<div class="wpmslider-controls-auto-item"><a class="wpmslider-start" href="">'+slider.settings.startText+"</a></div>");slider.controls.stop=$('<div class="wpmslider-controls-auto-item"><a class="wpmslider-stop" href="">'+slider.settings.stopText+"</a></div>");slider.controls.autoEl=$('<div class="wpmslider-controls-auto" />');slider.controls.autoEl.on("click",".wpmslider-start",clickStartBind);slider.controls.autoEl.on("click",".wpmslider-stop",clickStopBind);if(slider.settings.autoControlsCombine){slider.controls.autoEl.append(slider.controls.start)}else{slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop)}if(slider.settings.autoControlsSelector){$(slider.settings.autoControlsSelector).html(slider.controls.autoEl)}else{slider.controls.el.addClass("wpmslider-has-controls-auto").append(slider.controls.autoEl)}updateAutoControls(slider.settings.autoStart?"stop":"start")};var appendCaptions=function(){slider.children.each(function(index){var title=$(this).find("img:first").attr("title");if(title!==undefined&&(""+title).length){$(this).append('<div class="wpmslider-caption"><span>'+title+"</span></div>")}})};var clickNextBind=function(e){e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}el.goToNextSlide()};var clickPrevBind=function(e){e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}el.goToPrevSlide()};var clickStartBind=function(e){el.startAuto();e.preventDefault();e.stopPropagation()};var clickStopBind=function(e){el.stopAuto();e.preventDefault();e.stopPropagation()};var clickPagerBind=function(e){var pagerLink,pagerIndex;e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}pagerLink=$(e.currentTarget);if(pagerLink.attr("data-slide-index")!==undefined){pagerIndex=parseInt(pagerLink.attr("data-slide-index"));if(pagerIndex!==slider.active.index){el.goToSlide(pagerIndex)}}};var updatePagerActive=function(slideIndex){var len=slider.children.length;if(slider.settings.pagerType==="short"){if(slider.settings.maxSlides>1){len=Math.ceil(slider.children.length/slider.settings.maxSlides)}slider.pagerEl.html(slideIndex+1+slider.settings.pagerShortSeparator+len);return}slider.pagerEl.find("a").removeClass("active");slider.pagerEl.each(function(i,el){$(el).find("a").eq(slideIndex).addClass("active")})};var updateAfterSlideTransition=function(){if(slider.settings.infiniteLoop){var position="";if(slider.active.index===0){position=slider.children.eq(0).position()}else if(slider.active.index===getPagerQty()-1&&slider.carousel){position=slider.children.eq((getPagerQty()-1)*getMoveBy()).position()}else if(slider.active.index===slider.children.length-1){position=slider.children.eq(slider.children.length-1).position()}if(position){if(slider.settings.mode==="horizontal"){setPositionProperty(-position.left,"reset",0)}else if(slider.settings.mode==="vertical"){setPositionProperty(-position.top,"reset",0)}}}slider.working=false;slider.settings.onSlideAfter.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)};var updateAutoControls=function(state){if(slider.settings.autoControlsCombine){slider.controls.autoEl.html(slider.controls[state])}else{slider.controls.autoEl.find("a").removeClass("active");slider.controls.autoEl.find("a:not(.wpmslider-"+state+")").addClass("active")}};var updateDirectionControls=function(){if(getPagerQty()===1){slider.controls.prev.addClass("disabled");slider.controls.next.addClass("disabled")}else if(!slider.settings.infiniteLoop&&slider.settings.hideControlOnEnd){if(slider.active.index===0){slider.controls.prev.addClass("disabled");slider.controls.next.removeClass("disabled")}else if(slider.active.index===getPagerQty()-1){slider.controls.next.addClass("disabled");slider.controls.prev.removeClass("disabled")}else{slider.controls.prev.removeClass("disabled");slider.controls.next.removeClass("disabled")}}};var initAuto=function(){if(slider.settings.autoDelay>0){setTimeout(el.startAuto,slider.settings.autoDelay)}else{el.startAuto()}if(slider.settings.autoHover){el.hover(function(){pauseEvent("hover")},function(){playEvent("hover")})}};var keyPress=function(e){var activeElementTag=document.activeElement.tagName.toLowerCase(),tagFilters="input|textarea",p=new RegExp(activeElementTag,["i"]),result=p.exec(tagFilters);if(result===null&&verge.inViewport(el)){if(e.keyCode===39){clickNextBind(e);return false}else if(e.keyCode===37){clickPrevBind(e);return false}}};var initTouch=function(){slider.touch={start:{x:0,y:0},end:{x:0,y:0}};slider.viewport.on("touchstart MSPointerDown pointerdown",onTouchStart);slider.viewport.on("click",".wpmslider a",function(e){if(slider.viewport.hasClass("click-disabled")){e.preventDefault();e.stopPropagation();slider.viewport.removeClass("click-disabled")}})};var onTouchStart=function(e){if(e.type!=="touchstart"&&e.button!==0){return}slider.controls.el.addClass("disabled");if(slider.working){e.preventDefault();e.stopPropagation();slider.controls.el.removeClass("disabled")}else{slider.touch.originalPos=el.position();var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig];var chromePointerEvents=typeof PointerEvent==="function";if(chromePointerEvents){if(orig.pointerId===undefined){return}}slider.touch.start.x=touchPoints[0].pageX;slider.touch.start.y=touchPoints[0].pageY;if(slider.viewport.get(0).setPointerCapture){slider.pointerId=orig.pointerId;slider.viewport.get(0).setPointerCapture(slider.pointerId)}slider.originalClickTarget=orig.originalTarget||orig.target;slider.originalClickButton=orig.button;slider.originalClickButtons=orig.buttons;slider.originalEventType=orig.type;slider.hasMove=false;slider.viewport.on("touchmove MSPointerMove pointermove",onTouchMove);slider.viewport.on("touchend MSPointerUp pointerup",onTouchEnd);slider.viewport.on("MSPointerCancel pointercancel",onPointerCancel)}};var onPointerCancel=function(e){e.preventDefault();setPositionProperty(slider.touch.originalPos.left,"reset",0);slider.controls.el.removeClass("disabled");slider.viewport.off("MSPointerCancel pointercancel",onPointerCancel);slider.viewport.off("touchmove MSPointerMove pointermove",onTouchMove);slider.viewport.off("touchend MSPointerUp pointerup",onTouchEnd);if(slider.viewport.get(0).releasePointerCapture){slider.viewport.get(0).releasePointerCapture(slider.pointerId)}};var onTouchMove=function(e){var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig],xMovement=Math.abs(touchPoints[0].pageX-slider.touch.start.x),yMovement=Math.abs(touchPoints[0].pageY-slider.touch.start.y),value=0,change=0;slider.hasMove=true;if(xMovement*3>yMovement&&slider.settings.preventDefaultSwipeX){e.preventDefault();e.stopPropagation()}else if(yMovement*3>xMovement&&slider.settings.preventDefaultSwipeY){e.preventDefault();e.stopPropagation()}if(e.type!=="touchmove"){e.preventDefault()}if(slider.settings.mode!=="fade"&&slider.settings.oneToOneTouch){if(slider.settings.mode==="horizontal"){change=touchPoints[0].pageX-slider.touch.start.x;value=slider.touch.originalPos.left+change}else{change=touchPoints[0].pageY-slider.touch.start.y;value=slider.touch.originalPos.top+change}setPositionProperty(value,"reset",0)}};var onTouchEnd=function(e){e.preventDefault();slider.viewport.off("touchmove MSPointerMove pointermove",onTouchMove);slider.controls.el.removeClass("disabled");var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig],value=0,distance=0;slider.touch.end.x=touchPoints[0].pageX;slider.touch.end.y=touchPoints[0].pageY;if(slider.settings.mode==="fade"){distance=Math.abs(slider.touch.start.x-slider.touch.end.x);if(distance>=slider.settings.swipeThreshold){if(slider.touch.start.x>slider.touch.end.x){el.goToNextSlide()}else{el.goToPrevSlide()}el.stopAuto()}}else{if(slider.settings.mode==="horizontal"){distance=slider.touch.end.x-slider.touch.start.x;value=slider.touch.originalPos.left}else{distance=slider.touch.end.y-slider.touch.start.y;value=slider.touch.originalPos.top}if(!slider.settings.infiniteLoop&&(slider.active.index===0&&distance>0||slider.active.last&&distance<0)){setPositionProperty(value,"reset",200)}else{if(Math.abs(distance)>=slider.settings.swipeThreshold){if(distance<0){el.goToNextSlide()}else{el.goToPrevSlide()}el.stopAuto()}else{setPositionProperty(value,"reset",200)}}}slider.viewport.off("touchend MSPointerUp pointerup",onTouchEnd);if(slider.viewport.get(0).releasePointerCapture){slider.viewport.get(0).releasePointerCapture(slider.pointerId)}if(slider.hasMove===false&&(slider.originalClickButton===0||slider.originalEventType==="touchstart")){$(slider.originalClickTarget).trigger({type:"click",button:slider.originalClickButton,buttons:slider.originalClickButtons})}};var resizeWindow=function(e){if(!slider.initialized){if(slider.debug)console.log(slider.logAs,"slider not initialized");return}if(slider.working){if(slider.debug)console.log(slider.logAs,"slider working");window.setTimeout(resizeWindow,10)}else{el.redrawSlider();slider.settings.onSliderResize.call(el,slider.active.index)}};var applyAriaHiddenAttributes=function(startVisibleIndex){var numberOfSlidesShowing=getNumberSlidesShowing2();if(slider.settings.ariaHidden){slider.children.attr("aria-hidden","true");slider.children.slice(startVisibleIndex,startVisibleIndex+numberOfSlidesShowing).attr("aria-hidden","false")}};var setSlideIndex=function(slideIndex){if(slideIndex<0){if(slider.settings.infiniteLoop){return getPagerQty()-1}else{return slider.active.index}}else if(slideIndex>=getPagerQty()){if(slider.settings.infiniteLoop){return 0}else{return slider.active.index}}else{return slideIndex}};el.goToSlide=function(slideIndex,direction){var performTransition=true,moveBy=0,position={left:0,top:0},lastChild=null,lastShowingIndex,eq,value,requestEl;slider.oldIndex=slider.active.index;slider.active.index=setSlideIndex(slideIndex);if(slider.working||slider.active.index===slider.oldIndex){return}slider.working=true;performTransition=slider.settings.onSlideBefore.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index);if(typeof performTransition!=="undefined"&&!performTransition){slider.active.index=slider.oldIndex;slider.working=false;return}if(direction==="next"){if(!slider.settings.onSlideNext.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)){performTransition=false}}else if(direction==="prev"){if(!slider.settings.onSlidePrev.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)){performTransition=false}}slider.active.last=slider.active.index>=getPagerQty()-1;if(slider.settings.pager||slider.settings.pagerCustom){updatePagerActive(slider.active.index)}if(slider.settings.controls){updateDirectionControls()}if(slider.settings.mode==="fade"){if(slider.settings.adaptiveHeight&&slider.viewport.height()!==getViewportHeight()){slider.viewport.animate({height:getViewportHeight()},slider.settings.adaptiveHeightSpeed)}slider.children.filter(":visible").fadeOut(slider.settings.speed).css({zIndex:0});slider.children.eq(slider.active.index).css("zIndex",slider.settings.slideZIndex+1).fadeIn(slider.settings.speed,function(){$(this).css("zIndex",slider.settings.slideZIndex);updateAfterSlideTransition()})}else{if(slider.settings.adaptiveHeight&&slider.viewport.height()!==getViewportHeight()){slider.viewport.animate({height:getViewportHeight()},slider.settings.adaptiveHeightSpeed)}if(!slider.settings.infiniteLoop&&slider.carousel&&slider.active.last){if(slider.settings.mode==="horizontal"){lastChild=slider.children.eq(slider.children.length-1);position=lastChild.position();moveBy=slider.viewport.width()-lastChild.outerWidth()}else{lastShowingIndex=slider.children.length-slider.settings.minSlides;position=slider.children.eq(lastShowingIndex).position()}}else if(slider.carousel&&slider.active.last&&direction==="prev"){eq=slider.settings.moveSlides===1?slider.settings.maxSlides-getMoveBy():(getPagerQty()-1)*getMoveBy()-(slider.children.length-slider.settings.maxSlides);lastChild=el.children(".wpmslider-clone").eq(eq);position=lastChild.position()}else if(direction==="next"&&slider.active.index===0){position=el.find("> .wpmslider-clone").eq(slider.settings.maxSlides).position();slider.active.last=false}else if(slideIndex>=0){requestEl=slideIndex*parseInt(getMoveBy());position=slider.children.eq(requestEl).position()}if(typeof position!=="undefined"){value=slider.settings.mode==="horizontal"?-(position.left-moveBy):-position.top;setPositionProperty(value,"slide",slider.settings.speed)}slider.working=false}if(slider.settings.ariaHidden){applyAriaHiddenAttributes(slider.active.index*getMoveBy())}};el.goToNextSlide=function(){if(!slider.settings.infiniteLoop&&slider.active.last){return}if(slider.working===true){return}var pagerIndex=parseInt(slider.active.index)+1;el.goToSlide(pagerIndex,"next")};el.goToPrevSlide=function(){if(!slider.settings.infiniteLoop&&slider.active.index===0){return}if(slider.working===true){return}var pagerIndex=parseInt(slider.active.index)-1;el.goToSlide(pagerIndex,"prev")};el.startAuto=function(preventControlUpdate){if(slider.interval){return}slider.interval=setInterval(function(){if(slider.settings.autoDirection==="next"){el.goToNextSlide()}else{el.goToPrevSlide()}},slider.settings.pause);slider.settings.onAutoChange.call(el,true);if(slider.settings.autoControls&&preventControlUpdate!==true){updateAutoControls("stop")}};el.stopAuto=function(preventControlUpdate){if(slider.autoPaused)slider.autoPaused=false;if(!slider.interval){return}clearInterval(slider.interval);slider.interval=null;slider.settings.onAutoChange.call(el,false);if(slider.settings.autoControls&&preventControlUpdate!==true){updateAutoControls("start")}};el.getCurrentSlide=function(){return slider.active.index};el.getCurrentSlideElement=function(){return slider.children.eq(slider.active.index)};el.getSlideElement=function(index){return slider.children.eq(index)};el.getSlideCount=function(){return slider.children.length};el.isWorking=function(){return slider.working};el.redrawSlider=function(){if(slider.debug)console.log(slider.logAs,"redrawSlider");updateWidth();unsetSlideHeight();setViewportHeight();if(slider.settings.stretch){setSlideHeight()}slider.children.add(el.find(".wpmslider-clone")).outerWidth(getSlideWidth2());setSlidePosition();if(slider.active.last){slider.active.index=getPagerQty()-1}if(slider.active.index>=getPagerQty()){slider.active.last=true}if(slider.settings.pager&&!slider.settings.pagerCustom){populatePager();updatePagerActive(slider.active.index)}if(slider.settings.ariaHidden){applyAriaHiddenAttributes(slider.active.index*getMoveBy())}};el.destroySlider=function(){if(!slider.initialized){return}slider.initialized=false;$(".wpmslider-clone",this).remove();slider.children.each(function(){if($(this).data("origStyle")!==undefined){$(this).attr("style",$(this).data("origStyle"))}else{$(this).removeAttr("style")}});if($(this).data("origStyle")!==undefined){this.attr("style",$(this).data("origStyle"))}else{$(this).removeAttr("style")}$(this).unwrap().unwrap();if(slider.controls.el){slider.controls.el.remove()}if(slider.controls.next){slider.controls.next.remove()}if(slider.controls.prev){slider.controls.prev.remove()}if(slider.pagerEl&&slider.settings.controls&&!slider.settings.pagerCustom){slider.pagerEl.remove()}$(".wpmslider-caption",this).remove();if(slider.controls.autoEl){slider.controls.autoEl.remove()}clearInterval(slider.interval);clearInterval(slider.visibilityInterval);if(slider.settings.responsive){$(window).off("resize",resizeWindow)}if(slider.settings.keyboardEnabled){$(document).off("keydown",keyPress)}$(this).removeData("strongSlider")};el.reloadSlider=function(settings){if(settings!==undefined){options=settings}el.destroySlider();init();$(el).data("strongSlider",this)};init();$(el).data("strongSlider",this);viewEl.attr("data-state","init");if(slider.debug)console.log(slider.logAs,"viewport",verge.viewportW(),"x",verge.viewportH());return this}})(jQuery);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: testimonials, testimonial slider, testimonial form, reviews, star ratings
4
  Requires at least: 3.7
5
  Requires PHP: 5.2.4
6
  Tested up to: 4.9
7
- Stable tag: 2.32.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -215,6 +215,9 @@ If you prefer, start a private support ticket at [support.strongplugins.com](htt
215
 
216
  == Changelog ==
217
 
 
 
 
218
  = 2.32.1 - Oct 26, 2018 =
219
  * Fix bug in translation of slider text controls.
220
 
@@ -284,3 +287,9 @@ See changelog.txt for previous versions.
284
 
285
  = 2.32 =
286
  New feature: Show multiple slides at the same time in a carousel.
 
 
 
 
 
 
4
  Requires at least: 3.7
5
  Requires PHP: 5.2.4
6
  Tested up to: 4.9
7
+ Stable tag: 2.32.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
215
 
216
  == Changelog ==
217
 
218
+ = 2.32.2 - Dec 4, 2018 =
219
+ * Add adjustable responsive breakpoints for carousels.
220
+
221
  = 2.32.1 - Oct 26, 2018 =
222
  * Fix bug in translation of slider text controls.
223
 
287
 
288
  = 2.32 =
289
  New feature: Show multiple slides at the same time in a carousel.
290
+
291
+ = 2.32.1 =
292
+ * Fix bug in translation of slider text controls.
293
+
294
+ = 2.32.2 =
295
+ New adjustable responsive breakpoints for carousels.
strong-testimonials.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://strongplugins.com/plugins/strong-testimonials/
5
  * Description: Collect and display your testimonials or reviews.
6
  * Author: Chris Dillon
7
- * Version: 2.32.1
8
  *
9
  * Author URI: https://strongplugins.com/
10
  * Text Domain: strong-testimonials
@@ -34,7 +34,7 @@ if ( ! defined( 'ABSPATH' ) ) {
34
  exit;
35
  }
36
 
37
- define( 'WPMTST_VERSION', '2.32.1' );
38
  define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
39
  define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
40
  define( 'STRONGPLUGINS_STORE_URL', 'https://strongplugins.com' );
4
  * Plugin URI: https://strongplugins.com/plugins/strong-testimonials/
5
  * Description: Collect and display your testimonials or reviews.
6
  * Author: Chris Dillon
7
+ * Version: 2.32.2
8
  *
9
  * Author URI: https://strongplugins.com/
10
  * Text Domain: strong-testimonials
34
  exit;
35
  }
36
 
37
+ define( 'WPMTST_VERSION', '2.32.2' );
38
  define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
39
  define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
40
  define( 'STRONGPLUGINS_STORE_URL', 'https://strongplugins.com' );
templates-scss/_partials/_structure-form.scss CHANGED
@@ -23,6 +23,7 @@
23
  label {
24
  display: inline-block;
25
  float: none;
 
26
  }
27
 
28
  input[type="text"],
23
  label {
24
  display: inline-block;
25
  float: none;
26
+ width: auto;
27
  }
28
 
29
  input[type="text"],
templates/default-form/form.css CHANGED
@@ -23,6 +23,7 @@
23
  .strong-form label {
24
  display: inline-block;
25
  float: none;
 
26
  }
27
  .strong-form input[type="text"],
28
  .strong-form input[type="email"],
23
  .strong-form label {
24
  display: inline-block;
25
  float: none;
26
+ width: auto;
27
  }
28
  .strong-form input[type="text"],
29
  .strong-form input[type="email"],
templates/simple-form/form.css CHANGED
@@ -23,6 +23,7 @@
23
  .strong-form label {
24
  display: inline-block;
25
  float: none;
 
26
  }
27
  .strong-form input[type="text"],
28
  .strong-form input[type="email"],
23
  .strong-form label {
24
  display: inline-block;
25
  float: none;
26
+ width: auto;
27
  }
28
  .strong-form input[type="text"],
29
  .strong-form input[type="email"],