SiteOrigin Widgets Bundle - Version 1.38.1

Version Description

  • 20 July 2022 =
  • Contact Form: Resolved a notice if Name and Message fields aren't included.
  • Post Carousel: Improved partially visible posts navigation.
  • Social Media Buttons: Resolved Email network dissociation on edit and save.
Download this release

Release Info

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

Code changes from version 1.38.0 to 1.38.1

js/carousel.js CHANGED
@@ -119,6 +119,7 @@ jQuery( function ( $ ) {
119
  numItems = $items.find( '.sow-carousel-item' ).length,
120
  complete = numItems >= $$.data( 'item_count' ),
121
  numVisibleItems = Math.ceil( $items.outerWidth() / $items.find( '.sow-carousel-item' ).outerWidth( true ) ),
 
122
  slidesToScroll = $items.slick( 'slickGetOption', 'slidesToScroll' ),
123
  lastPosition = numItems - numVisibleItems,
124
  loading = false;
@@ -162,12 +163,19 @@ jQuery( function ( $ ) {
162
  if ( $$.data( 'carousel_settings' ).loop ) {
163
  $items.slick( 'slickGoTo', 0 );
164
  }
165
- // Check if the number of slides to scroll exceeds lastPosition, go to the last slide.
 
 
 
 
 
 
166
  } else if ( $items.slick( 'slickCurrentSlide' ) + slidesToScroll > lastPosition ) {
167
  $items.setSlideTo( lastPosition );
168
  } else {
169
  $items.slick( 'slickNext' );
170
  }
 
171
  } else if ( $( this ).hasClass( 'sow-carousel-previous' ) ) {
172
  if ( $$.data( 'carousel_settings' ).loop && $items.slick( 'slickCurrentSlide' ) == 0 ) {
173
  $items.slick( 'slickGoTo', lastPosition );
@@ -292,7 +300,7 @@ jQuery( function ( $ ) {
292
  $( '.sow-carousel-wrapper' ).each( function() {
293
  var currentCarousel = $( this ),
294
  $items = currentCarousel.find( '.sow-carousel-items.slick-initialized' ),
295
- numVisibleItems = Math.ceil( $items.outerWidth() / $items.find( '.sow-carousel-item' ).outerWidth( true ) ),
296
  navigation = currentCarousel.parent().parent().find( '.sow-carousel-navigation' );
297
 
298
  if ( numVisibleItems >= currentCarousel.data( 'item_count' ) ) {
119
  numItems = $items.find( '.sow-carousel-item' ).length,
120
  complete = numItems >= $$.data( 'item_count' ),
121
  numVisibleItems = Math.ceil( $items.outerWidth() / $items.find( '.sow-carousel-item' ).outerWidth( true ) ),
122
+ numVisibleItemsFloor = Math.floor( $items.outerWidth() / $items.find( '.sow-carousel-item' ).outerWidth( true ) ),
123
  slidesToScroll = $items.slick( 'slickGetOption', 'slidesToScroll' ),
124
  lastPosition = numItems - numVisibleItems,
125
  loading = false;
163
  if ( $$.data( 'carousel_settings' ).loop ) {
164
  $items.slick( 'slickGoTo', 0 );
165
  }
166
+ // If the total number of slides is higher than the number of visible items, go to the last item.
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 );
171
+ $items.slick( 'slickNext' );
172
+ // Check if the number of slides to scroll exceeds lastPosition, go to the last slide, or
173
  } else if ( $items.slick( 'slickCurrentSlide' ) + slidesToScroll > lastPosition ) {
174
  $items.setSlideTo( lastPosition );
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 );
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' ) ) {
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"),n=Math.ceil(l.outerWidth()/l.find(".sow-carousel-item").outerWidth(!0)),r=l.slick("slickGetOption","slidesToScroll"),d=a-n,u=!1;"post"==s.data("widget")&&"undefined"!=s.data("carousel_settings").theme&&c&&d++,c||(l.slick("slickCurrentSlide")+n>=a-1||l.slick("slickCurrentSlide")+r>d)&&(i(sowb).trigger("carousel_load_new_items",[s,l,t]),u=!0),i(this).hasClass("sow-carousel-next")&&!u?c&&l.slick("slickCurrentSlide")>=d?s.data("carousel_settings").loop&&l.slick("slickGoTo",0):l.slick("slickCurrentSlide")+r>d?l.setSlideTo(d):l.slick("slickNext"):i(this).hasClass("sow-carousel-previous")&&(s.data("carousel_settings").loop&&0==l.slick("slickCurrentSlide")?l.slick("slickGoTo",d):!s.data("carousel_settings").loop&&l.slick("slickCurrentSlide")<=r?l.slick("slickGoTo",1):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")/r)).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=Math.ceil(e.outerWidth()/e.find(".sow-carousel-item").outerWidth(!0)),o=s.parent().parent().find(".sow-carousel-navigation");t>=s.data("item_count")?(o.hide(),e.slick("slickSetOption","touchMove",!1),e.slick("slickSetOption","draggable",!1)):o.not(":visible")&&(o.show(),e.slick("slickSetOption","touchMove",!0),e.slick("slickSetOption","draggable",!0));var l=s.data("responsive");window.matchMedia("(min-width: "+l.tablet_portrait_breakpoint+"px) and (max-width: "+l.tablet_landscape_breakpoint+"px) and (orientation: landscape)").matches&&(e.slick("slickSetOption","slidesToShow",l.tablet_landscape_slides_to_show),e.slick("slickSetOption","slidesToScroll",l.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;
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"),n=Math.ceil(l.outerWidth()/l.find(".sow-carousel-item").outerWidth(!0)),r=Math.floor(l.outerWidth()/l.find(".sow-carousel-item").outerWidth(!0)),d=l.slick("slickGetOption","slidesToScroll"),k=a-n,u=!1;"post"==s.data("widget")&&"undefined"!=s.data("carousel_settings").theme&&c&&k++,c||(l.slick("slickCurrentSlide")+n>=a-1||l.slick("slickCurrentSlide")+d>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):d>=r?(l.slick("slickSetOption","slidesToShow",r),l.slick("slickSetOption","slidesToScroll",r),l.slick("slickNext")):l.slick("slickCurrentSlide")+d>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):!s.data("carousel_settings").loop&&l.slick("slickCurrentSlide")<=d?l.slick("slickGoTo",1):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")/d)).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=Math.floor(e.outerWidth()/e.find(".sow-carousel-item").outerWidth(!0)),o=s.parent().parent().find(".sow-carousel-navigation");t>=s.data("item_count")?(o.hide(),e.slick("slickSetOption","touchMove",!1),e.slick("slickSetOption","draggable",!1)):o.not(":visible")&&(o.show(),e.slick("slickSetOption","touchMove",!0),e.slick("slickSetOption","draggable",!0));var l=s.data("responsive");window.matchMedia("(min-width: "+l.tablet_portrait_breakpoint+"px) and (max-width: "+l.tablet_landscape_breakpoint+"px) and (orientation: landscape)").matches&&(e.slick("slickSetOption","slidesToShow",l.tablet_landscape_slides_to_show),e.slick("slickSetOption","slidesToScroll",l.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
@@ -1208,16 +1208,16 @@ msgstr ""
1208
  msgid "Error validating your Captcha response. Please try again."
1209
  msgstr ""
1210
 
1211
- #: widgets/contact/contact.php:1465
1212
  msgctxt "The name of who sent this email"
1213
  msgid "From"
1214
  msgstr ""
1215
 
1216
- #: widgets/contact/contact.php:1570
1217
  msgid "Add a form autoresponder and additional fields, including a date and time picker with %sSiteOrigin Premium%s"
1218
  msgstr ""
1219
 
1220
- #: widgets/contact/contact.php:1575
1221
  msgid "Use Google Fonts right inside the Contact Form Widget with %sSiteOrigin Premium%s"
1222
  msgstr ""
1223
 
1208
  msgid "Error validating your Captcha response. Please try again."
1209
  msgstr ""
1210
 
1211
+ #: widgets/contact/contact.php:1467
1212
  msgctxt "The name of who sent this email"
1213
  msgid "From"
1214
  msgstr ""
1215
 
1216
+ #: widgets/contact/contact.php:1589
1217
  msgid "Add a form autoresponder and additional fields, including a date and time picker with %sSiteOrigin Premium%s"
1218
  msgstr ""
1219
 
1220
+ #: widgets/contact/contact.php:1594
1221
  msgid "Use Google Fonts right inside the Contact Form Widget with %sSiteOrigin Premium%s"
1222
  msgstr ""
1223
 
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.0
7
- Build time: 2022-07-14T21:03:51+02:00
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.0 - 14 July 2022 =
109
  * Anything Carousel: Added `Adaptive Height` setting.
110
  * Hero: Prevented padding reset on mobile if mobile values are empty.
3
  Requires at least: 4.2
4
  Tested up to: 6.0
5
  Requires PHP: 5.6.20
6
+ Stable tag: 1.38.1
7
+ Build time: 2022-07-20T19:42:49+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.1 - 20 July 2022 =
109
+ * Contact Form: Resolved a notice if Name and Message fields aren't included.
110
+ * Post Carousel: Improved partially visible posts navigation.
111
+ * Social Media Buttons: Resolved Email network dissociation on edit and save.
112
+
113
  = 1.38.0 - 14 July 2022 =
114
  * Anything Carousel: Added `Adaptive Height` setting.
115
  * Hero: Prevented padding reset on mobile if mobile values are empty.
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.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.38.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.38.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.38.1' );
16
  define( 'SOW_BUNDLE_BASE_FILE', __FILE__ );
17
 
18
  // Allow JS suffix to be pre-set.
widgets/contact/contact.php CHANGED
@@ -1462,17 +1462,36 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
1462
  }
1463
 
1464
  function send_mail( $email_fields, $instance ) {
1465
- $body = '<strong>' . _x( 'From', 'The name of who sent this email', 'so-widgets-bundle' ) . ':</strong> ' .
1466
- '<a href="mailto:' . sanitize_email( $email_fields['email'] ) . '">' . esc_html( $email_fields['name'] ) . '</a> ' .
1467
- '&#60;' . sanitize_email( $email_fields['email'] ) . '&#62; ' .
1468
- ( ! empty( $instance['settings']['log_ip_address'] ) ? '( ' . $_SERVER['REMOTE_ADDR'] . ' )' : '' ) .
1469
- "\n\n";
1470
- foreach ( $email_fields['message'] as $m ) {
1471
- $body .= '<strong>' . $m['label'] . ':</strong>';
1472
- $body .= "\n";
1473
- $body .= htmlspecialchars( $m['value'] );
 
 
 
 
 
 
 
 
 
 
1474
  $body .= "\n\n";
1475
  }
 
 
 
 
 
 
 
 
 
1476
  $body = wpautop( trim( $body ) );
1477
 
1478
  if ( $this->is_dev_email($instance['settings']['to']) || empty( $instance['settings']['to'] ) ) {
@@ -1491,8 +1510,8 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
1491
 
1492
  $headers = array(
1493
  'Content-Type: text/html; charset=UTF-8',
1494
- 'From: ' . $this->sanitize_header( $email_fields['name'] ) . ' <' . sanitize_email( $instance['settings']['from'] ) . '>',
1495
- 'Reply-To: ' . $this->sanitize_header( $email_fields['name'] ) . ' <' . sanitize_email( $email_fields['email'] ) . '>',
1496
  );
1497
 
1498
  // Check if this is a duplicated send
1462
  }
1463
 
1464
  function send_mail( $email_fields, $instance ) {
1465
+ if ( ! empty( $email_fields['name'] ) || ! empty( $email_fields['email'] ) ) {
1466
+
1467
+ $body = '<strong>' . _x( 'From', 'The name of who sent this email', 'so-widgets-bundle' ) . ':</strong> ';
1468
+
1469
+ if ( ! empty( $email_fields['email'] ) ) {
1470
+ $body .= '<a href="mailto:' . sanitize_email( $email_fields['email'] ) . '">';
1471
+ }
1472
+
1473
+ if ( ! empty( $email_fields['name'] ) ) {
1474
+ $body .= esc_html( $email_fields['name'] ) . ' ';
1475
+ }
1476
+
1477
+ if ( ! empty( $email_fields['email'] ) ) {
1478
+ $body .= '&#60;' . sanitize_email( $email_fields['email'] ) . '&#62; </a> ';
1479
+ }
1480
+
1481
+ if ( ! empty( $instance['settings']['log_ip_address'] ) ) {
1482
+ $body .= '( ' . $_SERVER['REMOTE_ADDR'] . ' )';
1483
+ }
1484
  $body .= "\n\n";
1485
  }
1486
+
1487
+ if ( ! empty( $email_fields['message'] ) ) {
1488
+ foreach ( $email_fields['message'] as $m ) {
1489
+ $body .= '<strong>' . $m['label'] . ':</strong>';
1490
+ $body .= "\n";
1491
+ $body .= htmlspecialchars( $m['value'] );
1492
+ $body .= "\n\n";
1493
+ }
1494
+ }
1495
  $body = wpautop( trim( $body ) );
1496
 
1497
  if ( $this->is_dev_email($instance['settings']['to']) || empty( $instance['settings']['to'] ) ) {
1510
 
1511
  $headers = array(
1512
  'Content-Type: text/html; charset=UTF-8',
1513
+ 'From: ' . ( ! empty( $email_fields['name'] ) ? $this->sanitize_header( $email_fields['name'] ) : '' ) . ' <' . sanitize_email( $instance['settings']['from'] ) . '>',
1514
+ 'Reply-To: ' . ( ! empty( $email_fields['name'] ) ? $this->sanitize_header( $email_fields['name'] ) : '' ) . ' <' . sanitize_email( $email_fields['email'] ) . '>',
1515
  );
1516
 
1517
  // Check if this is a duplicated send
widgets/social-media-buttons/data/networks.php CHANGED
@@ -19,7 +19,7 @@ return array(
19
  'icon_color' => '#FFFFFF',
20
  'button_color' => '#FAA21B'
21
  ),
22
- 'email' => array(
23
  'label' => __( 'Email', 'so-widgets-bundle' ),
24
  'base_url' => 'mailto:',
25
  'icon_color' => '#FFFFFF',
19
  'icon_color' => '#FFFFFF',
20
  'button_color' => '#FAA21B'
21
  ),
22
+ 'envelope' => array(
23
  'label' => __( 'Email', 'so-widgets-bundle' ),
24
  'base_url' => 'mailto:',
25
  'icon_color' => '#FFFFFF',