SiteOrigin Widgets Bundle - Version 1.44.1

Version Description

  • 25 November 2022 =
  • Icon Field: Resolved jQuery Migrate flag.
  • Contact Form: Resolved notice when Message field not used.
  • Features: Resolved PHP 8 Division by 0 Error if Features per row not set.
  • Simple Masonry: Changed to use pure CSS (object-fit) for sizing images.
Download this release

Release Info

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

Code changes from version 1.44.0 to 1.44.1

base/inc/fields/js/icon-field.js CHANGED
@@ -60,7 +60,7 @@
60
  }
61
  };
62
 
63
- $search.keyup( searchIcons ).on( 'change', searchIcons );
64
 
65
  var renderStylesSelect = function ( init ) {
66
  var $familySelect = $is.find( 'select.siteorigin-widget-icon-family' );
60
  }
61
  };
62
 
63
+ $search.on( 'keyup change', searchIcons );
64
 
65
  var renderStylesSelect = function ( init ) {
66
  var $familySelect = $is.find( 'select.siteorigin-widget-icon-family' );
base/inc/fields/js/icon-field.min.js CHANGED
@@ -1 +1 @@
1
- !function(i){var e={};i(document).on("sowsetupformfield",".siteorigin-widget-field-type-icon",(function(n){var t=i(this),o=t.find(".siteorigin-widget-icon-selector"),s=o.find(".siteorigin-widget-icon-icon"),a=t.find(".siteorigin-widget-icon-selector-current"),d=t.find(".so-icon-remove"),r=t.find(".siteorigin-widget-icon-search");if(!t.data("initialized")){a.on("click keyup",(function(i){("keyup"!=i.type||window.sowbForms.isEnter(i))&&(o.slideToggle(),r.val(""),c())})),d.on("click keyup",(function(i){i.preventDefault(),("keyup"!=i.type||window.sowbForms.isEnter(i))&&t.find(".siteorigin-widget-active").trigger("click")}));var c=function(){var e=r.val().toLowerCase();""===e?o.find(".siteorigin-widget-icon-icons-icon").show():o.find(".siteorigin-widget-icon-icons-icon").each((function(){var n=i(this),t=n.attr("data-value");-1===(t=t.replace(/-/," ")).indexOf(e)?n.hide():n.show()}))};r.keyup(c).on("change",c);var l=function(){var n=o.find("select.siteorigin-widget-icon-family").val(),t=o.find(".siteorigin-widget-icon-icons");if(void 0!==e[n]){t.empty();var r,l=e[n],g=l.icons;for(var f in l.hasOwnProperty("styles")&&l.styles&&(r=o.find(".siteorigin-widget-icon-family-styles").val()),0===i("#siteorigin-widget-font-"+n).length&&i("<link rel='stylesheet' type='text/css'>").attr("id","siteorigin-widget-font-"+n).attr("href",e[n].style_uri).appendTo("head"),g){var w=g[f],v=w.hasOwnProperty("unicode")?w.unicode:w;if(!w.hasOwnProperty("styles")||-1!==w.styles.indexOf(r)){var y="sow-icon-"+n+(r?" "+r:""),p=n+(r?"-"+r:"")+"-"+f,u=i('<div data-sow-icon="'+v+'"></div>').attr("data-value",p).addClass(y).addClass("siteorigin-widget-icon-icons-icon").on("click keyup",(function(e){if("keyup"!=e.type||window.sowbForms.isEnter(e)){var n=i(this);n.hasClass("siteorigin-widget-active")?(n.removeClass("siteorigin-widget-active"),s.val(""),a.find("span").hide(),d.hide()):(t.find(".siteorigin-widget-icon-icons-icon").removeClass("siteorigin-widget-active"),n.addClass("siteorigin-widget-active"),s.val(n.data("value")),a.find("span").show().attr("data-sow-icon",n.attr("data-sow-icon")).attr("class","").addClass(y),d.show()),s.trigger("change",{isRendering:!0}),o.slideUp()}}));t.append(u),s.val()===p&&(a.find("span").show().attr("data-sow-icon",u.attr("data-sow-icon")).attr("class","").addClass(y),u.addClass("siteorigin-widget-active"))}}t.prepend(t.find(".siteorigin-widget-active")),c()}},g=function(n){var t=o.find("select.siteorigin-widget-icon-family").val(),s=o.find("select.siteorigin-widget-icon-family option:selected").data("icons");if(null!==s&&(e[t]=s),void 0!==t&&""!==t)if(void 0===e[t]){var a=o.find(".siteorigin-widget-icon-icons");a.addClass("loading"),i.getJSON(soWidgets.ajaxurl,{action:"siteorigin_widgets_get_icons",family:o.find("select.siteorigin-widget-icon-family").val()},(function(s){e[t]=s,function(n){var t=o.find("select.siteorigin-widget-icon-family"),s=t.val();if(void 0!==e[s]){var a=o.find(".siteorigin-widget-icon-family-styles");if(!n){a.off("change",l),a.remove();var d=e[s];if(d.hasOwnProperty("styles")&&d.styles){var r="";for(var c in d.styles)r+='<option value="'+c+'">'+d.styles[c]+"</option>";r&&(a=i('<select class="siteorigin-widget-icon-family-styles"></select>').append(r),t.after(a))}}a.on("change",l)}}(n),a.removeClass("loading"),l()}))}else l()};g(!0),o.find("select.siteorigin-widget-icon-family").on("change",(function(){o.find(".siteorigin-widget-icon-icons").empty(),g()})),s.on("change",(function(i,e){e&&e.isRendering||l()})),t.data("initialized",!0)}}))}(jQuery);
1
+ !function(i){var e={};i(document).on("sowsetupformfield",".siteorigin-widget-field-type-icon",(function(n){var t=i(this),o=t.find(".siteorigin-widget-icon-selector"),s=o.find(".siteorigin-widget-icon-icon"),a=t.find(".siteorigin-widget-icon-selector-current"),d=t.find(".so-icon-remove"),r=t.find(".siteorigin-widget-icon-search");if(!t.data("initialized")){a.on("click keyup",(function(i){("keyup"!=i.type||window.sowbForms.isEnter(i))&&(o.slideToggle(),r.val(""),c())})),d.on("click keyup",(function(i){i.preventDefault(),("keyup"!=i.type||window.sowbForms.isEnter(i))&&t.find(".siteorigin-widget-active").trigger("click")}));var c=function(){var e=r.val().toLowerCase();""===e?o.find(".siteorigin-widget-icon-icons-icon").show():o.find(".siteorigin-widget-icon-icons-icon").each((function(){var n=i(this),t=n.attr("data-value");-1===(t=t.replace(/-/," ")).indexOf(e)?n.hide():n.show()}))};r.on("keyup change",c);var l=function(){var n=o.find("select.siteorigin-widget-icon-family").val(),t=o.find(".siteorigin-widget-icon-icons");if(void 0!==e[n]){t.empty();var r,l=e[n],g=l.icons;for(var f in l.hasOwnProperty("styles")&&l.styles&&(r=o.find(".siteorigin-widget-icon-family-styles").val()),0===i("#siteorigin-widget-font-"+n).length&&i("<link rel='stylesheet' type='text/css'>").attr("id","siteorigin-widget-font-"+n).attr("href",e[n].style_uri).appendTo("head"),g){var w=g[f],v=w.hasOwnProperty("unicode")?w.unicode:w;if(!w.hasOwnProperty("styles")||-1!==w.styles.indexOf(r)){var y="sow-icon-"+n+(r?" "+r:""),p=n+(r?"-"+r:"")+"-"+f,u=i('<div data-sow-icon="'+v+'"></div>').attr("data-value",p).addClass(y).addClass("siteorigin-widget-icon-icons-icon").on("click keyup",(function(e){if("keyup"!=e.type||window.sowbForms.isEnter(e)){var n=i(this);n.hasClass("siteorigin-widget-active")?(n.removeClass("siteorigin-widget-active"),s.val(""),a.find("span").hide(),d.hide()):(t.find(".siteorigin-widget-icon-icons-icon").removeClass("siteorigin-widget-active"),n.addClass("siteorigin-widget-active"),s.val(n.data("value")),a.find("span").show().attr("data-sow-icon",n.attr("data-sow-icon")).attr("class","").addClass(y),d.show()),s.trigger("change",{isRendering:!0}),o.slideUp()}}));t.append(u),s.val()===p&&(a.find("span").show().attr("data-sow-icon",u.attr("data-sow-icon")).attr("class","").addClass(y),u.addClass("siteorigin-widget-active"))}}t.prepend(t.find(".siteorigin-widget-active")),c()}},g=function(n){var t=o.find("select.siteorigin-widget-icon-family").val(),s=o.find("select.siteorigin-widget-icon-family option:selected").data("icons");if(null!==s&&(e[t]=s),void 0!==t&&""!==t)if(void 0===e[t]){var a=o.find(".siteorigin-widget-icon-icons");a.addClass("loading"),i.getJSON(soWidgets.ajaxurl,{action:"siteorigin_widgets_get_icons",family:o.find("select.siteorigin-widget-icon-family").val()},(function(s){e[t]=s,function(n){var t=o.find("select.siteorigin-widget-icon-family"),s=t.val();if(void 0!==e[s]){var a=o.find(".siteorigin-widget-icon-family-styles");if(!n){a.off("change",l),a.remove();var d=e[s];if(d.hasOwnProperty("styles")&&d.styles){var r="";for(var c in d.styles)r+='<option value="'+c+'">'+d.styles[c]+"</option>";r&&(a=i('<select class="siteorigin-widget-icon-family-styles"></select>').append(r),t.after(a))}}a.on("change",l)}}(n),a.removeClass("loading"),l()}))}else l()};g(!0),o.find("select.siteorigin-widget-icon-family").on("change",(function(){o.find(".siteorigin-widget-icon-icons").empty(),g()})),s.on("change",(function(i,e){e&&e.isRendering||l()})),t.data("initialized",!0)}}))}(jQuery);
lang/so-widgets-bundle.pot CHANGED
@@ -1485,32 +1485,32 @@ msgstr ""
1485
  msgid "Error validating your Captcha response."
1486
  msgstr ""
1487
 
1488
- #: widgets/contact/contact.php:1501
1489
  msgid "Unfortunately our system identified your message as spam."
1490
  msgstr ""
1491
 
1492
- #: widgets/contact/contact.php:1508
1493
  msgid "Error validating your Captcha response. Really Simple CAPTCHA missing."
1494
  msgstr ""
1495
 
1496
- #: widgets/contact/contact.php:1516
1497
  msgid "Error validating your Captcha response. Please try again."
1498
  msgstr ""
1499
 
1500
- #: widgets/contact/contact.php:1523, widgets/contact/contact.php:1531
1501
  msgid "Unfortunately, our system identified your message as spam."
1502
  msgstr ""
1503
 
1504
- #: widgets/contact/contact.php:1541
1505
  msgctxt "The name of who sent this email"
1506
  msgid "From"
1507
  msgstr ""
1508
 
1509
- #: widgets/contact/contact.php:1660
1510
  msgid "Add a form autoresponder and additional fields, including a date and time picker with %sSiteOrigin Premium%s"
1511
  msgstr ""
1512
 
1513
- #: widgets/contact/contact.php:1665
1514
  msgid "Use Google Fonts right inside the Contact Form Widget with %sSiteOrigin Premium%s"
1515
  msgstr ""
1516
 
1485
  msgid "Error validating your Captcha response."
1486
  msgstr ""
1487
 
1488
+ #: widgets/contact/contact.php:1503
1489
  msgid "Unfortunately our system identified your message as spam."
1490
  msgstr ""
1491
 
1492
+ #: widgets/contact/contact.php:1510
1493
  msgid "Error validating your Captcha response. Really Simple CAPTCHA missing."
1494
  msgstr ""
1495
 
1496
+ #: widgets/contact/contact.php:1518
1497
  msgid "Error validating your Captcha response. Please try again."
1498
  msgstr ""
1499
 
1500
+ #: widgets/contact/contact.php:1525, widgets/contact/contact.php:1533
1501
  msgid "Unfortunately, our system identified your message as spam."
1502
  msgstr ""
1503
 
1504
+ #: widgets/contact/contact.php:1543
1505
  msgctxt "The name of who sent this email"
1506
  msgid "From"
1507
  msgstr ""
1508
 
1509
+ #: widgets/contact/contact.php:1665
1510
  msgid "Add a form autoresponder and additional fields, including a date and time picker with %sSiteOrigin Premium%s"
1511
  msgstr ""
1512
 
1513
+ #: widgets/contact/contact.php:1670
1514
  msgid "Use Google Fonts right inside the Contact Form Widget with %sSiteOrigin Premium%s"
1515
  msgstr ""
1516
 
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.1
5
  Requires PHP: 5.6.20
6
- Stable tag: 1.44.0
7
- Build time: 2022-11-10T22:30:07+00:00
8
  License: GPLv3 or later
9
  Contributors: gpriday, braam-genis, alexgso
10
  Donate link: https://siteorigin.com/downloads/premium/
@@ -106,6 +106,12 @@ The Widgets Bundle global interface is available at Plugins > SiteOrigin Widgets
106
 
107
  == Changelog ==
108
 
 
 
 
 
 
 
109
  = 1.44.0 - 10 November 2022 =
110
  * Anything Carousel: Prevented potential loss of styling when looping items.
111
  * Google Maps: Prevented position reset from affecting the info window.
3
  Requires at least: 4.2
4
  Tested up to: 6.1
5
  Requires PHP: 5.6.20
6
+ Stable tag: 1.44.1
7
+ Build time: 2022-11-25T20:07:41+00:00
8
  License: GPLv3 or later
9
  Contributors: gpriday, braam-genis, alexgso
10
  Donate link: https://siteorigin.com/downloads/premium/
106
 
107
  == Changelog ==
108
 
109
+ = 1.44.1 - 25 November 2022 =
110
+ * Icon Field: Resolved jQuery Migrate flag.
111
+ * Contact Form: Resolved notice when Message field not used.
112
+ * Features: Resolved PHP 8 `Division by 0 Error` if `Features per row` not set.
113
+ * Simple Masonry: Changed to use pure CSS (`object-fit`) for sizing images.
114
+
115
  = 1.44.0 - 10 November 2022 =
116
  * Anything Carousel: Prevented potential loss of styling when looping items.
117
  * Google Maps: Prevented position reset from affecting the info window.
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.44.0
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.44.0' );
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.44.1
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.44.1' );
16
  define( 'SOW_BUNDLE_BASE_FILE', __FILE__ );
17
 
18
  // Allow JS suffix to be pre-set.
widgets/contact/contact.php CHANGED
@@ -1475,8 +1475,10 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
1475
  $comment = array();
1476
 
1477
  $message_text = array();
1478
- foreach ( $email_fields['message'] as $m ) {
1479
- $message_text[] = $m['value'];
 
 
1480
  }
1481
 
1482
  $comment['comment_content'] = $email_fields['subject'] . "\n\n" . implode( "\n\n", $message_text );
@@ -1557,11 +1559,14 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
1557
  }
