SiteOrigin Widgets Bundle - Version 1.17.6

Version Description

  • 17 August 2020 ==
  • Hero and Layout Sliders: Disabled lazy loading for images added to the slide content area.
  • Slider: Disabled lazy loading in the Block Editor.

=

Download this release

Release Info

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

Code changes from version 1.17.5 to 1.17.6

js/slider/jquery.slider.js CHANGED
@@ -241,11 +241,11 @@ jQuery( function($){
241
  );
242
  };
243
 
244
- var images = $$.find('img');
245
  var imagesLoaded = 0;
246
  var sliderLoaded = false;
247
 
248
- // Preload all the images, when they're loaded, then display the slider
249
  images.each( function(){
250
  var $i = $(this);
251
  if( this.complete ) {
241
  );
242
  };
243
 
244
+ var images = $$.find( 'img.sow-slider-background-image, img.sow-slider-foreground-image' );
245
  var imagesLoaded = 0;
246
  var sliderLoaded = false;
247
 
248
+ // Preload all of the slide images, when they're loaded, then display the slider.
249
  images.each( function(){
250
  var $i = $(this);
251
  if( this.complete ) {
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,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;
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.sow-slider-background-image, img.sow-slider-foreground-image"),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;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Tags: bundle, widget, button, slider, image, carousel, price table, google maps,
3
  Requires at least: 4.2
4
  Tested up to: 5.5
5
  Requires PHP: 5.6.20
6
- Stable tag: 1.17.5
7
- Build time: 2020-08-12T17:37:08+02:00
8
  License: GPLv3 or later
9
  Contributors: gpriday, braam-genis
10
  Donate link: https://siteorigin.com/downloads/premium/
@@ -66,6 +66,10 @@ The SiteOrigin Widgets Bundle is the perfect platform to build widgets for your
66
 
67
  == Changelog ==
68
 
 
 
 
 
69
  == 1.17.5 - 12 August 2020 ==
70
  * Slider: Disable WordPress 5.5 Lazy Loading.
71
 
3
  Requires at least: 4.2
4
  Tested up to: 5.5
5
  Requires PHP: 5.6.20
6
+ Stable tag: 1.17.6
7
+ Build time: 2020-08-17T20:42:09+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.6 - 17 August 2020 ==
70
+ * Hero and Layout Sliders: Disabled lazy loading for images added to the slide content area.
71
+ * Slider: Disabled lazy loading in the Block Editor.
72
+
73
  == 1.17.5 - 12 August 2020 ==
74
  * Slider: Disable WordPress 5.5 Lazy Loading.
75
 
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.5
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.5');
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.6
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.6');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
widgets/slider/slider.php CHANGED
@@ -168,7 +168,7 @@ class SiteOrigin_Widget_Slider_Widget extends SiteOrigin_Widget_Base_Slider {
168
  !empty( $frame['foreground_image_fallback'] ) ? $frame['foreground_image_fallback'] : '',
169
  array(
170
  'class' => 'sow-slider-foreground-image',
171
- 'loading' => false,
172
  )
173
  );
174
  ?>
@@ -198,7 +198,7 @@ class SiteOrigin_Widget_Slider_Widget extends SiteOrigin_Widget_Base_Slider {
198
  !empty( $frame['background_image_fallback'] ) ? $frame['background_image_fallback'] : '',
199
  array(
200
  'class' => 'sow-slider-background-image',
201
- 'loading' => false,
202
  )
203
  );
204
 
168
  !empty( $frame['foreground_image_fallback'] ) ? $frame['foreground_image_fallback'] : '',
169
  array(
170
  'class' => 'sow-slider-foreground-image',
171
+ 'loading' => true,
172
  )
173
  );
174
  ?>
198
  !empty( $frame['background_image_fallback'] ) ? $frame['background_image_fallback'] : '',
199
  array(
200
  'class' => 'sow-slider-background-image',
201
+ 'loading' => true,
202
  )
203
  );
204