SiteOrigin Widgets Bundle - Version 1.17.4

Version Description

  • 06 August 2020 ==
  • Post Carousel: Improved support for multiple carousel widgets on the same page.
  • Post Carousel: Improved mobile support.
  • Sliders: Added Autoplay and Autoplay Pause on Hover settings to the Slider, Layout Slider and Hero widgets.
  • Features: Allowed shortcodes to be used in the Text field.
  • Contact Form: Fix to ensure the correct fields are passed to Akismet.

=

Download this release

Release Info

Developer gpriday
Plugin Icon 128x128 SiteOrigin Widgets Bundle
Version 1.17.4
Comparing to
See all releases

Code changes from version 1.17.3 to 1.17.4

base/inc/post-selector.php CHANGED
@@ -4,10 +4,11 @@
4
  * Filter a query created from the post selector field into an array that will work properly with get_posts
5
  *
6
  * @param $query
 
7
  *
8
  * @return mixed
9
  */
10
- function siteorigin_widget_post_selector_process_query( $query ){
11
  $query = wp_parse_args($query,
12
  array(
13
  'post_status' => 'publish',
@@ -98,6 +99,13 @@ function siteorigin_widget_post_selector_process_query( $query ){
98
  }
99
  }
100
 
 
 
 
 
 
 
 
101
  return apply_filters( 'siteorigin_widgets_posts_selector_query', $query );
102
  }
103
 
4
  * Filter a query created from the post selector field into an array that will work properly with get_posts
5
  *
6
  * @param $query
7
+ * @param bool $exclude_current whether to exclude the current post or not.
8
  *
9
  * @return mixed
10
  */
11
+ function siteorigin_widget_post_selector_process_query( $query, $exclude_current = true ){
12
  $query = wp_parse_args($query,
13
  array(
14
  'post_status' => 'publish',
99
  }
100
  }
101
 
102
+ if ( $exclude_current && get_the_ID() ) {
103
+ if ( ! isset( $query['post__not_in'] ) ) {
104
+ $query['post__not_in'] = array();
105
+ }
106
+ $query['post__not_in'][] = get_the_ID();
107
+ }
108
+
109
  return apply_filters( 'siteorigin_widgets_posts_selector_query', $query );
110
  }
111
 
base/inc/widgets/base-slider.class.php CHANGED
@@ -49,6 +49,29 @@ abstract class SiteOrigin_Widget_Base_Slider extends SiteOrigin_Widget {
49
  */
50
  function control_form_fields(){
51
  return array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  'speed' => array(
53
  'type' => 'number',
54
  'label' => __('Animation speed', 'so-widgets-bundle'),
@@ -61,6 +84,10 @@ abstract class SiteOrigin_Widget_Base_Slider extends SiteOrigin_Widget {
61
  'label' => __('Timeout', 'so-widgets-bundle'),
62
  'description' => __('How long each frame is displayed for in milliseconds.', 'so-widgets-bundle'),
63
  'default' => 8000,
 
 
 
 
64
  ),
65
 
66
  'nav_color_hex' => array(
@@ -162,6 +189,8 @@ abstract class SiteOrigin_Widget_Base_Slider extends SiteOrigin_Widget {
162
  'pagination' => true,
163
  'speed' => empty( $controls['speed'] ) ? 1 : $controls['speed'],
164
  'timeout' => $controls['timeout'],
 
 
165
  'swipe' => $controls['swipe'],
166
  'nav_always_show_mobile' => ! empty( $controls['nav_always_show_mobile'] ) ? true : '',
167
  'breakpoint' => ! empty( $controls['breakpoint'] ) ? $controls['breakpoint'] : '780px',
49
  */
50
  function control_form_fields(){
51
  return array(
52
+ 'autoplay' => array(
53
+ 'type' => 'checkbox',
54
+ 'label' => __( 'Autoplay', 'so-widgets-bundle' ),
55
+ 'description' => __( 'Change slides automatically without user interaction.', 'so-widgets-bundle' ),
56
+ 'default' => true,
57
+ 'state_emitter' => array(
58
+ 'callback' => 'conditional',
59
+ 'args' => array(
60
+ 'autoplay[autoplay]: val',
61
+ 'autoplay[static]: ! val',
62
+ ),
63
+ ),
64
+ ),
65
+
66
+ 'autoplay_hover' => array(
67
+ 'type' => 'checkbox',
68
+ 'label' => __( 'Autoplay pause on hover', 'so-widgets-bundle' ),
69
+ 'default' => false,
70
+ 'state_handler' => array(
71
+ 'autoplay[autoplay]' => array( 'show' ),
72
+ 'autoplay[static]' => array( 'hide' ),
73
+ ),
74
+ ),
75
  'speed' => array(
76
  'type' => 'number',
77
  'label' => __('Animation speed', 'so-widgets-bundle'),
84
  'label' => __('Timeout', 'so-widgets-bundle'),
85
  'description' => __('How long each frame is displayed for in milliseconds.', 'so-widgets-bundle'),
86
  'default' => 8000,
87
+ 'state_handler' => array(
88
+ 'autoplay[autoplay]' => array( 'show' ),
89
+ 'autoplay[static]' => array( 'hide' ),
90
+ ),
91
  ),
92
 
93
  'nav_color_hex' => array(
189
  'pagination' => true,
190
  'speed' => empty( $controls['speed'] ) ? 1 : $controls['speed'],
191
  'timeout' => $controls['timeout'],
192
+ 'paused' => empty( $controls['autoplay'] ) ?: false,
193
+ 'pause_on_hover' => ! empty( $controls['autoplay_hover'] ) ?: false,
194
  'swipe' => $controls['swipe'],
195
  'nav_always_show_mobile' => ! empty( $controls['nav_always_show_mobile'] ) ? true : '',
196
  'breakpoint' => ! empty( $controls['breakpoint'] ) ? $controls['breakpoint'] : '780px',
js/slider/jquery.slider.js CHANGED
@@ -172,6 +172,8 @@ jQuery( function($){
172
  'speed' : settings.speed,
173
  'timeout' : settings.timeout,
174
  'swipe' : settings.swipe,
 
 
175
  'swipe-fx' : 'scrollHorz',
176
  'log' : false,
177
  } ) ;
172
  'speed' : settings.speed,
173
  'timeout' : settings.timeout,
174
  'swipe' : settings.swipe,
175
+ 'paused' : settings.paused,
176
+ 'pauseOnHover' : settings.pause_on_hover,
177
  'swipe-fx' : 'scrollHorz',
178
  'log' : false,
179
  } ) ;
js/slider/jquery.slider.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};sowb.SiteOriginSlider=function(e){return{playSlideVideo:function(i){e(i).find("video").each((function(){void 0!==this.play&&this.play()}))},pauseSlideVideo:function(i){e(i).find("video").each((function(){void 0!==this.pause&&this.pause()}))},setupActiveSlide:function(i,t,s){var n=e(i).find(".cycle-sentinel"),o=e(t),d=o.find("video.sow-background-element");(void 0===s?n.css("height",o.outerHeight()):n.animate({height:o.outerHeight()},s),d.length)&&(o.outerWidth()/o.outerHeight()>d.outerWidth()/d.outerHeight()?d.css({width:"100%",height:"auto"}):d.css({width:"auto",height:"100%"}),d.css({"margin-left":-Math.ceil(d.width()/2),"margin-top":-Math.ceil(d.height()/2)}))}}},jQuery((function(e){sowb.setupSliders=sowb.setupSlider=function(){var i=new sowb.SiteOriginSlider(e);e(".sow-slider-images").each((function(){var t=e(this);if(t.data("initialized"))return t;var s=t.siblings(".sow-slider-pagination"),n=t.closest(".sow-slider-base"),o=n.find(".sow-slide-nav"),d=t.find(".sow-slider-image"),a=t.data("settings");d.each((function(i,t){var s=e(t),n=s.data("url");void 0!==n&&n.hasOwnProperty("url")&&(s.click((function(e){e.preventDefault(),window.open(n.url,n.hasOwnProperty("new_window")&&n.new_window?"_blank":"_self").opener=null})),s.find("a").click((function(e){e.stopPropagation()})))}));var l=function(){var c=t.closest(".so-widget-fittext-wrapper");if(c.length>0&&!c.data("fitTextDone"))c.on("fitTextDone",(function(){l()}));else{n.show();var r=function(){t.find(".sow-slider-image").each((function(){var i=e(this);i.css("height",i.find(".sow-slider-image-wrapper").outerHeight())}))};if(e(window).on("resize panelsStretchRows",r).resize(),e(sowb).on("setup_widgets",r),t.on({"cycle-after":function(t,s,n,o,d){var a=e(this);i.playSlideVideo(o),i.setupActiveSlide(a,o),e(o).trigger("sowSlideCycleAfter")},"cycle-before":function(t,n,o,d,a){var l=e(this);s.find("> li").removeClass("sow-active").eq(n.slideNum-1).addClass("sow-active"),i.pauseSlideVideo(o),i.setupActiveSlide(l,d,n.speed),e(d).trigger("sowSlideCycleBefore")},"cycle-initialized":function(n,d){i.playSlideVideo(e(this).find(".cycle-slide-active")),i.setupActiveSlide(t,d.slides[0]),s.find(">li").removeClass("sow-active").eq(0).addClass("sow-active"),e(this).find(".cycle-slide-active").trigger("sowSlideInitial"),d.slideCount<=1&&(s.hide(),o.hide()),e(window).resize(),setTimeout((function(){r(),i.setupActiveSlide(t,d.slides[0]),t.find(".cycle-sentinel").empty()}),200)}}).cycle({slides:"> .sow-slider-image",speed:a.speed,timeout:a.timeout,swipe:a.swipe,"swipe-fx":"scrollHorz",log:!1}),t.find("video.sow-background-element").on("loadeddata",(function(){i.setupActiveSlide(t,t.find(".cycle-slide-active"))})),s.add(o).hide(),d.length>1)if(n.hasClass("sow-slider-is-mobile"))a.nav_always_show_mobile&&window.matchMedia("(max-width: "+a.breakpoint+")").matches&&(s.show(),o.show());else{var u=!1;n.mouseenter((function(){s.add(o).clearQueue().fadeIn(150),u=!1})).mouseleave((function(){u=!0,setTimeout((function(){u&&s.add(o).clearQueue().fadeOut(150),u=!1}),750)}))}var w=function(){i.setupActiveSlide(t,t.find(".cycle-slide-active"))};e(window).on("resize",w),e(sowb).on("setup_widgets",w),s.find("> li > a").click((function(i){i.preventDefault(),t.cycle("goto",e(this).data("goto"))})),o.find("> a").click((function(i){i.preventDefault(),t.cycle(e(this).data("action"))})),n.keydown((function(e){37===e.which?t.cycle("prev"):39===e.which&&t.cycle("next")}))}},c=t.find("img"),r=0,u=!1;c.each((function(){e(this);this.complete?r++:e(this).one("load",(function(){++r!==c.length||u||(l(),u=!0)})).attr("src",e(this).attr("src")),r!==c.length||u||(l(),u=!0)})),0===c.length&&l(),t.data("initialized",!0)}))},sowb.setupSliders(),e(sowb).on("setup_widgets",sowb.setupSliders)})),window.sowb=sowb;
1
+ var sowb=window.sowb||{};sowb.SiteOriginSlider=function(e){return{playSlideVideo:function(i){e(i).find("video").each((function(){void 0!==this.play&&this.play()}))},pauseSlideVideo:function(i){e(i).find("video").each((function(){void 0!==this.pause&&this.pause()}))},setupActiveSlide:function(i,t,s){var n=e(i).find(".cycle-sentinel"),o=e(t),d=o.find("video.sow-background-element");(void 0===s?n.css("height",o.outerHeight()):n.animate({height:o.outerHeight()},s),d.length)&&(o.outerWidth()/o.outerHeight()>d.outerWidth()/d.outerHeight()?d.css({width:"100%",height:"auto"}):d.css({width:"auto",height:"100%"}),d.css({"margin-left":-Math.ceil(d.width()/2),"margin-top":-Math.ceil(d.height()/2)}))}}},jQuery((function(e){sowb.setupSliders=sowb.setupSlider=function(){var i=new sowb.SiteOriginSlider(e);e(".sow-slider-images").each((function(){var t=e(this);if(t.data("initialized"))return t;var s=t.siblings(".sow-slider-pagination"),n=t.closest(".sow-slider-base"),o=n.find(".sow-slide-nav"),d=t.find(".sow-slider-image"),a=t.data("settings");d.each((function(i,t){var s=e(t),n=s.data("url");void 0!==n&&n.hasOwnProperty("url")&&(s.click((function(e){e.preventDefault(),window.open(n.url,n.hasOwnProperty("new_window")&&n.new_window?"_blank":"_self").opener=null})),s.find("a").click((function(e){e.stopPropagation()})))}));var l=function(){var c=t.closest(".so-widget-fittext-wrapper");if(c.length>0&&!c.data("fitTextDone"))c.on("fitTextDone",(function(){l()}));else{n.show();var r=function(){t.find(".sow-slider-image").each((function(){var i=e(this);i.css("height",i.find(".sow-slider-image-wrapper").outerHeight())}))};if(e(window).on("resize panelsStretchRows",r).resize(),e(sowb).on("setup_widgets",r),t.on({"cycle-after":function(t,s,n,o,d){var a=e(this);i.playSlideVideo(o),i.setupActiveSlide(a,o),e(o).trigger("sowSlideCycleAfter")},"cycle-before":function(t,n,o,d,a){var l=e(this);s.find("> li").removeClass("sow-active").eq(n.slideNum-1).addClass("sow-active"),i.pauseSlideVideo(o),i.setupActiveSlide(l,d,n.speed),e(d).trigger("sowSlideCycleBefore")},"cycle-initialized":function(n,d){i.playSlideVideo(e(this).find(".cycle-slide-active")),i.setupActiveSlide(t,d.slides[0]),s.find(">li").removeClass("sow-active").eq(0).addClass("sow-active"),e(this).find(".cycle-slide-active").trigger("sowSlideInitial"),d.slideCount<=1&&(s.hide(),o.hide()),e(window).resize(),setTimeout((function(){r(),i.setupActiveSlide(t,d.slides[0]),t.find(".cycle-sentinel").empty()}),200)}}).cycle({slides:"> .sow-slider-image",speed:a.speed,timeout:a.timeout,swipe:a.swipe,paused:a.paused,pauseOnHover:a.pause_on_hover,"swipe-fx":"scrollHorz",log:!1}),t.find("video.sow-background-element").on("loadeddata",(function(){i.setupActiveSlide(t,t.find(".cycle-slide-active"))})),s.add(o).hide(),d.length>1)if(n.hasClass("sow-slider-is-mobile"))a.nav_always_show_mobile&&window.matchMedia("(max-width: "+a.breakpoint+")").matches&&(s.show(),o.show());else{var u=!1;n.mouseenter((function(){s.add(o).clearQueue().fadeIn(150),u=!1})).mouseleave((function(){u=!0,setTimeout((function(){u&&s.add(o).clearQueue().fadeOut(150),u=!1}),750)}))}var w=function(){i.setupActiveSlide(t,t.find(".cycle-slide-active"))};e(window).on("resize",w),e(sowb).on("setup_widgets",w),s.find("> li > a").click((function(i){i.preventDefault(),t.cycle("goto",e(this).data("goto"))})),o.find("> a").click((function(i){i.preventDefault(),t.cycle(e(this).data("action"))})),n.keydown((function(e){37===e.which?t.cycle("prev"):39===e.which&&t.cycle("next")}))}},c=t.find("img"),r=0,u=!1;c.each((function(){e(this);this.complete?r++:e(this).one("load",(function(){++r!==c.length||u||(l(),u=!0)})).attr("src",e(this).attr("src")),r!==c.length||u||(l(),u=!0)})),0===c.length&&l(),t.data("initialized",!0)}))},sowb.setupSliders(),e(sowb).on("setup_widgets",sowb.setupSliders)})),window.sowb=sowb;
lang/so-widgets-bundle.pot CHANGED
@@ -288,7 +288,7 @@ msgstr ""
288
  msgid "Title"
289
  msgstr ""
290
 
291
- #: widgets/accordion/accordion.php:51, widgets/accordion/accordion.php:123, widgets/tabs/tabs.php:145
292
  msgid "Panels"
293
  msgstr ""
294
 
@@ -296,67 +296,71 @@ msgstr ""
296
  msgid "Content"
297
  msgstr ""
298
 
299
- #: widgets/accordion/accordion.php:68
 
 
 
 
300
  msgid "Initial state"
301
  msgstr ""
302
 
303
- #: widgets/accordion/accordion.php:69
304
  msgid "Whether this panel should be open or closed when the page first loads."
305
  msgstr ""
306
 
307
- #: widgets/accordion/accordion.php:71
308
  msgid "Open"
309
  msgstr ""
310
 
311
- #: widgets/accordion/accordion.php:72
312
  msgid "Closed"
313
  msgstr ""
314
 
315
- #: widgets/accordion/accordion.php:80, widgets/contact/contact.php:326, widgets/cta/cta.php:74, widgets/tabs/tabs.php:76, widgets/testimonial/testimonial.php:184
316
  msgid "Design"
317
  msgstr ""
318
 
319
- #: widgets/accordion/accordion.php:85
320
  msgid "Headings"
321
  msgstr ""
322
 
323
- #: widgets/accordion/accordion.php:90, widgets/accordion/accordion.php:128, widgets/contact/contact.php:336, widgets/contact/contact.php:569, widgets/cta/cta.php:78, widgets/hero/hero.php:122, widgets/layout-slider/layout-slider.php:90, widgets/social-media-buttons/social-media-buttons.php:86, widgets/tabs/tabs.php:86, widgets/tabs/tabs.php:106, widgets/tabs/tabs.php:150
324
  msgid "Background color"
325
  msgstr ""
326
 
327
- #: widgets/accordion/accordion.php:95, widgets/tabs/tabs.php:110
328
  msgid "Background hover color"
329
  msgstr ""
330
 
331
- #: widgets/accordion/accordion.php:100, widgets/cta/cta.php:91, widgets/tabs/tabs.php:115
332
  msgid "Title color"
333
  msgstr ""
334
 
335
- #: widgets/accordion/accordion.php:105, widgets/tabs/tabs.php:120
336
  msgid "Title hover color"
337
  msgstr ""
338
 
339
- #: widgets/accordion/accordion.php:109, widgets/accordion/accordion.php:137, widgets/contact/contact.php:346, widgets/contact/contact.php:463, widgets/contact/contact.php:579, widgets/cta/cta.php:82, widgets/tabs/tabs.php:91, widgets/tabs/tabs.php:125, widgets/tabs/tabs.php:159
340
  msgid "Border color"
341
  msgstr ""
342
 
343
- #: widgets/accordion/accordion.php:113, widgets/tabs/tabs.php:130
344
  msgid "Border hover color"
345
  msgstr ""
346
 
347
- #: widgets/accordion/accordion.php:117, widgets/accordion/accordion.php:141, widgets/contact/contact.php:351, widgets/contact/contact.php:468, widgets/contact/contact.php:595, widgets/tabs/tabs.php:95, widgets/tabs/tabs.php:135, widgets/tabs/tabs.php:163
348
  msgid "Border width"
349
  msgstr ""
350
 
351
- #: widgets/accordion/accordion.php:133, widgets/tabs/tabs.php:155
352
  msgid "Font color"
353
  msgstr ""
354
 
355
- #: widgets/accordion/accordion.php:145
356
  msgid "Bottom margin"
357
  msgstr ""
358
 
359
- #: widgets/accordion/accordion.php:237
360
  msgid "Get more customization options and the ability to use widgets and layouts as your accordion content with %sSiteOrigin Premium%s"
361
  msgstr ""
362
 
@@ -488,7 +492,7 @@ msgstr ""
488
  msgid "Normal"
489
  msgstr ""
490
 
491
- #: widgets/button/button.php:183, widgets/button/button.php:207, widgets/social-media-buttons/social-media-buttons.php:120, widgets/social-media-buttons/social-media-buttons.php:142, widgets/social-media-buttons/social-media-buttons.php:175, base/inc/widgets/base-slider.class.php:79
492
  msgid "Medium"
493
  msgstr ""
494
 
@@ -1133,10 +1137,6 @@ msgstr ""
1133
  msgid "SiteOrigin Editor"
1134
  msgstr ""
1135
 
1136
- #: widgets/editor/editor.php:45
1137
- msgid "Automatically add paragraphs"
1138
- msgstr ""
1139
-
1140
  #: widgets/editor/editor.php:55
1141
  msgid "Enable the \"Automatically add paragraphs\" setting by default."
1142
  msgstr ""
@@ -1269,7 +1269,7 @@ msgstr ""
1269
  msgid "Open more URL in a new window"
1270
  msgstr ""
1271
 
1272
- #: widgets/features/features.php:320, widgets/social-media-buttons/social-media-buttons.php:33, base/inc/widgets/base-slider.class.php:153
1273
  msgid "Responsive Breakpoint"
1274
  msgstr ""
1275
 
@@ -2513,7 +2513,7 @@ msgstr ""
2513
  msgid "Select cover image"
2514
  msgstr ""
2515
 
2516
- #: widgets/video/video.php:85, base/inc/widgets/base-slider.class.php:125
2517
  msgid "Video URL"
2518
  msgstr ""
2519
 
@@ -2521,7 +2521,7 @@ msgstr ""
2521
  msgid "Video Playback"
2522
  msgstr ""
2523
 
2524
- #: widgets/video/video.php:101, base/inc/widgets/base-slider.class.php:132
2525
  msgid "Autoplay"
2526
  msgstr ""
2527
 
@@ -2830,111 +2830,119 @@ msgstr ""
2830
  msgid "%s is not a SiteOrigin Widget"
2831
  msgstr ""
2832
 
2833
- #: base/inc/widgets/base-slider.class.php:54
 
 
 
 
 
 
 
 
2834
  msgid "Animation speed"
2835
  msgstr ""
2836
 
2837
- #: base/inc/widgets/base-slider.class.php:55
2838
  msgid "Animation speed in milliseconds."
2839
  msgstr ""
2840
 
2841
- #: base/inc/widgets/base-slider.class.php:61
2842
  msgid "Timeout"
2843
  msgstr ""
2844
 
2845
- #: base/inc/widgets/base-slider.class.php:62
2846
  msgid "How long each frame is displayed for in milliseconds."
2847
  msgstr ""
2848
 
2849
- #: base/inc/widgets/base-slider.class.php:68
2850
  msgid "Navigation color"
2851
  msgstr ""
2852
 
2853
- #: base/inc/widgets/base-slider.class.php:74
2854
  msgid "Navigation style"
2855
  msgstr ""
2856
 
2857
- #: base/inc/widgets/base-slider.class.php:77
2858
  msgid "Ultra thin"
2859
  msgstr ""
2860
 
2861
- #: base/inc/widgets/base-slider.class.php:78
2862
  msgid "Thin"
2863
  msgstr ""
2864
 
2865
- #: base/inc/widgets/base-slider.class.php:80
2866
  msgid "Thick"
2867
  msgstr ""
2868
 
2869
- #: base/inc/widgets/base-slider.class.php:81
2870
  msgid "Rounded ultra thin"
2871
  msgstr ""
2872
 
2873
- #: base/inc/widgets/base-slider.class.php:82
2874
  msgid "Rounded thin"
2875
  msgstr ""
2876
 
2877
- #: base/inc/widgets/base-slider.class.php:83
2878
  msgid "Rounded medium"
2879
  msgstr ""
2880
 
2881
- #: base/inc/widgets/base-slider.class.php:84
2882
  msgid "Rounded thick"
2883
  msgstr ""
2884
 
2885
- #: base/inc/widgets/base-slider.class.php:90
2886
  msgid "Navigation size"
2887
  msgstr ""
2888
 
2889
- #: base/inc/widgets/base-slider.class.php:96
2890
  msgid "Always show navigation on mobile"
2891
  msgstr ""
2892
 
2893
- #: base/inc/widgets/base-slider.class.php:101
2894
  msgid "Swipe control"
2895
  msgstr ""
2896
 
2897
- #: base/inc/widgets/base-slider.class.php:102
2898
  msgid "Allow users to swipe through frames on mobile devices."
2899
  msgstr ""
2900
 
2901
- #: base/inc/widgets/base-slider.class.php:108
2902
  msgid "Show slide background videos on mobile"
2903
  msgstr ""
2904
 
2905
- #: base/inc/widgets/base-slider.class.php:109
2906
  msgid "Allow slide background videos to appear on mobile devices that support autoplay."
2907
  msgstr ""
2908
 
2909
- #: base/inc/widgets/base-slider.class.php:119
2910
  msgid "Video file"
2911
  msgstr ""
2912
 
2913
- #: base/inc/widgets/base-slider.class.php:127
2914
  msgid "An external URL of the video. Overrides video file."
2915
  msgstr ""
2916
 
2917
- #: base/inc/widgets/base-slider.class.php:134
2918
  msgid "Currently only for YouTube videos."
2919
  msgstr ""
2920
 
2921
- #: base/inc/widgets/base-slider.class.php:139
2922
  msgid "Video format"
2923
  msgstr ""
2924
 
2925
- #: base/inc/widgets/base-slider.class.php:155
2926
  msgid "This setting controls when the Slider will switch to the responsive mode. This breakpoint will only be used if always show navigation on mobile is enabled. The default value is 780px."
2927
  msgstr ""
2928
 
2929
- #: base/inc/widgets/base-slider.class.php:200
2930
  msgid "display slide %s"
2931
  msgstr ""
2932
 
2933
- #: base/inc/widgets/base-slider.class.php:205
2934
  msgid "next slide"
2935
  msgstr ""
2936
 
2937
- #: base/inc/widgets/base-slider.class.php:211
2938
  msgid "previous slide"
2939
  msgstr ""
2940
 
288
  msgid "Title"
289
  msgstr ""
290
 
291
+ #: widgets/accordion/accordion.php:51, widgets/accordion/accordion.php:129, widgets/tabs/tabs.php:145
292
  msgid "Panels"
293
  msgstr ""
294
 
296
  msgid "Content"
297
  msgstr ""
298
 
299
+ #: widgets/accordion/accordion.php:70, widgets/editor/editor.php:45
300
+ msgid "Automatically add paragraphs"
301
+ msgstr ""
302
+
303
+ #: widgets/accordion/accordion.php:74
304
  msgid "Initial state"
305
  msgstr ""
306
 
307
+ #: widgets/accordion/accordion.php:75
308
  msgid "Whether this panel should be open or closed when the page first loads."
309
  msgstr ""
310
 
311
+ #: widgets/accordion/accordion.php:77
312
  msgid "Open"
313
  msgstr ""
314
 
315
+ #: widgets/accordion/accordion.php:78
316
  msgid "Closed"
317
  msgstr ""
318
 
319
+ #: widgets/accordion/accordion.php:86, widgets/contact/contact.php:326, widgets/cta/cta.php:74, widgets/tabs/tabs.php:76, widgets/testimonial/testimonial.php:184
320
  msgid "Design"
321
  msgstr ""
322
 
323
+ #: widgets/accordion/accordion.php:91
324
  msgid "Headings"
325
  msgstr ""
326
 
327
+ #: widgets/accordion/accordion.php:96, widgets/accordion/accordion.php:134, widgets/contact/contact.php:336, widgets/contact/contact.php:569, widgets/cta/cta.php:78, widgets/hero/hero.php:122, widgets/layout-slider/layout-slider.php:90, widgets/social-media-buttons/social-media-buttons.php:86, widgets/tabs/tabs.php:86, widgets/tabs/tabs.php:106, widgets/tabs/tabs.php:150
328
  msgid "Background color"
329
  msgstr ""
330
 
331
+ #: widgets/accordion/accordion.php:101, widgets/tabs/tabs.php:110
332
  msgid "Background hover color"
333
  msgstr ""
334
 
335
+ #: widgets/accordion/accordion.php:106, widgets/cta/cta.php:91, widgets/tabs/tabs.php:115
336
  msgid "Title color"
337
  msgstr ""
338
 
339
+ #: widgets/accordion/accordion.php:111, widgets/tabs/tabs.php:120
340
  msgid "Title hover color"
341
  msgstr ""
342
 
343
+ #: widgets/accordion/accordion.php:115, widgets/accordion/accordion.php:143, widgets/contact/contact.php:346, widgets/contact/contact.php:463, widgets/contact/contact.php:579, widgets/cta/cta.php:82, widgets/tabs/tabs.php:91, widgets/tabs/tabs.php:125, widgets/tabs/tabs.php:159
344
  msgid "Border color"
345
  msgstr ""
346
 
347
+ #: widgets/accordion/accordion.php:119, widgets/tabs/tabs.php:130
348
  msgid "Border hover color"
349
  msgstr ""
350
 
351
+ #: widgets/accordion/accordion.php:123, widgets/accordion/accordion.php:147, widgets/contact/contact.php:351, widgets/contact/contact.php:468, widgets/contact/contact.php:595, widgets/tabs/tabs.php:95, widgets/tabs/tabs.php:135, widgets/tabs/tabs.php:163
352
  msgid "Border width"
353
  msgstr ""
354
 
355
+ #: widgets/accordion/accordion.php:139, widgets/tabs/tabs.php:155
356
  msgid "Font color"
357
  msgstr ""
358
 
359
+ #: widgets/accordion/accordion.php:151
360
  msgid "Bottom margin"
361
  msgstr ""
362
 
363
+ #: widgets/accordion/accordion.php:243
364
  msgid "Get more customization options and the ability to use widgets and layouts as your accordion content with %sSiteOrigin Premium%s"
365
  msgstr ""
366
 
492
  msgid "Normal"
493
  msgstr ""
494
 
495
+ #: widgets/button/button.php:183, widgets/button/button.php:207, widgets/social-media-buttons/social-media-buttons.php:120, widgets/social-media-buttons/social-media-buttons.php:142, widgets/social-media-buttons/social-media-buttons.php:175, base/inc/widgets/base-slider.class.php:106
496
  msgid "Medium"
497
  msgstr ""
498
 
1137
  msgid "SiteOrigin Editor"
1138
  msgstr ""
1139
 
 
 
 
 
1140
  #: widgets/editor/editor.php:55
1141
  msgid "Enable the \"Automatically add paragraphs\" setting by default."
1142
  msgstr ""
1269
  msgid "Open more URL in a new window"
1270
  msgstr ""
1271
 
1272
+ #: widgets/features/features.php:320, widgets/social-media-buttons/social-media-buttons.php:33, base/inc/widgets/base-slider.class.php:180
1273
  msgid "Responsive Breakpoint"
1274
  msgstr ""
1275
 
2513
  msgid "Select cover image"
2514
  msgstr ""
2515
 
2516
+ #: widgets/video/video.php:85, base/inc/widgets/base-slider.class.php:152
2517
  msgid "Video URL"
2518
  msgstr ""
2519
 
2521
  msgid "Video Playback"
2522
  msgstr ""
2523
 
2524
+ #: widgets/video/video.php:101, base/inc/widgets/base-slider.class.php:54, base/inc/widgets/base-slider.class.php:159
2525
  msgid "Autoplay"
2526
  msgstr ""
2527
 
2830
  msgid "%s is not a SiteOrigin Widget"
2831
  msgstr ""
2832
 
2833
+ #: base/inc/widgets/base-slider.class.php:55
2834
+ msgid "Change slides automatically without user interaction."
2835
+ msgstr ""
2836
+
2837
+ #: base/inc/widgets/base-slider.class.php:68
2838
+ msgid "Autoplay pause on hover"
2839
+ msgstr ""
2840
+
2841
+ #: base/inc/widgets/base-slider.class.php:77
2842
  msgid "Animation speed"
2843
  msgstr ""
2844
 
2845
+ #: base/inc/widgets/base-slider.class.php:78
2846
  msgid "Animation speed in milliseconds."
2847
  msgstr ""
2848
 
2849
+ #: base/inc/widgets/base-slider.class.php:84
2850
  msgid "Timeout"
2851
  msgstr ""
2852
 
2853
+ #: base/inc/widgets/base-slider.class.php:85
2854
  msgid "How long each frame is displayed for in milliseconds."
2855
  msgstr ""
2856
 
2857
+ #: base/inc/widgets/base-slider.class.php:95
2858
  msgid "Navigation color"
2859
  msgstr ""
2860
 
2861
+ #: base/inc/widgets/base-slider.class.php:101
2862
  msgid "Navigation style"
2863
  msgstr ""
2864
 
2865
+ #: base/inc/widgets/base-slider.class.php:104
2866
  msgid "Ultra thin"
2867
  msgstr ""
2868
 
2869
+ #: base/inc/widgets/base-slider.class.php:105
2870
  msgid "Thin"
2871
  msgstr ""
2872
 
2873
+ #: base/inc/widgets/base-slider.class.php:107
2874
  msgid "Thick"
2875
  msgstr ""
2876
 
2877
+ #: base/inc/widgets/base-slider.class.php:108
2878
  msgid "Rounded ultra thin"
2879
  msgstr ""
2880
 
2881
+ #: base/inc/widgets/base-slider.class.php:109
2882
  msgid "Rounded thin"
2883
  msgstr ""
2884
 
2885
+ #: base/inc/widgets/base-slider.class.php:110
2886
  msgid "Rounded medium"
2887
  msgstr ""
2888
 
2889
+ #: base/inc/widgets/base-slider.class.php:111
2890
  msgid "Rounded thick"
2891
  msgstr ""
2892
 
2893
+ #: base/inc/widgets/base-slider.class.php:117
2894
  msgid "Navigation size"
2895
  msgstr ""
2896
 
2897
+ #: base/inc/widgets/base-slider.class.php:123
2898
  msgid "Always show navigation on mobile"
2899
  msgstr ""
2900
 
2901
+ #: base/inc/widgets/base-slider.class.php:128
2902
  msgid "Swipe control"
2903
  msgstr ""
2904
 
2905
+ #: base/inc/widgets/base-slider.class.php:129
2906
  msgid "Allow users to swipe through frames on mobile devices."
2907
  msgstr ""
2908
 
2909
+ #: base/inc/widgets/base-slider.class.php:135
2910
  msgid "Show slide background videos on mobile"
2911
  msgstr ""
2912
 
2913
+ #: base/inc/widgets/base-slider.class.php:136
2914
  msgid "Allow slide background videos to appear on mobile devices that support autoplay."
2915
  msgstr ""
2916
 
2917
+ #: base/inc/widgets/base-slider.class.php:146
2918
  msgid "Video file"
2919
  msgstr ""
2920
 
2921
+ #: base/inc/widgets/base-slider.class.php:154
2922
  msgid "An external URL of the video. Overrides video file."
2923
  msgstr ""
2924
 
2925
+ #: base/inc/widgets/base-slider.class.php:161
2926
  msgid "Currently only for YouTube videos."
2927
  msgstr ""
2928
 
2929
+ #: base/inc/widgets/base-slider.class.php:166
2930
  msgid "Video format"
2931
  msgstr ""
2932
 
2933
+ #: base/inc/widgets/base-slider.class.php:182
2934
  msgid "This setting controls when the Slider will switch to the responsive mode. This breakpoint will only be used if always show navigation on mobile is enabled. The default value is 780px."
2935
  msgstr ""
2936
 
2937
+ #: base/inc/widgets/base-slider.class.php:229
2938
  msgid "display slide %s"
2939
  msgstr ""
2940
 
2941
+ #: base/inc/widgets/base-slider.class.php:234
2942
  msgid "next slide"
2943
  msgstr ""
2944
 
2945
+ #: base/inc/widgets/base-slider.class.php:240
2946
  msgid "previous slide"
2947
  msgstr ""
2948
 
readme.txt CHANGED
@@ -2,8 +2,9 @@
2
  Tags: bundle, widget, button, slider, image, carousel, price table, google maps, tinymce, social links
3
  Requires at least: 4.2
4
  Tested up to: 5.5
5
- Stable tag: 1.17.3
6
- Build time: 2020-07-23T18:39:48+02:00
 
7
  License: GPLv3 or later
8
  Contributors: gpriday, braam-genis
9
  Donate link: https://siteorigin.com/downloads/premium/
@@ -65,6 +66,13 @@ The SiteOrigin Widgets Bundle is the perfect platform to build widgets for your
65
 
66
  == Changelog ==
67
 
 
 
 
 
 
 
 
68
  == 1.17.3 - 23 July 2020 ==
69
  * Reverted: Features: Prevented icon overlapping text in edge cases.
70
  * Social Media Buttons: Added TikTok.
@@ -93,7 +101,7 @@ The SiteOrigin Widgets Bundle is the perfect platform to build widgets for your
93
  * Tabs: Added smooth scroll to tab when linked to.
94
  * Added `font-display: block` to all font icons.
95
  * Widget Block: Added `Additional CSS Classes` output.
96
- * Button: Added Button hover style settings.
97
  * Features: Prevented icon overlapping text in edge cases.
98
  * Post Carousel: Resolved IE 11 JavaScript error.
99
  * Post Carousel: Vertically align navigation icons and title when title present.
2
  Tags: bundle, widget, button, slider, image, carousel, price table, google maps, tinymce, social links
3
  Requires at least: 4.2
4
  Tested up to: 5.5
5
+ Requires PHP: 5.6.20
6
+ Stable tag: 1.17.4
7
+ Build time: 2020-08-06T12:52:43+02:00
8
  License: GPLv3 or later
9
  Contributors: gpriday, braam-genis
10
  Donate link: https://siteorigin.com/downloads/premium/
66
 
67
  == Changelog ==
68
 
69
+ == 1.17.4 - 06 August 2020 ==
70
+ * Post Carousel: Improved support for multiple carousel widgets on the same page.
71
+ * Post Carousel: Improved mobile support.
72
+ * Sliders: Added `Autoplay` and `Autoplay Pause on Hover` settings to the Slider, Layout Slider and Hero widgets.
73
+ * Features: Allowed shortcodes to be used in the Text field.
74
+ * Contact Form: Fix to ensure the correct fields are passed to Akismet.
75
+
76
  == 1.17.3 - 23 July 2020 ==
77
  * Reverted: Features: Prevented icon overlapping text in edge cases.
78
  * Social Media Buttons: Added TikTok.
101
  * Tabs: Added smooth scroll to tab when linked to.
102
  * Added `font-display: block` to all font icons.
103
  * Widget Block: Added `Additional CSS Classes` output.
104
+ * Button: Added Button hover style settings.
105
  * Features: Prevented icon overlapping text in edge cases.
106
  * Post Carousel: Resolved IE 11 JavaScript error.
107
  * Post Carousel: Vertically align navigation icons and title when title present.
so-widgets-bundle.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: SiteOrigin Widgets Bundle
4
  Description: A collection of all widgets, neatly bundled into a single plugin. It's also a framework to code your own widgets on top of.
5
- Version: 1.17.3
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
@@ -12,7 +12,7 @@ License: GPL3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
- define('SOW_BUNDLE_VERSION', '1.17.3');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
2
  /*
3
  Plugin Name: SiteOrigin Widgets Bundle
4
  Description: A collection of all widgets, neatly bundled into a single plugin. It's also a framework to code your own widgets on top of.
5
+ Version: 1.17.4
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
+ define('SOW_BUNDLE_VERSION', '1.17.4');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
widgets/accordion/accordion.php CHANGED
@@ -62,6 +62,12 @@ class SiteOrigin_Widget_Accordion_Widget extends SiteOrigin_Widget {
62
  'content_text' => array(
63
  'type' => 'tinymce',
64
  'label' => __( 'Content', 'so-widgets-bundle' ),
 
 
 
 
 
 
65
  ),
66
  'initial_state' => array(
67
  'type' => 'radio',
@@ -226,7 +232,7 @@ class SiteOrigin_Widget_Accordion_Widget extends SiteOrigin_Widget {
226
  }
227
 
228
  public function render_panel_content( $panel, $instance ) {
229
- $content = wp_kses_post( $panel['content_text'] );
230
 
231
  echo apply_filters( 'siteorigin_widgets_accordion_render_panel_content', $content, $panel, $instance );
232
  }
62
  'content_text' => array(
63
  'type' => 'tinymce',
64
  'label' => __( 'Content', 'so-widgets-bundle' ),
65
+ 'wpautop_toggle_field' => '.siteorigin-widget-field-autop input[type="checkbox"]',
66
+ ),
67
+ 'autop' => array(
68
+ 'type' => 'checkbox',
69
+ 'default' => false,
70
+ 'label' => __( 'Automatically add paragraphs', 'so-widgets-bundle' ),
71
  ),
72
  'initial_state' => array(
73
  'type' => 'radio',
232
  }
233
 
234
  public function render_panel_content( $panel, $instance ) {
235
+ $content = $panel['autop'] ? wpautop( $panel['content_text'] ) : $panel['content_text'];
236
 
237
  echo apply_filters( 'siteorigin_widgets_accordion_render_panel_content', $content, $panel, $instance );
238
  }
widgets/contact/contact.php CHANGED
@@ -1229,7 +1229,7 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
1229
  $message_text[] = $m['value'];
1230
  }
1231
 
1232
- $comment['comment_text'] = $email_fields['subject'] . "\n\n" . implode( "\n\n", $message_text );
1233
  $comment['comment_author'] = ! empty( $email_fields['name'] ) ? $email_fields['name'] : '';
1234
  $comment['comment_author_email'] = $email_fields['email'];
1235
  $comment['comment_post_ID'] = get_the_ID();
1229
  $message_text[] = $m['value'];
1230
  }
1231
 
1232
+ $comment['comment_content'] = $email_fields['subject'] . "\n\n" . implode( "\n\n", $message_text );
1233
  $comment['comment_author'] = ! empty( $email_fields['name'] ) ? $email_fields['name'] : '';
1234
  $comment['comment_author_email'] = $email_fields['email'];
1235
  $comment['comment_post_ID'] = get_the_ID();
widgets/contact/tpl/default.php CHANGED
@@ -10,7 +10,7 @@ if( $result['status'] == 'success' ) {
10
  // Display the success message
11
  ?>
12
  <div class="sow-contact-form-success" id="contact-form-<?php echo esc_attr( $short_hash ) ?>">
13
- <?php echo wp_kses_post( wpautop( $instance['settings']['success_message'] ) ) ?>
14
  </div>
15
  <?php
16
  }
10
  // Display the success message
11
  ?>
12
  <div class="sow-contact-form-success" id="contact-form-<?php echo esc_attr( $short_hash ) ?>">
13
+ <?php echo $instance['settings']['success_message']; ?>
14
  </div>
15
  <?php
16
  }
widgets/features/tpl/default.php CHANGED
@@ -50,7 +50,7 @@ $last_row = floor( ( count($instance['features']) - 1 ) / $instance['per_row'] )
50
  <?php endif; ?>
51
 
52
  <?php if(!empty($feature['text'])) : ?>
53
- <?php echo wp_kses_post( $feature['text'] ) ?>
54
  <?php endif; ?>
55
 
56
  <?php if(!empty($feature['more_text'])) : ?>
50
  <?php endif; ?>
51
 
52
  <?php if(!empty($feature['text'])) : ?>
53
+ <?php echo do_shortcode( $feature['text'] ); ?>
54
  <?php endif; ?>
55
 
56
  <?php if(!empty($feature['more_text'])) : ?>
widgets/post-carousel/js/carousel.js CHANGED
@@ -106,27 +106,27 @@ jQuery( function ( $ ) {
106
  }
107
  } );
108
 
109
- // Hide/disable scroll if number of visible items is less than total posts.
110
- $( window ).on( 'resize load', function() {
111
- $items = $$.find( '.sow-carousel-items' );
112
- var numVisibleItems = Math.ceil( $items.outerWidth() / $items.find( '.sow-carousel-item' ).outerWidth( true ) );
113
- var navigation = $$.parent().parent().find( '.sow-carousel-navigation' );
114
- if ( numVisibleItems >= $items.find( '.sow-carousel-item' ).length ) {
115
- navigation.hide();
116
- 'touchMove'
117
- $items.slick( 'slickSetOption', 'touchMove', false );
118
- $items.slick( 'slickSetOption', 'draggable', false );
119
- } else if ( navigation.not( ':visible' ) ) {
120
- navigation.show();
121
- $items.slick( 'slickSetOption', 'touchMove', true );
122
- $items.slick( 'slickSetOption', 'draggable', true );
123
- }
124
- } );
125
 
126
  } );
127
 
128
- // Change Slick Settings on iPad Pro while Landscape
129
- $( window ).resize( function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  if ( window.matchMedia( '(min-width: ' + carouselBreakpoints.tablet_portrait + 'px) and (max-width: ' + carouselBreakpoints.tablet_landscape + 'px) and (orientation: landscape)' ).matches ) {
131
  $( '.sow-carousel-items' ).slick( 'slickSetOption', 'slidesToShow', 3 );
132
  $( '.sow-carousel-items' ).slick( 'slickSetOption', 'slidesToScroll', 3 );
106
  }
107
  } );
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
 
110
  } );
111
 
112
+ $( window ).on( 'resize load', function() {
113
+ // Hide/disable scroll if number of visible items is less than total posts.
114
+ var $carousels = $( '.sow-carousel-wrapper' ),
115
+ $items = $carousels.find( '.sow-carousel-items' ),
116
+ numVisibleItems = Math.ceil( $items.outerWidth() / $items.find( '.sow-carousel-item' ).outerWidth( true ) ),
117
+ navigation = $carousels.parent().parent().find( '.sow-carousel-navigation' );
118
+
119
+ if ( numVisibleItems >= $carousels.data( 'post-count' ) ) {
120
+ navigation.hide();
121
+ $items.slick( 'slickSetOption', 'touchMove', false );
122
+ $items.slick( 'slickSetOption', 'draggable', false );
123
+ } else if ( navigation.not( ':visible' ) ) {
124
+ navigation.show();
125
+ $items.slick( 'slickSetOption', 'touchMove', true );
126
+ $items.slick( 'slickSetOption', 'draggable', true );
127
+ }
128
+
129
+ // Change Slick Settings on iPad Pro while Landscape
130
  if ( window.matchMedia( '(min-width: ' + carouselBreakpoints.tablet_portrait + 'px) and (max-width: ' + carouselBreakpoints.tablet_landscape + 'px) and (orientation: landscape)' ).matches ) {
131
  $( '.sow-carousel-items' ).slick( 'slickSetOption', 'slidesToShow', 3 );
132
  $( '.sow-carousel-items' ).slick( 'slickSetOption', 'slidesToScroll', 3 );
widgets/post-carousel/js/carousel.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery((function(s){sowb.setupCarousel=function(){s(".sow-carousel-wrapper").each((function(){var e=s(this);$items=e.find(".sow-carousel-items"),$items.not(".slick-initialized").slick({arrows:!1,infinite:!1,rows:0,rtl:"rtl"==e.data("dir"),touchThreshold:20,variableWidth:!0,responsive:[{breakpoint:carouselBreakpoints.tablet_portrait,settings:{slidesToScroll:2,slidesToShow:2}},{breakpoint:carouselBreakpoints.mobile,settings:{slidesToScroll:1,slidesToShow:1}}]}),$items.on("swipe",(function(s,i,t){e.parent().parent().find(".sow-carousel-"+("left"==t?"next":"prev")).trigger("touchend")})),e.parent().parent().find(".sow-carousel-previous, .sow-carousel-next").on("click touchend",(function(i){i.preventDefault(),$items=e.find(".sow-carousel-items");var t=$items.find(".sow-carousel-item").length,o=e.data("post-count");if(complete=t===o,numVisibleItems=Math.ceil($items.outerWidth()/$items.find(".sow-carousel-item").outerWidth(!0)),lastPosition=t-numVisibleItems+1,!complete&&$items.slick("slickCurrentSlide")+numVisibleItems>=t-1&&!e.data("fetching")){e.data("fetching",!0);var a=e.data("page")+1;$items.slick("slickAdd",'<div class="sow-carousel-item sow-carousel-loading"></div>'),s.get(e.data("ajax-url"),{action:"sow_carousel_load",paged:a,instance_hash:e.parent().parent().find('input[name="instance_hash"]').val()},(function(s,i){$items.find(".sow-carousel-loading").remove(),$items.slick("slickAdd",s.html),t=e.find(".sow-carousel-item").length,e.data("fetching",!1),e.data("page",a)}))}s(this).hasClass("sow-carousel-next")?$items.slick("slickCurrentSlide")>=lastPosition?e.data("loop-posts-enabled")&&!e.data("fetching")&&$items.slick("slickGoTo",0):$items.slick("slickNext"):s(this).hasClass("sow-carousel-previous")&&(e.data("loop-posts-enabled")&&0==$items.slick("slickCurrentSlide")?$items.slick("slickGoTo",lastPosition-(complete?0:1)):$items.slick("slickPrev"))})),s(window).on("resize load",(function(){$items=e.find(".sow-carousel-items");var s=Math.ceil($items.outerWidth()/$items.find(".sow-carousel-item").outerWidth(!0)),i=e.parent().parent().find(".sow-carousel-navigation");s>=$items.find(".sow-carousel-item").length?(i.hide(),$items.slick("slickSetOption","touchMove",!1),$items.slick("slickSetOption","draggable",!1)):i.not(":visible")&&(i.show(),$items.slick("slickSetOption","touchMove",!0),$items.slick("slickSetOption","draggable",!0))}))})),s(window).resize((function(){window.matchMedia("(min-width: "+carouselBreakpoints.tablet_portrait+"px) and (max-width: "+carouselBreakpoints.tablet_landscape+"px) and (orientation: landscape)").matches&&(s(".sow-carousel-items").slick("slickSetOption","slidesToShow",3),s(".sow-carousel-items").slick("slickSetOption","slidesToScroll",3))}))},sowb.setupCarousel(),s(sowb).on("setup_widgets",sowb.setupCarousel)})),window.sowb=sowb;
1
+ var sowb=window.sowb||{};jQuery((function(s){sowb.setupCarousel=function(){s(".sow-carousel-wrapper").each((function(){var e=s(this);$items=e.find(".sow-carousel-items"),$items.not(".slick-initialized").slick({arrows:!1,infinite:!1,rows:0,rtl:"rtl"==e.data("dir"),touchThreshold:20,variableWidth:!0,responsive:[{breakpoint:carouselBreakpoints.tablet_portrait,settings:{slidesToScroll:2,slidesToShow:2}},{breakpoint:carouselBreakpoints.mobile,settings:{slidesToScroll:1,slidesToShow:1}}]}),$items.on("swipe",(function(s,i,t){e.parent().parent().find(".sow-carousel-"+("left"==t?"next":"prev")).trigger("touchend")})),e.parent().parent().find(".sow-carousel-previous, .sow-carousel-next").on("click touchend",(function(i){i.preventDefault(),$items=e.find(".sow-carousel-items");var t=$items.find(".sow-carousel-item").length,o=e.data("post-count");if(complete=t===o,numVisibleItems=Math.ceil($items.outerWidth()/$items.find(".sow-carousel-item").outerWidth(!0)),lastPosition=t-numVisibleItems+1,!complete&&$items.slick("slickCurrentSlide")+numVisibleItems>=t-1&&!e.data("fetching")){e.data("fetching",!0);var a=e.data("page")+1;$items.slick("slickAdd",'<div class="sow-carousel-item sow-carousel-loading"></div>'),s.get(e.data("ajax-url"),{action:"sow_carousel_load",paged:a,instance_hash:e.parent().parent().find('input[name="instance_hash"]').val()},(function(s,i){$items.find(".sow-carousel-loading").remove(),$items.slick("slickAdd",s.html),t=e.find(".sow-carousel-item").length,e.data("fetching",!1),e.data("page",a)}))}s(this).hasClass("sow-carousel-next")?$items.slick("slickCurrentSlide")>=lastPosition?e.data("loop-posts-enabled")&&!e.data("fetching")&&$items.slick("slickGoTo",0):$items.slick("slickNext"):s(this).hasClass("sow-carousel-previous")&&(e.data("loop-posts-enabled")&&0==$items.slick("slickCurrentSlide")?$items.slick("slickGoTo",lastPosition-(complete?0:1)):$items.slick("slickPrev"))}))})),s(window).on("resize load",(function(){var e=s(".sow-carousel-wrapper"),i=e.find(".sow-carousel-items"),t=Math.ceil(i.outerWidth()/i.find(".sow-carousel-item").outerWidth(!0)),o=e.parent().parent().find(".sow-carousel-navigation");t>=e.data("post-count")?(o.hide(),i.slick("slickSetOption","touchMove",!1),i.slick("slickSetOption","draggable",!1)):o.not(":visible")&&(o.show(),i.slick("slickSetOption","touchMove",!0),i.slick("slickSetOption","draggable",!0)),window.matchMedia("(min-width: "+carouselBreakpoints.tablet_portrait+"px) and (max-width: "+carouselBreakpoints.tablet_landscape+"px) and (orientation: landscape)").matches&&(s(".sow-carousel-items").slick("slickSetOption","slidesToShow",3),s(".sow-carousel-items").slick("slickSetOption","slidesToScroll",3))}))},sowb.setupCarousel(),s(sowb).on("setup_widgets",sowb.setupCarousel)})),window.sowb=sowb;