1558
  $body .= "\n\n";
1559
  }
1560
- foreach ( $email_fields['message'] as $m ) {
1561
- $body .= '<strong>' . $m['label'] . ':</strong>';
1562
- $body .= "\n";
1563
- $body .= htmlspecialchars( $m['value'] );
1564
- $body .= "\n\n";
 
 
 
1565
  }
1566
  $body = wpautop( trim( $body ) );
1567
 
1475
  $comment = array();
1476
 
1477
  $message_text = array();
1478
+ if ( ! empty( $email_fields['message'] ) ) {
1479
+ foreach ( $email_fields['message'] as $m ) {
1480
+ $message_text[] = $m['value'];
1481
+ }
1482
  }
1483
 
1484
  $comment['comment_content'] = $email_fields['subject'] . "\n\n" . implode( "\n\n", $message_text );
1559
  }
1560
  $body .= "\n\n";
1561
  }
1562
+
1563
+ if ( ! empty( $email_fields['message'] ) ) {
1564
+ foreach ( $email_fields['message'] as $m ) {
1565
+ $body .= '<strong>' . $m['label'] . ':</strong>';
1566
+ $body .= "\n";
1567
+ $body .= htmlspecialchars( $m['value'] );
1568
+ $body .= "\n\n";
1569
+ }
1570
  }
