SiteOrigin Widgets Bundle - Version 1.17.9

Version Description

  • 12 November 2020 ==
  • Block Editor: Resolved widget preview issue.
  • Elementor: Minor admin styling improvements.
  • Google Maps: Added a new global consent setting Require consent before loading Maps API at Plugins > SiteOrigin Widgets > Google Maps.
  • Posts Carousel: Added a Link target setting.
  • Video Player: Mute self hosted videos set to autoplay.
  • Tabs: Added a new global setting Scroll top at Plugins > SiteOrigin Widgets > Tabs to disable scrolling when changing tabs.
  • Accordion: Added a new global setting Scroll top at Plugins > SiteOrigin Widgets > Accordion to disable scrolling when changing accordions.
  • Posts Carousel: Added a new Slides to scroll setting for desktop, tablet, and mobile.
  • Safari: Ensured the Hero can save when used at Appearance > Widgets.
  • Updated the widget title field to allow HTML in all SiteOrigin widgets.
  • Changed to enqueue Google Fonts rather than @import.

=

Download this release

Release Info

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

Code changes from version 1.17.8 to 1.17.9

Files changed (58) hide show
  1. admin/admin.js +171 -166
  2. admin/admin.min.js +1 -1
  3. base/base.php +6 -1
  4. base/inc/fields/css/icon-field.css +1 -1
  5. base/inc/fields/css/media-field.css +1 -1
  6. base/inc/fields/js/tinymce-field.js +9 -2
  7. base/inc/fields/js/tinymce-field.min.js +1 -1
  8. base/inc/fields/number.class.php +18 -0
  9. base/inc/fields/posts.class.php +15 -0
  10. base/inc/fields/text-input-base.class.php +17 -0
  11. base/inc/widgets/base-slider.class.php +2 -0
  12. base/js/admin.js +15 -3
  13. base/js/admin.min.js +1 -1
  14. base/siteorigin-widget.class.php +15 -46
  15. compat/elementor/styles.css +1 -1
  16. js/sow.google-map.js +12 -3
  17. js/sow.google-map.min.js +1 -1
  18. lang/so-widgets-bundle.pot +226 -139
  19. readme.txt +15 -2
  20. so-widgets-bundle.php +3 -3
  21. widgets/accordion/accordion.php +25 -1
  22. widgets/accordion/js/accordion.js +8 -1
  23. widgets/accordion/js/accordion.min.js +1 -1
  24. widgets/accordion/styles/default.less +0 -2
  25. widgets/button/button.php +11 -5
  26. widgets/button/styles/atom.less +0 -2
  27. widgets/button/styles/flat.less +0 -2
  28. widgets/button/styles/wire.less +0 -2
  29. widgets/contact/contact.php +3 -10
  30. widgets/contact/styles/default.less +0 -2
  31. widgets/cta/styles/default.less +0 -2
  32. widgets/editor/tpl/default.php +1 -1
  33. widgets/features/features.php +0 -11
  34. widgets/features/styles/default.less +0 -2
  35. widgets/google-map/assets/map-consent-background.jpg +0 -0
  36. widgets/google-map/google-map.php +43 -9
  37. widgets/google-map/styles/default.less +50 -0
  38. widgets/google-map/tpl/js-map.php +15 -4
  39. widgets/headline/headline.php +1 -7
  40. widgets/headline/styles/default.less +1 -3
  41. widgets/hero/hero.php +1 -15
  42. widgets/hero/styles/default.less +0 -2
  43. widgets/image/tpl/default.php +2 -2
  44. widgets/post-carousel/js/carousel.js +29 -22
  45. widgets/post-carousel/js/carousel.min.js +1 -1
  46. widgets/post-carousel/post-carousel.php +107 -11
  47. widgets/post-carousel/tpl/base.php +1 -0
  48. widgets/post-carousel/tpl/carousel-post-loop.php +16 -8
  49. widgets/price-table/tpl/atom.php +1 -1
  50. widgets/simple-masonry/tpl/default.php +1 -1
  51. widgets/social-media-buttons/tpl/default.php +1 -1
  52. widgets/tabs/js/tabs.js +4 -0
  53. widgets/tabs/js/tabs.min.js +1 -1
  54. widgets/tabs/styles/default.less +0 -2
  55. widgets/tabs/tabs.php +25 -1
  56. widgets/testimonial/styles/default.less +0 -2
  57. widgets/testimonial/tpl/default.php +1 -1
  58. widgets/video/tpl/default.php +5 -1
admin/admin.js CHANGED
@@ -2,171 +2,176 @@
2
 
3
  jQuery( function( $ ){
4
 
5
- $('.so-widget-toggle-active button').click( function(){
6
- var $$ = $(this),
7
- s = $$.data('status'),
8
- $w = $$.closest('.so-widget');
9
-
10
- if(s) {
11
- $w.addClass('so-widget-is-active').removeClass('so-widget-is-inactive');
12
- }
13
- else {
14
- $w.removeClass('so-widget-is-active').addClass('so-widget-is-inactive');
15
- }
16
-
17
- // Lets send an ajax request.
18
- $.post(
19
- soWidgetsAdmin.toggleUrl,
20
- {
21
- 'widget' : $w.data('id'),
22
- 'active' : s
23
- },
24
- function(data){
25
- // $sw.find('.dashicons-yes').clearQueue().fadeIn('fast').delay(750).fadeOut('fast');
26
- }
27
- );
28
-
29
- } );
30
-
31
- // Fill in the missing header images
32
- $('.so-widget-banner').each( function(){
33
- var $$ = $(this),
34
- $img = $$.find('img');
35
-
36
- if( !$img.length ) {
37
- // Create an SVG image as a placeholder icon
38
- var pattern = Trianglify({
39
- width: 128,
40
- height: 128,
41
- variance : 1,
42
- cell_size: 32,
43
- seed: $$.data('seed')
44
- });
45
-
46
- $$.append( pattern.svg() );
47
- }
48
- else {
49
- if( $img.width() > 128 ) {
50
- // Deal with wide banner images
51
- $img.css('margin-left', -($img.width()-128)/2 );
52
- }
53
- }
54
- } );
55
-
56
- // Lets implement the search
57
- var widgetSearch = function(){
58
- var q = $(this).val().toLowerCase();
59
-
60
- if( q === '' ) {
61
- $('.so-widget-wrap').show();
62
- }
63
- else {
64
- $('.so-widget').each( function(){
65
- var $$ = $(this);
66
-
67
- if( $$.find('h3').html().toLowerCase().indexOf(q) > -1 ) {
68
- $$.parent().show();
69
- }
70
- else {
71
- $$.parent().hide();
72
- }
73
- } );
74
- }
75
- };
76
- $('#sow-widget-search input').on( {
77
- keyup: widgetSearch,
78
- search: widgetSearch
79
- });
80
-
81
- $(window).resize(function() {
82
- var $descriptions = $('.so-widget-text').css('height', 'auto');
83
- var largestHeight = 0;
84
-
85
- $descriptions.each(function () {
86
- largestHeight = Math.max(largestHeight, $(this).height() );
87
- });
88
-
89
- $descriptions.each(function () {
90
- $(this).css('height', largestHeight);
91
- });
92
-
93
- }).resize();
94
-
95
- // Handle the tabs
96
- $('#sow-widgets-page .page-nav a').click(function(e){
97
- e.preventDefault();
98
- var $$ = $(this);
99
- var href = $$.attr('href');
100
-
101
- var $li = $$.closest('li');
102
- $('#sow-widgets-page .page-nav li').not($li).removeClass('active');
103
- $li.addClass('active');
104
-
105
- switch( href ) {
106
- case '#all' :
107
- $('.so-widget-wrap').show();
108
- break;
109
-
110
- case '#enabled' :
111
- $('.so-widget-wrap').hide();
112
- $('.so-widget-wrap .so-widget-is-active').each(function(){ $(this).closest('.so-widget-wrap').show(); });
113
- $('.so-widget-wrap .so-widget-is-inactive').each(function(){ $(this).closest('.so-widget-wrap').hide(); });
114
- break;
115
-
116
- case '#disabled' :
117
- $('.so-widget-wrap .so-widget-is-active').each(function(){ $(this).closest('.so-widget-wrap').hide(); });
118
- $('.so-widget-wrap .so-widget-is-inactive').each(function(){ $(this).closest('.so-widget-wrap').show(); });
119
- break;
120
- }
121
-
122
- $(window).resize();
123
- });
124
-
125
- // Enable css3 animations on the widgets list
126
- $('#widgets-list').addClass('so-animated');
127
-
128
- // Handle the dialog
129
- var dialog = $('#sow-settings-dialog');
130
-
131
- $( '#widgets-list .so-widget-settings' ).click( function( e ){
132
- var $$ = $(this);
133
- e.preventDefault();
134
-
135
- $content = dialog.find( '.so-content' );
136
- $content
137
- .empty()
138
- .addClass('so-loading')
139
-
140
- $.get( $$.data( 'form-url' ), function( form ) {
141
- $content
142
- .html( form )
143
- .removeClass( 'so-loading' );
144
- } );
145
-
146
- dialog.show();
147
- } );
148
-
149
- dialog.find('.so-close').click( function( e ){
150
- e.preventDefault();
151
- dialog.hide();
152
- } );
153
-
154
- dialog.find('.so-save').click( function( e ){
155
- e.preventDefault();
156
-
157
- var $$ = $( this );
158
- $$.prop( 'disabled', true );
159
-
160
- dialog.find( 'form' ).submit( function() {
161
- $.prop( 'disabled', false );
162
- dialog.hide();
163
- } ).submit();
164
- } );
165
-
166
- // Automatically open settings modal based on hash
167
- if( window.location.hash && window.location.hash.substring(0, 10) === '#settings-' ) {
168
- var openSettingsId = window.location.hash.substring(10);
169
- $('div[data-id="' + openSettingsId + '"] button.so-widget-settings').click();
170
- }
 
 
 
 
 
171
 
172
  } );
2
 
3
  jQuery( function( $ ){
4
 
5
+ $('.so-widget-toggle-active button').click( function(){
6
+ var $$ = $(this),
7
+ s = $$.data('status'),
8
+ $w = $$.closest('.so-widget');
9
+
10
+ if(s) {
11
+ $w.addClass('so-widget-is-active').removeClass('so-widget-is-inactive');
12
+ }
13
+ else {
14
+ $w.removeClass('so-widget-is-active').addClass('so-widget-is-inactive');
15
+ }
16
+
17
+ // Lets send an ajax request.
18
+ $.post(
19
+ soWidgetsAdmin.toggleUrl,
20
+ {
21
+ 'widget' : $w.data('id'),
22
+ 'active' : s
23
+ },
24
+ function(data){
25
+ // $sw.find('.dashicons-yes').clearQueue().fadeIn('fast').delay(750).fadeOut('fast');
26
+ }
27
+ );
28
+
29
+ } );
30
+
31
+ // Fill in the missing header images
32
+ $('.so-widget-banner').each( function(){
33
+ var $$ = $(this),
34
+ $img = $$.find('img');
35
+
36
+ if( !$img.length ) {
37
+ // Create an SVG image as a placeholder icon
38
+ var pattern = Trianglify({
39
+ width: 128,
40
+ height: 128,
41
+ variance : 1,
42
+ cell_size: 32,
43
+ seed: $$.data('seed')
44
+ });
45
+
46
+ $$.append( pattern.svg() );
47
+ }
48
+ else {
49
+ if( $img.width() > 128 ) {
50
+ // Deal with wide banner images
51
+ $img.css('margin-left', -($img.width()-128)/2 );
52
+ }
53
+ }
54
+ } );
55
+
56
+ // Lets implement the search
57
+ var widgetSearch = function(){
58
+ var q = $(this).val().toLowerCase();
59
+
60
+ if( q === '' ) {
61
+ $('.so-widget-wrap').show();
62
+ }
63
+ else {
64
+ $('.so-widget').each( function(){
65
+ var $$ = $(this);
66
+
67
+ if( $$.find('h3').html().toLowerCase().indexOf(q) > -1 ) {
68
+ $$.parent().show();
69
+ }
70
+ else {
71
+ $$.parent().hide();
72
+ }
73
+ } );
74
+ }
75
+ };
76
+ $('#sow-widget-search input').on( {
77
+ keyup: widgetSearch,
78
+ search: widgetSearch
79
+ });
80
+
81
+ $(window).resize(function() {
82
+ var $descriptions = $('.so-widget-text').css('height', 'auto');
83
+ var largestHeight = 0;
84
+
85
+ $descriptions.each(function () {
86
+ largestHeight = Math.max(largestHeight, $(this).height() );
87
+ });
88
+
89
+ $descriptions.each(function () {
90
+ $(this).css('height', largestHeight);
91
+ });
92
+
93
+ }).resize();
94
+
95
+ // Handle the tabs
96
+ $('#sow-widgets-page .page-nav a').click(function(e){
97
+ e.preventDefault();
98
+ var $$ = $(this);
99
+ var href = $$.attr('href');
100
+
101
+ var $li = $$.closest('li');
102
+ $('#sow-widgets-page .page-nav li').not($li).removeClass('active');
103
+ $li.addClass('active');
104
+
105
+ switch( href ) {
106
+ case '#all' :
107
+ $('.so-widget-wrap').show();
108
+ break;
109
+
110
+ case '#enabled' :
111
+ $('.so-widget-wrap').hide();
112
+ $('.so-widget-wrap .so-widget-is-active').each(function(){ $(this).closest('.so-widget-wrap').show(); });
113
+ $('.so-widget-wrap .so-widget-is-inactive').each(function(){ $(this).closest('.so-widget-wrap').hide(); });
114
+ break;
115
+
116
+ case '#disabled' :
117
+ $('.so-widget-wrap .so-widget-is-active').each(function(){ $(this).closest('.so-widget-wrap').hide(); });
118
+ $('.so-widget-wrap .so-widget-is-inactive').each(function(){ $(this).closest('.so-widget-wrap').show(); });
119
+ break;
120
+ }
121
+
122
+ $(window).resize();
123
+ });
124
+
125
+ // Enable css3 animations on the widgets list
126
+ $('#widgets-list').addClass('so-animated');
127
+
128
+ // Handle the dialog
129
+ var dialog = $('#sow-settings-dialog');
130
+
131
+ $( '#widgets-list .so-widget-settings' ).click( function( e ){
132
+ var $$ = $(this);
133
+ e.preventDefault();
134
+
135
+ $content = dialog.find( '.so-content' );
136
+ $content
137
+ .empty()
138
+ .addClass('so-loading')
139
+
140
+ $.get( $$.data( 'form-url' ), function( form ) {
141
+ $content
142
+ .html( form )
143
+ .removeClass( 'so-loading' );
144
+ } );
145
+
146
+ dialog.show();
147
+ } );
148
+
149
+ dialog.find('.so-close').click( function( e ){
150
+ e.preventDefault();
151
+ dialog.hide();
152
+ } );
153
+
154
+ dialog.find('.so-save').click( function( e ){
155
+ e.preventDefault();
156
+
157
+ var $$ = $( this );
158
+ $$.prop( 'disabled', true );
159
+
160
+ dialog.find( 'form' ).submit( function() {
161
+ $$.prop( 'disabled', false );
162
+ dialog.hide();
163
+ } ).submit();
164
+ } );
165
+
166
+ // Enable all widget settings button after the save iframe has loaded.
167
+ $('#so-widget-settings-save').on( 'load', function() {
168
+ $( '#widgets-list .so-widget-settings' ).prop( 'disabled', false );
169
+ } );
170
+
171
+ // Automatically open settings modal based on hash
172
+ if( window.location.hash && window.location.hash.substring(0, 10) === '#settings-' ) {
173
+ var openSettingsId = window.location.hash.substring(10);
174
+ $('div[data-id="' + openSettingsId + '"] button.so-widget-settings').click();
175
+ }
176
 
177
  } );
