Version Description
- 05 August 2022 =
- Anything Carousel: Resolved potential navigation malfunction.
- Post Carousel: Improved partially visible post navigation.
- Improved
style
tag HTML validation.
Download this release
Release Info
Developer | SiteOrigin |
Plugin | SiteOrigin Widgets Bundle |
Version | 1.38.3 |
Comparing to | |
See all releases |
Code changes from version 1.38.2 to 1.38.3
- base/base.php +11 -8
- js/carousel.js +5 -18
- js/carousel.min.js +1 -1
- lang/so-widgets-bundle.pot +1 -1
- readme.txt +7 -2
- so-widgets-bundle.php +2 -2
base/base.php
CHANGED
@@ -29,19 +29,22 @@ function siteorigin_widget_add_inline_css($css){
|
|
29 |
/**
|
30 |
* Print any inline styles that have been added with siteorigin_widget_add_inline_css
|
31 |
*/
|
32 |
-
function siteorigin_widget_print_styles(){
|
33 |
global $siteorigin_widgets_inline_styles;
|
34 |
if ( ! empty( $siteorigin_widgets_inline_styles ) ) {
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
40 |
|
41 |
$siteorigin_widgets_inline_styles = array();
|
42 |
}
|
43 |
-
add_action('wp_head', 'siteorigin_widget_print_styles');
|
44 |
-
add_action('wp_footer', 'siteorigin_widget_print_styles');
|
45 |
|
46 |
/**
|
47 |
* The ajax handler for getting a list of available icons.
|
29 |
/**
|
30 |
* Print any inline styles that have been added with siteorigin_widget_add_inline_css
|
31 |
*/
|
32 |
+
function siteorigin_widget_print_styles() {
|
33 |
global $siteorigin_widgets_inline_styles;
|
34 |
if ( ! empty( $siteorigin_widgets_inline_styles ) ) {
|
35 |
+
foreach ( $siteorigin_widgets_inline_styles as $widget_css ) {
|
36 |
+
if ( ! empty( $widget_css ) ) {
|
37 |
+
?>
|
38 |
+
<style<?php echo current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; ?>><?php echo( $widget_css ); ?></style>
|
39 |
+
<?php
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
|
44 |
$siteorigin_widgets_inline_styles = array();
|
45 |
}
|
46 |
+
add_action( 'wp_head', 'siteorigin_widget_print_styles' );
|
47 |
+
add_action( 'wp_footer', 'siteorigin_widget_print_styles' );
|
48 |
|
49 |
/**
|
50 |
* The ajax handler for getting a list of available icons.
|
js/carousel.js
CHANGED
@@ -163,8 +163,8 @@ jQuery( function ( $ ) {
|
|
163 |
if ( $$.data( 'carousel_settings' ).loop ) {
|
164 |
$items.slick( 'slickGoTo', 0 );
|
165 |
}
|
166 |
-
// If
|
167 |
-
} else if ( slidesToScroll >= numVisibleItemsFloor ) {
|
168 |
// There's more slides than items, update Slick settings to allow for scrolling of partially visible items.
|
169 |
$items.slick( 'slickSetOption', 'slidesToShow', numVisibleItemsFloor );
|
170 |
$items.slick( 'slickSetOption', 'slidesToScroll', numVisibleItemsFloor );
|
@@ -175,12 +175,11 @@ jQuery( function ( $ ) {
|
|
175 |
} else {
|
176 |
$items.slick( 'slickNext' );
|
177 |
}
|
178 |
-
|
179 |
} else if ( $( this ).hasClass( 'sow-carousel-previous' ) ) {
|
180 |
if ( $$.data( 'carousel_settings' ).loop && $items.slick( 'slickCurrentSlide' ) == 0 ) {
|
181 |
$items.slick( 'slickGoTo', lastPosition );
|
182 |
-
} else if (
|
183 |
-
$items.slick( 'slickGoTo',
|
184 |
} else {
|
185 |
$items.slick( 'slickPrev' );
|
186 |
}
|
@@ -299,19 +298,7 @@ jQuery( function ( $ ) {
|
|
299 |
var carousel_resizer = function() {
|
300 |
$( '.sow-carousel-wrapper' ).each( function() {
|
301 |
var currentCarousel = $( this ),
|
302 |
-
$items = currentCarousel.find( '.sow-carousel-items.slick-initialized' )
|
303 |
-
numVisibleItems = Math.floor( $items.outerWidth() / $items.find( '.sow-carousel-item' ).outerWidth( true ) ),
|
304 |
-
navigation = currentCarousel.parent().parent().find( '.sow-carousel-navigation' );
|
305 |
-
|
306 |
-
if ( numVisibleItems >= currentCarousel.data( 'item_count' ) ) {
|
307 |
-
navigation.hide();
|
308 |
-
$items.slick( 'slickSetOption', 'touchMove', false );
|
309 |
-
$items.slick( 'slickSetOption', 'draggable', false );
|
310 |
-
} else if ( navigation.not( ':visible' ) ) {
|
311 |
-
navigation.show();
|
312 |
-
$items.slick( 'slickSetOption', 'touchMove', true );
|
313 |
-
$items.slick( 'slickSetOption', 'draggable', true );
|
314 |
-
}
|
315 |
|
316 |
// Change Slick Settings on iPad Pro while Landscape
|
317 |
var responsiveSettings = currentCarousel.data( 'responsive' );
|
163 |
if ( $$.data( 'carousel_settings' ).loop ) {
|
164 |
$items.slick( 'slickGoTo', 0 );
|
165 |
}
|
166 |
+
// If slidesToScroll is higher than the the number of visible items, go to the last item.
|
167 |
+
} else if ( $$.data( 'widget' ) == 'post' && slidesToScroll >= numVisibleItemsFloor ) {
|
168 |
// There's more slides than items, update Slick settings to allow for scrolling of partially visible items.
|
169 |
$items.slick( 'slickSetOption', 'slidesToShow', numVisibleItemsFloor );
|
170 |
$items.slick( 'slickSetOption', 'slidesToScroll', numVisibleItemsFloor );
|
175 |
} else {
|
176 |
$items.slick( 'slickNext' );
|
177 |
}
|
|
|
178 |
} else if ( $( this ).hasClass( 'sow-carousel-previous' ) ) {
|
179 |
if ( $$.data( 'carousel_settings' ).loop && $items.slick( 'slickCurrentSlide' ) == 0 ) {
|
180 |
$items.slick( 'slickGoTo', lastPosition );
|
181 |
+
} else if ( $$.data( 'widget' ) == 'post' && $items.slick( 'slickCurrentSlide' ) <= slidesToScroll ) {
|
182 |
+
$items.slick( 'slickGoTo', 0 );
|
183 |
} else {
|
184 |
$items.slick( 'slickPrev' );
|
185 |
}
|
298 |
var carousel_resizer = function() {
|
299 |
$( '.sow-carousel-wrapper' ).each( function() {
|
300 |
var currentCarousel = $( this ),
|
301 |
+
$items = currentCarousel.find( '.sow-carousel-items.slick-initialized' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
|
303 |
// Change Slick Settings on iPad Pro while Landscape
|
304 |
var responsiveSettings = currentCarousel.data( 'responsive' );
|
js/carousel.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var sowb=window.sowb||{};jQuery((function(i){sowb.setupCarousel=function(){i.fn.setSlideTo=function(s){$item=i(this);var e=$item.slick("slickGetOption","slidesToShow"),t=$item.slick("slickGetOption","slidesToScroll");$item.slick("slickSetOption","slidesToShow",1),$item.slick("slickSetOption","slidesToScroll",1),$item.slick("slickGoTo",s),$item.slick("slickSetOption","slidesToShow",e),$item.slick("slickSetOption","slidesToScroll",t)},i(".sow-carousel-wrapper").on("init",(function(s,e){i(this).css("opacity",1)})),i(".sow-carousel-wrapper").each((function(){var s=i(this),e=s.find(".sow-carousel-items"),t=s.data("responsive"),o=s.data("carousel_settings");if(e.not(".slick-initialized").slick({arrows:!1,dots:o.dots,appendDots:o.appendDots?s.find(".sow-carousel-nav"):s,rows:0,rtl:"rtl"==s.data("dir"),touchThreshold:20,infinite:o.loop&&(!s.data("ajax-url")||s.data("ajax-url")&&o.autoplay_continuous_scroll&&o.autoplay),variableWidth:s.data("variable_width"),accessibility:!1,adaptiveHeight:o.adaptive_height,cssEase:o.animation,speed:o.animation_speed,slidesToScroll:t.desktop_slides_to_scroll,slidesToShow:void 0===t.desktop_slides_to_show?t.desktop_slides_to_scroll:t.desktop_slides_to_show,responsive:[{breakpoint:t.tablet_portrait_breakpoint,settings:{slidesToScroll:t.tablet_portrait_slides_to_scroll,slidesToShow:void 0===t.tablet_portrait_slides_to_show?t.tablet_portrait_slides_to_scroll:t.tablet_portrait_slides_to_show}},{breakpoint:t.mobile_breakpoint,settings:{slidesToScroll:t.mobile_slides_to_scroll,slidesToShow:void 0===t.mobile_slides_to_show?t.mobile_slides_to_scroll:t.mobile_slides_to_show}}]}),o.item_overflow&&(e.css("width",""),e.css("opacity","")),e.on("swipe",(function(i,e,t){s.parent().parent().find(".sow-carousel-"+("left"==t?"next":"prev")).trigger("touchend")})),o.autoplay){var l=!1,a=s.parent().parent().find(".sow-carousel-"+("ltr"==s.data("dir")?"next":"prev"));setInterval((function(){l||a.trigger("click")}),o.autoplaySpeed),o.pauseOnHover&&(e.on("mouseenter.slick",(function(){l=!0})),e.on("mouseleave.slick",(function(){l=!1})))}if(s.parent().parent().find(".sow-carousel-previous, .sow-carousel-next").on("click touchend",(function(e,t){e.preventDefault();var l=s.find(".sow-carousel-items"),a=l.find(".sow-carousel-item").length,c=a>=s.data("item_count"),
|
1 |
+
var sowb=window.sowb||{};jQuery((function(i){sowb.setupCarousel=function(){i.fn.setSlideTo=function(s){$item=i(this);var e=$item.slick("slickGetOption","slidesToShow"),t=$item.slick("slickGetOption","slidesToScroll");$item.slick("slickSetOption","slidesToShow",1),$item.slick("slickSetOption","slidesToScroll",1),$item.slick("slickGoTo",s),$item.slick("slickSetOption","slidesToShow",e),$item.slick("slickSetOption","slidesToScroll",t)},i(".sow-carousel-wrapper").on("init",(function(s,e){i(this).css("opacity",1)})),i(".sow-carousel-wrapper").each((function(){var s=i(this),e=s.find(".sow-carousel-items"),t=s.data("responsive"),o=s.data("carousel_settings");if(e.not(".slick-initialized").slick({arrows:!1,dots:o.dots,appendDots:o.appendDots?s.find(".sow-carousel-nav"):s,rows:0,rtl:"rtl"==s.data("dir"),touchThreshold:20,infinite:o.loop&&(!s.data("ajax-url")||s.data("ajax-url")&&o.autoplay_continuous_scroll&&o.autoplay),variableWidth:s.data("variable_width"),accessibility:!1,adaptiveHeight:o.adaptive_height,cssEase:o.animation,speed:o.animation_speed,slidesToScroll:t.desktop_slides_to_scroll,slidesToShow:void 0===t.desktop_slides_to_show?t.desktop_slides_to_scroll:t.desktop_slides_to_show,responsive:[{breakpoint:t.tablet_portrait_breakpoint,settings:{slidesToScroll:t.tablet_portrait_slides_to_scroll,slidesToShow:void 0===t.tablet_portrait_slides_to_show?t.tablet_portrait_slides_to_scroll:t.tablet_portrait_slides_to_show}},{breakpoint:t.mobile_breakpoint,settings:{slidesToScroll:t.mobile_slides_to_scroll,slidesToShow:void 0===t.mobile_slides_to_show?t.mobile_slides_to_scroll:t.mobile_slides_to_show}}]}),o.item_overflow&&(e.css("width",""),e.css("opacity","")),e.on("swipe",(function(i,e,t){s.parent().parent().find(".sow-carousel-"+("left"==t?"next":"prev")).trigger("touchend")})),o.autoplay){var l=!1,a=s.parent().parent().find(".sow-carousel-"+("ltr"==s.data("dir")?"next":"prev"));setInterval((function(){l||a.trigger("click")}),o.autoplaySpeed),o.pauseOnHover&&(e.on("mouseenter.slick",(function(){l=!0})),e.on("mouseleave.slick",(function(){l=!1})))}if(s.parent().parent().find(".sow-carousel-previous, .sow-carousel-next").on("click touchend",(function(e,t){e.preventDefault();var l=s.find(".sow-carousel-items"),a=l.find(".sow-carousel-item").length,c=a>=s.data("item_count"),d=Math.ceil(l.outerWidth()/l.find(".sow-carousel-item").outerWidth(!0)),r=Math.floor(l.outerWidth()/l.find(".sow-carousel-item").outerWidth(!0)),n=l.slick("slickGetOption","slidesToScroll"),k=a-d,u=!1;"post"==s.data("widget")&&"undefined"!=s.data("carousel_settings").theme&&c&&k++,c||(l.slick("slickCurrentSlide")+d>=a-1||l.slick("slickCurrentSlide")+n>k)&&(i(sowb).trigger("carousel_load_new_items",[s,l,t]),u=!0),i(this).hasClass("sow-carousel-next")&&!u?c&&l.slick("slickCurrentSlide")>=k?s.data("carousel_settings").loop&&l.slick("slickGoTo",0):"post"==s.data("widget")&&n>=r?(l.slick("slickSetOption","slidesToShow",r),l.slick("slickSetOption","slidesToScroll",r),l.slick("slickNext")):l.slick("slickCurrentSlide")+n>k?l.setSlideTo(k):l.slick("slickNext"):i(this).hasClass("sow-carousel-previous")&&(s.data("carousel_settings").loop&&0==l.slick("slickCurrentSlide")?l.slick("slickGoTo",k):"post"==s.data("widget")&&l.slick("slickCurrentSlide")<=n?l.slick("slickGoTo",0):l.slick("slickPrev")),o.dots&&"post"==s.data("widget")&&(s.find("li.slick-active").removeClass("slick-active"),s.find(".slick-dots li").eq(Math.ceil(s.find(".sow-carousel-items").slick("slickCurrentSlide")/n)).addClass("slick-active"))})),o.dots&&(s.data("variable_width")||s.data("carousel_settings").theme)){s.find(".slick-dots li").off("click.slick");var c=function(){e=s.find(".sow-carousel-items");var t=i(this).index(),o=e.slick("slickGetOption","slidesToScroll"),l=e.find(".sow-carousel-item").length,a=Math.ceil(e.outerWidth()/e.find(".sow-carousel-item").outerWidth(!0)),c=l-a;(t+a>=l?(e.slick("slickGoTo",c),$dots=i(this).parent(),$dots.find(".slick-active").removeClass("slick-active"),$dots.children().eq(t).addClass("slick-active")):("post"==s.data("widget")&&(t=Math.ceil(i(this).index()*o)),e.slick("slickGoTo",t)),"post"==s.data("widget"))&&(l>=s.data("item_count")||(e.slick("slickCurrentSlide")+a>=l-1||e.slick("slickCurrentSlide")+o>c)&&i(sowb).trigger("carousel_load_new_items",[s,e,!1]))};s.find(".slick-dots li").on("click touchend",c),i(sowb).on("carousel_posts_added",(function(){s.find(".slick-dots li").on("click touchend",c)}))}})),i(sowb).trigger("carousel_setup"),i(document).on("keydown",".sow-carousel-navigation a",(function(s){13!=s.keyCode&&32!=s.keyCode||(s.preventDefault(),i(this).trigger("click"))})),i(document).on("keyup",".sow-carousel-item",(function(s){if(13==s.keyCode&&i(this).find("h3 a")[0].click(),37==s.keyCode||39==s.keyCode){var e=i(this).parents(".sow-carousel-wrapper"),t=e.find(".sow-carousel-items"),o=t.find(".sow-carousel-item").length,l=i(this).data("slick-index"),a=o-(o===e.data("item_count")?0:1);if(37==s.keyCode)--l<0&&(l=a);else if(39==s.keyCode&&++l>=a){if(e.data("fetching"))return;e.parent().find(".sow-carousel-next").trigger("click",!0)}t.slick("slickGoTo",l,!0),e.find(".sow-carousel-item").prop("tabindex",-1),e.find('.sow-carousel-item[data-slick-index="'+l+'"]').trigger("focus").prop("tabindex",0)}}));var s=function(){i(".sow-carousel-wrapper").each((function(){var s=i(this),e=s.find(".sow-carousel-items.slick-initialized"),t=s.data("responsive");window.matchMedia("(min-width: "+t.tablet_portrait_breakpoint+"px) and (max-width: "+t.tablet_landscape_breakpoint+"px) and (orientation: landscape)").matches&&(e.slick("slickSetOption","slidesToShow",t.tablet_landscape_slides_to_show),e.slick("slickSetOption","slidesToScroll",t.tablet_landscape_slides_to_scroll))})),i(".sow-carousel-item:first-of-type").prop("tabindex",0)};s(),i(window).on("resize load",s)},sowb.setupCarousel(),i(sowb).on("setup_widgets",sowb.setupCarousel)})),window.sowb=sowb;
|
lang/so-widgets-bundle.pot
CHANGED
@@ -36,7 +36,7 @@ msgstr ""
|
|
36 |
msgid "https://siteorigin.com/widgets-bundle/"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: so-widgets-bundle.php:387, so-widgets-bundle.php:411, so-widgets-bundle.php:424, so-widgets-bundle.php:454, so-widgets-bundle.php:465, so-widgets-bundle.php:532, so-widgets-bundle.php:543, base/base.php:
|
40 |
msgid "Invalid request."
|
41 |
msgstr ""
|
42 |
|
36 |
msgid "https://siteorigin.com/widgets-bundle/"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: so-widgets-bundle.php:387, so-widgets-bundle.php:411, so-widgets-bundle.php:424, so-widgets-bundle.php:454, so-widgets-bundle.php:465, so-widgets-bundle.php:532, so-widgets-bundle.php:543, base/base.php:54, base/base.php:58, base/inc/actions.php:11, base/inc/actions.php:77, base/inc/actions.php:131, base/inc/actions.php:167, base/inc/actions.php:180, base/inc/actions.php:184, base/inc/actions.php:275, base/inc/actions.php:278
|
40 |
msgid "Invalid request."
|
41 |
msgstr ""
|
42 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Tags: widget, button, slider, hero, google maps, image, carousel, lottie, featur
|
|
3 |
Requires at least: 4.2
|
4 |
Tested up to: 6.0
|
5 |
Requires PHP: 5.6.20
|
6 |
-
Stable tag: 1.38.
|
7 |
-
Build time: 2022-
|
8 |
License: GPLv3 or later
|
9 |
Contributors: gpriday, braam-genis, alexgso
|
10 |
Donate link: https://siteorigin.com/downloads/premium/
|
@@ -105,6 +105,11 @@ The Widgets Bundle global interface is available at Plugins > SiteOrigin Widgets
|
|
105 |
|
106 |
== Changelog ==
|
107 |
|
|
|
|
|
|
|
|
|
|
|
108 |
= 1.38.2 - 27 July 2022 =
|
109 |
* Features: Resolved PHP 8 error when Features Per Row is empty.
|
110 |
|
3 |
Requires at least: 4.2
|
4 |
Tested up to: 6.0
|
5 |
Requires PHP: 5.6.20
|
6 |
+
Stable tag: 1.38.3
|
7 |
+
Build time: 2022-08-05T11:57:08+02:00
|
8 |
License: GPLv3 or later
|
9 |
Contributors: gpriday, braam-genis, alexgso
|
10 |
Donate link: https://siteorigin.com/downloads/premium/
|
105 |
|
106 |
== Changelog ==
|
107 |
|
108 |
+
= 1.38.3 - 05 August 2022 =
|
109 |
+
* Anything Carousel: Resolved potential navigation malfunction.
|
110 |
+
* Post Carousel: Improved partially visible post navigation.
|
111 |
+
* Improved `style` tag HTML validation.
|
112 |
+
|
113 |
= 1.38.2 - 27 July 2022 =
|
114 |
* Features: Resolved PHP 8 error when Features Per Row is empty.
|
115 |
|
so-widgets-bundle.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: SiteOrigin Widgets Bundle
|
4 |
Description: A highly customizable collection of widgets, ready to be used anywhere, neatly bundled into a single plugin.
|
5 |
-
Version: 1.38.
|
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.38.
|
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 highly customizable collection of widgets, ready to be used anywhere, neatly bundled into a single plugin.
|
5 |
+
Version: 1.38.3
|
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.38.3' );
|
16 |
define( 'SOW_BUNDLE_BASE_FILE', __FILE__ );
|
17 |
|
18 |
// Allow JS suffix to be pre-set.
|