1571
  $body = wpautop( trim( $body ) );
1572
 
widgets/features/tpl/default.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
 
2
  if ( ! empty( $instance['features'] ) ) {
3
- $last_row = floor( ( count( $instance['features'] ) - 1 ) / $instance['per_row'] );
4
  }
5
  ?>
6
 
@@ -19,8 +20,8 @@ if ( ! empty( $instance['features'] ) ) {
19
  );
20
  ?>
21
  <div
22
- class="sow-features-feature sow-icon-container-position-<?php echo esc_attr( $feature['container_position'] ); ?> <?php if ( floor( $i / $instance['per_row'] ) == $last_row ) echo 'sow-features-feature-last-row'; ?>"
23
- style="display: flex; flex-direction: <?php echo $this->get_feature_flex_direction( $feature['container_position'], ! empty( $instance['more_text_bottom_align'] ) ); ?>; float: left; width: <?php echo round( 100 / $instance['per_row'], 3 ); ?>%;"
24
  >
25
  <?php if ( $right_left_read_more ) : ?>
26
  <div class="sow-features-feature-right-left-container" style="display: flex; flex-direction: inherit;">
1
  <?php
2
+ $per_row = ! empty( $instance['per_row'] ) ? $instance['per_row'] : 3;
3
  if ( ! empty( $instance['features'] ) ) {
4
+ $last_row = floor( ( count( $instance['features'] ) - 1 ) / $per_row );
5
  }
