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 functio