admin/admin.min.js CHANGED
@@ -1 +1 @@
1
- jQuery((function(i){i(".so-widget-toggle-active button").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);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).resize((function(){var t=i(".so-widget-text").css("height","auto"),e=0;t.each((function(){e=Math.max(e,i(this).height())})),t.each((function(){i(this).css("height",e)}))})).resize(),i("#sow-widgets-page .page-nav a").click((function(t){t.preventDefault();var e=i(this),s=e.attr("href"),a=e.closest("li");switch(i("#sow-widgets-page .page-nav li").not(a).removeClass("active"),a.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).resize()})),i("#widgets-list").addClass("so-animated");var e=i("#sow-settings-dialog");if(i("#widgets-list .so-widget-settings").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()})),e.find(".so-close").click((function(i){i.preventDefault(),e.hide()})),e.find(".so-save").click((function(t){t.preventDefault(),i(this).prop("disabled",!0),e.find("form").submit((function(){i.prop("disabled",!1),e.hide()})).submit()})),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').click()}}));
1
+ jQuery((function(i){i(".so-widget-toggle-active button").click((function(){var t=i(this),s=t.data("status"),e=t.closest(".so-widget");s?e.addClass("so-widget-is-active").removeClass("so-widget-is-inactive"):e.removeClass("so-widget-is-active").addClass("so-widget-is-inactive"),i.post(soWidgetsAdmin.toggleUrl,{widget:e.data("id"),active:s},(function(i){}))})),i(".so-widget-banner").each((function(){var t=i(this),s=t.find("img");if(s.length)s.width()>128&&s.css("margin-left",-(s.width()-128)/2);else{var e=Trianglify({width:128,height:128,variance:1,cell_size:32,seed:t.data("seed")});t.append(e.svg())}}));var t=function(){var t=i(this).val().toLowerCase();""===t?i(".so-widget-wrap").show():i(".so-widget").each((function(){var s=i(this);s.find("h3").html().toLowerCase().indexOf(t)>-1?s.parent().show():s.parent().hide()}))};i("#sow-widget-search input").on({keyup:t,search:t}),i(window).resize((function(){var t=i(".so-widget-text").css("height","auto"),s=0;t.each((function(){s=Math.max(s,i(this).height())})),t.each((function(){i(this).css("height",s)}))})).resize(),i("#sow-widgets-page .page-nav a").click((function(t){t.preventDefault();var s=i(this),e=s.attr("href"),a=s.closest("li");switch(i("#sow-widgets-page .page-nav li").not(a).removeClass("active"),a.addClass("active"),e){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).resize()})),i("#widgets-list").addClass("so-animated");var s=i("#sow-settings-dialog");if(i("#widgets-list .so-widget-settings").click((function(t){var e=i(this);t.preventDefault(),$content=s.find(".so-content"),$content.empty().addClass("so-loading"),i.get(e.data("form-url"),(function(i){$content.html(i).removeClass("so-loading")})),s.show()})),s.find(".so-close").click((function(i){i.preventDefault(),s.hide()})),s.find(".so-save").click((function(t){t.preventDefault();var e=i(this);e.prop("disabled",!0),s.find("form").submit((function(){e.prop("disabled",!1),s.hide()})).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 e=window.location.hash.substring(10);i('div[data-id="'+e+'"] button.so-widget-settings').click()}}));
base/base.php CHANGED
@@ -144,7 +144,12 @@ function siteorigin_widget_get_font($font_value) {
144
  $font_url_param .= ':' . $font_parts[1];
145
  }
146
  $font['url'] = 'https://fonts.googleapis.com/css?family=' . $font_url_param;
147
- $font['css_import'] = '@import url(https://fonts.googleapis.com/css?family=' . $font_url_param . '&display=swap);';
 
 
 
 
 
148
  }
149
  else {
150
  $font['family'] = $font_value;
144
  $font_url_param .= ':' . $font_parts[1];
145
  }
146
  $font['url'] = 'https://fonts.googleapis.com/css?family=' . $font_url_param;
147
+ $style_name = 'sow-google-font-' . strtolower( $font['family'] );
148
+
149
+ // Check if WB (or something else has) has already enqueued the font.
150
+ if ( ! wp_style_is( $style_name ) ) {
151
+ wp_enqueue_style( $style_name, $font['url'] . '&display=swap' );
152
+ }
153
  }
154
  else {
155
  $font['family'] = $font_value;
base/inc/fields/css/icon-field.css CHANGED
@@ -1 +1 @@
1
- .siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current{display:inline-block;background:#f9f9f9;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #f2f2f2), color-stop(1, #f9f9f9));background:-ms-linear-gradient(bottom, #f2f2f2, #f9f9f9);background:-moz-linear-gradient(center bottom, #f2f2f2 0%, #f9f9f9 100%);background:-o-linear-gradient(#f9f9f9, #f2f2f2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#f2f2f2', GradientType=0);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.1);box-shadow:0 1px 2px rgba(0,0,0,0.1);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;vertical-align:middle;border:1px solid #bbbbbb;height:35px}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current:hover{background:#ffffff;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #f7f7f7), color-stop(1, #ffffff));background:-ms-linear-gradient(bottom, #f7f7f7, #ffffff);background:-moz-linear-gradient(center bottom, #f7f7f7 0%, #ffffff 100%);background:-o-linear-gradient(#ffffff, #f7f7f7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f7f7f7', GradientType=0);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.15);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.15);box-shadow:0 1px 2px rgba(0,0,0,0.15)}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current .siteorigin-widget-icon{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;margin:4px;padding:3px;border:1px solid #999;background:#f3f3f3;height:27px;width:32px;text-align:center}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current .siteorigin-widget-icon span{color:#333;font-size:20px}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current label{display:block;float:left;color:#666;text-decoration:none;text-shadow:0 1px 0 #FFF;font-weight:600;font-size:11px;padding:9px 10px 7px 7px;outline:none;cursor:pointer}.siteorigin-widget-form .siteorigin-widget-field-type-icon .so-icon-remove{cursor:pointer;display:inline-block;text-decoration:none;color:#AAA;font-size:11px;line-height:1em;padding:11px 0 11px 6px}.siteorigin-widget-form .siteorigin-widget-field-type-icon.siteorigin-widget-active .so-icon-remove{display:none}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector{display:none;padding:10px;border:1px solid #D8D8D8;background:#FFFFFF;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.0275);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.0275);box-shadow:0 1px 2px rgba(0,0,0,0.0275);margin-top:10px}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector select.siteorigin-widget-icon-family{font-size:11px;display:inline-block}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-search{font-size:11px;display:inline-block;width:260px;padding:6px 8px}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-icons{height:160px;overflow-y:scroll;margin-top:10px}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-icons .siteorigin-widget-icon-icons-icon{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;width:58px;height:48px;margin:3px;padding:5px 0;border:1px solid #D0D0D0;background:#FFFFFF;font-size:35px;overflow:hidden;cursor:pointer;text-align:center}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-icons .siteorigin-widget-icon-icons-icon.siteorigin-widget-active{background:#f6fafc;border:1px solid #43aaec;color:#078dce;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.25);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.25);box-shadow:0 1px 2px rgba(0,0,0,0.25)}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-icons.loading{min-height:40px;background:#FFFFFF url("../../../css/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-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-icons.loading{background-image:url("../../../css/img/wpspin_light-2x.gif");background-size:16px 16px}}
1
+ .siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current{display:inline-block;background:#f9f9f9;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #f2f2f2), color-stop(1, #f9f9f9));background:-ms-linear-gradient(bottom, #f2f2f2, #f9f9f9);background:-moz-linear-gradient(center bottom, #f2f2f2 0%, #f9f9f9 100%);background:-o-linear-gradient(#f9f9f9, #f2f2f2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#f2f2f2', GradientType=0);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.1);box-shadow:0 1px 2px rgba(0,0,0,0.1);box-sizing:content-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;vertical-align:middle;border:1px solid #bbbbbb;height:35px}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current:hover{background:#ffffff;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #f7f7f7), color-stop(1, #ffffff));background:-ms-linear-gradient(bottom, #f7f7f7, #ffffff);background:-moz-linear-gradient(center bottom, #f7f7f7 0%, #ffffff 100%);background:-o-linear-gradient(#ffffff, #f7f7f7);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f7f7f7', GradientType=0);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.15);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.15);box-shadow:0 1px 2px rgba(0,0,0,0.15)}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current .siteorigin-widget-icon{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;margin:4px;padding:3px;border:1px solid #999;background:#f3f3f3;height:27px;width:32px;text-align:center}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current .siteorigin-widget-icon span{color:#333;font-size:20px}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current label{display:block;float:left;color:#666;text-decoration:none;text-shadow:0 1px 0 #FFF;font-weight:600;font-size:11px;padding:9px 10px 7px 7px;outline:none;cursor:pointer}.siteorigin-widget-form .siteorigin-widget-field-type-icon .so-icon-remove{cursor:pointer;display:inline-block;text-decoration:none;color:#AAA;font-size:11px;line-height:1em;padding:11px 0 11px 6px}.siteorigin-widget-form .siteorigin-widget-field-type-icon.siteorigin-widget-active .so-icon-remove{display:none}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector{display:none;padding:10px;border:1px solid #D8D8D8;background:#FFFFFF;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.0275);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.0275);box-shadow:0 1px 2px rgba(0,0,0,0.0275);margin-top:10px}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector select.siteorigin-widget-icon-family{font-size:11px;display:inline-block}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-search{font-size:11px;display:inline-block;width:260px;padding:6px 8px}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-icons{height:160px;overflow-y:scroll;margin-top:10px}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-icons .siteorigin-widget-icon-icons-icon{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;width:58px;height:48px;margin:3px;padding:5px 0;border:1px solid #D0D0D0;background:#FFFFFF;font-size:35px;overflow:hidden;cursor:pointer;text-align:center}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-icons .siteorigin-widget-icon-icons-icon.siteorigin-widget-active{background:#f6fafc;border:1px solid #43aaec;color:#078dce;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.25);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.25);box-shadow:0 1px 2px rgba(0,0,0,0.25)}.siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-icons.loading{min-height:40px;background:#FFFFFF url("../../../css/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-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-icons.loading{background-image:url("../../../css/img/wpspin_light-2x.gif");background-size:16px 16px}}
base/inc/fields/css/media-field.css CHANGED
@@ -1 +1 @@
1
- .siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper{border:1px solid #bbb;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:0 1px 2px rgba(0, 0, 0, 0.1);display:block;float:left;font-size:13px;background:#f9f9f9;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #f2f2f2), color-stop(1, #f9f9f9));background:-ms-linear-gradient(bottom, #f2f2f2, #f9f9f9);background:-moz-linear-gradient(center bottom, #f2f2f2 0%, #f9f9f9 100%);background:-o-linear-gradient(#f9f9f9, #f2f2f2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#f2f2f2', GradientType=0);height:32px;line-height:18.2px;overflow:auto;position:relative;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper:hover{-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.15);box-shadow:0 1px 2px rgba(0, 0, 0, 0.15)}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .current{border-right:1px solid #bbb;box-shadow:1px 0 0 #fff;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;height:32px;overflow:hidden;padding:4px;position:relative}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .current .title{background:#333;bottom:34px;color:#ccc;display:none;font-weight:bold;left:0;padding:4px 12px;position:absolute;white-space:nowrap;width:auto}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .current .thumbnail-wrapper{border:1px solid #999;box-shadow:0 1px 1px #fff;box-shadow:inset 0 1px 3px rgba(0,0,0,0.2);height:22px;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:22px}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .current .thumbnail-wrapper img{box-shadow:inset 0 1px 3px rgba(0,0,0,0.2);height:100%;width:100%}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .media-upload-button,.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .find-image-button{display:block;cursor:pointer;float:left;font-size:11px;font-weight:600;color:#666;outline:none;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;padding:7px 8px;text-decoration:none;text-shadow:0 1px 0 #fff}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .media-upload-button:hover,.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .find-image-button:hover{background:rgba(255,255,255,0.75)}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .find-image-button{border-left:1px solid #bbb}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper:hover .media-upload-button{color:#707070}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-remove-button{display:block;color:#aaa;float:left;font-size:11px;line-height:1em;margin-right:25px;opacity:1;padding:11px 0 11px 6px;position:static;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-media .media-remove-button.remove-hide{opacity:0;pointer-events:none}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-remove-button:hover{color:#bc0b0b}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-fallback-external{width:100%}@media (max-width:680px){.siteorigin-widget-form .siteorigin-widget-field-type-media .media-fallback-external{margin-top:1em !important}}@media (min-width:680px){.siteorigin-widget-form .siteorigin-widget-field-type-media .media-fallback-external{float:left;margin-top:2px !important;max-width:320px}}#so-widgets-image-search-frame{background-color:#fff;bottom:0;left:0;overflow-x:hidden;overflow-y:scroll;padding:25px;position:absolute;right:0;top:0}#so-widgets-image-search-frame #so-widgets-image-search-form{box-sizing:border-box;display:block;margin-bottom:2px;position:relative;width:100%}@media (min-width:783px){#so-widgets-image-search-frame #so-widgets-image-search-form{padding-right:368px}}#so-widgets-image-search-frame #so-widgets-image-search-form .so-widgets-search-input{box-shadow:none;margin-bottom:0px;padding:9px 12px}#so-widgets-image-search-frame #so-widgets-image-search-form .so-widgets-search-input:focus{box-shadow:none}#so-widgets-image-search-frame #so-widgets-image-search-form .so-widgets-search-button{border-width:1px;box-shadow:none;font-size:1.2em;height:100%;padding:0 14px;position:absolute;right:320px;top:0}@media (max-width:783px){#so-widgets-image-search-frame #so-widgets-image-search-form .so-widgets-search-button{right:0}}#so-widgets-image-search-frame #so-widgets-image-search-form .so-widgets-search-button .dashicons-search{vertical-align:middle}#so-widgets-image-search-frame #so-widgets-image-search-suggestions{display:none;font-size:1.1em;height:40px;overflow:hidden;position:absolute;right:0;text-align:right;top:0;width:300px}#so-widgets-image-search-frame #so-widgets-image-search-suggestions strong{display:block}#so-widgets-image-search-frame #so-widgets-image-search-suggestions ul{display:block;list-style:none;margin:0;padding:0}#so-widgets-image-search-frame #so-widgets-image-search-suggestions ul li{display:inline-block;margin-right:4px}#so-widgets-image-search-frame #so-widgets-image-search-powered{color:#888;font-size:.85em;margin-bottom:15px}#so-widgets-image-search-frame .so-widgets-image-results{zoom:1;margin:0 -8px}#so-widgets-image-search-frame .so-widgets-image-results:before{content:'';display:block}#so-widgets-image-search-frame .so-widgets-image-results:after{content:'';display:table;clear:both}#so-widgets-image-search-frame .so-widgets-image-results .so-widgets-result{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;margin:8px}#so-widgets-image-search-frame .so-widgets-image-results .so-widgets-result a{background-color:#e8e8e8;background-repeat:no-repeat;background-size:cover;display:block;position:relative;height:180px;width:260px}#so-widgets-image-search-frame .so-widgets-image-results .so-widgets-result a .so-widgets-result-sponsored{background:#59946b;border-radius:2px;color:#fff;font-size:.8em;line-height:1em;padding:5px;position:absolute;right:5px;top:5px}#so-widgets-image-search-frame .so-widgets-results-loading{background-color:#f7f7f7;display:none;font-size:1.1em;margin-top:20px;padding:15px 5px;text-align:center}#so-widgets-image-search-frame .so-widgets-results-loading .so-widgets-loading-icon{background-image:url("images/wpspin_light.gif");background-position:center center;background-repeat:no-repeat;display:inline-block;height:16px;margin:0 6px -3px 0;width:16px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#so-widgets-image-search-frame .so-widgets-results-loading .so-widgets-loading-icon{background-image:url(images/wpspin_light-2x.gif);background-size:16px 16px}}#so-widgets-image-search-frame .so-widgets-results-more{display:none;margin-top:20px;padding-bottom:20px;text-align:center}#so-widgets-image-search-frame .so-widgets-preview-window{background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,0.35);display:none;padding:10px;pointer-events:none;position:fixed}#so-widgets-image-search-frame .so-widgets-preview-window .so-widgets-preview-window-inside{background-size:cover;overflow:hidden}#so-widgets-image-search-frame .so-widgets-preview-window img{height:auto;width:100%}#so-widgets-image-search-frame.so-widgets-importing .so-widgets-preview-window,#so-widgets-image-search-frame.so-widgets-importing #so-widgets-image-search-form,#so-widgets-image-search-frame.so-widgets-importing #so-widgets-image-search-powered,#so-widgets-image-search-frame.so-widgets-importing .so-widgets-image-results{display:none !important;visibility:hidden !important}
1
+ .siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper{border:1px solid #bbb;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:0 1px 2px rgba(0, 0, 0, 0.1);box-sizing:content-box;display:block;float:left;font-size:13px;background:#f9f9f9;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #f2f2f2), color-stop(1, #f9f9f9));background:-ms-linear-gradient(bottom, #f2f2f2, #f9f9f9);background:-moz-linear-gradient(center bottom, #f2f2f2 0%, #f9f9f9 100%);background:-o-linear-gradient(#f9f9f9, #f2f2f2);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#f2f2f2', GradientType=0);height:32px;line-height:18.2px;overflow:auto;position:relative;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper:hover{-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.15);box-shadow:0 1px 2px rgba(0, 0, 0, 0.15)}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper *{box-sizing:content-box}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .current{border-right:1px solid #bbb;box-shadow:1px 0 0 #fff;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;height:32px;overflow:hidden;padding:4px;position:relative}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .current .title{background:#333;bottom:34px;color:#ccc;display:none;font-weight:bold;left:0;padding:4px 12px;position:absolute;white-space:nowrap;width:auto}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .current .thumbnail-wrapper{border:1px solid #999;box-shadow:0 1px 1px #fff;box-shadow:inset 0 1px 3px rgba(0,0,0,0.2);height:22px;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:22px}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .current .thumbnail-wrapper img{box-shadow:inset 0 1px 3px rgba(0,0,0,0.2);height:100%;width:100%}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .media-upload-button,.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .find-image-button{display:block;border-bottom:none;cursor:pointer;float:left;font-size:11px;font-weight:600;color:#666;outline:none;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;line-height:32px;padding:0 8px;text-decoration:none;text-shadow:0 1px 0 #fff}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .media-upload-button:hover,.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .find-image-button:hover{background:rgba(255,255,255,0.75)}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper .find-image-button{border-left:1px solid #bbb}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-field-wrapper:hover .media-upload-button{color:#707070}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-remove-button{display:block;border-bottom:none;color:#aaa;float:left;font-size:11px;line-height:1em;margin-right:25px;opacity:1;padding:11px 0 11px 6px;position:static;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-media .media-remove-button.remove-hide{opacity:0;pointer-events:none}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-remove-button:hover{color:#bc0b0b}.siteorigin-widget-form .siteorigin-widget-field-type-media .media-fallback-external{width:100%}@media (max-width:680px){.siteorigin-widget-form .siteorigin-widget-field-type-media .media-fallback-external{margin-top:1em !important}}@media (min-width:680px){.siteorigin-widget-form .siteorigin-widget-field-type-media .media-fallback-external{float:left;margin-top:2px !important;max-width:320px}}#so-widgets-image-search-frame{background-color:#fff;bottom:0;left:0;overflow-x:hidden;overflow-y:scroll;padding:25px;position:absolute;right:0;top:0}#so-widgets-image-search-frame #so-widgets-image-search-form{box-sizing:border-box;display:block;margin-bottom:2px;position:relative;width:100%}@media (min-width:783px){#so-widgets-image-search-frame #so-widgets-image-search-form{padding-right:368px}}#so-widgets-image-search-frame #so-widgets-image-search-form .so-widgets-search-input{box-shadow:none;margin-bottom:0px;padding:9px 12px}#so-widgets-image-search-frame #so-widgets-image-search-form .so-widgets-search-input:focus{box-shadow:none}#so-widgets-image-search-frame #so-widgets-image-search-form .so-widgets-search-button{border-width:1px;box-shadow:none;font-size:1.2em;height:100%;padding:0 14px;position:absolute;right:320px;top:0}@media (max-width:783px){#so-widgets-image-search-frame #so-widgets-image-search-form .so-widgets-search-button{right:0}}#so-widgets-image-search-frame #so-widgets-image-search-form .so-widgets-search-button .dashicons-search{vertical-align:middle}#so-widgets-image-search-frame #so-widgets-image-search-suggestions{display:none;font-size:1.1em;height:40px;overflow:hidden;position:absolute;right:0;text-align:right;top:0;width:300px}#so-widgets-image-search-frame #so-widgets-image-search-suggestions strong{display:block}#so-widgets-image-search-frame #so-widgets-image-search-suggestions ul{display:block;list-style:none;margin:0;padding:0}#so-widgets-image-search-frame #so-widgets-image-search-suggestions ul li{display:inline-block;margin-right:4px}#so-widgets-image-search-frame #so-widgets-image-search-powered{color:#888;font-size:.85em;margin-bottom:15px}#so-widgets-image-search-frame .so-widgets-image-results{zoom:1;margin:0 -8px}#so-widgets-image-search-frame .so-widgets-image-results:before{content:'';display:block}#so-widgets-image-search-frame .so-widgets-image-results:after{content:'';display:table;clear:both}#so-widgets-image-search-frame .so-widgets-image-results .so-widgets-result{-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;margin:8px}#so-widgets-image-search-frame .so-widgets-image-results .so-widgets-result a{background-color:#e8e8e8;background-repeat:no-repeat;background-size:cover;display:block;position:relative;height:180px;width:260px}#so-widgets-image-search-frame .so-widgets-image-results .so-widgets-result a .so-widgets-result-sponsored{background:#59946b;border-radius:2px;color:#fff;font-size:.8em;line-height:1em;padding:5px;position:absolute;right:5px;top:5px}#so-widgets-image-search-frame .so-widgets-results-loading{background-color:#f7f7f7;display:none;font-size:1.1em;margin-top:20px;padding:15px 5px;text-align:center}#so-widgets-image-search-frame .so-widgets-results-loading .so-widgets-loading-icon{background-image:url("images/wpspin_light.gif");background-position:center center;background-repeat:no-repeat;display:inline-block;height:16px;margin:0 6px -3px 0;width:16px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#so-widgets-image-search-frame .so-widgets-results-loading .so-widgets-loading-icon{background-image:url(images/wpspin_light-2x.gif);background-size:16px 16px}}#so-widgets-image-search-frame .so-widgets-results-more{display:none;margin-top:20px;padding-bottom:20px;text-align:center}#so-widgets-image-search-frame .so-widgets-preview-window{background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,0.35);display:none;padding:10px;pointer-events:none;position:fixed}#so-widgets-image-search-frame .so-widgets-preview-window .so-widgets-preview-window-inside{background-size:cover;overflow:hidden}#so-widgets-image-search-frame .so-widgets-preview-window img{height:auto;width:100%}#so-widgets-image-search-frame.so-widgets-importing .so-widgets-preview-window,#so-widgets-image-search-frame.so-widgets-importing #so-widgets-image-search-form,#so-widgets-image-search-frame.so-widgets-importing #so-widgets-image-search-powered,#so-widgets-image-search-frame.so-widgets-importing .so-widgets-image-results{display:none !important;visibility:hidden !important}
base/inc/fields/js/tinymce-field.js CHANGED
@@ -39,7 +39,14 @@
39
  settings.tinymce.wpautop = $wpautopToggleField.is( ':checked' );
40
  }
41
  var $textarea = $container.find( 'textarea' );
42
- var id = $textarea.attr( 'id' );
 
 
 
 
 
 
 
43
  var setupEditor = function ( editor ) {
44
  editor.on( 'change',
45
  function () {
@@ -123,7 +130,7 @@
123
  $( document ).on( 'sowsetupformfield', '.siteorigin-widget-field-type-tinymce', function () {
124
  var $field = $( this );
125
  var $parentRepeaterItem = $field.closest( '.siteorigin-widget-field-repeater-item-form' );
126
-
127
  if ( $parentRepeaterItem.length > 0 ) {
128
  if ( $parentRepeaterItem.is( ':visible' ) ) {
129
  setup( $field );
39
  settings.tinymce.wpautop = $wpautopToggleField.is( ':checked' );
40
  }
41
  var $textarea = $container.find( 'textarea' );
42
+ // Prevent potential id overlap by appending the textarea field with a random id.
43
+ var id = $textarea.data( 'tinymce-id' );
44
+ if ( ! id ) {
45
+ var id = $textarea.attr( 'id' ) + Math.floor( Math.random() * 1000 );
46
+ $textarea.data( 'tinymce-id', id );
47
+ $textarea.attr( 'id', id );
48
+ }
49
+
50
  var setupEditor = function ( editor ) {
51
  editor.on( 'change',
52
  function () {
130
  $( document ).on( 'sowsetupformfield', '.siteorigin-widget-field-type-tinymce', function () {
131
  var $field = $( this );
132
  var $parentRepeaterItem = $field.closest( '.siteorigin-widget-field-repeater-item-form' );
133
+
134
  if ( $parentRepeaterItem.length > 0 ) {
135
  if ( $parentRepeaterItem.is( ':visible' ) ) {
136
  setup( $field );
base/inc/fields/js/tinymce-field.min.js CHANGED
@@ -1 +1 @@
1
- !function(i){var e=function(e){if(!e.data("initialized")){var t=wp.oldEditor?wp.oldEditor:wp.editor;t&&t.hasOwnProperty("autop")&&(wp.editor.autop=t.autop,wp.editor.removep=t.removep,wp.editor.initialize=t.initialize);var n,o=e.find(".siteorigin-widget-tinymce-container"),r=o.data("editorSettings");if(tinyMCEPreInit.mceInit&&tinyMCEPreInit.mceInit.hasOwnProperty("content")){var c=tinyMCEPreInit.mceInit.content;if(c.hasOwnProperty("content_css")&&c.content_css){var s=c.content_css.split(",");if(r.tinymce.hasOwnProperty("content_css")&&r.tinymce.content_css)for(var a=0;a<s.length;a++){var d=s[a];-1===r.tinymce.content_css.indexOf(d)&&(r.tinymce.content_css+=","+d)}else r.tinymce.content_css=s}}if(r.wpautopToggleField){var l=o.closest(".siteorigin-widget-form");n=l.find(r.wpautopToggleField),r.tinymce.wpautop=n.is(":checked")}var f=o.find("textarea"),m=f.attr("id");if(r.tinymce&&(r.tinymce=i.extend({},r.tinymce,{selector:"#"+m,setup:function(i){i.on("change",(function(){window.tinymce.get(m).save(),f.trigger("change")})),n&&(n.off("change"),n.on("change",(function(){wp.editor.remove(m),r.tinymce.wpautop=n.is(":checked"),wp.editor.initialize(m,r)})))}})),i(document).on("wp-before-tinymce-init",(function(i,t){if(t.selector===r.tinymce.selector){var n=o.data("mediaButtons");0===e.find(".wp-media-buttons").length&&e.find(".wp-editor-tabs").before(n.html)}})),i(document).on("tinymce-editor-setup",(function(){var i=e.find(".wp-editor-wrap");i.length>0&&!i.hasClass(r.selectedEditor+"-active")&&setTimeout((function(){window.switchEditors.go(m)}),10)})),t.remove(m),window.tinymce&&window.tinymce.EditorManager.overrideDefaults({base_url:r.baseURL,suffix:r.suffix}),f.is(":visible"))t.initialize(m,r);else var w=setInterval((function(){f.is(":visible")&&(t.initialize(m,r),clearInterval(w))}),500);e.on("click",(function(t){var n=i(t.target);if(n.is(".wp-switch-editor")){var o=n.hasClass("switch-tmce")?"tmce":"html";if("tmce"===o){var c=window.tinymce.get(m);if(null!==c){var s=f.val();-1!==s.search("<")&&-1===s.search(">")&&(s=s.replace(/</g,""),f.val(s)),c.setContent(window.switchEditors.wpautop(s))}}r.selectedEditor=o,e.find(".siteorigin-widget-tinymce-selected-editor").val(o)}})),e.data("initialized",!0)}};i(document).on("sowsetupformfield",".siteorigin-widget-field-type-tinymce",(function(){var t=i(this),n=t.closest(".siteorigin-widget-field-repeater-item-form");n.length>0?n.is(":visible")?e(t):n.on("slideToggleOpenComplete",(function(){n.is(":visible")&&(e(t),n.off("slideToggleOpenComplete"))})):e(t)})),i(document).on("sortstop",(function(t,n){(n.item.is(".siteorigin-widget-field-repeater-item")?n.item.find("> .siteorigin-widget-field-repeater-item-form"):n.item.find(".siteorigin-widget-form")).find(".siteorigin-widget-field-type-tinymce").each((function(){i(this).data("initialized",null),e(i(this))}))}))}(jQuery);
1
+ !function(i){var e=function(e){if(!e.data("initialized")){var t=wp.oldEditor?wp.oldEditor:wp.editor;t&&t.hasOwnProperty("autop")&&(wp.editor.autop=t.autop,wp.editor.removep=t.removep,wp.editor.initialize=t.initialize);var n,o=e.find(".siteorigin-widget-tinymce-container"),r=o.data("editorSettings");if(tinyMCEPreInit.mceInit&&tinyMCEPreInit.mceInit.hasOwnProperty("content")){var c=tinyMCEPreInit.mceInit.content;if(c.hasOwnProperty("content_css")&&c.content_css){var a=c.content_css.split(",");if(r.tinymce.hasOwnProperty("content_css")&&r.tinymce.content_css)for(var s=0;s<a.length;s++){var d=a[s];-1===r.tinymce.content_css.indexOf(d)&&(r.tinymce.content_css+=","+d)}else r.tinymce.content_css=a}}if(r.wpautopToggleField){var l=o.closest(".siteorigin-widget-form");n=l.find(r.wpautopToggleField),r.tinymce.wpautop=n.is(":checked")}var f=o.find("textarea");if(!(m=f.data("tinymce-id"))){var m=f.attr("id")+Math.floor(1e3*Math.random());f.data("tinymce-id",m),f.attr("id",m)}if(r.tinymce&&(r.tinymce=i.extend({},r.tinymce,{selector:"#"+m,setup:function(i){i.on("change",(function(){window.tinymce.get(m).save(),f.trigger("change")})),n&&(n.off("change"),n.on("change",(function(){wp.editor.remove(m),r.tinymce.wpautop=n.is(":checked"),wp.editor.initialize(m,r)})))}})),i(document).on("wp-before-tinymce-init",(function(i,t){if(t.selector===r.tinymce.selector){var n=o.data("mediaButtons");0===e.find(".wp-media-buttons").length&&e.find(".wp-editor-tabs").before(n.html)}})),i(document).on("tinymce-editor-setup",(function(){var i=e.find(".wp-editor-wrap");i.length>0&&!i.hasClass(r.selectedEditor+"-active")&&setTimeout((function(){window.switchEditors.go(m)}),10)})),t.remove(m),window.tinymce&&window.tinymce.EditorManager.overrideDefaults({base_url:r.baseURL,suffix:r.suffix}),f.is(":visible"))t.initialize(m,r);else var w=setInterval((function(){f.is(":visible")&&(t.initialize(m,r),clearInterval(w))}),500);e.on("click",(function(t){var n=i(t.target);if(n.is(".wp-switch-editor")){var o=n.hasClass("switch-tmce")?"tmce":"html";if("tmce"===o){var c=window.tinymce.get(m);if(null!==c){var a=f.val();-1!==a.search("<")&&-1===a.search(">")&&(a=a.replace(/</g,""),f.val(a)),c.setContent(window.switchEditors.wpautop(a))}}r.selectedEditor=o,e.find(".siteorigin-widget-tinymce-selected-editor").val(o)}})),e.data("initialized",!0)}};i(document).on("sowsetupformfield",".siteorigin-widget-field-type-tinymce",(function(){var t=i(this),n=t.closest(".siteorigin-widget-field-repeater-item-form");n.length>0?n.is(":visible")?e(t):n.on("slideToggleOpenComplete",(function(){n.is(":visible")&&(e(t),n.off("slideToggleOpenComplete"))})):e(t)})),i(document).on("sortstop",(function(t,n){(n.item.is(".siteorigin-widget-field-repeater-item")?n.item.find("> .siteorigin-widget-field-repeater-item-form"):n.item.find(".siteorigin-widget-form")).find(".siteorigin-widget-field-type-tinymce").each((function(){i(this).data("initialized",null),e(i(this))}))}))}(jQuery);
base/inc/fields/number.class.php CHANGED
@@ -5,12 +5,30 @@
5
  */
6
  class SiteOrigin_Widget_Field_Number extends SiteOrigin_Widget_Field_Text_Input_Base {
7
 
 
 
 
 
 
 
 
 
8
  protected function get_default_options() {
9
  return array(
10
  'input_type' => 'number',
11
  );
12
  }
13
 
 
 
 
 
 
 
 
 
 
 
14
  protected function get_input_classes() {
15
  $input_classes = parent::get_input_classes();
16
  $input_classes[] = 'siteorigin-widget-input-number';
5
  */
6
  class SiteOrigin_Widget_Field_Number extends SiteOrigin_Widget_Field_Text_Input_Base {
7
 
8
+ /**
9
+ * The minimum value of the allowed range.
10
+ *
11
+ * @access protected
12
+ * @var float
13
+ */
14
+ protected $step;
15
+
16
  protected function get_default_options() {
17
  return array(
18
  'input_type' => 'number',
19
  );
20
  }
21
 
22
+ protected function get_input_attributes() {
23
+ if ( empty( $this->step ) ) {
24
+ return array();
25
+ }
26
+
27
+ return array(
28
+ 'step' => $this->step,
29
+ );
30
+ }
31
+
32
  protected function get_input_classes() {
33
  $input_classes = parent::get_input_classes();
34
  $input_classes[] = 'siteorigin-widget-input-number';
base/inc/fields/posts.class.php CHANGED
@@ -164,6 +164,10 @@ class SiteOrigin_Widget_Field_Posts extends SiteOrigin_Widget_Field_Container_Ba
164
  } ?>"><?php
165
  }
166
 
 
 
 
 
167
  $this->create_and_render_sub_fields( $value, array( 'name' => $this->base_name, 'type' => 'composite' ) );
168
 
169
  if ( $this->collapsible ) {
@@ -171,6 +175,17 @@ class SiteOrigin_Widget_Field_Posts extends SiteOrigin_Widget_Field_Container_Ba
171
  }
172
  }
173
 
 
 
 
 
 
 
 
 
 
 
 
174
  public function enqueue_scripts() {
175
  wp_enqueue_script(
176
  'so-posts-selector-field',
164
  } ?>"><?php
165
  }
166
 
167
+ if ( isset( $this->field_options['fields'] ) ) {
168
+ $this->override_fields();
169
+ }
170
+
171
  $this->create_and_render_sub_fields( $value, array( 'name' => $this->base_name, 'type' => 'composite' ) );
172
 
173
  if ( $this->collapsible ) {
175
  }
176
  }
177
 
178
+ private function override_fields() {
179
+ foreach ( $this->field_options['fields'] as $field => $options ) {
180
+ // Are we removing, or updating this field?
181
+ if ( ! empty( $options['remove'] ) ) {
182
+ unset( $this->fields[ $field ] );
183
+ } else {
184
+ $this->fields[ $field ] = wp_parse_args( $this->field_options['fields'][ $field ], $this->fields[ $field ] );
185
+ }
186
+ }
187
+ }
188
+
189
  public function enqueue_scripts() {
190
  wp_enqueue_script(
191
  'so-posts-selector-field',
base/inc/fields/text-input-base.class.php CHANGED
@@ -46,6 +46,13 @@ abstract class SiteOrigin_Widget_Field_Text_Input_Base extends SiteOrigin_Widget
46
  return array();
47
  }
48
 
 
 
 
 
 
 
 
49
  protected function get_default_options() {
50
  return array(
51
  'input_type' => 'text',
@@ -60,6 +67,15 @@ abstract class SiteOrigin_Widget_Field_Text_Input_Base extends SiteOrigin_Widget
60
  echo $attr_string;
61
  }
62
 
 
 
 
 
 
 
 
 
 
63
  protected function render_field( $value, $instance ) {
64
  ?>
65
  <input type="<?php echo esc_attr( $this->input_type ) ?>"
@@ -67,6 +83,7 @@ abstract class SiteOrigin_Widget_Field_Text_Input_Base extends SiteOrigin_Widget
67
  id="<?php echo esc_attr( $this->element_id ) ?>"
68
  value="<?php echo esc_attr( $value ) ?>"
69
  <?php $this->render_data_attributes( $this->get_input_data_attributes() ) ?>
 
70
  <?php $this->render_CSS_classes( $this->get_input_classes() ) ?>
71
  <?php if ( ! empty( $this->placeholder ) ) echo 'placeholder="' . esc_attr( $this->placeholder ) . '"' ?>
72
  <?php if( ! empty( $this->readonly ) ) echo 'readonly' ?> />
46
  return array();
47
  }
48
 
49
+ /**
50
+ * The attributes to be added to the input element.
51
+ */
52
+ protected function get_input_attributes() {
53
+ return array();
54
+ }
55
+
56
  protected function get_default_options() {
57
  return array(
58
  'input_type' => 'text',
67
  echo $attr_string;
68
  }
69
 
70
+
71
+ protected function render_attributes( $attributes ) {
72
+ $attr_string = '';
73
+ foreach ( $attributes as $name => $value ) {
74
+ $attr_string = esc_html( $name ) . '="' . esc_attr( $value ) . '"';
75
+ }
76
+ echo $attr_string;
77
+ }
78
+
79
  protected function render_field( $value, $instance ) {
80
  ?>
81
  <input type="<?php echo esc_attr( $this->input_type ) ?>"
83
  id="<?php echo esc_attr( $this->element_id ) ?>"
84
  value="<?php echo esc_attr( $value ) ?>"
85
  <?php $this->render_data_attributes( $this->get_input_data_attributes() ) ?>
86
+ <?php $this->render_attributes( $this->get_input_attributes() ) ?>
87
  <?php $this->render_CSS_classes( $this->get_input_classes() ) ?>
88
  <?php if ( ! empty( $this->placeholder ) ) echo 'placeholder="' . esc_attr( $this->placeholder ) . '"' ?>
89
  <?php if( ! empty( $this->readonly ) ) echo 'readonly' ?> />
base/inc/widgets/base-slider.class.php CHANGED
@@ -316,7 +316,9 @@ abstract class SiteOrigin_Widget_Base_Slider extends SiteOrigin_Widget {
316
  ?>
317
  <li <?php foreach( $wrapper_attributes as $attr => $val ) echo $attr . '="' . esc_attr( $val ) . '" '; ?>>
318
  <?php
 
319
  $this->render_frame_contents( $i, $frame );
 
320
  if( !empty( $background['videos'] ) ) {
321
 
322
  $classes = array( 'sow-' . $background['video-sizing'] . '-element' );
316
  ?>
317
  <li <?php foreach( $wrapper_attributes as $attr => $val ) echo $attr . '="' . esc_attr( $val ) . '" '; ?>>
318
  <?php
319
+ do_action( 'siteorigin_widgets_slider_before_contents', $frame );
320
  $this->render_frame_contents( $i, $frame );
321
+ do_action( 'siteorigin_widgets_slider_after_contents', $frame );
322
  if( !empty( $background['videos'] ) ) {
323
 
324
  $classes = array( 'sow-' . $background['video-sizing'] . '-element' );
base/js/admin.js CHANGED
@@ -142,9 +142,14 @@ var sowbForms = window.sowbForms || {};
142
 
143
  var animated = false;
144
  // Prevent animations from happening on load.
145
- if ( $$f.prop( 'style' ).length && ( thisHandler[i][0] == 'show'|| thisHandler[i][0] == 'hide' ) ) {
146
- $$f.fadeToggle( 'fast' );
147
- animated = true;
 
 
 
 
 
148
  }
149
 
150
  if ( ! animated ) {
@@ -891,7 +896,14 @@ var sowbForms = window.sowbForms || {};
891
  newId = idBase + '-' + newIds[idBase]++;
892
  }
893
 
 
 
 
 
 
 
894
  $inputElement.attr('id', newId);
 
895
  if ( $inputElement.is( '.wp-editor-area' ) ) {
896
  var tmceContainer = $inputElement.closest( '.siteorigin-widget-tinymce-container' );
897
  var mediaButtons = tmceContainer.data( 'media-buttons' );
142
 
143
  var animated = false;
144
  // Prevent animations from happening on load.
145
+ if ( $$f.prop( 'style' ).length ) {
146
+ if ( thisHandler[i][0] == 'show' ) {
147
+ $$f.fadeIn( 'fast' );
148
+ animated = true;
149
+ } else if ( thisHandler[i][0] == 'hide' ) {
150
+ $$f.fadeOut( 'fast' );
151
+ animated = true;
152
+ }
153
  }
154
 
155
  if ( ! animated ) {
896
  newId = idBase + '-' + newIds[idBase]++;
897
  }
898
 
899
+ if ( $inputElement.is( '.wp-editor-area' ) ) {
900
+ // Prevent potential id overlap by appending the textarea field with a random id.
901
+ newId += Math.floor( Math.random() * 1000 );
902
+ $inputElement.data( 'tinymce-id', newId );
903
+ }
904
+
905
  $inputElement.attr('id', newId);
906
+
907
  if ( $inputElement.is( '.wp-editor-area' ) ) {
908
  var tmceContainer = $inputElement.closest( '.siteorigin-widget-tinymce-container' );
909
  var mediaButtons = tmceContainer.data( 'media-buttons' );
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 c={},p=sowbForms.getContainerFieldId(g,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==p){var u={};for(var w in f)u[w.replace("{$repeater}",p)]=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===c[n.group];else{l=n.name.split(",").map((function(e){return e.trim()}));for(var F=0;F<l.length&&!(d=n.group===t&&l[F]===r);F++);}if(d){s=f[y],n.multi||(s=[s]);for(F=0;F<s.length;F++){var k=!1;if(!(o=void 0!==s[F][1]&&Boolean(s[F][1])?g.find(s[F][1]):g).prop("style").length||"show"!=s[F][0]&&"hide"!=s[F][0]||(o.fadeToggle("fast"),k=!0),k||o[s[F][0]].apply(o,void 0!==s[F][2]?s[F][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")}c[n.group]=!0}}}))})),n.sowSetupPreview(),r=n;var d=n.find(".siteorigin-widget-teaser");if(d.find(".dashicons-dismiss").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),c=JSON.parse(sessionStorage.getItem(l));c&&(c._sow_form_timestamp>f?sowbForms.displayNotice(n,soWidgets.backup.newerVersion,soWidgets.backup.replaceWarning,[{label:soWidgets.backup.restore,callback:function(e){sowbForms.setWidgetFormValues(r,c),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.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 p=n.find("> .siteorigin-widget-field");p.find("> .siteorigin-widget-section").sowSetupForm();var u=p.find("> .siteorigin-widget-widget");u.find("> .siteorigin-widget-section").sowSetupForm(),u.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),p.find(".siteorigin-widget-input").each((function(i,t){null===e(t).data("original-name")&&e(t).data("original-name",e(t).attr("name"))})),p.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),n.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),p.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(){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).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")}))};p.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").click(w),p.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").click(w),p.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.change((function(e,i){i&&i.silent||r.slider("value",parseFloat(t.val()))}))})),p.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]));a.removeClass("loading")}))};i.find(".select-content-button, .button-close").click((function(r){r.preventDefault(),e(this).blur();var n=i.find(".existing-content-selector");n.toggle(),n.is(":visible")&&0===n.find("ul.posts li").length&&t()})),i.on("click",".posts li",(function(t){t.preventDefault();var r=e(this);i.find("input.siteorigin-widget-input").val("post: "+r.data("value")),i.change(),i.find(".existing-content-selector").toggle()}));var r=null;i.find(".content-text-search").keyup((function(){null!==r&&clearTimeout(r),r=setTimeout((function(){t()}),500)}))})),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&p.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 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)}};p.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",p).data("sow-form-setup",!0),p.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").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").submit(),n.find(".close").click((function(){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).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().click((function(i){i.preventDefault(),r.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",(function(){e(window).resize()}))})),r.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").click((function(i){i.preventDefault(),r.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",(function(){e(window).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" />').append(e('<div class="siteorigin-widget-field-repeater-item-top" />').append(e('<div class="siteorigin-widget-field-expand" />')).append(o?"":e('<div class="siteorigin-widget-field-copy" />')).append(o?"":e('<div class="siteorigin-widget-field-remove" />')).append(e("<h4 />").html(r.data("item-name")))).append(e('<div class="siteorigin-widget-field-repeater-item-form" />').html(s));r.find("> .siteorigin-widget-field-repeater-items").append(d).sortable("refresh").trigger("updateFieldPositions"),d.sowSetupRepeaterItems(),d.hide().slideDown("fast",(function(){e(window).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.click((function(i){"siteorigin-widget-field-remove"!==i.target.className&&"siteorigin-widget-field-copy"!==i.target.className&&(i.preventDefault(),e(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",(function(){e(window).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").click((function(i,t){i.preventDefault();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).resize(),n.trigger("change")};t&&t.silent?s():confirm(soWidgets.sure)&&a.slideUp("fast",s)})),a.find(".siteorigin-widget-field-copy").click((function(i){i.preventDefault();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);g&&i.val(g.getContent())}else if(i.is(".wp-color-picker")){var f=i.closest(".wp-picker-container"),c=i.closest(".siteorigin-widget-field");f.remove(),c.append(i.remove())}else{var p=s?n.find("#"+s):n.find('[name="'+l+'"]');p.length&&null!=p.val()&&i.val(p.val())}if(s){var u,w;if(i.is('[type="radio"]')){u=s.replace(/-\d+-\d+$/,"");var m=s.replace(/-\d+$/,"");if(!d[u]){var v={};d[u]=t.find(".siteorigin-widget-input[id^="+u+"]").not("[id*=_id_]").filter((function(i,t){var r=e(t).attr("name");return!v[r]&&(v[r]=!0,!0)})).length+1}var h=u+"-"+d[u];w=h+s.match(/-\d+$/)[0],a.find("label[for="+m+"]").attr("for",h)}else F=new RegExp("-\\d+$"),u=s.replace(F,""),d[u]||(d[u]=t.find(".siteorigin-widget-input[id^="+u+"]").not("[id*=_id_]").length+1),w=u+"-"+d[u]++;if(i.attr("id",w),i.is(".wp-editor-area")){var b=i.closest(".siteorigin-widget-tinymce-container"),y=b.data("media-buttons");if(y&&y.html){var F=new RegExp(s,"g");y.html=y.html.replace(F,w),b.data("media-buttons",y)}}a.find("label[for="+s+"]").attr("for",w),a.find("[id*="+s+"]").each((function(){var i=e(this).attr("id").replace(s,w);e(this).attr("id",i)})),"undefined"!=typeof tinymce&&tinymce.get(w)&&tinymce.get(w).remove()}var k=n.parents(".siteorigin-widget-field-repeater").length,_=e("body");(_.hasClass("wp-customizer")||_.hasClass("widgets-php"))&&0===r.closest(".panel-dialog").length&&(k+=1);var C=l.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(k-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+o.toString()+"$3");i.attr("name",C),i.data("original-name",C)})),s.append(a).sortable("refresh").trigger("updateFieldPositions"),a.sowSetupRepeaterItems(),a.hide().slideDown("fast",(function(){e(window).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.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("]["),c=f.length?t:null;f.length;){var p=f.shift();c=c.hasOwnProperty(p)?c[p]:c}l=c}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").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+'">'+i.label+"</a>");i.url&&r.attr("href",i.url),i.callback&&r.on("click",(function(){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 c={},p=sowbForms.getContainerFieldId(g,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==p){var u={};for(var w in f)u[w.replace("{$repeater}",p)]=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===c[n.group];else{l=n.name.split(",").map((function(e){return e.trim()}));for(var F=0;F<l.length&&!(d=n.group===t&&l[F]===r);F++);}if(d){s=f[y],n.multi||(s=[s]);for(F=0;F<s.length;F++){var k=!1;if((o=void 0!==s[F][1]&&Boolean(s[F][1])?g.find(s[F][1]):g).prop("style").length&&("show"==s[F][0]?(o.fadeIn("fast"),k=!0):"hide"==s[F][0]&&(o.fadeOut("fast"),k=!0)),k||o[s[F][0]].apply(o,void 0!==s[F][2]?s[F][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")}c[n.group]=!0}}}))})),n.sowSetupPreview(),r=n;var d=n.find(".siteorigin-widget-teaser");if(d.find(".dashicons-dismiss").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),c=JSON.parse(sessionStorage.getItem(l));c&&(c._sow_form_timestamp>f?sowbForms.displayNotice(n,soWidgets.backup.newerVersion,soWidgets.backup.replaceWarning,[{label:soWidgets.backup.restore,callback:function(e){sowbForms.setWidgetFormValues(r,c),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.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 p=n.find("> .siteorigin-widget-field");p.find("> .siteorigin-widget-section").sowSetupForm();var u=p.find("> .siteorigin-widget-widget");u.find("> .siteorigin-widget-section").sowSetupForm(),u.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),p.find(".siteorigin-widget-input").each((function(i,t){null===e(t).data("original-name")&&e(t).data("original-name",e(t).attr("name"))})),p.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),n.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),p.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(){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).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")}))};p.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").click(w),p.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").click(w),p.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.change((function(e,i){i&&i.silent||r.slider("value",parseFloat(t.val()))}))})),p.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]));a.removeClass("loading")}))};i.find(".select-content-button, .button-close").click((function(r){r.preventDefault(),e(this).blur();var n=i.find(".existing-content-selector");n.toggle(),n.is(":visible")&&0===n.find("ul.posts li").length&&t()})),i.on("click",".posts li",(function(t){t.preventDefault();var r=e(this);i.find("input.siteorigin-widget-input").val("post: "+r.data("value")),i.change(),i.find(".existing-content-selector").toggle()}));var r=null;i.find(".content-text-search").keyup((function(){null!==r&&clearTimeout(r),r=setTimeout((function(){t()}),500)}))})),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&p.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 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)}};p.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",p).data("sow-form-setup",!0),p.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").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").submit(),n.find(".close").click((function(){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).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().click((function(i){i.preventDefault(),r.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",(function(){e(window).resize()}))})),r.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").click((function(i){i.preventDefault(),r.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",(function(){e(window).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" />').append(e('<div class="siteorigin-widget-field-repeater-item-top" />').append(e('<div class="siteorigin-widget-field-expand" />')).append(o?"":e('<div class="siteorigin-widget-field-copy" />')).append(o?"":e('<div class="siteorigin-widget-field-remove" />')).append(e("<h4 />").html(r.data("item-name")))).append(e('<div class="siteorigin-widget-field-repeater-item-form" />').html(s));r.find("> .siteorigin-widget-field-repeater-items").append(d).sortable("refresh").trigger("updateFieldPositions"),d.sowSetupRepeaterItems(),d.hide().slideDown("fast",(function(){e(window).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.click((function(i){"siteorigin-widget-field-remove"!==i.target.className&&"siteorigin-widget-field-copy"!==i.target.className&&(i.preventDefault(),e(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",(function(){e(window).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").click((function(i,t){i.preventDefault();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).resize(),n.trigger("change")};t&&t.silent?s():confirm(soWidgets.sure)&&a.slideUp("fast",s)})),a.find(".siteorigin-widget-field-copy").click((function(i){i.preventDefault();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);g&&i.val(g.getContent())}else if(i.is(".wp-color-picker")){var f=i.closest(".wp-picker-container"),c=i.closest(".siteorigin-widget-field");f.remove(),c.append(i.remove())}else{var p=s?n.find("#"+s):n.find('[name="'+l+'"]');p.length&&null!=p.val()&&i.val(p.val())}if(s){var u,w;if(i.is('[type="radio"]')){u=s.replace(/-\d+-\d+$/,"");var m=s.replace(/-\d+$/,"");if(!d[u]){var v={};d[u]=t.find(".siteorigin-widget-input[id^="+u+"]").not("[id*=_id_]").filter((function(i,t){var r=e(t).attr("name");return!v[r]&&(v[r]=!0,!0)})).length+1}var h=u+"-"+d[u];w=h+s.match(/-\d+$/)[0],a.find("label[for="+m+"]").attr("for",h)}else F=new RegExp("-\\d+$"),u=s.replace(F,""),d[u]||(d[u]=t.find(".siteorigin-widget-input[id^="+u+"]").not("[id*=_id_]").length+1),w=u+"-"+d[u]++;if(i.is(".wp-editor-area")&&(w+=Math.floor(1e3*Math.random()),i.data("tinymce-id",w)),i.attr("id",w),i.is(".wp-editor-area")){var b=i.closest(".siteorigin-widget-tinymce-container"),y=b.data("media-buttons");if(y&&y.html){var F=new RegExp(s,"g");y.html=y.html.replace(F,w),b.data("media-buttons",y)}}a.find("label[for="+s+"]").attr("for",w),a.find("[id*="+s+"]").each((function(){var i=e(this).attr("id").replace(s,w);e(this).attr("id",i)})),"undefined"!=typeof tinymce&&tinymce.get(w)&&tinymce.get(w).remove()}var k=n.parents(".siteorigin-widget-field-repeater").length,_=e("body");(_.hasClass("wp-customizer")||_.hasClass("widgets-php"))&&0===r.closest(".panel-dialog").length&&(k+=1);var C=l.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(k-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+o.toString()+"$3");i.attr("name",C),i.data("original-name",C)})),s.append(a).sortable("refresh").trigger("updateFieldPositions"),a.sowSetupRepeaterItems(),a.hide().slideDown("fast",(function(){e(window).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.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("]["),c=f.length?t:null;f.length;){var p=f.shift();c=c.hasOwnProperty(p)?c[p]:c}l=c}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").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+'">'+i.label+"</a>");i.url&&r.attr("href",i.url),i.callback&&r.on("click",(function(){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;
base/siteorigin-widget.class.php CHANGED
@@ -120,7 +120,15 @@ abstract class SiteOrigin_Widget extends WP_Widget {
120
  * @return array The form array, or an empty array if the form doesn't exist.
121
  */
122
  function get_form( $form_type ) {
123
- return $this->has_form( $form_type ) ? call_user_func( array( $this, 'get_' . $form_type . '_form' ) ) : array();
 
 
 
 
 
 
 
 
124
  }
125
 
126
  /**
@@ -239,7 +247,7 @@ abstract class SiteOrigin_Widget extends WP_Widget {
239
  do_action( 'siteorigin_widgets_after_widget_' . $this->id_base, $instance, $this );
240
 
241
  // If this is a widget preview, we need to print the styling inline
242
- if ( $this->is_preview( $instance ) && isset( $_POST['action'] ) && $_POST['action']== 'so_widgets_preview' ) {
243
  siteorigin_widget_print_styles();
244
  }
245
  }
@@ -291,7 +299,7 @@ abstract class SiteOrigin_Widget extends WP_Widget {
291
  $css_name = $this->id_base.'-'.$style.'-'.$hash;
292
 
293
  //Ensure styles aren't generated and enqueued more than once.
294
- $in_preview = $this->is_preview( $instance );
295
  if ( ! in_array( $css_name, $this->generated_css ) || $in_preview ) {
296
  if( $in_preview ) {
297
  siteorigin_widget_add_inline_css( $this->get_instance_css( $instance ) );
@@ -877,6 +885,10 @@ abstract class SiteOrigin_Widget extends WP_Widget {
877
  $less = preg_replace_callback( '/^@import\s+".*?\/?([\w\-\.]+)";/m', array( $this, 'get_less_import_contents' ), $less );
878
 
879
  $vars = apply_filters( 'siteorigin_widgets_less_variables_' . $this->id_base, $this->get_less_variables( $instance ), $instance, $this );
 
 
 
 
880
  if( !empty( $vars ) ){
881
  foreach($vars as $name => $value) {
882
  // Ignore empty string, false and null values (but keep '0')
@@ -1001,49 +1013,6 @@ abstract class SiteOrigin_Widget extends WP_Widget {
1001
  return call_user_func( array($this, $func), $this->current_instance, $args );
1002
  }
1003
 
1004
- /**
1005
- * Less function for importing Google web fonts.
1006
- *
1007
- * @param $instance
1008
- * @param $args
1009
- *
1010
- * @return string
1011
- */
1012
- function less_import_google_font($instance, $args) {
1013
- if( empty( $instance ) ) return;
1014
-
1015
- $fonts = $this->get_google_font_fields($instance);
1016
- if( empty( $fonts ) || ! is_array( $fonts ) ) return '';
1017
-
1018
- $font_imports = array();
1019
-
1020
- foreach ( $fonts as $font ) {
1021
- $font_imports[] = siteorigin_widget_get_font( $font );
1022
- }
1023
-
1024
- $import_strings = array();
1025
- foreach( $font_imports as $import ) {
1026
- $import_strings[] = !empty($import['css_import']) ? $import['css_import'] : '';
1027
- }
1028
-
1029
- // Remove empty and duplicate items from the array
1030
- $import_strings = array_filter( $import_strings );
1031
- $import_strings = array_unique( $import_strings );
1032
-
1033
- return implode( "\n", $import_strings );
1034
- }
1035
-
1036
- /**
1037
- * Get any font fields which may be used by this widget.
1038
- *
1039
- * @param $instance
1040
- *
1041
- * @return array
1042
- */
1043
- function get_google_font_fields( $instance ) {
1044
- return apply_filters( 'siteorigin_widgets_google_font_fields_' . $this->id_base, array(), $instance, $this );
1045
- }
1046
-
1047
  /**
1048
  * Utility function to get a field name for a widget field.
1049
  *
120
  * @return array The form array, or an empty array if the form doesn't exist.
121
  */
122
  function get_form( $form_type ) {
123
+ $form_options = $this->has_form( $form_type ) ? call_user_func( array( $this, 'get_' . $form_type . '_form' ) ) : array();
124
+
125
+ if ( $form_type == 'settings' ) {
126
+ // Allow plugins to filter global widgets form.
127
+ $form_options = apply_filters( 'siteorigin_widgets_settings_form', $form_options, $this );
128
+ $form_options = apply_filters( 'siteorigin_widgets_settings_form_' . $this->id_base, $form_options, $this );
129
+ }
130
+
131
+ return $form_options;
132
  }
133
 
134
  /**
247
  do_action( 'siteorigin_widgets_after_widget_' . $this->id_base, $instance, $this );
248
 
249
  // If this is a widget preview, we need to print the styling inline
250
+ if ( $this->is_preview( $instance ) ) {
251
  siteorigin_widget_print_styles();
252
  }
253
  }
299
  $css_name = $this->id_base.'-'.$style.'-'.$hash;
300
 
301
  //Ensure styles aren't generated and enqueued more than once.
302
+ $in_preview = $this->is_preview( $instance ) || ( isset( $_POST['action'] ) && $_POST['action'] == 'so_widgets_preview' );
303
  if ( ! in_array( $css_name, $this->generated_css ) || $in_preview ) {
304
  if( $in_preview ) {
305
  siteorigin_widget_add_inline_css( $this->get_instance_css( $instance ) );
885
  $less = preg_replace_callback( '/^@import\s+".*?\/?([\w\-\.]+)";/m', array( $this, 'get_less_import_contents' ), $less );
886
 
887
  $vars = apply_filters( 'siteorigin_widgets_less_variables_' . $this->id_base, $this->get_less_variables( $instance ), $instance, $this );
888
+
889
+ $less = apply_filters( 'siteorigin_widgets_styles_vars', $less, $vars, $this->widget_class, $instance );
890
+ $less = apply_filters( 'siteorigin_widgets_less_vars_' . $this->id_base, $less, $vars, $instance, $this );
891
+
892
  if( !empty( $vars ) ){
893
  foreach($vars as $name => $value) {
894
  // Ignore empty string, false and null values (but keep '0')
1013
  return call_user_func( array($this, $func), $this->current_instance, $args );
1014
  }
1015
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1016
  /**
1017
  * Utility function to get a field name for a widget field.
1018
  *
compat/elementor/styles.css CHANGED
@@ -1 +1 @@
1
- .elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form{min-width:inherit}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container{float:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active{transform:none;float:none;position:relative;padding:0;border:none;background:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .wp-color-result{float:none;margin:0}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .wp-picker-input-wrap{padding:0;float:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .iris-picker.iris-border{background:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .iris-picker.iris-border .iris-picker-inner{left:0;right:0}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .wp-picker-clear{height:28px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector{width:inherit}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field .siteorigin-widget-input-color{width:120px;margin:0 3px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-search{width:100%}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-measurement .siteorigin-widget-input-measurement,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-measurement .sow-measurement-select-unit{max-width:inherit;height:28px;margin:0}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-measurement .siteorigin-widget-input-measurement{width:66%;margin-right:1px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-measurement .sow-measurement-select-unit{min-width:inherit;width:32%;margin-left:1px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-posts select[multiple]{height:inherit}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-posts .siteorigin-widget-field-type-date-range>div input[type="text"].datepicker{width:100%}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field .siteorigin-widget-field-type-slider input[type="number"]{display:none !important}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field .clear{clear:both}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-media .media-fallback-external{margin-top:4px !important;margin-left:15px !important;max-width:220px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-secondary{display:inline-block;text-decoration:none;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border:1px solid #cccccc;border-radius:3px;white-space:nowrap;box-sizing:border-box;font-family:inherit;font-weight:normal;text-transform:capitalize;color:#555;background:#f7f7f7}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button:hover,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-secondary:hover,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button:focus,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-secondary:focus{background:#fafafa;border-color:#999;color:#23282d}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button:active,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-secondary:active,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button:focus,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-secondary:focus{outline:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button.hidden,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-secondary.hidden{display:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button.button-small{height:25px;line-height:23px;padding:0 8px;font-size:11px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form select,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form input[type=text]{margin:1px;border-radius:0;font-weight:inherit;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,0.07);background-color:#fff;color:#32373c;outline:0;transition:50ms border-color ease-in-out;max-width:100%}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form select[multiple]{min-height:83px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form input[type="text"].datepicker{width:auto;max-width:100%}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;box-shadow:0 1px 2px rgba(30,140,190,0.8);background-color:#fff}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:left}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .media-toolbar-primary{margin-top:15px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .query-builder-content .query-builder-form-field small{margin-top:5px}
1
+ .elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form{min-width:inherit}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form a{border-bottom:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container{float:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active{transform:none;float:none;position:relative;padding:0;border:none;background:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .wp-color-result{float:left;margin:0}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .wp-picker-input-wrap{padding:0;float:left}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .wp-picker-input-wrap .siteorigin-widget-input-color,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .wp-picker-input-wrap .button.wp-picker-default{font-size:12px;height:32px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .wp-picker-input-wrap .button.wp-picker-default{float:right;width:auto}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .wp-picker-holder:before{clear:both;content:"";display:table}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .iris-picker.iris-border{background:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .iris-picker.iris-border .iris-picker-inner{left:0;right:0}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .wp-picker-container.wp-picker-active .wp-picker-clear{height:28px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector{width:inherit}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field .siteorigin-widget-input-color{width:120px;margin:0 3px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field .ui-draggable-handle{transition:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-search{box-shadow:inset 0 1px 2px rgba(0,0,0,0.07);background-color:#fff;color:#32373c;width:100%}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-search::placeholder,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-search::-webkit-input-placeholder{color:#32373c}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-icon .siteorigin-widget-icon-icons-icon{color:#444}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-measurement .siteorigin-widget-input-measurement,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-measurement .sow-measurement-select-unit{max-width:inherit;height:28px;margin:0}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-measurement .siteorigin-widget-input-measurement{width:100%;max-width:58px;margin-right:1px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-measurement .sow-measurement-select-unit{min-width:inherit;width:32%;margin-left:1px;max-width:73px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-posts select[multiple]{height:inherit}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-posts .siteorigin-widget-field-type-date-range>div input[type="text"].datepicker{width:100%}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field .siteorigin-widget-field-type-slider input[type="number"]{display:none !important}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field .clear{clear:both}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-type-media .media-fallback-external{margin-top:4px !important;margin-left:15px !important;max-width:220px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field .siteorigin-widget-input[type="text"]{height:30px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field .siteorigin-widget-input[type="checkbox"]{display:inline-block;vertical-align:middle}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field .siteorigin-widget-description{color:inherit}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .siteorigin-widget-field-type-section{color:#000}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button.wp-color-result{font-size:12px;height:32px;padding:0 0 0 30px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button.button-small{height:25px;line-height:30px;padding:0 8px;font-size:11px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form select,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form input[type=text]{margin:1px;border-radius:0;font-weight:inherit;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,0.07);background-color:#fff;color:#32373c;outline:0;transition:50ms border-color ease-in-out;max-width:100%}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form select[multiple]{min-height:83px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form input[type="text"].datepicker{width:auto;max-width:100%}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .ui-autocomplete{padding:0;margin:0;list-style:none;position:absolute;z-index:10000;border:1px solid #5b9dd9;box-shadow:0 1px 2px rgba(30,140,190,0.8);background-color:#fff}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .ui-autocomplete li{margin-bottom:0;padding:4px 10px;white-space:nowrap;text-align:left}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .ui-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .media-toolbar-primary{margin-top:15px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .query-builder-content .query-builder-form-field small{margin-top:5px}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button,#so-widgets-image-search-frame .button,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-secondary,#so-widgets-image-search-frame .button-secondary{display:inline-block;text-decoration:none;font-size:13px;line-height:28px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;border:1px solid #cccccc;border-radius:3px;white-space:nowrap;box-sizing:border-box;font-family:inherit;font-weight:normal;text-transform:capitalize;color:#555;background:#f7f7f7}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button:hover,#so-widgets-image-search-frame .button:hover,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-secondary:hover,#so-widgets-image-search-frame .button-secondary:hover,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button:focus,#so-widgets-image-search-frame .button:focus,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-secondary:focus,#so-widgets-image-search-frame .button-secondary:focus{background:#fafafa;border-color:#999;color:#23282d}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button:active,#so-widgets-image-search-frame .button:active,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-secondary:active,#so-widgets-image-search-frame .button-secondary:active,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button:focus,#so-widgets-image-search-frame .button:focus,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-secondary:focus,#so-widgets-image-search-frame .button-secondary:focus{outline:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button.hidden,#so-widgets-image-search-frame .button.hidden,.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-secondary.hidden,#so-widgets-image-search-frame .button-secondary.hidden{display:none}.elementor-panel #elementor-panel-page-editor .elementor-control-content .siteorigin-widget-form .button-primary,#so-widgets-image-search-frame .button-primary{background:#007cba;border-color:#007cba;color:#fff;text-decoration:none;text-shadow:none}#so-widgets-image-search-frame .so-widgets-search-input{background:#fff;color:#32373c;border:1px solid #7e8993;line-height:1;min-height:47px;font-size:14px}#so-widgets-image-search-frame .so-widgets-image-search-powered{font-size:11px}#so-widgets-image-search-frame a{color:#0073aa;text-decoration:underline}#so-widgets-image-search-frame a:active,#so-widgets-image-search-frame a:hover{color:#006799}#so-widgets-image-search-frame .so-widgets-results-loading{color:#444}.so-widgets-dialog .so-widgets-toolbar h3{color:#23282d;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16.9px;font-weight:600;margin:15px 0 15px 20px}
js/sow.google-map.js CHANGED
@@ -439,7 +439,7 @@ jQuery(function ($) {
439
  }
440
  $mapCanvas.each(function(index, element) {
441
  var $this = $(element);
442
- if ( ! $this.is( ':visible' ) || $this.data( 'apiInitialized' ) ) {
443
  return $this;
444
  }
445
  var mapOptions = $this.data( 'options' );
@@ -504,8 +504,17 @@ jQuery(function ($) {
504
  window.console.error = sowb.onLoadMapsApiError;
505
  }
506
 
507
- $( 'body' ).append( '<script async type="text/javascript" src="' + apiUrl + '">' );
508
- sowb.mapsApiInitialized = true;
 
 
 
 
 
 
 
 
 
509
  }
510
  };
511
  sowb.setupGoogleMaps();
439
  }
440
  $mapCanvas.each(function(index, element) {
441
  var $this = $(element);
442
+ if ( ! $this.parent().is( ':visible' ) || $this.data( 'apiInitialized' ) ) {
443
  return $this;
444
  }
445
  var mapOptions = $this.data( 'options' );
504
  window.console.error = sowb.onLoadMapsApiError;
505
  }
506
 
507
+ if ( soWidgetsGoogleMap.map_consent ) {
508
+ $( '.sow-google-map-consent button' ).click( function() {
509
+ $( '.sow-google-map-consent' ).remove();
510
+ $( '.sow-google-map-canvas' ).show();
511
+ $( 'body' ).append( '<script async type="text/javascript" src="' + apiUrl + '">' );
512
+ sowb.mapsApiInitialized = true;
513
+ } );
514
+ } else {
515
+ $( 'body' ).append( '<script async type="text/javascript" src="' + apiUrl + '">' );
516
+ sowb.mapsApiInitialized = true;
517
+ }
518
  }
519
  };
520
  sowb.setupGoogleMaps();
js/sow.google-map.min.js CHANGED
@@ -1 +1 @@
1
- function soGoogleMapInitialize(){new sowb.SiteOriginGoogleMap(jQuery).initMaps()}window.sowb=window.sowb||{},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 d=new google.maps.StyledMapType(l,r);s.mapTypes.set("user_map_style",d),s.setMapTypeId("user_map_style")}(t.markerAtCenter&&(this.centerMarker=new google.maps.Marker({position:o,map:s,draggable:t.markersDraggable,icon:t.markerIcon,title:""})),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)},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.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.custom_marker_icon,n=e.hasOwnProperty("info")?e.info:null,a=e.hasOwnProperty("info_max_width")?e.info_max_width: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 d=t.markerInfoDisplay;l.disableAutoPan="always"===d;var c=new google.maps.InfoWindow(l);this.infoWindows.push(c);var p=d;"always"===d&&(p="click",c.open(o,r)),r.addListener(p,function(){c.open(o,r),"always"===d||t.markerInfoMultiple||this.infoWindows.forEach((function(e){e!==c&&e.close()}))}.bind(this)),"mouseover"===d&&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)}))},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.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}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.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:""})),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)},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.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.custom_marker_icon,n=e.hasOwnProperty("info")?e.info:null,a=e.hasOwnProperty("info_max_width")?e.info_max_width: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)}))},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").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
@@ -72,43 +72,43 @@ msgstr ""
72
  msgid "Support"
73
  msgstr ""
74
 
75
- #: base/siteorigin-widget.class.php:504
76
  msgid "Preview"
77
  msgstr ""
78
 
79
- #: base/siteorigin-widget.class.php:509
80
  msgid "Help"
81
  msgstr ""
82
 
83
- #: base/siteorigin-widget.class.php:575
84
  msgid "This widget has scripts and styles that need to be loaded before you can use it. Please save and reload your current page."
85
  msgstr ""
86
 
87
- #: base/siteorigin-widget.class.php:576
88
  msgid "You will only need to do this once."
89
  msgstr ""
90
 
91
- #: base/siteorigin-widget.class.php:603
92
  msgid "Are you sure?"
93
  msgstr ""
94
 
95
- #: base/siteorigin-widget.class.php:605
96
  msgid "There is a newer version of this widget's content available."
97
  msgstr ""
98
 
99
- #: base/siteorigin-widget.class.php:606, base/siteorigin-widget.class.php:610
100
  msgid "Restore"
101
  msgstr ""
102
 
103
- #: base/siteorigin-widget.class.php:607
104
  msgid "Dismiss"
105
  msgstr ""
106
 
107
- #: base/siteorigin-widget.class.php:609
108
  msgid "Clicking %s will replace the current widget contents. You can revert by refreshing the page before updating."
109
  msgstr ""
110
 
111
- #: base/siteorigin-widget.class.php:660, base/inc/actions.php:53
112
  msgid "Widget Preview"
113
  msgstr ""
114
 
@@ -284,83 +284,91 @@ msgstr ""
284
  msgid "SiteOrigin Accordion"
285
  msgstr ""
286
 
287
- #: widgets/accordion/accordion.php:47, widgets/accordion/accordion.php:60, 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:120, 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:47, widgets/tabs/tabs.php:60, widgets/taxonomy/taxonomy.php:34, widgets/testimonial/testimonial.php:41, widgets/video/video.php:33, base/inc/fields/posts.class.php:97
 
 
 
 
 
 
 
 
288
  msgid "Title"
289
  msgstr ""
290
 
291
- #: widgets/accordion/accordion.php:51, widgets/accordion/accordion.php:129, widgets/tabs/tabs.php:145
292
  msgid "Panels"
293
  msgstr ""
294
 
295
- #: widgets/accordion/accordion.php:64, widgets/hero/hero.php:62, widgets/layout-slider/layout-slider.php:56, widgets/tabs/tabs.php:64
296
  msgid "Content"
297
  msgstr ""
298
 
299
- #: widgets/accordion/accordion.php:70, widgets/editor/editor.php:45
300
  msgid "Automatically add paragraphs"
301
  msgstr ""
302
 
303
- #: widgets/accordion/accordion.php:74
304
  msgid "Initial state"
305
  msgstr ""
306
 
307
- #: widgets/accordion/accordion.php:75
308
  msgid "Whether this panel should be open or closed when the page first loads."
309
  msgstr ""
310
 
311
- #: widgets/accordion/accordion.php:77
312
  msgid "Open"
313
  msgstr ""
314
 
315
- #: widgets/accordion/accordion.php:78
316
  msgid "Closed"
317
  msgstr ""
318
 
319
- #: widgets/accordion/accordion.php:86, widgets/contact/contact.php:326, widgets/cta/cta.php:74, widgets/post-carousel/post-carousel.php:162, widgets/tabs/tabs.php:76, widgets/testimonial/testimonial.php:184
320
  msgid "Design"
321
  msgstr ""
322
 
323
- #: widgets/accordion/accordion.php:91
324
  msgid "Headings"
325
  msgstr ""
326
 
327
- #: widgets/accordion/accordion.php:96, widgets/accordion/accordion.php:134, widgets/contact/contact.php:336, widgets/contact/contact.php:574, widgets/cta/cta.php:78, widgets/hero/hero.php:122, widgets/layout-slider/layout-slider.php:90, widgets/social-media-buttons/social-media-buttons.php:86, widgets/tabs/tabs.php:86, widgets/tabs/tabs.php:106, widgets/tabs/tabs.php:150
328
  msgid "Background color"
329
  msgstr ""
330
 
331
- #: widgets/accordion/accordion.php:101, widgets/tabs/tabs.php:110
332
  msgid "Background hover color"
333
  msgstr ""
334
 
335
- #: widgets/accordion/accordion.php:106, widgets/cta/cta.php:91, widgets/tabs/tabs.php:115
336
  msgid "Title color"
337
  msgstr ""
338
 
339
- #: widgets/accordion/accordion.php:111, widgets/tabs/tabs.php:120
340
  msgid "Title hover color"
341
  msgstr ""
342
 
343
- #: widgets/accordion/accordion.php:115, widgets/accordion/accordion.php:143, widgets/contact/contact.php:346, widgets/contact/contact.php:468, widgets/contact/contact.php:584, widgets/cta/cta.php:82, widgets/tabs/tabs.php:91, widgets/tabs/tabs.php:125, widgets/tabs/tabs.php:159
344
  msgid "Border color"
345
  msgstr ""
346
 
347
- #: widgets/accordion/accordion.php:119, widgets/tabs/tabs.php:130
348
  msgid "Border hover color"
349
  msgstr ""
350
 
351
- #: widgets/accordion/accordion.php:123, widgets/accordion/accordion.php:147, widgets/contact/contact.php:351, widgets/contact/contact.php:473, widgets/contact/contact.php:600, widgets/tabs/tabs.php:95, widgets/tabs/tabs.php:135, widgets/tabs/tabs.php:163
352
  msgid "Border width"
353
  msgstr ""
354
 
355
- #: widgets/accordion/accordion.php:139, widgets/tabs/tabs.php:155
356
  msgid "Font color"
357
  msgstr ""
358
 
359
- #: widgets/accordion/accordion.php:151
360
  msgid "Bottom margin"
361
  msgstr ""
362
 
363
- #: widgets/accordion/accordion.php:243
364
  msgid "Get more customization options and the ability to use widgets and layouts as your accordion content with %sSiteOrigin Premium%s"
365
  msgstr ""
366
 
@@ -384,203 +392,211 @@ msgstr ""
384
  msgid "Open in a new window"
385
  msgstr ""
386
 
387
- #: widgets/button/button.php:62, widgets/button/button.php:66, widgets/features/features.php:78, widgets/icon/icon.php:31, widgets/price-table/price-table.php:119
 
 
 
 
 
 
 
 
388
  msgid "Icon"
389
  msgstr ""
390
 
391
- #: widgets/button/button.php:71, widgets/features/features.php:88, widgets/price-table/price-table.php:123, widgets/social-media-buttons/social-media-buttons.php:82
392
  msgid "Icon color"
393
  msgstr ""
394
 
395
- #: widgets/button/button.php:76
396
  msgid "Image icon"
397
  msgstr ""
398
 
399
- #: widgets/button/button.php:77
400
  msgid "Replaces the icon with your own image icon."
401
  msgstr ""
402
 
403
- #: widgets/button/button.php:82
404
  msgid "Icon Placement"
405
  msgstr ""
406
 
407
- #: widgets/button/button.php:85, widgets/features/features.php:66
408
  msgid "Top"
409
  msgstr ""
410
 
411
- #: widgets/button/button.php:86, widgets/button/button.php:112, widgets/contact/contact.php:401, widgets/contact/contact.php:416, widgets/contact/contact.php:645, 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:49, widgets/image/image.php:61, 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
412
  msgid "Right"
413
  msgstr ""
414
 
415
- #: widgets/button/button.php:87, widgets/features/features.php:68
416
  msgid "Bottom"
417
  msgstr ""
418
 
419
- #: widgets/button/button.php:88, widgets/button/button.php:111, widgets/contact/contact.php:400, widgets/contact/contact.php:415, widgets/contact/contact.php:644, 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:48, widgets/image/image.php:60, 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
420
  msgid "Left"
421
  msgstr ""
422
 
423
- #: widgets/button/button.php:96, widgets/social-media-buttons/social-media-buttons.php:92
424
  msgid "Design and layout"
425
  msgstr ""
426
 
427
- #: widgets/button/button.php:102, widgets/contact/contact.php:407, widgets/contact/contact.php:637, widgets/contact/contact.php:688, widgets/google-map/google-map.php:94
428
  msgid "Width"
429
  msgstr ""
430
 
431
- #: widgets/button/button.php:103
432
  msgid "Leave blank to let the button resize according to content."
433
  msgstr ""
434
 
435
- #: widgets/button/button.php:108, widgets/contact/contact.php:412, widgets/contact/contact.php:641, widgets/social-media-buttons/social-media-buttons.php:149
436
  msgid "Align"
437
  msgstr ""
438
 
439
- #: widgets/button/button.php:113, widgets/contact/contact.php:417, widgets/contact/contact.php:646, widgets/headline/headline.php:90, widgets/headline/headline.php:161, widgets/headline/headline.php:216, widgets/icon/icon.php:48, widgets/image/image.php:50, widgets/image/image.php:62, widgets/social-media-buttons/social-media-buttons.php:154, widgets/social-media-buttons/social-media-buttons.php:165
440
  msgid "Center"
441
  msgstr ""
442
 
443
- #: widgets/button/button.php:114, widgets/contact/contact.php:418, widgets/headline/headline.php:93, widgets/headline/headline.php:164, widgets/social-media-buttons/social-media-buttons.php:155, widgets/social-media-buttons/social-media-buttons.php:166
444
  msgid "Justify"
445
  msgstr ""
446
 
447
- #: widgets/button/button.php:120, widgets/social-media-buttons/social-media-buttons.php:102
448
  msgid "Button theme"
449
  msgstr ""
450
 
451
- #: widgets/button/button.php:123, widgets/price-table/price-table.php:134, widgets/social-media-buttons/social-media-buttons.php:105
452
  msgid "Atom"
453
  msgstr ""
454
 
455
- #: widgets/button/button.php:124, widgets/social-media-buttons/social-media-buttons.php:106
456
  msgid "Flat"
457
  msgstr ""
458
 
459
- #: widgets/button/button.php:125, widgets/social-media-buttons/social-media-buttons.php:107
460
  msgid "Wire"
461
  msgstr ""
462
 
463
- #: widgets/button/button.php:132, widgets/price-table/price-table.php:150
464
  msgid "Button color"
465
  msgstr ""
466
 
467
- #: widgets/button/button.php:137, widgets/contact/contact.php:612, widgets/hero/hero.php:260, widgets/layout-slider/layout-slider.php:206, widgets/testimonial/testimonial.php:227
468
  msgid "Text color"
469
  msgstr ""
470
 
471
- #: widgets/button/button.php:143, widgets/social-media-buttons/social-media-buttons.php:112
472
  msgid "Use hover effects"
473
  msgstr ""
474
 
475
- #: widgets/button/button.php:155
476
  msgid "Hover background color"
477
  msgstr ""
478
 
479
- #: widgets/button/button.php:164
480
  msgid "Hover text color"
481
  msgstr ""
482
 
483
- #: widgets/button/button.php:174, widgets/contact/contact.php:380, widgets/contact/contact.php:430, widgets/features/features.php:141, widgets/features/features.php:162, widgets/features/features.php:183, widgets/headline/headline.php:78, widgets/headline/headline.php:149
484
  msgid "Font"
485
  msgstr ""
486
 
487
- #: widgets/button/button.php:180, widgets/contact/contact.php:385, widgets/contact/contact.php:617
488
  msgid "Font size"
489
  msgstr ""
490
 
491
- #: widgets/button/button.php:182, widgets/contact/contact.php:289, widgets/contact/contact.php:523, widgets/contact/contact.php:625, widgets/social-media-buttons/social-media-buttons.php:119
492
  msgid "Normal"
493
  msgstr ""
494
 
495
- #: widgets/button/button.php:183, widgets/button/button.php:207, widgets/social-media-buttons/social-media-buttons.php:120, widgets/social-media-buttons/social-media-buttons.php:142, widgets/social-media-buttons/social-media-buttons.php:175, base/inc/widgets/base-slider.class.php:106
496
  msgid "Medium"
497
  msgstr ""
498
 
499
- #: widgets/button/button.php:184, widgets/social-media-buttons/social-media-buttons.php:121
500
  msgid "Large"
501
  msgstr ""
502
 
503
- #: widgets/button/button.php:185, widgets/social-media-buttons/social-media-buttons.php:122
504
  msgid "Extra large"
505
  msgstr ""
506
 
507
- #: widgets/button/button.php:191, widgets/social-media-buttons/social-media-buttons.php:127
508
  msgid "Rounding"
509
  msgstr ""
510
 
511
- #: widgets/button/button.php:194, widgets/contact/contact.php:359, widgets/contact/contact.php:481, widgets/contact/contact.php:592, widgets/contact/contact.php:677, widgets/google-map/google-map.php:158, widgets/headline/headline.php:188, widgets/social-media-buttons/social-media-buttons.php:130
512
  msgid "None"
513
  msgstr ""
514
 
515
- #: widgets/button/button.php:195, widgets/social-media-buttons/social-media-buttons.php:131
516
  msgid "Slightly rounded"
517
  msgstr ""
518
 
519
- #: widgets/button/button.php:196, widgets/social-media-buttons/social-media-buttons.php:132
520
  msgid "Very rounded"
521
  msgstr ""
522
 
523
- #: widgets/button/button.php:197, widgets/social-media-buttons/social-media-buttons.php:133
524
  msgid "Completely rounded"
525
  msgstr ""
526
 
527
- #: widgets/button/button.php:203, widgets/contact/contact.php:341, widgets/contact/contact.php:447, widgets/contact/contact.php:632, widgets/social-media-buttons/social-media-buttons.php:138, widgets/testimonial/testimonial.php:235
528
  msgid "Padding"
529
  msgstr ""
530
 
531
- #: widgets/button/button.php:206, widgets/social-media-buttons/social-media-buttons.php:141, widgets/social-media-buttons/social-media-buttons.php:174
532
  msgid "Low"
533
  msgstr ""
534
 
535
- #: widgets/button/button.php:208, widgets/social-media-buttons/social-media-buttons.php:143, widgets/social-media-buttons/social-media-buttons.php:176
536
  msgid "High"
537
  msgstr ""
538
 
539
- #: widgets/button/button.php:209, widgets/social-media-buttons/social-media-buttons.php:144, widgets/social-media-buttons/social-media-buttons.php:177
540
  msgid "Very high"
541
  msgstr ""
542
 
543
- #: widgets/button/button.php:218
544
  msgid "Other attributes and SEO"
545
  msgstr ""
546
 
547
- #: widgets/button/button.php:223, widgets/contact/contact.php:97
548
  msgid "Button ID"
549
  msgstr ""
550
 
551
- #: widgets/button/button.php:224
552
  msgid "An ID attribute allows you to target this button in Javascript."
553
  msgstr ""
554
 
555
- #: widgets/button/button.php:229
556
  msgid "Button Classes"
557
  msgstr ""
558
 
559
- #: widgets/button/button.php:230
560
  msgid "Additional CSS classes added to the button link."
561
  msgstr ""
562
 
563
- #: widgets/button/button.php:235
564
  msgid "Title attribute"
565
  msgstr ""
566
 
567
- #: widgets/button/button.php:236
568
  msgid "Adds a title attribute to the button link."
569
  msgstr ""
570
 
571
- #: widgets/button/button.php:241, widgets/contact/contact.php:102
572
  msgid "Onclick"
573
  msgstr ""
574
 
575
- #: widgets/button/button.php:242
576
  msgid "Run this Javascript when the button is clicked. Ideal for tracking."
577
  msgstr ""
578
 
579
- #: widgets/button/button.php:247
580
  msgid "Rel attribute"
581
  msgstr ""
582
 
583
- #: widgets/button/button.php:248
584
  msgid "Adds a rel attribute to the button link."
585
  msgstr ""
586
 
@@ -744,7 +760,7 @@ msgstr ""
744
  msgid "Required Field"
745
  msgstr ""
746
 
747
- #: widgets/contact/contact.php:182, widgets/contact/contact.php:1069
748
  msgid "Required field"
749
  msgstr ""
750
 
@@ -916,14 +932,6 @@ msgstr ""
916
  msgid "Inside"
917
  msgstr ""
918
 
919
- #: widgets/contact/contact.php:435, widgets/headline/headline.php:83, widgets/headline/headline.php:154
920
- msgid "Font Size"
921
- msgstr ""
922
-
923
- #: widgets/contact/contact.php:439
924
- msgid "Text Color"
925
- msgstr ""
926
-
927
  #: widgets/contact/contact.php:443, widgets/social-media-buttons/social-media-buttons.php:171
928
  msgid "Margin"
929
  msgstr ""
@@ -937,7 +945,7 @@ msgid "Height"
937
  msgstr ""
938
 
939
  #: widgets/contact/contact.php:460
940
- msgid "Text Area Height"
941
  msgstr ""
942
 
943
  #: widgets/contact/contact.php:464, widgets/hero/hero.php:89, widgets/layout-slider/layout-slider.php:61
@@ -1072,39 +1080,39 @@ msgstr ""
1072
  msgid "This setting controls when the field max width will be disabled. The default value is 780px"
1073
  msgstr ""
1074
 
1075
- #: widgets/contact/contact.php:1081
1076
  msgid "Invalid email address."
1077
  msgstr ""
1078
 
1079
- #: widgets/contact/contact.php:1106
1080
  msgid "Invalid phone number. It should contain at least three digits."
1081
  msgstr ""
1082
 
1083
- #: widgets/contact/contact.php:1175
1084
  msgid "Error sending email, please try again later."
1085
  msgstr ""
1086
 
1087
- #: widgets/contact/contact.php:1201
1088
  msgid "A valid email is required"
1089
  msgstr ""
1090
 
1091
- #: widgets/contact/contact.php:1203
1092
  msgid "The email address is invalid"
1093
  msgstr ""
1094
 
1095
- #: widgets/contact/contact.php:1207
1096
  msgid "Missing subject"
1097
  msgstr ""
1098
 
1099
- #: widgets/contact/contact.php:1241
1100
  msgid "Error validating your Captcha response."
1101
  msgstr ""
1102
 
1103
- #: widgets/contact/contact.php:1273
1104
  msgid "Unfortunately our system identified your message as spam."
1105
  msgstr ""
1106
 
1107
- #: widgets/contact/contact.php:1281
1108
  msgctxt "The name of who sent this email"
1109
  msgid "From"
1110
  msgstr ""
@@ -1670,22 +1678,53 @@ msgid "Enter your %sAPI key%s. Your map won't function correctly without one."
1670
  msgstr ""
1671
 
1672
  #: widgets/google-map/google-map.php:471
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1673
  msgid "Responsive breakpoint"
1674
  msgstr ""
1675
 
1676
- #: widgets/google-map/google-map.php:473
1677
  msgid "This setting controls when the map will use the mobile zoom. This breakpoint will only be used if a mobile zoom is set in the SiteOrigin Google Maps settings. The default value is 780px"
1678
  msgstr ""
1679
 
1680
- #: widgets/google-map/google-map.php:600
1681
  msgid "There were no results for the place you entered. Please try another."
1682
  msgstr ""
1683
 
1684
- #: widgets/google-map/google-map.php:621
1685
  msgid "Custom Map"
1686
  msgstr ""
1687
 
1688
- #: widgets/google-map/google-map.php:853
1689
  msgid "Get a curated list of predefined map styles with %sSiteOrigin Premium%s"
1690
  msgstr ""
1691
 
@@ -1713,6 +1752,10 @@ msgstr ""
1713
  msgid "Hover Color"
1714
  msgstr ""
1715
 
 
 
 
 
1716
  #: widgets/headline/headline.php:87, widgets/headline/headline.php:158, widgets/headline/headline.php:213, widgets/icon/icon.php:46
1717
  msgid "Alignment"
1718
  msgstr ""
@@ -1881,27 +1924,27 @@ msgstr ""
1881
  msgid "FitText compressor strength"
1882
  msgstr ""
1883
 
1884
- #: widgets/hero/hero.php:252, widgets/layout-slider/layout-slider.php:188
1885
  msgid "Heading shadow intensity"
1886
  msgstr ""
1887
 
1888
- #: widgets/hero/hero.php:265, widgets/layout-slider/layout-slider.php:198
1889
  msgid "Text size"
1890
  msgstr ""
1891
 
1892
- #: widgets/hero/hero.php:270
1893
  msgid "Text font"
1894
  msgstr ""
1895
 
1896
- #: widgets/hero/hero.php:275
1897
  msgid "Text shadow intensity"
1898
  msgstr ""
1899
 
1900
- #: widgets/hero/hero.php:284
1901
  msgid "Link color"
1902
  msgstr ""
1903
 
1904
- #: widgets/hero/hero.php:289
1905
  msgid "Link hover color"
1906
  msgstr ""
1907
 
@@ -2045,70 +2088,118 @@ msgstr ""
2045
  msgid "SiteOrigin Post Carousel"
2046
  msgstr ""
2047
 
2048
- #: widgets/post-carousel/post-carousel.php:126
2049
  msgid "Default Thumbnail"
2050
  msgstr ""
2051
 
2052
- #: widgets/post-carousel/post-carousel.php:127
2053
  msgid "Choose Thumbnail"
2054
  msgstr ""
2055
 
2056
- #: widgets/post-carousel/post-carousel.php:128
2057
  msgid "Set Thumbnail"
2058
  msgstr ""
2059
 
2060
- #: widgets/post-carousel/post-carousel.php:134
2061
  msgid "Featured Image size"
2062
  msgstr ""
2063
 
2064
- #: widgets/post-carousel/post-carousel.php:140
2065
  msgid "Link target"
2066
  msgstr ""
2067
 
2068
- #: widgets/post-carousel/post-carousel.php:141
2069
  msgid "Choose where to open each carousel item."
2070
  msgstr ""
2071
 
2072
- #: widgets/post-carousel/post-carousel.php:143
2073
  msgid "Same window "
2074
  msgstr ""
2075
 
2076
- #: widgets/post-carousel/post-carousel.php:144
2077
  msgid "New window "
2078
  msgstr ""
2079
 
2080
- #: widgets/post-carousel/post-carousel.php:149
2081
  msgid "Loop posts"
2082
  msgstr ""
2083
 
2084
- #: widgets/post-carousel/post-carousel.php:150
2085
  msgid "Automatically return to the first post after the last post."
2086
  msgstr ""
2087
 
2088
- #: widgets/post-carousel/post-carousel.php:156
2089
  msgid "Posts query"
2090
  msgstr ""
2091
 
2092
- #: widgets/post-carousel/post-carousel.php:167
 
 
 
 
2093
  msgid "Thumbnail overlay hover color"
2094
  msgstr ""
2095
 
2096
- #: widgets/post-carousel/post-carousel.php:172
2097
  msgid "Navigation arrow color"
2098
  msgstr ""
2099
 
2100
- #: widgets/post-carousel/post-carousel.php:177
2101
  msgid "Navigation arrow hover color"
2102
  msgstr ""
2103
 
2104
- #: widgets/post-carousel/post-carousel.php:181
2105
  msgid "Navigation background"
2106
  msgstr ""
2107
 
2108
- #: widgets/post-carousel/post-carousel.php:186
2109
  msgid "Navigation hover background"
2110
  msgstr ""
2111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2112
  #: widgets/price-table/price-table.php:4, widgets/price-table/price-table.php:17
2113
  msgid "A powerful yet simple price table widget for your sidebars or Page Builder pages."
2114
  msgstr ""
@@ -2337,27 +2428,31 @@ msgstr ""
2337
  msgid "SiteOrigin Tabs"
2338
  msgstr ""
2339
 
2340
- #: widgets/tabs/tabs.php:51, widgets/tabs/tabs.php:101
 
 
 
 
2341
  msgid "Tabs"
2342
  msgstr ""
2343
 
2344
- #: widgets/tabs/tabs.php:70
2345
  msgid "Initially selected tab"
2346
  msgstr ""
2347
 
2348
- #: widgets/tabs/tabs.php:72
2349
  msgid "The position of the tab to be selected when the page first loads."
2350
  msgstr ""
2351
 
2352
- #: widgets/tabs/tabs.php:81
2353
  msgid "Tabs container"
2354
  msgstr ""
2355
 
2356
- #: widgets/tabs/tabs.php:139
2357
  msgid "Border hover width"
2358
  msgstr ""
2359
 
2360
- #: widgets/tabs/tabs.php:252
2361
  msgid "Get more customization options and the ability to use widgets and layouts as your tabs content with %sSiteOrigin Premium%s"
2362
  msgstr ""
2363
 
@@ -2425,14 +2520,6 @@ msgstr ""
2425
  msgid "Testimonials per row"
2426
  msgstr ""
2427
 
2428
- #: widgets/testimonial/testimonial.php:115
2429
- msgid "Responsive"
2430
- msgstr ""
2431
-
2432
- #: widgets/testimonial/testimonial.php:120
2433
- msgid "Tablet"
2434
- msgstr ""
2435
-
2436
  #: widgets/testimonial/testimonial.php:140, widgets/testimonial/testimonial.php:169
2437
  msgid "Resolution"
2438
  msgstr ""
72
  msgid "Support"
73
  msgstr ""
74
 
75
+ #: base/siteorigin-widget.class.php:512
76
  msgid "Preview"
77
  msgstr ""
78
 
79
+ #: base/siteorigin-widget.class.php:517
80
  msgid "Help"
81
  msgstr ""
82
 
83
+ #: base/siteorigin-widget.class.php:583
84
  msgid "This widget has scripts and styles that need to be loaded before you can use it. Please save and reload your current page."
85
  msgstr ""
86
 
87
+ #: base/siteorigin-widget.class.php:584
88
  msgid "You will only need to do this once."
89
  msgstr ""
90
 
91
+ #: base/siteorigin-widget.class.php:611
92
  msgid "Are you sure?"
93
  msgstr ""
94
 
95
+ #: base/siteorigin-widget.class.php:613
96
  msgid "There is a newer version of this widget's content available."
97
  msgstr ""
98
 
99
+ #: base/siteorigin-widget.class.php:614, base/siteorigin-widget.class.php:618
100
  msgid "Restore"
101
  msgstr ""
102
 
103
+ #: base/siteorigin-widget.class.php:615
104
  msgid "Dismiss"
105
  msgstr ""
106
 
107
+ #: base/siteorigin-widget.class.php:617
108
  msgid "Clicking %s will replace the current widget contents. You can revert by refreshing the page before updating."
109
  msgstr ""
110
 
111
+ #: base/siteorigin-widget.class.php:668, base/inc/actions.php:53
112
  msgid "Widget Preview"
113
  msgstr ""
114
 
284
  msgid "SiteOrigin Accordion"
285
  msgstr ""
286
 
287
+ #: widgets/accordion/accordion.php:48, widgets/tabs/tabs.php:48
288
+ msgid "Scroll top"
289
+ msgstr ""
290
+
291
+ #: widgets/accordion/accordion.php:50
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:118, 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
 
299
+ #: widgets/accordion/accordion.php:75, widgets/accordion/accordion.php:153, widgets/tabs/tabs.php:169
300
  msgid "Panels"
301
  msgstr ""
302
 
303
+ #: widgets/accordion/accordion.php:88, widgets/hero/hero.php:62, widgets/layout-slider/layout-slider.php:56, widgets/tabs/tabs.php:88
304
  msgid "Content"
305
  msgstr ""
306
 
307
+ #: widgets/accordion/accordion.php:94, widgets/editor/editor.php:45
308
  msgid "Automatically add paragraphs"
309
  msgstr ""
310
 
311
+ #: widgets/accordion/accordion.php:98
312
  msgid "Initial state"
313
  msgstr ""
314
 
315
+ #: widgets/accordion/accordion.php:99
316
  msgid "Whether this panel should be open or closed when the page first loads."
317
  msgstr ""
318
 
319
+ #: widgets/accordion/accordion.php:101
320
  msgid "Open"
321
  msgstr ""
322
 
323
+ #: widgets/accordion/accordion.php:102
324
  msgid "Closed"
325
  msgstr ""
326
 
327
+ #: widgets/accordion/accordion.php:110, widgets/contact/contact.php:326, widgets/cta/cta.php:74, widgets/post-carousel/post-carousel.php:165, widgets/tabs/tabs.php:100, widgets/testimonial/testimonial.php:184
328
  msgid "Design"
329
  msgstr ""
330
 
331
+ #: widgets/accordion/accordion.php:115
332
  msgid "Headings"
333
  msgstr ""
334
 
335
+ #: widgets/accordion/accordion.php:120, widgets/accordion/accordion.php:158, widgets/contact/contact.php:336, widgets/contact/contact.php:574, widgets/cta/cta.php:78, widgets/hero/hero.php:122, widgets/layout-slider/layout-slider.php:90, widgets/social-media-buttons/social-media-buttons.php:86, widgets/tabs/tabs.php:110, widgets/tabs/tabs.php:130, widgets/tabs/tabs.php:174
336
  msgid "Background color"
337
  msgstr ""
338
 
339
+ #: widgets/accordion/accordion.php:125, widgets/tabs/tabs.php:134
340
  msgid "Background hover color"
341
  msgstr ""
342
 
343
+ #: widgets/accordion/accordion.php:130, widgets/cta/cta.php:91, widgets/tabs/tabs.php:139
344
  msgid "Title color"
345
  msgstr ""
346
 
347
+ #: widgets/accordion/accordion.php:135, widgets/tabs/tabs.php:144
348
  msgid "Title hover color"
349
  msgstr ""
350
 
351
+ #: widgets/accordion/accordion.php:139, widgets/accordion/accordion.php:167, widgets/contact/contact.php:346, widgets/contact/contact.php:468, widgets/contact/contact.php:584, widgets/cta/cta.php:82, widgets/tabs/tabs.php:115, widgets/tabs/tabs.php:149, widgets/tabs/tabs.php:183
352
  msgid "Border color"
353
  msgstr ""
354
 
355
+ #: widgets/accordion/accordion.php:143, widgets/tabs/tabs.php:154
356
  msgid "Border hover color"
357
  msgstr ""
358
 
359
+ #: widgets/accordion/accordion.php:147, widgets/accordion/accordion.php:171, widgets/contact/contact.php:351, widgets/contact/contact.php:473, widgets/contact/contact.php:600, widgets/tabs/tabs.php:119, widgets/tabs/tabs.php:159, widgets/tabs/tabs.php:187
360
  msgid "Border width"
361
  msgstr ""
362
 
363
+ #: widgets/accordion/accordion.php:163, widgets/tabs/tabs.php:179
364
  msgid "Font color"
365
  msgstr ""
366
 
367
+ #: widgets/accordion/accordion.php:175
368
  msgid "Bottom margin"
369
  msgstr ""
370
 
371
+ #: widgets/accordion/accordion.php:267
372
  msgid "Get more customization options and the ability to use widgets and layouts as your accordion content with %sSiteOrigin Premium%s"
373
  msgstr ""
374
 
392
  msgid "Open in a new window"
393
  msgstr ""
394
 
395
+ #: widgets/button/button.php:63
396
+ msgid "Download"
397
+ msgstr ""
398
+
399
+ #: widgets/button/button.php:64
400
+ msgid "The button destination URL will be downloaded when a user clicks on the button."
401
+ msgstr ""
402
+
403
+ #: widgets/button/button.php:69, widgets/button/button.php:73, widgets/features/features.php:78, widgets/icon/icon.php:31, widgets/price-table/price-table.php:119
404
  msgid "Icon"
405
  msgstr ""
406
 
407
+ #: widgets/button/button.php:78, widgets/features/features.php:88, widgets/price-table/price-table.php:123, widgets/social-media-buttons/social-media-buttons.php:82
408
  msgid "Icon color"
409
  msgstr ""
410
 
411
+ #: widgets/button/button.php:83
412
  msgid "Image icon"
413
  msgstr ""
414
 
415
+ #: widgets/button/button.php:84
416
  msgid "Replaces the icon with your own image icon."
417
  msgstr ""
418
 
419
+ #: widgets/button/button.php:89
420
  msgid "Icon Placement"
421
  msgstr ""
422
 
423
+ #: widgets/button/button.php:92, widgets/features/features.php:66
424
  msgid "Top"
425
  msgstr ""
426
 
427
+ #: widgets/button/button.php:93, widgets/button/button.php:119, widgets/contact/contact.php:401, widgets/contact/contact.php:416, widgets/contact/contact.php:645, 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:49, widgets/image/image.php:61, 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
428
  msgid "Right"
429
  msgstr ""
430
 
431
+ #: widgets/button/button.php:94, widgets/features/features.php:68
432
  msgid "Bottom"
433
  msgstr ""
434
 
435
+ #: widgets/button/button.php:95, widgets/button/button.php:118, widgets/contact/contact.php:400, widgets/contact/contact.php:415, widgets/contact/contact.php:644, 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:48, widgets/image/image.php:60, 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
436
  msgid "Left"
437
  msgstr ""
438
 
439
+ #: widgets/button/button.php:103, widgets/social-media-buttons/social-media-buttons.php:92
440
  msgid "Design and layout"
441
  msgstr ""
442
 
443
+ #: widgets/button/button.php:109, widgets/contact/contact.php:407, widgets/contact/contact.php:637, widgets/contact/contact.php:688, widgets/google-map/google-map.php:94
444
  msgid "Width"
445
  msgstr ""
446
 
447
+ #: widgets/button/button.php:110
448
  msgid "Leave blank to let the button resize according to content."
449
  msgstr ""
450
 
451
+ #: widgets/button/button.php:115, widgets/contact/contact.php:412, widgets/contact/contact.php:641, widgets/social-media-buttons/social-media-buttons.php:149
452
  msgid "Align"
453
  msgstr ""
454
 
455
+ #: widgets/button/button.php:120, widgets/contact/contact.php:417, widgets/contact/contact.php:646, widgets/headline/headline.php:90, widgets/headline/headline.php:161, widgets/headline/headline.php:216, widgets/icon/icon.php:48, widgets/image/image.php:50, widgets/image/image.php:62, widgets/social-media-buttons/social-media-buttons.php:154, widgets/social-media-buttons/social-media-buttons.php:165
456
  msgid "Center"
457
  msgstr ""
458
 
459
+ #: widgets/button/button.php:121, widgets/contact/contact.php:418, widgets/headline/headline.php:93, widgets/headline/headline.php:164, widgets/social-media-buttons/social-media-buttons.php:155, widgets/social-media-buttons/social-media-buttons.php:166
460
  msgid "Justify"
461
  msgstr ""
462
 
463
+ #: widgets/button/button.php:127, widgets/social-media-buttons/social-media-buttons.php:102
464
  msgid "Button theme"
465
  msgstr ""
466
 
467
+ #: widgets/button/button.php:130, widgets/price-table/price-table.php:134, widgets/social-media-buttons/social-media-buttons.php:105
468
  msgid "Atom"
469
  msgstr ""
470
 
471
+ #: widgets/button/button.php:131, widgets/social-media-buttons/social-media-buttons.php:106
472
  msgid "Flat"
473
  msgstr ""
474
 
475
+ #: widgets/button/button.php:132, widgets/social-media-buttons/social-media-buttons.php:107
476
  msgid "Wire"
477
  msgstr ""
478
 
479
+ #: widgets/button/button.php:139, widgets/price-table/price-table.php:150
480
  msgid "Button color"
481
  msgstr ""
482
 
483
+ #: widgets/button/button.php:144, widgets/contact/contact.php:439, widgets/contact/contact.php:612, widgets/hero/hero.php:261, widgets/layout-slider/layout-slider.php:206, widgets/testimonial/testimonial.php:227
484
  msgid "Text color"
485
  msgstr ""
486
 
487
+ #: widgets/button/button.php:150, widgets/social-media-buttons/social-media-buttons.php:112
488
  msgid "Use hover effects"
489
  msgstr ""
490
 
491
+ #: widgets/button/button.php:162
492
  msgid "Hover background color"
493
  msgstr ""
494
 
495
+ #: widgets/button/button.php:171
496
  msgid "Hover text color"
497
  msgstr ""
498
 
499
+ #: widgets/button/button.php:181, widgets/contact/contact.php:380, widgets/contact/contact.php:430, widgets/features/features.php:141, widgets/features/features.php:162, widgets/features/features.php:183, widgets/headline/headline.php:78, widgets/headline/headline.php:149
500
  msgid "Font"
501
  msgstr ""
502
 
503
+ #: widgets/button/button.php:187, widgets/contact/contact.php:385, widgets/contact/contact.php:435, widgets/contact/contact.php:617
504
  msgid "Font size"
505
  msgstr ""
506
 
507
+ #: widgets/button/button.php:189, widgets/contact/contact.php:289, widgets/contact/contact.php:523, widgets/contact/contact.php:625, widgets/social-media-buttons/social-media-buttons.php:119
508
  msgid "Normal"
509
  msgstr ""
510
 
511
+ #: widgets/button/button.php:190, widgets/button/button.php:214, widgets/social-media-buttons/social-media-buttons.php:120, widgets/social-media-buttons/social-media-buttons.php:142, widgets/social-media-buttons/social-media-buttons.php:175, base/inc/widgets/base-slider.class.php:106
512
  msgid "Medium"
513
  msgstr ""
514
 
515
+ #: widgets/button/button.php:191, widgets/social-media-buttons/social-media-buttons.php:121
516
  msgid "Large"
517
  msgstr ""
518
 
519
+ #: widgets/button/button.php:192, widgets/social-media-buttons/social-media-buttons.php:122
520
  msgid "Extra large"
521
  msgstr ""
522
 
523
+ #: widgets/button/button.php:198, widgets/social-media-buttons/social-media-buttons.php:127
524
  msgid "Rounding"
525
  msgstr ""
526
 
527
+ #: widgets/button/button.php:201, widgets/contact/contact.php:359, widgets/contact/contact.php:481, widgets/contact/contact.php:592, widgets/contact/contact.php:677, widgets/google-map/google-map.php:158, widgets/headline/headline.php:188, widgets/social-media-buttons/social-media-buttons.php:130
528
  msgid "None"
529
  msgstr ""
530
 
531
+ #: widgets/button/button.php:202, widgets/social-media-buttons/social-media-buttons.php:131
532
  msgid "Slightly rounded"
533
  msgstr ""
534
 
535
+ #: widgets/button/button.php:203, widgets/social-media-buttons/social-media-buttons.php:132
536
  msgid "Very rounded"
537
  msgstr ""
538
 
539
+ #: widgets/button/button.php:204, widgets/social-media-buttons/social-media-buttons.php:133
540
  msgid "Completely rounded"
541
  msgstr ""
542
 
543
+ #: widgets/button/button.php:210, widgets/contact/contact.php:341, widgets/contact/contact.php:447, widgets/contact/contact.php:632, widgets/social-media-buttons/social-media-buttons.php:138, widgets/testimonial/testimonial.php:235
544
  msgid "Padding"
545
  msgstr ""
546
 
547
+ #: widgets/button/button.php:213, widgets/social-media-buttons/social-media-buttons.php:141, widgets/social-media-buttons/social-media-buttons.php:174
548
  msgid "Low"
549
  msgstr ""
550
 
551
+ #: widgets/button/button.php:215, widgets/social-media-buttons/social-media-buttons.php:143, widgets/social-media-buttons/social-media-buttons.php:176
552
  msgid "High"
553
  msgstr ""
554
 
555
+ #: widgets/button/button.php:216, widgets/social-media-buttons/social-media-buttons.php:144, widgets/social-media-buttons/social-media-buttons.php:177
556
  msgid "Very high"
557
  msgstr ""
558
 
559
+ #: widgets/button/button.php:225
560
  msgid "Other attributes and SEO"
561
  msgstr ""
562
 
563
+ #: widgets/button/button.php:230, widgets/contact/contact.php:97
564
  msgid "Button ID"
565
  msgstr ""
566
 
567
+ #: widgets/button/button.php:231
568
  msgid "An ID attribute allows you to target this button in Javascript."
569
  msgstr ""
570
 
571
+ #: widgets/button/button.php:236
572
  msgid "Button Classes"
573
  msgstr ""
574
 
575
+ #: widgets/button/button.php:237
576
  msgid "Additional CSS classes added to the button link."
577
  msgstr ""
578
 
579
+ #: widgets/button/button.php:242
580
  msgid "Title attribute"
581
  msgstr ""
582
 
583
+ #: widgets/button/button.php:243
584
  msgid "Adds a title attribute to the button link."
585
  msgstr ""
586
 
587
+ #: widgets/button/button.php:248, widgets/contact/contact.php:102
588
  msgid "Onclick"
589
  msgstr ""
590
 
591
+ #: widgets/button/button.php:249
592
  msgid "Run this Javascript when the button is clicked. Ideal for tracking."
593
  msgstr ""
594
 
595
+ #: widgets/button/button.php:254
596
  msgid "Rel attribute"
597
  msgstr ""
598
 
599
+ #: widgets/button/button.php:255
600
  msgid "Adds a rel attribute to the button link."
601
  msgstr ""
602
 
760
  msgid "Required Field"
761
  msgstr ""
762
 
763
+ #: widgets/contact/contact.php:182, widgets/contact/contact.php:1062
764
  msgid "Required field"
765
  msgstr ""
766
 
932
  msgid "Inside"
933
  msgstr ""
934
 
 
 
 
 
 
 
 
 
935
  #: widgets/contact/contact.php:443, widgets/social-media-buttons/social-media-buttons.php:171
936
  msgid "Margin"
937
  msgstr ""
945
  msgstr ""
946
 
947
  #: widgets/contact/contact.php:460
948
+ msgid "Text area height"
949
  msgstr ""
950
 
951
  #: widgets/contact/contact.php:464, widgets/hero/hero.php:89, widgets/layout-slider/layout-slider.php:61
1080
  msgid "This setting controls when the field max width will be disabled. The default value is 780px"
1081
  msgstr ""
1082
 
1083
+ #: widgets/contact/contact.php:1074
1084
  msgid "Invalid email address."
1085
  msgstr ""
1086
 
1087
+ #: widgets/contact/contact.php:1099
1088
  msgid "Invalid phone number. It should contain at least three digits."
1089
  msgstr ""
1090
 
1091
+ #: widgets/contact/contact.php:1168
1092
  msgid "Error sending email, please try again later."
1093
  msgstr ""
1094
 
1095
+ #: widgets/contact/contact.php:1194
1096
  msgid "A valid email is required"
1097
  msgstr ""
1098
 
1099
+ #: widgets/contact/contact.php:1196
1100
  msgid "The email address is invalid"
1101
  msgstr ""
1102
 
1103
+ #: widgets/contact/contact.php:1200
1104
  msgid "Missing subject"
1105
  msgstr ""
1106
 
1107
+ #: widgets/contact/contact.php:1234
1108
  msgid "Error validating your Captcha response."
1109
  msgstr ""
1110
 
1111
+ #: widgets/contact/contact.php:1266
1112
  msgid "Unfortunately our system identified your message as spam."
1113
  msgstr ""
1114
 
1115
+ #: widgets/contact/contact.php:1274
1116
  msgctxt "The name of who sent this email"
1117
  msgid "From"
1118
  msgstr ""
1678
  msgstr ""
1679
 
1680
  #: widgets/google-map/google-map.php:471
1681
+ msgid "Require consent before loading Maps API"
1682
+ msgstr ""
1683
+
1684
+ #: widgets/google-map/google-map.php:472
1685
+ msgid "Consent is required for the Google Maps widget to comply with regulations like DSGVO, or GDPR."
1686
+ msgstr ""
1687
+
1688
+ #: widgets/google-map/google-map.php:478
1689
+ msgid "Consent button text"
1690
+ msgstr ""
1691
+
1692
+ #: widgets/google-map/google-map.php:479
1693
+ msgid "Load map"
1694
+ msgstr ""
1695
+
1696
+ #: widgets/google-map/google-map.php:484
1697
+ msgid "Consent prompt text"
1698
+ msgstr ""
1699
+
1700
+ #: widgets/google-map/google-map.php:485
1701
+ msgid "This is text is displayed when a user is prompted to consent to load the Google Maps API."
1702
+ msgstr ""
1703
+
1704
+ #: widgets/google-map/google-map.php:486
1705
+ msgid ""
1706
+ "By loading, you agree to Google's privacy policy.\n"
1707
+ "\n"
1708
+ " <a href='https://policies.google.com/privacy?hl=en&amp;gl=en' target='_blank' rel='noopener noreferrer'>Read more</a>"
1709
+ msgstr ""
1710
+
1711
+ #: widgets/google-map/google-map.php:493
1712
  msgid "Responsive breakpoint"
1713
  msgstr ""
1714
 
1715
+ #: widgets/google-map/google-map.php:495
1716
  msgid "This setting controls when the map will use the mobile zoom. This breakpoint will only be used if a mobile zoom is set in the SiteOrigin Google Maps settings. The default value is 780px"
1717
  msgstr ""
1718
 
1719
+ #: widgets/google-map/google-map.php:634
1720
  msgid "There were no results for the place you entered. Please try another."
1721
  msgstr ""
1722
 
1723
+ #: widgets/google-map/google-map.php:655
1724
  msgid "Custom Map"
1725
  msgstr ""
1726
 
1727
+ #: widgets/google-map/google-map.php:887
1728
  msgid "Get a curated list of predefined map styles with %sSiteOrigin Premium%s"
1729
  msgstr ""
1730
 
1752
  msgid "Hover Color"
1753
  msgstr ""
1754
 
1755
+ #: widgets/headline/headline.php:83, widgets/headline/headline.php:154
1756
+ msgid "Font Size"
1757
+ msgstr ""
1758
+
1759
  #: widgets/headline/headline.php:87, widgets/headline/headline.php:158, widgets/headline/headline.php:213, widgets/icon/icon.php:46
1760
  msgid "Alignment"
1761
  msgstr ""
1924
  msgid "FitText compressor strength"
1925
  msgstr ""
1926
 
1927
+ #: widgets/hero/hero.php:253, widgets/layout-slider/layout-slider.php:188
1928
  msgid "Heading shadow intensity"
1929
  msgstr ""
1930
 
1931
+ #: widgets/hero/hero.php:266, widgets/layout-slider/layout-slider.php:198
1932
  msgid "Text size"
1933
  msgstr ""
1934
 
1935
+ #: widgets/hero/hero.php:271
1936
  msgid "Text font"
1937
  msgstr ""
1938
 
1939
+ #: widgets/hero/hero.php:276
1940
  msgid "Text shadow intensity"
1941
  msgstr ""
1942
 
1943
+ #: widgets/hero/hero.php:285
1944
  msgid "Link color"
1945
  msgstr ""
1946
 
1947
+ #: widgets/hero/hero.php:290
1948
  msgid "Link hover color"
1949
  msgstr ""
1950
 
2088
  msgid "SiteOrigin Post Carousel"
2089
  msgstr ""
2090
 
2091
+ #: widgets/post-carousel/post-carousel.php:124
2092
  msgid "Default Thumbnail"
2093
  msgstr ""
2094
 
2095
+ #: widgets/post-carousel/post-carousel.php:125
2096
  msgid "Choose Thumbnail"
2097
  msgstr ""
2098
 
2099
+ #: widgets/post-carousel/post-carousel.php:126
2100
  msgid "Set Thumbnail"
2101
  msgstr ""
2102
 
2103
+ #: widgets/post-carousel/post-carousel.php:132
2104
  msgid "Featured Image size"
2105
  msgstr ""
2106
 
2107
+ #: widgets/post-carousel/post-carousel.php:138
2108
  msgid "Link target"
2109
  msgstr ""
2110
 
2111
+ #: widgets/post-carousel/post-carousel.php:139
2112
  msgid "Choose where to open each carousel item."
2113
  msgstr ""
2114
 
2115
+ #: widgets/post-carousel/post-carousel.php:141
2116
  msgid "Same window "
2117
  msgstr ""
2118
 
2119
+ #: widgets/post-carousel/post-carousel.php:142
2120
  msgid "New window "
2121
  msgstr ""
2122
 
2123
+ #: widgets/post-carousel/post-carousel.php:147
2124
  msgid "Loop posts"
2125
  msgstr ""
2126
 
2127
+ #: widgets/post-carousel/post-carousel.php:148
2128
  msgid "Automatically return to the first post after the last post."
2129
  msgstr ""
2130
 
2131
+ #: widgets/post-carousel/post-carousel.php:154
2132
  msgid "Posts query"
2133
  msgstr ""
2134
 
2135
+ #: widgets/post-carousel/post-carousel.php:158
2136
+ msgid "Posts per load"
2137
+ msgstr ""
2138
+
2139
+ #: widgets/post-carousel/post-carousel.php:170
2140
  msgid "Thumbnail overlay hover color"
2141
  msgstr ""
2142
 
2143
+ #: widgets/post-carousel/post-carousel.php:175
2144
  msgid "Navigation arrow color"
2145
  msgstr ""
2146
 
2147
+ #: widgets/post-carousel/post-carousel.php:180
2148
  msgid "Navigation arrow hover color"
2149
  msgstr ""
2150
 
2151
+ #: widgets/post-carousel/post-carousel.php:184
2152
  msgid "Navigation background"
2153
  msgstr ""
2154
 
2155
+ #: widgets/post-carousel/post-carousel.php:189
2156
  msgid "Navigation hover background"
2157
  msgstr ""
2158
 
2159
+ #: widgets/post-carousel/post-carousel.php:196, widgets/testimonial/testimonial.php:115
2160
+ msgid "Responsive"
2161
+ msgstr ""
2162
+
2163
+ #: widgets/post-carousel/post-carousel.php:201
2164
+ msgid "Desktop"
2165
+ msgstr ""
2166
+
2167
+ #: widgets/post-carousel/post-carousel.php:206, widgets/post-carousel/post-carousel.php:229, widgets/post-carousel/post-carousel.php:247, widgets/post-carousel/post-carousel.php:267
2168
+ msgid "Slides to scroll"
2169
+ msgstr ""
2170
+
2171
+ #: widgets/post-carousel/post-carousel.php:207
2172
+ msgid "Set the number of slides to scroll per navigation click or swipe on desktop."
2173
+ msgstr ""
2174
+
2175
+ #: widgets/post-carousel/post-carousel.php:214, widgets/testimonial/testimonial.php:120
2176
+ msgid "Tablet"
2177
+ msgstr ""
2178
+
2179
+ #: widgets/post-carousel/post-carousel.php:219
2180
+ msgid "Landscape"
2181
+ msgstr ""
2182
+
2183
+ #: widgets/post-carousel/post-carousel.php:224, widgets/post-carousel/post-carousel.php:242, widgets/post-carousel/post-carousel.php:262
2184
+ msgid "Breakpoint"
2185
+ msgstr ""
2186
+
2187
+ #: widgets/post-carousel/post-carousel.php:230, widgets/post-carousel/post-carousel.php:248
2188
+ msgid "Set the number of slides to scroll per navigation click or swipe on tablet devices."
2189
+ msgstr ""
2190
+
2191
+ #: widgets/post-carousel/post-carousel.php:237
2192
+ msgid "Portrait"
2193
+ msgstr ""
2194
+
2195
+ #: widgets/post-carousel/post-carousel.php:257
2196
+ msgid "Mobile"
2197
+ msgstr ""
2198
+
2199
+ #: widgets/post-carousel/post-carousel.php:268
2200
+ msgid " Set the number of slides to scroll per navigation click or swipe on mobile devices."
2201
+ msgstr ""
2202
+
2203
  #: widgets/price-table/price-table.php:4, widgets/price-table/price-table.php:17
2204
  msgid "A powerful yet simple price table widget for your sidebars or Page Builder pages."
2205
  msgstr ""
2428
  msgid "SiteOrigin Tabs"
2429
  msgstr ""
2430
 
2431
+ #: widgets/tabs/tabs.php:50
2432
+ msgid "When opening a tab, scroll the user to the top of the tab."
2433
+ msgstr ""
2434
+
2435
+ #: widgets/tabs/tabs.php:75, widgets/tabs/tabs.php:125
2436
  msgid "Tabs"
2437
  msgstr ""
2438
 
2439
+ #: widgets/tabs/tabs.php:94
2440
  msgid "Initially selected tab"
2441
  msgstr ""
2442
 
2443
+ #: widgets/tabs/tabs.php:96
2444
  msgid "The position of the tab to be selected when the page first loads."
2445
  msgstr ""
2446
 
2447
+ #: widgets/tabs/tabs.php:105
2448
  msgid "Tabs container"
2449
  msgstr ""
2450
 
2451
+ #: widgets/tabs/tabs.php:163
2452
  msgid "Border hover width"
2453
  msgstr ""
2454
 
2455
+ #: widgets/tabs/tabs.php:276
2456
  msgid "Get more customization options and the ability to use widgets and layouts as your tabs content with %sSiteOrigin Premium%s"
2457
  msgstr ""
2458
 
2520
  msgid "Testimonials per row"
2521
  msgstr ""
2522
 
 
 
 
 
 
 
 
 
2523
  #: widgets/testimonial/testimonial.php:140, widgets/testimonial/testimonial.php:169
2524
  msgid "Resolution"
2525
  msgstr ""
readme.txt CHANGED
@@ -3,8 +3,8 @@ Tags: bundle, widget, button, slider, image, carousel, price table, google maps,
3
  Requires at least: 4.2
4
  Tested up to: 5.5
5
  Requires PHP: 5.6.20
6
- Stable tag: 1.17.8
7
- Build time: 2020-09-28T19:07:57+02:00
8
  License: GPLv3 or later
9
  Contributors: gpriday, braam-genis
10
  Donate link: https://siteorigin.com/downloads/premium/
@@ -66,6 +66,19 @@ The SiteOrigin Widgets Bundle is the perfect platform to build widgets for your
66
 
67
  == Changelog ==
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  == 1.17.8 - 28 September 2020 ==
70
  * Image: Prevent image stretching while using Safari
71
 
3
  Requires at least: 4.2
4
  Tested up to: 5.5
5
  Requires PHP: 5.6.20
6
+ Stable tag: 1.17.9
7
+ Build time: 2020-11-12T17:30:01+02:00
8
  License: GPLv3 or later
9
  Contributors: gpriday, braam-genis
10
  Donate link: https://siteorigin.com/downloads/premium/
66
 
67
  == Changelog ==
68
 
69
+ == 1.17.9 - 12 November 2020 ==
70
+ * Block Editor: Resolved widget preview issue.
71
+ * Elementor: Minor admin styling improvements.
72
+ * Google Maps: Added a new global consent setting `Require consent before loading Maps API` at `Plugins > SiteOrigin Widgets > Google Maps`.
73
+ * Posts Carousel: Added a `Link target` setting.
74
+ * Video Player: Mute self hosted videos set to autoplay.
75
+ * Tabs: Added a new global setting `Scroll top` at `Plugins > SiteOrigin Widgets > Tabs` to disable scrolling when changing tabs.
76
+ * Accordion: Added a new global setting `Scroll top` at `Plugins > SiteOrigin Widgets > Accordion` to disable scrolling when changing accordions.
77
+ * Posts Carousel: Added a new `Slides to scroll` setting for desktop, tablet, and mobile.
78
+ * Safari: Ensured the Hero can save when used at `Appearance > Widgets`.
79
+ * Updated the widget title field to allow HTML in all SiteOrigin widgets.
80
+ * Changed to `enqueue` Google Fonts rather than `@import`.
81
+
82
  == 1.17.8 - 28 September 2020 ==
83
  * Image: Prevent image stretching while using Safari
84
 
so-widgets-bundle.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: SiteOrigin Widgets Bundle
4
  Description: A collection of all widgets, neatly bundled into a single plugin. It's also a framework to code your own widgets on top of.
5
- Version: 1.17.8
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
@@ -12,7 +12,7 @@ License: GPL3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
- define('SOW_BUNDLE_VERSION', '1.17.8');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
@@ -418,7 +418,7 @@ class SiteOrigin_Widgets_Bundle {
418
  wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 400 );
419
  }
420
 
421
- $form_values = array_shift( array_shift( array_values( $_POST ) ) );
422
  $widget_object->save_global_settings( $form_values );
423
 
424
  wp_send_json_success();
2
  /*
3
  Plugin Name: SiteOrigin Widgets Bundle
4
  Description: A collection of all widgets, neatly bundled into a single plugin. It's also a framework to code your own widgets on top of.
5
+ Version: 1.17.9
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
+ define('SOW_BUNDLE_VERSION', '1.17.9');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
418
  wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 400 );
419
  }
420
 
421
+ $form_values = stripslashes_deep( array_shift( array_shift( array_values( $_POST ) ) ) );
422
  $widget_object->save_global_settings( $form_values );
423
 
424
  wp_send_json_success();
widgets/accordion/accordion.php CHANGED
@@ -37,8 +37,32 @@ class SiteOrigin_Widget_Accordion_Widget extends SiteOrigin_Widget {
37
  )
38
  )
39
  );
 
 
40
  }
41
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  function get_widget_form() {
43
 
44
  return array(
37
  )
38
  )
39
  );
40
+
41
+ add_action( 'siteorigin_widgets_enqueue_frontend_scripts_sow-accordion', array( $this, 'enqueue_widget_scripts' ) );
42
  }
43
+
44
+ function get_settings_form() {
45
+ return array(
46
+ 'scrollto_after_change' => array(
47
+ 'type' => 'checkbox',
48
+ 'label' => __( 'Scroll top', 'so-widgets-bundle' ),
49
+ 'default' => true,
50
+ 'description' => __( 'When opening the panel, scroll the user to the top of the panel.', 'so-widgets-bundle' ),
51
+ )
52
+ );
53
+ }
54
+
55
+ function enqueue_widget_scripts() {
56
+ $global_settings = $this->get_global_settings();
57
+ wp_localize_script(
58
+ 'sow-accordion',
59
+ 'sowAccordion',
60
+ array(
61
+ 'scrollto_after_change' => ! empty( $global_settings['scrollto_after_change'] ),
62
+ )
63
+ );
64
+ }
65
+
66
  function get_widget_form() {
67
 
68
  return array(
widgets/accordion/js/accordion.js CHANGED
@@ -42,7 +42,14 @@ jQuery( function ( $ ) {
42
  $( sowb ).trigger( 'setup_widgets' );
43
  },
44
  complete: function() {
45
- if ( keepVisible && $panel.offset().top < window.scrollY ) {
 
 
 
 
 
 
 
46
  scrollToPanel( $panel, true );
47
  }
48
  $( this ).trigger( 'show' );
42
  $( sowb ).trigger( 'setup_widgets' );
43
  },
44
  complete: function() {
45
+ if (
46
+ keepVisible &&
47
+ sowAccordion.scrollto_after_change &&
48
+ (
49
+ $panel.offset().top < window.scrollY ||
50
+ $panel.offset().top + $panel.height() > window.scrollY
51
+ )
52
+ ) {
53
  scrollToPanel( $panel, true );
54
  }
55
  $( this ).trigger( 'show' );
widgets/accordion/js/accordion.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery((function(o){sowb.setupAccordion=function(){o(".sow-accordion").each((function(n,e){var a=o(this).closest(".so-widget-sow-accordion");if(a.data("initialized"))return o(this);var i=o(e).find("> .sow-accordion-panel");i.not(".sow-accordion-panel-open").children(".sow-accordion-panel-content").hide();var t=i.filter(".sow-accordion-panel-open").toArray(),c=function(){},r=function(n,e){var a=n.offset().top-90;e?o("body,html").animate({scrollTop:a},200):window.scrollTo(0,a)},s=function(n,e,a){var i=o(n);if(!i.is(".sow-accordion-panel-open")){i.find("> .sow-accordion-panel-content").slideDown({start:function(){o(window).trigger("resize"),o(sowb).trigger("setup_widgets")},complete:function(){a&&i.offset().top<window.scrollY&&r(i,!0),o(this).trigger("show")}}),i.find("> .sow-accordion-panel-header-container > .sow-accordion-panel-header").attr("aria-expanded",!0),i.addClass("sow-accordion-panel-open"),t.push(n);var d=o(n).parents(".sow-accordion-panel");d.length&&!d.hasClass("sow-accordion-panel-open")&&s(d.get(0),!0),e||c()}},d=function(n,e){var a=o(n);a.is(".sow-accordion-panel-open")&&(a.find("> .sow-accordion-panel-content").slideUp((function(){o(this).trigger("hide")})),a.find("> .sow-accordion-panel-header-container > .sow-accordion-panel-header").attr("aria-expanded",!1),a.removeClass("sow-accordion-panel-open"),t.splice(t.indexOf(n),1),e||c())};if(i.find("> .sow-accordion-panel-header-container > .sow-accordion-panel-header").on("click keydown",(function(n){if("keydown"==n.type){if(13!==n.keyCode&&32!==n.keyCode)return;n.preventDefault()}var e=o(this),i=a.data("maxOpenPanels"),c=e.closest(".sow-accordion-panel");if(c.is(".sow-accordion-panel-open")?d(c.get(0)):s(c.get(0),!1,!0),!isNaN(i)&&i>0&&t.length>i){var r=0;o.each(t.reverse(),(function(o,n){r!==i?r++:d(t[o])}))}})),a.data("useAnchorTags")){var l;c=function(){l&&clearTimeout(l),l=setTimeout((function(){for(var n=[],e=o(".sow-accordion-panel-open").toArray(),a=0;a<e.length;a++){var i=o(e[a]).data("anchor");if(i){var t=o(e[a]).parents(".sow-accordion-panel");(!t.length||t.length&&t.hasClass("sow-accordion-panel-open"))&&(n[a]=i)}}n&&n.length?window.location.hash=n.join(","):window.location.hash&&window.history.pushState("",document.title,window.location.pathname+window.location.search)}),100)};var w=function(){for(var n=i.toArray(),e=0;e<n.length;e++){var a=n[e],t=o(a).data("anchor");window.location.hash.substring(1).split(",").some((function(o){return decodeURI(t)===decodeURI(o)}))?s(a,!0):d(a,!0)}};o(window).on("hashchange",w),window.location.hash?w():c();var p=a.data("initialScrollPanel");if(window.location.hash&&t.length)setTimeout((function(){r(o(t[0]))}),500);else if(p>0){var h=p>i.length?i.last():i.eq(p-1);setTimeout((function(){r(h)}),500)}}a.data("initialized",!0)}))},sowb.setupAccordion(),o(sowb).on("setup_widgets",sowb.setupAccordion)})),window.sowb=sowb;
1
+ var sowb=window.sowb||{};jQuery((function(o){sowb.setupAccordion=function(){o(".sow-accordion").each((function(n,e){var a=o(this).closest(".so-widget-sow-accordion");if(a.data("initialized"))return o(this);var i=o(e).find("> .sow-accordion-panel");i.not(".sow-accordion-panel-open").children(".sow-accordion-panel-content").hide();var t=i.filter(".sow-accordion-panel-open").toArray(),c=function(){},r=function(n,e){var a=n.offset().top-90;e?o("body,html").animate({scrollTop:a},200):window.scrollTo(0,a)},s=function(n,e,a){var i=o(n);if(!i.is(".sow-accordion-panel-open")){i.find("> .sow-accordion-panel-content").slideDown({start:function(){o(window).trigger("resize"),o(sowb).trigger("setup_widgets")},complete:function(){a&&sowAccordion.scrollto_after_change&&(i.offset().top<window.scrollY||i.offset().top+i.height()>window.scrollY)&&r(i,!0),o(this).trigger("show")}}),i.find("> .sow-accordion-panel-header-container > .sow-accordion-panel-header").attr("aria-expanded",!0),i.addClass("sow-accordion-panel-open"),t.push(n);var d=o(n).parents(".sow-accordion-panel");d.length&&!d.hasClass("sow-accordion-panel-open")&&s(d.get(0),!0),e||c()}},d=function(n,e){var a=o(n);a.is(".sow-accordion-panel-open")&&(a.find("> .sow-accordion-panel-content").slideUp((function(){o(this).trigger("hide")})),a.find("> .sow-accordion-panel-header-container > .sow-accordion-panel-header").attr("aria-expanded",!1),a.removeClass("sow-accordion-panel-open"),t.splice(t.indexOf(n),1),e||c())};if(i.find("> .sow-accordion-panel-header-container > .sow-accordion-panel-header").on("click keydown",(function(n){if("keydown"==n.type){if(13!==n.keyCode&&32!==n.keyCode)return;n.preventDefault()}var e=o(this),i=a.data("maxOpenPanels"),c=e.closest(".sow-accordion-panel");if(c.is(".sow-accordion-panel-open")?d(c.get(0)):s(c.get(0),!1,!0),!isNaN(i)&&i>0&&t.length>i){var r=0;o.each(t.reverse(),(function(o,n){r!==i?r++:d(t[o])}))}})),a.data("useAnchorTags")){var l;c=function(){l&&clearTimeout(l),l=setTimeout((function(){for(var n=[],e=o(".sow-accordion-panel-open").toArray(),a=0;a<e.length;a++){var i=o(e[a]).data("anchor");if(i){var t=o(e[a]).parents(".sow-accordion-panel");(!t.length||t.length&&t.hasClass("sow-accordion-panel-open"))&&(n[a]=i)}}n&&n.length?window.location.hash=n.join(","):window.location.hash&&window.history.pushState("",document.title,window.location.pathname+window.location.search)}),100)};var w=function(){for(var n=i.toArray(),e=0;e<n.length;e++){var a=n[e],t=o(a).data("anchor");window.location.hash.substring(1).split(",").some((function(o){return decodeURI(t)===decodeURI(o)}))?s(a,!0):d(a,!0)}};o(window).on("hashchange",w),window.location.hash?w():c();var p=a.data("initialScrollPanel");if(window.location.hash&&t.length)setTimeout((function(){r(o(t[0]))}),500);else if(p>0){var h=p>i.length?i.last():i.eq(p-1);setTimeout((function(){r(h)}),500)}}a.data("initialized",!0)}))},sowb.setupAccordion(),o(sowb).on("setup_widgets",sowb.setupAccordion)})),window.sowb=sowb;
widgets/accordion/styles/default.less CHANGED
@@ -1,7 +1,5 @@
1
  @import "../../../base/less/mixins";
2
 
3
- .widget-function('import_google_font');
4
-
5
  @heading_background_color: default;
6
  @heading_background_hover_color: default;
7
  @title_color: default;
1
  @import "../../../base/less/mixins";
2
 
 
 
3
  @heading_background_color: default;
4
  @heading_background_hover_color: default;
5
  @title_color: default;
widgets/button/button.php CHANGED
@@ -57,6 +57,13 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
57
  'label' => __('Open in a new window', 'so-widgets-bundle'),
58
  ),
59
 
 
 
 
 
 
 
 
60
  'button_icon' => array(
61
  'type' => 'section',
62
  'label' => __('Icon', 'so-widgets-bundle'),
@@ -290,6 +297,10 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
290
  $button_attributes['rel'] = 'noopener noreferrer';
291
  }
292
 
 
 
 
 
293
  if ( ! empty( $attributes['id'] ) ) {
294
  $button_attributes['id'] = $attributes['id'];
295
  }
@@ -360,11 +371,6 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
360
  return $less_vars;
361
  }
362
 
363
- function get_google_font_fields( $instance ) {
364
- return array(
365
- $instance['design']['font'],
366
- );
367
- }
368
  /**
369
  * Make sure the instance is the most up to date version.
370
  *
57
  'label' => __('Open in a new window', 'so-widgets-bundle'),
58
  ),
59
 
60
+ 'download' => array(
61
+ 'type' => 'checkbox',
62
+ 'default' => false,
63
+ 'label' => __( 'Download', 'so-widgets-bundle' ),
64
+ 'description' => __( 'The button destination URL will be downloaded when a user clicks on the button.', 'so-widgets-bundle' ),
65
+ ),
66
+
67
  'button_icon' => array(
68
  'type' => 'section',
69
  'label' => __('Icon', 'so-widgets-bundle'),
297
  $button_attributes['rel'] = 'noopener noreferrer';
298
  }
299
 
300
+ if ( ! empty( $instance['download'] ) ) {
301
+ $button_attributes['download'] = null;
302
+ }
303
+
304
  if ( ! empty( $attributes['id'] ) ) {
305
  $button_attributes['id'] = $attributes['id'];
306
  }
371
  return $less_vars;
372
  }
373
 
 
 
 
 
 
374
  /**
375
  * Make sure the instance is the most up to date version.
376
  *
widgets/button/styles/atom.less CHANGED
@@ -1,7 +1,5 @@
1
  @import "../../../base/less/mixins";
2
 
3
- .widget-function('import_google_font');
4
-
5
  @button_width: '';
6
  @button_color: #41a9d5;
7
  @border_color: darken(@button_color, 15%);
1
  @import "../../../base/less/mixins";
2
 
 
 
3
  @button_width: '';
4
  @button_color: #41a9d5;
5
  @border_color: darken(@button_color, 15%);
widgets/button/styles/flat.less CHANGED
@@ -1,7 +1,5 @@
1
  @import "../../../base/less/mixins";
2
 
3
- .widget-function('import_google_font');
4
-
5
  @button_width: '';
6
  @button_color: #41a9d5;
7
  @border_color: darken(@button_color, 5%);
1
  @import "../../../base/less/mixins";
2
 
 
 
3
  @button_width: '';
4
  @button_color: #41a9d5;
5
  @border_color: darken(@button_color, 5%);
widgets/button/styles/wire.less CHANGED
@@ -1,7 +1,5 @@
1
  @import "../../../base/less/mixins";
2
 
3
- .widget-function('import_google_font');
4
-
5
  @button_width: '';
6
  @button_color: #41a9d5;
7
  @text_color: #FFFFFF;
1
  @import "../../../base/less/mixins";
2
 
 
 
3
  @button_width: '';
4
  @button_color: #41a9d5;
5
  @text_color: #FFFFFF;
widgets/contact/contact.php CHANGED
@@ -432,11 +432,11 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
432
  ),
433
  'font_size' => array(
434
  'type' => 'measurement',
435
- 'label' => __( 'Font Size', 'so-widgets-bundle' )
436
  ),
437
  'color' => array(
438
  'type' => 'color',
439
- 'label' => __( 'Text Color', 'so-widgets-bundle' ),
440
  ),
441
  'margin' => array(
442
  'type' => 'measurement',
@@ -457,7 +457,7 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
457
  ),
458
  'height_textarea' => array(
459
  'type' => 'measurement',
460
- 'label' => __( 'Text Area Height', 'so-widgets-bundle' )
461
  ),
462
  'background' => array(
463
  'type' => 'color',
@@ -892,13 +892,6 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
892
  return $vars;
893
  }
894
 
895
- function get_google_font_fields( $instance ) {
896
- return array(
897
- $instance['design']['labels']['font'],
898
- $instance['design']['fields']['font'],
899
- );
900
- }
901
-
902
  static function name_from_label( $label, & $ids ) {
903
  $it = 0;
904
 
432
  ),
433
  'font_size' => array(
434
  'type' => 'measurement',
435
+ 'label' => __( 'Font size', 'so-widgets-bundle' )
436
  ),
437
  'color' => array(
438
  'type' => 'color',
439
+ 'label' => __( 'Text color', 'so-widgets-bundle' ),
440
  ),
441
  'margin' => array(
442
  'type' => 'measurement',
457
  ),
458
  'height_textarea' => array(
459
  'type' => 'measurement',
460
+ 'label' => __( 'Text area height', 'so-widgets-bundle' )
461
  ),
462
  'background' => array(
463
  'type' => 'color',
892
  return $vars;
893
  }
894
 
 
 
 
 
 
 
 
895
  static function name_from_label( $label, & $ids ) {
896
  $it = 0;
897
 
widgets/contact/styles/default.less CHANGED
@@ -1,7 +1,5 @@
1
  @import "../../../base/less/mixins";
2
 
3
- .widget-function('import_google_font');
4
-
5
  .sow-form-field {
6
  display: block;
7
  margin-bottom: 1em;
1
  @import "../../../base/less/mixins";
2
 
 
 
3
  .sow-form-field {
4
  display: block;
5
  margin-bottom: 1em;
widgets/cta/styles/default.less CHANGED
@@ -1,7 +1,5 @@
1
  @import "../../../base/less/mixins";
2
 
3
- .widget-function('import_google_font');
4
-
5
  @border_color: default;
6
  @background_color: default;
7
  @title_color: default;
1
  @import "../../../base/less/mixins";
2
 
 
 
3
  @border_color: default;
4
  @background_color: default;
5
  @title_color: default;
widgets/editor/tpl/default.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
2
 
3
  <div class="siteorigin-widget-tinymce textwidget">
4
  <?php echo $text ?>
1
+ <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . $instance['title'] . $args['after_title'] ?>
2
 
3
  <div class="siteorigin-widget-tinymce textwidget">
4
  <?php echo $text ?>
widgets/features/features.php CHANGED
@@ -323,17 +323,6 @@ class SiteOrigin_Widget_Features_Widget extends SiteOrigin_Widget {
323
  )
324
  );
325
  }
326
-
327
- function get_google_font_fields( $instance ) {
328
-
329
- $fonts = $instance['fonts'];
330
-
331
- return array(
332
- $fonts['title_options']['font'],
333
- $fonts['text_options']['font'],
334
- $fonts['more_text_options']['font'],
335
- );
336
- }
337
  }
338
 
339
  siteorigin_widget_register('sow-features', __FILE__, 'SiteOrigin_Widget_Features_Widget');
323
  )
324
  );
325
  }
 
 
 
 
 
 
 
 
 
 
 
326
  }
327
 
328
  siteorigin_widget_register('sow-features', __FILE__, 'SiteOrigin_Widget_Features_Widget');
widgets/features/styles/default.less CHANGED
@@ -1,7 +1,5 @@
1
  @import "../../../base/less/mixins";
2
 
3
- .widget-function('import_google_font');
4
-
5
  @title_font: default;
6
  @title_font_weight: 400;
7
  @title_size: default;
1
  @import "../../../base/less/mixins";
2
 
 
 
3
  @title_font: default;
4
  @title_font_weight: 400;
5
  @title_size: default;
widgets/google-map/assets/map-consent-background.jpg ADDED
Binary file
widgets/google-map/google-map.php CHANGED
@@ -466,6 +466,28 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
466
  )
467
  ),
468
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
469
  'responsive_breakpoint' => array(
470
  'type' => 'number',
471
  'label' => __( 'Responsive breakpoint', 'so-widgets-bundle' ),
@@ -480,8 +502,11 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
480
  }
481
 
482
  function get_style_name( $instance ) {
483
- // We aren't using a LESS style for this widget.
484
- return false;
 
 
 
485
  }
486
 
487
  function get_template_variables( $instance, $args ) {
@@ -559,12 +584,25 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
559
 
560
  return array(
561
  'map_id' => md5( json_encode( $instance ) ),
562
- 'height' => $settings['height'],
563
  'map_data' => $map_data,
564
  'fallback_image_data' => array( 'img' => $fallback_image ),
 
 
 
 
565
  );
566
  }
567
  }
 
 
 
 
 
 
 
 
 
 
568
 
569
  private function get_location_string( $location_data ) {
570
  $location = '';
@@ -585,17 +623,13 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
585
  $this->is_preview( $instance ) ) {
586
  wp_enqueue_script( 'sow-google-map' );
587
 
588
- wp_enqueue_style(
589
- 'sow-google-map',
590
- plugin_dir_url(__FILE__) . 'css/style.css',
591
- array(),
592
- SOW_BUNDLE_VERSION
593
- );
594
 
595
  wp_localize_script(
596
  'sow-google-map',
597
  'soWidgetsGoogleMap',
598
  array(
 
599
  'geocode' => array(
600
  'noResults' => __( 'There were no results for the place you entered. Please try another.', 'so-widgets-bundle' ),
601
  ),
466
  )
467
  ),
468
 
469
+ 'map_consent' => array(
470
+ 'type' => 'checkbox',
471
+ 'label' => __( 'Require consent before loading Maps API', 'so-widgets-bundle' ),
472
+ 'description' => __( 'Consent is required for the Google Maps widget to comply with regulations like DSGVO, or GDPR.', 'so-widgets-bundle' ),
473
+ 'default' => false,
474
+ ),
475
+
476
+ 'map_consent_btn_text' => array(
477
+ 'type' => 'text',
478
+ 'label' => __( 'Consent button text', 'so-widgets-bundle' ),
479
+ 'default' => __( 'Load map', 'so-widgets-bundle' ),
480
+ ),
481
+
482
+ 'map_consent_notice' => array(
483
+ 'type' => 'tinymce',
484
+ 'label' => __( 'Consent prompt text', 'so-widgets-bundle' ),
485
+ 'description' => __( 'This is text is displayed when a user is prompted to consent to load the Google Maps API.', 'so-widgets-bundle' ),
486
+ 'default' => __( "By loading, you agree to Google's privacy policy.
487
+
488
+ <a href='https://policies.google.com/privacy?hl=en&amp;gl=en' target='_blank' rel='noopener noreferrer'>Read more</a>", 'so-widgets-bundle' ),
489
+ ),
490
+
491
  'responsive_breakpoint' => array(
492
  'type' => 'number',
493
  'label' => __( 'Responsive breakpoint', 'so-widgets-bundle' ),
502
  }
503
 
504
  function get_style_name( $instance ) {
505
+ if ( $instance['settings']['map_type'] == 'static' ) {
506
+ return false;
507
+ }
508
+
509
+ return 'default';
510
  }
511
 
512
  function get_template_variables( $instance, $args ) {
584
 
585
  return array(
586
  'map_id' => md5( json_encode( $instance ) ),
 
587
  'map_data' => $map_data,
588
  'fallback_image_data' => array( 'img' => $fallback_image ),
589
+ 'map_consent' => ! empty( $global_settings['map_consent'] ),
590
+ 'map_consent_notice' => ! empty( $global_settings['map_consent_notice'] ) ? $global_settings['map_consent_notice'] : '',
591
+ 'map_consent_btn_text' => ! empty( $global_settings['map_consent_btn_text'] ) ? $global_settings['map_consent_btn_text'] : '',
592
+ 'consent_background_image' => plugin_dir_url( __FILE__ ) . 'assets/map-consent-background.jpg',
593
  );
594
  }
595
  }
596
+
597
+ function get_less_variables( $instance ) {
598
+ $global_settings = $this->get_global_settings();
599
+
600
+ return array(
601
+ 'height' => $instance['settings']['height'] . 'px',
602
+ 'map_consent' => ! empty( $global_settings['map_consent'] ),
603
+ 'responsive_breakpoint' => ! empty( $global_settings['responsive_breakpoint'] ) ? $global_settings['responsive_breakpoint'] : '780',
604
+ );
605
+ }
606
 
607
  private function get_location_string( $location_data ) {
608
  $location = '';
623
  $this->is_preview( $instance ) ) {
624
  wp_enqueue_script( 'sow-google-map' );
625
 
626
+ $global_settings = $this->get_global_settings();
 
 
 
 
 
627
 
628
  wp_localize_script(
629
  'sow-google-map',
630
  'soWidgetsGoogleMap',
631
  array(
632
+ 'map_consent' => ! empty( $global_settings['map_consent'] ),
633
  'geocode' => array(
634
  'noResults' => __( 'There were no results for the place you entered. Please try another.', 'so-widgets-bundle' ),
635
  ),
widgets/google-map/styles/default.less ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../base/less/mixins";
2
+
3
+ @height: 480px;
4
+ @map_consent: default;
5
+ @map_consent_notice_text_color: #fff;
6
+ @map_consent_notice_text_background: #000;
7
+ @responsive_breakpoint: 780px;
8
+
9
+ .sow-google-map-canvas {
10
+ height: @height;
11
+
12
+ img {
13
+ border-radius: 0;
14
+ box-shadow: none;
15
+ line-height: normal;
16
+ max-width: none;
17
+ zoom: normal;
18
+ }
19
+ }
20
+
21
+ & when ( @map_consent = 1 ) {
22
+ .sow-google-map-consent {
23
+ align-items: center;
24
+ display: flex;
25
+ min-height: @height;
26
+
27
+ .sow-google-map-consent-prompt {
28
+ background: fade( @map_consent_notice_text_background, 85% );
29
+ color: @map_consent_notice_text_color;
30
+ width: 100%;
31
+ }
32
+
33
+ .sow-google-map-consent-prompt-inner {
34
+ margin: 0 auto;
35
+ max-width: 780px;
36
+ padding: 50px;
37
+ text-align: center;
38
+
39
+ @media (max-width: @responsive_breakpoint) {
40
+ max-width: none;
41
+ padding: 25px;
42
+ }
43
+
44
+ button {
45
+ display: block;
46
+ margin: 10px auto 0;
47
+ }
48
+ }
49
+ }
50
+ }
widgets/google-map/tpl/js-map.php CHANGED
@@ -6,9 +6,20 @@
6
  * @var $fallback_image_data
7
  */
8
  ?>
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  <div class="sow-google-map-canvas"
11
- style="height:<?php echo intval( $height ) ?>px;"
12
- id="map-canvas-<?php echo esc_attr( $map_id ) ?>"
13
- data-options="<?php echo esc_attr( json_encode( $map_data ) ) ?>"
14
- data-fallback-image="<?php echo esc_attr( json_encode( $fallback_image_data ) ); ?>"></div>
6
  * @var $fallback_image_data
7
  */
8
  ?>
9
+ <?php if ( $map_consent ) : ?>
10
+ <div class="sow-google-map-consent" style="<?php echo 'background-image: url(' . sow_esc_url( $consent_background_image ) . ')'; ?>">
11
+ <div class="sow-google-map-consent-prompt">
12
+ <div class="sow-google-map-consent-prompt-inner">
13
+ <?php echo wp_kses_post( $map_consent_notice ); ?>
14
+
15
+ <button class="btn button"><?php echo esc_html( $map_consent_btn_text ); ?></button>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ <?php endif; ?>
20
 
21
  <div class="sow-google-map-canvas"
22
+ style="<?php echo ( $map_consent ) ? 'display: none;' : ''; ?>"
23
+ id="map-canvas-<?php echo esc_attr( $map_id ) ?>"
24
+ data-options="<?php echo esc_attr( json_encode( $map_data ) ) ?>"
25
+ data-fallback-image="<?php echo esc_attr( json_encode( $fallback_image_data ) ); ?>"></div>
widgets/headline/headline.php CHANGED
@@ -261,6 +261,7 @@ class SiteOrigin_Widget_Headline_Widget extends SiteOrigin_Widget {
261
  'label' => __( 'FitText Compressor Strength', 'so-widgets-bundle' ),
262
  'description' => __( 'The higher the value, the more your headings will be scaled down. Values above 1 are allowed.', 'so-widgets-bundle' ),
263
  'default' => 0.85,
 
264
  'state_handler' => array(
265
  'use_fittext[show]' => array( 'show' ),
266
  'use_fittext[hide]' => array( 'hide' ),
@@ -318,13 +319,6 @@ class SiteOrigin_Widget_Headline_Widget extends SiteOrigin_Widget {
318
  return $less_vars;
319
  }
320
 
321
- function get_google_font_fields( $instance ) {
322
- return array(
323
- $instance['headline']['font'],
324
- $instance['sub_headline']['font'],
325
- );
326
- }
327
-
328
  /**
329
  * Get the template variables for the headline
330
  *
261
  'label' => __( 'FitText Compressor Strength', 'so-widgets-bundle' ),
262
  'description' => __( 'The higher the value, the more your headings will be scaled down. Values above 1 are allowed.', 'so-widgets-bundle' ),
263
  'default' => 0.85,
264
+ 'step' => 0.01,
265
  'state_handler' => array(
266
  'use_fittext[show]' => array( 'show' ),
267
  'use_fittext[hide]' => array( 'hide' ),
319
  return $less_vars;
320
  }
321
 
 
 
 
 
 
 
 
322
  /**
323
  * Get the template variables for the headline
324
  *
widgets/headline/styles/default.less CHANGED
@@ -1,7 +1,5 @@
1
  @import "../../../base/less/mixins";
2
 
3
- .widget-function('import_google_font');
4
-
5
  @headline_tag: h1;
6
  @headline_font: default;
7
  @headline_font_weight: 400;
@@ -90,4 +88,4 @@
90
  *:last-child {
91
  margin-bottom: 0 !important;
92
  }
93
- }
1
  @import "../../../base/less/mixins";
2
 
 
 
3
  @headline_tag: h1;
4
  @headline_font: default;
5
  @headline_font_weight: 400;
88
  *:last-child {
89
  margin-bottom: 0 !important;
90
  }
91
+ }
widgets/hero/hero.php CHANGED
@@ -241,6 +241,7 @@ class SiteOrigin_Widget_Hero_Widget extends SiteOrigin_Widget_Base_Slider {
241
  'label' => __( 'FitText compressor strength', 'so-widgets-bundle' ),
242
  'description' => __( 'The higher the value, the more your headings will be scaled down. Values above 1 are allowed.', 'so-widgets-bundle' ),
243
  'default' => 0.85,
 
244
  'state_handler' => array(
245
  'use_fittext[show]' => array( 'show' ),
246
  'use_fittext[hide]' => array( 'hide' ),
@@ -454,21 +455,6 @@ class SiteOrigin_Widget_Hero_Widget extends SiteOrigin_Widget_Base_Slider {
454
  return $val;
455
  }
456
 
457
- /**
458
- * Less function for importing Google web fonts.
459
- *
460
- * @param $instance
461
- * @param $args
462
- *
463
- * @return string
464
- */
465
- function get_google_font_fields( $instance ) {
466
- return array(
467
- $instance['design']['heading_font'],
468
- ! empty( $instance['design']['text_font'] ) ? $instance['design']['text_font'] : '',
469
- );
470
- }
471
-
472
  function wrapper_class_filter( $classes, $instance ){
473
  if( ! empty( $instance['design']['fittext'] ) ) {
474
  $classes[] = 'so-widget-fittext-wrapper';
241
  'label' => __( 'FitText compressor strength', 'so-widgets-bundle' ),
242
  'description' => __( 'The higher the value, the more your headings will be scaled down. Values above 1 are allowed.', 'so-widgets-bundle' ),
243
  'default' => 0.85,
244
+ 'step' => 0.01,
245
  'state_handler' => array(
246
  'use_fittext[show]' => array( 'show' ),
247
  'use_fittext[hide]' => array( 'hide' ),
455
  return $val;
456
  }
457
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
458
  function wrapper_class_filter( $classes, $instance ){
459
  if( ! empty( $instance['design']['fittext'] ) ) {
460
  $classes[] = 'so-widget-fittext-wrapper';
widgets/hero/styles/default.less CHANGED
@@ -1,7 +1,5 @@
1
  @import "../../../base/less/mixins";
2
 
3
- .widget-function('import_google_font');
4
-
5
  @nav_color_hex: #FFFFFF;
6
  @nav_size: 25;
7
 
1
  @import "../../../base/less/mixins";
2
 
 
 
3
  @nav_color_hex: #FFFFFF;
4
  @nav_size: 25;
5
 
widgets/image/tpl/default.php CHANGED
@@ -11,7 +11,7 @@
11
  ?>
12
 
13
  <?php if( $title_position == 'above' ) : ?>
14
- <?php echo $args['before_title'] . wp_kses_post( $title ) . $args['after_title']; ?>
15
  <?php endif; ?>
16
 
17
  <?php
@@ -25,5 +25,5 @@
25
  </div>
26
 
27
  <?php if( $title_position == 'below' ) : ?>
28
- <?php echo $args['before_title'] . wp_kses_post( $title ) . $args['after_title']; ?>
29
  <?php endif; ?>
11
  ?>
12
 
13
  <?php if( $title_position == 'above' ) : ?>
14
+ <?php echo $args['before_title'] . $title . $args['after_title']; ?>
15
  <?php endif; ?>
16
 
17
  <?php
25
  </div>
26
 
27
  <?php if( $title_position == 'below' ) : ?>
28
+ <?php echo $args['before_title'] . $title . $args['after_title']; ?>
29
  <?php endif; ?>
widgets/post-carousel/js/carousel.js CHANGED
@@ -21,7 +21,8 @@ jQuery( function ( $ ) {
21
  // The carousel widget
22
  $( '.sow-carousel-wrapper' ).each( function () {
23
  var $$ = $( this ),
24
- $items = $$.find( '.sow-carousel-items' );
 
25
 
26
  $items.not( '.slick-initialized' ).slick( {
27
  arrows: false,
@@ -31,19 +32,21 @@ jQuery( function ( $ ) {
31
  touchThreshold: 20,
32
  variableWidth: true,
33
  accessibility: false,
 
 
34
  responsive: [
35
  {
36
- breakpoint: carouselBreakpoints.tablet_portrait,
37
  settings: {
38
- slidesToScroll: 2,
39
- slidesToShow: 2,
40
  }
41
  },
42
  {
43
- breakpoint: carouselBreakpoints.mobile,
44
  settings: {
45
- slidesToScroll: 1,
46
- slidesToShow: 1,
47
  }
48
  },
49
  ],
@@ -62,12 +65,16 @@ jQuery( function ( $ ) {
62
  numItems = $items.find( '.sow-carousel-item' ).length,
63
  complete = numItems === $$.data( 'post-count' ),
64
  numVisibleItems = Math.ceil( $items.outerWidth() / $items.find( '.sow-carousel-item' ).outerWidth( true ) ),
65
- lastPosition = numItems - numVisibleItems + 1;
 
66
 
67
  // Check if all posts are displayed
68
  if ( ! complete ) {
69
  // Check if we need to fetch the next batch of posts
70
- if ( $items.slick( 'slickCurrentSlide' ) + numVisibleItems >= numItems - 1 ) {
 
 
 
71
 
72
  if ( ! $$.data( 'fetching' ) ) {
73
  // Fetch the next batch
@@ -115,10 +122,11 @@ jQuery( function ( $ ) {
115
  $items.slick( 'slickGoTo', 0 );
116
  }
117
  // Check if the next slide is the last slide and prevent blank spacing.
118
- } else if (
119
- complete &&
120
- $items.slick( 'slickCurrentSlide' ) + numVisibleItems >= lastPosition
121
- ) {
 
122
  $items.setSlideTo( lastPosition );
123
  } else {
124
  $items.slick( 'slickNext' );
@@ -180,11 +188,9 @@ jQuery( function ( $ ) {
180
  } );
181
 
182
  $( window ).on( 'resize load', function() {
183
- // Hide/disable scroll if number of visible items is less than total posts.
184
-
185
  $( '.sow-carousel-wrapper' ).each( function() {
186
  var currentCarousel = $( this ),
187
- $items = currentCarousel.find( '.sow-carousel-items' ),
188
  numVisibleItems = Math.ceil( $items.outerWidth() / $items.find( '.sow-carousel-item' ).outerWidth( true ) ),
189
  navigation = currentCarousel.parent().parent().find( '.sow-carousel-navigation' );
190
 
@@ -197,13 +203,14 @@ jQuery( function ( $ ) {
197
  $items.slick( 'slickSetOption', 'touchMove', true );
198
  $items.slick( 'slickSetOption', 'draggable', true );
199
  }
200
- } );
 
 
 
 
 
201
 
202
- // Change Slick Settings on iPad Pro while Landscape
203
- if ( window.matchMedia( '(min-width: ' + carouselBreakpoints.tablet_portrait + 'px) and (max-width: ' + carouselBreakpoints.tablet_landscape + 'px) and (orientation: landscape)' ).matches ) {
204
- $( '.sow-carousel-items' ).slick( 'slickSetOption', 'slidesToShow', 3 );
205
- $( '.sow-carousel-items' ).slick( 'slickSetOption', 'slidesToScroll', 3 );
206
- }
207
 
208
  $( '.sow-carousel-item:first-of-type' ).prop( 'tabindex', 0 );
209
  } );
21
  // The carousel widget
22
  $( '.sow-carousel-wrapper' ).each( function () {
23
  var $$ = $( this ),
24
+ $items = $$.find( '.sow-carousel-items' ),
25
+ responsiveSettings = $$.data( 'responsive' );
26
 
27
  $items.not( '.slick-initialized' ).slick( {
28
  arrows: false,
32
  touchThreshold: 20,
33
  variableWidth: true,
34
  accessibility: false,
35
+ slidesToScroll: responsiveSettings.desktop_slides,
36
+ slidesToShow: responsiveSettings.desktop_slides,
37
  responsive: [
38
  {
39
+ breakpoint: responsiveSettings.tablet_portrait_breakpoint,
40
  settings: {
41
+ slidesToScroll: responsiveSettings.tablet_portrait_slides,
42
+ slidesToShow: responsiveSettings.tablet_portrait_slides,
43
  }
44
  },
45
  {
46
+ breakpoint: responsiveSettings.mobile_breakpoint,
47
  settings: {
48
+ slidesToScroll: responsiveSettings.mobile_slides,
49
+ slidesToShow: responsiveSettings.mobile_slides,
50
  }
51
  },
52
  ],
65
  numItems = $items.find( '.sow-carousel-item' ).length,
66
  complete = numItems === $$.data( 'post-count' ),
67
  numVisibleItems = Math.ceil( $items.outerWidth() / $items.find( '.sow-carousel-item' ).outerWidth( true ) ),
68
+ lastPosition = numItems - numVisibleItems + 1,
69
+ slidesToScroll = $items.slick( 'slickGetOption', 'slidesToScroll' );
70
 
71
  // Check if all posts are displayed
72
  if ( ! complete ) {
73
  // Check if we need to fetch the next batch of posts
74
+ if (
75
+ $items.slick( 'slickCurrentSlide' ) + numVisibleItems >= numItems - 1 ||
76
+ $items.slick( 'slickCurrentSlide' ) + slidesToScroll > lastPosition - 1
77
+ ) {
78
 
79
  if ( ! $$.data( 'fetching' ) ) {
80
  // Fetch the next batch
122
  $items.slick( 'slickGoTo', 0 );
123
  }
124
  // Check if the next slide is the last slide and prevent blank spacing.
125
+ } else if ( complete && $items.slick( 'slickCurrentSlide' ) + numVisibleItems >= lastPosition ) {
126
+ $items.setSlideTo( lastPosition );
127
+
128
+ // Check if the number of slides to scroll exceeds lastPosition, go to the last slide.
129
+ } else if ( $items.slick( 'slickCurrentSlide' ) + slidesToScroll > lastPosition - 1 ) {
130
  $items.setSlideTo( lastPosition );
131
  } else {
132
  $items.slick( 'slickNext' );
188
  } );
189
 
190
  $( window ).on( 'resize load', function() {
 
 
191
  $( '.sow-carousel-wrapper' ).each( function() {
192
  var currentCarousel = $( this ),
193
+ $items = currentCarousel.find( '.sow-carousel-items.slick-initialized' ),
194
  numVisibleItems = Math.ceil( $items.outerWidth() / $items.find( '.sow-carousel-item' ).outerWidth( true ) ),
195
  navigation = currentCarousel.parent().parent().find( '.sow-carousel-navigation' );
196
 
203
  $items.slick( 'slickSetOption', 'touchMove', true );
204
  $items.slick( 'slickSetOption', 'draggable', true );
205
  }
206
+ // Change Slick Settings on iPad Pro while Landscape
207
+ var responsiveSettings = currentCarousel.data( 'responsive' );
208
+ if ( window.matchMedia( '(min-width: ' + responsiveSettings.tablet_portrait_breakpoint + 'px) and (max-width: ' + responsiveSettings.tablet_landscape_breakpoint + 'px) and (orientation: landscape)' ).matches ) {
209
+ $items.slick( 'slickSetOption', 'slidesToShow', responsiveSettings.tablet_landscape_slides );
210
+ $items.slick( 'slickSetOption', 'slidesToScroll', responsiveSettings.tablet_landscape_slides );
211
+ }
212
 
213
+ } );
 
 
 
 
214
 
215
  $( '.sow-carousel-item:first-of-type' ).prop( 'tabindex', 0 );
216
  } );
widgets/post-carousel/js/carousel.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery((function(i){sowb.setupCarousel=function(){i.fn.setSlideTo=function(e){$item=i(this);var s=$item.slick("slickGetOption","slidesToShow"),o=$item.slick("slickGetOption","slidesToScroll");$item.slick("slickSetOption","slidesToShow",1),$item.slick("slickSetOption","slidesToScroll",1),$item.slick("slickGoTo",e),$item.slick("slickSetOption","slidesToShow",s),$item.slick("slickSetOption","slidesToScroll",o)},i(".sow-carousel-wrapper").each((function(){var e=i(this),s=e.find(".sow-carousel-items");s.not(".slick-initialized").slick({arrows:!1,infinite:!1,rows:0,rtl:"rtl"==e.data("dir"),touchThreshold:20,variableWidth:!0,accessibility:!1,responsive:[{breakpoint:carouselBreakpoints.tablet_portrait,settings:{slidesToScroll:2,slidesToShow:2}},{breakpoint:carouselBreakpoints.mobile,settings:{slidesToScroll:1,slidesToShow:1}}]}),s.on("swipe",(function(i,s,o){e.parent().parent().find(".sow-carousel-"+("left"==o?"next":"prev")).trigger("touchend")})),e.parent().parent().find(".sow-carousel-previous, .sow-carousel-next").on("click touchend",(function(s,o){s.preventDefault();var t=e.find(".sow-carousel-items"),l=t.find(".sow-carousel-item").length,a=l===e.data("post-count"),n=Math.ceil(t.outerWidth()/t.find(".sow-carousel-item").outerWidth(!0)),c=l-n+1;if(!a&&t.slick("slickCurrentSlide")+n>=l-1&&!e.data("fetching")){e.data("fetching",!0);var r=e.data("page")+1;t.slick("slickAdd",'<div class="sow-carousel-item sow-carousel-loading"></div>'),i.get(e.data("ajax-url"),{action:"sow_carousel_load",paged:r,instance_hash:e.parent().parent().find('input[name="instance_hash"]').val()},(function(i,s){t.find(".sow-carousel-loading").remove(),t.slick("slickAdd",i.html),l=e.find(".sow-carousel-item").length,e.data("fetching",!1),e.data("page",r),o&&t.find('.sow-carousel-item[tabindex="0"]').trigger("focus")}))}i(this).hasClass("sow-carousel-next")?a&&t.slick("slickCurrentSlide")>=c?e.data("loop-posts-enabled")&&t.slick("slickGoTo",0):a&&t.slick("slickCurrentSlide")+n>=c?t.setSlideTo(c):t.slick("slickNext"):i(this).hasClass("sow-carousel-previous")&&(e.data("loop-posts-enabled")&&0==t.slick("slickCurrentSlide")?t.slick("slickGoTo",c):t.slick("slickPrev"))}))})),i(document).on("keydown",".sow-carousel-navigation a",(function(e){13!=e.keyCode&&32!=e.keyCode||(e.preventDefault(),i(this).click())})),i(document).on("keyup",".sow-carousel-item",(function(e){if(37==e.keyCode||39==e.keyCode){var s=i(this).parents(".sow-carousel-wrapper"),o=s.find(".sow-carousel-items"),t=o.find(".sow-carousel-item").length,l=i(this).data("slick-index"),a=t-(t===s.data("post-count")?0:1);if(37==e.keyCode)--l<0&&(l=a);else if(39==e.keyCode&&++l>=a){if(s.data("fetching"))return;s.parent().find(".sow-carousel-next").trigger("click",!0)}o.slick("slickGoTo",l,!0),s.find(".sow-carousel-item").prop("tabindex",-1),s.find('.sow-carousel-item[data-slick-index="'+l+'"]').trigger("focus").prop("tabindex",0)}})),i(window).on("resize load",(function(){i(".sow-carousel-wrapper").each((function(){var e=i(this),s=e.find(".sow-carousel-items"),o=Math.ceil(s.outerWidth()/s.find(".sow-carousel-item").outerWidth(!0)),t=e.parent().parent().find(".sow-carousel-navigation");o>=e.data("post-count")?(t.hide(),s.slick("slickSetOption","touchMove",!1),s.slick("slickSetOption","draggable",!1)):t.not(":visible")&&(t.show(),s.slick("slickSetOption","touchMove",!0),s.slick("slickSetOption","draggable",!0))})),window.matchMedia("(min-width: "+carouselBreakpoints.tablet_portrait+"px) and (max-width: "+carouselBreakpoints.tablet_landscape+"px) and (orientation: landscape)").matches&&(i(".sow-carousel-items").slick("slickSetOption","slidesToShow",3),i(".sow-carousel-items").slick("slickSetOption","slidesToScroll",3)),i(".sow-carousel-item:first-of-type").prop("tabindex",0)}))},sowb.setupCarousel(),i(sowb).on("setup_widgets",sowb.setupCarousel)})),window.sowb=sowb;
1
+ var sowb=window.sowb||{};jQuery((function(i){sowb.setupCarousel=function(){i.fn.setSlideTo=function(e){$item=i(this);var s=$item.slick("slickGetOption","slidesToShow"),t=$item.slick("slickGetOption","slidesToScroll");$item.slick("slickSetOption","slidesToShow",1),$item.slick("slickSetOption","slidesToScroll",1),$item.slick("slickGoTo",e),$item.slick("slickSetOption","slidesToShow",s),$item.slick("slickSetOption","slidesToScroll",t)},i(".sow-carousel-wrapper").each((function(){var e=i(this),s=e.find(".sow-carousel-items"),t=e.data("responsive");s.not(".slick-initialized").slick({arrows:!1,infinite:!1,rows:0,rtl:"rtl"==e.data("dir"),touchThreshold:20,variableWidth:!0,accessibility:!1,slidesToScroll:t.desktop_slides,slidesToShow:t.desktop_slides,responsive:[{breakpoint:t.tablet_portrait_breakpoint,settings:{slidesToScroll:t.tablet_portrait_slides,slidesToShow:t.tablet_portrait_slides}},{breakpoint:t.mobile_breakpoint,settings:{slidesToScroll:t.mobile_slides,slidesToShow:t.mobile_slides}}]}),s.on("swipe",(function(i,s,t){e.parent().parent().find(".sow-carousel-"+("left"==t?"next":"prev")).trigger("touchend")})),e.parent().parent().find(".sow-carousel-previous, .sow-carousel-next").on("click touchend",(function(s,t){s.preventDefault();var o=e.find(".sow-carousel-items"),l=o.find(".sow-carousel-item").length,a=l===e.data("post-count"),n=Math.ceil(o.outerWidth()/o.find(".sow-carousel-item").outerWidth(!0)),c=l-n+1,r=o.slick("slickGetOption","slidesToScroll");if(!a&&(o.slick("slickCurrentSlide")+n>=l-1||o.slick("slickCurrentSlide")+r>c-1)&&!e.data("fetching")){e.data("fetching",!0);var d=e.data("page")+1;o.slick("slickAdd",'<div class="sow-carousel-item sow-carousel-loading"></div>'),i.get(e.data("ajax-url"),{action:"sow_carousel_load",paged:d,instance_hash:e.parent().parent().find('input[name="instance_hash"]').val()},(function(i,s){o.find(".sow-carousel-loading").remove(),o.slick("slickAdd",i.html),l=e.find(".sow-carousel-item").length,e.data("fetching",!1),e.data("page",d),t&&o.find('.sow-carousel-item[tabindex="0"]').trigger("focus")}))}i(this).hasClass("sow-carousel-next")?a&&o.slick("slickCurrentSlide")>=c?e.data("loop-posts-enabled")&&o.slick("slickGoTo",0):a&&o.slick("slickCurrentSlide")+n>=c?o.setSlideTo(c):o.slick("slickCurrentSlide")+r>c-1?o.setSlideTo(c):o.slick("slickNext"):i(this).hasClass("sow-carousel-previous")&&(e.data("loop-posts-enabled")&&0==o.slick("slickCurrentSlide")?o.slick("slickGoTo",c):o.slick("slickPrev"))}))})),i(document).on("keydown",".sow-carousel-navigation a",(function(e){13!=e.keyCode&&32!=e.keyCode||(e.preventDefault(),i(this).click())})),i(document).on("keyup",".sow-carousel-item",(function(e){if(37==e.keyCode||39==e.keyCode){var s=i(this).parents(".sow-carousel-wrapper"),t=s.find(".sow-carousel-items"),o=t.find(".sow-carousel-item").length,l=i(this).data("slick-index"),a=o-(o===s.data("post-count")?0:1);if(37==e.keyCode)--l<0&&(l=a);else if(39==e.keyCode&&++l>=a){if(s.data("fetching"))return;s.parent().find(".sow-carousel-next").trigger("click",!0)}t.slick("slickGoTo",l,!0),s.find(".sow-carousel-item").prop("tabindex",-1),s.find('.sow-carousel-item[data-slick-index="'+l+'"]').trigger("focus").prop("tabindex",0)}})),i(window).on("resize load",(function(){i(".sow-carousel-wrapper").each((function(){var e=i(this),s=e.find(".sow-carousel-items.slick-initialized"),t=Math.ceil(s.outerWidth()/s.find(".sow-carousel-item").outerWidth(!0)),o=e.parent().parent().find(".sow-carousel-navigation");t>=e.data("post-count")?(o.hide(),s.slick("slickSetOption","touchMove",!1),s.slick("slickSetOption","draggable",!1)):o.not(":visible")&&(o.show(),s.slick("slickSetOption","touchMove",!0),s.slick("slickSetOption","draggable",!0));var l=e.data("responsive");window.matchMedia("(min-width: "+l.tablet_portrait_breakpoint+"px) and (max-width: "+l.tablet_landscape_breakpoint+"px) and (orientation: landscape)").matches&&(s.slick("slickSetOption","slidesToShow",l.tablet_landscape_slides),s.slick("slickSetOption","slidesToScroll",l.tablet_landscape_slides))})),i(".sow-carousel-item:first-of-type").prop("tabindex",0)}))},sowb.setupCarousel(),i(sowb).on("setup_widgets",sowb.setupCarousel)})),window.sowb=sowb;
widgets/post-carousel/post-carousel.php CHANGED
@@ -62,8 +62,6 @@ class SiteOrigin_Widget_PostCarousel_Widget extends SiteOrigin_Widget {
62
  }
63
 
64
  function initialize() {
65
- add_action( 'siteorigin_widgets_enqueue_frontend_scripts_sow-post-carousel', array( $this, 'enqueue_widget_scripts' ) );
66
-
67
  $this->register_frontend_scripts(
68
  array(
69
  array(
@@ -100,20 +98,20 @@ class SiteOrigin_Widget_PostCarousel_Widget extends SiteOrigin_Widget {
100
  );
101
  }
102
 
103
- function enqueue_widget_scripts() {
104
- wp_localize_script( 'sow-carousel-basic', 'carouselBreakpoints',
105
- apply_filters(
106
- 'siteorigin_widgets_post_carousel_breakpoints',
107
- array(
108
- 'tablet_landscape' => 1366,
109
- 'tablet_portrait' => 1025,
110
- 'mobile' => 480,
111
- )
112
  )
113
  );
114
  }
115
 
116
  function get_widget_form(){
 
 
117
  return array(
118
  'title' => array(
119
  'type' => 'text',
@@ -155,6 +153,11 @@ class SiteOrigin_Widget_PostCarousel_Widget extends SiteOrigin_Widget {
155
  'type' => 'posts',
156
  'label' => __('Posts query', 'so-widgets-bundle'),
157
  'hide' => true,
 
 
 
 
 
158
  ),
159
 
160
  'design' => array(
@@ -188,6 +191,87 @@ class SiteOrigin_Widget_PostCarousel_Widget extends SiteOrigin_Widget {
188
  ),
189
  ),
190
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  );
192
  }
193
 
@@ -235,12 +319,24 @@ class SiteOrigin_Widget_PostCarousel_Widget extends SiteOrigin_Widget {
235
  ) );
236
  $posts = new WP_Query( $query );
237
 
 
 
 
 
 
 
 
 
 
 
 
238
  return array(
239
  'title' => $instance['title'],
240
  'posts' => $posts,
241
  'default_thumbnail' => ! empty( $default_thumbnail ) ? $default_thumbnail[0] : '',
242
  'loop_posts' => ! empty( $instance['loop_posts'] ),
243
  'link_target' => ! empty( $instance['link_target'] ) ? $instance['link_target'] : 'same',
 
244
  );
245
  }
246
 
62
  }
63
 
64
  function initialize() {
 
 
65
  $this->register_frontend_scripts(
66
  array(
67
  array(
98
  );
99
  }
100
 
101
+ private function get_breakpoints() {
102
+ return apply_filters(
103
+ 'siteorigin_widgets_post_carousel_breakpoints',
104
+ array(
105
+ 'tablet_landscape' => 1366,
106
+ 'tablet_portrait' => 1025,
107
+ 'mobile' => 480,
 
 
108
  )
109
  );
110
  }
111
 
112
  function get_widget_form(){
113
+ $breakpoints = $this->get_breakpoints();
114
+
115
  return array(
116
  'title' => array(
117
  'type' => 'text',
153
  'type' => 'posts',
154
  'label' => __('Posts query', 'so-widgets-bundle'),
155
  'hide' => true,
156
+ 'fields' => array(
157
+ 'posts_per_page' => array(
158
+ 'label' => __( 'Posts per load', 'so-widgets-bundle' ),
159
+ ),
160
+ ),
161
  ),
162
 
163
  'design' => array(
191
  ),
192
  ),
193
  ),
194
+ 'responsive' => array(
195
+ 'type' => 'section',
196
+ 'label' => __( 'Responsive', 'so-widgets-bundle' ),
197
+ 'hide' => true,
198
+ 'fields' => array(
199
+ 'desktop' => array(
200
+ 'type' => 'section',
201
+ 'label' => __( 'Desktop', 'so-widgets-bundle' ),
202
+ 'hide' => true,
203
+ 'fields' => array(
204
+ 'slides_to_scroll' => array(
205
+ 'type' => 'number',
206
+ 'label' => __( 'Slides to scroll', 'so-widgets-bundle' ),
207
+ 'description' => __( 'Set the number of slides to scroll per navigation click or swipe on desktop.', 'so-widgets-bundle' ),
208
+ 'default' => 1,
209
+ ),
210
+ ),
211
+ ),
212
+ 'tablet' => array(
213
+ 'type' => 'section',
214
+ 'label' => __( 'Tablet', 'so-widgets-bundle' ),
215
+ 'hide' => true,
216
+ 'fields' => array(
217
+ 'landscape' => array(
218
+ 'type' => 'section',
219
+ 'label' => __( 'Landscape', 'so-widgets-bundle' ),
220
+ 'hide' => true,
221
+ 'fields' => array(
222
+ 'breakpoint' => array(
223
+ 'type' => 'number',
224
+ 'label' => __( 'Breakpoint', 'so-widgets-bundle' ),
225
+ 'default' => $breakpoints['tablet_landscape'],
226
+ ),
227
+ 'slides_to_scroll' => array(
228
+ 'type' => 'number',
229
+ 'label' => __( 'Slides to scroll', 'so-widgets-bundle' ),
230
+ 'description' => __( 'Set the number of slides to scroll per navigation click or swipe on tablet devices.', 'so-widgets-bundle' ),
231
+ 'default' => 2,
232
+ ),
233
+ ),
234
+ ),
235
+ 'portrait' => array(
236
+ 'type' => 'section',
237
+ 'label' => __( 'Portrait', 'so-widgets-bundle' ),
238
+ 'hide' => true,
239
+ 'fields' => array(
240
+ 'breakpoint' => array(
241
+ 'type' => 'number',
242
+ 'label' => __( 'Breakpoint', 'so-widgets-bundle' ),
243
+ 'default' => $breakpoints['tablet_portrait'],
244
+ ),
245
+ 'slides_to_scroll' => array(
246
+ 'type' => 'number',
247
+ 'label' => __( 'Slides to scroll', 'so-widgets-bundle' ),
248
+ 'description' => __( 'Set the number of slides to scroll per navigation click or swipe on tablet devices.', 'so-widgets-bundle' ),
249
+ 'default' => 2,
250
+ ),
251
+ ),
252
+ ),
253
+ ),
254
+ ),
255
+ 'mobile' => array(
256
+ 'type' => 'section',
257
+ 'label' => __( 'Mobile', 'so-widgets-bundle' ),
258
+ 'hide' => true,
259
+ 'fields' => array(
260
+ 'breakpoint' => array(
261
+ 'type' => 'number',
262
+ 'label' => __( 'Breakpoint', 'so-widgets-bundle' ),
263
+ 'default' => $breakpoints['mobile'],
264
+ ),
265
+ 'slides_to_scroll' => array(
266
+ 'type' => 'number',
267
+ 'label' => __( 'Slides to scroll', 'so-widgets-bundle' ),
268
+ 'description' => __( ' Set the number of slides to scroll per navigation click or swipe on mobile devices.', 'so-widgets-bundle' ),
269
+ 'default' => 1,
270
+ ),
271
+ ),
272
+ ),
273
+ ),
274
+ ),
275
  );
276
  }
277
 
319
  ) );
320
  $posts = new WP_Query( $query );
321
 
322
+ $breakpoints = $this->get_breakpoints();
323
+ $responsive_settings = array(
324
+ 'desktop_slides' => ! empty ( $instance['responsive']['desktop']['slides_to_scroll'] ) ? $instance['responsive']['desktop']['slides_to_scroll'] : 1,
325
+ 'tablet_portrait_slides' => ! empty ( $instance['responsive']['tablet']['portrait']['slides_to_scroll'] ) ? $instance['responsive']['tablet']['portrait']['slides_to_scroll'] : 2,
326
+ 'tablet_portrait_breakpoint' => ! empty ( $instance['responsive']['tablet']['portrait']['breakpoint'] ) ? $instance['responsive']['tablet']['portrait']['breakpoint'] : $breakpoints['tablet_portrait'],
327
+ 'tablet_landscape_slides' => ! empty ( $instance['responsive']['tablet']['landscape']['slides_to_scroll'] ) ? $instance['responsive']['tablet']['landscape']['slides_to_scroll'] : 2,
328
+ 'tablet_landscape_breakpoint' => ! empty ( $instance['responsive']['tablet']['landscape']['breakpoint'] ) ? $instance['responsive']['tablet']['landscape']['breakpoint'] : $breakpoints['tablet_landscape'],
329
+ 'mobile_breakpoint' => ! empty ( $instance['responsive']['mobile']['breakpoint'] ) ? $instance['responsive']['mobile']['breakpoint'] : $breakpoints['mobile'],
330
+ 'mobile_slides' => ! empty ( $instance['responsive']['mobile']['slides_to_scroll'] ) ? $instance['responsive']['mobile']['slides_to_scroll'] : 1,
331
+ );
332
+
333
  return array(
334
  'title' => $instance['title'],
335
  'posts' => $posts,
336
  'default_thumbnail' => ! empty( $default_thumbnail ) ? $default_thumbnail[0] : '',
337
  'loop_posts' => ! empty( $instance['loop_posts'] ),
338
  'link_target' => ! empty( $instance['link_target'] ) ? $instance['link_target'] : 'same',
339
+ 'responsive_settings' => $responsive_settings,
340
  );
341
  }
342
 
widgets/post-carousel/tpl/base.php CHANGED
@@ -34,6 +34,7 @@
34
  data-page="1"
35
  data-fetching="false"
36
  data-dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>"
 
37
  >
38
  <div class="sow-carousel-items">
39
  <?php include plugin_dir_path( __FILE__ ) . 'carousel-post-loop.php' ?>
34
  data-page="1"
35
  data-fetching="false"
36
  data-dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>"
37
+ data-responsive="<?php echo esc_attr( json_encode( $responsive_settings ) ); ?>"
38
  >
39
  <div class="sow-carousel-items">
40
  <?php include plugin_dir_path( __FILE__ ) . 'carousel-post-loop.php' ?>
widgets/post-carousel/tpl/carousel-post-loop.php CHANGED
@@ -6,18 +6,26 @@
6
  while($posts->have_posts()) : $posts->the_post(); ?>
7
  <div class="sow-carousel-item" tabindex="-1">
8
  <div class="sow-carousel-thumbnail">
9
- <?php if( has_post_thumbnail() ) : $img = wp_get_attachment_image_src(get_post_thumbnail_id(), $instance['image_size']); ?>
10
- <a href="<?php the_permalink() ?>" style="background-image: url(<?php echo sow_esc_url($img[0]) ?>)" aria-labelledby="sow-carousel-id-<?php echo the_ID(); ?>" tabindex="-1">
 
 
 
 
11
  <span class="overlay"></span>
12
  </a>
13
  <?php else : ?>
14
- <a href="<?php the_permalink() ?>" class="sow-carousel-default-thumbnail"
15
- <?php echo $link_target == 'new' ? 'target="_blank" rel="noopener noreferrer"': ''; ?>
16
- <?php echo ! empty( $default_thumbnail ) ?
17
- 'style="background-image: url('. sow_esc_url( $default_thumbnail ) .')"' : '' ?> aria-labelledby="sow-carousel-id-<?php echo the_ID(); ?>"
18
- tabindex="-1"><span class="overlay"></span></a>
 
 
 
 
19
  <?php endif; ?>
20
  </div>
21
- <h3><a href="<?php the_permalink() ?>" id="sow-carousel-id-<?php echo the_ID(); ?>" tabindex="-1"><?php the_title() ?></a></h3>
22
  </div>
23
  <?php endwhile; wp_reset_postdata(); ?>
6
  while($posts->have_posts()) : $posts->the_post(); ?>
7
  <div class="sow-carousel-item" tabindex="-1">
8
  <div class="sow-carousel-thumbnail">
9
+ <?php if ( has_post_thumbnail() ) : $img = wp_get_attachment_image_src( get_post_thumbnail_id(), $instance['image_size'] ); ?>
10
+ <a href="<?php the_permalink() ?>"
11
+ <?php echo $link_target == 'new' ? 'target="_blank" rel="noopener noreferrer"' : '' ?>
12
+ style="background-image: url( <?php echo sow_esc_url( $img[0] ); ?> )"
13
+ aria-labelledby="sow-carousel-id-<?php echo the_ID(); ?>"
14
+ tabindex="-1">
15
  <span class="overlay"></span>
16
  </a>
17
  <?php else : ?>
18
+ <a href="<?php the_permalink() ?>"
19
+ class="sow-carousel-default-thumbnail"
20
+ <?php echo $link_target == 'new' ? 'target="_blank" rel="noopener noreferrer"': ''; ?>
21
+ <?php echo ! empty( $default_thumbnail ) ?
22
+ 'style="background-image: url(' . sow_esc_url( $default_thumbnail ) . ')"' : ''; ?>
23
+ aria-labelledby="sow-carousel-id-<?php echo the_ID(); ?>"
24
+ tabindex="-1">
25
+ <span class="overlay"></span>
26
+ </a>
27
  <?php endif; ?>
28
  </div>
29
+ <h3><a href="<?php the_permalink() ?>" id="sow-carousel-id-<?php echo the_ID(); ?>" <?php echo $link_target == 'new' ? 'target="_blank" rel="noopener noreferrer"': ''; ?> tabindex="-1"><?php the_title() ?></a></h3>
30
  </div>
31
  <?php endwhile; wp_reset_postdata(); ?>
widgets/price-table/tpl/atom.php CHANGED
@@ -11,7 +11,7 @@
11
  ?>
12
 
13
  <?php if ( ! empty( $title ) ) {
14
- echo $before_title . esc_html( $title ) . $after_title;
15
  } ?>
16
 
17
  <div class="ow-pt-columns-atom<?php echo( $equalize_row_heights ? ' sow-equalize-row-heights' : '' ) ?>">
11
  ?>
12
 
13
  <?php if ( ! empty( $title ) ) {
14
+ echo $before_title . $title . $after_title;
15
  } ?>
16
 
17
  <div class="ow-pt-columns-atom<?php echo( $equalize_row_heights ? ' sow-equalize-row-heights' : '' ) ?>">
widgets/simple-masonry/tpl/default.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
  ?>
8
 
9
- <?php if( !empty( $instance['widget_title'] ) ) echo $args['before_title'] . esc_html( $instance['widget_title'] ) . $args['after_title'] ?>
10
 
11
  <?php if ( $preloader_enabled ) : ?>
12
  <div class="sow-masonry-grid-preloader"><div></div><div></div><div></div><div></div></div>
6
  */
7
  ?>
8
 
9
+ <?php if( !empty( $instance['widget_title'] ) ) echo $args['before_title'] . $instance['widget_title'] . $args['after_title'] ?>
10
 
11
  <?php if ( $preloader_enabled ) : ?>
12
  <div class="sow-masonry-grid-preloader"><div></div><div></div><div></div><div></div></div>
widgets/social-media-buttons/tpl/default.php CHANGED
@@ -4,7 +4,7 @@
4
  */
5
  ?>
6
 
7
- <?php if ( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html( $instance['title'] ) . $args['after_title']; ?>
8
 
9
  <div class="social-media-button-container">
10
  <?php foreach( $networks as $network ) :
4
  */
5
  ?>
6
 
7
+ <?php if ( !empty( $instance['title'] ) ) echo $args['before_title'] . $instance['title'] . $args['after_title']; ?>
8
 
9
  <div class="social-media-button-container">
10
  <?php foreach( $networks as $network ) :
widgets/tabs/js/tabs.js CHANGED
@@ -79,6 +79,10 @@ jQuery( function ( $ ) {
79
  },
80
  complete: function() {
81
  $( this ).trigger( 'show' );
 
 
 
 
82
  if ( $tab.offset().top < window.scrollY || $tab.offset().top + $tab.height() > window.scrollY ) {
83
  scrollToTab( true );
84
  }
79
  },
80
  complete: function() {
81
  $( this ).trigger( 'show' );
82
+ if ( ! sowTabs.scrollto_after_change ) {
83
+ return;
84
+ }
85
+
86
  if ( $tab.offset().top < window.scrollY || $tab.offset().top + $tab.height() > window.scrollY ) {
87
  scrollToTab( true );
88
  }
widgets/tabs/js/tabs.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery((function(t){sowb.setupTabs=function(){t(".sow-tabs").each((function(e,a){var i=t(a),s=i.closest(".so-widget-sow-tabs");if(s.data("initialized"))return t(this);var o,n=s.data("useAnchorTags"),r=i.find("> .sow-tabs-panel-container"),d=i.find("> .sow-tabs-tab-container > .sow-tabs-tab"),w=i.find(".sow-tabs-tab-selected").index(),c=r.find("> .sow-tabs-panel");c.not(":eq("+w+")").hide();var b=function(e){var a=s.offset().top-90;e?t("body,html").animate({scrollTop:a},200):window.scrollTo(0,a)},l=function(e,a){var i=t(e);if(i.is(".sow-tabs-tab-selected"))return b(!0),!0;var s=i.index();if(s>-1){o&&o.finish();var r=d.filter(".sow-tabs-tab-selected");r.removeClass("sow-tabs-tab-selected");var w=r.index(),l=c.eq(w).children(),f=c.eq(s).children();r.attr("tabindex",-1),r.attr("aria-selected",!1),l.attr("tabindex",-1),i.attr("tabindex",0),i.attr("aria-selected",!0),f.attr("tabindex",0),l.attr("aria-hidden","true"),o=c.eq(w).fadeOut("fast",(function(){t(this).trigger("hide"),f.removeAttr("aria-hidden"),c.eq(s).fadeIn({duration:"fast",start:function(){t(window).trigger("resize"),t(sowb).trigger("setup_widgets")},complete:function(){t(this).trigger("show"),(i.offset().top<window.scrollY||i.offset().top+i.height()>window.scrollY)&&b(!0)}})})),i.addClass("sow-tabs-tab-selected"),n&&!a&&(window.location.hash=i.data("anchor"))}};if(d.click((function(){l(this)})),d.keyup((function(e){var a,i=t(this);37!==e.keyCode&&39!==e.keyCode||(37===e.keyCode&&(a=i.prev().get(0)?i.prev():i.siblings().last()),39===e.keyCode&&(a=i.next().get(0)?i.next():i.siblings().first()),i!==a&&(a.focus(),l(a.get(0))))})),n){var f=function(){window.location.hash&&window.location.hash.substring(1).split(",").forEach((function(e){var a=d.filter((function(a,i){return decodeURI(e)===decodeURI(t(i).data("anchor"))}));a.length>0&&l(a,!0)}))};t(window).on("hashchange",f),window.location.hash&&f()}s.data("initialized",!0)}))},sowb.setupTabs(),t(sowb).on("setup_widgets",sowb.setupTabs)})),window.sowb=sowb;
1
+ var sowb=window.sowb||{};jQuery((function(t){sowb.setupTabs=function(){t(".sow-tabs").each((function(e,a){var s=t(a),i=s.closest(".so-widget-sow-tabs");if(i.data("initialized"))return t(this);var o,n=i.data("useAnchorTags"),r=s.find("> .sow-tabs-panel-container"),d=s.find("> .sow-tabs-tab-container > .sow-tabs-tab"),c=s.find(".sow-tabs-tab-selected").index(),w=r.find("> .sow-tabs-panel");w.not(":eq("+c+")").hide();var l=function(e){var a=i.offset().top-90;e?t("body,html").animate({scrollTop:a},200):window.scrollTo(0,a)},b=function(e,a){var s=t(e);if(s.is(".sow-tabs-tab-selected"))return l(!0),!0;var i=s.index();if(i>-1){o&&o.finish();var r=d.filter(".sow-tabs-tab-selected");r.removeClass("sow-tabs-tab-selected");var c=r.index(),b=w.eq(c).children(),f=w.eq(i).children();r.attr("tabindex",-1),r.attr("aria-selected",!1),b.attr("tabindex",-1),s.attr("tabindex",0),s.attr("aria-selected",!0),f.attr("tabindex",0),b.attr("aria-hidden","true"),o=w.eq(c).fadeOut("fast",(function(){t(this).trigger("hide"),f.removeAttr("aria-hidden"),w.eq(i).fadeIn({duration:"fast",start:function(){t(window).trigger("resize"),t(sowb).trigger("setup_widgets")},complete:function(){t(this).trigger("show"),sowTabs.scrollto_after_change&&(s.offset().top<window.scrollY||s.offset().top+s.height()>window.scrollY)&&l(!0)}})})),s.addClass("sow-tabs-tab-selected"),n&&!a&&(window.location.hash=s.data("anchor"))}};if(d.click((function(){b(this)})),d.keyup((function(e){var a,s=t(this);37!==e.keyCode&&39!==e.keyCode||(37===e.keyCode&&(a=s.prev().get(0)?s.prev():s.siblings().last()),39===e.keyCode&&(a=s.next().get(0)?s.next():s.siblings().first()),s!==a&&(a.focus(),b(a.get(0))))})),n){var f=function(){window.location.hash&&window.location.hash.substring(1).split(",").forEach((function(e){var a=d.filter((function(a,s){return decodeURI(e)===decodeURI(t(s).data("anchor"))}));a.length>0&&b(a,!0)}))};t(window).on("hashchange",f),window.location.hash&&f()}i.data("initialized",!0)}))},sowb.setupTabs(),t(sowb).on("setup_widgets",sowb.setupTabs)})),window.sowb=sowb;
widgets/tabs/styles/default.less CHANGED
@@ -1,7 +1,5 @@
1
  @import "../../../base/less/mixins";
2
 
3
- .widget-function('import_google_font');
4
-
5
  @tabs_container_background_color: default;
6
  @tabs_container_border_color: default;
7
  @tabs_container_border_width: default;
1
  @import "../../../base/less/mixins";
2
 
 
 
3
  @tabs_container_background_color: default;
4
  @tabs_container_border_color: default;
5
  @tabs_container_border_width: default;
widgets/tabs/tabs.php CHANGED
@@ -37,8 +37,32 @@ class SiteOrigin_Widget_Tabs_Widget extends SiteOrigin_Widget {
37
  )
38
  )
39
  );
 
 
40
  }
41
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  function get_widget_form() {
43
 
44
  return array(
37
  )
38
  )
39
  );
40
+
41
+ add_action( 'siteorigin_widgets_enqueue_frontend_scripts_sow-tabs', array( $this, 'enqueue_widget_scripts' ) );
42
  }
43
+
44
+ function get_settings_form() {
45
+ return array(
46
+ 'scrollto_after_change' => array(
47
+ 'type' => 'checkbox',
48
+ 'label' => __( 'Scroll top', 'so-widgets-bundle' ),
49
+ 'default' => true,
50
+ 'description' => __( 'When opening a tab, scroll the user to the top of the tab.', 'so-widgets-bundle' ),
51
+ )
52
+ );
53
+ }
54
+
55
+ function enqueue_widget_scripts() {
56
+ $global_settings = $this->get_global_settings();
57
+ wp_localize_script(
58
+ 'sow-tabs',
59
+ 'sowTabs',
60
+ array(
61
+ 'scrollto_after_change' => ! empty( $global_settings['scrollto_after_change'] ),
62
+ )
63
+ );
64
+ }
65
+
66
  function get_widget_form() {
67
 
68
  return array(
widgets/testimonial/styles/default.less CHANGED
@@ -1,7 +1,5 @@
1
  @import "../../../base/less/mixins";
2
 
3
- .widget-function('import_google_font');
4
-
5
  @testimonial_padding: 10px;
6
 
7
  @testimonial_background: transparent;
1
  @import "../../../base/less/mixins";
2
 
 
 
3
  @testimonial_padding: 10px;
4
 
5
  @testimonial_background: transparent;
widgets/testimonial/tpl/default.php CHANGED
@@ -5,7 +5,7 @@
5
  * @var $testimonials
6
  */
7
  ?>
8
- <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
9
  <?php $this->caret_svg() ?>
10
  <div class="sow-testimonials">
11
  <?php foreach( $testimonials as $testimonial ) : ?>
5
  * @var $testimonials
6
  */
7
  ?>
8
+ <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . $instance['title'] . $args['after_title'] ?>
9
  <?php $this->caret_svg() ?>
10
  <div class="sow-testimonials">
11
  <?php foreach( $testimonials as $testimonial ) : ?>
widgets/video/tpl/default.php CHANGED
@@ -13,7 +13,7 @@
13
  */
14
 
15
  if ( ! empty( $instance['title'] ) ) {
16
- echo $args['before_title'] . esc_html( $instance['title'] ) . $args['after_title'];
17
  }
18
 
19
  $video_args = array(
@@ -24,6 +24,10 @@ $video_args = array(
24
  );
25
  if ( $autoplay ) {
26
  $video_args['autoplay'] = 1;
 
 
 
 
27
  }
28
  if ( ! empty( $poster ) ) {
29
  $video_args['poster'] = esc_url( $poster );
13
  */
14
 
15
  if ( ! empty( $instance['title'] ) ) {
16
+ echo $args['before_title'] . $instance['title'] . $args['after_title'];
17
  }
18
 
19
  $video_args = array(
24
  );
25
  if ( $autoplay ) {
26
  $video_args['autoplay'] = 1;
27
+ // In most brwosers, Videos need to be muted to autoplay.
28
+ if ( apply_filters( 'sow_video_autoplay_mute_self_hosted', true ) ) {
29
+ $video_args['muted'] = true;
30
+ }
31
  }
32
  if ( ! empty( $poster ) ) {
33
  $video_args['poster'] = esc_url( $poster );