6
  ?>
7
 
20
  );
21
  ?>
22
  <div
23
+ class="sow-features-feature sow-icon-container-position-<?php echo esc_attr( $feature['container_position'] ); ?> <?php if ( floor( $i / $per_row ) == $last_row ) echo 'sow-features-feature-last-row'; ?>"
24
+ style="display: flex; flex-direction: <?php echo $this->get_feature_flex_direction( $feature['container_position'], ! empty( $instance['more_text_bottom_align'] ) ); ?>; float: left; width: <?php echo round( 100 / $per_row, 3 ); ?>%;"
25
  >
26
  <?php if ( $right_left_read_more ) : ?>
27
  <div class="sow-features-feature-right-left-container" style="display: flex; flex-direction: inherit;">
widgets/simple-masonry/js/simple-masonry.js CHANGED
@@ -53,25 +53,7 @@ jQuery( function ( $ ) {
53
  }
54
  }
55
 
56
- var imgAR = $img.height() > 0 ? $img.width() / $img.height() : 1;
57
- var itemAR = $$.height() > 0 ? $$.width() / $$.height() : 1;
58
- imgAR = parseFloat( imgAR.toFixed( 3 ) );
59
- itemAR = parseFloat( itemAR.toFixed( 3 ) );
60
- if ( imgAR > itemAR ) {
61
- $img.css( 'width', 'auto' );
62
- if ( ! heightSet ) {
63
- $img.css( 'height', '100%' );
64
- }
65
- $img.css( 'margin-top', '' );
66
- var marginLeft = ( $img.width() - $$.width() ) * -0.5;
67
- $img.css( 'margin-left', marginLeft + 'px' );
68
- } else {
69
- $img.css( 'height', 'auto' );
70
- $img.css( 'width', '100%' );
71
- $img.css( 'margin-left', '' );
72
- var marginTop = ( $img.height() - $$.height() ) * -0.5;
73
- $img.css( 'margin-top', marginTop + 'px' );
74
- }
75
  } );
