SiteOrigin Widgets Bundle - Version 1.21.0

Version Description

  • 24 June 2021 =
  • Google Maps: Prevented a jump on load when Info Windows is set to always display.
  • Google Fonts: Ensured all weights and styles are imported.
  • Headline: Changed default heading to h2.
  • Hero: Removed the button alignment setting, alignment is handled directly within each slide frame.
  • Image: Added a Link title to URL setting.
  • Image Grid: Added Image vertical alignment and Grid horizontal alignment settings.
  • Post Selector: Added an option to adjust the taxonomy relationship.
  • Sliders: Prevented potential PHP 8 error with overlay attribute filter.
  • Developer: Added an optional title to the multiple media form field.
  • Developer: Improved multiple media non-image support.
  • Developer: Added an optional image_dimensions parameter for the multiple media field.
  • Developer: Added a repeater increment label option.
Download this release

Release Info

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

Code changes from version 1.20.0 to 1.21.0

admin/admin.js CHANGED
@@ -72,6 +72,8 @@ jQuery( function( $ ){
72
  }
73
  } );
74
  }
 
 
75
  };
76
  $('#sow-widget-search input').on( {
77
  keyup: widgetSearch,
@@ -79,13 +81,29 @@ jQuery( function( $ ){
79
  });
80
 
81
  $( window ).on( 'resize', function() {
82
- var $descriptions = $('.so-widget-text').css('height', 'auto');
83
  var largestHeight = 0;
84
  var largestHeight = [];
85
  var column = 0;
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  $descriptions.each( function( index ) {
88
- column = index / 3;
89
  // Turnicate column number - IE 11 friendly.
90
  column = column < 0 ? Math.ceil( column ) : Math.floor( column );
91
  $( this ).data( 'column', column )
72
  }
73
  } );
74
  }
75
+
76
+ $( window ).trigger( 'resize' );
77
  };
78
  $('#sow-widget-search input').on( {
79
  keyup: widgetSearch,
81
  });
82
 
83
  $( window ).on( 'resize', function() {
84
+ var $descriptions = $( '.so-widget-text:visible' );
85
  var largestHeight = 0;
86
  var largestHeight = [];
87
  var column = 0;
88
 
89
+ $descriptions.css( 'height', 'auto' );
90
+
91
+ // Don't size text descriptions on tablet portrait and mobile devices.
92
+ if ( window.matchMedia( '(max-width: 960px)' ).matches ) {
93
+ return;
94
+ }
95
+
96
+ // Work out how many columns are visible per row.
97
+ if ( window.matchMedia( '(min-width: 1800px)' ).matches ) {
98
+ columnCount = 4;
99
+ } else if ( window.matchMedia( '(max-width: 1280px)' ).matches ) {
100
+ columnCount = 2;
101
+ } else {
102
+ columnCount = 3;
103
+ }
104
+
105
  $descriptions.each( function( index ) {
106
+ column = index / columnCount;
107
  // Turnicate column number - IE 11 friendly.
108
  column = column < 0 ? Math.ceil( column ) : Math.floor( column );
109
  $( this ).data( 'column', column )
admin/admin.min.js CHANGED
@@ -1 +1 @@
1
- jQuery((function(i){i(".so-widget-toggle-active button").on("click",(function(){var t=i(this),e=t.data("status"),s=t.closest(".so-widget");e?s.addClass("so-widget-is-active").removeClass("so-widget-is-inactive"):s.removeClass("so-widget-is-active").addClass("so-widget-is-inactive"),i.post(soWidgetsAdmin.toggleUrl,{widget:s.data("id"),active:e},(function(i){}))})),i(".so-widget-banner").each((function(){var t=i(this),e=t.find("img");if(e.length)e.width()>128&&e.css("margin-left",-(e.width()-128)/2+"px");else{var s=Trianglify({width:128,height:128,variance:1,cell_size:32,seed:t.data("seed")});t.append(s.svg())}}));var t=function(){var t=i(this).val().toLowerCase();""===t?i(".so-widget-wrap").show():i(".so-widget").each((function(){var e=i(this);e.find("h3").html().toLowerCase().indexOf(t)>-1?e.parent().show():e.parent().hide()}))};i("#sow-widget-search input").on({keyup:t,search:t}),i(window).on("resize",(function(){var t=i(".so-widget-text").css("height","auto"),e=0,s=(e=[],0);t.each((function(t){s=(s=t/3)<0?Math.ceil(s):Math.floor(s),i(this).data("column",s),e[s]=Math.max(void 0===e[s]?0:e[s],i(this).height())})),t.each((function(){i(this).css("height",e[i(this).data("column")]+"px")}))})).trigger("resize"),i("#sow-widgets-page .page-nav a").on("click",(function(t){t.preventDefault();var e=i(this),s=e.attr("href"),o=e.closest("li");switch(i("#sow-widgets-page .page-nav li").not(o).removeClass("active"),o.addClass("active"),s){case"#all":i(".so-widget-wrap").show();break;case"#enabled":i(".so-widget-wrap").hide(),i(".so-widget-wrap .so-widget-is-active").each((function(){i(this).closest(".so-widget-wrap").show()})),i(".so-widget-wrap .so-widget-is-inactive").each((function(){i(this).closest(".so-widget-wrap").hide()}));break;case"#disabled":i(".so-widget-wrap .so-widget-is-active").each((function(){i(this).closest(".so-widget-wrap").hide()})),i(".so-widget-wrap .so-widget-is-inactive").each((function(){i(this).closest(".so-widget-wrap").show()}))}i(window).trigger("resize")})),i("#widgets-list").addClass("so-animated");var e=i("#sow-settings-dialog");if(i("#widgets-list .so-widget-settings").on("click",(function(t){var s=i(this);t.preventDefault(),$content=e.find(".so-content"),$content.empty().addClass("so-loading"),i.get(s.data("form-url"),(function(i){$content.html(i).removeClass("so-loading")})),e.show(),i("#sow-settings-dialog .so-close").trigger("focus"),i(window).one("keyup",(function(i){27===i.which&&e.hide()}))})),e.find(".so-close").on("click keyup",(function(i){("keyup"!=i.type||window.sowbForms.isEnter(i))&&(i.preventDefault(),e.hide())})),e.find(".so-save").on("click",(function(t){t.preventDefault();var s=i(this);s.prop("disabled",!0),e.find("form").on("submit",(function(){s.prop("disabled",!1),e.hide()})).trigger("submit")})),i("#so-widget-settings-save").on("load",(function(){i("#widgets-list .so-widget-settings").prop("disabled",!1)})),window.location.hash&&"#settings-"===window.location.hash.substring(0,10)){var s=window.location.hash.substring(10);i('div[data-id="'+s+'"] button.so-widget-settings').trigger("click")}}));
1
+ jQuery((function(i){i(".so-widget-toggle-active button").on("click",(function(){var t=i(this),e=t.data("status"),s=t.closest(".so-widget");e?s.addClass("so-widget-is-active").removeClass("so-widget-is-inactive"):s.removeClass("so-widget-is-active").addClass("so-widget-is-inactive"),i.post(soWidgetsAdmin.toggleUrl,{widget:s.data("id"),active:e},(function(i){}))})),i(".so-widget-banner").each((function(){var t=i(this),e=t.find("img");if(e.length)e.width()>128&&e.css("margin-left",-(e.width()-128)/2+"px");else{var s=Trianglify({width:128,height:128,variance:1,cell_size:32,seed:t.data("seed")});t.append(s.svg())}}));var t=function(){var t=i(this).val().toLowerCase();""===t?i(".so-widget-wrap").show():i(".so-widget").each((function(){var e=i(this);e.find("h3").html().toLowerCase().indexOf(t)>-1?e.parent().show():e.parent().hide()})),i(window).trigger("resize")};i("#sow-widget-search input").on({keyup:t,search:t}),i(window).on("resize",(function(){var t=i(".so-widget-text:visible"),e=0,s=(e=[],0);t.css("height","auto"),window.matchMedia("(max-width: 960px)").matches||(window.matchMedia("(min-width: 1800px)").matches?columnCount=4:window.matchMedia("(max-width: 1280px)").matches?columnCount=2:columnCount=3,t.each((function(t){s=(s=t/columnCount)<0?Math.ceil(s):Math.floor(s),i(this).data("column",s),e[s]=Math.max(void 0===e[s]?0:e[s],i(this).height())})),t.each((function(){i(this).css("height",e[i(this).data("column")]+"px")})))})).trigger("resize"),i("#sow-widgets-page .page-nav a").on("click",(function(t){t.preventDefault();var e=i(this),s=e.attr("href"),o=e.closest("li");switch(i("#sow-widgets-page .page-nav li").not(o).removeClass("active"),o.addClass("active"),s){case"#all":i(".so-widget-wrap").show();break;case"#enabled":i(".so-widget-wrap").hide(),i(".so-widget-wrap .so-widget-is-active").each((function(){i(this).closest(".so-widget-wrap").show()})),i(".so-widget-wrap .so-widget-is-inactive").each((function(){i(this).closest(".so-widget-wrap").hide()}));break;case"#disabled":i(".so-widget-wrap .so-widget-is-active").each((function(){i(this).closest(".so-widget-wrap").hide()})),i(".so-widget-wrap .so-widget-is-inactive").each((function(){i(this).closest(".so-widget-wrap").show()}))}i(window).trigger("resize")})),i("#widgets-list").addClass("so-animated");var e=i("#sow-settings-dialog");if(i("#widgets-list .so-widget-settings").on("click",(function(t){var s=i(this);t.preventDefault(),$content=e.find(".so-content"),$content.empty().addClass("so-loading"),i.get(s.data("form-url"),(function(i){$content.html(i).removeClass("so-loading")})),e.show(),i("#sow-settings-dialog .so-close").trigger("focus"),i(window).one("keyup",(function(i){27===i.which&&e.hide()}))})),e.find(".so-close").on("click keyup",(function(i){("keyup"!=i.type||window.sowbForms.isEnter(i))&&(i.preventDefault(),e.hide())})),e.find(".so-save").on("click",(function(t){t.preventDefault();var s=i(this);s.prop("disabled",!0),e.find("form").on("submit",(function(){s.prop("disabled",!1),e.hide()})).trigger("submit")})),i("#so-widget-settings-save").on("load",(function(){i("#widgets-list .so-widget-settings").prop("disabled",!1)})),window.location.hash&&"#settings-"===window.location.hash.substring(0,10)){var s=window.location.hash.substring(10);i('div[data-id="'+s+'"] button.so-widget-settings').trigger("click")}}));
base/base.php CHANGED
@@ -120,6 +120,7 @@ function siteorigin_widget_get_icon($icon_value, $icon_styles = false, $title =
120
  *
121
  * @return array
122
  */
 
123
  function siteorigin_widget_get_font($font_value) {
124
 
125
  $web_safe = array(
@@ -134,8 +135,9 @@ function siteorigin_widget_get_font($font_value) {
134
  $font = array();
135
  if ( isset( $web_safe[ $font_value ] ) ) {
136
  $font['family'] = $web_safe[ $font_value ];
137
- }
138
- else if( siteorigin_widgets_is_google_webfont( $font_value ) ) {
 
139
  $font_parts = explode( ':', $font_value );
140
  $font['family'] = $font_parts[0];
141
  $font_url_param = urlencode( $font_parts[0] );
@@ -148,12 +150,27 @@ function siteorigin_widget_get_font($font_value) {
148
  $font['url'] = 'https://fonts.googleapis.com/css?family=' . $font_url_param;
149
  $style_name = 'sow-google-font-' . strtolower( $font['family'] );
150
 
 
 
 
 
 
 
 
 
 
151
  // Check if WB (or something else has) has already enqueued the font.
152
  if ( ! wp_style_is( $style_name ) ) {
153
  wp_enqueue_style( $style_name, $font['url'] . '&display=swap' );
 
 
 
 
 
 
 
154
  }
155
- }
156
- else {
157
  $font['family'] = $font_value;
158
  $font = apply_filters( 'siteorigin_widget_get_custom_font_family', $font );
159
  }
@@ -273,7 +290,7 @@ function siteorigin_widgets_font_families( ){
273
  if ( $variant == 'regular' || $variant == 400 ) {
274
  $font_families[ $font ] = $font;
275
  } else {
276
- $label_variant = is_numeric( $variant ) && $variant != 'italic'? $variant : filter_var( $variant, FILTER_SANITIZE_NUMBER_INT ) . ' italic';
277
  $font_families[ $font . ':' . $variant ] = $font . ' (' . $label_variant . ')';
278
  }
279
  }
120
  *
121
  * @return array
122
  */
123
+ $sow_registered_fonts = array();
124
  function siteorigin_widget_get_font($font_value) {
125
 
126
  $web_safe = array(
135
  $font = array();
136
  if ( isset( $web_safe[ $font_value ] ) ) {
137
  $font['family'] = $web_safe[ $font_value ];
138
+ } elseif ( siteorigin_widgets_is_google_webfont( $font_value ) ) {
139
+ global $sow_registered_fonts;
140
+
141
  $font_parts = explode( ':', $font_value );
142
  $font['family'] = $font_parts[0];
143
  $font_url_param = urlencode( $font_parts[0] );
150
  $font['url'] = 'https://fonts.googleapis.com/css?family=' . $font_url_param;
151
  $style_name = 'sow-google-font-' . strtolower( $font['family'] );
152
 
153
+
154
+ if ( ! empty( $font['weight'] ) ) {
155
+ $font_slug = $font['weight_raw'] . ( ! empty( $font['style'] ) ? 'i' : '' );
156
+ } else {
157
+ // Default to 400 if no weight is set.
158
+ $font_slug = 400;
159
+ }
160
+ $sow_registered_fonts[ $font['family'] ][ $font_slug ] = true;
161
+
162
  // Check if WB (or something else has) has already enqueued the font.
163
  if ( ! wp_style_is( $style_name ) ) {
164
  wp_enqueue_style( $style_name, $font['url'] . '&display=swap' );
165
+ } elseif ( ! empty( $sow_registered_fonts[ $font['family'] ] ) ) {
166
+ // Font already present. Update URL.
167
+ global $wp_styles;
168
+ global $sow_registered_fonts;
169
+
170
+ $font_weight_styles = array_keys( $sow_registered_fonts[ $font['family'] ] );
171
+ $wp_styles->registered[ $style_name ]->src = 'https://fonts.googleapis.com/css?family=' . urlencode( $font['family'] . ':' . implode( ',', $font_weight_styles ) );
172
  }
173
+ } else {
 
174
  $font['family'] = $font_value;
175
  $font = apply_filters( 'siteorigin_widget_get_custom_font_family', $font );
176
  }
290
  if ( $variant == 'regular' || $variant == 400 ) {
291
  $font_families[ $font ] = $font;
292
  } else {
293
+ $label_variant = is_numeric( $variant ) || $variant == 'italic'? $variant : filter_var( $variant, FILTER_SANITIZE_NUMBER_INT ) . ' italic';
294
  $font_families[ $font . ':' . $variant ] = $font . ' (' . $label_variant . ')';
295
  }
296
  }
base/css/admin.css CHANGED
@@ -1 +1 @@
1
- .siteorigin-widget-form-no-styles{display:none !important}.siteorigin-widget-teaser{padding:10px 12px;border:1px solid #5fc133;background:#edfbe7;color:#394a3a;margin-bottom:20px}.siteorigin-widget-teaser .dashicons{float:right;margin:1px 2px 6px 10px;cursor:pointer;font-size:18px;width:18px;height:18px}.siteorigin-widget-form-notification{padding:8px 12px;border:1px solid #a4cadd;background-color:#CDE2EC;margin-bottom:20px}.siteorigin-widget-form-notification>span{line-height:22px}.siteorigin-widget-form-notification>a.button.button-small{margin-left:10px;height:22px}.siteorigin-widget-form{display:block !important;margin:15px 0}.siteorigin-widget-form>div:first-child{margin-top:0}.siteorigin-widget-form a{box-shadow:none}@media (min-width:680px){.siteorigin-widget-form.siteorigin-widget-form-main{min-width:600px}}.siteorigin-widget-form .siteorigin-widget-field{margin:1em 0}.siteorigin-widget-form .siteorigin-widget-field>label{display:block;font-size:13px;font-weight:400;margin-bottom:3px}.siteorigin-widget-form .siteorigin-widget-field>label.siteorigin-widget-field-label{font-weight:bold}.siteorigin-widget-form .siteorigin-widget-field>label.so-checkbox-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.siteorigin-widget-form .siteorigin-widget-field .siteorigin-widget-description{font-size:.9em;margin-top:.2em;color:#999;font-style:italic}.siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-separator{margin:1.75em 0}.siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-is-optional .field-optional{font-weight:normal;font-size:.8em;vertical-align:super;padding-left:.5em;color:#54a242;font-style:italic}.siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-is-required .field-required{font-weight:normal;font-size:.8em;vertical-align:super;padding-left:.5em;color:#F02311;font-style:italic}.siteorigin-widget-form .siteorigin-widget-field input[type="text"]{width:100%}.siteorigin-widget-form .siteorigin-widget-field input.siteorigin-widget-input-color{width:auto}.siteorigin-widget-form .siteorigin-widget-field .wp-picker-clear{margin-left:6px;min-height:30px}.siteorigin-widget-form .siteorigin-widget-field textarea.siteorigin-widget-code-input{font-family:"Courier New",Courier,monospace}.siteorigin-widget-form .siteorigin-widget-field select{min-width:150px}@media (max-width:680px){.siteorigin-widget-form .siteorigin-widget-field select{max-width:none;width:100%}}.siteorigin-widget-form .siteorigin-widget-field select[multiple]{max-height:83px}.siteorigin-widget-form .siteorigin-widget-field-type-slider .siteorigin-widget-slider-wrapper{margin:10px 0;border:1px solid #E0E0E0;padding:12px 15px;background:#F4F4F4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;max-width:500px;display:block;margin-left:55px}.siteorigin-widget-form .siteorigin-widget-field-type-slider .siteorigin-widget-slider-value{display:block;float:left;margin-top:0;border:1px solid #E0E0E0;padding:11px 0;background:#F4F4F4;font-weight:bold;color:#666;width:45px;text-align:center}.siteorigin-widget-form .siteorigin-widget-field-type-slider .siteorigin-widget-value-slider{position:relative;height:5px;background:#A0A0A0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.25);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.25);box-shadow:inset 0 1px 2px rgba(0,0,0,0.25);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.siteorigin-widget-form .siteorigin-widget-field-type-slider .ui-slider-handle{cursor:move;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #a4a3a8;z-index:10;position:absolute;width:18px;height:18px;margin-top:-7px;margin-left:-9px;background:#F9F9F9;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;top:0;left:0;-webkit-box-shadow:inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1)}.siteorigin-widget-form .siteorigin-widget-field-type-slider input[type="number"]{display:none}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top{background:#F0F0F0;border:1px solid #D0D0D0;padding:10px;position:relative}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top h3{font-size:13px;margin:0;padding:0 !important}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-expand,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-copy,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove{width:14px;height:14px;position:absolute;top:50%;margin-top:-7px;cursor:pointer;font-size:14px;line-height:14px;text-align:center}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-expand:before,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-copy:before,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove:before{font-family:dashicons;color:#999999}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-expand{right:48px}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-expand:before{content:"\f140"}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-expand:focus:before,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-expand:hover:before{color:#50575D}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-copy{right:28px}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-copy:before{content:"\f105"}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-copy:focus:before,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-copy:hover:before{color:#50575D}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove{right:12px}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove:before{content:'\f158'}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove:focus,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove:hover{background:#ff0000}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove:focus:before,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove:hover:before{color:#FFFFFF}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items{background:#FCFCFC;border:1px solid #EEEEEE;border-top:0;border-bottom:0}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item{background:#FCFCFC;border-bottom:1px solid #EEEEEE}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top{padding:10px;cursor:move;position:relative;background:#F6F6F6}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top:focus,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top:focus-within{background:#FAFAFA}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top h4{font-size:12px;margin:0}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item h4{font-size:15px;margin:0}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item:last-child{border-bottom:0}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-form{border-top:1px solid #EEEEEE;display:none;padding:1px 10px}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add{padding:7px 10px;background:#F0F0F0;border:1px dashed #D0D0D0;font-size:12px;line-height:1em;text-align:center;cursor:pointer}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add:focus,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add:hover{background:#F4F4F4}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top{background:#eaf2f6;border-color:#c9d0d4}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top:focus,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top:focus-within{background:#eaf2f6}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top h3{color:#42484b}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items{background:#f6fdff;border-color:#e8eff3}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item{background:#f8fdff;border-bottom-color:#e8eff3}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top{background:#f0f8fc}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-form{border-top-color:#e8eff3}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add{background:#eaf2f6;border-color:#c9d0d4;color:#42484b}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add:focus,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add:hover{background:#edf5f9}.siteorigin-widget-form .siteorigin-widget-field-type-posts .posts-container-label-wrapper{background:#F0F0F0;border:1px solid #D0D0D0;padding:10px;display:block;margin-bottom:0}.siteorigin-widget-form .siteorigin-widget-field-type-posts .posts-container-label-wrapper>label{display:inline;font-weight:bold}.siteorigin-widget-form .siteorigin-widget-field-type-posts .posts-container-label-wrapper:before{float:left;margin:3px 6px 0 0;display:block;width:14px;height:14px;font-size:14px;line-height:1;font-family:"dashicons";content:"\f132"}.siteorigin-widget-form .siteorigin-widget-field-type-posts .posts-container-label-wrapper.siteorigin-widget-section-visible:before{content:"\f460"}.siteorigin-widget-form .siteorigin-widget-field-type-posts .posts-container-label-wrapper span.sow-current-count{display:inline-block;border-radius:9px;background:#f92700;border:1px solid #da0900;line-height:14px;font-size:7px;width:17px;height:17px;text-align:center;vertical-align:middle;font-weight:bold;color:#FFFFFF;box-sizing:border-box;margin:1px 5px}.siteorigin-widget-form .siteorigin-widget-field-type-widget>label,.siteorigin-widget-form .siteorigin-widget-field-type-section>label{background:#F0F0F0;border:1px solid #D0D0D0;line-height:1.4;padding:10px;display:block;margin-bottom:0}.siteorigin-widget-form .siteorigin-widget-field-type-widget>label:focus,.siteorigin-widget-form .siteorigin-widget-field-type-section>label:focus{background:#F5F5F5}.siteorigin-widget-form .siteorigin-widget-field-type-widget>label:before,.siteorigin-widget-form .siteorigin-widget-field-type-section>label:before{float:left;margin:3px 6px 0 0;display:block;width:14px;height:14px;font-size:14px;line-height:1;font-family:"dashicons";content:"\f132"}.siteorigin-widget-form .siteorigin-widget-field-type-widget>label.siteorigin-widget-section-visible:before,.siteorigin-widget-form .siteorigin-widget-field-type-section>label.siteorigin-widget-section-visible:before{content:"\f460"}.siteorigin-widget-form .siteorigin-widget-field-type-posts .siteorigin-widget-section,.siteorigin-widget-form .siteorigin-widget-field-type-widget .siteorigin-widget-section,.siteorigin-widget-form .siteorigin-widget-field-type-section .siteorigin-widget-section{padding:1px 10px;background:#FCFCFC;border:1px solid #EEEEEE;border-top:0}.siteorigin-widget-form .siteorigin-widget-field-type-posts .siteorigin-widget-section.siteorigin-widget-section-hide,.siteorigin-widget-form .siteorigin-widget-field-type-widget .siteorigin-widget-section.siteorigin-widget-section-hide,.siteorigin-widget-form .siteorigin-widget-field-type-section .siteorigin-widget-section.siteorigin-widget-section-hide{display:none}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete,.siteorigin-widget-form .siteorigin-widget-field-type-link{position:relative}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector{padding:20px;display:none;position:absolute;top:110%;width:360px;z-index:10;border:1px solid #c0c0c0;background:#F6F6F6;-webkit-box-shadow:0 2px 4px rgba(0,0,0,0.2);-moz-box-shadow:0 2px 4px rgba(0,0,0,0.2);box-shadow:0 2px 4px rgba(0,0,0,0.2);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .content-text-search,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .content-text-search{width:100%;margin-bottom:15px}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts{margin:0;padding:0;background:#fff;max-height:300px;overflow-y:scroll;border:1px solid #e4e4e4}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items li,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items li,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts li{cursor:pointer;padding:5px 10px;color:#32373c;border-bottom:1px solid #f1f1f1;margin:0;font-size:.95em}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items li.selected,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items li.selected,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li.selected,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts li.selected{background:#e1edfa}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items li:focus,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items li:focus,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li:focus,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts li:focus,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items li:hover,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items li:hover,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li:hover,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts li:hover{background:#eaf2fa}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items li:last-child,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items li:last-child,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li:last-child,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts li:last-child{border-bottom:0}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items li span,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items li span,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li span,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts li span{font-size:.9em;display:inline-block;float:right;color:#999;margin-left:10px}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items.loading,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items.loading,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts.loading,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts.loading{min-height:40px;background:#FFFFFF url("img/wpspin_light.gif") center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items.loading,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items.loading,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts.loading,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts.loading{background-image:url("img/wpspin_light-2x.gif");background-size:16px 16px}}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items.loading li,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items.loading li,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts.loading li,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts.loading li{display:none}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .buttons,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .buttons{margin-top:15px;text-align:right}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .buttons a,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .buttons a{display:inline-block}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .url-input-wrapper,.siteorigin-widget-form .siteorigin-widget-field-type-link .url-input-wrapper{display:block;margin-right:130px}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .select-content-button,.siteorigin-widget-form .siteorigin-widget-field-type-link .select-content-button{float:right;line-height:28px;min-height:30px;width:120px;text-align:center}.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector{right:0}.siteorigin-widget-form .siteorigin-widget-description{clear:both}.siteorigin-widget-preview{display:block !important}.siteorigin-widget-help-link{display:block;margin:1em 0}.so-widgets-dialog .so-widgets-dialog-overlay{position:fixed;z-index:500000;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.7)}.so-widgets-dialog .so-widgets-toolbar,.so-widgets-dialog .so-widgets-dialog-frame{position:fixed;z-index:500001;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.so-widgets-dialog .so-widgets-toolbar{left:30px;right:30px;top:30px;height:50px;background:#fafafa;border-bottom:1px solid #D8D8D8}.so-widgets-dialog .so-widgets-toolbar h3{margin:15px 0 15px 20px}.so-widgets-dialog .so-widgets-toolbar .close{position:absolute;box-sizing:border-box;width:50px;height:50px;display:block;cursor:pointer;top:0;right:0;-webkit-transition:all .2s ease;-moz-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;background:#fafafa;border-left:1px solid #d8d8d8;border-bottom:1px solid #d8d8d8}.so-widgets-dialog .so-widgets-toolbar .close:focus,.so-widgets-dialog .so-widgets-toolbar .close:hover{background:#e9e9e9}.so-widgets-dialog .so-widgets-toolbar .close:focus .so-dialog-icon,.so-widgets-dialog .so-widgets-toolbar .close:hover .so-dialog-icon{color:#333333}.so-widgets-dialog .so-widgets-toolbar .close .dashicons{position:absolute;top:50%;left:50%;text-decoration:none;width:21px;height:21px;margin-left:-11px;margin-top:-10px;font-size:21px;color:#666666;text-align:center}.so-widgets-dialog .so-widgets-dialog-frame{top:80px;left:30px;right:30px;bottom:30px;background:#FFFFFF url("img/wpspin_light.gif") center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.so-widgets-dialog .so-widgets-dialog-frame{background-image:url("img/wpspin_light-2x.gif");background-size:16px 16px}}.so-widgets-dialog .so-widgets-dialog-frame iframe{width:100%;height:100%}.widget-icon.so-widget-icon{background-size:cover;background-image:url("img/bundle-icon.png")}.widget-icon.so-widget-icon.so-block-editor-icon{width:20px;height:20px;display:inline-block}.block-editor .so-widget-placeholder{text-align:left}.block-editor .so-widget-placeholder>.components-placeholder__label{background:url("img/bundle-icon.png") no-repeat left;background-size:20px;padding-left:25px}.block-editor .so-widget-placeholder>.components-placeholder__fieldset{max-width:unset}.block-editor .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container{width:100%}.block-editor .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container .components-base-control__field select{max-width:unset}.block-editor .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container .siteorigin-widget-form.siteorigin-widget-form-main{min-width:unset}.block-editor .so-widget-placeholder .components-base-control__field select,.block-editor .siteorigin-widget-field select{border:1px solid #8c8f94;border-radius:3px;box-shadow:none;color:#2c3338;font-size:14px;padding:0 24px 0 8px}.block-editor .siteorigin-widget-form .siteorigin-widget-field{text-align:left}.block-editor .siteorigin-widget-form .siteorigin-widget-field input{padding:0 8px;line-height:2}.block-editor .siteorigin-widget-form .siteorigin-widget-field input[type=checkbox]{background-color:#ffffff}.block-editor .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .select-content-button,.block-editor .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-link .select-content-button{box-shadow:unset;font-size:13px;height:28px}.block-editor .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current{height:37px}.block-editor .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-tinymce .wp-switch-editor{box-sizing:content-box}.block-editor .so-widget-preview-container .so-widgets-spinner-container{text-align:center}.block-editor .so-widget-preview-container .so-widgets-spinner-container>span{display:inline-block}
1
+ .siteorigin-widget-form-no-styles{display:none !important}.siteorigin-widget-teaser{padding:10px 12px;border:1px solid #5fc133;background:#edfbe7;color:#394a3a;margin-bottom:20px}.siteorigin-widget-teaser .dashicons{float:right;margin:1px 2px 6px 10px;cursor:pointer;font-size:18px;width:18px;height:18px}.siteorigin-widget-form-notification{padding:8px 12px;border:1px solid #a4cadd;background-color:#CDE2EC;margin-bottom:20px}.siteorigin-widget-form-notification>span{line-height:22px}.siteorigin-widget-form-notification>a.button.button-small{margin-left:10px;height:22px}.siteorigin-widget-form{display:block !important;margin:15px 0}.siteorigin-widget-form>div:first-child{margin-top:0}.siteorigin-widget-form a{box-shadow:none}@media (min-width:680px){.siteorigin-widget-form.siteorigin-widget-form-main{min-width:600px}}.siteorigin-widget-form .siteorigin-widget-field{margin:1em 0}.siteorigin-widget-form .siteorigin-widget-field>label{display:block;font-size:13px;font-weight:400;margin-bottom:3px}.siteorigin-widget-form .siteorigin-widget-field>label.siteorigin-widget-field-label{font-weight:bold}.siteorigin-widget-form .siteorigin-widget-field>label.so-checkbox-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.siteorigin-widget-form .siteorigin-widget-field .siteorigin-widget-description{font-size:.9em;margin-top:.2em;color:#999;font-style:italic}.siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-separator{margin:1.75em 0}.siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-is-optional .field-optional{font-weight:normal;font-size:.8em;vertical-align:super;padding-left:.5em;color:#54a242;font-style:italic}.siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-is-required .field-required{font-weight:normal;font-size:.8em;vertical-align:super;padding-left:.5em;color:#F02311;font-style:italic}.siteorigin-widget-form .siteorigin-widget-field input[type="text"]{width:100%}.siteorigin-widget-form .siteorigin-widget-field input.siteorigin-widget-input-color{width:auto}.siteorigin-widget-form .siteorigin-widget-field .wp-picker-clear{margin-left:6px;min-height:30px}.siteorigin-widget-form .siteorigin-widget-field textarea.siteorigin-widget-code-input{font-family:"Courier New",Courier,monospace}.siteorigin-widget-form .siteorigin-widget-field select{min-width:150px}@media (max-width:680px){.siteorigin-widget-form .siteorigin-widget-field select{max-width:none;width:100%}}.siteorigin-widget-form .siteorigin-widget-field select[multiple]{max-height:83px}.siteorigin-widget-form .siteorigin-widget-field-type-slider .siteorigin-widget-slider-wrapper{margin:10px 0;border:1px solid #E0E0E0;padding:12px 15px;background:#F4F4F4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;max-width:500px;display:block;margin-left:55px}.siteorigin-widget-form .siteorigin-widget-field-type-slider .siteorigin-widget-slider-value{display:block;float:left;margin-top:0;border:1px solid #E0E0E0;padding:11px 0;background:#F4F4F4;font-weight:bold;color:#666;width:45px;text-align:center}.siteorigin-widget-form .siteorigin-widget-field-type-slider .siteorigin-widget-value-slider{position:relative;height:5px;background:#A0A0A0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.25);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.25);box-shadow:inset 0 1px 2px rgba(0,0,0,0.25);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.siteorigin-widget-form .siteorigin-widget-field-type-slider .ui-slider-handle{cursor:move;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #a4a3a8;z-index:10;position:absolute;width:18px;height:18px;margin-top:-7px;margin-left:-9px;background:#F9F9F9;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;top:0;left:0;-webkit-box-shadow:inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1)}.siteorigin-widget-form .siteorigin-widget-field-type-slider input[type="number"]{display:none}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top{background:#F0F0F0;border:1px solid #D0D0D0;padding:10px;position:relative}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top h3{font-size:13px;margin:0;padding:0 !important}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-expand,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-copy,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove{width:14px;height:14px;position:absolute;top:50%;margin-top:-7px;cursor:pointer;font-size:14px;line-height:14px;text-align:center}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-expand:before,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-copy:before,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove:before{font-family:dashicons;color:#999999}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-expand{right:48px}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-expand:before{content:"\f140"}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-expand:focus:before,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-expand:hover:before{color:#50575D}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-copy{right:28px}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-copy:before{content:"\f105"}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-copy:focus:before,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-copy:hover:before{color:#50575D}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove{right:12px}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove:before{content:'\f158'}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove:focus,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove:hover{background:#ff0000}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove:focus:before,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-remove:hover:before{color:#FFFFFF}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items{background:#FCFCFC;border:1px solid #EEEEEE;border-top:0;border-bottom:0}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item{background:#FCFCFC;border-bottom:1px solid #EEEEEE}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top{padding:10px;cursor:move;position:relative;background:#F6F6F6}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top:focus,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top:focus-within{background:#FAFAFA}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top h4{font-size:12px;margin:0}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item h4{font-size:15px;margin:0}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item:last-child{border-bottom:0}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-form{border-top:1px solid #EEEEEE;display:none;padding:1px 10px}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add{padding:7px 10px;background:#F0F0F0;border:1px dashed #D0D0D0;font-size:12px;line-height:1em;text-align:center;cursor:pointer}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add:focus,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add:hover{background:#F4F4F4}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top{background:#eaf2f6;border-color:#c9d0d4}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top:focus,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top:focus-within{background:#eaf2f6}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top h3{color:#42484b}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items{background:#f6fdff;border-color:#e8eff3}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item{background:#f8fdff;border-bottom-color:#e8eff3}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top{background:#f0f8fc}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-form{border-top-color:#e8eff3}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add{background:#eaf2f6;border-color:#c9d0d4;color:#42484b}.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add:focus,.siteorigin-widget-form .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add:hover{background:#edf5f9}.siteorigin-widget-form .siteorigin-widget-field-type-posts .posts-container-label-wrapper{background:#F0F0F0;border:1px solid #D0D0D0;display:block;line-height:1;margin-bottom:0;padding:10px}.siteorigin-widget-form .siteorigin-widget-field-type-posts .posts-container-label-wrapper>label{display:inline;font-weight:bold}.siteorigin-widget-form .siteorigin-widget-field-type-posts .posts-container-label-wrapper:before{float:left;margin:4px 6px 0 0;display:block;width:14px;height:14px;font-size:14px;line-height:1;font-family:"dashicons";content:"\f132"}.siteorigin-widget-form .siteorigin-widget-field-type-posts .posts-container-label-wrapper.siteorigin-widget-section-visible:before{content:"\f460"}.siteorigin-widget-form .siteorigin-widget-field-type-posts .posts-container-label-wrapper span.sow-current-count{display:inline-block;border-radius:9px;background:#f92700;border:1px solid #da0900;line-height:14px;font-size:7px;width:17px;height:17px;text-align:center;vertical-align:middle;font-weight:bold;color:#FFFFFF;box-sizing:border-box;margin:1px 5px}.siteorigin-widget-form .siteorigin-widget-field-type-widget>label,.siteorigin-widget-form .siteorigin-widget-field-type-section>label{background:#F0F0F0;border:1px solid #D0D0D0;line-height:1.4;padding:10px;display:block;margin-bottom:0}.siteorigin-widget-form .siteorigin-widget-field-type-widget>label:focus,.siteorigin-widget-form .siteorigin-widget-field-type-section>label:focus{background:#F5F5F5}.siteorigin-widget-form .siteorigin-widget-field-type-widget>label:before,.siteorigin-widget-form .siteorigin-widget-field-type-section>label:before{float:left;margin:3px 6px 0 0;display:block;width:14px;height:14px;font-size:14px;line-height:1;font-family:"dashicons";content:"\f132"}.siteorigin-widget-form .siteorigin-widget-field-type-widget>label.siteorigin-widget-section-visible:before,.siteorigin-widget-form .siteorigin-widget-field-type-section>label.siteorigin-widget-section-visible:before{content:"\f460"}.siteorigin-widget-form .siteorigin-widget-field-type-posts .siteorigin-widget-section,.siteorigin-widget-form .siteorigin-widget-field-type-widget .siteorigin-widget-section,.siteorigin-widget-form .siteorigin-widget-field-type-section .siteorigin-widget-section{padding:1px 10px;background:#FCFCFC;border:1px solid #EEEEEE;border-top:0}.siteorigin-widget-form .siteorigin-widget-field-type-posts .siteorigin-widget-section.siteorigin-widget-section-hide,.siteorigin-widget-form .siteorigin-widget-field-type-widget .siteorigin-widget-section.siteorigin-widget-section-hide,.siteorigin-widget-form .siteorigin-widget-field-type-section .siteorigin-widget-section.siteorigin-widget-section-hide{display:none}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete,.siteorigin-widget-form .siteorigin-widget-field-type-link{position:relative}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector{padding:20px;display:none;position:absolute;top:110%;width:360px;z-index:10;border:1px solid #c0c0c0;background:#F6F6F6;-webkit-box-shadow:0 2px 4px rgba(0,0,0,0.2);-moz-box-shadow:0 2px 4px rgba(0,0,0,0.2);box-shadow:0 2px 4px rgba(0,0,0,0.2);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .content-text-search,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .content-text-search{width:100%;margin-bottom:15px}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts{margin:0;padding:0;background:#fff;max-height:300px;overflow-y:scroll;border:1px solid #e4e4e4}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items li,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items li,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts li{cursor:pointer;padding:5px 10px;color:#32373c;border-bottom:1px solid #f1f1f1;margin:0;font-size:.95em}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items li.selected,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items li.selected,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li.selected,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts li.selected{background:#e1edfa}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items li:focus,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items li:focus,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li:focus,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts li:focus,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items li:hover,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items li:hover,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li:hover,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts li:hover{background:#eaf2fa}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items li:last-child,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items li:last-child,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li:last-child,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts li:last-child{border-bottom:0}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items li span,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items li span,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li span,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts li span{font-size:.9em;display:inline-block;float:right;color:#999;margin-left:10px}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items.loading,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items.loading,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts.loading,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts.loading{min-height:40px;background:#FFFFFF url("img/wpspin_light.gif") center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items.loading,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items.loading,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts.loading,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts.loading{background-image:url("img/wpspin_light-2x.gif");background-size:16px 16px}}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .items.loading li,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .items.loading li,.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .posts.loading li,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .posts.loading li{display:none}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .buttons,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .buttons{margin-top:15px;text-align:right}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .existing-content-selector .buttons a,.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector .buttons a{display:inline-block}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .url-input-wrapper,.siteorigin-widget-form .siteorigin-widget-field-type-link .url-input-wrapper{display:block;margin-right:130px}.siteorigin-widget-form .siteorigin-widget-field-type-autocomplete .select-content-button,.siteorigin-widget-form .siteorigin-widget-field-type-link .select-content-button{float:right;line-height:28px;min-height:30px;width:120px;text-align:center}.siteorigin-widget-form .siteorigin-widget-field-type-link .existing-content-selector{right:0}.siteorigin-widget-form .siteorigin-widget-description{clear:both}.siteorigin-widget-preview{display:block !important}.siteorigin-widget-help-link{display:block;margin:1em 0}.so-widgets-dialog .so-widgets-dialog-overlay{position:fixed;z-index:500000;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.7)}.so-widgets-dialog .so-widgets-toolbar,.so-widgets-dialog .so-widgets-dialog-frame{position:fixed;z-index:500001;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.so-widgets-dialog .so-widgets-toolbar{left:30px;right:30px;top:30px;height:50px;background:#fafafa;border-bottom:1px solid #D8D8D8}.so-widgets-dialog .so-widgets-toolbar h3{margin:15px 0 15px 20px}.so-widgets-dialog .so-widgets-toolbar .close{position:absolute;box-sizing:border-box;width:50px;height:50px;display:block;cursor:pointer;top:0;right:0;-webkit-transition:all .2s ease;-moz-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;background:#fafafa;border-left:1px solid #d8d8d8;border-bottom:1px solid #d8d8d8}.so-widgets-dialog .so-widgets-toolbar .close:focus,.so-widgets-dialog .so-widgets-toolbar .close:hover{background:#e9e9e9}.so-widgets-dialog .so-widgets-toolbar .close:focus .so-dialog-icon,.so-widgets-dialog .so-widgets-toolbar .close:hover .so-dialog-icon{color:#333333}.so-widgets-dialog .so-widgets-toolbar .close .dashicons{position:absolute;top:50%;left:50%;text-decoration:none;width:21px;height:21px;margin-left:-11px;margin-top:-10px;font-size:21px;color:#666666;text-align:center}.so-widgets-dialog .so-widgets-dialog-frame{top:80px;left:30px;right:30px;bottom:30px;background:#FFFFFF url("img/wpspin_light.gif") center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.so-widgets-dialog .so-widgets-dialog-frame{background-image:url("img/wpspin_light-2x.gif");background-size:16px 16px}}.so-widgets-dialog .so-widgets-dialog-frame iframe{width:100%;height:100%}.widget-icon.so-widget-icon{background-size:cover;background-image:url("img/bundle-icon.png")}.widget-icon.so-widget-icon.so-block-editor-icon{width:20px;height:20px;display:inline-block}.block-editor .so-widget-placeholder{text-align:left}.block-editor .so-widget-placeholder>.components-placeholder__label{background:url("img/bundle-icon.png") no-repeat left;background-size:20px;padding-left:25px}.block-editor .so-widget-placeholder>.components-placeholder__fieldset{max-width:unset}.block-editor .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container{width:100%}.block-editor .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container .components-base-control__field select{max-width:unset}.block-editor .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container .siteorigin-widget-form.siteorigin-widget-form-main{min-width:unset}.block-editor .so-widget-placeholder .components-base-control__field select,.block-editor .siteorigin-widget-field select{border:1px solid #8c8f94;border-radius:3px;box-shadow:none;color:#2c3338;font-size:14px;padding:0 24px 0 8px}.block-editor .siteorigin-widget-form .siteorigin-widget-field{text-align:left}.block-editor .siteorigin-widget-form .siteorigin-widget-field input{padding:0 8px;line-height:2}.block-editor .siteorigin-widget-form .siteorigin-widget-field input[type=checkbox]{background-color:#ffffff}.block-editor .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .select-content-button,.block-editor .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-link .select-content-button{box-shadow:unset;font-size:13px;height:28px}.block-editor .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current{height:37px}.block-editor .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-tinymce .wp-switch-editor{box-sizing:content-box}.block-editor .so-widget-preview-container .so-widgets-spinner-container{text-align:center}.block-editor .so-widget-preview-container .so-widgets-spinner-container>span{display:inline-block}
base/inc/fields/css/multiple-media-field.css CHANGED
@@ -1 +1 @@
1
- .siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper *{box-sizing:content-box}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-items{line-height:18.2px;overflow:auto}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;padding:4px;position:relative;margin:5px 0}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item .thumbnail{border:1px solid #999;box-shadow:0 1px 1px #fff;box-shadow:inset 0 1px 3px rgba(0,0,0,0.2);height:75px;background:#cfcfcf;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #cccccc), color-stop(1, #cfcfcf));background:-ms-linear-gradient(bottom, #cccccc, #cfcfcf);background:-moz-linear-gradient(center bottom, #cccccc 0%, #cfcfcf 100%);background:-o-linear-gradient(#cfcfcf, #cccccc);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cfcfcf', endColorstr='#cccccc', GradientType=0);line-height:0;width:75px}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item .title{display:none}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item .media-remove-button{color:#aaa;display:block;font-size:11px;line-height:1em;opacity:1;text-align:center;text-decoration:none;-webkit-transition:all .25s ease;-moz-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item .media-remove-button.remove-hide{opacity:0;pointer-events:none}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item .media-remove-button:hover{color:#bc0b0b}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .media-field-template{display:none}
1
+ .siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper *{box-sizing:content-box}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-items{line-height:18.2px;overflow:auto}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;padding:4px;position:relative;margin:5px 0}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item .thumbnail{border:1px solid #999;box-shadow:0 1px 1px #fff;box-shadow:inset 0 1px 3px rgba(0,0,0,0.2);background:#cfcfcf;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #cccccc), color-stop(1, #cfcfcf));background:-ms-linear-gradient(bottom, #cccccc, #cfcfcf);background:-moz-linear-gradient(center bottom, #cccccc 0%, #cfcfcf 100%);background:-o-linear-gradient(#cfcfcf, #cccccc);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#cfcfcf', endColorstr='#cccccc', GradientType=0);line-height:0}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item .title{display:none}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item .title.title-enabled{display:block;font-size:12px;word-break:break-all}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item .media-remove-button{color:#aaa;display:block;font-size:11px;line-height:1em;opacity:1;text-align:center;text-decoration:none;-webkit-transition:all .25s ease;-moz-transition:all .25s ease;-o-transition:all .25s ease;transition:all .25s ease}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item .media-remove-button.remove-hide{opacity:0;pointer-events:none}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .multiple-media-field-wrapper .multiple-media-field-item .media-remove-button:hover{color:#bc0b0b}.siteorigin-widget-form .siteorigin-widget-field-type-multiple_media .media-field-template{display:none}
base/inc/fields/js/multiple-media-field.js CHANGED
@@ -62,7 +62,7 @@
62
  $currentItem,
63
  $thumbnail;
64
 
65
- $.each( frame.state().get('selection').models, function() {
66
  attachment = this.attributes;
67
 
68
  // Don't process images that already exist.
@@ -72,6 +72,7 @@
72
 
73
  $thumbnail = $currentItem.find( '.thumbnail' );
74
  $thumbnail.attr( 'title', attachment.title );
 
75
 
76
  $currentItem.attr( 'data-id', attachment.id );
77
 
62
  $currentItem,
63
  $thumbnail;
64
 
65
+ $.each( frame.state().get( 'selection' ).models, function() {
66
  attachment = this.attributes;
67
 
68
  // Don't process images that already exist.
72
 
73
  $thumbnail = $currentItem.find( '.thumbnail' );
74
  $thumbnail.attr( 'title', attachment.title );
75
+ $currentItem.find( '.title' ).text( attachment.title );
76
 
77
  $currentItem.attr( 'data-id', attachment.id );
78
 
base/inc/fields/js/multiple-media-field.min.js CHANGED
@@ -1 +1 @@
1
- !function(i){i(document).on("sowsetupformfield",".siteorigin-widget-field-type-multiple_media",(function(t){var e=i(this),a=e.find(".siteorigin-widget-input"),n=a.val().split(",");e.data("initialized")||(e.find(".button").on("click",(function(t){if(t.preventDefault(),void 0!==wp.media){var l=i(this),d=i(this).data("frame");if(d)return d.open(),!1;(d=wp.media({title:l.data("choose"),library:{type:l.data("library").split(",").map((function(i){return i.trim()}))},multiple:!0,button:{text:l.data("update"),close:!1}})).on("open",(function(){if(n.length){var t=d.state().get("selection");i.each(n,(function(){t.add(wp.media.attachment(this))}))}})),l.data("frame",d),d.on("select",(function(){var t,l,o,m,u=[];i.each(d.state().get("selection").models,(function(){t=this.attributes,-1==n.indexOf(t.id.toString())&&(e.find(".multiple-media-field-template .multiple-media-field-item").clone().appendTo(e.find(".multiple-media-field-items")),o=e.find(".multiple-media-field-items .multiple-media-field-item").last(),(m=o.find(".thumbnail")).attr("title",t.title),o.attr("data-id",t.id),l=void 0!==t.sizes?void 0!==t.sizes.thumbnail?t.sizes.thumbnail.url:t.sizes.full.url:t.icon,m.attr("src",l)),u.push(t.id)})),e.find(".multiple-media-field-items .multiple-media-field-item").each((function(){-1==u.indexOf(i(this).data("id"))&&i(this).remove()})),u.length?(n=u,a.val(u.join(","))):(n=[],a.val("")),d.close()})),d.open()}})),i(document).on("click",".siteorigin-widget-field-type-multiple_media a.media-remove-button",(function(t){t.preventDefault();var e=i(this).parent();n.splice(n.indexOf(e.data("id"))),a.val(n.join(",")),e.remove()})),e.data("initialized",!0))}))}(jQuery);
1
+ !function(i){i(document).on("sowsetupformfield",".siteorigin-widget-field-type-multiple_media",(function(t){var e=i(this),a=e.find(".siteorigin-widget-input"),n=a.val().split(",");e.data("initialized")||(e.find(".button").on("click",(function(t){if(t.preventDefault(),void 0!==wp.media){var l=i(this),d=i(this).data("frame");if(d)return d.open(),!1;(d=wp.media({title:l.data("choose"),library:{type:l.data("library").split(",").map((function(i){return i.trim()}))},multiple:!0,button:{text:l.data("update"),close:!1}})).on("open",(function(){if(n.length){var t=d.state().get("selection");i.each(n,(function(){t.add(wp.media.attachment(this))}))}})),l.data("frame",d),d.on("select",(function(){var t,l,o,m,u=[];i.each(d.state().get("selection").models,(function(){t=this.attributes,-1==n.indexOf(t.id.toString())&&(e.find(".multiple-media-field-template .multiple-media-field-item").clone().appendTo(e.find(".multiple-media-field-items")),o=e.find(".multiple-media-field-items .multiple-media-field-item").last(),(m=o.find(".thumbnail")).attr("title",t.title),o.find(".title").text(t.title),o.attr("data-id",t.id),l=void 0!==t.sizes?void 0!==t.sizes.thumbnail?t.sizes.thumbnail.url:t.sizes.full.url:t.icon,m.attr("src",l)),u.push(t.id)})),e.find(".multiple-media-field-items .multiple-media-field-item").each((function(){-1==u.indexOf(i(this).data("id"))&&i(this).remove()})),u.length?(n=u,a.val(u.join(","))):(n=[],a.val("")),d.close()})),d.open()}})),i(document).on("click",".siteorigin-widget-field-type-multiple_media a.media-remove-button",(function(t){t.preventDefault();var e=i(this).parent();n.splice(n.indexOf(e.data("id"))),a.val(n.join(",")),e.remove()})),e.data("initialized",!0))}))}(jQuery);
base/inc/fields/multiple-media.class.php CHANGED
@@ -31,11 +31,31 @@ class SiteOrigin_Widget_Field_Multiple_Media extends SiteOrigin_Widget_Field_Bas
31
  */
32
  protected $library;
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  protected function get_default_options() {
35
  return array(
36
  'choose' => __( 'Add Media', 'so-widgets-bundle' ),
37
  'update' => __( 'Set Media', 'so-widgets-bundle' ),
38
- 'library' => 'image'
 
 
39
  );
40
  }
41
 
@@ -45,6 +65,17 @@ class SiteOrigin_Widget_Field_Multiple_Media extends SiteOrigin_Widget_Field_Bas
45
  return;
46
  }
47
 
 
 
 
 
 
 
 
 
 
 
 
48
  // If library is set to all, convert it to a wildcard as all isn't valid
49
  if ( $this->library == 'all' ) {
50
  $this->library = '*';
@@ -62,20 +93,25 @@ class SiteOrigin_Widget_Field_Multiple_Media extends SiteOrigin_Widget_Field_Bas
62
  <?php
63
  if ( is_array( $attachments ) ) {
64
  foreach ( $attachments as $attachment ) {
65
- $post = get_post( $attachment );
66
  $src = wp_get_attachment_image_src( $attachment, 'thumbnail' );
67
 
68
  if ( empty( $src ) ) {
69
- continue;
 
 
 
70
  }
71
  ?>
72
  <div class="multiple-media-field-item" data-id="<?php echo esc_attr( $attachment ); ?>">
73
- <img src="<?php echo sow_esc_url( $src[0] ); ?>" class="thumbnail" title="<?php echo esc_attr( $post->post_title ); ?>"/>
 
 
74
  <a href="#" class="media-remove-button"><?php esc_html_e( 'Remove', 'so-widgets-bundle' ); ?></a>
75
- <div class="title">
76
  <?php
77
- if ( ! empty( $post ) ) {
78
- echo esc_attr( $post->post_title );
79
  }
80
  ?>
81
  </div>
@@ -88,9 +124,9 @@ class SiteOrigin_Widget_Field_Multiple_Media extends SiteOrigin_Widget_Field_Bas
88
 
89
  <div class="multiple-media-field-template" style="display:none">
90
  <div class="multiple-media-field-item">
91
- <img class="thumbnail" />
92
  <a href="#" class="media-remove-button"><?php esc_html_e( 'Remove', 'so-widgets-bundle' ); ?></a>
93
- <div class="title"></div>
94
  </div>
95
 
96
  </div>
31
  */
32
  protected $library;
33
 
34
+ /**
35
+ * Whether to display the item title or not. Default is `true`.
36
+ *
37
+ * @access protected
38
+ * @var boolean
39
+ */
40
+ protected $title;
41
+
42
+ /**
43
+ * The dimensions of each thumbnail item. Only used when editing widgets. The default is 75x75.
44
+ *
45
+ * @access protected
46
+ * @var array
47
+ */
48
+ protected $thumbnail_dimensions;
49
+
50
+ static $default_thumbnail_dimensions = array( 64, 64 );
51
+
52
  protected function get_default_options() {
53
  return array(
54
  'choose' => __( 'Add Media', 'so-widgets-bundle' ),
55
  'update' => __( 'Set Media', 'so-widgets-bundle' ),
56
+ 'library' => 'image',
57
+ 'title' => true,
58
+ 'thumbnail_dimensions' => self::$default_thumbnail_dimensions,
59
  );
60
  }
61
 
65
  return;
66
  }
67
 
68
+ // Ensure thumbnail_dimensions are valid.
69
+ if (
70
+ empty( $this->thumbnail_dimensions ) ||
71
+ empty( $this->thumbnail_dimensions[0] ) ||
72
+ empty( $this->thumbnail_dimensions[1] ) ||
73
+ ! is_numeric( $this->thumbnail_dimensions[0] ) ||
74
+ ! is_numeric( $this->thumbnail_dimensions[1] )
75
+ ) {
76
+ $this->thumbnail_dimensions = self::$default_thumbnail_dimensions;
77
+ }
78
+
79
  // If library is set to all, convert it to a wildcard as all isn't valid
80
  if ( $this->library == 'all' ) {
81
  $this->library = '*';
93
  <?php
94
  if ( is_array( $attachments ) ) {
95
  foreach ( $attachments as $attachment ) {
96
+ $item_title = get_the_title( $attachment );
97
  $src = wp_get_attachment_image_src( $attachment, 'thumbnail' );
98
 
99
  if ( empty( $src ) ) {
100
+ // If item doesn't have an image src, use the WP icon for its media type.
101
+ $src = wp_mime_type_icon( $attachment );
102
+ } else {
103
+ $src = $src[0];
104
  }
105
  ?>
106
  <div class="multiple-media-field-item" data-id="<?php echo esc_attr( $attachment ); ?>">
107
+ <?php if ( ! empty( $src ) ) : ?>
108
+ <img src="<?php echo sow_esc_url( $src ); ?>" class="thumbnail" title="<?php echo esc_attr( $item_title ); ?>" width="<?php echo $this->thumbnail_dimensions[0]; ?>" height="<?php echo $this->thumbnail_dimensions[1]; ?>"/>
109
+ <?php endif; ?>
110
  <a href="#" class="media-remove-button"><?php esc_html_e( 'Remove', 'so-widgets-bundle' ); ?></a>
111
+ <div class="title <?php echo (bool) $this->title ? 'title-enabled" style="width: ' . $this->thumbnail_dimensions[0] . 'px' : ''; ?>">
112
  <?php
113
+ if ( ! empty( $item_title ) ) {
114
+ echo esc_attr( $item_title );
115
  }
116
  ?>
117
  </div>
124
 
125
  <div class="multiple-media-field-template" style="display:none">
126
  <div class="multiple-media-field-item">
127
+ <img class="thumbnail" width="<?php echo $this->thumbnail_dimensions[0]; ?>" height="<?php echo $this->thumbnail_dimensions[1]; ?>"/>
128
  <a href="#" class="media-remove-button"><?php esc_html_e( 'Remove', 'so-widgets-bundle' ); ?></a>
129
+ <div class="title <?php echo (bool) $this->title ? 'title-enabled" style="width: ' . $this->thumbnail_dimensions[0] . 'px' : ''; ?>"></div>
130
  </div>
131
 
132
  </div>
base/inc/fields/posts.class.php CHANGED
@@ -52,6 +52,17 @@ class SiteOrigin_Widget_Field_Posts extends SiteOrigin_Widget_Field_Container_Ba
52
  'description' => __( 'Taxonomies are groups such as categories, tags, posts and products.', 'so-widgets-bundle' ),
53
  ),
54
 
 
 
 
 
 
 
 
 
 
 
 
55
  'date_type' => array(
56
  'type' => 'radio',
57
  'label' => __( 'Date selection type', 'so-widgets-bundle' ),
52
  'description' => __( 'Taxonomies are groups such as categories, tags, posts and products.', 'so-widgets-bundle' ),
53
  ),
54
 
55
+ 'tax_query_relation' => array(
56
+ 'type' => 'radio',
57
+ 'label' => __( 'Taxonomies relationship', 'so-widgets-bundle' ),
58
+ 'options' => array(
59
+ 'OR' => __( 'OR', 'so-widgets-bundle' ),
60
+ 'AND' => __( 'AND', 'so-widgets-bundle' ),
61
+ ),
62
+ 'description' => __( 'The relationship between taxonomies. OR requires posts to have at least one of the specified taxonomies. AND requires posts to have all of the specified taxonomies.', 'so-widgets-bundle' ),
63
+ 'default' => 'OR',
64
+ ),
65
+
66
  'date_type' => array(
67
  'type' => 'radio',
68
  'label' => __( 'Date selection type', 'so-widgets-bundle' ),
base/inc/post-selector.php CHANGED
@@ -34,7 +34,7 @@ function siteorigin_widget_post_selector_process_query( $query, $exclude_current
34
  $tax_queries = explode(',', $query['tax_query']);
35
 
36
  $query['tax_query'] = array();
37
- $query['tax_query']['relation'] = 'OR';
38
  foreach($tax_queries as $tq) {
39
  list($tax, $term) = explode(':', $tq);
40
 
34
  $tax_queries = explode(',', $query['tax_query']);
35
 
36
  $query['tax_query'] = array();
37
+ $query['tax_query']['relation'] = isset( $query['tax_query_relation'] ) ? $query['tax_query_relation'] : 'OR';
38
  foreach($tax_queries as $tq) {
39
  list($tax, $term) = explode(':', $tq);
40
 
base/inc/widgets/base-slider.class.php CHANGED
@@ -357,8 +357,8 @@ abstract class SiteOrigin_Widget_Base_Slider extends SiteOrigin_Widget {
357
  );
358
  $overlay_attributes = apply_filters( 'siteorigin_widgets_slider_overlay_attributes', $overlay_attributes, $frame, $background );
359
 
360
- $overlay_attributes['class'] = implode( ' ', $overlay_attributes['class'] );
361
- $overlay_attributes['style'] = implode( ';', $overlay_attributes['style'] );
362
 
363
  ?><div <?php foreach( $overlay_attributes as $attr => $val ) echo $attr . '="' . esc_attr( $val ) . '" '; ?> ></div><?php
364
  }
357
  );
358
  $overlay_attributes = apply_filters( 'siteorigin_widgets_slider_overlay_attributes', $overlay_attributes, $frame, $background );
359
 
360
+ $overlay_attributes['class'] = empty( $overlay_attributes['class'] ) ? '' : implode( ' ', $overlay_attributes['class'] );
361
+ $overlay_attributes['style'] = empty( $overlay_attributes['style'] ) ? '' : implode( ';', $overlay_attributes['style'] );
362
 
363
  ?><div <?php foreach( $overlay_attributes as $attr => $val ) echo $attr . '="' . esc_attr( $val ) . '" '; ?> ></div><?php
364
  }
base/js/admin.js CHANGED
@@ -801,14 +801,31 @@ var sowbForms = window.sowbForms || {};
801
  if (txt.length > 80) {
802
  txt = txt.substr(0, 79) + '...';
803
  }
804
- itemTop.find('h4').text(txt);
805
  } else {
806
- itemTop.find('h4').text(defaultLabel);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
807
  }
 
 
808
  };
809
  updateLabel();
810
  var eventName = ( itemLabel.hasOwnProperty('updateEvent') && itemLabel.updateEvent ) ? itemLabel.updateEvent : 'change';
811
- $el.bind(eventName, updateLabel);
812
  }
813
 
814
  itemTop.on( 'click keyup', function( e ) {
@@ -860,6 +877,12 @@ var sowbForms = window.sowbForms || {};
860
  } else if ( confirm( soWidgets.sure ) ) {
861
  $item.slideUp('fast', removeItem );
862
  }
 
 
 
 
 
 
863
  });
864
  itemTop.find( '.siteorigin-widget-field-copy' ).on( 'click keyup', function( e ) {
865
  e.preventDefault();
@@ -992,7 +1015,13 @@ var sowbForms = window.sowbForms || {};
992
  $copyItem.hide().slideDown('fast', function () {
993
  $( window ).trigger( 'resize' );
994
  });
995
- $el.trigger( 'change' );
 
 
 
 
 
 
996
  });
997
 
998
  $el.find('> .siteorigin-widget-field-repeater-item-form').sowSetupForm();
801
  if (txt.length > 80) {
802
  txt = txt.substr(0, 79) + '...';
803
  }
 
804
  } else {
805
+ txt = defaultLabel;
806
+
807
+ // Add item index to label if needed.
808
+ if ( itemLabel.increment ) {
809
+ var index = $el.index();
810
+ // var index = itemTop.parents( '.siteorigin-widget-field-repeater-item' ).index();
811
+ // Increment for zero-index.
812
+ index++;
813
+
814
+ if ( ! isNaN( index ) ) {
815
+ if ( itemLabel.increment == 'before' ) {
816
+ txt = index + ' ' + txt;
817
+ } else {
818
+ txt += ' ' + index;
819
+ }
820
+ }
821
+ }
822
  }
823
+
824
+ itemTop.find( 'h4' ).text( txt );
825
  };
826
  updateLabel();
827
  var eventName = ( itemLabel.hasOwnProperty('updateEvent') && itemLabel.updateEvent ) ? itemLabel.updateEvent : 'change';
828
+ $el.on( eventName, updateLabel );
829
  }
830
 
831
  itemTop.on( 'click keyup', function( e ) {
877
  } else if ( confirm( soWidgets.sure ) ) {
878
  $item.slideUp('fast', removeItem );
879
  }
880
+
881
+ // If increment is enabled for this item, trigger label updates.
882
+ var itemLabel = $el.closest( '.siteorigin-widget-field-repeater' ).data( 'item-label' );
883
+ if ( typeof itemLabel.increment == 'string' ) {
884
+ $el.parent().find( '.siteorigin-widget-field-repeater-item' ).trigger( 'change' )
885
+ }
886
  });
887
  itemTop.find( '.siteorigin-widget-field-copy' ).on( 'click keyup', function( e ) {
888
  e.preventDefault();
1015
  $copyItem.hide().slideDown('fast', function () {
1016
  $( window ).trigger( 'resize' );
1017
  });
1018
+ // If increment is enabled for this item, trigger label updates.
1019
+ var itemLabel = $el.closest( '.siteorigin-widget-field-repeater' ).data( 'item-label' );
1020
+ if ( typeof itemLabel.increment == 'string' ) {
1021
+ $el.parent().find( '.siteorigin-widget-field-repeater-item' ).trigger( 'change' )
1022
+ } else {
1023
+ $el.trigger( 'change' );
1024
+ }
1025
  });
1026
 
1027
  $el.find('> .siteorigin-widget-field-repeater-item-form').sowSetupForm();
base/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- var sowbForms=window.sowbForms||{};!function(e){e.fn.sowSetupForm=function(){return e(this).each((function(i,t){var r,n=e(t),a=!0,s=e("body"),o=n.find("input[name]");if(o.length&&-1!==o.attr("name").indexOf("__i__"))return this;if(n.is(".siteorigin-widget-form-main")){if(!0===n.data("sow-form-setup"))return!0;if(s.hasClass("widgets-php")&&!n.is(":visible")&&0===n.closest(".panel-dialog").length)return!0;n.on("sowstatechange",(function(i,t,r){n.find("[data-state-handler]").each((function(){var i,n,s,o,d,l,g=e(this),f=e.extend({},g.data("state-handler"),a?g.data("state-handler-initial"):{});if(0===Object.keys(f).length)return!0;var p={},c=sowbForms.getContainerFieldId(g,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==c){var u={};for(var w in f)u[w.replace("{$repeater}",c)]=f[w];f=u}var m=sowbForms.getContainerFieldId(g,"widget",".siteorigin-widget-widget");if(!1!==m){var v={};for(var h in f){var b=h.match(/_else\[(.*)\]|(.*)\[(.*)\]/);v[b&&b.length&&void 0===b[1]?b[2]+"_"+m+"["+b[3]+"]":"_else["+b[1]+"_"+m+"]"]=f[h]}f=v}for(var y in f)if(d=!1,null!==(i=y.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?$/))){if(n={group:"default",name:"",multi:!1},void 0!==i[2]?(n.group=i[1],n.name=i[3]):n.name=i[0],n.multi=void 0!==i[4],"_else"===n.group)n.group=n.name,n.name="",d=n.group===t&&void 0===p[n.group];else{l=n.name.split(",").map((function(e){return e.trim()}));for(var k=0;k<l.length&&!(d=n.group===t&&l[k]===r);k++);}if(d){s=f[y],n.multi||(s=[s]);for(k=0;k<s.length;k++){var F=!1;if((o=void 0!==s[k][1]&&Boolean(s[k][1])?g.find(s[k][1]):g).prop("style").length&&("show"==s[k][0]?(o.fadeIn("fast"),F=!0):"hide"==s[k][0]&&(o.fadeOut("fast"),F=!0)),F||o[s[k][0]].apply(o,void 0!==s[k][2]?s[k][2]:[]),o.is(".siteorigin-widget-field:visible"))if(o.is(".siteorigin-widget-field-type-section"))o.find("> .siteorigin-widget-section > .siteorigin-widget-field").trigger("sowsetupformfield");else o.trigger("sowsetupformfield")}p[n.group]=!0}}}))})),n.sowSetupPreview(),r=n;var d=n.find(".siteorigin-widget-teaser");if(d.find(".dashicons-dismiss").on("click",(function(){var i=e(this);e.get(i.data("dismiss-url")),d.slideUp("normal",(function(){d.remove()}))})),!n.data("backupDisabled")){var l=n.find("> .siteorigin-widgets-form-id").val(),g=n.find("> .siteorigin-widgets-form-timestamp"),f=parseInt(g.val()||0),p=JSON.parse(sessionStorage.getItem(l));p&&(p._sow_form_timestamp>f?sowbForms.displayNotice(n,soWidgets.backup.newerVersion,soWidgets.backup.replaceWarning,[{label:soWidgets.backup.restore,callback:function(e){sowbForms.setWidgetFormValues(r,p),e.slideUp("fast",(function(){e.remove()}))}},{label:soWidgets.backup.dismiss,callback:function(e){e.slideUp("fast",(function(){sessionStorage.removeItem(l),e.remove()}))}}]):sessionStorage.removeItem(l)),n.on("change",(function(){g.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(n);sessionStorage.setItem(l,JSON.stringify(e))}))}}else r=n.closest(".siteorigin-widget-form-main");r.find("> .siteorigin-widgets-form-id").val();var c=n.find("> .siteorigin-widget-field");c.find("> .siteorigin-widget-section").sowSetupForm();var u=c.find("> .siteorigin-widget-widget");u.find("> .siteorigin-widget-section").sowSetupForm(),u.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),c.find(".siteorigin-widget-input").each((function(i,t){null===e(t).data("original-name")&&e(t).data("original-name",e(t).attr("name"))})),c.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),n.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),c.find("> .siteorigin-widget-input-color").each((function(){var i=e(this),t={change:function(i,t){setTimeout((function(){e(i.target).trigger("change")}),100)}};i.data("defaultColor")&&(t.defaultColor=i.data("defaultColor")),i.wpColorPicker(t)}));var w=function(i){("keyup"!=i.type||sowbForms.isEnter(i))&&(e(this).toggleClass("siteorigin-widget-section-visible"),e(this).parent().find("> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section").slideToggle("fast",(function(){(e(window).trigger("resize"),e(this).find("> .siteorigin-widget-field-container-state").val(e(this).is(":visible")?"open":"closed"),e(this).is(":visible"))&&e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})))};c.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").on("click keyup",w).attr("tabinex",0),c.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").on("click keyup",w),c.filter(".siteorigin-widget-field-type-slider").each((function(){var i=e(this),t=i.find('input[type="number"]'),r=i.find(".siteorigin-widget-value-slider");r.slider({max:parseFloat(t.attr("max")),min:parseFloat(t.attr("min")),step:parseFloat(t.attr("step")),value:parseFloat(t.val()),slide:function(e,r){t.val(parseFloat(r.value)),t.trigger("change"),i.find(".siteorigin-widget-slider-value").html(r.value)}}),t.on("change",(function(e,i){i&&i.silent||r.slider("value",parseFloat(t.val()))}))})),c.filter(".siteorigin-widget-field-type-link").each((function(){var i=e(this),t=function(){var t=i.find(".content-text-search"),r=t.val(),n=t.data("postTypes"),a=i.find("ul.posts").empty().addClass("loading");e.get(soWidgets.ajaxurl,{action:"so_widgets_search_posts",query:r,postTypes:n},(function(i){for(var t=0;t<i.length;t++)""===i[t].label&&(i[t].label="&nbsp;"),a.append(e("<li>").addClass("post").html(i[t].label+"<span>("+i[t].type+")</span>").data(i[t]).attr("tabindex",0));a.removeClass("loading")}))};i.find(".select-content-button, .button-close").on("click",(function(r){r.preventDefault(),e(this).trigger("blur");var n=i.find(".existing-content-selector");n.toggle(),n.is(":visible")&&0===n.find("ul.posts li").length&&t()})),i.on("click keyup",".posts li",(function(t){if(t.preventDefault(),"keyup"!=t.type||sowbForms.isEnter(t)){var r=e(this);i.find("input.siteorigin-widget-input").val("post: "+r.data("value")),i.trigger("change"),i.find(".existing-content-selector").toggle()}}));var r=null;i.find(".content-text-search").on("keyup",(function(){null!==r&&clearTimeout(r),r=setTimeout((function(){t()}),500)}))})),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&c.filter(".siteorigin-widget-field-type-builder").each((function(){e(this).find("> .siteorigin-page-builder-field").each((function(){var i=e(this);i.soPanelsSetupBuilderWidget({builderType:i.data("type")})}))}));var m=function(){var i=e(this),t=i.closest("[data-state-emitter]").data("state-emitter");if(void 0!==t){var n=function(t,r){if(void 0===sowEmitters[t.callback]||"_"===t.callback.substr(0,1))return r;if(i.is('[type="radio"]')&&!i.is(":checked"))return r;var n=sowbForms.getContainerFieldId(i,"repeater",".siteorigin-widget-field-repeater-item");!1!==n&&(t.args=t.args.map((function(e){return e.replace("{$repeater}",n)})));var a=sowbForms.getContainerFieldId(i,"widget",".siteorigin-widget-widget");!1===a||t.hasOwnProperty("widgetFieldId")||(t.widgetFieldId=a,t.args=t.args.map((function(e){return e="conditional"===t.callback?e.replace(/(.*)(\[.*)/,"$1_"+a+"$2"):e+"_"+a})));var s=i.is('[type="checkbox"]')?i.is(":checked"):i.val();return i.parent().hasClass("siteorigin-widget-field-type-media")&&"conditional"==t.callback&&(s||(s=i.hasClass("media-fallback-external")?i.prev().val():fallbackField=i.next().val()),0==s&&(s="")),e.extend(r,sowEmitters[t.callback](s,t.args))},a={default:""};void 0===t.length&&(t=[t]);for(var s=0;s<t.length;s++)a=n(t[s],a);var o=r.data("states");for(var d in void 0===o&&(o={default:""}),a)void 0!==o[d]&&a[d]===o[d]||(o[d]=a[d],r.trigger("sowstatechange",[d,a[d]]));r.data("states",o)}};c.filter("[data-state-emitter]").each((function(){var i=e(this).find(".siteorigin-widget-input");i.on("keyup change",m),i.each((function(){var i=e(this);i.is(":radio")?i.is(":checked")&&m.call(i[0]):m.call(i[0])}))})),n.trigger("sowsetupform",c).data("sow-form-setup",!0),c.trigger("sowsetupformfield"),n.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(s.hasClass("wp-customizer")||s.hasClass("widgets-php"))&&n.closest(".ui-sortable").on("sortstop",(function(e,i){i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")})),a=!1}))},e.fn.sowSetupPreview=function(){var i=e(this);i.siblings(".siteorigin-widget-preview").find("> a").on("click",(function(t){t.preventDefault();var r=sowbForms.getWidgetFormValues(i),n=e(e("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");n.find('input[name="data"]').val(JSON.stringify(r)),n.find('input[name="class"]').val(i.data("class")),n.find("iframe").on("load",(function(){e(this).css("visibility","visible")})),n.find("form").trigger("submit"),n.find(".close").on("click keyup",(function(e){("keyup"!=e.type||sowbForms.isEnter(e))&&n.remove()}))}))},e.fn.sowSetupRepeater=function(){return e(this).each((function(i,t){var r=e(t),n=r.find(".siteorigin-widget-field-repeater-items"),a=r.data("repeater-name");n.bind("updateFieldPositions",(function(){var i=e(this),t=i.find("> .siteorigin-widget-field-repeater-item");t.each((function(i,t){e(t).find(".siteorigin-widget-input").each((function(t,r){var n=e(r).data("repeater-positions");void 0===n&&(n={}),n[a]=i,e(r).data("repeater-positions",n)}))})),i.find(".siteorigin-widget-input").each((function(i,t){var r=e(t),n=r.data("repeater-positions");if(void 0!==n){var a=r.attr("data-original-name");if(a||(r.attr("data-original-name",r.attr("name")),a=r.attr("name")),!a)return;if(n)for(var s in n)a=a.replace("#"+s+"#",n[s]);r.attr("name",a)}})),i.data("initialSetup")||(i.find(".siteorigin-widget-input").each((function(i,t){var r=e(t);r.prop("checked",r.prop("defaultChecked"))})),i.data("initialSetup",!0));var n=r.data("scroll-count")?parseInt(r.data("scroll-count")):0;if(n>0&&t.length>n){var s=t.first().outerHeight();i.css("max-height",s*n+"px"),i.css("overflow","auto")}else i.css("max-height","").css("overflow","")})),n.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){n.find('input[type="radio"].siteorigin-widget-input').attr("name",""),n.trigger("updateFieldPositions"),r.trigger("change")},sortstop:function(i,t){t.item.is(".siteorigin-widget-field-repeater-item")?t.item.find("> .siteorigin-widget-field-repeater-item-form").each((function(){e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})):t.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield");r.trigger("change")}}),n.trigger("updateFieldPositions"),r.find("> .siteorigin-widget-field-repeater-add").disableSelection().on("click keyup",(function(i){i.preventDefault(),("keyup"!=i.type||sowbForms.isEnter(i))&&r.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",(function(){e(window).trigger("resize")}))})),r.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").on("click",(function(i){i.preventDefault(),r.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",(function(){e(window).trigger("resize")}))}))}))},e.fn.sowAddRepeaterItem=function(){return e(this).each((function(i,t){var r=e(t),n=r.find("> .siteorigin-widget-field-repeater-items").children().length+1,a=e("<div>"+r.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");a.find(".siteorigin-widget-input[data-name]").each((function(){var i=e(this);0===i.closest(".siteorigin-widget-field-repeater-item-html").length&&i.attr("name",e(this).data("name"))}));var s="";a.find("> .siteorigin-widget-field").each((function(i,t){var r=t.outerHTML;e(t).is(".siteorigin-widget-field-type-repeater")||(r=r.replace(/_id_/g,n)),s+=r}));var o=void 0!==r.attr("readonly"),d=e('<div class="siteorigin-widget-field-repeater-item ui-draggable"></div>').append(e('<div class="siteorigin-widget-field-repeater-item-top" tabindex="0" />').append(e('<div class="siteorigin-widget-field-expand" tabindex="0" />')).append(o?"":e('<div class="siteorigin-widget-field-copy" tabindex="0" />')).append(o?"":e('<div class="siteorigin-widget-field-remove" tabindex="0" />')).append(e("<h4></h4>").html(r.data("item-name")))).append(e('<div class="siteorigin-widget-field-repeater-item-form"></div>').html(s));r.find("> .siteorigin-widget-field-repeater-items").append(d).sortable("refresh").trigger("updateFieldPositions"),d.sowSetupRepeaterItems(),d.hide().slideDown("fast",(function(){e(window).trigger("resize")})),r.trigger("change")}))},e.fn.sowRemoveRepeaterItem=function(){return e(this).each((function(i,t){var r=e(this).closest(".siteorigin-widget-field-repeater-items");e(this).remove(),r.sortable("refresh").trigger("updateFieldPositions"),e(t).trigger("change")}))},e.fn.sowSetupRepeaterItems=function(){return e(this).each((function(i,t){var r=e(t);if(void 0===r.data("sowrepeater-actions-setup")){var n=r.closest(".siteorigin-widget-field-repeater"),a=r.find("> .siteorigin-widget-field-repeater-item-top"),s=n.data("item-label"),o=r.parents(".siteorigin-widget-field-repeater").data("item-name");if(s&&(s.hasOwnProperty("selector")||s.hasOwnProperty("selectorArray"))){var d=function(){var e,i,t;if(s.hasOwnProperty("selectorArray"))for(var n=0;n<s.selectorArray.length&&(e=(t=s.selectorArray[n]).hasOwnProperty("valueMethod")&&t.valueMethod?t.valueMethod:"val",!(i=r.find(t.selector)[e]()));n++);else e=s.hasOwnProperty("valueMethod")&&s.valueMethod?s.valueMethod:"val",i=r.find(s.selector)[e]();i?(i.length>80&&(i=i.substr(0,79)+"..."),a.find("h4").text(i)):a.find("h4").text(o)};d();var l=s.hasOwnProperty("updateEvent")&&s.updateEvent?s.updateEvent:"change";r.bind(l,d)}a.on("click keyup",(function(i){"siteorigin-widget-field-remove"!==i.target.className&&"siteorigin-widget-field-copy"!==i.target.className&&("keyup"!=i.type||sowbForms.isEnter(i))&&(i.preventDefault(),e(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",(function(){e(window).trigger("resize"),e(this).is(":visible")?(e(this).trigger("slideToggleOpenComplete"),e(this).find(".siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field,> .siteorigin-widget-field").each((function(i,t){var r=e(t);r.is(":visible")&&r.trigger("sowsetupformfield")}))):e(this).trigger("slideToggleCloseComplete")})))})),a.find(".siteorigin-widget-field-remove").on("click keyup",(function(i,t){if(i.preventDefault(),"keyup"!=i.type||sowbForms.isEnter(i)){var r=e(this).closest(".siteorigin-widget-field-repeater-items"),a=e(this).closest(".siteorigin-widget-field-repeater-item"),s=function(){a.remove(),r.sortable("refresh").trigger("updateFieldPositions"),e(window).trigger("resize"),n.trigger("change")};t&&t.silent?s():confirm(soWidgets.sure)&&a.slideUp("fast",s)}})),a.find(".siteorigin-widget-field-copy").on("click keyup",(function(i){if(i.preventDefault(),"keyup"!=i.type||sowbForms.isEnter(i)){var t=e(this).closest(".siteorigin-widget-form-main"),n=e(this).closest(".siteorigin-widget-field-repeater-item"),a=n.clone(),s=n.closest(".siteorigin-widget-field-repeater-items"),o=s.children().length,d={};a.find("*[name]").each((function(){var i=e(this),s=i.attr("id"),l=i.attr("name");if(i.is("textarea")&&i.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){i.parent().empty().append(i),i.css("display","");var g=tinymce.get(s);if(g){var f=g.getContent();_.isEmpty(f)?-1!==f.search("<")&&-1===f.search(">")&&$textarea.val(f.replace(/</g,"")):i.val(f)}}else if(i.is(".wp-color-picker")){var p=i.closest(".wp-picker-container"),c=i.closest(".siteorigin-widget-field");p.remove(),c.append(i.remove())}else{var u=s?n.find("#"+s):n.find('[name="'+l+'"]');u.length&&null!=u.val()&&i.val(u.val())}if(s){var w,m;if(i.is('[type="radio"]')){w=s.replace(/-\d+-\d+$/,"");var v=s.replace(/-\d+$/,"");if(!d[w]){var h={};d[w]=t.find(".siteorigin-widget-input[id^="+w+"]").not("[id*=_id_]").filter((function(i,t){var r=e(t).attr("name");return!h[r]&&(h[r]=!0,!0)})).length+1}var b=w+"-"+d[w];m=b+s.match(/-\d+$/)[0],a.find("label[for="+v+"]").attr("for",b)}else F=new RegExp("-\\d+$"),w=s.replace(F,""),d[w]||(d[w]=t.find(".siteorigin-widget-input[id^="+w+"]").not("[id*=_id_]").length+1),m=w+"-"+d[w]++;if(i.is(".wp-editor-area")&&(m+=Math.floor(1e3*Math.random()),i.data("tinymce-id",m)),i.attr("id",m),i.is(".wp-editor-area")){var y=i.closest(".siteorigin-widget-tinymce-container"),k=y.data("media-buttons");if(k&&k.html){var F=new RegExp(s,"g");k.html=k.html.replace(F,m),y.data("media-buttons",k)}}a.find("label[for="+s+"]").attr("for",m),a.find("[id*="+s+"]").each((function(){var i=e(this).attr("id").replace(s,m);e(this).attr("id",i)})),"undefined"!=typeof tinymce&&tinymce.get(m)&&tinymce.get(m).remove()}var x=n.parents(".siteorigin-widget-field-repeater").length,C=e("body");(C.hasClass("wp-customizer")||C.hasClass("widgets-php"))&&0===r.closest(".panel-dialog").length&&(x+=1);var E=l.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(x-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+o.toString()+"$3");i.attr("name",E),i.data("original-name",E)})),s.append(a).sortable("refresh").trigger("updateFieldPositions"),a.sowSetupRepeaterItems(),a.hide().slideDown("fast",(function(){e(window).trigger("resize")})),r.trigger("change")}})),r.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),r.data("sowrepeater-actions-setup",!0)}}))},sowbForms.getContainerFieldId=function(e,i,t){var r=i+"FieldId";this.hasOwnProperty(r)||(this[r]=1);var n=e.closest(t);if(n.length){var a=n.data("field-id");return void 0===a&&(a=this[r]++),n.data("field-id",a),a}return!1},sowbForms.getWidgetFieldVariable=function(e,i,t){var r=window.sow_field_javascript_variables[e];i=i.replace(/\[#.*?#\]/g,"");for(var n=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(i)[1].split("]["),a=n.length?r:null;n.length;)a=a[n.shift()];return a[t]},sowbForms.fetchWidgetVariable=function(i,t,r){window.sowVars=window.sowVars||{},void 0===window.sowVars[t]?e.post(soWidgets.ajaxurl,{action:"sow_get_javascript_variables",widget:t,key:i},(function(e){window.sowVars[t]=e,r(window.sowVars[t][i])})):r(window.sowVars[t][i])},sowbForms.getWidgetIdBase=function(e){return e.data("id-base")},sowbForms.getWidgetFormValues=function(i){if(_.isUndefined(i))return null;var t={};return i.find("*[name]").each((function(){var i=e(this);try{var r=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(r))return!0;var n=(r=r[1]).split("][");n=n.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));var a=t,s=null,o=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===o)s=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===o){if(!i.is(":checked"))return;s=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var d=null;"undefined"!=typeof tinyMCE&&(d=tinyMCE.get(i.attr("id"))),s=null===d||"function"!=typeof d.getContent||d.isHidden()?i.val():d.getContent()}else if("SELECT"===i.prop("tagName")){var l=i.find("option:selected");1===l.length?s=i.find("option:selected").val():l.length>1&&(s=_.map(i.find("option:selected"),(function(i,t){return e(i).val()})))}else s=i.val();for(var g=0;g<n.length;g++)g===n.length-1?""===n[g]?a.push(s):a[n[g]]=s:(_.isUndefined(a[n[g]])&&(_.isNumber(n[g+1])||""===n[g+1]?a[n[g]]=[]:a[n[g]]={}),a=a[n[g]])}catch(e){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+e.message)}})),t},sowbForms.isEnter=function(i,t=!1){if(13==i.which){if(!t)return!0;e(i.target).trigger("click")}},sowbForms.setWidgetFormValues=function(i,t,r,n){r=r||!1,n=void 0!==n&&n||void 0===n;var a=0,s=function(i,t){10!=++a?(i.find("> .siteorigin-widget-field-type-repeater,> .siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field-type-repeater").each((function(i,n){var a=e(this),o=a.find("> .siteorigin-widget-field-repeater"),d=o.data("repeaterName"),l=t.hasOwnProperty(d)?t[d]:null;if(a.parent().is(".siteorigin-widget-section")){var g=o.data("element-name");g=g.replace(/\[#.*?#\]/g,"");for(var f=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(g)[1].split("]["),p=f.length?t:null;f.length;){var c=f.shift();p=p.hasOwnProperty(c)?p[c]:p}l=p}if(l&&Array.isArray(l)){var u=o.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),w=l.length,m=u.length;if(w>m)for(var v=0;v<w-m;v++)o.find("> .siteorigin-widget-field-repeater-add").trigger("click");else if(!r&&w<m)for(var h=w;h<m;h++){e(u.eq(h)).find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}u=o.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var b=0;b<u.length;b++)u.eq(b).find("> .siteorigin-widget-field-repeater-item-form"),s(u.eq(b).find("> .siteorigin-widget-field-repeater-item-form"),l[b])}})),--a):--a};s(i,t),i.find("*[name]").each((function(){var i=e(this),a=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(null==a)return!0;var s=(a=a[1]).split("][");s=s.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));for(var o,d=t,l=0;l<s.length;l++){if(!d.hasOwnProperty(s[l])){if(r)return!0;break}l===s.length-1?o=d[s[l]]:d=d[s[l]]}if("checkbox"===i.attr("type"))i.prop("checked",o);else if("radio"===i.attr("type"))i.prop("checked",o===i.val());else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var g=null;"undefined"!=typeof tinyMCE&&(g=tinyMCE.get(i.attr("id"))),null!==g&&"function"==typeof g.setContent&&!g.isHidden()&&i.parent().is(":visible")?g.initialized?g.setContent(o):g.on("init",(function(){g.setContent(o)})):i.val(o)}else if(i.is(".panels-data")){i.val(o);var f=i.data("builder");f&&f.setDataField(i)}else i.val(o);n&&(i.trigger("change"),this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})))}))},sowbForms.displayNotice=function(i,t,r,n,a){var s=e('<div class="siteorigin-widget-form-notification"></div>');t&&s.append("<span>"+t+"</span>"),n&&n.length&&n.forEach((function(i){var t="";i.classes&&i.classes.length&&(t=" "+i.classes.join(" "));var r=e('<a class="button button-small'+t+'" tabindex="0">'+i.label+"</a>");i.url&&r.attr("href",i.url),i.callback&&r.on("click keyup",(function(e){("keyup"!=e.type||sowbForms.isEnter(e))&&i.callback(s)})),s.append(r)})),r&&s.append("<div><small>"+r+"</small></div>"),a?a.before(s):i.prepend(s)},e(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",(function(){var i=e(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout((function(){i.sowSetupForm()}),200)}));var i=e("body");i.hasClass("wp-customizer")&&e(document).on("widget-added",(function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()})),i.hasClass("block-editor-page")&&e(document).on("panels_setup_preview",(function(){window.hasOwnProperty("sowb")&&e(sowb).trigger("setup_widgets",{preview:!0})})),e(document).on("open_dialog",(function(e,i){i.$el.find(".so-panels-dialog").is(".so-panels-dialog-edit-widget")&&i.$el.find(".siteorigin-widget-form-main").find("> .siteorigin-widget-field").trigger("sowsetupformfield")})),e((function(){e(document).trigger("sowadminloaded")}))}(jQuery);var sowEmitters={_match:function(e,i){void 0===i&&(i=".*");var t=new RegExp("^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *("+i+") *$").exec(e);if(null===t)return!1;var r="",n="default";return void 0!==t[3]?(n=t[1],r=t[3]):r=t[1],{match:t[4].trim(),group:n,state:r}},_checker:function(e,i,t,r){var n,a={};void 0===i.length&&(i=[i]);for(var s=0;s<i.length;s++)!1!==(n=sowEmitters._match(i[s],t))&&("_true"===n.match||r(e,i,n.match))&&(a[n.group]=n.state);return a},select:function(e,i){void 0===i.length&&(i=[i]);for(var t={},r=0;r<i.length;r++)""===i[r]&&(i[r]="default"),t[i[r]]=e;return t},conditional:function(val,args){return sowEmitters._checker(val,args,"[^;{}]*",(function(val,args,match){return eval(match)}))},in:function(e,i){return sowEmitters._checker(e,i,"[^;{}]*",(function(e,i,t){return-1!==t.split(",").map((function(e){return e.trim()})).indexOf(e)}))}};window.sowbForms=sowbForms;
1
+ var sowbForms=window.sowbForms||{};!function(e){e.fn.sowSetupForm=function(){return e(this).each((function(i,t){var r,n=e(t),a=!0,s=e("body"),o=n.find("input[name]");if(o.length&&-1!==o.attr("name").indexOf("__i__"))return this;if(n.is(".siteorigin-widget-form-main")){if(!0===n.data("sow-form-setup"))return!0;if(s.hasClass("widgets-php")&&!n.is(":visible")&&0===n.closest(".panel-dialog").length)return!0;n.on("sowstatechange",(function(i,t,r){n.find("[data-state-handler]").each((function(){var i,n,s,o,d,l,g=e(this),f=e.extend({},g.data("state-handler"),a?g.data("state-handler-initial"):{});if(0===Object.keys(f).length)return!0;var p={},c=sowbForms.getContainerFieldId(g,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==c){var u={};for(var w in f)u[w.replace("{$repeater}",c)]=f[w];f=u}var m=sowbForms.getContainerFieldId(g,"widget",".siteorigin-widget-widget");if(!1!==m){var v={};for(var h in f){var b=h.match(/_else\[(.*)\]|(.*)\[(.*)\]/);v[b&&b.length&&void 0===b[1]?b[2]+"_"+m+"["+b[3]+"]":"_else["+b[1]+"_"+m+"]"]=f[h]}f=v}for(var y in f)if(d=!1,null!==(i=y.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?$/))){if(n={group:"default",name:"",multi:!1},void 0!==i[2]?(n.group=i[1],n.name=i[3]):n.name=i[0],n.multi=void 0!==i[4],"_else"===n.group)n.group=n.name,n.name="",d=n.group===t&&void 0===p[n.group];else{l=n.name.split(",").map((function(e){return e.trim()}));for(var k=0;k<l.length&&!(d=n.group===t&&l[k]===r);k++);}if(d){s=f[y],n.multi||(s=[s]);for(k=0;k<s.length;k++){var F=!1;if((o=void 0!==s[k][1]&&Boolean(s[k][1])?g.find(s[k][1]):g).prop("style").length&&("show"==s[k][0]?(o.fadeIn("fast"),F=!0):"hide"==s[k][0]&&(o.fadeOut("fast"),F=!0)),F||o[s[k][0]].apply(o,void 0!==s[k][2]?s[k][2]:[]),o.is(".siteorigin-widget-field:visible"))if(o.is(".siteorigin-widget-field-type-section"))o.find("> .siteorigin-widget-section > .siteorigin-widget-field").trigger("sowsetupformfield");else o.trigger("sowsetupformfield")}p[n.group]=!0}}}))})),n.sowSetupPreview(),r=n;var d=n.find(".siteorigin-widget-teaser");if(d.find(".dashicons-dismiss").on("click",(function(){var i=e(this);e.get(i.data("dismiss-url")),d.slideUp("normal",(function(){d.remove()}))})),!n.data("backupDisabled")){var l=n.find("> .siteorigin-widgets-form-id").val(),g=n.find("> .siteorigin-widgets-form-timestamp"),f=parseInt(g.val()||0),p=JSON.parse(sessionStorage.getItem(l));p&&(p._sow_form_timestamp>f?sowbForms.displayNotice(n,soWidgets.backup.newerVersion,soWidgets.backup.replaceWarning,[{label:soWidgets.backup.restore,callback:function(e){sowbForms.setWidgetFormValues(r,p),e.slideUp("fast",(function(){e.remove()}))}},{label:soWidgets.backup.dismiss,callback:function(e){e.slideUp("fast",(function(){sessionStorage.removeItem(l),e.remove()}))}}]):sessionStorage.removeItem(l)),n.on("change",(function(){g.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(n);sessionStorage.setItem(l,JSON.stringify(e))}))}}else r=n.closest(".siteorigin-widget-form-main");r.find("> .siteorigin-widgets-form-id").val();var c=n.find("> .siteorigin-widget-field");c.find("> .siteorigin-widget-section").sowSetupForm();var u=c.find("> .siteorigin-widget-widget");u.find("> .siteorigin-widget-section").sowSetupForm(),u.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),c.find(".siteorigin-widget-input").each((function(i,t){null===e(t).data("original-name")&&e(t).data("original-name",e(t).attr("name"))})),c.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),n.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),c.find("> .siteorigin-widget-input-color").each((function(){var i=e(this),t={change:function(i,t){setTimeout((function(){e(i.target).trigger("change")}),100)}};i.data("defaultColor")&&(t.defaultColor=i.data("defaultColor")),i.wpColorPicker(t)}));var w=function(i){("keyup"!=i.type||sowbForms.isEnter(i))&&(e(this).toggleClass("siteorigin-widget-section-visible"),e(this).parent().find("> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section").slideToggle("fast",(function(){(e(window).trigger("resize"),e(this).find("> .siteorigin-widget-field-container-state").val(e(this).is(":visible")?"open":"closed"),e(this).is(":visible"))&&e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})))};c.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").on("click keyup",w).attr("tabinex",0),c.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").on("click keyup",w),c.filter(".siteorigin-widget-field-type-slider").each((function(){var i=e(this),t=i.find('input[type="number"]'),r=i.find(".siteorigin-widget-value-slider");r.slider({max:parseFloat(t.attr("max")),min:parseFloat(t.attr("min")),step:parseFloat(t.attr("step")),value:parseFloat(t.val()),slide:function(e,r){t.val(parseFloat(r.value)),t.trigger("change"),i.find(".siteorigin-widget-slider-value").html(r.value)}}),t.on("change",(function(e,i){i&&i.silent||r.slider("value",parseFloat(t.val()))}))})),c.filter(".siteorigin-widget-field-type-link").each((function(){var i=e(this),t=function(){var t=i.find(".content-text-search"),r=t.val(),n=t.data("postTypes"),a=i.find("ul.posts").empty().addClass("loading");e.get(soWidgets.ajaxurl,{action:"so_widgets_search_posts",query:r,postTypes:n},(function(i){for(var t=0;t<i.length;t++)""===i[t].label&&(i[t].label="&nbsp;"),a.append(e("<li>").addClass("post").html(i[t].label+"<span>("+i[t].type+")</span>").data(i[t]).attr("tabindex",0));a.removeClass("loading")}))};i.find(".select-content-button, .button-close").on("click",(function(r){r.preventDefault(),e(this).trigger("blur");var n=i.find(".existing-content-selector");n.toggle(),n.is(":visible")&&0===n.find("ul.posts li").length&&t()})),i.on("click keyup",".posts li",(function(t){if(t.preventDefault(),"keyup"!=t.type||sowbForms.isEnter(t)){var r=e(this);i.find("input.siteorigin-widget-input").val("post: "+r.data("value")),i.trigger("change"),i.find(".existing-content-selector").toggle()}}));var r=null;i.find(".content-text-search").on("keyup",(function(){null!==r&&clearTimeout(r),r=setTimeout((function(){t()}),500)}))})),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&c.filter(".siteorigin-widget-field-type-builder").each((function(){e(this).find("> .siteorigin-page-builder-field").each((function(){var i=e(this);i.soPanelsSetupBuilderWidget({builderType:i.data("type")})}))}));var m=function(){var i=e(this),t=i.closest("[data-state-emitter]").data("state-emitter");if(void 0!==t){var n=function(t,r){if(void 0===sowEmitters[t.callback]||"_"===t.callback.substr(0,1))return r;if(i.is('[type="radio"]')&&!i.is(":checked"))return r;var n=sowbForms.getContainerFieldId(i,"repeater",".siteorigin-widget-field-repeater-item");!1!==n&&(t.args=t.args.map((function(e){return e.replace("{$repeater}",n)})));var a=sowbForms.getContainerFieldId(i,"widget",".siteorigin-widget-widget");!1===a||t.hasOwnProperty("widgetFieldId")||(t.widgetFieldId=a,t.args=t.args.map((function(e){return e="conditional"===t.callback?e.replace(/(.*)(\[.*)/,"$1_"+a+"$2"):e+"_"+a})));var s=i.is('[type="checkbox"]')?i.is(":checked"):i.val();return i.parent().hasClass("siteorigin-widget-field-type-media")&&"conditional"==t.callback&&(s||(s=i.hasClass("media-fallback-external")?i.prev().val():fallbackField=i.next().val()),0==s&&(s="")),e.extend(r,sowEmitters[t.callback](s,t.args))},a={default:""};void 0===t.length&&(t=[t]);for(var s=0;s<t.length;s++)a=n(t[s],a);var o=r.data("states");for(var d in void 0===o&&(o={default:""}),a)void 0!==o[d]&&a[d]===o[d]||(o[d]=a[d],r.trigger("sowstatechange",[d,a[d]]));r.data("states",o)}};c.filter("[data-state-emitter]").each((function(){var i=e(this).find(".siteorigin-widget-input");i.on("keyup change",m),i.each((function(){var i=e(this);i.is(":radio")?i.is(":checked")&&m.call(i[0]):m.call(i[0])}))})),n.trigger("sowsetupform",c).data("sow-form-setup",!0),c.trigger("sowsetupformfield"),n.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(s.hasClass("wp-customizer")||s.hasClass("widgets-php"))&&n.closest(".ui-sortable").on("sortstop",(function(e,i){i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")})),a=!1}))},e.fn.sowSetupPreview=function(){var i=e(this);i.siblings(".siteorigin-widget-preview").find("> a").on("click",(function(t){t.preventDefault();var r=sowbForms.getWidgetFormValues(i),n=e(e("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");n.find('input[name="data"]').val(JSON.stringify(r)),n.find('input[name="class"]').val(i.data("class")),n.find("iframe").on("load",(function(){e(this).css("visibility","visible")})),n.find("form").trigger("submit"),n.find(".close").on("click keyup",(function(e){("keyup"!=e.type||sowbForms.isEnter(e))&&n.remove()}))}))},e.fn.sowSetupRepeater=function(){return e(this).each((function(i,t){var r=e(t),n=r.find(".siteorigin-widget-field-repeater-items"),a=r.data("repeater-name");n.bind("updateFieldPositions",(function(){var i=e(this),t=i.find("> .siteorigin-widget-field-repeater-item");t.each((function(i,t){e(t).find(".siteorigin-widget-input").each((function(t,r){var n=e(r).data("repeater-positions");void 0===n&&(n={}),n[a]=i,e(r).data("repeater-positions",n)}))})),i.find(".siteorigin-widget-input").each((function(i,t){var r=e(t),n=r.data("repeater-positions");if(void 0!==n){var a=r.attr("data-original-name");if(a||(r.attr("data-original-name",r.attr("name")),a=r.attr("name")),!a)return;if(n)for(var s in n)a=a.replace("#"+s+"#",n[s]);r.attr("name",a)}})),i.data("initialSetup")||(i.find(".siteorigin-widget-input").each((function(i,t){var r=e(t);r.prop("checked",r.prop("defaultChecked"))})),i.data("initialSetup",!0));var n=r.data("scroll-count")?parseInt(r.data("scroll-count")):0;if(n>0&&t.length>n){var s=t.first().outerHeight();i.css("max-height",s*n+"px"),i.css("overflow","auto")}else i.css("max-height","").css("overflow","")})),n.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){n.find('input[type="radio"].siteorigin-widget-input').attr("name",""),n.trigger("updateFieldPositions"),r.trigger("change")},sortstop:function(i,t){t.item.is(".siteorigin-widget-field-repeater-item")?t.item.find("> .siteorigin-widget-field-repeater-item-form").each((function(){e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})):t.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield");r.trigger("change")}}),n.trigger("updateFieldPositions"),r.find("> .siteorigin-widget-field-repeater-add").disableSelection().on("click keyup",(function(i){i.preventDefault(),("keyup"!=i.type||sowbForms.isEnter(i))&&r.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",(function(){e(window).trigger("resize")}))})),r.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").on("click",(function(i){i.preventDefault(),r.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",(function(){e(window).trigger("resize")}))}))}))},e.fn.sowAddRepeaterItem=function(){return e(this).each((function(i,t){var r=e(t),n=r.find("> .siteorigin-widget-field-repeater-items").children().length+1,a=e("<div>"+r.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");a.find(".siteorigin-widget-input[data-name]").each((function(){var i=e(this);0===i.closest(".siteorigin-widget-field-repeater-item-html").length&&i.attr("name",e(this).data("name"))}));var s="";a.find("> .siteorigin-widget-field").each((function(i,t){var r=t.outerHTML;e(t).is(".siteorigin-widget-field-type-repeater")||(r=r.replace(/_id_/g,n)),s+=r}));var o=void 0!==r.attr("readonly"),d=e('<div class="siteorigin-widget-field-repeater-item ui-draggable"></div>').append(e('<div class="siteorigin-widget-field-repeater-item-top" tabindex="0" />').append(e('<div class="siteorigin-widget-field-expand" tabindex="0" />')).append(o?"":e('<div class="siteorigin-widget-field-copy" tabindex="0" />')).append(o?"":e('<div class="siteorigin-widget-field-remove" tabindex="0" />')).append(e("<h4></h4>").html(r.data("item-name")))).append(e('<div class="siteorigin-widget-field-repeater-item-form"></div>').html(s));r.find("> .siteorigin-widget-field-repeater-items").append(d).sortable("refresh").trigger("updateFieldPositions"),d.sowSetupRepeaterItems(),d.hide().slideDown("fast",(function(){e(window).trigger("resize")})),r.trigger("change")}))},e.fn.sowRemoveRepeaterItem=function(){return e(this).each((function(i,t){var r=e(this).closest(".siteorigin-widget-field-repeater-items");e(this).remove(),r.sortable("refresh").trigger("updateFieldPositions"),e(t).trigger("change")}))},e.fn.sowSetupRepeaterItems=function(){return e(this).each((function(i,t){var r=e(t);if(void 0===r.data("sowrepeater-actions-setup")){var n=r.closest(".siteorigin-widget-field-repeater"),a=r.find("> .siteorigin-widget-field-repeater-item-top"),s=n.data("item-label"),o=r.parents(".siteorigin-widget-field-repeater").data("item-name");if(s&&(s.hasOwnProperty("selector")||s.hasOwnProperty("selectorArray"))){var d=function(){var e,i,t;if(s.hasOwnProperty("selectorArray"))for(var n=0;n<s.selectorArray.length&&(e=(t=s.selectorArray[n]).hasOwnProperty("valueMethod")&&t.valueMethod?t.valueMethod:"val",!(i=r.find(t.selector)[e]()));n++);else e=s.hasOwnProperty("valueMethod")&&s.valueMethod?s.valueMethod:"val",i=r.find(s.selector)[e]();if(i)i.length>80&&(i=i.substr(0,79)+"...");else if(i=o,s.increment){var d=r.index();d++,isNaN(d)||("before"==s.increment?i=d+" "+i:i+=" "+d)}a.find("h4").text(i)};d();var l=s.hasOwnProperty("updateEvent")&&s.updateEvent?s.updateEvent:"change";r.on(l,d)}a.on("click keyup",(function(i){"siteorigin-widget-field-remove"!==i.target.className&&"siteorigin-widget-field-copy"!==i.target.className&&("keyup"!=i.type||sowbForms.isEnter(i))&&(i.preventDefault(),e(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",(function(){e(window).trigger("resize"),e(this).is(":visible")?(e(this).trigger("slideToggleOpenComplete"),e(this).find(".siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field,> .siteorigin-widget-field").each((function(i,t){var r=e(t);r.is(":visible")&&r.trigger("sowsetupformfield")}))):e(this).trigger("slideToggleCloseComplete")})))})),a.find(".siteorigin-widget-field-remove").on("click keyup",(function(i,t){if(i.preventDefault(),"keyup"!=i.type||sowbForms.isEnter(i)){var a=e(this).closest(".siteorigin-widget-field-repeater-items"),s=e(this).closest(".siteorigin-widget-field-repeater-item"),o=function(){s.remove(),a.sortable("refresh").trigger("updateFieldPositions"),e(window).trigger("resize"),n.trigger("change")};t&&t.silent?o():confirm(soWidgets.sure)&&s.slideUp("fast",o),"string"==typeof r.closest(".siteorigin-widget-field-repeater").data("item-label").increment&&r.parent().find(".siteorigin-widget-field-repeater-item").trigger("change")}})),a.find(".siteorigin-widget-field-copy").on("click keyup",(function(i){if(i.preventDefault(),"keyup"!=i.type||sowbForms.isEnter(i)){var t=e(this).closest(".siteorigin-widget-form-main"),n=e(this).closest(".siteorigin-widget-field-repeater-item"),a=n.clone(),s=n.closest(".siteorigin-widget-field-repeater-items"),o=s.children().length,d={};a.find("*[name]").each((function(){var i=e(this),s=i.attr("id"),l=i.attr("name");if(i.is("textarea")&&i.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){i.parent().empty().append(i),i.css("display","");var g=tinymce.get(s);if(g){var f=g.getContent();_.isEmpty(f)?-1!==f.search("<")&&-1===f.search(">")&&$textarea.val(f.replace(/</g,"")):i.val(f)}}else if(i.is(".wp-color-picker")){var p=i.closest(".wp-picker-container"),c=i.closest(".siteorigin-widget-field");p.remove(),c.append(i.remove())}else{var u=s?n.find("#"+s):n.find('[name="'+l+'"]');u.length&&null!=u.val()&&i.val(u.val())}if(s){var w,m;if(i.is('[type="radio"]')){w=s.replace(/-\d+-\d+$/,"");var v=s.replace(/-\d+$/,"");if(!d[w]){var h={};d[w]=t.find(".siteorigin-widget-input[id^="+w+"]").not("[id*=_id_]").filter((function(i,t){var r=e(t).attr("name");return!h[r]&&(h[r]=!0,!0)})).length+1}var b=w+"-"+d[w];m=b+s.match(/-\d+$/)[0],a.find("label[for="+v+"]").attr("for",b)}else F=new RegExp("-\\d+$"),w=s.replace(F,""),d[w]||(d[w]=t.find(".siteorigin-widget-input[id^="+w+"]").not("[id*=_id_]").length+1),m=w+"-"+d[w]++;if(i.is(".wp-editor-area")&&(m+=Math.floor(1e3*Math.random()),i.data("tinymce-id",m)),i.attr("id",m),i.is(".wp-editor-area")){var y=i.closest(".siteorigin-widget-tinymce-container"),k=y.data("media-buttons");if(k&&k.html){var F=new RegExp(s,"g");k.html=k.html.replace(F,m),y.data("media-buttons",k)}}a.find("label[for="+s+"]").attr("for",m),a.find("[id*="+s+"]").each((function(){var i=e(this).attr("id").replace(s,m);e(this).attr("id",i)})),"undefined"!=typeof tinymce&&tinymce.get(m)&&tinymce.get(m).remove()}var x=n.parents(".siteorigin-widget-field-repeater").length,C=e("body");(C.hasClass("wp-customizer")||C.hasClass("widgets-php"))&&0===r.closest(".panel-dialog").length&&(x+=1);var E=l.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(x-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+o.toString()+"$3");i.attr("name",E),i.data("original-name",E)})),s.append(a).sortable("refresh").trigger("updateFieldPositions"),a.sowSetupRepeaterItems(),a.hide().slideDown("fast",(function(){e(window).trigger("resize")})),"string"==typeof r.closest(".siteorigin-widget-field-repeater").data("item-label").increment?r.parent().find(".siteorigin-widget-field-repeater-item").trigger("change"):r.trigger("change")}})),r.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),r.data("sowrepeater-actions-setup",!0)}}))},sowbForms.getContainerFieldId=function(e,i,t){var r=i+"FieldId";this.hasOwnProperty(r)||(this[r]=1);var n=e.closest(t);if(n.length){var a=n.data("field-id");return void 0===a&&(a=this[r]++),n.data("field-id",a),a}return!1},sowbForms.getWidgetFieldVariable=function(e,i,t){var r=window.sow_field_javascript_variables[e];i=i.replace(/\[#.*?#\]/g,"");for(var n=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(i)[1].split("]["),a=n.length?r:null;n.length;)a=a[n.shift()];return a[t]},sowbForms.fetchWidgetVariable=function(i,t,r){window.sowVars=window.sowVars||{},void 0===window.sowVars[t]?e.post(soWidgets.ajaxurl,{action:"sow_get_javascript_variables",widget:t,key:i},(function(e){window.sowVars[t]=e,r(window.sowVars[t][i])})):r(window.sowVars[t][i])},sowbForms.getWidgetIdBase=function(e){return e.data("id-base")},sowbForms.getWidgetFormValues=function(i){if(_.isUndefined(i))return null;var t={};return i.find("*[name]").each((function(){var i=e(this);try{var r=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(r))return!0;var n=(r=r[1]).split("][");n=n.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));var a=t,s=null,o=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===o)s=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===o){if(!i.is(":checked"))return;s=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var d=null;"undefined"!=typeof tinyMCE&&(d=tinyMCE.get(i.attr("id"))),s=null===d||"function"!=typeof d.getContent||d.isHidden()?i.val():d.getContent()}else if("SELECT"===i.prop("tagName")){var l=i.find("option:selected");1===l.length?s=i.find("option:selected").val():l.length>1&&(s=_.map(i.find("option:selected"),(function(i,t){return e(i).val()})))}else s=i.val();for(var g=0;g<n.length;g++)g===n.length-1?""===n[g]?a.push(s):a[n[g]]=s:(_.isUndefined(a[n[g]])&&(_.isNumber(n[g+1])||""===n[g+1]?a[n[g]]=[]:a[n[g]]={}),a=a[n[g]])}catch(e){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+e.message)}})),t},sowbForms.isEnter=function(i,t=!1){if(13==i.which){if(!t)return!0;e(i.target).trigger("click")}},sowbForms.setWidgetFormValues=function(i,t,r,n){r=r||!1,n=void 0!==n&&n||void 0===n;var a=0,s=function(i,t){10!=++a?(i.find("> .siteorigin-widget-field-type-repeater,> .siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field-type-repeater").each((function(i,n){var a=e(this),o=a.find("> .siteorigin-widget-field-repeater"),d=o.data("repeaterName"),l=t.hasOwnProperty(d)?t[d]:null;if(a.parent().is(".siteorigin-widget-section")){var g=o.data("element-name");g=g.replace(/\[#.*?#\]/g,"");for(var f=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(g)[1].split("]["),p=f.length?t:null;f.length;){var c=f.shift();p=p.hasOwnProperty(c)?p[c]:p}l=p}if(l&&Array.isArray(l)){var u=o.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),w=l.length,m=u.length;if(w>m)for(var v=0;v<w-m;v++)o.find("> .siteorigin-widget-field-repeater-add").trigger("click");else if(!r&&w<m)for(var h=w;h<m;h++){e(u.eq(h)).find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}u=o.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var b=0;b<u.length;b++)u.eq(b).find("> .siteorigin-widget-field-repeater-item-form"),s(u.eq(b).find("> .siteorigin-widget-field-repeater-item-form"),l[b])}})),--a):--a};s(i,t),i.find("*[name]").each((function(){var i=e(this),a=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(null==a)return!0;var s=(a=a[1]).split("][");s=s.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));for(var o,d=t,l=0;l<s.length;l++){if(!d.hasOwnProperty(s[l])){if(r)return!0;break}l===s.length-1?o=d[s[l]]:d=d[s[l]]}if("checkbox"===i.attr("type"))i.prop("checked",o);else if("radio"===i.attr("type"))i.prop("checked",o===i.val());else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var g=null;"undefined"!=typeof tinyMCE&&(g=tinyMCE.get(i.attr("id"))),null!==g&&"function"==typeof g.setContent&&!g.isHidden()&&i.parent().is(":visible")?g.initialized?g.setContent(o):g.on("init",(function(){g.setContent(o)})):i.val(o)}else if(i.is(".panels-data")){i.val(o);var f=i.data("builder");f&&f.setDataField(i)}else i.val(o);n&&(i.trigger("change"),this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})))}))},sowbForms.displayNotice=function(i,t,r,n,a){var s=e('<div class="siteorigin-widget-form-notification"></div>');t&&s.append("<span>"+t+"</span>"),n&&n.length&&n.forEach((function(i){var t="";i.classes&&i.classes.length&&(t=" "+i.classes.join(" "));var r=e('<a class="button button-small'+t+'" tabindex="0">'+i.label+"</a>");i.url&&r.attr("href",i.url),i.callback&&r.on("click keyup",(function(e){("keyup"!=e.type||sowbForms.isEnter(e))&&i.callback(s)})),s.append(r)})),r&&s.append("<div><small>"+r+"</small></div>"),a?a.before(s):i.prepend(s)},e(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",(function(){var i=e(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout((function(){i.sowSetupForm()}),200)}));var i=e("body");i.hasClass("wp-customizer")&&e(document).on("widget-added",(function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()})),i.hasClass("block-editor-page")&&e(document).on("panels_setup_preview",(function(){window.hasOwnProperty("sowb")&&e(sowb).trigger("setup_widgets",{preview:!0})})),e(document).on("open_dialog",(function(e,i){i.$el.find(".so-panels-dialog").is(".so-panels-dialog-edit-widget")&&i.$el.find(".siteorigin-widget-form-main").find("> .siteorigin-widget-field").trigger("sowsetupformfield")})),e((function(){e(document).trigger("sowadminloaded")}))}(jQuery);var sowEmitters={_match:function(e,i){void 0===i&&(i=".*");var t=new RegExp("^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *("+i+") *$").exec(e);if(null===t)return!1;var r="",n="default";return void 0!==t[3]?(n=t[1],r=t[3]):r=t[1],{match:t[4].trim(),group:n,state:r}},_checker:function(e,i,t,r){var n,a={};void 0===i.length&&(i=[i]);for(var s=0;s<i.length;s++)!1!==(n=sowEmitters._match(i[s],t))&&("_true"===n.match||r(e,i,n.match))&&(a[n.group]=n.state);return a},select:function(e,i){void 0===i.length&&(i=[i]);for(var t={},r=0;r<i.length;r++)""===i[r]&&(i[r]="default"),t[i[r]]=e;return t},conditional:function(val,args){return sowEmitters._checker(val,args,"[^;{}]*",(function(val,args,match){return eval(match)}))},in:function(e,i){return sowEmitters._checker(e,i,"[^;{}]*",(function(e,i,t){return-1!==t.split(",").map((function(e){return e.trim()})).indexOf(e)}))}};window.sowbForms=sowbForms;
js/sow.google-map.js CHANGED
@@ -215,7 +215,11 @@ sowb.SiteOriginGoogleMap = function($) {
215
  var openEvent = infoDisplay;
216
  if ( infoDisplay === 'always' ) {
217
  openEvent = 'click';
218
- infoWindow.open( map, marker );
 
 
 
 
219
  }
220
  marker.addListener( openEvent, function () {
221
  infoWindow.open( map, marker );
215
  var openEvent = infoDisplay;
216
  if ( infoDisplay === 'always' ) {
217
  openEvent = 'click';
218
+ infoWindow.open( {
219
+ map: map,
220
+ anchor: marker,
221
+ shouldFocus: false // Avoid jump on load
222
+ } );
223
  }
224
  marker.addListener( openEvent, function () {
225
  infoWindow.open( map, marker );
js/sow.google-map.min.js CHANGED
@@ -1 +1 @@
1
- function soGoogleMapInitialize(){new sowb.SiteOriginGoogleMap(jQuery).initMaps()}window.sowb=window.sowb||{},sowb.SiteOriginGoogleMapInstances=[],sowb.SiteOriginGoogleMap=function(e){return{DEFAULT_LOCATIONS:["Addo Elephant National Park, R335, Addo","Cape Town, Western Cape, South Africa","San Francisco Bay Area, CA, United States","New York, NY, United States"],showMap:function(e,o,t){var i=Number(t.zoom);i||(i=14),window.matchMedia("(max-width: "+t.breakpoint+"px)").matches&&(i=t.mobileZoom);var n,a={zoom:i,gestureHandling:t.gestureHandling,disableDefaultUI:t.disableUi,zoomControl:t.zoomControl,panControl:t.panControl,center:o,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,google.maps.MapTypeId.SATELLITE,"user_map_style"]}},s=new google.maps.Map(e,a),r={name:t.mapName},l=t.mapStyles;if(l){var p=new google.maps.StyledMapType(l,r);s.mapTypes.set("user_map_style",p),s.setMapTypeId("user_map_style")}(t.markerAtCenter&&(this.centerMarker=new google.maps.Marker({position:o,map:s,draggable:t.markersDraggable,icon:t.markerIcon,title:""}),s.centerMarker=this.centerMarker),t.keepCentered)&&(google.maps.event.addDomListener(s,"idle",(function(){n=s.getCenter()})),google.maps.event.addDomListener(window,"resize",(function(){s.setCenter(n)})));this.linkAutocompleteField(t.autocomplete,t.autocompleteElement,s,t),this.showMarkers(t.markerPositions,s,t),this.showDirections(t.directions,s,t),sowb.SiteOriginGoogleMapInstances.push(s)},linkAutocompleteField:function(o,t,i,n){if(o&&t){var a=function(e){this.inputAddress!==e&&(this.inputAddress=e,this.getLocation(this.inputAddress).done(function(e){i.setZoom(15),i.setCenter(e),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(this.inputAddress))}.bind(this)))}.bind(this),s=e(t);o.addListener("place_changed",function(){var e=o.getPlace();i.setZoom(15),e.geometry&&(i.setCenter(e.geometry.location),this.centerMarker&&this.centerMarker.setPosition(e.geometry.location))}.bind(this)),google.maps.event.addDomListener(t,"keypress",(function(e){"13"===(e.keyCode||e.which)&&e.preventDefault()})),s.on("focusin",function(){if(!this.resultsObserver){var o=document.querySelector(".pac-container");this.resultsObserver=new MutationObserver((function(){var o=e(e(".pac-item").get(0)),t=o.find(".pac-item-query").text(),i=o.find("span").not("[class]").text(),n=t+(i?", "+i:"");n&&a(n)}));this.resultsObserver.observe(o,{attributes:!0,childList:!0,characterData:!0})}}.bind(this));var r=function(e){this.getGeocoder().geocode({location:e},function(o,t){if(t===google.maps.GeocoderStatus.OK&&o.length>0){var i=o[0].formatted_address;s.val(i),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(i))}}.bind(this))}.bind(this);i.addListener("click",(function(e){r(e.latLng)})),this.centerMarker.addListener("dragend",(function(e){r(e.latLng)}))}},showMarkers:function(e,o,t){if(e&&e.length){this.infoWindows=[];for(var i=[],n=0;n<e.length;n++){var a=parseInt(n/10);i.length===a&&(i[a]=[]),i[a][n%10]=e[n]}var s=function(e){var i=e.customMarkerIcon,n=e.hasOwnProperty("info")?e.info:null,a=e.hasOwnProperty("infoMaxWidth")?e.infoMaxWidth:null;return this.getLocation(e.place).done(function(e){var s=t.markerIcon;i&&(s=i);var r=new google.maps.Marker({position:e,map:o,draggable:t.markersDraggable,icon:s,title:""});if(n){var l={content:n};a&&(l.maxWidth=a);var p=t.markerInfoDisplay;l.disableAutoPan="always"===p;var c=new google.maps.InfoWindow(l);this.infoWindows.push(c);var d=p;"always"===p&&(d="click",c.open(o,r)),r.addListener(d,function(){c.open(o,r),"always"===p||t.markerInfoMultiple||this.infoWindows.forEach((function(e){e!==c&&e.close()}))}.bind(this)),"mouseover"===p&&r.addListener("mouseout",(function(){setTimeout((function(){c.close()}),100)}))}}.bind(this)).fail((function(e){r=e===google.maps.GeocoderStatus.OVER_QUERY_LIMIT,console.log(e)}))}.bind(this),r=!1,l=function(e,o){for(var t=0,i=0;i<e.length&&!r;i++)s(e[i]).then((function(){++t===e.length&&o.length&&l(o.shift(),o)}))}.bind(this);l(i.shift(),i)}},showDirections:function(e,o){if(e){e.waypoints&&e.waypoints.length&&e.waypoints.map((function(e){e.stopover=Boolean(e.stopover)}));var t=new google.maps.DirectionsRenderer;t.setMap(o),(new google.maps.DirectionsService).route({origin:e.origin,destination:e.destination,travelMode:e.travelMode.toUpperCase(),avoidHighways:e.avoidHighways,avoidTolls:e.avoidTolls,waypoints:e.waypoints,optimizeWaypoints:e.optimizeWaypoints},(function(o,i){i===google.maps.DirectionsStatus.OK&&(t.setOptions({preserveViewport:e.preserveViewport}),t.setDirections(o))}))}},initMaps:function(){var o=e(".sow-google-map-autocomplete"),t=new e.Deferred;0===o.length?t.resolve():o.each(function(o,i){if(void 0!==google.maps.places){var n=new google.maps.places.Autocomplete(i),a=e(i).siblings(".sow-google-map-canvas");if(a.length>0){var s=a.data("options");s.autocomplete=n,s.autocompleteElement=i,this.getLocation(s.address).done(function(e){this.showMap(a.get(0),e,s),a.data("initialized",!0),t.resolve()}.bind(this)).fail((function(){a.append("<div><p><strong>"+soWidgetsGoogleMap.geocode.noResults+"</strong></p></div>"),t.reject()}))}}else t.reject('Sorry, we couldn\'t load the "places" library due to another plugin, so the autocomplete feature is not available.')}.bind(this)),t.always(function(){e(".sow-google-map-canvas").each(function(o,t){var i=e(t);if(i.data("initialized"))return!0;var n=i.data("options"),a=n.address;if(!a){var s=n.markerPositions;s&&s.length&&(a=s[0].place)}this.getLocation(a).done(function(e){this.showMap(i.get(0),e,n),i.data("initialized",!0)}.bind(this)).fail((function(){i.append("<div><p><strong>"+soWidgetsGoogleMap.geocode.noResults+"</strong></p></div>")}))}.bind(this))}.bind(this)).fail((function(e){console.log(e)})).done((function(){e(sowb).trigger("maps_loaded")}))},getGeocoder:function(){return this._geocoder||(this._geocoder=new google.maps.Geocoder),this._geocoder},getLocation:function(o){var t,i=new e.Deferred,n={address:o};if(o&&o.indexOf(",")>-1){var a=o.replace(/[\(\)]/g,"").split(",");a&&2===a.length&&(t=new google.maps.LatLng(a[0],a[1]),isNaN(t.lat())||isNaN(t.lng())||(n={location:{lat:t.lat(),lng:t.lng()}}))}if(n.hasOwnProperty("location"))i.resolve(n.location);else if(n.hasOwnProperty("address")){if(!n.address){var s=parseInt(Math.random()*this.DEFAULT_LOCATIONS.length);n.address=this.DEFAULT_LOCATIONS[s]}var r=0,l=function(e,o){o===google.maps.GeocoderStatus.OK?i.resolve(e[0].geometry.location):o===google.maps.GeocoderStatus.OVER_QUERY_LIMIT?++r<3?setTimeout(function(){this.getGeocoder().geocode.call(this,n,l)}.bind(this),1e3):i.reject(o):o!==google.maps.GeocoderStatus.ZERO_RESULTS&&o!==google.maps.GeocoderStatus.OVER_DAILY_LIMIT||i.reject(o)}.bind(this);this.getGeocoder().geocode(n,l)}return i}}},jQuery((function(e){sowb.setupGoogleMaps=function(){var o,t=[],i=e(".sow-google-map-canvas");if(i.length){i.each((function(i,n){var a=e(n);if(!a.parent().is(":visible")||a.data("apiInitialized"))return a;var s=a.data("options");s&&(void 0!==s.libraries&&null!==s.libraries&&(t=t.concat(s.libraries)),!o&&s.apiKey&&(o=s.apiKey)),a.data("apiInitialized",!0)}));var n=void 0!==window.google&&void 0!==window.google.maps;if(sowb.mapsApiInitialized)var a=setTimeout((function(){n&&(clearTimeout(a),soGoogleMapInitialize())}),100);else{o||(console.warn("SiteOrigin Google Maps: Could not find API key. Google Maps API key is required."),o="");var s="https://maps.googleapis.com/maps/api/js?key="+o+"&callback=soGoogleMapInitialize";if(t&&t.length&&(s+="&libraries="+t.join(",")),window.console&&window.console.error){var r=window.console.error;sowb.onLoadMapsApiError=function(o){var t;"string"==typeof o&&(t=o.match(/^Google Maps API (error|warning): ([^\s]*)\s([^\s]*)(?:\s(.*))?/)),t&&t.length&&t[0]&&e(".sow-google-map-canvas").each((function(o,t){var i=e(t);if(i.data("fallbackImage")){var n=i.data("fallbackImage");n.hasOwnProperty("img")&&i.append(n.img)}})),r.apply(window.console,arguments)},window.console.error=sowb.onLoadMapsApiError}soWidgetsGoogleMap.map_consent?e(".sow-google-map-consent button").on("click",(function(){e(".sow-google-map-consent").remove(),e(".sow-google-map-canvas").show(),e("body").append('<script async type="text/javascript" src="'+s+'">'),sowb.mapsApiInitialized=!0})):(e("body").append('<script async type="text/javascript" src="'+s+'">'),sowb.mapsApiInitialized=!0)}}},sowb.setupGoogleMaps(),e(sowb).on("setup_widgets",sowb.setupGoogleMaps)}));
1
+ function soGoogleMapInitialize(){new sowb.SiteOriginGoogleMap(jQuery).initMaps()}window.sowb=window.sowb||{},sowb.SiteOriginGoogleMapInstances=[],sowb.SiteOriginGoogleMap=function(e){return{DEFAULT_LOCATIONS:["Addo Elephant National Park, R335, Addo","Cape Town, Western Cape, South Africa","San Francisco Bay Area, CA, United States","New York, NY, United States"],showMap:function(e,o,t){var i=Number(t.zoom);i||(i=14),window.matchMedia("(max-width: "+t.breakpoint+"px)").matches&&(i=t.mobileZoom);var n,a={zoom:i,gestureHandling:t.gestureHandling,disableDefaultUI:t.disableUi,zoomControl:t.zoomControl,panControl:t.panControl,center:o,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,google.maps.MapTypeId.SATELLITE,"user_map_style"]}},s=new google.maps.Map(e,a),r={name:t.mapName},l=t.mapStyles;if(l){var c=new google.maps.StyledMapType(l,r);s.mapTypes.set("user_map_style",c),s.setMapTypeId("user_map_style")}(t.markerAtCenter&&(this.centerMarker=new google.maps.Marker({position:o,map:s,draggable:t.markersDraggable,icon:t.markerIcon,title:""}),s.centerMarker=this.centerMarker),t.keepCentered)&&(google.maps.event.addDomListener(s,"idle",(function(){n=s.getCenter()})),google.maps.event.addDomListener(window,"resize",(function(){s.setCenter(n)})));this.linkAutocompleteField(t.autocomplete,t.autocompleteElement,s,t),this.showMarkers(t.markerPositions,s,t),this.showDirections(t.directions,s,t),sowb.SiteOriginGoogleMapInstances.push(s)},linkAutocompleteField:function(o,t,i,n){if(o&&t){var a=function(e){this.inputAddress!==e&&(this.inputAddress=e,this.getLocation(this.inputAddress).done(function(e){i.setZoom(15),i.setCenter(e),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(this.inputAddress))}.bind(this)))}.bind(this),s=e(t);o.addListener("place_changed",function(){var e=o.getPlace();i.setZoom(15),e.geometry&&(i.setCenter(e.geometry.location),this.centerMarker&&this.centerMarker.setPosition(e.geometry.location))}.bind(this)),google.maps.event.addDomListener(t,"keypress",(function(e){"13"===(e.keyCode||e.which)&&e.preventDefault()})),s.on("focusin",function(){if(!this.resultsObserver){var o=document.querySelector(".pac-container");this.resultsObserver=new MutationObserver((function(){var o=e(e(".pac-item").get(0)),t=o.find(".pac-item-query").text(),i=o.find("span").not("[class]").text(),n=t+(i?", "+i:"");n&&a(n)}));this.resultsObserver.observe(o,{attributes:!0,childList:!0,characterData:!0})}}.bind(this));var r=function(e){this.getGeocoder().geocode({location:e},function(o,t){if(t===google.maps.GeocoderStatus.OK&&o.length>0){var i=o[0].formatted_address;s.val(i),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(i))}}.bind(this))}.bind(this);i.addListener("click",(function(e){r(e.latLng)})),this.centerMarker.addListener("dragend",(function(e){r(e.latLng)}))}},showMarkers:function(e,o,t){if(e&&e.length){this.infoWindows=[];for(var i=[],n=0;n<e.length;n++){var a=parseInt(n/10);i.length===a&&(i[a]=[]),i[a][n%10]=e[n]}var s=function(e){var i=e.customMarkerIcon,n=e.hasOwnProperty("info")?e.info:null,a=e.hasOwnProperty("infoMaxWidth")?e.infoMaxWidth:null;return this.getLocation(e.place).done(function(e){var s=t.markerIcon;i&&(s=i);var r=new google.maps.Marker({position:e,map:o,draggable:t.markersDraggable,icon:s,title:""});if(n){var l={content:n};a&&(l.maxWidth=a);var c=t.markerInfoDisplay;l.disableAutoPan="always"===c;var p=new google.maps.InfoWindow(l);this.infoWindows.push(p);var d=c;"always"===c&&(d="click",p.open({map:o,anchor:r,shouldFocus:!1})),r.addListener(d,function(){p.open(o,r),"always"===c||t.markerInfoMultiple||this.infoWindows.forEach((function(e){e!==p&&e.close()}))}.bind(this)),"mouseover"===c&&r.addListener("mouseout",(function(){setTimeout((function(){p.close()}),100)}))}}.bind(this)).fail((function(e){r=e===google.maps.GeocoderStatus.OVER_QUERY_LIMIT,console.log(e)}))}.bind(this),r=!1,l=function(e,o){for(var t=0,i=0;i<e.length&&!r;i++)s(e[i]).then((function(){++t===e.length&&o.length&&l(o.shift(),o)}))}.bind(this);l(i.shift(),i)}},showDirections:function(e,o){if(e){e.waypoints&&e.waypoints.length&&e.waypoints.map((function(e){e.stopover=Boolean(e.stopover)}));var t=new google.maps.DirectionsRenderer;t.setMap(o),(new google.maps.DirectionsService).route({origin:e.origin,destination:e.destination,travelMode:e.travelMode.toUpperCase(),avoidHighways:e.avoidHighways,avoidTolls:e.avoidTolls,waypoints:e.waypoints,optimizeWaypoints:e.optimizeWaypoints},(function(o,i){i===google.maps.DirectionsStatus.OK&&(t.setOptions({preserveViewport:e.preserveViewport}),t.setDirections(o))}))}},initMaps:function(){var o=e(".sow-google-map-autocomplete"),t=new e.Deferred;0===o.length?t.resolve():o.each(function(o,i){if(void 0!==google.maps.places){var n=new google.maps.places.Autocomplete(i),a=e(i).siblings(".sow-google-map-canvas");if(a.length>0){var s=a.data("options");s.autocomplete=n,s.autocompleteElement=i,this.getLocation(s.address).done(function(e){this.showMap(a.get(0),e,s),a.data("initialized",!0),t.resolve()}.bind(this)).fail((function(){a.append("<div><p><strong>"+soWidgetsGoogleMap.geocode.noResults+"</strong></p></div>"),t.reject()}))}}else t.reject('Sorry, we couldn\'t load the "places" library due to another plugin, so the autocomplete feature is not available.')}.bind(this)),t.always(function(){e(".sow-google-map-canvas").each(function(o,t){var i=e(t);if(i.data("initialized"))return!0;var n=i.data("options"),a=n.address;if(!a){var s=n.markerPositions;s&&s.length&&(a=s[0].place)}this.getLocation(a).done(function(e){this.showMap(i.get(0),e,n),i.data("initialized",!0)}.bind(this)).fail((function(){i.append("<div><p><strong>"+soWidgetsGoogleMap.geocode.noResults+"</strong></p></div>")}))}.bind(this))}.bind(this)).fail((function(e){console.log(e)})).done((function(){e(sowb).trigger("maps_loaded")}))},getGeocoder:function(){return this._geocoder||(this._geocoder=new google.maps.Geocoder),this._geocoder},getLocation:function(o){var t,i=new e.Deferred,n={address:o};if(o&&o.indexOf(",")>-1){var a=o.replace(/[\(\)]/g,"").split(",");a&&2===a.length&&(t=new google.maps.LatLng(a[0],a[1]),isNaN(t.lat())||isNaN(t.lng())||(n={location:{lat:t.lat(),lng:t.lng()}}))}if(n.hasOwnProperty("location"))i.resolve(n.location);else if(n.hasOwnProperty("address")){if(!n.address){var s=parseInt(Math.random()*this.DEFAULT_LOCATIONS.length);n.address=this.DEFAULT_LOCATIONS[s]}var r=0,l=function(e,o){o===google.maps.GeocoderStatus.OK?i.resolve(e[0].geometry.location):o===google.maps.GeocoderStatus.OVER_QUERY_LIMIT?++r<3?setTimeout(function(){this.getGeocoder().geocode.call(this,n,l)}.bind(this),1e3):i.reject(o):o!==google.maps.GeocoderStatus.ZERO_RESULTS&&o!==google.maps.GeocoderStatus.OVER_DAILY_LIMIT||i.reject(o)}.bind(this);this.getGeocoder().geocode(n,l)}return i}}},jQuery((function(e){sowb.setupGoogleMaps=function(){var o,t=[],i=e(".sow-google-map-canvas");if(i.length){i.each((function(i,n){var a=e(n);if(!a.parent().is(":visible")||a.data("apiInitialized"))return a;var s=a.data("options");s&&(void 0!==s.libraries&&null!==s.libraries&&(t=t.concat(s.libraries)),!o&&s.apiKey&&(o=s.apiKey)),a.data("apiInitialized",!0)}));var n=void 0!==window.google&&void 0!==window.google.maps;if(sowb.mapsApiInitialized)var a=setTimeout((function(){n&&(clearTimeout(a),soGoogleMapInitialize())}),100);else{o||(console.warn("SiteOrigin Google Maps: Could not find API key. Google Maps API key is required."),o="");var s="https://maps.googleapis.com/maps/api/js?key="+o+"&callback=soGoogleMapInitialize";if(t&&t.length&&(s+="&libraries="+t.join(",")),window.console&&window.console.error){var r=window.console.error;sowb.onLoadMapsApiError=function(o){var t;"string"==typeof o&&(t=o.match(/^Google Maps API (error|warning): ([^\s]*)\s([^\s]*)(?:\s(.*))?/)),t&&t.length&&t[0]&&e(".sow-google-map-canvas").each((function(o,t){var i=e(t);if(i.data("fallbackImage")){var n=i.data("fallbackImage");n.hasOwnProperty("img")&&i.append(n.img)}})),r.apply(window.console,arguments)},window.console.error=sowb.onLoadMapsApiError}soWidgetsGoogleMap.map_consent?e(".sow-google-map-consent button").on("click",(function(){e(".sow-google-map-consent").remove(),e(".sow-google-map-canvas").show(),e("body").append('<script async type="text/javascript" src="'+s+'">'),sowb.mapsApiInitialized=!0})):(e("body").append('<script async type="text/javascript" src="'+s+'">'),sowb.mapsApiInitialized=!0)}}},sowb.setupGoogleMaps(),e(sowb).on("setup_widgets",sowb.setupGoogleMaps)}));
lang/so-widgets-bundle.pot CHANGED
@@ -228,7 +228,7 @@ msgstr ""
228
  msgid "Clear"
229
  msgstr ""
230
 
231
- #: compat/beaver-builder/beaver-builder.php:68, widgets/google-map/google-map.php:290, widgets/image/image.php:48, widgets/image/image.php:60, base/inc/fields/posts.class.php:130
232
  msgid "Default"
233
  msgstr ""
234
 
@@ -292,7 +292,7 @@ msgstr ""
292
  msgid "When opening the panel, scroll the user to the top of the panel."
293
  msgstr ""
294
 
295
- #: widgets/accordion/accordion.php:71, widgets/accordion/accordion.php:84, widgets/contact/contact.php:48, widgets/cta/cta.php:64, widgets/editor/editor.php:35, widgets/features/features.php:136, widgets/icon/icon.php:68, widgets/post-carousel/post-carousel.php:159, widgets/price-table/price-table.php:42, widgets/price-table/price-table.php:61, widgets/simple-masonry/simple-masonry.php:44, widgets/simple-masonry/simple-masonry.php:85, widgets/social-media-buttons/social-media-buttons.php:54, widgets/tabs/tabs.php:71, widgets/tabs/tabs.php:84, widgets/taxonomy/taxonomy.php:34, widgets/testimonial/testimonial.php:41, widgets/video/video.php:33, base/inc/fields/posts.class.php:97
296
  msgid "Title"
297
  msgstr ""
298
 
@@ -380,7 +380,7 @@ msgstr ""
380
  msgid "SiteOrigin Button"
381
  msgstr ""
382
 
383
- #: widgets/button/button.php:33, widgets/contact/contact.php:801, widgets/features/features.php:320, widgets/social-media-buttons/social-media-buttons.php:33, base/inc/widgets/base-slider.class.php:194
384
  msgid "Responsive Breakpoint"
385
  msgstr ""
386
 
@@ -405,7 +405,7 @@ msgid "Download"
405
  msgstr ""
406
 
407
  #: widgets/button/button.php:76
408
- msgid "The button destination URL will be downloaded when a user clicks on the button."
409
  msgstr ""
410
 
411
  #: widgets/button/button.php:81, widgets/button/button.php:85, widgets/features/features.php:78, widgets/icon/icon.php:31, widgets/price-table/price-table.php:119
@@ -428,19 +428,19 @@ msgstr ""
428
  msgid "Icon Placement"
429
  msgstr ""
430
 
431
- #: widgets/button/button.php:104, widgets/features/features.php:66, widgets/image-grid/image-grid.php:120
432
  msgid "Top"
433
  msgstr ""
434
 
435
- #: widgets/button/button.php:105, widgets/button/button.php:131, widgets/button/button.php:142, widgets/contact/contact.php:403, widgets/contact/contact.php:418, widgets/contact/contact.php:647, widgets/cta/cta.php:103, widgets/features/features.php:67, widgets/headline/headline.php:92, widgets/headline/headline.php:163, widgets/headline/headline.php:218, widgets/icon/icon.php:50, widgets/image/image.php:50, widgets/image/image.php:62, widgets/image-grid/image-grid.php:123, widgets/simple-masonry/simple-masonry.php:216, widgets/social-media-buttons/social-media-buttons.php:153, widgets/social-media-buttons/social-media-buttons.php:164, widgets/testimonial/testimonial.php:256
436
  msgid "Right"
437
  msgstr ""
438
 
439
- #: widgets/button/button.php:106, widgets/features/features.php:68, widgets/image-grid/image-grid.php:126
440
  msgid "Bottom"
441
  msgstr ""
442
 
443
- #: widgets/button/button.php:107, widgets/button/button.php:130, widgets/button/button.php:141, widgets/contact/contact.php:402, widgets/contact/contact.php:417, widgets/contact/contact.php:646, widgets/cta/cta.php:102, widgets/features/features.php:69, widgets/headline/headline.php:91, widgets/headline/headline.php:162, widgets/headline/headline.php:217, widgets/icon/icon.php:49, widgets/image/image.php:49, widgets/image/image.php:61, widgets/image-grid/image-grid.php:129, widgets/simple-masonry/simple-masonry.php:215, widgets/social-media-buttons/social-media-buttons.php:152, widgets/social-media-buttons/social-media-buttons.php:163, widgets/testimonial/testimonial.php:255
444
  msgid "Left"
445
  msgstr ""
446
 
@@ -460,7 +460,7 @@ msgstr ""
460
  msgid "Align"
461
  msgstr ""
462
 
463
- #: widgets/button/button.php:132, widgets/button/button.php:143, widgets/contact/contact.php:419, widgets/contact/contact.php:648, widgets/headline/headline.php:90, widgets/headline/headline.php:161, widgets/headline/headline.php:216, widgets/icon/icon.php:48, widgets/image/image.php:51, widgets/image/image.php:63, widgets/social-media-buttons/social-media-buttons.php:154, widgets/social-media-buttons/social-media-buttons.php:165
464
  msgid "Center"
465
  msgstr ""
466
 
@@ -776,7 +776,7 @@ msgstr ""
776
  msgid "Required Field"
777
  msgstr ""
778
 
779
- #: widgets/contact/contact.php:183, widgets/contact/contact.php:190, widgets/contact/contact.php:1072
780
  msgid "Required field"
781
  msgstr ""
782
 
@@ -1092,43 +1092,43 @@ msgstr ""
1092
  msgid "This setting controls when the field max width will be disabled. The default value is 780px"
1093
  msgstr ""
1094
 
1095
- #: widgets/contact/contact.php:1084
1096
  msgid "Invalid email address."
1097
  msgstr ""
1098
 
1099
- #: widgets/contact/contact.php:1109
1100
  msgid "Invalid phone number. It should contain at least three digits."
1101
  msgstr ""
1102
 
1103
- #: widgets/contact/contact.php:1120
1104
  msgid "Invalid number."
1105
  msgstr ""
1106
 
1107
- #: widgets/contact/contact.php:1186
1108
  msgid "Error sending email, please try again later."
1109
  msgstr ""
1110
 
1111
- #: widgets/contact/contact.php:1212
1112
  msgid "A valid email is required"
1113
  msgstr ""
1114
 
1115
- #: widgets/contact/contact.php:1214
1116
  msgid "The email address is invalid"
1117
  msgstr ""
1118
 
1119
- #: widgets/contact/contact.php:1218
1120
  msgid "Missing subject"
1121
  msgstr ""
1122
 
1123
- #: widgets/contact/contact.php:1252
1124
  msgid "Error validating your Captcha response."
1125
  msgstr ""
1126
 
1127
- #: widgets/contact/contact.php:1284
1128
  msgid "Unfortunately our system identified your message as spam."
1129
  msgstr ""
1130
 
1131
- #: widgets/contact/contact.php:1292
1132
  msgctxt "The name of who sent this email"
1133
  msgid "From"
1134
  msgstr ""
@@ -1305,7 +1305,7 @@ msgstr ""
1305
  msgid "Open more URL in a new window"
1306
  msgstr ""
1307
 
1308
- #: widgets/features/features.php:322
1309
  msgid "This setting controls when the features widget will collapse for mobile devices. The default value is 520px"
1310
  msgstr ""
1311
 
@@ -2028,27 +2028,31 @@ msgstr ""
2028
  msgid "Alt text"
2029
  msgstr ""
2030
 
2031
- #: widgets/image/image.php:95, widgets/image-grid/image-grid.php:88, widgets/slider/slider.php:108
 
 
 
 
2032
  msgid "Open in new window"
2033
  msgstr ""
2034
 
2035
- #: widgets/image/image.php:101
2036
  msgid "Bound"
2037
  msgstr ""
2038
 
2039
- #: widgets/image/image.php:102
2040
  msgid "Make sure the image doesn't extend beyond its container."
2041
  msgstr ""
2042
 
2043
- #: widgets/image/image.php:107
2044
- msgid "Full Width"
2045
  msgstr ""
2046
 
2047
- #: widgets/image/image.php:108
2048
  msgid "Resize image to fit its container."
2049
  msgstr ""
2050
 
2051
- #: widgets/image/image.php:242, widgets/image-grid/image-grid.php:256
2052
  msgid "Add a Lightbox to your images with %sSiteOrigin Premium%s"
2053
  msgstr ""
2054
 
@@ -2088,6 +2092,18 @@ msgstr ""
2088
  msgid "Image padding"
2089
  msgstr ""
2090
 
 
 
 
 
 
 
 
 
 
 
 
 
2091
  #: widgets/layout-slider/layout-slider.php:4, widgets/layout-slider/layout-slider.php:21
2092
  msgid "A slider that allows you to create responsive columnized content for each slide."
2093
  msgstr ""
@@ -2793,7 +2809,7 @@ msgstr ""
2793
  msgid "Choose Icon"
2794
  msgstr ""
2795
 
2796
- #: base/inc/fields/icon.class.php:65, base/inc/fields/media.class.php:111, base/inc/fields/multiple-media.class.php:74, base/inc/fields/multiple-media.class.php:92
2797
  msgid "Remove"
2798
  msgstr ""
2799
 
@@ -2821,7 +2837,7 @@ msgstr ""
2821
  msgid "Choose Media"
2822
  msgstr ""
2823
 
2824
- #: base/inc/fields/media.class.php:61, base/inc/fields/multiple-media.class.php:37
2825
  msgid "Set Media"
2826
  msgstr ""
2827
 
@@ -2829,7 +2845,7 @@ msgstr ""
2829
  msgid "Image Search"
2830
  msgstr ""
2831
 
2832
- #: base/inc/fields/media.class.php:69, base/inc/fields/multiple-media.class.php:44
2833
  msgid "You need to <a href=\"%s\">upgrade</a> to WordPress 3.5 to use media fields"
2834
  msgstr ""
2835
 
@@ -2869,7 +2885,7 @@ msgstr ""
2869
  msgid "Sponsored"
2870
  msgstr ""
2871
 
2872
- #: base/inc/fields/multiple-media.class.php:36
2873
  msgid "Add Media"
2874
  msgstr ""
2875
 
@@ -2886,114 +2902,130 @@ msgid "Taxonomies are groups such as categories, tags, posts and products."
2886
  msgstr ""
2887
 
2888
  #: base/inc/fields/posts.class.php:57
2889
- msgid "Date selection type"
2890
  msgstr ""
2891
 
2892
  #: base/inc/fields/posts.class.php:59
2893
- msgid "Specific"
2894
  msgstr ""
2895
 
2896
  #: base/inc/fields/posts.class.php:60
2897
- msgid "Relative"
2898
  msgstr ""
2899
 
2900
  #: base/inc/fields/posts.class.php:62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2901
  msgid "Select a range between specific dates or relative to the current date."
2902
  msgstr ""
2903
 
2904
- #: base/inc/fields/posts.class.php:72, base/inc/fields/posts.class.php:82
2905
  msgid "Dates"
2906
  msgstr ""
2907
 
2908
- #: base/inc/fields/posts.class.php:92
2909
  msgid "Order by"
2910
  msgstr ""
2911
 
2912
- #: base/inc/fields/posts.class.php:94
2913
  msgid "No order"
2914
  msgstr ""
2915
 
2916
- #: base/inc/fields/posts.class.php:95
2917
  msgid "Post ID"
2918
  msgstr ""
2919
 
2920
- #: base/inc/fields/posts.class.php:96
2921
  msgid "Author"
2922
  msgstr ""
2923
 
2924
- #: base/inc/fields/posts.class.php:98
2925
  msgid "Published date"
2926
  msgstr ""
2927
 
2928
- #: base/inc/fields/posts.class.php:99
2929
  msgid "Modified date"
2930
  msgstr ""
2931
 
2932
- #: base/inc/fields/posts.class.php:100
2933
  msgid "By parent"
2934
  msgstr ""
2935
 
2936
- #: base/inc/fields/posts.class.php:101
2937
  msgid "Random order"
2938
  msgstr ""
2939
 
2940
- #: base/inc/fields/posts.class.php:102
2941
  msgid "Comment count"
2942
  msgstr ""
2943
 
2944
- #: base/inc/fields/posts.class.php:103
2945
  msgid "Menu order"
2946
  msgstr ""
2947
 
2948
- #: base/inc/fields/posts.class.php:104
2949
  msgid "By meta value"
2950
  msgstr ""
2951
 
2952
- #: base/inc/fields/posts.class.php:105
2953
  msgid "By numeric meta value"
2954
  msgstr ""
2955
 
2956
- #: base/inc/fields/posts.class.php:106
2957
  msgid "By include order"
2958
  msgstr ""
2959
 
2960
- #: base/inc/fields/posts.class.php:113
2961
  msgid "Order direction"
2962
  msgstr ""
2963
 
2964
- #: base/inc/fields/posts.class.php:115
2965
  msgid "Ascending"
2966
  msgstr ""
2967
 
2968
- #: base/inc/fields/posts.class.php:116
2969
  msgid "Descending"
2970
  msgstr ""
2971
 
2972
- #: base/inc/fields/posts.class.php:123
2973
  msgid "Posts per page"
2974
  msgstr ""
2975
 
2976
- #: base/inc/fields/posts.class.php:128
2977
  msgid "Sticky posts"
2978
  msgstr ""
2979
 
2980
- #: base/inc/fields/posts.class.php:131
2981
  msgid "Ignore sticky"
2982
  msgstr ""
2983
 
2984
- #: base/inc/fields/posts.class.php:132
2985
  msgid "Exclude sticky"
2986
  msgstr ""
2987
 
2988
- #: base/inc/fields/posts.class.php:133
2989
  msgid "Only sticky"
2990
  msgstr ""
2991
 
2992
- #: base/inc/fields/posts.class.php:139
2993
  msgid "Additional"
2994
  msgstr ""
2995
 
2996
- #: base/inc/fields/posts.class.php:140
2997
  msgid "Additional query arguments. See <a href=\"https://developer.wordpress.org/reference/functions/query_posts/\" target=\"_blank\" rel=\"noopener noreferrer\">query_posts</a>."
2998
  msgstr ""
2999
 
228
  msgid "Clear"
229
  msgstr ""
230
 
231
+ #: compat/beaver-builder/beaver-builder.php:68, widgets/google-map/google-map.php:290, widgets/image/image.php:48, widgets/image/image.php:60, base/inc/fields/posts.class.php:141
232
  msgid "Default"
233
  msgstr ""
234
 
292
  msgid "When opening the panel, scroll the user to the top of the panel."
293
  msgstr ""
294
 
295
+ #: widgets/accordion/accordion.php:71, widgets/accordion/accordion.php:84, widgets/contact/contact.php:48, widgets/cta/cta.php:64, widgets/editor/editor.php:35, widgets/features/features.php:136, widgets/icon/icon.php:68, widgets/post-carousel/post-carousel.php:159, widgets/price-table/price-table.php:42, widgets/price-table/price-table.php:61, widgets/simple-masonry/simple-masonry.php:44, widgets/simple-masonry/simple-masonry.php:85, widgets/social-media-buttons/social-media-buttons.php:54, widgets/tabs/tabs.php:71, widgets/tabs/tabs.php:84, widgets/taxonomy/taxonomy.php:34, widgets/testimonial/testimonial.php:41, widgets/video/video.php:33, base/inc/fields/posts.class.php:108
296
  msgid "Title"
297
  msgstr ""
298
 
380
  msgid "SiteOrigin Button"
381
  msgstr ""
382
 
383
+ #: widgets/button/button.php:33, widgets/contact/contact.php:801, widgets/features/features.php:321, widgets/social-media-buttons/social-media-buttons.php:33, base/inc/widgets/base-slider.class.php:194
384
  msgid "Responsive Breakpoint"
385
  msgstr ""
386
 
405
  msgstr ""
406
 
407
  #: widgets/button/button.php:76
408
+ msgid "The Destination URL will be downloaded when a user clicks on the button."
409
  msgstr ""
410
 
411
  #: widgets/button/button.php:81, widgets/button/button.php:85, widgets/features/features.php:78, widgets/icon/icon.php:31, widgets/price-table/price-table.php:119
428
  msgid "Icon Placement"
429
  msgstr ""
430
 
431
+ #: widgets/button/button.php:104, widgets/features/features.php:66, widgets/image-grid/image-grid.php:120, widgets/image-grid/image-grid.php:140
432
  msgid "Top"
433
  msgstr ""
434
 
435
+ #: widgets/button/button.php:105, widgets/button/button.php:131, widgets/button/button.php:142, widgets/contact/contact.php:403, widgets/contact/contact.php:418, widgets/contact/contact.php:647, widgets/cta/cta.php:103, widgets/features/features.php:67, widgets/headline/headline.php:92, widgets/headline/headline.php:163, widgets/headline/headline.php:218, widgets/icon/icon.php:50, widgets/image/image.php:50, widgets/image/image.php:62, widgets/image-grid/image-grid.php:123, widgets/image-grid/image-grid.php:153, widgets/simple-masonry/simple-masonry.php:216, widgets/social-media-buttons/social-media-buttons.php:153, widgets/social-media-buttons/social-media-buttons.php:164, widgets/testimonial/testimonial.php:256
436
  msgid "Right"
437
  msgstr ""
438
 
439
+ #: widgets/button/button.php:106, widgets/features/features.php:68, widgets/image-grid/image-grid.php:126, widgets/image-grid/image-grid.php:142
440
  msgid "Bottom"
441
  msgstr ""
442
 
443
+ #: widgets/button/button.php:107, widgets/button/button.php:130, widgets/button/button.php:141, widgets/contact/contact.php:402, widgets/contact/contact.php:417, widgets/contact/contact.php:646, widgets/cta/cta.php:102, widgets/features/features.php:69, widgets/headline/headline.php:91, widgets/headline/headline.php:162, widgets/headline/headline.php:217, widgets/icon/icon.php:49, widgets/image/image.php:49, widgets/image/image.php:61, widgets/image-grid/image-grid.php:129, widgets/image-grid/image-grid.php:151, widgets/simple-masonry/simple-masonry.php:215, widgets/social-media-buttons/social-media-buttons.php:152, widgets/social-media-buttons/social-media-buttons.php:163, widgets/testimonial/testimonial.php:255
444
  msgid "Left"
445
  msgstr ""
446
 
460
  msgid "Align"
461
  msgstr ""
462
 
463
+ #: widgets/button/button.php:132, widgets/button/button.php:143, widgets/contact/contact.php:419, widgets/contact/contact.php:648, widgets/headline/headline.php:90, widgets/headline/headline.php:161, widgets/headline/headline.php:216, widgets/icon/icon.php:48, widgets/image/image.php:51, widgets/image/image.php:63, widgets/image-grid/image-grid.php:141, widgets/image-grid/image-grid.php:152, widgets/social-media-buttons/social-media-buttons.php:154, widgets/social-media-buttons/social-media-buttons.php:165
464
  msgid "Center"
465
  msgstr ""
466
 
776
  msgid "Required Field"
777
  msgstr ""
778
 
779
+ #: widgets/contact/contact.php:183, widgets/contact/contact.php:190, widgets/contact/contact.php:1080
780
  msgid "Required field"
781
  msgstr ""
782
 
1092
  msgid "This setting controls when the field max width will be disabled. The default value is 780px"
1093
  msgstr ""
1094
 
1095
+ #: widgets/contact/contact.php:1092
1096
  msgid "Invalid email address."
1097
  msgstr ""
1098
 
1099
+ #: widgets/contact/contact.php:1117
1100
  msgid "Invalid phone number. It should contain at least three digits."
1101
  msgstr ""
1102
 
1103
+ #: widgets/contact/contact.php:1128
1104
  msgid "Invalid number."
1105
  msgstr ""
1106
 
1107
+ #: widgets/contact/contact.php:1194
1108
  msgid "Error sending email, please try again later."
1109
  msgstr ""
1110
 
1111
+ #: widgets/contact/contact.php:1220
1112
  msgid "A valid email is required"
1113
  msgstr ""
1114
 
1115
+ #: widgets/contact/contact.php:1222
1116
  msgid "The email address is invalid"
1117
  msgstr ""
1118
 
1119
+ #: widgets/contact/contact.php:1226
1120
  msgid "Missing subject"
1121
  msgstr ""
1122
 
1123
+ #: widgets/contact/contact.php:1260
1124
  msgid "Error validating your Captcha response."
1125
  msgstr ""
1126
 
1127
+ #: widgets/contact/contact.php:1292
1128
  msgid "Unfortunately our system identified your message as spam."
1129
  msgstr ""
1130
 
1131
+ #: widgets/contact/contact.php:1300
1132
  msgctxt "The name of who sent this email"
1133
  msgid "From"
1134
  msgstr ""
1305
  msgid "Open more URL in a new window"
1306
  msgstr ""
1307
 
1308
+ #: widgets/features/features.php:323
1309
  msgid "This setting controls when the features widget will collapse for mobile devices. The default value is 520px"
1310
  msgstr ""
1311
 
2028
  msgid "Alt text"
2029
  msgstr ""
2030
 
2031
+ #: widgets/image/image.php:96
2032
+ msgid "Link title to URL"
2033
+ msgstr ""
2034
+
2035
+ #: widgets/image/image.php:102, widgets/image-grid/image-grid.php:88, widgets/slider/slider.php:108
2036
  msgid "Open in new window"
2037
  msgstr ""
2038
 
2039
+ #: widgets/image/image.php:108
2040
  msgid "Bound"
2041
  msgstr ""
2042
 
2043
+ #: widgets/image/image.php:109
2044
  msgid "Make sure the image doesn't extend beyond its container."
2045
  msgstr ""
2046
 
2047
+ #: widgets/image/image.php:114
2048
+ msgid "Full width"
2049
  msgstr ""
2050
 
2051
+ #: widgets/image/image.php:115
2052
  msgid "Resize image to fit its container."
2053
  msgstr ""
2054
 
2055
+ #: widgets/image/image.php:265, widgets/image-grid/image-grid.php:279
2056
  msgid "Add a Lightbox to your images with %sSiteOrigin Premium%s"
2057
  msgstr ""
2058
 
2092
  msgid "Image padding"
2093
  msgstr ""
2094
 
2095
+ #: widgets/image-grid/image-grid.php:136
2096
+ msgid "Image vertical alignment"
2097
+ msgstr ""
2098
+
2099
+ #: widgets/image-grid/image-grid.php:137
2100
+ msgid "Applied if image heights differ."
2101
+ msgstr ""
2102
+
2103
+ #: widgets/image-grid/image-grid.php:148
2104
+ msgid "Grid horizontal alignment"
2105
+ msgstr ""
2106
+
2107
  #: widgets/layout-slider/layout-slider.php:4, widgets/layout-slider/layout-slider.php:21
2108
  msgid "A slider that allows you to create responsive columnized content for each slide."
2109
  msgstr ""
2809
  msgid "Choose Icon"
2810
  msgstr ""
2811
 
2812
+ #: base/inc/fields/icon.class.php:65, base/inc/fields/media.class.php:111, base/inc/fields/multiple-media.class.php:110, base/inc/fields/multiple-media.class.php:128
2813
  msgid "Remove"
2814
  msgstr ""
2815
 
2837
  msgid "Choose Media"
2838
  msgstr ""
2839
 
2840
+ #: base/inc/fields/media.class.php:61, base/inc/fields/multiple-media.class.php:55
2841
  msgid "Set Media"
2842
  msgstr ""
2843
 
2845
  msgid "Image Search"
2846
  msgstr ""
2847
 
2848
+ #: base/inc/fields/media.class.php:69, base/inc/fields/multiple-media.class.php:64
2849
  msgid "You need to <a href=\"%s\">upgrade</a> to WordPress 3.5 to use media fields"
2850
  msgstr ""
2851
 
2885
  msgid "Sponsored"
2886
  msgstr ""
2887
 
2888
+ #: base/inc/fields/multiple-media.class.php:54
2889
  msgid "Add Media"
2890
  msgstr ""
2891
 
2902
  msgstr ""
2903
 
2904
  #: base/inc/fields/posts.class.php:57
2905
+ msgid "Taxonomies relationship"
2906
  msgstr ""
2907
 
2908
  #: base/inc/fields/posts.class.php:59
2909
+ msgid "OR"
2910
  msgstr ""
2911
 
2912
  #: base/inc/fields/posts.class.php:60
2913
+ msgid "AND"
2914
  msgstr ""
2915
 
2916
  #: base/inc/fields/posts.class.php:62
2917
+ msgid "The relationship between taxonomies. OR requires posts to have at least one of the specified taxonomies. AND requires posts to have all of the specified taxonomies."
2918
+ msgstr ""
2919
+
2920
+ #: base/inc/fields/posts.class.php:68
2921
+ msgid "Date selection type"
2922
+ msgstr ""
2923
+
2924
+ #: base/inc/fields/posts.class.php:70
2925
+ msgid "Specific"
2926
+ msgstr ""
2927
+
2928
+ #: base/inc/fields/posts.class.php:71
2929
+ msgid "Relative"
2930
+ msgstr ""
2931
+
2932
+ #: base/inc/fields/posts.class.php:73
2933
  msgid "Select a range between specific dates or relative to the current date."
2934
  msgstr ""
2935
 
2936
+ #: base/inc/fields/posts.class.php:83, base/inc/fields/posts.class.php:93
2937
  msgid "Dates"
2938
  msgstr ""
2939
 
2940
+ #: base/inc/fields/posts.class.php:103
2941
  msgid "Order by"
2942
  msgstr ""
2943
 
2944
+ #: base/inc/fields/posts.class.php:105
2945
  msgid "No order"
2946
  msgstr ""
2947
 
2948
+ #: base/inc/fields/posts.class.php:106
2949
  msgid "Post ID"
2950
  msgstr ""
2951
 
2952
+ #: base/inc/fields/posts.class.php:107
2953
  msgid "Author"
2954
  msgstr ""
2955
 
2956
+ #: base/inc/fields/posts.class.php:109
2957
  msgid "Published date"
2958
  msgstr ""
2959
 
2960
+ #: base/inc/fields/posts.class.php:110
2961
  msgid "Modified date"
2962
  msgstr ""
2963
 
2964
+ #: base/inc/fields/posts.class.php:111
2965
  msgid "By parent"
2966
  msgstr ""
2967
 
2968
+ #: base/inc/fields/posts.class.php:112
2969
  msgid "Random order"
2970
  msgstr ""
2971
 
2972
+ #: base/inc/fields/posts.class.php:113
2973
  msgid "Comment count"
2974
  msgstr ""
2975
 
2976
+ #: base/inc/fields/posts.class.php:114
2977
  msgid "Menu order"
2978
  msgstr ""
2979
 
2980
+ #: base/inc/fields/posts.class.php:115
2981
  msgid "By meta value"
2982
  msgstr ""
2983
 
2984
+ #: base/inc/fields/posts.class.php:116
2985
  msgid "By numeric meta value"
2986
  msgstr ""
2987
 
2988
+ #: base/inc/fields/posts.class.php:117
2989
  msgid "By include order"
2990
  msgstr ""
2991
 
2992
+ #: base/inc/fields/posts.class.php:124
2993
  msgid "Order direction"
2994
  msgstr ""
2995
 
2996
+ #: base/inc/fields/posts.class.php:126
2997
  msgid "Ascending"
2998
  msgstr ""
2999
 
3000
+ #: base/inc/fields/posts.class.php:127
3001
  msgid "Descending"
3002
  msgstr ""
3003
 
3004
+ #: base/inc/fields/posts.class.php:134
3005
  msgid "Posts per page"
3006
  msgstr ""
3007
 
3008
+ #: base/inc/fields/posts.class.php:139
3009
  msgid "Sticky posts"
3010
  msgstr ""
3011
 
3012
+ #: base/inc/fields/posts.class.php:142
3013
  msgid "Ignore sticky"
3014
  msgstr ""
3015
 
3016
+ #: base/inc/fields/posts.class.php:143
3017
  msgid "Exclude sticky"
3018
  msgstr ""
3019
 
3020
+ #: base/inc/fields/posts.class.php:144
3021
  msgid "Only sticky"
3022
  msgstr ""
3023
 
3024
+ #: base/inc/fields/posts.class.php:150
3025
  msgid "Additional"
3026
  msgstr ""
3027
 
3028
+ #: base/inc/fields/posts.class.php:151
3029
  msgid "Additional query arguments. See <a href=\"https://developer.wordpress.org/reference/functions/query_posts/\" target=\"_blank\" rel=\"noopener noreferrer\">query_posts</a>."
3030
  msgstr ""
3031
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Tags: widget, button, slider, hero, google maps, image, carousel, features, icon
3
  Requires at least: 4.2
4
  Tested up to: 5.7
5
  Requires PHP: 5.6.20
6
- Stable tag: 1.20.0
7
- Build time: 2021-06-01T20:59:59+02:00
8
  License: GPLv3 or later
9
  Contributors: gpriday, braam-genis, alexgso
10
  Donate link: https://siteorigin.com/downloads/premium/
@@ -96,8 +96,23 @@ SiteOrigin Premium includes access to our professional email support service, pe
96
  = The widget I'd like to add isn't available; where can I enable it? =
97
 
98
  The Widgets Bundle global interface is available at Plugins > SiteOrigin Widgets. Widgets can be enabled or disabled as needed. If a widget offers global settings, you can access those via the Settings button next to each applicable widget.
 
99
  == Changelog ==
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  = 1.20.0 - 01 June 2021 =
102
  * Added integration for WP Super Cache and Swift Performance plugins.
103
  * Button: Added a `Mobile align` setting and global Button `Responsive Breakpoint` setting at `Plugins > SiteOrigin Widgets > Button: Settings`.
3
  Requires at least: 4.2
4
  Tested up to: 5.7
5
  Requires PHP: 5.6.20
6
+ Stable tag: 1.21.0
7
+ Build time: 2021-06-24T10:37:45+02:00
8
  License: GPLv3 or later
9
  Contributors: gpriday, braam-genis, alexgso
10
  Donate link: https://siteorigin.com/downloads/premium/
96
  = The widget I'd like to add isn't available; where can I enable it? =
97
 
98
  The Widgets Bundle global interface is available at Plugins > SiteOrigin Widgets. Widgets can be enabled or disabled as needed. If a widget offers global settings, you can access those via the Settings button next to each applicable widget.
99
+
100
  == Changelog ==
101
 
102
+ = 1.21.0 - 24 June 2021 =
103
+ * Google Maps: Prevented a jump on load when Info Windows is set to always display.
104
+ * Google Fonts: Ensured all weights and styles are imported.
105
+ * Headline: Changed default heading to `h2`.
106
+ * Hero: Removed the button alignment setting, alignment is handled directly within each slide frame.
107
+ * Image: Added a `Link title to URL` setting.
108
+ * Image Grid: Added `Image vertical alignment` and `Grid horizontal alignment` settings.
109
+ * Post Selector: Added an option to adjust the taxonomy relationship.
110
+ * Sliders: Prevented potential PHP 8 error with overlay attribute filter.
111
+ * Developer: Added an optional title to the multiple media form field.
112
+ * Developer: Improved multiple media non-image support.
113
+ * Developer: Added an optional `image_dimensions` parameter for the multiple media field.
114
+ * Developer: Added a repeater increment label option.
115
+
116
  = 1.20.0 - 01 June 2021 =
117
  * Added integration for WP Super Cache and Swift Performance plugins.
118
  * Button: Added a `Mobile align` setting and global Button `Responsive Breakpoint` setting at `Plugins > SiteOrigin Widgets > Button: Settings`.
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.20.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.20.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 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.21.0
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.21.0');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
widgets/button/button.php CHANGED
@@ -12,9 +12,9 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
12
 
13
  parent::__construct(
14
  'sow-button',
15
- __('SiteOrigin Button', 'so-widgets-bundle'),
16
  array(
17
- 'description' => __('A powerful yet simple button widget for your sidebars or Page Builder pages.', 'so-widgets-bundle'),
18
  'help' => 'https://siteorigin.com/widgets-bundle/button-widget-documentation/'
19
  ),
20
  array(
@@ -54,12 +54,12 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
54
  return array(
55
  'text' => array(
56
  'type' => 'text',
57
- 'label' => __('Button text', 'so-widgets-bundle'),
58
  ),
59
 
60
  'url' => array(
61
  'type' => 'link',
62
- 'label' => __('Destination URL', 'so-widgets-bundle'),
63
  'allow_shortcode' => true,
64
  ),
65
 
@@ -73,27 +73,27 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
73
  'type' => 'checkbox',
74
  'default' => false,
75
  'label' => __( 'Download', 'so-widgets-bundle' ),
76
- 'description' => __( 'The button destination URL will be downloaded when a user clicks on the button.', 'so-widgets-bundle' ),
77
  ),
78
 
79
  'button_icon' => array(
80
  'type' => 'section',
81
- 'label' => __('Icon', 'so-widgets-bundle'),
82
  'fields' => array(
83
  'icon_selected' => array(
84
  'type' => 'icon',
85
- 'label' => __('Icon', 'so-widgets-bundle'),
86
  ),
87
 
88
  'icon_color' => array(
89
  'type' => 'color',
90
- 'label' => __('Icon color', 'so-widgets-bundle'),
91
  ),
92
 
93
  'icon' => array(
94
  'type' => 'media',
95
- 'label' => __('Image icon', 'so-widgets-bundle'),
96
- 'description' => __('Replaces the icon with your own image icon.', 'so-widgets-bundle'),
97
  ),
98
 
99
  'icon_placement' => array(
@@ -146,24 +146,24 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
146
  ),
147
  'theme' => array(
148
  'type' => 'select',
149
- 'label' => __('Button theme', 'so-widgets-bundle'),
150
  'default' => 'atom',
151
  'options' => array(
152
- 'atom' => __('Atom', 'so-widgets-bundle'),
153
- 'flat' => __('Flat', 'so-widgets-bundle'),
154
- 'wire' => __('Wire', 'so-widgets-bundle'),
155
  ),
156
  ),
157
 
158
 
159
  'button_color' => array(
160
  'type' => 'color',
161
- 'label' => __('Button color', 'so-widgets-bundle'),
162
  ),
163
 
164
  'text_color' => array(
165
  'type' => 'color',
166
- 'label' => __('Text color', 'so-widgets-bundle'),
167
  ),
168
 
169
  'hover' => array(
@@ -206,36 +206,36 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
206
 
207
  'font_size' => array(
208
  'type' => 'select',
209
- 'label' => __('Font size', 'so-widgets-bundle'),
210
  'options' => array(
211
- '1' => __('Normal', 'so-widgets-bundle'),
212
- '1.15' => __('Medium', 'so-widgets-bundle'),
213
- '1.3' => __('Large', 'so-widgets-bundle'),
214
- '1.45' => __('Extra large', 'so-widgets-bundle'),
215
  ),
216
  ),
217
 
218
  'rounding' => array(
219
  'type' => 'select',
220
- 'label' => __('Rounding', 'so-widgets-bundle'),
221
  'default' => '0.25',
222
  'options' => array(
223
- '0' => __('None', 'so-widgets-bundle'),
224
- '0.25' => __('Slightly rounded', 'so-widgets-bundle'),
225
- '0.5' => __('Very rounded', 'so-widgets-bundle'),
226
- '1.5' => __('Completely rounded', 'so-widgets-bundle'),
227
  ),
228
  ),
229
 
230
  'padding' => array(
231
  'type' => 'select',
232
- 'label' => __('Padding', 'so-widgets-bundle'),
233
  'default' => '1',
234
  'options' => array(
235
- '0.5' => __('Low', 'so-widgets-bundle'),
236
- '1' => __('Medium', 'so-widgets-bundle'),
237
- '1.4' => __('High', 'so-widgets-bundle'),
238
- '1.8' => __('Very high', 'so-widgets-bundle'),
239
  ),
240
  ),
241
 
@@ -244,44 +244,44 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
244
 
245
  'attributes' => array(
246
  'type' => 'section',
247
- 'label' => __('Other attributes and SEO', 'so-widgets-bundle'),
248
  'hide' => true,
249
  'fields' => array(
250
  'id' => array(
251
  'type' => 'text',
252
- 'label' => __('Button ID', 'so-widgets-bundle'),
253
- 'description' => __('An ID attribute allows you to target this button in Javascript.', 'so-widgets-bundle'),
254
  ),
255
 
256
  'classes' => array(
257
  'type' => 'text',
258
- 'label' => __('Button classes', 'so-widgets-bundle'),
259
- 'description' => __('Additional CSS classes added to the button link.', 'so-widgets-bundle'),
260
  ),
261
 
262
  'title' => array(
263
  'type' => 'text',
264
- 'label' => __('Title attribute', 'so-widgets-bundle'),
265
- 'description' => __('Adds a title attribute to the button link.', 'so-widgets-bundle'),
266
  ),
267
 
268
  'onclick' => array(
269
  'type' => 'text',
270
- 'label' => __('Onclick', 'so-widgets-bundle'),
271
- 'description' => __('Run this Javascript when the button is clicked. Ideal for tracking.', 'so-widgets-bundle'),
272
  ),
273
 
274
  'rel' => array(
275
  'type' => 'text',
276
- 'label' => __('Rel attribute', 'so-widgets-bundle'),
277
- 'description' => __('Adds a rel attribute to the button link.', 'so-widgets-bundle'),
278
  ),
279
  )
280
  ),
281
  );
282
  }
283
 
284
- function get_style_name($instance) {
285
  if(empty($instance['design']['theme'])) return 'atom';
286
  return $instance['design']['theme'];
287
  }
@@ -338,7 +338,7 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
338
  }
339
 
340
  $icon_image_url = '';
341
- if( ! empty( $instance['button_icon']['icon'] ) ) {
342
  $attachment = wp_get_attachment_image_src( $instance['button_icon']['icon'] );
343
 
344
  if ( ! empty( $attachment ) ) {
@@ -348,7 +348,7 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
348
 
349
  return array(
350
  'button_attributes' => $button_attributes,
351
- 'href' => !empty( $instance['url'] ) ? $instance['url'] : '#',
352
  'onclick' => ! empty( $attributes['onclick'] ) ? $attributes['onclick'] : '',
353
  'align' => $instance['design']['align'],
354
  'icon_image_url' => $icon_image_url,
@@ -365,8 +365,8 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
365
  *
366
  * @return array
367
  */
368
- function get_less_variables($instance){
369
- if( empty( $instance ) || empty( $instance['design'] ) ) return array();
370
 
371
  $text_color = isset( $instance['design']['text_color'] ) ? $instance['design']['text_color'] : '';
372
  $button_color = isset( $instance['design']['button_color'] ) ? $instance['design']['button_color'] : '';
@@ -390,7 +390,8 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
390
  $font = siteorigin_widget_get_font( $instance['design']['font'] );
391
  $less_vars['button_font'] = $font['family'];
392
  if ( ! empty( $font['weight'] ) ) {
393
- $less_vars['button_font_weight'] = $font['weight'];
 
394
  }
395
  }
396
  return $less_vars;
12
 
13
  parent::__construct(
14
  'sow-button',
15
+ __( 'SiteOrigin Button', 'so-widgets-bundle' ),
16
  array(
17
+ 'description' => __( 'A powerful yet simple button widget for your sidebars or Page Builder pages.', 'so-widgets-bundle' ),
18
  'help' => 'https://siteorigin.com/widgets-bundle/button-widget-documentation/'
19
  ),
20
  array(
54
  return array(
55
  'text' => array(
56
  'type' => 'text',
57
+ 'label' => __( 'Button text', 'so-widgets-bundle' ),
58
  ),
59
 
60
  'url' => array(
61
  'type' => 'link',
62
+ 'label' => __( 'Destination URL', 'so-widgets-bundle' ),
63
  'allow_shortcode' => true,
64
  ),
65
 
73
  'type' => 'checkbox',
74
  'default' => false,
75
  'label' => __( 'Download', 'so-widgets-bundle' ),
76
+ 'description' => __( 'The Destination URL will be downloaded when a user clicks on the button.', 'so-widgets-bundle' ),
77
  ),
78
 
79
  'button_icon' => array(
80
  'type' => 'section',
81
+ 'label' => __( 'Icon', 'so-widgets-bundle' ),
82
  'fields' => array(
83
  'icon_selected' => array(
84
  'type' => 'icon',
85
+ 'label' => __( 'Icon', 'so-widgets-bundle' ),
86
  ),
87
 
88
  'icon_color' => array(
89
  'type' => 'color',
90
+ 'label' => __( 'Icon color', 'so-widgets-bundle' ),
91
  ),
92
 
93
  'icon' => array(
94
  'type' => 'media',
95
+ 'label' => __( 'Image icon', 'so-widgets-bundle' ),
96
+ 'description' => __( 'Replaces the icon with your own image icon.', 'so-widgets-bundle' ),
97
  ),
98
 
99
  'icon_placement' => array(
146
  ),
147
  'theme' => array(
148
  'type' => 'select',
149
+ 'label' => __( 'Button theme', 'so-widgets-bundle' ),
150
  'default' => 'atom',
151
  'options' => array(
152
+ 'atom' => __( 'Atom', 'so-widgets-bundle' ),
153
+ 'flat' => __( 'Flat', 'so-widgets-bundle' ),
154
+ 'wire' => __( 'Wire', 'so-widgets-bundle' ),
155
  ),
156
  ),
157
 
158
 
159
  'button_color' => array(
160
  'type' => 'color',
161
+ 'label' => __( 'Button color', 'so-widgets-bundle' ),
162
  ),
163
 
164
  'text_color' => array(
165
  'type' => 'color',
166
+ 'label' => __( 'Text color', 'so-widgets-bundle' ),
167
  ),
168
 
169
  'hover' => array(
206
 
207
  'font_size' => array(
208
  'type' => 'select',
209
+ 'label' => __( 'Font size', 'so-widgets-bundle' ),
210
  'options' => array(
211
+ '1' => __( 'Normal', 'so-widgets-bundle' ),
212
+ '1.15' => __( 'Medium', 'so-widgets-bundle' ),
213
+ '1.3' => __( 'Large', 'so-widgets-bundle' ),
214
+ '1.45' => __( 'Extra large', 'so-widgets-bundle' ),
215
  ),
216
  ),
217
 
218
  'rounding' => array(
219
  'type' => 'select',
220
+ 'label' => __( 'Rounding', 'so-widgets-bundle' ),
221
  'default' => '0.25',
222
  'options' => array(
223
+ '0' => __( 'None', 'so-widgets-bundle' ),
224
+ '0.25' => __( 'Slightly rounded', 'so-widgets-bundle' ),
225
+ '0.5' => __( 'Very rounded', 'so-widgets-bundle' ),
226
+ '1.5' => __( 'Completely rounded', 'so-widgets-bundle' ),
227
  ),
228
  ),
229
 
230
  'padding' => array(
231
  'type' => 'select',
232
+ 'label' => __( 'Padding', 'so-widgets-bundle' ),
233
  'default' => '1',
234
  'options' => array(
235
+ '0.5' => __( 'Low', 'so-widgets-bundle' ),
236
+ '1' => __( 'Medium', 'so-widgets-bundle' ),
237
+ '1.4' => __( 'High', 'so-widgets-bundle' ),
238
+ '1.8' => __( 'Very high', 'so-widgets-bundle' ),
239
  ),
240
  ),
241
 
244
 
245
  'attributes' => array(
246
  'type' => 'section',
247
+ 'label' => __( 'Other attributes and SEO', 'so-widgets-bundle' ),
248
  'hide' => true,
249
  'fields' => array(
250
  'id' => array(
251
  'type' => 'text',
252
+ 'label' => __( 'Button ID', 'so-widgets-bundle' ),
253
+ 'description' => __( 'An ID attribute allows you to target this button in Javascript.', 'so-widgets-bundle' ),
254
  ),
255
 
256
  'classes' => array(
257
  'type' => 'text',
258
+ 'label' => __( 'Button classes', 'so-widgets-bundle' ),
259
+ 'description' => __( 'Additional CSS classes added to the button link.', 'so-widgets-bundle' ),
260
  ),
261
 
262
  'title' => array(
263
  'type' => 'text',
264
+ 'label' => __( 'Title attribute', 'so-widgets-bundle' ),
265
+ 'description' => __( 'Adds a title attribute to the button link.', 'so-widgets-bundle' ),
266
  ),
267
 
268
  'onclick' => array(
269
  'type' => 'text',
270
+ 'label' => __( 'Onclick', 'so-widgets-bundle' ),
271
+ 'description' => __( 'Run this Javascript when the button is clicked. Ideal for tracking.', 'so-widgets-bundle' ),
272
  ),
273
 
274
  'rel' => array(
275
  'type' => 'text',
276
+ 'label' => __( 'Rel attribute', 'so-widgets-bundle' ),
277
+ 'description' => __( 'Adds a rel attribute to the button link.', 'so-widgets-bundle' ),
278
  ),
279
  )
280
  ),
281
  );
282
  }
283
 
284
+ function get_style_name( $instance ) {
285
  if(empty($instance['design']['theme'])) return 'atom';
286
  return $instance['design']['theme'];
287
  }
338
  }
339
 
340
  $icon_image_url = '';
341
+ if ( ! empty( $instance['button_icon']['icon'] ) ) {
342
  $attachment = wp_get_attachment_image_src( $instance['button_icon']['icon'] );
343
 
344
  if ( ! empty( $attachment ) ) {
348
 
349
  return array(
350
  'button_attributes' => $button_attributes,
351
+ 'href' => ! empty( $instance['url'] ) ? $instance['url'] : '#',
352
  'onclick' => ! empty( $attributes['onclick'] ) ? $attributes['onclick'] : '',
353
  'align' => $instance['design']['align'],
354
  'icon_image_url' => $icon_image_url,
365
  *
366
  * @return array
367
  */
368
+ function get_less_variables( $instance ) {
369
+ if ( empty( $instance ) || empty( $instance['design'] ) ) return array();
370
 
371
  $text_color = isset( $instance['design']['text_color'] ) ? $instance['design']['text_color'] : '';
372
  $button_color = isset( $instance['design']['button_color'] ) ? $instance['design']['button_color'] : '';
390
  $font = siteorigin_widget_get_font( $instance['design']['font'] );
391
  $less_vars['button_font'] = $font['family'];
392
  if ( ! empty( $font['weight'] ) ) {
393
+ $less_vars['button_font_weight'] = $font['weight_raw'];
394
+ $less_vars['button_font_style'] = $font['style'];
395
  }
396
  }
397
  return $less_vars;
widgets/button/styles/atom.less CHANGED
@@ -14,6 +14,7 @@
14
 
15
  @button_font: default;
16
  @button_font_weight: default;
 
17
 
18
  @font_size: 1em;
19
  @rounding: 0.25em;
@@ -47,6 +48,7 @@
47
  max-width: 100%;
48
  }
49
  .font(@button_font, @button_font_weight);
 
50
 
51
  font-size: @font_size;
52
  padding: @padding @padding*2;
14
 
15
  @button_font: default;
16
  @button_font_weight: default;
17
+ @button_font_style: default;
18
 
19
  @font_size: 1em;
20
  @rounding: 0.25em;
48
  max-width: 100%;
49
  }
50
  .font(@button_font, @button_font_weight);
51
+ font-style: @button_font_style;
52
 
53
  font-size: @font_size;
54
  padding: @padding @padding*2;
widgets/button/styles/flat.less CHANGED
@@ -14,6 +14,7 @@
14
 
15
  @button_font: default;
16
  @button_font_weight: default;
 
17
 
18
  @font_size: 1em;
19
  @rounding: 0.25em;
@@ -48,6 +49,7 @@
48
  max-width: 100%;
49
  }
50
  .font(@button_font, @button_font_weight);
 
51
 
52
  font-size: @font_size;
53
  padding: @padding @padding*2;
14
 
15
  @button_font: default;
16
  @button_font_weight: default;
17
+ @button_font_style: default;
18
 
19
  @font_size: 1em;
20
  @rounding: 0.25em;
49
  max-width: 100%;
50
  }
51
  .font(@button_font, @button_font_weight);
52
+ font-style: @button_font_style;
53
 
54
  font-size: @font_size;
55
  padding: @padding @padding*2;
widgets/button/styles/wire.less CHANGED
@@ -13,6 +13,7 @@
13
 
14
  @button_font: default;
15
  @button_font_weight: default;
 
16
 
17
  @font_size: 1em;
18
  @rounding: 0.25em;
@@ -47,6 +48,7 @@
47
  max-width: 100%;
48
  }
49
  .font(@button_font, @button_font_weight);
 
50
 
51
  font-size: @font_size;
52
  padding: @padding @padding*2;
13
 
14
  @button_font: default;
15
  @button_font_weight: default;
16
+ @button_font_style: default;
17
 
18
  @font_size: 1em;
19
  @rounding: 0.25em;
48
  max-width: 100%;
49
  }
50
  .font(@button_font, @button_font_weight);
51
+ font-style: @button_font_style;
52
 
53
  font-size: @font_size;
54
  padding: @padding @padding*2;
widgets/contact/contact.php CHANGED
@@ -830,7 +830,6 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
830
 
831
  // Field labels
832
  'label_font_family' => $label_font['family'],
833
- 'label_font_weight' => ! empty( $label_font['weight'] ) ? $label_font['weight'] : '',
834
  'label_font_size' => $instance['design']['labels']['size'],
835
  'label_font_color' => $instance['design']['labels']['color'],
836
  'label_position' => $label_position,
@@ -839,7 +838,6 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
839
 
840
  // Fields
841
  'field_font_family' => $field_font['family'],
842
- 'field_font_weight' => ! empty( $field_font['weight'] ) ? $field_font['weight'] : '',
843
  'field_font_size' => $instance['design']['fields']['font_size'],
844
  'field_font_color' => $instance['design']['fields']['color'],
845
  'field_margin' => $instance['design']['fields']['margin'],
@@ -886,6 +884,16 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
886
  'outline_width' => $instance['design']['focus']['width'],
887
  );
888
 
 
 
 
 
 
 
 
 
 
 
889
  $global_settings = $this->get_global_settings();
890
  if ( ! empty( $global_settings['responsive_breakpoint'] ) ) {
891
  $less_vars['responsive_breakpoint'] = $global_settings['responsive_breakpoint'];
830
 
831
  // Field labels
832
  'label_font_family' => $label_font['family'],
 
833
  'label_font_size' => $instance['design']['labels']['size'],
834
  'label_font_color' => $instance['design']['labels']['color'],
835
  'label_position' => $label_position,
838
 
839
  // Fields
840
  'field_font_family' => $field_font['family'],
 
841
  'field_font_size' => $instance['design']['fields']['font_size'],
842
  'field_font_color' => $instance['design']['fields']['color'],
843
  'field_margin' => $instance['design']['fields']['margin'],
884
  'outline_width' => $instance['design']['focus']['width'],
885
  );
886
 
887
+ if ( ! empty( $label_font['weight'] ) ) {
888
+ $vars['label_font_weight'] = $label_font['weight_raw'];
889
+ $lessvars_vars['label_font_style'] = $label_font['style'];
890
+ }
891
+
892
+ if ( ! empty( $field_font['weight'] ) ) {
893
+ $vars['field_font_weight'] = $field_font['weight_raw'];
894
+ $lessvars_vars['field_font_style'] = $field_font['style'];
895
+ }
896
+
897
  $global_settings = $this->get_global_settings();
898
  if ( ! empty( $global_settings['responsive_breakpoint'] ) ) {
899
  $less_vars['responsive_breakpoint'] = $global_settings['responsive_breakpoint'];
widgets/contact/styles/default.less CHANGED
@@ -19,7 +19,9 @@
19
  strong {
20
  @label_font_family: default;
21
  @label_font_weight: default;
 
22
  .font(@label_font_family, @label_font_weight);
 
23
 
24
  @label_font_size: default;
25
  font-size: @label_font_size;
@@ -56,6 +58,7 @@
56
 
57
  @field_font_family: default;
58
  @field_font_weight: default;
 
59
  @field_font_size: default;
60
  @field_font_color: default;
61
 
@@ -118,6 +121,7 @@
118
 
119
  font-size: @field_font_size;
120
  .font(@field_font_family, @field_font_weight);
 
121
  }
122
 
123
  &.sow-form-field-radio {
19
  strong {
20
  @label_font_family: default;
21
  @label_font_weight: default;
22
+ @label_font_style: default;
23
  .font(@label_font_family, @label_font_weight);
24
+ font-style: @label_font_style;
25
 
26
  @label_font_size: default;
27
  font-size: @label_font_size;
58
 
59
  @field_font_family: default;
60
  @field_font_weight: default;
61
+ @field_font_style: default;
62
  @field_font_size: default;
63
  @field_font_color: default;
64
 
121
 
122
  font-size: @field_font_size;
123
  .font(@field_font_family, @field_font_weight);
124
+ font-style: @field_font_style;
125
  }
126
 
127
  &.sow-form-field-radio {
widgets/features/features.php CHANGED
@@ -292,7 +292,8 @@ class SiteOrigin_Widget_Features_Widget extends SiteOrigin_Widget {
292
  $font = siteorigin_widget_get_font( $styles['font'] );
293
  $less_vars[$field_name.'_font'] = $font['family'];
294
  if ( ! empty( $font['weight'] ) ) {
295
- $less_vars[$field_name.'_font_weight'] = $font['weight'];
 
296
  }
297
  }
298
  }
292
  $font = siteorigin_widget_get_font( $styles['font'] );
293
  $less_vars[$field_name.'_font'] = $font['family'];
294
  if ( ! empty( $font['weight'] ) ) {
295
+ $less_vars[ $field_name . '_font_weight' ] = $font['weight_raw'];
296
+ $less_vars[ $field_name . '_font_style' ] = $font['style'];
297
  }
298
  }
299
  }
widgets/features/styles/default.less CHANGED
@@ -2,17 +2,20 @@
2
 
3
  @title_font: default;
4
  @title_font_weight: 400;
 
5
  @title_size: default;
6
  @title_color: default;
7
  @title_tag: h5;
8
 
9
  @text_font: default;
10
  @text_font_weight: 400;
 
11
  @text_size: default;
12
  @text_color: default;
13
 
14
  @more_text_font: default;
15
  @more_text_font_weight: 400;
 
16
  @more_text_size: default;
17
  @more_text_color: default;
18
  @per_row: 3;
@@ -160,17 +163,20 @@
160
  .textwidget {
161
  margin: auto;
162
  .font(@text_font, @text_font_weight);
 
163
  font-size: @text_size;
164
  color: @text_color;
165
 
166
  > @{title_tag} {
167
  .font(@title_font, @title_font_weight);
 
168
  font-size: @title_size;
169
  color: @title_color;
170
  }
171
 
172
  > p.sow-more-text {
173
  .font(@more_text_font, @more_text_font_weight);
 
174
  font-size: @more_text_size;
175
  color: @more_text_color;
176
  }
2
 
3
  @title_font: default;
4
  @title_font_weight: 400;
5
+ @title_font_style: default;
6
  @title_size: default;
7
  @title_color: default;
8
  @title_tag: h5;
9
 
10
  @text_font: default;
11
  @text_font_weight: 400;
12
+ @text_font_style: default;
13
  @text_size: default;
14
  @text_color: default;
15
 
16
  @more_text_font: default;
17
  @more_text_font_weight: 400;
18
+ @more_text_font_style: default;
19
  @more_text_size: default;
20
  @more_text_color: default;
21
  @per_row: 3;
163
  .textwidget {
164
  margin: auto;
165
  .font(@text_font, @text_font_weight);
166
+ font-style: @text_font_style;
167
  font-size: @text_size;
168
  color: @text_color;
169
 
170
  > @{title_tag} {
171
  .font(@title_font, @title_font_weight);
172
+ font-style: @title_font_style;
173
  font-size: @title_size;
174
  color: @title_color;
175
  }
176
 
177
  > p.sow-more-text {
178
  .font(@more_text_font, @more_text_font_weight);
179
+ font-style: @more_text_font_style;
180
  font-size: @more_text_size;
181
  color: @more_text_color;
182
  }
widgets/headline/headline.php CHANGED
@@ -54,7 +54,7 @@ class SiteOrigin_Widget_Headline_Widget extends SiteOrigin_Widget {
54
  'tag' => array(
55
  'type' => 'select',
56
  'label' => __( 'HTML Tag', 'so-widgets-bundle' ),
57
- 'default' => 'h1',
58
  'options' => array(
59
  'h1' => __( 'H1', 'so-widgets-bundle' ),
60
  'h2' => __( 'H2', 'so-widgets-bundle' ),
54
  'tag' => array(
55
  'type' => 'select',
56
  'label' => __( 'HTML Tag', 'so-widgets-bundle' ),
57
+ 'default' => 'h2',
58
  'options' => array(
59
  'h1' => __( 'H1', 'so-widgets-bundle' ),
60
  'h2' => __( 'H2', 'so-widgets-bundle' ),
widgets/hero/hero.php CHANGED
@@ -298,6 +298,7 @@ class SiteOrigin_Widget_Hero_Widget extends SiteOrigin_Widget_Base_Slider {
298
  function filter_button_widget_form( $form_fields ) {
299
 
300
  unset( $form_fields['design']['fields']['align'] );
 
301
 
302
  return $form_fields;
303
  }
@@ -426,14 +427,16 @@ class SiteOrigin_Widget_Hero_Widget extends SiteOrigin_Widget_Base_Slider {
426
  $heading_font = siteorigin_widget_get_font( $instance['design']['heading_font'] );
427
  $less['heading_font'] = $heading_font['family'];
428
  if ( ! empty( $heading_font['weight'] ) ) {
429
- $less['heading_font_weight'] = $heading_font['weight'];
 
430
  }
431
 
432
  if ( ! empty( $instance['design']['text_font'] ) ) {
433
  $text_font = siteorigin_widget_get_font( $instance['design']['text_font'] );
434
  $less['text_font'] = $text_font['family'];
435
  if ( ! empty( $text_font['weight'] ) ) {
436
- $less['text_font_weight'] = $text_font['weight'];
 
437
  }
438
  }
439
 
298
  function filter_button_widget_form( $form_fields ) {
299
 
300
  unset( $form_fields['design']['fields']['align'] );
301
+ unset( $form_fields['design']['fields']['mobile_align'] );
302
 
303
  return $form_fields;
304
  }
427
  $heading_font = siteorigin_widget_get_font( $instance['design']['heading_font'] );
428
  $less['heading_font'] = $heading_font['family'];
429
  if ( ! empty( $heading_font['weight'] ) ) {
430
+ $less['heading_font_weight'] = $heading_font['weight_raw'];
431
+ $less['heading_font_style'] = $heading_font['style'];
432
  }
433
 
434
  if ( ! empty( $instance['design']['text_font'] ) ) {
435
  $text_font = siteorigin_widget_get_font( $instance['design']['text_font'] );
436
  $less['text_font'] = $text_font['family'];
437
  if ( ! empty( $text_font['weight'] ) ) {
438
+ $less['text_font_weight'] = $text_font['weight_raw'];
439
+ $less['text_font_style'] = $text_font['style'];
440
  }
441
  }
442
 
widgets/hero/styles/default.less CHANGED
@@ -14,12 +14,14 @@
14
  @text_shadow: 0.25;
15
  @text_font: default;
16
  @text_font_weight: 500;
 
17
 
18
  @link_color: default;
19
  @link_color_hover: default;
20
 
21
  @heading_font: default;
22
  @heading_font_weight: 400;
 
23
  @heading_color: #FFFFFF;
24
  @heading_shadow: 50;
25
 
@@ -77,6 +79,7 @@
77
  margin: 0.1em 0;
78
 
79
  .font(@heading_font, @heading_font_weight);
 
80
  }
81
 
82
  h1 {
@@ -119,6 +122,7 @@
119
  font-size: @text_size;
120
 
121
  .font(@text_font, @text_font_weight);
 
122
  }
123
 
124
  .sow-hero-buttons {
14
  @text_shadow: 0.25;
15
  @text_font: default;
16
  @text_font_weight: 500;
17
+ @text_font_style: default;
18
 
19
  @link_color: default;
20
  @link_color_hover: default;
21
 
22
  @heading_font: default;
23
  @heading_font_weight: 400;
24
+ @heading_font_style: default;
25
  @heading_color: #FFFFFF;
26
  @heading_shadow: 50;
27
 
79
  margin: 0.1em 0;
80
 
81
  .font(@heading_font, @heading_font_weight);
82
+ font-style: @heading_font_style;
83
  }
84
 
85
  h1 {
122
  font-size: @text_size;
123
 
124
  .font(@text_font, @text_font_weight);
125
+ font-style: @text_font_style;
126
  }
127
 
128
  .sow-hero-buttons {
widgets/image-grid/image-grid.php CHANGED
@@ -130,6 +130,29 @@ class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
130
  ),
131
  ),
132
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  )
134
  )
135
  );
@@ -239,12 +262,12 @@ class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
239
  * @return mixed
240
  */
241
  function get_less_variables( $instance ) {
242
- $less = array();
243
- if ( ! empty( $instance['display']['padding'] ) ) {
244
- $less['padding'] = $instance['display']['padding'];
245
- }
246
 
247
- return $less;
248
  }
249
 
250
  function get_form_teaser() {
130
  ),
131
  ),
132
  ),
133
+
134
+ 'alignment_vertical' => array(
135
+ 'type' => 'select',
136
+ 'label' => __( 'Image vertical alignment', 'so-widgets-bundle' ),
137
+ 'description' => __( 'Applied if image heights differ.', 'so-widgets-bundle' ),
138
+ 'default' => 'end',
139
+ 'options' => array(
140
+ 'flex-start' => __( 'Top', 'so-widgets-bundle' ),
141
+ 'center' => __( 'Center', 'so-widgets-bundle' ),
142
+ 'flex-end' => __( 'Bottom', 'so-widgets-bundle' ),
143
+ ),
144
+ ),
145
+
146
+ 'alignment_horizontal' => array(
147
+ 'type' => 'select',
148
+ 'label' => __( 'Grid horizontal alignment', 'so-widgets-bundle' ),
149
+ 'default' => 'center',
150
+ 'options' => array(
151
+ 'flex-start' => __( 'Left', 'so-widgets-bundle' ),
152
+ 'center' => __( 'Center', 'so-widgets-bundle' ),
153
+ 'flex-end' => __( 'Right', 'so-widgets-bundle' ),
154
+ ),
155
+ ),
156
  )
157
  )
158
  );
262
  * @return mixed
263
  */
264
  function get_less_variables( $instance ) {
265
+ return array(
266
+ 'padding' => ! empty( $instance['display']['padding'] ) ? $instance['display']['padding'] : '5px 5px 5px 5px',
267
+ 'alignment_horizontal' => ! empty( $instance['display']['alignment_horizontal'] ) ? $instance['display']['alignment_horizontal'] : 'center',
268
+ 'alignment_vertical' => ! empty( $instance['display']['alignment_vertical'] ) ? $instance['display']['alignment_vertical'] : 'baseline',
269
 
270
+ );
271
  }
272
 
273
  function get_form_teaser() {
widgets/image-grid/styles/default.less CHANGED
@@ -1,10 +1,12 @@
1
  @padding: default;
 
 
2
 
3
  .sow-image-grid-wrapper {
4
  display: flex;
5
  flex-wrap: wrap;
6
- justify-content: center;
7
- align-items: baseline;
8
  line-height: 0;
9
  text-align: center;
10
 
1
  @padding: default;
2
+ @alignment_horizontal: center;
3
+ @alignment_vertical: end;
4
 
5
  .sow-image-grid-wrapper {
6
  display: flex;
7
  flex-wrap: wrap;
8
+ justify-content: @alignment_horizontal;
9
+ align-items: @alignment_vertical;
10
  line-height: 0;
11
  text-align: center;
12
 
widgets/image/image.php CHANGED
@@ -11,9 +11,9 @@ class SiteOrigin_Widget_Image_Widget extends SiteOrigin_Widget {
11
  function __construct() {
12
  parent::__construct(
13
  'sow-image',
14
- __('SiteOrigin Image', 'so-widgets-bundle'),
15
  array(
16
- 'description' => __('A simple image widget with massive power.', 'so-widgets-bundle'),
17
  'help' => 'https://siteorigin.com/widgets-bundle/image-widget-documentation/'
18
  ),
19
  array(
@@ -29,26 +29,26 @@ class SiteOrigin_Widget_Image_Widget extends SiteOrigin_Widget {
29
  return array(
30
  'image' => array(
31
  'type' => 'media',
32
- 'label' => __('Image file', 'so-widgets-bundle'),
33
  'library' => 'image',
34
  'fallback' => true,
35
  ),
36
 
37
  'size' => array(
38
  'type' => 'image-size',
39
- 'label' => __('Image size', 'so-widgets-bundle'),
40
  'custom_size' => true,
41
  ),
42
 
43
  'align' => array(
44
  'type' => 'select',
45
- 'label' => __('Image alignment', 'so-widgets-bundle'),
46
  'default' => 'default',
47
  'options' => array(
48
- 'default' => __('Default', 'so-widgets-bundle'),
49
- 'left' => __('Left', 'so-widgets-bundle'),
50
- 'right' => __('Right', 'so-widgets-bundle'),
51
- 'center' => __('Center', 'so-widgets-bundle'),
52
  ),
53
  ),
54
 
@@ -66,12 +66,12 @@ class SiteOrigin_Widget_Image_Widget extends SiteOrigin_Widget {
66
 
67
  'title' => array(
68
  'type' => 'text',
69
- 'label' => __('Title text', 'so-widgets-bundle'),
70
  ),
71
 
72
  'title_position' => array(
73
  'type' => 'select',
74
- 'label' => __('Title position', 'so-widgets-bundle'),
75
  'default' => 'hidden',
76
  'options' => array(
77
  'hidden' => __( 'Hidden', 'so-widgets-bundle' ),
@@ -82,36 +82,43 @@ class SiteOrigin_Widget_Image_Widget extends SiteOrigin_Widget {
82
 
83
  'alt' => array(
84
  'type' => 'text',
85
- 'label' => __('Alt text', 'so-widgets-bundle'),
86
  ),
87
 
88
  'url' => array(
89
  'type' => 'link',
90
- 'label' => __('Destination URL', 'so-widgets-bundle'),
 
 
 
 
 
 
91
  ),
 
92
  'new_window' => array(
93
  'type' => 'checkbox',
94
  'default' => false,
95
- 'label' => __('Open in new window', 'so-widgets-bundle'),
96
  ),
97
 
98
  'bound' => array(
99
  'type' => 'checkbox',
100
  'default' => true,
101
- 'label' => __('Bound', 'so-widgets-bundle'),
102
- 'description' => __("Make sure the image doesn't extend beyond its container.", 'so-widgets-bundle'),
103
  ),
104
  'full_width' => array(
105
  'type' => 'checkbox',
106
  'default' => false,
107
- 'label' => __('Full Width', 'so-widgets-bundle'),
108
- 'description' => __("Resize image to fit its container.", 'so-widgets-bundle'),
109
  ),
110
 
111
  );
112
  }
113
 
114
- function get_style_hash($instance) {
115
  return substr( md5( serialize( $this->get_less_variables( $instance ) ) ), 0, 12 );
116
  }
117
 
@@ -185,6 +192,7 @@ class SiteOrigin_Widget_Image_Widget extends SiteOrigin_Widget {
185
  'title' => $title,
186
  'title_position' => $instance['title_position'],
187
  'url' => $instance['url'],
 
188
  'new_window' => $instance['new_window'],
189
  'link_attributes' => $link_atts,
190
  'attributes' => $attr,
@@ -222,7 +230,7 @@ class SiteOrigin_Widget_Image_Widget extends SiteOrigin_Widget {
222
  return $title;
223
  }
224
 
225
- function get_less_variables($instance){
226
  if ( empty( $instance ) ) {
227
  return array();
228
  }
@@ -235,8 +243,23 @@ class SiteOrigin_Widget_Image_Widget extends SiteOrigin_Widget {
235
  );
236
  }
237
 
238
- function get_form_teaser(){
239
- if( class_exists( 'SiteOrigin_Premium' ) ) return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
 
241
  return sprintf(
242
  __( 'Add a Lightbox to your images with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
@@ -246,4 +269,4 @@ class SiteOrigin_Widget_Image_Widget extends SiteOrigin_Widget {
246
  }
247
  }
248
 
249
- siteorigin_widget_register('sow-image', __FILE__, 'SiteOrigin_Widget_Image_Widget');
11
  function __construct() {
12
  parent::__construct(
13
  'sow-image',
14
+ __( 'SiteOrigin Image', 'so-widgets-bundle' ),
15
  array(
16
+ 'description' => __( 'A simple image widget with massive power.', 'so-widgets-bundle' ),
17
  'help' => 'https://siteorigin.com/widgets-bundle/image-widget-documentation/'
18
  ),
19
  array(
29
  return array(
30
  'image' => array(
31
  'type' => 'media',
32
+ 'label' => __( 'Image file', 'so-widgets-bundle' ),
33
  'library' => 'image',
34
  'fallback' => true,
35
  ),
36
 
37
  'size' => array(
38
  'type' => 'image-size',
39
+ 'label' => __( 'Image size', 'so-widgets-bundle' ),
40
  'custom_size' => true,
41
  ),
42
 
43
  'align' => array(
44
  'type' => 'select',
45
+ 'label' => __( 'Image alignment', 'so-widgets-bundle' ),
46
  'default' => 'default',
47
  'options' => array(
48
+ 'default' => __( 'Default', 'so-widgets-bundle' ),
49
+ 'left' => __( 'Left', 'so-widgets-bundle' ),
50
+ 'right' => __( 'Right', 'so-widgets-bundle' ),
51
+ 'center' => __( 'Center', 'so-widgets-bundle' ),
52
  ),
53
  ),
54
 
66
 
67
  'title' => array(
68
  'type' => 'text',
69
+ 'label' => __( 'Title text', 'so-widgets-bundle' ),
70
  ),
71
 
72
  'title_position' => array(
73
  'type' => 'select',
74
+ 'label' => __( 'Title position', 'so-widgets-bundle' ),
75
  'default' => 'hidden',
76
  'options' => array(
77
  'hidden' => __( 'Hidden', 'so-widgets-bundle' ),
82
 
83
  'alt' => array(
84
  'type' => 'text',
85
+ 'label' => __( 'Alt text', 'so-widgets-bundle' ),
86
  ),
87
 
88
  'url' => array(
89
  'type' => 'link',
90
+ 'label' => __( 'Destination URL', 'so-widgets-bundle' ),
91
+ ),
92
+
93
+ 'link_title' => array(
94
+ 'type' => 'checkbox',
95
+ 'default' => false,
96
+ 'label' => __( 'Link title to URL', 'so-widgets-bundle' ),
97
  ),
98
+
99
  'new_window' => array(
100
  'type' => 'checkbox',
101
  'default' => false,
102
+ 'label' => __( 'Open in new window', 'so-widgets-bundle' ),
103
  ),
104
 
105
  'bound' => array(
106
  'type' => 'checkbox',
107
  'default' => true,
108
+ 'label' => __( 'Bound', 'so-widgets-bundle' ),
109
+ 'description' => __( "Make sure the image doesn't extend beyond its container.", 'so-widgets-bundle' ),
110
  ),
111
  'full_width' => array(
112
  'type' => 'checkbox',
113
  'default' => false,
114
+ 'label' => __( 'Full width', 'so-widgets-bundle' ),
115
+ 'description' => __( "Resize image to fit its container.", 'so-widgets-bundle' ),
116
  ),
117
 
118
  );
119
  }
120
 
121
+ function get_style_hash( $instance ) {
122
  return substr( md5( serialize( $this->get_less_variables( $instance ) ) ), 0, 12 );
123
  }
124
 
192
  'title' => $title,
193
  'title_position' => $instance['title_position'],
194
  'url' => $instance['url'],
195
+ 'link_title' => ! empty( $instance['link_title'] ) ? $instance['link_title'] : false,
196
  'new_window' => $instance['new_window'],
197
  'link_attributes' => $link_atts,
198
  'attributes' => $attr,
230
  return $title;
231
  }
232
 
233
+ function get_less_variables( $instance ) {
234
  if ( empty( $instance ) ) {
235
  return array();
236
  }
243
  );
244
  }
245
 
246
+ function generate_anchor_open( $url, $link_attributes ) {
247
+ ?>
248
+ <a
249
+ href="<?php echo sow_esc_url( $url ); ?>"
250
+ <?php
251
+ foreach ( $link_attributes as $attr => $val ) {
252
+ if ( ! empty( $val ) ) {
253
+ echo $attr . '="' . esc_attr( $val ) . '" ';
254
+ }
255
+ }
256
+ ?>
257
+ >
258
+ <?php
259
+ }
260
+
261
+ function get_form_teaser() {
262
+ if ( class_exists( 'SiteOrigin_Premium' ) ) return false;
263
 
264
  return sprintf(
265
  __( 'Add a Lightbox to your images with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
269
  }
270
  }
271
 
272
+ siteorigin_widget_register( 'sow-image', __FILE__, 'SiteOrigin_Widget_Image_Widget' );
widgets/image/tpl/default.php CHANGED
@@ -4,26 +4,43 @@
4
  * @var $title_position
5
  * @var $url
6
  * @var $link_attributes
 
7
  * @var $new_window
8
  * @var $attributes
9
  * @var $classes
10
  */
11
  ?>
12
 
13
- <?php if( $title_position == 'above' ) : ?>
14
- <?php echo $args['before_title'] . $title . $args['after_title']; ?>
15
- <?php endif; ?>
 
 
 
 
 
 
 
 
16
 
17
  <?php
18
 
19
  ?>
20
  <div class="sow-image-container">
21
- <?php if ( ! empty( $url ) ) : ?><a href="<?php echo sow_esc_url( $url ) ?>" <?php foreach( $link_attributes as $att => $val ) if ( ! empty( $val ) ) : echo $att.'="' . esc_attr( $val ) . '" '; endif; ?>><?php endif; ?>
22
  <img <?php foreach( $attributes as $n => $v ) if ( $n === 'alt' || ! empty( $v ) ) : echo $n.'="' . esc_attr( $v ) . '" '; endif; ?>
23
  class="<?php echo esc_attr( implode(' ', $classes ) ) ?>"/>
24
- <?php if ( ! empty( $url ) ) : ?></a><?php endif; ?>
25
  </div>
26
 
27
- <?php if( $title_position == 'below' ) : ?>
28
- <?php echo $args['before_title'] . $title . $args['after_title']; ?>
29
- <?php endif; ?>
 
 
 
 
 
 
 
 
4
  * @var $title_position
5
  * @var $url
6
  * @var $link_attributes
7
+ * @var $link_title
8
  * @var $new_window
9
  * @var $attributes
10
  * @var $classes
11
  */
12
  ?>
13
 
14
+ <?php
15
+ if ( $title_position == 'above' ) {
16
+ echo $args['before_title'];
17
+ if ( $link_title && ! empty( $url ) ) {
18
+ echo $this->generate_anchor_open( $url, $link_attributes ) . $title . '</a>';
19
+ } else {
20
+ echo $title;
21
+ }
22
+ echo $args['after_title'];
23
+ }
24
+ ?>
25
 
26
  <?php
27
 
28
  ?>
29
  <div class="sow-image-container">
30
+ <?php if ( ! empty( $url ) ) : $this->generate_anchor_open( $url, $link_attributes ); endif; ?>
31
  <img <?php foreach( $attributes as $n => $v ) if ( $n === 'alt' || ! empty( $v ) ) : echo $n.'="' . esc_attr( $v ) . '" '; endif; ?>
32
  class="<?php echo esc_attr( implode(' ', $classes ) ) ?>"/>
33
+ <?php if ( ! empty( $url ) ) : ?></a><?php endif; ?>
34
  </div>
35
 
36
+ <?php
37
+ if ( $title_position == 'below' ) {
38
+ echo $args['before_title'];
39
+ if ( $link_title && ! empty( $url ) ) {
40
+ echo $this->generate_anchor_open( $url, $link_attributes ) . $title . '</a>';
41
+ } else {
42
+ echo $title;
43
+ }
44
+ echo $args['after_title'];
45
+ }
46
+ ?>