76
 
77
  $gridEl.packery( {
53
  }
54
  }
55
 
56
+ $img.css( 'height', heightSet ? $$.height() - title_height : $$.height() + 'px' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  } );
58
 
59
  $gridEl.packery( {
widgets/simple-masonry/js/simple-masonry.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery((function(t){sowb.setupSimpleMasonries=function(){var i=t(".sow-masonry-grid");if(i.data("initialized"))return i;var a=function(){i.each((function(){var a=t(this),e=a.data("layouts"),s=window.matchMedia("(max-width: "+e.tablet.breakPoint+"px)"),o=window.matchMedia("(max-width: "+e.mobile.breakPoint+"px)"),n=e.desktop;o.matches?n=e.mobile:s.matches&&(n=e.tablet);var r=n.numColumns;a.css("width","auto");var h=n.gutter*(r-1),d=(a.width()-h)/r;a.width(d*r+h),a.imagesLoaded((function(){a.find("> .sow-masonry-grid-item").each((function(){var i=t(this),a=i.data("colSpan");a=Math.max(Math.min(a,n.numColumns),1),i.width(d*a+n.gutter*(a-1));var e=i.data("rowSpan");e=Math.max(Math.min(e,n.numColumns),1);var s=n.rowHeight||d;i.css("height",s*e+n.gutter*(e-1)+"px");var o=i.find("> img,> a > img"),r=!1;if(i.find(".image-title")){var h=parseInt(i.find(".image-title").outerHeight());isNaN(h)||(s+=h,i.find(".sow-masonry-grid-image").css("height","calc( 100% - "+h+"px)"),r=!0)}var m=o.height()>0?o.width()/o.height():1,w=i.height()>0?i.width()/i.height():1;if((m=parseFloat(m.toFixed(3)))>(w=parseFloat(w.toFixed(3)))){o.css("width","auto"),r||o.css("height","100%"),o.css("margin-top","");var g=-.5*(o.width()-i.width());o.css("margin-left",g+"px")}else{o.css("height","auto"),o.css("width","100%"),o.css("margin-left","");var c=-.5*(o.height()-i.height());o.css("margin-top",c+"px")}})),a.packery({itemSelector:".sow-masonry-grid-item",columnWidth:d,gutter:n.gutter,originLeft:a.data("layout-origin-left")}),i.prev(".sow-masonry-grid-preloader").length&&(i.prev().remove(),i.css("opacity",1))}))}))};t(window).on("resize panelsStretchRows",a),setTimeout((function(){a()}),100),i.data("initialized",!0)},sowb.setupSimpleMasonries(),t(sowb).on("setup_widgets",sowb.setupSimpleMasonries)})),window.sowb=sowb;
1
+ var sowb=window.sowb||{};jQuery((function(t){sowb.setupSimpleMasonries=function(){var i=t(".sow-masonry-grid");if(i.data("initialized"))return i;var a=function(){i.each((function(){var a=t(this),e=a.data("layouts"),o=window.matchMedia("(max-width: "+e.tablet.breakPoint+"px)"),n=window.matchMedia("(max-width: "+e.mobile.breakPoint+"px)"),s=e.desktop;n.matches?s=e.mobile:o.matches&&(s=e.tablet);var r=s.numColumns;a.css("width","auto");var m=s.gutter*(r-1),d=(a.width()-m)/r;a.width(d*r+m),a.imagesLoaded((function(){a.find("> .sow-masonry-grid-item").each((function(){var i=t(this),a=i.data("colSpan");a=Math.max(Math.min(a,s.numColumns),1),i.width(d*a+s.gutter*(a-1));var e=i.data("rowSpan");e=Math.max(Math.min(e,s.numColumns),1);var o=s.rowHeight||d;i.css("height",o*e+s.gutter*(e-1)+"px");var n=i.find("> img,> a > img"),r=!1;if(i.find(".image-title")){var m=parseInt(i.find(".image-title").outerHeight());isNaN(m)||(o+=m,i.find(".sow-masonry-grid-image").css("height","calc( 100% - "+m+"px)"),r=!0)}n.css("height",r?i.height()-m:i.height()+"px")})),a.packery({itemSelector:".sow-masonry-grid-item",columnWidth:d,gutter:s.gutter,originLeft:a.data("layout-origin-left")}),i.prev(".sow-masonry-grid-preloader").length&&(i.prev().remove(),i.css("opacity",1))}))}))};t(window).on("resize panelsStretchRows",a),setTimeout((function(){a()}),100),i.data("initialized",!0)},sowb.setupSimpleMasonries(),t(sowb).on("setup_widgets",sowb.setupSimpleMasonries)})),window.sowb=sowb;
widgets/simple-masonry/styles/default.less CHANGED
@@ -15,6 +15,8 @@
15
  img {
16
  display: block;
17
  max-width: inherit;
 
 
18
  }
19
 
20
  .image-title {
15
  img {
16
  display: block;
17
  max-width: inherit;
18
+ object-fit: cover;
19
+ width: 100%;
20
  }
21
 
22
  .image-title {