SiteOrigin Widgets Bundle - Version 1.15.3

Version Description

  • 6 March 2019 =
  • Image grid: Fallback support, alt text, use measurement fields.
  • Features: Fix responsive layout.
  • Google Maps: Update to use gesture handling and separate zoom level for mobile.
  • Google Maps: Default height when height field is empty.
  • Sliders: Option to always show navigation on mobile devices.
  • Accordion: Keyboard navigation.
  • Beaver Builder: Fix icons and widgets not saving.
  • Video: Allow using YouTube embed URLs.
  • Post Carousel: Accessibility improvements.
  • Escape namespaced widgets in previews.
  • Flag additional metaboxes as incompatible with the block editor.
  • Fix state emitters for sub-widget fields.
  • Google Maps: Remove API key field from widget form, in favor of global API key field.
  • Google Maps: Display notice when API key missing.
  • Contact form: Prevent double nonce.
  • TinyMCE field: Prevent twemoji from replacing emoji in the textarea.
  • Widget block: Show appropriate message when widget is missing or deactivated.
  • Accordion: Fix open/close icon layout when set to left position.
  • Social Media Buttons: Prevent the phone network from opening in a new window.
  • Google Maps: Add map styles filter.
  • Image radio field: New field created.
  • Posts field: Option to specify allowed post types.
  • Contact form: Add description to reCAPTCHA field specifying reCAPTCHA v2.
Download this release

Release Info

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

Code changes from version 1.15.2 to 1.15.3

Files changed (49) hide show
  1. base/base.php +1 -1
  2. base/inc/actions.php +8 -5
  3. base/inc/fields/css/image-radio-field.css +28 -0
  4. base/inc/fields/image-radio.class.php +75 -0
  5. base/inc/fields/js/image-radio-field.js +18 -0
  6. base/inc/fields/js/image-radio-field.min.js +1 -0
  7. base/inc/fields/posts.class.php +16 -2
  8. base/inc/fields/tinymce.class.php +1 -1
  9. base/inc/meta-box-manager.php +6 -1
  10. base/inc/routes/siteorigin-widgets-resource.class.php +14 -2
  11. base/inc/video.php +3 -0
  12. base/inc/widgets/base-slider.class.php +19 -1
  13. base/js/admin.js +65 -21
  14. base/js/admin.min.js +1 -1
  15. base/siteorigin-widget.class.php +1 -1
  16. compat/block-editor/widget-block.js +16 -4
  17. compat/block-editor/widget-block.min.js +1 -1
  18. compat/visual-composer/visual-composer.php +296 -296
  19. icons/fontawesome/style.css +6 -2
  20. js/slider/jquery.slider.js +21 -16
  21. js/slider/jquery.slider.min.js +1 -1
  22. js/sow.google-map.js +15 -6
  23. js/sow.google-map.min.js +1 -1
  24. lang/so-widgets-bundle.pot +334 -290
  25. readme.txt +28 -3
  26. so-widgets-bundle.php +6 -4
  27. widgets/accordion/js/accordion.js +9 -1
  28. widgets/accordion/js/accordion.min.js +1 -1
  29. widgets/accordion/styles/default.less +12 -3
  30. widgets/accordion/tpl/default.php +18 -15
  31. widgets/contact/contact.php +36 -4
  32. widgets/contact/tpl/default.php +1 -1
  33. widgets/features/styles/default.less +1 -0
  34. widgets/google-map/fields/js/location-field.js +16 -6
  35. widgets/google-map/fields/js/location-field.min.js +1 -1
  36. widgets/google-map/fields/location.class.php +21 -5
  37. widgets/google-map/google-map.php +121 -62
  38. widgets/google-map/js/static-map.js +19 -0
  39. widgets/google-map/js/static-map.min.js +1 -1
  40. widgets/google-map/tpl/static-map.php +2 -0
  41. widgets/hero/hero.php +1 -12
  42. widgets/image-grid/image-grid.php +69 -30
  43. widgets/image-grid/styles/default.less +11 -4
  44. widgets/image-grid/tpl/default.php +1 -4
  45. widgets/layout-slider/layout-slider.php +0 -11
  46. widgets/post-carousel/tpl/base.php +5 -4
  47. widgets/post-carousel/tpl/carousel-post-loop.php +4 -4
  48. widgets/social-media-buttons/social-media-buttons.php +10 -0
  49. widgets/social-media-buttons/tpl/default.php +1 -1
base/base.php CHANGED
@@ -94,7 +94,7 @@ function siteorigin_widget_get_icon($icon_value, $icon_styles = false) {
94
$family_style = 'sow-icon-' . $family . ( empty( $style ) ? '' : ' ' . $style );
95
$icon_data = $widget_icon_families[ $family ]['icons'][ $icon ];
96
$unicode = '';
97
- if ( ! empty( $icon_data['unicode'] ) ) {
98
$unicode = $icon_data['unicode'];
99
} else if ( is_string( $icon_data ) ) {
100
$unicode = $icon_data;
94
$family_style = 'sow-icon-' . $family . ( empty( $style ) ? '' : ' ' . $style );
95
$icon_data = $widget_icon_families[ $family ]['icons'][ $icon ];
96
$unicode = '';
97
+ if ( is_array($icon_data) && ! empty( $icon_data['unicode'] ) ) {
98
$unicode = $icon_data['unicode'];
99
} else if ( is_string( $icon_data ) ) {
100
$unicode = $icon_data;
base/inc/actions.php CHANGED
@@ -4,17 +4,20 @@
4
* Action for displaying the widget preview.
5
*/
6
function siteorigin_widget_preview_widget_action() {
7
- if ( empty( $_REQUEST['_widgets_nonce'] ) ||
8
- ! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' ) ) {
9
-
10
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
11
} else if ( empty( $_POST['class'] ) ) {
12
- wp_die( __( 'Invalid post.', 'so-widgets-bundle' ), 400 );
13
}
14
15
// Get the widget from the widget factory
16
global $wp_widget_factory;
17
- $widget = ! empty( $wp_widget_factory->widgets[ $_POST['class'] ] ) ? $wp_widget_factory->widgets[ $_POST['class'] ] : false;
18
19
if( ! is_a( $widget, 'SiteOrigin_Widget' ) ) {
20
wp_die( __( 'Invalid post.', 'so-widgets-bundle' ), 400 );
4
* Action for displaying the widget preview.
5
*/
6
function siteorigin_widget_preview_widget_action() {
7
+ if (
8
+ empty( $_REQUEST['_widgets_nonce'] ) ||
9
+ ! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' )
10
+ ) {
11
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
12
} else if ( empty( $_POST['class'] ) ) {
13
+ wp_die( __( 'Invalid widget.', 'so-widgets-bundle' ), 400 );
14
}
15
16
// Get the widget from the widget factory
17
global $wp_widget_factory;
18
+ $widget_class = str_replace('\\\\', '\\', $_POST['class']);
19
+
20
+ $widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
21
22
if( ! is_a( $widget, 'SiteOrigin_Widget' ) ) {
23
wp_die( __( 'Invalid post.', 'so-widgets-bundle' ), 400 );
base/inc/fields/css/image-radio-field.css ADDED
@@ -0,0 +1,28 @@
1
+ .siteorigin-widget-form .siteorigin-widget-field-type-image-radio .siteorigin-widget-image-radio-layout-horizontal {
2
+ display: grid;
3
+ grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
4
+ grid-gap: 12px;
5
+ }
6
+ .siteorigin-widget-form .siteorigin-widget-field-type-image-radio .siteorigin-widget-image-radio-items {
7
+ margin-bottom: 10px;
8
+ }
9
+ .siteorigin-widget-form .siteorigin-widget-field-type-image-radio label.so-image-radio {
10
+ display: flex;
11
+ align-items: center;
12
+ padding: 10px;
13
+ background-color: #f6f6f6;
14
+ border: 1px solid #e6e6e6;
15
+ }
16
+ .siteorigin-widget-form .siteorigin-widget-field-type-image-radio label.so-image-radio img {
17
+ max-width: 100px;
18
+ }
19
+ .siteorigin-widget-form .siteorigin-widget-field-type-image-radio label.so-image-radio input {
20
+ margin: 0 4px 0 10px;
21
+ }
22
+ .siteorigin-widget-form .siteorigin-widget-field-type-image-radio label.so-image-radio.so-selected {
23
+ background: #eaf2f6;
24
+ border-color: #c9d0d4;
25
+ }
26
+ .siteorigin-widget-form .siteorigin-widget-field-type-image-radio label.so-image-radio.so-selected img {
27
+ box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
28
+ }
base/inc/fields/image-radio.class.php ADDED
@@ -0,0 +1,75 @@
1
+ <?php
2
+
3
+ /**
4
+ * Class SiteOrigin_Widget_Field_Radio
5
+ */
6
+ class SiteOrigin_Widget_Field_Image_Radio extends SiteOrigin_Widget_Field_Base {
7
+ /**
8
+ * The list of options which may be selected.
9
+ *
10
+ * @access protected
11
+ * @var array
12
+ */
13
+ protected $options;
14
+
15
+ /**
16
+ * Whether the image options should be laid out vertically (default) or horizontally.
17
+ *
18
+ * @access protected
19
+ * @var string
20
+ */
21
+ protected $layout;
22
+
23
+ protected function get_default_options() {
24
+ return array(
25
+ 'layout' => 'vertical',
26
+ );
27
+ }
28
+
29
+ protected function render_field( $value, $instance ) {
30
+ if ( ! isset( $this->options ) || empty( $this->options ) ) return;
31
+ $i = 0;
32
+ ?>
33
+ <div class="siteorigin-widget-image-radio-items siteorigin-widget-image-radio-layout-<?php echo esc_attr( $this->layout )?>">
34
+ <?php
35
+ foreach( $this->options as $option_name => $option ) {
36
+ ?>
37
+ <label class="so-image-radio" for="<?php echo esc_attr( $this->element_id . '-' . $i ) ?>">
38
+ <img src="<?php echo esc_attr( $option['image'] ) ?>"/>
39
+ <input
40
+ type="radio" name="<?php echo esc_attr( $this->element_name ) ?>"
41
+ id="<?php echo esc_attr( $this->element_id . '-' . $i ) ?>" class="siteorigin-widget-input"
42
+ value="<?php echo esc_attr( $option_name ) ?>"
43
+ <?php checked( $option_name, $value ) ?>
44
+ ><?php echo esc_html( $option['label'] ) ?>
45
+ </label>
46
+ <?php
47
+ $i += 1;
48
+ }
49
+ ?></div><?php
50
+ }
51
+
52
+ protected function sanitize_field_input( $value, $instance ) {
53
+ $sanitized_value = $value;
54
+ $keys = array_keys( $this->options );
55
+ if( ! in_array( $sanitized_value, $keys ) ) $sanitized_value = isset( $this->default ) ? $this->default : false;
56
+ return $sanitized_value;
57
+ }
58
+
59
+ public function enqueue_scripts(){
60
+ wp_enqueue_style(
61
+ 'so-image-radio-field',
62
+ plugin_dir_url( __FILE__ ) . 'css/image-radio-field.css',
63
+ array(),
64
+ SOW_BUNDLE_VERSION
65
+ );
66
+
67
+ wp_enqueue_script(
68
+ 'so-image-radio-field',
69
+ plugin_dir_url(__FILE__) . 'js/image-radio-field' . SOW_BUNDLE_JS_SUFFIX . '.js',
70
+ array( 'jquery'),
71
+ SOW_BUNDLE_VERSION
72
+ );
73
+ }
74
+
75
+ }
base/inc/fields/js/image-radio-field.js ADDED
@@ -0,0 +1,18 @@
1
+ /* global jQuery, soWidgets */
2
+
3
+ ( function($){
4
+
5
+ $(document).on( 'sowsetupform', function(e) {
6
+ var $form = $(e.target);
7
+
8
+ $form.find( '.siteorigin-widget-field-type-image-radio' ).each( function(){
9
+ var $ = $( this );
10
+ $.find('input[type="radio"]:checked').parent().addClass('so-selected');
11
+ $.find('input[type="radio"]').on('change', function(){
12
+ $.find('input[type="radio"]').parent().removeClass('so-selected');
13
+ $.find('input[type="radio"]:checked').parent().addClass('so-selected');
14
+ });
15
+ } );
16
+ });
17
+
18
+ }( jQuery ) );
base/inc/fields/js/image-radio-field.min.js ADDED
@@ -0,0 +1 @@
1
+ !function(t){t(document).on("sowsetupform",function(e){t(e.target).find(".siteorigin-widget-field-type-image-radio").each(function(){var e=t(this);e.find('input[type="radio"]:checked').parent().addClass("so-selected"),e.find('input[type="radio"]').on("change",function(){e.find('input[type="radio"]').parent().removeClass("so-selected"),e.find('input[type="radio"]:checked').parent().addClass("so-selected")})})})}(jQuery);
base/inc/fields/posts.class.php CHANGED
@@ -4,15 +4,29 @@
4
* Class SiteOrigin_Widget_Field_Posts
5
*/
6
class SiteOrigin_Widget_Field_Posts extends SiteOrigin_Widget_Field_Container_Base {
7
8
public function __construct( $base_name, $element_id, $element_name, $field_options, SiteOrigin_Widget $for_widget, $parent_container = array() ) {
9
parent::__construct( $base_name, $element_id, $element_name, $field_options, $for_widget, $parent_container );
10
11
$types = get_post_types( array( 'public' => true ), 'objects' );
12
- $type_options = array( '_all' => __( 'All', 'so-widgets-bundle' ) );
13
14
foreach ( $types as $id => $type ) {
15
- $type_options[ $id ] = $type->labels->name;
16
}
17
18
$this->fields = array(
4
* Class SiteOrigin_Widget_Field_Posts
5
*/
6
class SiteOrigin_Widget_Field_Posts extends SiteOrigin_Widget_Field_Container_Base {
7
+
8
+ /**
9
+ * An array of post types to use in the query for posts when the 'Select Content' button is clicked.
10
+ *
11
+ * @access protected
12
+ * @var array
13
+ */
14
+ protected $post_types;
15
16
public function __construct( $base_name, $element_id, $element_name, $field_options, SiteOrigin_Widget $for_widget, $parent_container = array() ) {
17
parent::__construct( $base_name, $element_id, $element_name, $field_options, $for_widget, $parent_container );
18
19
$types = get_post_types( array( 'public' => true ), 'objects' );
20
+ $type_options = array();
21
+
22
+ if ( empty( $this->post_types ) || in_array( '_all', $this->post_types ) ) {
23
+ $type_options['_all'] = __( 'All', 'so-widgets-bundle' );
24
+ }
25
26
foreach ( $types as $id => $type ) {
27
+ if ( empty( $this->post_types ) || in_array( $id, $this->post_types ) ) {
28
+ $type_options[ $id ] = $type->labels->name;
29
+ }
30
}
31
32
$this->fields = array(
base/inc/fields/tinymce.class.php CHANGED
@@ -308,6 +308,7 @@ class SiteOrigin_Widget_Field_TinyMCE extends SiteOrigin_Widget_Field_Text_Input
308
protected function get_input_classes() {
309
$classes = parent::get_input_classes();
310
$classes[] = 'wp-editor-area';
311
return $classes;
312
}
313
@@ -415,7 +416,6 @@ class SiteOrigin_Widget_Field_TinyMCE extends SiteOrigin_Widget_Field_Text_Input
415
$value = preg_replace( '%</textarea%i', '&lt;/textarea', $value );
416
}
417
418
-
419
$media_buttons = $this->render_media_buttons( $this->element_id );
420
421
$settings['baseURL'] = includes_url( 'js/tinymce' );
308
protected function get_input_classes() {
309
$classes = parent::get_input_classes();
310
$classes[] = 'wp-editor-area';
311
+ $classes[] = 'wp-exclude-emoji';
312
return $classes;
313
}
314
416
$value = preg_replace( '%</textarea%i', '&lt;/textarea', $value );
417
}
418
419
$media_buttons = $this->render_media_buttons( $this->element_id );
420
421
$settings['baseURL'] = includes_url( 'js/tinymce' );
base/inc/meta-box-manager.php CHANGED
@@ -77,7 +77,12 @@ class SiteOrigin_Widget_Meta_Box_Manager extends SiteOrigin_Widget {
77
__( 'Widgets Bundle Post Meta Data', 'so-widgets-bundle' ),
78
array( $this, 'render_widgets_meta_box' ),
79
$post_type,
80
- 'advanced'
81
);
82
83
}
77
__( 'Widgets Bundle Post Meta Data', 'so-widgets-bundle' ),
78
array( $this, 'render_widgets_meta_box' ),
79
$post_type,
80
+ 'advanced',
81
+ 'default',
82
+ array(
83
+ '__back_compat_meta_box' => true,
84
+ '__block_editor_compatible_meta_box' => false,
85
+ )
86
);
87
88
}
base/inc/routes/siteorigin-widgets-resource.class.php CHANGED
@@ -95,7 +95,13 @@ class SiteOrigin_Widgets_Resource extends WP_REST_Controller {
95
$widget->form( $widget_data );
96
$widget_form = ob_get_clean();
97
} else {
98
- $widget_form = new WP_Error( '', 'Invalid widget class.' );
99
}
100
101
return rest_ensure_response( $widget_form );
@@ -137,7 +143,13 @@ class SiteOrigin_Widgets_Resource extends WP_REST_Controller {
137
$widget->widget( array(), $instance );
138
$rendered_widget = ob_get_clean();
139
} else {
140
- $rendered_widget = new WP_Error( '', 'Invalid widget class.' );
141
}
142
143
return rest_ensure_response( $rendered_widget );
95
$widget->form( $widget_data );
96
$widget_form = ob_get_clean();
97
} else {
98
+ $widget_form = new WP_Error(
99
+ 400,
100
+ 'Invalid or missing widget class: ' . $widget_class,
101
+ array(
102
+ 'status' => 400,
103
+ )
104
+ );
105
}
106
107
return rest_ensure_response( $widget_form );
143
$widget->widget( array(), $instance );
144
$rendered_widget = ob_get_clean();
145
} else {
146
+ $rendered_widget = new WP_Error(
147
+ 400,
148
+ 'Invalid or missing widget class: ' . $widget_class,
149
+ array(
150
+ 'status' => 400,
151
+ )
152
+ );
153
}
154
155
return rest_ensure_response( $rendered_widget );
base/inc/video.php CHANGED
@@ -46,6 +46,9 @@ class SiteOrigin_Video {
46
'autoplay' => $autoplay,
47
) ) );
48
49
$html = get_transient( 'sow-vid-embed[' . $hash . ']' );
50
if ( empty( $html ) ) {
51
$html = wp_oembed_get( $src, array( 'width' => $video_width ) );
46
'autoplay' => $autoplay,
47
) ) );
48
49
+ // Convert embed format to standard format to be compatible with wp_oembed_get
50
+ $src = preg_replace('/https?:\/\/www.youtube.com\/embed\/([^\/]+)/', 'https://www.youtube.com/watch?v=$1', $src);
51
+
52
$html = get_transient( 'sow-vid-embed[' . $hash . ']' );
53
if ( empty( $html ) ) {
54
$html = wp_oembed_get( $src, array( 'width' => $video_width ) );
base/inc/widgets/base-slider.class.php CHANGED
@@ -91,9 +91,14 @@ abstract class SiteOrigin_Widget_Base_Slider extends SiteOrigin_Widget {
91
'default' => '25',
92
),
93
94
'swipe' => array(
95
'type' => 'checkbox',
96
- 'label' => __( 'Swipe Control', 'so-widgets-bundle' ),
97
'description' => __( 'Allow users to swipe through frames on mobile devices.', 'so-widgets-bundle' ),
98
'default' => true,
99
),
@@ -147,12 +152,25 @@ abstract class SiteOrigin_Widget_Base_Slider extends SiteOrigin_Widget {
147
);
148
}
149
150
function slider_settings( $controls ){
151
return array(
152
'pagination' => true,
153
'speed' => empty( $controls['speed'] ) ? 1 : $controls['speed'],
154
'timeout' => $controls['timeout'],
155
'swipe' => $controls['swipe'],
156
);
157
}
158
91
'default' => '25',
92
),
93
94
+ 'nav_always_show_mobile' => array(
95
+ 'type' => 'checkbox',
96
+ 'label' => __( 'Always show navigation on mobile', 'so-widgets-bundle' ),
97
+ ),
98
+
99
'swipe' => array(
100
'type' => 'checkbox',
101
+ 'label' => __( 'Swipe control', 'so-widgets-bundle' ),
102
'description' => __( 'Allow users to swipe through frames on mobile devices.', 'so-widgets-bundle' ),
103
'default' => true,
104
),
152
);
153
}
154
155
+ function get_settings_form() {
156
+ return array(
157
+ 'responsive_breakpoint' => array(
158
+ 'type' => 'measurement',
159
+ 'label' => __( 'Responsive Breakpoint', 'so-widgets-bundle' ),
160
+ 'default' => '780px',
161
+ 'description' => __( "This setting controls when the Slider will switch to the responsive mode. This breakpoint will only be used if always show navigation on mobile is enabled. The default value is 780px.", 'so-widgets-bundle' )
162
+ )
163
+ );
164
+ }
165
+
166
function slider_settings( $controls ){
167
return array(
168
'pagination' => true,
169
'speed' => empty( $controls['speed'] ) ? 1 : $controls['speed'],
170
'timeout' => $controls['timeout'],
171
'swipe' => $controls['swipe'],
172
+ 'nav_always_show_mobile' => ! empty( $controls['nav_always_show_mobile'] ) ? true : '',
173
+ 'breakpoint' => ! empty( $controls['breakpoint'] ) ? $controls['breakpoint'] : '780px',
174
);
175
}
176
base/js/admin.js CHANGED
@@ -175,26 +175,31 @@ var sowbForms = window.sowbForms || {};
175
var data = JSON.parse( sessionStorage.getItem( _sow_form_id ) );
176
if ( data ) {
177
if ( data['_sow_form_timestamp'] > _sow_form_timestamp ) {
178
- var $newerNotification = $( '<div class="siteorigin-widget-form-notification">' +
179
- '<span>' + soWidgets.backup.newerVersion + '</span>' +
180
- '<a class="button button-small so-backup-restore">' + soWidgets.backup.restore + '</a>' +
181
- '<a class="button button-small so-backup-dismiss">' + soWidgets.backup.dismiss + '</a>' +
182
- '<div><small>' + soWidgets.backup.replaceWarning + '</small></div>' +
183
- '</div>' );
184
- $el.prepend( $newerNotification );
185
-
186
- $newerNotification.find( '.so-backup-restore' ).click( function () {
187
- sowbForms.setWidgetFormValues( $mainForm, data );
188
- $newerNotification.slideUp( 'fast', function () {
189
- $newerNotification.remove();
190
- } );
191
- } );
192
- $newerNotification.find( '.so-backup-dismiss' ).click( function () {
193
- $newerNotification.slideUp( 'fast', function () {
194
- sessionStorage.removeItem( _sow_form_id );
195
- $newerNotification.remove();
196
- } );
197
- } );
198
} else {
199
sessionStorage.removeItem( _sow_form_id );
200
}
@@ -417,7 +422,12 @@ var sowbForms = window.sowbForms || {};
417
if ( widgetFieldId !== false && ! emitter.hasOwnProperty( 'widgetFieldId' ) ) {
418
emitter.widgetFieldId = widgetFieldId;
419
emitter.args = emitter.args.map(function (arg) {
420
- return arg + '_' + widgetFieldId;
421
});
422
}
423
@@ -1225,6 +1235,40 @@ var sowbForms = window.sowbForms || {};
1225
}
1226
});
1227
};
1228
1229
// When we click on a widget top
1230
$('.widgets-holder-wrap').on('click', '.widget:has(.siteorigin-widget-form-main) .widget-top', function () {
175
var data = JSON.parse( sessionStorage.getItem( _sow_form_id ) );
176
if ( data ) {
177
if ( data['_sow_form_timestamp'] > _sow_form_timestamp ) {
178
+ sowbForms.displayNotice(
179
+ $el,
180
+ soWidgets.backup.newerVersion,
181
+ soWidgets.backup.replaceWarning,
182
+ [
183
+ {
184
+ label: soWidgets.backup.restore,
185
+ callback: function ( $notice ) {
186
+ sowbForms.setWidgetFormValues( $mainForm, data );
187
+ $notice.slideUp( 'fast', function () {
188
+ $notice.remove();
189
+ } );
190
+ },
191
+ },
192
+ {
193
+ label: soWidgets.backup.dismiss,
194
+ callback: function ( $notice ) {
195
+ $notice.slideUp( 'fast', function () {
196
+ sessionStorage.removeItem( _sow_form_id );
197
+ $notice.remove();
198
+ } );
199
+ },
200
+ },
201
+ ]
202
+ );
203
} else {
204
sessionStorage.removeItem( _sow_form_id );
205
}
422
if ( widgetFieldId !== false && ! emitter.hasOwnProperty( 'widgetFieldId' ) ) {
423
emitter.widgetFieldId = widgetFieldId;
424
emitter.args = emitter.args.map(function (arg) {
425
+ if ( emitter.callback === 'conditional' ) {
426
+ arg = arg.replace( /(.*)(\[.*)/, '$1_' + widgetFieldId + '$2' );
427
+ } else {
428
+ arg = arg + '_' + widgetFieldId;
429
+ }
430
+ return arg;
431
});
432
}
433
1235
}
1236
});
1237
};
1238
+
1239
+ sowbForms.displayNotice = function ( $container, title, message, buttons ) {
1240
+
1241
+ var $notice = $( '<div class="siteorigin-widget-form-notification"></div>' );
1242
+ if ( title ) {
1243
+ $notice.append( '<span>' + title + '</span>' );
1244
+ }
1245
+
1246
+ if ( buttons && buttons.length ) {
1247
+ buttons.forEach( function ( button ) {
1248
+ var buttonClasses = '';
1249
+ if ( button.classes && button.classes.length ) {
1250
+ buttonClasses = ' ' + button.classes.join( ' ' );
1251
+ }
1252
+ var $button = $( '<a class="button button-small' + buttonClasses + '">' + button.label + '</a>' );
1253
+
1254
+ if ( button.url ) {
1255
+ $button.attr( 'href', button.url );
1256
+ }
1257
+ if ( button.callback ) {
1258
+ $button.on( 'click', function () {
1259
+ button.callback( $notice );
1260
+ });
1261
+ }
1262
+
1263
+ $notice.append( $button );
1264
+ } );
1265
+ }
1266
+ if ( message ) {
1267
+ $notice.append( '<div><small>' + message + '</small></div>' );
1268
+ }
1269
+
1270
+ $container.prepend( $notice );
1271
+ };
1272
1273
// When we click on a widget top
1274
$('.widgets-holder-wrap').on('click', '.widget:has(.siteorigin-widget-form-main) .widget-top', function () {
base/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- var sowbForms=window.sowbForms||{};!function(C){C.fn.sowSetupForm=function(){return C(this).each(function(e,i){var o,t=C(i),y=!0,r=C("body"),n=t.find("input[name]");if(n.length&&-1!==n.attr("name").indexOf("__i__"))return this;if(t.is(".siteorigin-widget-form-main")){if(!0===t.data("sow-form-setup"))return!0;if(r.hasClass("widgets-php")&&!t.is(":visible")&&0===t.closest(".panel-dialog").length)return!0;t.on("sowstatechange",function(e,h,b){t.find("[data-state-handler]").each(function(){var e,i,t,r,n,a,s=C(this),o=C.extend({},s.data("state-handler"),y?s.data("state-handler-initial"):{});if(0===Object.keys(o).length)return!0;var d={},l=sowbForms.getContainerFieldId(s,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==l){var g={};for(var f in o)g[f.replace("{$repeater}",l)]=o[f];o=g}var c=sowbForms.getContainerFieldId(s,"widget",".siteorigin-widget-widget");if(!1!==c){var p={};for(var u in o){var m=u.match(/_else\[(.*)\]|(.*)\[(.*)\]/);p[m&&m.length&&void 0===m[1]?m[2]+"_"+c+"["+m[3]+"]":"_else["+m[1]+"_"+c+"]"]=o[u]}o=p}for(var w in o)if(n=!1,null!==(e=w.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?#x2F;))){if(i={group:"default",name:"",multi:!1},void 0!==e[2]?(i.group=e[1],i.name=e[3]):i.name=e[0],i.multi=void 0!==e[4],"_else"===i.group)i.group=i.name,i.name="",n=i.group===h&&void 0===d[i.group];else{a=i.name.split(",").map(function(e){return e.trim()});for(var v=0;v<a.length&&!(n=i.group===h&&a[v]===b);v++);}if(n){t=o[w],i.multi||(t=[t]);for(v=0;v<t.length;v++)(r=void 0!==t[v][1]&&Boolean(t[v][1])?s.find(t[v][1]):s)[t[v][0]].apply(r,void 0!==t[v][2]?t[v][2]:[]);d[i.group]=!0}}})}),t.sowSetupPreview();var a=(o=t).find(".siteorigin-widget-teaser");if(a.find(".dashicons-dismiss").click(function(){var e=C(this);C.get(e.data("dismiss-url")),a.slideUp("normal",function(){a.remove()})}),!t.data("backupDisabled")){var s=t.find("> .siteorigin-widgets-form-id").val(),d=t.find("> .siteorigin-widgets-form-timestamp"),l=parseInt(d.val()||0),g=JSON.parse(sessionStorage.getItem(s));if(g)if(g._sow_form_timestamp>l){var f=C('<div class="siteorigin-widget-form-notification"><span>'+soWidgets.backup.newerVersion+'</span><a class="button button-small so-backup-restore">'+soWidgets.backup.restore+'</a><a class="button button-small so-backup-dismiss">'+soWidgets.backup.dismiss+"</a><div><small>"+soWidgets.backup.replaceWarning+"</small></div></div>");t.prepend(f),f.find(".so-backup-restore").click(function(){sowbForms.setWidgetFormValues(o,g),f.slideUp("fast",function(){f.remove()})}),f.find(".so-backup-dismiss").click(function(){f.slideUp("fast",function(){sessionStorage.removeItem(s),f.remove()})})}else sessionStorage.removeItem(s);t.change(function(){d.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(t);sessionStorage.setItem(s,JSON.stringify(e))})}}else o=t.closest(".siteorigin-widget-form-main");o.find("> .siteorigin-widgets-form-id").val();var c=t.find("> .siteorigin-widget-field");c.find("> .siteorigin-widget-section").sowSetupForm();var p=c.find("> .siteorigin-widget-widget");p.find("> .siteorigin-widget-section").sowSetupForm(),p.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),c.find(".siteorigin-widget-input").each(function(e,i){null===C(i).data("original-name")&&C(i).data("original-name",C(i).attr("name"))}),c.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),t.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),c.find("> .siteorigin-widget-input-color").each(function(){var e=C(this),i={change:function(e,i){setTimeout(function(){C(e.target).trigger("change")},100)}};e.data("defaultColor")&&(i.defaultColor=e.data("defaultColor")),e.wpColorPicker(i)});var u=function(){C(this).toggleClass("siteorigin-widget-section-visible"),C(this).parent().find("> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section").slideToggle("fast",function(){(C(window).resize(),C(this).find("> .siteorigin-widget-field-container-state").val(C(this).is(":visible")?"open":"closed"),C(this).is(":visible"))&&C(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})};c.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").click(u),c.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").click(u),c.filter(".siteorigin-widget-field-type-slider").each(function(){var t=C(this),r=t.find('input[type="number"]'),n=t.find(".siteorigin-widget-value-slider");n.slider({max:parseFloat(r.attr("max")),min:parseFloat(r.attr("min")),step:parseFloat(r.attr("step")),value:parseFloat(r.val()),slide:function(e,i){r.val(parseFloat(i.value)),r.trigger("change")},change:function(e,i){t.find(".siteorigin-widget-slider-value").html(i.value)}}),r.change(function(e,i){i&&i.silent||n.slider("value",parseFloat(r.val()))})}),c.filter(".siteorigin-widget-field-type-link").each(function(){var n=C(this),t=function(){var e=n.find(".content-text-search"),i=e.val(),t=e.data("postTypes"),r=n.find("ul.posts").empty().addClass("loading");C.get(soWidgets.ajaxurl,{action:"so_widgets_search_posts",query:i,postTypes:t},function(e){for(var i=0;i<e.length;i++)""===e[i].label&&(e[i].label="&nbsp;"),r.append(C("<li>").addClass("post").html(e[i].label+"<span>("+e[i].type+")</span>").data(e[i]));r.removeClass("loading")})};n.find(".select-content-button, .button-close").click(function(e){e.preventDefault(),C(this).blur();var i=n.find(".existing-content-selector");i.toggle(),i.is(":visible")&&0===i.find("ul.posts li").length&&t()}),n.on("click",".posts li",function(e){e.preventDefault();var i=C(this);n.find("input.siteorigin-widget-input").val("post: "+i.data("value")),n.change(),n.find(".existing-content-selector").toggle()});var e=null;n.find(".content-text-search").keyup(function(){null!==e&&clearTimeout(e),e=setTimeout(function(){t()},500)})}),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&c.filter(".siteorigin-widget-field-type-builder").each(function(){C(this).find("> .siteorigin-page-builder-field").each(function(){var e=C(this);e.soPanelsSetupBuilderWidget({builderType:e.data("type")})})});var m=function(){var a=C(this),e=a.closest("[data-state-emitter]").data("state-emitter");if(void 0!==e){var i=function(e,i){if(void 0===sowEmitters[e.callback]||"_"===e.callback.substr(0,1))return i;if(a.is('[type="radio"]')&&!a.is(":checked"))return i;var t=sowbForms.getContainerFieldId(a,"repeater",".siteorigin-widget-field-repeater-item");!1!==t&&(e.args=e.args.map(function(e){return e.replace("{$repeater}",t)}));var r=sowbForms.getContainerFieldId(a,"widget",".siteorigin-widget-widget");!1===r||e.hasOwnProperty("widgetFieldId")||(e.widgetFieldId=r,e.args=e.args.map(function(e){return e+"_"+r}));var n=a.is('[type="checkbox"]')?a.is(":checked"):a.val();return C.extend(i,sowEmitters[e.callback](n,e.args))},t={default:""};void 0===e.length&&(e=[e]);for(var r=0;r<e.length;r++)t=i(e[r],t);var n=o.data("states");for(var s in void 0===n&&(n={default:""}),t)void 0!==n[s]&&t[s]===n[s]||(n[s]=t[s],o.trigger("sowstatechange",[s,t[s]]));o.data("states",n)}};c.filter("[data-state-emitter]").each(function(){var e=C(this).find(".siteorigin-widget-input");e.on("keyup change",m),e.each(function(){var e=C(this);e.is(":radio")?e.is(":checked")&&m.call(e[0]):m.call(e[0])})}),t.trigger("sowsetupform",c).data("sow-form-setup",!0),c.trigger("sowsetupformfield"),t.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(r.hasClass("wp-customizer")||r.hasClass("widgets-php"))&&t.closest(".ui-sortable").on("sortstop",function(e,i){i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}),y=!1})},C.fn.sowSetupPreview=function(){var r=C(this);r.siblings(".siteorigin-widget-preview").find("> a").click(function(e){e.preventDefault();var i=sowbForms.getWidgetFormValues(r),t=C(C("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");t.find('input[name="data"]').val(JSON.stringify(i)),t.find('input[name="class"]').val(r.data("class")),t.find("iframe").on("load",function(){C(this).css("visibility","visible")}),t.find("form").submit(),t.find(".close").click(function(){t.remove()})})},C.fn.sowSetupRepeater=function(){return C(this).each(function(e,i){var n=C(i),t=n.find(".siteorigin-widget-field-repeater-items"),a=n.data("repeater-name");t.bind("updateFieldPositions",function(){var e=C(this),i=e.find("> .siteorigin-widget-field-repeater-item");i.each(function(r,e){C(e).find(".siteorigin-widget-input").each(function(e,i){var t=C(i).data("repeater-positions");void 0===t&&(t={}),t[a]=r,C(i).data("repeater-positions",t)})}),e.find(".siteorigin-widget-input").each(function(e,i){var t=C(i),r=t.data("repeater-positions");if(void 0!==r){var n=t.attr("data-original-name");if(n||(t.attr("data-original-name",t.attr("name")),n=t.attr("name")),!n)return;if(r)for(var a in r)n=n.replace("#"+a+"#",r[a]);t.attr("name",n)}}),e.data("initialSetup")||(e.find(".siteorigin-widget-input").each(function(e,i){var t=C(i);t.prop("checked",t.prop("defaultChecked"))}),e.data("initialSetup",!0));var t=n.data("scroll-count")?parseInt(n.data("scroll-count")):0;if(0<t&&i.length>t){var r=i.first().outerHeight();e.css("max-height",r*t).css("overflow","auto")}else e.css("max-height","").css("overflow","")}),t.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){t.find('input[type="radio"].siteorigin-widget-input').attr("name",""),t.trigger("updateFieldPositions"),n.trigger("change")},sortstop:function(e,i){i.item.is(".siteorigin-widget-field-repeater-item")?i.item.find("> .siteorigin-widget-field-repeater-item-form").each(function(){C(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")}):i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield");n.trigger("change")}}),t.trigger("updateFieldPositions"),n.find("> .siteorigin-widget-field-repeater-add").disableSelection().click(function(e){e.preventDefault(),n.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",function(){C(window).resize()})}),n.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").click(function(e){e.preventDefault(),n.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",function(){C(window).resize()})})})},C.fn.sowAddRepeaterItem=function(){return C(this).each(function(e,i){var t=C(i),r=t.find("> .siteorigin-widget-field-repeater-items").children().length+1,n=C("<div>"+t.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");n.find(".siteorigin-widget-input[data-name]").each(function(){var e=C(this);0===e.closest(".siteorigin-widget-field-repeater-item-html").length&&e.attr("name",C(this).data("name"))});var a="";n.find("> .siteorigin-widget-field").each(function(e,i){var t=i.outerHTML;C(i).is(".siteorigin-widget-field-type-repeater")||(t=t.replace(/_id_/g,r)),a+=t});var s=void 0!==t.attr("readonly"),o=C('<div class="siteorigin-widget-field-repeater-item ui-draggable" />').append(C('<div class="siteorigin-widget-field-repeater-item-top" />').append(C('<div class="siteorigin-widget-field-expand" />')).append(s?"":C('<div class="siteorigin-widget-field-copy" />')).append(s?"":C('<div class="siteorigin-widget-field-remove" />')).append(C("<h4 />").html(t.data("item-name")))).append(C('<div class="siteorigin-widget-field-repeater-item-form" />').html(a));t.find("> .siteorigin-widget-field-repeater-items").append(o).sortable("refresh").trigger("updateFieldPositions"),o.sowSetupRepeaterItems(),o.hide().slideDown("fast",function(){C(window).resize()}),t.trigger("change")})},C.fn.sowRemoveRepeaterItem=function(){return C(this).each(function(e,i){var t=C(this).closest(".siteorigin-widget-field-repeater-items");C(this).remove(),t.sortable("refresh").trigger("updateFieldPositions"),C(i).trigger("change")})},C.fn.sowSetupRepeaterItems=function(){return C(this).each(function(e,i){var _=C(i);if(void 0===_.data("sowrepeater-actions-setup")){var t=_.closest(".siteorigin-widget-field-repeater"),r=_.find("> .siteorigin-widget-field-repeater-item-top"),n=t.data("item-label");if(n&&n.selector){var a=function(){var e=n.hasOwnProperty("valueMethod")&&n.valueMethod?n.valueMethod:"val",i=_.find(n.selector)[e]();i&&(80<i.length&&(i=i.substr(0,79)+"..."),r.find("h4").text(i))};a();var s=n.hasOwnProperty("updateEvent")&&n.updateEvent?n.updateEvent:"change";_.bind(s,a)}r.click(function(e){"siteorigin-widget-field-remove"!==e.target.className&&"siteorigin-widget-field-copy"!==e.target.className&&(e.preventDefault(),C(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",function(){(C(window).resize(),C(this).is(":visible"))?(C(this).trigger("slideToggleOpenComplete"),C(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")):C(this).trigger("slideToggleCloseComplete")}))}),r.find(".siteorigin-widget-field-remove").click(function(e,i){e.preventDefault();var t=C(this).closest(".siteorigin-widget-field-repeater-items"),r=C(this).closest(".siteorigin-widget-field-repeater-item"),n=function(){r.remove(),t.sortable("refresh").trigger("updateFieldPositions"),C(window).resize()};i&&i.silent?n():confirm(soWidgets.sure)&&r.slideUp("fast",n),_.trigger("change")}),r.find(".siteorigin-widget-field-copy").click(function(e){e.preventDefault();var h=C(this).closest(".siteorigin-widget-form-main"),b=C(this).closest(".siteorigin-widget-field-repeater-item"),y=b.clone(),i=b.closest(".siteorigin-widget-field-repeater-items"),F=i.children().length,k={};y.find("*[name]").each(function(){var e=C(this),i=e.attr("id"),t=e.attr("name");if(e.is("textarea")&&e.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){e.parent().empty().append(e),e.css("display","");var r=tinymce.get(i);r&&e.val(r.getContent())}else if(e.is(".wp-color-picker")){var n=e.closest(".wp-picker-container"),a=e.closest(".siteorigin-widget-field");n.remove(),a.append(e.remove())}else{var s=i?b.find("#"+i):b.find('[name="'+t+'"]');s.length&&null!=s.val()&&e.val(s.val())}if(i){var o,d;if(e.is('[type="radio"]')){o=i.replace(/-\d+-\d+#x2F;,"");var l=i.replace(/-\d+#x2F;,"");if(!k[o]){var g={};k[o]=h.find(".siteorigin-widget-input[id^="+o+"]").not("[id*=_id_]").filter(function(e,i){var t=C(i).attr("name");return!g[t]&&(g[t]=!0)}).length+1}var f=o+"-"+k[o];d=f+i.match(/-\d+#x2F;)[0],y.find("label[for="+l+"]").attr("for",f)}else u=new RegExp("-\\d+quot;),o=i.replace(u,""),k[o]||(k[o]=h.find(".siteorigin-widget-input[id^="+o+"]").not("[id*=_id_]").length+1),d=o+"-"+k[o]++;if(e.attr("id",d),e.is(".wp-editor-area")){var c=e.closest(".siteorigin-widget-tinymce-container"),p=c.data("media-buttons");if(p&&p.html){var u=new RegExp(i,"g");p.html=p.html.replace(u,d),c.data("media-buttons",p)}}y.find("label[for="+i+"]").attr("for",d),y.find("[id*="+i+"]").each(function(){var e=C(this).attr("id").replace(i,d);C(this).attr("id",e)}),"undefined"!=typeof tinymce&&tinymce.get(d)&&tinymce.get(d).remove()}var m=b.parents(".siteorigin-widget-field-repeater").length,w=C("body");(w.hasClass("wp-customizer")||w.hasClass("widgets-php"))&&0===_.closest(".panel-dialog").length&&(m+=1);var v=t.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(m-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+F.toString()+"$3");e.attr("name",v),e.data("original-name",v)}),i.append(y).sortable("refresh").trigger("updateFieldPositions"),y.sowSetupRepeaterItems(),y.hide().slideDown("fast",function(){C(window).resize()}),_.trigger("change")}),_.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),_.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]?C.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(e){if(_.isUndefined(e))return null;var l={};return e.find("*[name]").each(function(){var i=C(this);try{var e=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(e))return!0;var t=(e=e[1]).split("][");t=t.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var r=l,n=null,a=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===a)n=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===a){if(!i.is(":checked"))return;n=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var s=null;"undefined"!=typeof tinyMCE&&(s=tinyMCE.get(i.attr("id"))),n=null===s||"function"!=typeof s.getContent||s.isHidden()?i.val():s.getContent()}else if("SELECT"===i.prop("tagName")){var o=i.find("option:selected");1===o.length?n=i.find("option:selected").val():1<o.length&&(n=_.map(i.find("option:selected"),function(e,i){return C(e).val()}))}else n=i.val();for(var d=0;d<t.length;d++)d===t.length-1?""===t[d]?r.push(n):r[t[d]]=n:(_.isUndefined(r[t[d]])&&(_.isNumber(t[d+1])||""===t[d+1]?r[t[d]]=[]:r[t[d]]={}),r=r[t[d]])}catch(e){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+e.message)}}),l},sowbForms.setWidgetFormValues=function(e,d,v,l){v=v||!1,l=void 0!==l&&l||void 0===l;var i=0,h=function(e,w){10!=++i&&e.find("> .siteorigin-widget-field-type-repeater,> .siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field-type-repeater").each(function(e,i){var t=C(this),r=t.find("> .siteorigin-widget-field-repeater"),n=r.data("repeaterName"),a=w.hasOwnProperty(n)?w[n]:null;if(t.parent().is(".siteorigin-widget-section")){var s=r.data("element-name");s=s.replace(/\[#.*?#\]/g,"");for(var o=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(s)[1].split("]["),d=o.length?w:null;o.length;){var l=o.shift();d=d.hasOwnProperty(l)?d[l]:d}a=d}if(a&&Array.isArray(a)){var g=r.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),f=a.length,c=g.length;if(c<f)for(var p=0;p<f-c;p++)r.find("> .siteorigin-widget-field-repeater-add").click();else if(!v&&f<c)for(var u=f;u<c;u++){C(g.eq(u)).find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}g=r.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var m=0;m<g.length;m++)g.eq(m).find("> .siteorigin-widget-field-repeater-item-form"),h(g.eq(m).find("> .siteorigin-widget-field-repeater-item-form"),a[m])}}),--i};h(e,d),e.find("*[name]").each(function(){var e=C(this),i=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(e.attr("name"));if(null==i)return!0;var t=(i=i[1]).split("][");t=t.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});for(var r,n=d,a=0;a<t.length;a++){if(!n.hasOwnProperty(t[a])){if(v)return!0;break}a===t.length-1?r=n[t[a]]:n=n[t[a]]}if("checkbox"===e.attr("type"))e.prop("checked",r);else if("radio"===e.attr("type"))e.prop("checked",r===e.val());else if("TEXTAREA"===e.prop("tagName")&&e.hasClass("wp-editor-area")){var s=null;"undefined"!=typeof tinyMCE&&(s=tinyMCE.get(e.attr("id"))),null!==s&&"function"==typeof s.setContent&&!s.isHidden()&&e.parent().is(":visible")?s.initialized?s.setContent(r):s.on("init",function(){s.setContent(r)}):e.val(r)}else if(e.is(".panels-data")){e.val(r);var o=e.data("builder");o&&o.setDataField(e)}else e.val(r);l&&e.trigger("change")})},C(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",function(){var e=C(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout(function(){e.sowSetupForm()},200)});var e=C("body");e.hasClass("wp-customizer")&&C(document).on("widget-added",function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()}),e.hasClass("block-editor-page")&&C(document).on("panels_setup_preview",function(){C(sowb).trigger("setup_widgets",{preview:!0})}),C(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")}),C(function(){C(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+") *quot;).exec(e);if(null===t)return!1;var r="",n="default";return r=void 0!==t[3]?(n=t[1],t[3]):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(C){C.fn.sowSetupForm=function(){return C(this).each(function(e,i){var o,t=C(i),y=!0,r=C("body"),n=t.find("input[name]");if(n.length&&-1!==n.attr("name").indexOf("__i__"))return this;if(t.is(".siteorigin-widget-form-main")){if(!0===t.data("sow-form-setup"))return!0;if(r.hasClass("widgets-php")&&!t.is(":visible")&&0===t.closest(".panel-dialog").length)return!0;t.on("sowstatechange",function(e,h,b){t.find("[data-state-handler]").each(function(){var e,i,t,r,n,a,s=C(this),o=C.extend({},s.data("state-handler"),y?s.data("state-handler-initial"):{});if(0===Object.keys(o).length)return!0;var d={},l=sowbForms.getContainerFieldId(s,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==l){var g={};for(var f in o)g[f.replace("{$repeater}",l)]=o[f];o=g}var c=sowbForms.getContainerFieldId(s,"widget",".siteorigin-widget-widget");if(!1!==c){var p={};for(var u in o){var m=u.match(/_else\[(.*)\]|(.*)\[(.*)\]/);p[m&&m.length&&void 0===m[1]?m[2]+"_"+c+"["+m[3]+"]":"_else["+m[1]+"_"+c+"]"]=o[u]}o=p}for(var w in o)if(n=!1,null!==(e=w.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?#x2F;))){if(i={group:"default",name:"",multi:!1},void 0!==e[2]?(i.group=e[1],i.name=e[3]):i.name=e[0],i.multi=void 0!==e[4],"_else"===i.group)i.group=i.name,i.name="",n=i.group===h&&void 0===d[i.group];else{a=i.name.split(",").map(function(e){return e.trim()});for(var v=0;v<a.length&&!(n=i.group===h&&a[v]===b);v++);}if(n){t=o[w],i.multi||(t=[t]);for(v=0;v<t.length;v++)(r=void 0!==t[v][1]&&Boolean(t[v][1])?s.find(t[v][1]):s)[t[v][0]].apply(r,void 0!==t[v][2]?t[v][2]:[]);d[i.group]=!0}}})}),t.sowSetupPreview();var a=(o=t).find(".siteorigin-widget-teaser");if(a.find(".dashicons-dismiss").click(function(){var e=C(this);C.get(e.data("dismiss-url")),a.slideUp("normal",function(){a.remove()})}),!t.data("backupDisabled")){var s=t.find("> .siteorigin-widgets-form-id").val(),d=t.find("> .siteorigin-widgets-form-timestamp"),l=parseInt(d.val()||0),g=JSON.parse(sessionStorage.getItem(s));g&&(g._sow_form_timestamp>l?sowbForms.displayNotice(t,soWidgets.backup.newerVersion,soWidgets.backup.replaceWarning,[{label:soWidgets.backup.restore,callback:function(e){sowbForms.setWidgetFormValues(o,g),e.slideUp("fast",function(){e.remove()})}},{label:soWidgets.backup.dismiss,callback:function(e){e.slideUp("fast",function(){sessionStorage.removeItem(s),e.remove()})}}]):sessionStorage.removeItem(s)),t.change(function(){d.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(t);sessionStorage.setItem(s,JSON.stringify(e))})}}else o=t.closest(".siteorigin-widget-form-main");o.find("> .siteorigin-widgets-form-id").val();var f=t.find("> .siteorigin-widget-field");f.find("> .siteorigin-widget-section").sowSetupForm();var c=f.find("> .siteorigin-widget-widget");c.find("> .siteorigin-widget-section").sowSetupForm(),c.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),f.find(".siteorigin-widget-input").each(function(e,i){null===C(i).data("original-name")&&C(i).data("original-name",C(i).attr("name"))}),f.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),t.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),f.find("> .siteorigin-widget-input-color").each(function(){var e=C(this),i={change:function(e,i){setTimeout(function(){C(e.target).trigger("change")},100)}};e.data("defaultColor")&&(i.defaultColor=e.data("defaultColor")),e.wpColorPicker(i)});var p=function(){C(this).toggleClass("siteorigin-widget-section-visible"),C(this).parent().find("> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section").slideToggle("fast",function(){(C(window).resize(),C(this).find("> .siteorigin-widget-field-container-state").val(C(this).is(":visible")?"open":"closed"),C(this).is(":visible"))&&C(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})};f.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").click(p),f.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").click(p),f.filter(".siteorigin-widget-field-type-slider").each(function(){var t=C(this),r=t.find('input[type="number"]'),n=t.find(".siteorigin-widget-value-slider");n.slider({max:parseFloat(r.attr("max")),min:parseFloat(r.attr("min")),step:parseFloat(r.attr("step")),value:parseFloat(r.val()),slide:function(e,i){r.val(parseFloat(i.value)),r.trigger("change")},change:function(e,i){t.find(".siteorigin-widget-slider-value").html(i.value)}}),r.change(function(e,i){i&&i.silent||n.slider("value",parseFloat(r.val()))})}),f.filter(".siteorigin-widget-field-type-link").each(function(){var n=C(this),t=function(){var e=n.find(".content-text-search"),i=e.val(),t=e.data("postTypes"),r=n.find("ul.posts").empty().addClass("loading");C.get(soWidgets.ajaxurl,{action:"so_widgets_search_posts",query:i,postTypes:t},function(e){for(var i=0;i<e.length;i++)""===e[i].label&&(e[i].label="&nbsp;"),r.append(C("<li>").addClass("post").html(e[i].label+"<span>("+e[i].type+")</span>").data(e[i]));r.removeClass("loading")})};n.find(".select-content-button, .button-close").click(function(e){e.preventDefault(),C(this).blur();var i=n.find(".existing-content-selector");i.toggle(),i.is(":visible")&&0===i.find("ul.posts li").length&&t()}),n.on("click",".posts li",function(e){e.preventDefault();var i=C(this);n.find("input.siteorigin-widget-input").val("post: "+i.data("value")),n.change(),n.find(".existing-content-selector").toggle()});var e=null;n.find(".content-text-search").keyup(function(){null!==e&&clearTimeout(e),e=setTimeout(function(){t()},500)})}),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&f.filter(".siteorigin-widget-field-type-builder").each(function(){C(this).find("> .siteorigin-page-builder-field").each(function(){var e=C(this);e.soPanelsSetupBuilderWidget({builderType:e.data("type")})})});var u=function(){var a=C(this),e=a.closest("[data-state-emitter]").data("state-emitter");if(void 0!==e){var i=function(i,e){if(void 0===sowEmitters[i.callback]||"_"===i.callback.substr(0,1))return e;if(a.is('[type="radio"]')&&!a.is(":checked"))return e;var t=sowbForms.getContainerFieldId(a,"repeater",".siteorigin-widget-field-repeater-item");!1!==t&&(i.args=i.args.map(function(e){return e.replace("{$repeater}",t)}));var r=sowbForms.getContainerFieldId(a,"widget",".siteorigin-widget-widget");!1===r||i.hasOwnProperty("widgetFieldId")||(i.widgetFieldId=r,i.args=i.args.map(function(e){return e="conditional"===i.callback?e.replace(/(.*)(\[.*)/,"$1_"+r+"$2"):e+"_"+r}));var n=a.is('[type="checkbox"]')?a.is(":checked"):a.val();return C.extend(e,sowEmitters[i.callback](n,i.args))},t={default:""};void 0===e.length&&(e=[e]);for(var r=0;r<e.length;r++)t=i(e[r],t);var n=o.data("states");for(var s in void 0===n&&(n={default:""}),t)void 0!==n[s]&&t[s]===n[s]||(n[s]=t[s],o.trigger("sowstatechange",[s,t[s]]));o.data("states",n)}};f.filter("[data-state-emitter]").each(function(){var e=C(this).find(".siteorigin-widget-input");e.on("keyup change",u),e.each(function(){var e=C(this);e.is(":radio")?e.is(":checked")&&u.call(e[0]):u.call(e[0])})}),t.trigger("sowsetupform",f).data("sow-form-setup",!0),f.trigger("sowsetupformfield"),t.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(r.hasClass("wp-customizer")||r.hasClass("widgets-php"))&&t.closest(".ui-sortable").on("sortstop",function(e,i){i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}),y=!1})},C.fn.sowSetupPreview=function(){var r=C(this);r.siblings(".siteorigin-widget-preview").find("> a").click(function(e){e.preventDefault();var i=sowbForms.getWidgetFormValues(r),t=C(C("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");t.find('input[name="data"]').val(JSON.stringify(i)),t.find('input[name="class"]').val(r.data("class")),t.find("iframe").on("load",function(){C(this).css("visibility","visible")}),t.find("form").submit(),t.find(".close").click(function(){t.remove()})})},C.fn.sowSetupRepeater=function(){return C(this).each(function(e,i){var n=C(i),t=n.find(".siteorigin-widget-field-repeater-items"),a=n.data("repeater-name");t.bind("updateFieldPositions",function(){var e=C(this),i=e.find("> .siteorigin-widget-field-repeater-item");i.each(function(r,e){C(e).find(".siteorigin-widget-input").each(function(e,i){var t=C(i).data("repeater-positions");void 0===t&&(t={}),t[a]=r,C(i).data("repeater-positions",t)})}),e.find(".siteorigin-widget-input").each(function(e,i){var t=C(i),r=t.data("repeater-positions");if(void 0!==r){var n=t.attr("data-original-name");if(n||(t.attr("data-original-name",t.attr("name")),n=t.attr("name")),!n)return;if(r)for(var a in r)n=n.replace("#"+a+"#",r[a]);t.attr("name",n)}}),e.data("initialSetup")||(e.find(".siteorigin-widget-input").each(function(e,i){var t=C(i);t.prop("checked",t.prop("defaultChecked"))}),e.data("initialSetup",!0));var t=n.data("scroll-count")?parseInt(n.data("scroll-count")):0;if(0<t&&i.length>t){var r=i.first().outerHeight();e.css("max-height",r*t).css("overflow","auto")}else e.css("max-height","").css("overflow","")}),t.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){t.find('input[type="radio"].siteorigin-widget-input').attr("name",""),t.trigger("updateFieldPositions"),n.trigger("change")},sortstop:function(e,i){i.item.is(".siteorigin-widget-field-repeater-item")?i.item.find("> .siteorigin-widget-field-repeater-item-form").each(function(){C(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")}):i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield");n.trigger("change")}}),t.trigger("updateFieldPositions"),n.find("> .siteorigin-widget-field-repeater-add").disableSelection().click(function(e){e.preventDefault(),n.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",function(){C(window).resize()})}),n.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").click(function(e){e.preventDefault(),n.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",function(){C(window).resize()})})})},C.fn.sowAddRepeaterItem=function(){return C(this).each(function(e,i){var t=C(i),r=t.find("> .siteorigin-widget-field-repeater-items").children().length+1,n=C("<div>"+t.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");n.find(".siteorigin-widget-input[data-name]").each(function(){var e=C(this);0===e.closest(".siteorigin-widget-field-repeater-item-html").length&&e.attr("name",C(this).data("name"))});var a="";n.find("> .siteorigin-widget-field").each(function(e,i){var t=i.outerHTML;C(i).is(".siteorigin-widget-field-type-repeater")||(t=t.replace(/_id_/g,r)),a+=t});var s=void 0!==t.attr("readonly"),o=C('<div class="siteorigin-widget-field-repeater-item ui-draggable" />').append(C('<div class="siteorigin-widget-field-repeater-item-top" />').append(C('<div class="siteorigin-widget-field-expand" />')).append(s?"":C('<div class="siteorigin-widget-field-copy" />')).append(s?"":C('<div class="siteorigin-widget-field-remove" />')).append(C("<h4 />").html(t.data("item-name")))).append(C('<div class="siteorigin-widget-field-repeater-item-form" />').html(a));t.find("> .siteorigin-widget-field-repeater-items").append(o).sortable("refresh").trigger("updateFieldPositions"),o.sowSetupRepeaterItems(),o.hide().slideDown("fast",function(){C(window).resize()}),t.trigger("change")})},C.fn.sowRemoveRepeaterItem=function(){return C(this).each(function(e,i){var t=C(this).closest(".siteorigin-widget-field-repeater-items");C(this).remove(),t.sortable("refresh").trigger("updateFieldPositions"),C(i).trigger("change")})},C.fn.sowSetupRepeaterItems=function(){return C(this).each(function(e,i){var _=C(i);if(void 0===_.data("sowrepeater-actions-setup")){var t=_.closest(".siteorigin-widget-field-repeater"),r=_.find("> .siteorigin-widget-field-repeater-item-top"),n=t.data("item-label");if(n&&n.selector){var a=function(){var e=n.hasOwnProperty("valueMethod")&&n.valueMethod?n.valueMethod:"val",i=_.find(n.selector)[e]();i&&(80<i.length&&(i=i.substr(0,79)+"..."),r.find("h4").text(i))};a();var s=n.hasOwnProperty("updateEvent")&&n.updateEvent?n.updateEvent:"change";_.bind(s,a)}r.click(function(e){"siteorigin-widget-field-remove"!==e.target.className&&"siteorigin-widget-field-copy"!==e.target.className&&(e.preventDefault(),C(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",function(){(C(window).resize(),C(this).is(":visible"))?(C(this).trigger("slideToggleOpenComplete"),C(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")):C(this).trigger("slideToggleCloseComplete")}))}),r.find(".siteorigin-widget-field-remove").click(function(e,i){e.preventDefault();var t=C(this).closest(".siteorigin-widget-field-repeater-items"),r=C(this).closest(".siteorigin-widget-field-repeater-item"),n=function(){r.remove(),t.sortable("refresh").trigger("updateFieldPositions"),C(window).resize()};i&&i.silent?n():confirm(soWidgets.sure)&&r.slideUp("fast",n),_.trigger("change")}),r.find(".siteorigin-widget-field-copy").click(function(e){e.preventDefault();var h=C(this).closest(".siteorigin-widget-form-main"),b=C(this).closest(".siteorigin-widget-field-repeater-item"),y=b.clone(),i=b.closest(".siteorigin-widget-field-repeater-items"),F=i.children().length,k={};y.find("*[name]").each(function(){var e=C(this),i=e.attr("id"),t=e.attr("name");if(e.is("textarea")&&e.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){e.parent().empty().append(e),e.css("display","");var r=tinymce.get(i);r&&e.val(r.getContent())}else if(e.is(".wp-color-picker")){var n=e.closest(".wp-picker-container"),a=e.closest(".siteorigin-widget-field");n.remove(),a.append(e.remove())}else{var s=i?b.find("#"+i):b.find('[name="'+t+'"]');s.length&&null!=s.val()&&e.val(s.val())}if(i){var o,d;if(e.is('[type="radio"]')){o=i.replace(/-\d+-\d+#x2F;,"");var l=i.replace(/-\d+#x2F;,"");if(!k[o]){var g={};k[o]=h.find(".siteorigin-widget-input[id^="+o+"]").not("[id*=_id_]").filter(function(e,i){var t=C(i).attr("name");return!g[t]&&(g[t]=!0)}).length+1}var f=o+"-"+k[o];d=f+i.match(/-\d+#x2F;)[0],y.find("label[for="+l+"]").attr("for",f)}else u=new RegExp("-\\d+quot;),o=i.replace(u,""),k[o]||(k[o]=h.find(".siteorigin-widget-input[id^="+o+"]").not("[id*=_id_]").length+1),d=o+"-"+k[o]++;if(e.attr("id",d),e.is(".wp-editor-area")){var c=e.closest(".siteorigin-widget-tinymce-container"),p=c.data("media-buttons");if(p&&p.html){var u=new RegExp(i,"g");p.html=p.html.replace(u,d),c.data("media-buttons",p)}}y.find("label[for="+i+"]").attr("for",d),y.find("[id*="+i+"]").each(function(){var e=C(this).attr("id").replace(i,d);C(this).attr("id",e)}),"undefined"!=typeof tinymce&&tinymce.get(d)&&tinymce.get(d).remove()}var m=b.parents(".siteorigin-widget-field-repeater").length,w=C("body");(w.hasClass("wp-customizer")||w.hasClass("widgets-php"))&&0===_.closest(".panel-dialog").length&&(m+=1);var v=t.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(m-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+F.toString()+"$3");e.attr("name",v),e.data("original-name",v)}),i.append(y).sortable("refresh").trigger("updateFieldPositions"),y.sowSetupRepeaterItems(),y.hide().slideDown("fast",function(){C(window).resize()}),_.trigger("change")}),_.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),_.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]?C.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(e){if(_.isUndefined(e))return null;var l={};return e.find("*[name]").each(function(){var i=C(this);try{var e=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(e))return!0;var t=(e=e[1]).split("][");t=t.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var r=l,n=null,a=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===a)n=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===a){if(!i.is(":checked"))return;n=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var s=null;"undefined"!=typeof tinyMCE&&(s=tinyMCE.get(i.attr("id"))),n=null===s||"function"!=typeof s.getContent||s.isHidden()?i.val():s.getContent()}else if("SELECT"===i.prop("tagName")){var o=i.find("option:selected");1===o.length?n=i.find("option:selected").val():1<o.length&&(n=_.map(i.find("option:selected"),function(e,i){return C(e).val()}))}else n=i.val();for(var d=0;d<t.length;d++)d===t.length-1?""===t[d]?r.push(n):r[t[d]]=n:(_.isUndefined(r[t[d]])&&(_.isNumber(t[d+1])||""===t[d+1]?r[t[d]]=[]:r[t[d]]={}),r=r[t[d]])}catch(e){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+e.message)}}),l},sowbForms.setWidgetFormValues=function(e,d,v,l){v=v||!1,l=void 0!==l&&l||void 0===l;var i=0,h=function(e,w){10!=++i&&e.find("> .siteorigin-widget-field-type-repeater,> .siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field-type-repeater").each(function(e,i){var t=C(this),r=t.find("> .siteorigin-widget-field-repeater"),n=r.data("repeaterName"),a=w.hasOwnProperty(n)?w[n]:null;if(t.parent().is(".siteorigin-widget-section")){var s=r.data("element-name");s=s.replace(/\[#.*?#\]/g,"");for(var o=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(s)[1].split("]["),d=o.length?w:null;o.length;){var l=o.shift();d=d.hasOwnProperty(l)?d[l]:d}a=d}if(a&&Array.isArray(a)){var g=r.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),f=a.length,c=g.length;if(c<f)for(var p=0;p<f-c;p++)r.find("> .siteorigin-widget-field-repeater-add").click();else if(!v&&f<c)for(var u=f;u<c;u++){C(g.eq(u)).find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}g=r.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var m=0;m<g.length;m++)g.eq(m).find("> .siteorigin-widget-field-repeater-item-form"),h(g.eq(m).find("> .siteorigin-widget-field-repeater-item-form"),a[m])}}),--i};h(e,d),e.find("*[name]").each(function(){var e=C(this),i=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(e.attr("name"));if(null==i)return!0;var t=(i=i[1]).split("][");t=t.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});for(var r,n=d,a=0;a<t.length;a++){if(!n.hasOwnProperty(t[a])){if(v)return!0;break}a===t.length-1?r=n[t[a]]:n=n[t[a]]}if("checkbox"===e.attr("type"))e.prop("checked",r);else if("radio"===e.attr("type"))e.prop("checked",r===e.val());else if("TEXTAREA"===e.prop("tagName")&&e.hasClass("wp-editor-area")){var s=null;"undefined"!=typeof tinyMCE&&(s=tinyMCE.get(e.attr("id"))),null!==s&&"function"==typeof s.setContent&&!s.isHidden()&&e.parent().is(":visible")?s.initialized?s.setContent(r):s.on("init",function(){s.setContent(r)}):e.val(r)}else if(e.is(".panels-data")){e.val(r);var o=e.data("builder");o&&o.setDataField(e)}else e.val(r);l&&e.trigger("change")})},sowbForms.displayNotice=function(e,i,t,r){var n=C('<div class="siteorigin-widget-form-notification"></div>');i&&n.append("<span>"+i+"</span>"),r&&r.length&&r.forEach(function(e){var i="";e.classes&&e.classes.length&&(i=" "+e.classes.join(" "));var t=C('<a class="button button-small'+i+'">'+e.label+"</a>");e.url&&t.attr("href",e.url),e.callback&&t.on("click",function(){e.callback(n)}),n.append(t)}),t&&n.append("<div><small>"+t+"</small></div>"),e.prepend(n)},C(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",function(){var e=C(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout(function(){e.sowSetupForm()},200)});var e=C("body");e.hasClass("wp-customizer")&&C(document).on("widget-added",function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()}),e.hasClass("block-editor-page")&&C(document).on("panels_setup_preview",function(){C(sowb).trigger("setup_widgets",{preview:!0})}),C(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")}),C(function(){C(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+") *quot;).exec(e);if(null===t)return!1;var r="",n="default";return r=void 0!==t[3]?(n=t[1],t[3]):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
@@ -1366,7 +1366,7 @@ abstract class SiteOrigin_Widget extends WP_Widget {
1366
* @return bool
1367
*/
1368
function show_preview_button(){
1369
- $show_preview = $this->widget_options['has_preview'] && ! $this->is_customize_preview();
1370
$show_preview = apply_filters( 'siteorigin_widgets_form_show_preview_button', $show_preview, $this );
1371
return $show_preview;
1372
}
1366
* @return bool
1367
*/
1368
function show_preview_button(){
1369
+ $show_preview = ! empty( $this->widget_options['has_preview'] ) && ! $this->is_customize_preview();
1370
$show_preview = apply_filters( 'siteorigin_widgets_form_show_preview_button', $show_preview, $this );
1371
return $show_preview;
1372
}
compat/block-editor/widget-block.js CHANGED
@@ -142,9 +142,14 @@
142
widgetData: props.attributes.widgetData,
143
}
144
} )
145
- .then( function( widgetForm ) {
146
props.setState( { widgetFormHtml: widgetForm } );
147
- } );
148
}
149
150
var widgetForm = props.widgetFormHtml ? props.widgetFormHtml : '';
@@ -211,12 +216,19 @@
211
widgetData: props.attributes.widgetData || {}
212
}
213
} )
214
- .then( function( widgetPreview ) {
215
props.setState( {
216
widgetPreviewHtml: widgetPreview,
217
previewInitialized: false,
218
} );
219
- } );
220
}
221
var widgetPreview = props.widgetPreviewHtml ? props.widgetPreviewHtml : '';
222
return [
142
widgetData: props.attributes.widgetData,
143
}
144
} )
145
+ .done( function( widgetForm ) {
146
props.setState( { widgetFormHtml: widgetForm } );
147
+ } )
148
+ .fail( function ( response ) {
149
+ var error = response.responseJSON;
150
+
151
+ props.setState( { widgetFormHtml: '<div>' + error.message + '</div>', } );
152
+ });
153
}
154
155
var widgetForm = props.widgetFormHtml ? props.widgetFormHtml : '';
216
widgetData: props.attributes.widgetData || {}
217
}
218
} )
219
+ .done( function( widgetPreview ) {
220
props.setState( {
221
widgetPreviewHtml: widgetPreview,
222
previewInitialized: false,
223
} );
224
+ } )
225
+ .fail( function ( response ) {
226
+ var error = response.responseJSON;
227
+
228
+ props.setState( {
229
+ widgetPreviewHtml: '<div>' + error.message + '</div>',
230
+ } );
231
+ });
232
}
233
var widgetPreview = props.widgetPreviewHtml ? props.widgetPreviewHtml : '';
234
return [
compat/block-editor/widget-block.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t,i,n,o,s){var a=n.createElement,d=t.registerBlockType,r=e.BlockControls,l=o.SelectControl,w=s.withState,g=o.Toolbar,c=o.IconButton,u=o.Placeholder,m=o.Spinner,b=i.__;d("sowb/widget-block",{title:b("SiteOrigin Widget","so-widgets-bundle"),description:b("Select a SiteOrigin widget from the dropdown.","so-widgets-bundle"),icon:function(){return a("span",{className:"widget-icon so-widget-icon so-block-editor-icon"})},category:"widgets",keywords:[sowbBlockEditorAdmin.widgets.reduce(function(e,t){return 0<e.length&&(e+=","),e+t.name},"")],supports:{html:!1},attributes:{widgetClass:{type:"string"},widgetData:{type:"object"}},edit:w({editing:!1,formInitialized:!1,previewInitialized:!1,widgetFormHtml:"",widgetSettingsChanged:!1,widgetPreviewHtml:""})(function(i){function n(){i.setState({editing:!1,previewInitialized:!1})}if(i.editing||!i.attributes.widgetClass){var e=[];sowbBlockEditorAdmin.widgets&&(sowbBlockEditorAdmin.widgets.sort(function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}),(e=sowbBlockEditorAdmin.widgets.map(function(e){return{value:e.class,label:e.name}})).unshift({value:"",label:b("Select widget type","so-widgets-bundle")}));var t=i.attributes.widgetClass&&!i.widgetFormHtml;t&&$.post({url:sowbBlockEditorAdmin.restUrl+"sowb/v1/widgets/forms",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",sowbBlockEditorAdmin.nonce)},data:{widgetClass:i.attributes.widgetClass,widgetData:i.attributes.widgetData}}).then(function(e){i.setState({widgetFormHtml:e})});var o=i.widgetFormHtml?i.widgetFormHtml:"";return[!!o&&a(r,{key:"controls"},a(g,null,a(c,{className:"components-icon-button components-toolbar__control",label:b("Preview widget.","so-widgets-bundle"),onClick:n,icon:"visibility"}))),a(u,{key:"placeholder",className:"so-widget-placeholder",label:b("SiteOrigin Widget","so-widgets-bundle"),instructions:b("Select the type of widget you want to use:","so-widgets-bundle")},i.loadingWidgets||t?a(m):a("div",{className:"so-widget-block-container"},a(l,{options:e,value:i.attributes.widgetClass,onChange:function(e){if(""!==e){if(i.widgetSettingsChanged&&!confirm(sowbBlockEditorAdmin.confirmChangeWidget))return!1;i.setAttributes({widgetClass:e,widgetData:null}),i.setState({editing:!0,widgetFormHtml:null,formInitialized:!1,widgetSettingsChanged:!1,widgetPreviewHtml:null,previewInitialized:!1})}}}),a("div",{className:"so-widget-block-form-container",dangerouslySetInnerHTML:{__html:o},ref:function(e){var t=$(e).find(".siteorigin-widget-form-main");0<t.length&&!i.formInitialized&&(t.siblings(".siteorigin-widget-preview").find("> a").on("click",function(e){e.stopImmediatePropagation(),n()}),t.data("backupDisabled",!0),t.sowSetupForm(),i.attributes.widgetData||i.setAttributes({widgetData:sowbForms.getWidgetFormValues(t)}),t.on("change",function(){i.setAttributes({widgetData:sowbForms.getWidgetFormValues(t)}),i.setState({widgetSettingsChanged:!0,widgetPreviewHtml:null,previewInitialized:!1})}),i.setState({formInitialized:!0}))}})))]}var s=!i.loadingWidgets&&!i.editing&&!i.widgetPreviewHtml&&i.attributes.widgetClass;s&&$.post({url:sowbBlockEditorAdmin.restUrl+"sowb/v1/widgets/previews",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",sowbBlockEditorAdmin.nonce)},data:{widgetClass:i.attributes.widgetClass,widgetData:i.attributes.widgetData||{}}}).then(function(e){i.setState({widgetPreviewHtml:e,previewInitialized:!1})});var d=i.widgetPreviewHtml?i.widgetPreviewHtml:"";return[a(r,{key:"controls"},a(g,null,a(c,{className:"components-icon-button components-toolbar__control",label:b("Edit widget.","so-widgets-bundle"),onClick:function(){i.setState({editing:!0,formInitialized:!1})},icon:"edit"}))),a("div",{key:"preview",className:"so-widget-preview-container"},s?a("div",{className:"so-widgets-spinner-container"},a("span",null,a(m))):a("div",{dangerouslySetInnerHTML:{__html:d},ref:function(){i.previewInitialized||($(window.sowb).trigger("setup_widgets",{preview:!0}),i.setState({previewInitialized:!0}))}}))]}),save:function(){return null}})}(window.wp.editor,window.wp.blocks,window.wp.i18n,window.wp.element,window.wp.components,window.wp.compose);
1
+ !function(e,t,i,n,o,s){var a=n.createElement,d=t.registerBlockType,r=e.BlockControls,l=o.SelectControl,w=s.withState,g=o.Toolbar,c=o.IconButton,u=o.Placeholder,m=o.Spinner,b=i.__;d("sowb/widget-block",{title:b("SiteOrigin Widget","so-widgets-bundle"),description:b("Select a SiteOrigin widget from the dropdown.","so-widgets-bundle"),icon:function(){return a("span",{className:"widget-icon so-widget-icon so-block-editor-icon"})},category:"widgets",keywords:[sowbBlockEditorAdmin.widgets.reduce(function(e,t){return 0<e.length&&(e+=","),e+t.name},"")],supports:{html:!1},attributes:{widgetClass:{type:"string"},widgetData:{type:"object"}},edit:w({editing:!1,formInitialized:!1,previewInitialized:!1,widgetFormHtml:"",widgetSettingsChanged:!1,widgetPreviewHtml:""})(function(i){function n(){i.setState({editing:!1,previewInitialized:!1})}if(i.editing||!i.attributes.widgetClass){var e=[];sowbBlockEditorAdmin.widgets&&(sowbBlockEditorAdmin.widgets.sort(function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}),(e=sowbBlockEditorAdmin.widgets.map(function(e){return{value:e.class,label:e.name}})).unshift({value:"",label:b("Select widget type","so-widgets-bundle")}));var t=i.attributes.widgetClass&&!i.widgetFormHtml;t&&$.post({url:sowbBlockEditorAdmin.restUrl+"sowb/v1/widgets/forms",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",sowbBlockEditorAdmin.nonce)},data:{widgetClass:i.attributes.widgetClass,widgetData:i.attributes.widgetData}}).done(function(e){i.setState({widgetFormHtml:e})}).fail(function(e){var t=e.responseJSON;i.setState({widgetFormHtml:"<div>"+t.message+"</div>"})});var o=i.widgetFormHtml?i.widgetFormHtml:"";return[!!o&&a(r,{key:"controls"},a(g,null,a(c,{className:"components-icon-button components-toolbar__control",label:b("Preview widget.","so-widgets-bundle"),onClick:n,icon:"visibility"}))),a(u,{key:"placeholder",className:"so-widget-placeholder",label:b("SiteOrigin Widget","so-widgets-bundle"),instructions:b("Select the type of widget you want to use:","so-widgets-bundle")},i.loadingWidgets||t?a(m):a("div",{className:"so-widget-block-container"},a(l,{options:e,value:i.attributes.widgetClass,onChange:function(e){if(""!==e){if(i.widgetSettingsChanged&&!confirm(sowbBlockEditorAdmin.confirmChangeWidget))return!1;i.setAttributes({widgetClass:e,widgetData:null}),i.setState({editing:!0,widgetFormHtml:null,formInitialized:!1,widgetSettingsChanged:!1,widgetPreviewHtml:null,previewInitialized:!1})}}}),a("div",{className:"so-widget-block-form-container",dangerouslySetInnerHTML:{__html:o},ref:function(e){var t=$(e).find(".siteorigin-widget-form-main");0<t.length&&!i.formInitialized&&(t.siblings(".siteorigin-widget-preview").find("> a").on("click",function(e){e.stopImmediatePropagation(),n()}),t.data("backupDisabled",!0),t.sowSetupForm(),i.attributes.widgetData||i.setAttributes({widgetData:sowbForms.getWidgetFormValues(t)}),t.on("change",function(){i.setAttributes({widgetData:sowbForms.getWidgetFormValues(t)}),i.setState({widgetSettingsChanged:!0,widgetPreviewHtml:null,previewInitialized:!1})}),i.setState({formInitialized:!0}))}})))]}var s=!i.loadingWidgets&&!i.editing&&!i.widgetPreviewHtml&&i.attributes.widgetClass;s&&$.post({url:sowbBlockEditorAdmin.restUrl+"sowb/v1/widgets/previews",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",sowbBlockEditorAdmin.nonce)},data:{widgetClass:i.attributes.widgetClass,widgetData:i.attributes.widgetData||{}}}).done(function(e){i.setState({widgetPreviewHtml:e,previewInitialized:!1})}).fail(function(e){var t=e.responseJSON;i.setState({widgetPreviewHtml:"<div>"+t.message+"</div>"})});var d=i.widgetPreviewHtml?i.widgetPreviewHtml:"";return[a(r,{key:"controls"},a(g,null,a(c,{className:"components-icon-button components-toolbar__control",label:b("Edit widget.","so-widgets-bundle"),onClick:function(){i.setState({editing:!0,formInitialized:!1})},icon:"edit"}))),a("div",{key:"preview",className:"so-widget-preview-container"},s?a("div",{className:"so-widgets-spinner-container"},a("span",null,a(m))):a("div",{dangerouslySetInnerHTML:{__html:d},ref:function(){i.previewInitialized||($(window.sowb).trigger("setup_widgets",{preview:!0}),i.setState({previewInitialized:!0}))}}))]}),save:function(){return null}})}(window.wp.editor,window.wp.blocks,window.wp.i18n,window.wp.element,window.wp.components,window.wp.compose);
compat/visual-composer/visual-composer.php CHANGED
@@ -1,296 +1,296 @@
1
- <?php
2
-
3
- class SiteOrigin_Widgets_Bundle_Visual_Composer {
4
-
5
- /**
6
- * Get the singleton instance
7
- *
8
- * @return SiteOrigin_Widgets_Bundle_Visual_Composer
9
- */
10
- public static function single() {
11
- static $single;
12
-
13
- return empty( $single ) ? $single = new self() : $single;
14
- }
15
-
16
- function __construct() {
17
- add_action( 'vc_after_init', array( $this, 'init' ) );
18
-
19
- add_action( 'admin_print_scripts-post-new.php', array( $this, 'enqueue_active_widgets_scripts' ) );
20
- add_action( 'admin_print_scripts-post.php', array( $this, 'enqueue_active_widgets_scripts' ) );
21
-
22
- add_action( 'wp_ajax_sowb_vc_widget_render_form', array( $this, 'sowb_vc_widget_render_form' ) );
23
-
24
- add_filter( 'siteorigin_widgets_form_show_preview_button', '__return_false' );
25
-
26
- add_filter( 'content_save_pre', array( $this, 'update_widget_data' ) );
27
- }
28
-
29
- function init() {
30
-
31
- vc_add_shortcode_param(
32
- 'sowb_json_escaped',
33
- array( $this, 'siteorigin_widget_form' ),
34
- plugin_dir_url( __FILE__ ) . 'sowb-vc-widget' . SOW_BUNDLE_JS_SUFFIX . '.js'
35
- );
36
-
37
- $settings = array(
38
- 'name' => __( 'SiteOrigin Widget', 'so-widgets-bundle' ),
39
- 'base' => 'siteorigin_widget_vc',
40
- 'category' => __( 'SiteOrigin Widgets', 'so-widgets-bundle' ),
41
- 'icon' => 'so-widget-icon',
42
- 'description' => __( 'Allows you to add any active SiteOrigin Widgets Bundle widgets.', 'so-widgets-bundle' ),
43
- // element description in add elements view
44
- 'show_settings_on_create' => true,
45
- 'weight' => - 5,
46
- // Depends on ordering in list, Higher weight first
47
- 'html_template' => dirname( __FILE__ ) . '/siteorigin_widget_vc_template.php',
48
- 'admin_enqueue_css' => preg_replace( '/\s/', '%20', plugins_url( 'styles.css', __FILE__ ) ),
49
- 'front_enqueue_css' => preg_replace( '/\s/', '%20', plugins_url( 'styles.css', __FILE__ ) ),
50
- 'front_enqueue_js' => preg_replace( '/\s/', '%20', plugins_url( 'front_enqueue_js.js', __FILE__ ) ),
51
- 'params' => array(
52
- array(
53
- 'type' => 'sowb_json_escaped',
54
- 'heading' => __( 'SiteOrigin Widget', 'so-widgets-bundle' ),
55
- 'param_name' => 'so_widget_data',
56
- ),
57
- )
58
- );
59
- vc_map( $settings );
60
- }
61
-
62
- function enqueue_active_widgets_scripts() {
63
-
64
- global $wp_widget_factory;
65
-
66
- foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
67
- if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
68
- /* @var $widget_obj SiteOrigin_Widget */
69
- ob_start();
70
- $widget_obj->form( array() );
71
- ob_clean();
72
- }
73
- }
74
-
75
- wp_localize_script( 'siteorigin-widget-admin', 'soWidgetsVC', array(
76
- 'ajaxUrl' => wp_nonce_url( admin_url( 'admin-ajax.php' ), 'sowb_vc_widget_render_form', '_sowbnonce' ),
77
- 'confirmChangeWidget' => __( 'Selecting a different widget will revert any changes. Continue?', 'so-widgets-bundle' ),
78
- ) );
79
- }
80
-
81
- function siteorigin_widget_form( $settings, $value ) {
82
- $so_widget_names = array();
83
-
84
- global $wp_widget_factory;
85
- foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
86
- if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
87
- $so_widget_names[ $class ] = preg_replace( '/^SiteOrigin /', '', $widget_obj->name );
88
- }
89
- }
90
- asort( $so_widget_names );
91
-
92
- /* @var $select SiteOrigin_Widget_Field_Select */
93
- $select = new SiteOrigin_Widget_Field_Select(
94
- 'so_widget_class',
95
- 'so_widget_class',
96
- 'so_widget_class',
97
- array(
98
- 'type' => 'select',
99
- 'options' => $so_widget_names,
100
- )
101
- );
102
-
103
- global $wp_widget_factory;
104
-
105
- $parsed_value = json_decode( html_entity_decode( stripslashes( $value ) ), true );
106
- if ( empty( $parsed_value ) ) {
107
- //Get the first value as the default.
108
- reset( $so_widget_names );
109
- $widget_class = key( $so_widget_names );
110
- } else {
111
- $widget_class = $parsed_value['widget_class'];
112
- }
113
-
114
- $widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
115
-
116
- ob_start();
117
- $select->render( $widget_class ); ?>
118
- <input type="hidden" name="so_widget_data" class="wpb_vc_param_value" value="<?php echo esc_attr( $value ); ?>">
119
- <div class="siteorigin_widget_form_container">
120
- <?php
121
- if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
122
- /* @var $widget SiteOrigin_Widget */
123
- $widget->form( $parsed_value['widget_data'] );
124
- }
125
- ?>
126
- </div>
127
- <?php
128
- return ob_get_clean();
129
- }
130
-
131
- function sowb_vc_widget_render_form() {
132
- if ( empty( $_REQUEST['widget'] ) ) {
133
- wp_die();
134
- }
135
- if ( empty( $_REQUEST['_sowbnonce'] ) || ! wp_verify_nonce( $_REQUEST['_sowbnonce'], 'sowb_vc_widget_render_form' ) ) {
136
- wp_die();
137
- }
138
-
139
- $request = array_map( 'stripslashes_deep', $_REQUEST );
140
- $widget_class = $request['widget'];
141
-
142
- global $wp_widget_factory;
143
-
144
- $widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
145
-
146
- if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
147
- /* @var $widget SiteOrigin_Widget */
148
- $widget->form( array() );
149
- }
150
-
151
- wp_die();
152
- }
153
-
154
- function update_widget_data( $content ) {
155
-
156
- $content = preg_replace_callback(
157
- '/\[siteorigin_widget_vc [^\]]*\]/',
158
- array( $this, 'update_shortcode' ),
159
- $content
160
- );
161
-
162
- return $content;
163
- }
164
-
165
- function update_shortcode( $shortcode ) {
166
-
167
- preg_match(
168
- '/so_widget_data="([^"]*)"/',
169
- stripslashes( stripslashes( $shortcode[0] ) ),
170
- $widget_json
171
- );
172
-
173
- // We double encode in the front end to prevent accidental decoding when the content is set on the
174
- // WP visual editor.
175
- $widget_json = html_entity_decode( html_entity_decode( $widget_json[1] ) );
176
-
177
- $widget_atts = json_decode( $widget_json, true );
178
-
179
- global $wp_widget_factory;
180
-
181
- $widget = ! empty( $wp_widget_factory->widgets[ $widget_atts['widget_class'] ] ) ? $wp_widget_factory->widgets[ $widget_atts['widget_class'] ] : false;
182
-
183
- if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
184
- /* @var $widget SiteOrigin_Widget */
185
- $widget_atts['widget_data'] = $widget->update( $widget_atts['widget_data'], $widget_atts['widget_data'] );
186
- }
187
-
188
- $widget_json = json_encode( $widget_atts );
189
-
190
- $widget_json = htmlentities( htmlentities( $widget_json ) );
191
-
192
- $widget_json = str_replace(
193
- array( '[', ']' ),
194
- array( '&#91;', '&#93;' ),
195
- $widget_json
196
- );
197
-
198
- $slashed = addslashes( 'so_widget_data="' . addslashes( $widget_json ) . '"' );
199
-
200
- preg_replace( '/so_widget_data="([^"]*)"/', $slashed, $shortcode );
201
-
202
- return '[siteorigin_widget_vc ' . $slashed . ']';
203
- }
204
- }
205
-
206
- SiteOrigin_Widgets_Bundle_Visual_Composer::single();
207
-
208
- if ( class_exists( 'WPBakeryShortCode' ) ) {
209
- class WPBakeryShortCode_SiteOrigin_Widget_VC extends WPBakeryShortCode {
210
- public function __construct( $settings ) {
211
- parent::__construct( $settings );
212
- }
213
-
214
- public function contentInline( $atts, $content ) {
215
- if ( empty( $atts ) ) {
216
- return '';
217
- }
218
- $widget_settings = $this->get_widget_settings( $atts );
219
- ob_start();
220
- $instance = $this->update_widget( $widget_settings['widget_class'], $widget_settings['widget_data'] );
221
- $this->render_widget( $widget_settings['widget_class'], $instance );
222
-
223
- return ob_get_clean();
224
- }
225
-
226
- public function get_widget_settings( $atts ) {
227
- if ( empty( $atts ) || empty( $atts['so_widget_data'] ) ) {
228
- return array();
229
- }
230
- $unesc = $atts['so_widget_data'];
231
- return json_decode( $unesc, true );
232
- }
233
-
234
- private function get_so_widget( $widget_class ) {
235
- global $wp_widget_factory;
236
-
237
- $widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
238
-
239
- if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
240
- /* @var $widget SiteOrigin_Widget */
241
- return $widget;
242
- } else {
243
- return null;
244
- }
245
- }
246
-
247
- public function render_widget( $widget_class, $widget_instance ) {
248
-
249
- if ( empty( $widget_instance ) ) {
250
- return;
251
- }
252
-
253
- /* @var $widget SiteOrigin_Widget */
254
- $widget = $this->get_so_widget( $widget_class );
255
-
256
- if ( ! empty( $widget ) ) {
257
- $widget->widget( array(), $widget_instance );
258
- }
259
- }
260
-
261
- public function update_widget( $widget_class, $widget_instance ) {
262
-
263
- if ( empty( $widget_instance ) ) {
264
- return;
265
- }
266
-
267
- /* @var $widget SiteOrigin_Widget */
268
- $widget = $this->get_so_widget( $widget_class );
269
-
270
- if ( ! empty( $widget ) ) {
271
- return $widget->update( $widget_instance, $widget_instance );
272
- } else {
273
- return $widget_instance;
274
- }
275
- }
276
-
277
- /**
278
- * @param $atts
279
- *
280
- * @return array
281
- */
282
- protected function prepareAtts( $atts ) {
283
- $return = array();
284
- if ( is_array( $atts ) ) {
285
- foreach ( $atts as $key => $val ) {
286
- // We double encode in the front end to prevent accidental decoding when the content is set on the
287
- // WP visual editor.
288
- $return[ $key ] = html_entity_decode( html_entity_decode( $val ) );
289
- }
290
- }
291
-
292
- return $return;
293
- }
294
- }
295
- } // End Class
296
-
1
+ <?php
2
+
3
+ class SiteOrigin_Widgets_Bundle_Visual_Composer {
4
+
5
+ /**
6
+ * Get the singleton instance
7
+ *
8
+ * @return SiteOrigin_Widgets_Bundle_Visual_Composer
9
+ */
10
+ public static function single() {
11
+ static $single;
12
+
13
+ return empty( $single ) ? $single = new self() : $single;
14
+ }
15
+
16
+ function __construct() {
17
+ add_action( 'vc_after_init', array( $this, 'init' ) );
18
+
19
+ add_action( 'admin_print_scripts-post-new.php', array( $this, 'enqueue_active_widgets_scripts' ) );
20
+ add_action( 'admin_print_scripts-post.php', array( $this, 'enqueue_active_widgets_scripts' ) );
21
+
22
+ add_action( 'wp_ajax_sowb_vc_widget_render_form', array( $this, 'sowb_vc_widget_render_form' ) );
23
+
24
+ add_filter( 'siteorigin_widgets_form_show_preview_button', '__return_false' );
25
+
26
+ add_filter( 'content_save_pre', array( $this, 'update_widget_data' ) );
27
+ }
28
+
29
+ function init() {
30
+
31
+ vc_add_shortcode_param(
32
+ 'sowb_json_escaped',
33
+ array( $this, 'siteorigin_widget_form' ),
34
+ plugin_dir_url( __FILE__ ) . 'sowb-vc-widget' . SOW_BUNDLE_JS_SUFFIX . '.js'
35
+ );
36
+
37
+ $settings = array(
38
+ 'name' => __( 'SiteOrigin Widget', 'so-widgets-bundle' ),
39
+ 'base' => 'siteorigin_widget_vc',
40
+ 'category' => __( 'SiteOrigin Widgets', 'so-widgets-bundle' ),
41
+ 'icon' => 'so-widget-icon',
42
+ 'description' => __( 'Allows you to add any active SiteOrigin Widgets Bundle widgets.', 'so-widgets-bundle' ),
43
+ // element description in add elements view
44
+ 'show_settings_on_create' => true,
45
+ 'weight' => - 5,
46
+ // Depends on ordering in list, Higher weight first
47
+ 'html_template' => dirname( __FILE__ ) . '/siteorigin_widget_vc_template.php',
48
+ 'admin_enqueue_css' => preg_replace( '/\s/', '%20', plugins_url( 'styles.css', __FILE__ ) ),
49
+ 'front_enqueue_css' => preg_replace( '/\s/', '%20', plugins_url( 'styles.css', __FILE__ ) ),
50
+ 'front_enqueue_js' => preg_replace( '/\s/', '%20', plugins_url( 'front_enqueue_js.js', __FILE__ ) ),
51
+ 'params' => array(
52
+ array(
53
+ 'type' => 'sowb_json_escaped',
54
+ 'heading' => __( 'SiteOrigin Widget', 'so-widgets-bundle' ),
55
+ 'param_name' => 'so_widget_data',
56
+ ),
57
+ )
58
+ );
59
+ vc_map( $settings );
60
+ }
61
+
62
+ function enqueue_active_widgets_scripts() {
63
+
64
+ global $wp_widget_factory;
65
+
66
+ foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
67
+ if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
68
+ /* @var $widget_obj SiteOrigin_Widget */
69
+ ob_start();
70
+ $widget_obj->form( array() );
71
+ ob_clean();
72
+ }
73
+ }
74
+
75
+ wp_localize_script( 'siteorigin-widget-admin', 'soWidgetsVC', array(
76
+ 'ajaxUrl' => wp_nonce_url( admin_url( 'admin-ajax.php' ), 'sowb_vc_widget_render_form', '_sowbnonce' ),
77
+ 'confirmChangeWidget' => __( 'Selecting a different widget will revert any changes. Continue?', 'so-widgets-bundle' ),
78
+ ) );
79
+ }
80
+
81
+ function siteorigin_widget_form( $settings, $value ) {
82
+ $so_widget_names = array();
83
+
84
+ global $wp_widget_factory;
85
+ foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
86
+ if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
87
+ $so_widget_names[ $class ] = preg_replace( '/^SiteOrigin /', '', $widget_obj->name );
88
+ }
89
+ }
90
+ asort( $so_widget_names );
91
+
92
+ /* @var $select SiteOrigin_Widget_Field_Select */
93
+ $select = new SiteOrigin_Widget_Field_Select(
94
+ 'so_widget_class',
95
+ 'so_widget_class',
96
+ 'so_widget_class',
97
+ array(
98
+ 'type' => 'select',
99
+ 'options' => $so_widget_names,
100
+ )
101
+ );
102
+
103
+ global $wp_widget_factory;
104
+
105
+ $parsed_value = json_decode( html_entity_decode( stripslashes( $value ) ), true );
106
+ if ( empty( $parsed_value ) ) {
107
+ //Get the first value as the default.
108
+ reset( $so_widget_names );
109
+ $widget_class = key( $so_widget_names );
110
+ } else {
111
+ $widget_class = $parsed_value['widget_class'];
112
+ }
113
+
114
+ $widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
115
+
116
+ ob_start();
117
+ $select->render( $widget_class ); ?>
118
+ <input type="hidden" name="so_widget_data" class="wpb_vc_param_value" value="<?php echo esc_attr( $value ); ?>">
119
+ <div class="siteorigin_widget_form_container">
120
+ <?php
121
+ if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
122
+ /* @var $widget SiteOrigin_Widget */
123
+ $widget->form( $parsed_value['widget_data'] );
124
+ }
125
+ ?>
126
+ </div>
127
+ <?php
128
+ return ob_get_clean();
129
+ }
130
+
131
+ function sowb_vc_widget_render_form() {
132
+ if ( empty( $_REQUEST['widget'] ) ) {
133
+ wp_die();
134
+ }
135
+ if ( empty( $_REQUEST['_sowbnonce'] ) || ! wp_verify_nonce( $_REQUEST['_sowbnonce'], 'sowb_vc_widget_render_form' ) ) {
136
+ wp_die();
137
+ }
138
+
139
+ $request = array_map( 'stripslashes_deep', $_REQUEST );
140
+ $widget_class = $request['widget'];
141
+
142
+ global $wp_widget_factory;
143
+
144
+ $widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
145
+
146
+ if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
147
+ /* @var $widget SiteOrigin_Widget */
148
+ $widget->form( array() );
149
+ }
150
+
151
+ wp_die();
152
+ }
153
+
154
+ function update_widget_data( $content ) {
155
+
156
+ $content = preg_replace_callback(
157
+ '/\[siteorigin_widget_vc [^\]]*\]/',
158
+ array( $this, 'update_shortcode' ),
159
+ $content
160
+ );
161
+
162
+ return $content;
163
+ }
164
+
165
+ function update_shortcode( $shortcode ) {
166
+
167
+ preg_match(
168
+ '/so_widget_data="([^"]*)"/',
169
+ stripslashes( stripslashes( $shortcode[0] ) ),
170
+ $widget_json
171
+ );
172
+
173
+ // We double encode in the front end to prevent accidental decoding when the content is set on the
174
+ // WP visual editor.
175
+ $widget_json = html_entity_decode( html_entity_decode( $widget_json[1] ) );
176
+
177
+ $widget_atts = json_decode( $widget_json, true );
178
+
179
+ global $wp_widget_factory;
180
+
181
+ $widget = ! empty( $wp_widget_factory->widgets[ $widget_atts['widget_class'] ] ) ? $wp_widget_factory->widgets[ $widget_atts['widget_class'] ] : false;
182
+
183
+ if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
184
+ /* @var $widget SiteOrigin_Widget */
185
+ $widget_atts['widget_data'] = $widget->update( $widget_atts['widget_data'], $widget_atts['widget_data'] );
186
+ }
187
+
188
+ $widget_json = json_encode( $widget_atts );
189
+
190
+ $widget_json = htmlentities( htmlentities( $widget_json ) );
191
+
192
+ $widget_json = str_replace(
193
+ array( '[', ']' ),
194
+ array( '&#91;', '&#93;' ),
195
+ $widget_json
196
+ );
197
+
198
+ $slashed = addslashes( 'so_widget_data="' . addslashes( $widget_json ) . '"' );
199
+
200
+ preg_replace( '/so_widget_data="([^"]*)"/', $slashed, $shortcode );
201
+
202
+ return '[siteorigin_widget_vc ' . $slashed . ']';
203
+ }
204
+ }
205
+
206
+ SiteOrigin_Widgets_Bundle_Visual_Composer::single();
207
+
208
+ if ( class_exists( 'WPBakeryShortCode' ) ) {
209
+ class WPBakeryShortCode_SiteOrigin_Widget_VC extends WPBakeryShortCode {
210
+ public function __construct( $settings ) {
211
+ parent::__construct( $settings );
212
+ }
213
+
214
+ public function contentInline( $atts, $content ) {
215
+ if ( empty( $atts ) ) {
216
+ return '';
217
+ }
218
+ $widget_settings = $this->get_widget_settings( $atts );
219
+ ob_start();
220
+ $instance = $this->update_widget( $widget_settings['widget_class'], $widget_settings['widget_data'] );
221
+ $this->render_widget( $widget_settings['widget_class'], $instance );
222
+
223
+ return ob_get_clean();
224
+ }
225
+
226
+ public function get_widget_settings( $atts ) {
227
+ if ( empty( $atts ) || empty( $atts['so_widget_data'] ) ) {
228
+ return array();
229
+ }
230
+ $unesc = $atts['so_widget_data'];
231
+ return json_decode( $unesc, true );
232
+ }
233
+
234
+ private function get_so_widget( $widget_class ) {
235
+ global $wp_widget_factory;
236
+
237
+ $widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
238
+
239
+ if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
240
+ /* @var $widget SiteOrigin_Widget */
241
+ return $widget;
242
+ } else {
243
+ return null;
244
+ }
245
+ }
246
+
247
+ public function render_widget( $widget_class, $widget_instance ) {
248
+
249
+ if ( empty( $widget_instance ) ) {
250
+ return;
251
+ }
252
+
253
+ /* @var $widget SiteOrigin_Widget */
254
+ $widget = $this->get_so_widget( $widget_class );
255
+
256
+ if ( ! empty( $widget ) ) {
257
+ $widget->widget( array(), $widget_instance );
258
+ }
259
+ }
260
+
261
+ public function update_widget( $widget_class, $widget_instance ) {
262
+
263
+ if ( empty( $widget_instance ) ) {
264
+ return;
265
+ }
266
+
267
+ /* @var $widget SiteOrigin_Widget */
268
+ $widget = $this->get_so_widget( $widget_class );
269
+
270
+ if ( ! empty( $widget ) ) {
271
+ return $widget->update( $widget_instance, $widget_instance );
272
+ } else {
273
+ return $widget_instance;
274
+ }
275
+ }
276
+
277
+ /**
278
+ * @param $atts
279
+ *
280
+ * @return array
281
+ */
282
+ protected function prepareAtts( $atts ) {
283
+ $return = array();
284
+ if ( is_array( $atts ) ) {
285
+ foreach ( $atts as $key => $val ) {
286
+ // We double encode in the front end to prevent accidental decoding when the content is set on the
287
+ // WP visual editor.
288
+ $return[ $key ] = html_entity_decode( html_entity_decode( $val ) );
289
+ }
290
+ }
291
+
292
+ return $return;
293
+ }
294
+ }
295
+ } // End Class
296
+
icons/fontawesome/style.css CHANGED
@@ -259,6 +259,8 @@
259
260
.sow-fab {
261
font-family: 'sow-fontawesome-brands';
262
}
263
264
@font-face {
@@ -275,7 +277,8 @@
275
276
.sow-far {
277
font-family: 'sow-fontawesome-free';
278
- font-weight: 400;
279
}
280
281
@font-face {
@@ -293,7 +296,8 @@
293
.sow-fa,
294
.sow-fas {
295
font-family: 'sow-fontawesome-free';
296
- font-weight: 900;
297
}
298
299
.sow-icon-fontawesome {
259
260
.sow-fab {
261
font-family: 'sow-fontawesome-brands';
262
+ font-style: normal !important;
263
+ font-weight: normal !important;
264
}
265
266
@font-face {
277
278
.sow-far {
279
font-family: 'sow-fontawesome-free';
280
+ font-style: normal !important;
281
+ font-weight: 400 !important;
282
}
283
284
@font-face {
296
.sow-fa,
297
.sow-fas {
298
font-family: 'sow-fontawesome-free';
299
+ font-weight: 900 !important;
300
+ font-style: normal !important;
301
}
302
303
.sow-icon-fontawesome {
js/slider/jquery.slider.js CHANGED
@@ -182,23 +182,28 @@ jQuery( function($){
182
183
// Set up showing and hiding navs
184
$p.add($n).hide();
185
- if( !$base.hasClass('sow-slider-is-mobile') && $slides.length > 1 ) {
186
-
187
- var toHide = false;
188
- $base
189
- .mouseenter(function(){
190
- $p.add($n).clearQueue().fadeIn(150);
191
- toHide = false;
192
- })
193
- .mouseleave(function(){
194
- toHide = true;
195
- setTimeout(function(){
196
- if( toHide ) {
197
- $p.add($n).clearQueue().fadeOut(150);
198
- }
199
toHide = false;
200
- }, 750);
201
- });
202
}
203
204
// Resize the sentinel when ever the window is resized, or when widgets are being set up.
182
183
// Set up showing and hiding navs
184
$p.add($n).hide();
185
+ if( $slides.length > 1 ) {
186
+ if( !$base.hasClass('sow-slider-is-mobile') ) {
187
+
188
+ var toHide = false;
189
+ $base
190
+ .mouseenter(function(){
191
+ $p.add($n).clearQueue().fadeIn(150);
192
toHide = false;
193
+ })
194
+ .mouseleave(function(){
195
+ toHide = true;
196
+ setTimeout(function(){
197
+ if( toHide ) {
198
+ $p.add($n).clearQueue().fadeOut(150);
199
+ }
200
+ toHide = false;
201
+ }, 750);
202
+ });
203
+ } else if ( settings.nav_always_show_mobile && window.matchMedia('(max-width: ' + settings.breakpoint + ')').matches) {
204
+ $p.show();
205
+ $n.show();
206
+ }
207
}
208
209
// Resize the sentinel when ever the window is resized, or when widgets are being set up.
js/slider/jquery.slider.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};sowb.SiteOriginSlider=function(l){return{playSlideVideo:function(e){l(e).find("video").each(function(){void 0!==this.play&&this.play()})},pauseSlideVideo:function(e){l(e).find("video").each(function(){void 0!==this.pause&&this.pause()})},setupActiveSlide:function(e,i,t){var s=l(e).find(".cycle-sentinel"),n=l(i),o=n.find("video.sow-background-element");if(void 0===t?s.css("height",n.outerHeight()):s.animate({height:n.outerHeight()},t),o.length){var d=n.outerWidth()/n.outerHeight();o.outerWidth()/o.outerHeight()<d?o.css({width:"100%",height:"auto"}):o.css({width:"auto",height:"100%"}),o.css({"margin-left":-Math.ceil(o.width()/2),"margin-top":-Math.ceil(o.height()/2)})}}}},jQuery(function(f){sowb.setupSliders=sowb.setupSlider=function(){var u=new sowb.SiteOriginSlider(f);f(".sow-slider-images").each(function(){var n=f(this);if(n.data("initialized"))return n;var d=n.siblings(".sow-slider-pagination"),o=n.closest(".sow-slider-base"),l=o.find(".sow-slide-nav"),a=n.find(".sow-slider-image"),c=n.data("settings");a.each(function(e,i){var t=f(i),s=t.data("url");void 0!==s&&s.hasOwnProperty("url")&&(t.click(function(e){e.preventDefault(),window.open(s.url,s.hasOwnProperty("new_window")&&s.new_window?"_blank":"_self").opener=null}),t.find("a").click(function(e){e.stopPropagation()}))});var r=function(){var e=n.closest(".so-widget-fittext-wrapper");if(0<e.length&&!e.data("fitTextDone"))e.on("fitTextDone",function(){r()});else{o.show();var t=function(){n.find(".sow-slider-image").each(function(){var e=f(this);e.css("height",e.find(".sow-slider-image-wrapper").outerHeight())})};if(f(window).on("resize panelsStretchRows",t).resize(),f(sowb).on("setup_widgets",t),n.on({"cycle-after":function(e,i,t,s,n){var o=f(this);u.playSlideVideo(s),u.setupActiveSlide(o,s),f(s).trigger("sowSlideCycleAfter")},"cycle-before":function(e,i,t,s,n){var o=f(this);d.find("> li").removeClass("sow-active").eq(i.slideNum-1).addClass("sow-active"),u.pauseSlideVideo(t),u.setupActiveSlide(o,s,i.speed),f(s).trigger("sowSlideCycleBefore")},"cycle-initialized":function(e,i){u.playSlideVideo(f(this).find(".cycle-slide-active")),u.setupActiveSlide(n,i.slides[0]),d.find(">li").removeClass("sow-active").eq(0).addClass("sow-active"),f(this).find(".cycle-slide-active").trigger("sowSlideInitial"),i.slideCount<=1&&(d.hide(),l.hide()),f(window).resize(),setTimeout(function(){t(),u.setupActiveSlide(n,i.slides[0]),n.find(".cycle-sentinel").empty()},200)}}).cycle({slides:"> .sow-slider-image",speed:c.speed,timeout:c.timeout,swipe:c.swipe,"swipe-fx":"scrollHorz",log:!1}),n.find("video.sow-background-element").on("loadeddata",function(){u.setupActiveSlide(n,n.find(".cycle-slide-active"))}),d.add(l).hide(),!o.hasClass("sow-slider-is-mobile")&&1<a.length){var i=!1;o.mouseenter(function(){d.add(l).clearQueue().fadeIn(150),i=!1}).mouseleave(function(){i=!0,setTimeout(function(){i&&d.add(l).clearQueue().fadeOut(150),i=!1},750)})}var s=function(){u.setupActiveSlide(n,n.find(".cycle-slide-active"))};f(window).on("resize",s),f(sowb).on("setup_widgets",s),d.find("> li > a").click(function(e){e.preventDefault(),n.cycle("goto",f(this).data("goto"))}),l.find("> a").click(function(e){e.preventDefault(),n.cycle(f(this).data("action"))}),o.keydown(function(e){37===e.which?n.cycle("prev"):39===e.which&&n.cycle("next")})}},e=n.find("img"),i=0,t=!1;e.each(function(){f(this);this.complete?i++:f(this).one("load",function(){++i!==e.length||t||(r(),t=!0)}).attr("src",f(this).attr("src")),i!==e.length||t||(r(),t=!0)}),0===e.length&&r(),n.data("initialized",!0)})},sowb.setupSliders(),f(sowb).on("setup_widgets",sowb.setupSliders)}),window.sowb=sowb;
1
+ var sowb=window.sowb||{};sowb.SiteOriginSlider=function(a){return{playSlideVideo:function(e){a(e).find("video").each(function(){void 0!==this.play&&this.play()})},pauseSlideVideo:function(e){a(e).find("video").each(function(){void 0!==this.pause&&this.pause()})},setupActiveSlide:function(e,i,t){var s=a(e).find(".cycle-sentinel"),n=a(i),o=n.find("video.sow-background-element");if(void 0===t?s.css("height",n.outerHeight()):s.animate({height:n.outerHeight()},t),o.length){var d=n.outerWidth()/n.outerHeight();o.outerWidth()/o.outerHeight()<d?o.css({width:"100%",height:"auto"}):o.css({width:"auto",height:"100%"}),o.css({"margin-left":-Math.ceil(o.width()/2),"margin-top":-Math.ceil(o.height()/2)})}}}},jQuery(function(w){sowb.setupSliders=sowb.setupSlider=function(){var u=new sowb.SiteOriginSlider(w);w(".sow-slider-images").each(function(){var n=w(this);if(n.data("initialized"))return n;var d=n.siblings(".sow-slider-pagination"),o=n.closest(".sow-slider-base"),a=o.find(".sow-slide-nav"),l=n.find(".sow-slider-image"),c=n.data("settings");l.each(function(e,i){var t=w(i),s=t.data("url");void 0!==s&&s.hasOwnProperty("url")&&(t.click(function(e){e.preventDefault(),window.open(s.url,s.hasOwnProperty("new_window")&&s.new_window?"_blank":"_self").opener=null}),t.find("a").click(function(e){e.stopPropagation()}))});var r=function(){var e=n.closest(".so-widget-fittext-wrapper");if(0<e.length&&!e.data("fitTextDone"))e.on("fitTextDone",function(){r()});else{o.show();var t=function(){n.find(".sow-slider-image").each(function(){var e=w(this);e.css("height",e.find(".sow-slider-image-wrapper").outerHeight())})};if(w(window).on("resize panelsStretchRows",t).resize(),w(sowb).on("setup_widgets",t),n.on({"cycle-after":function(e,i,t,s,n){var o=w(this);u.playSlideVideo(s),u.setupActiveSlide(o,s),w(s).trigger("sowSlideCycleAfter")},"cycle-before":function(e,i,t,s,n){var o=w(this);d.find("> li").removeClass("sow-active").eq(i.slideNum-1).addClass("sow-active"),u.pauseSlideVideo(t),u.setupActiveSlide(o,s,i.speed),w(s).trigger("sowSlideCycleBefore")},"cycle-initialized":function(e,i){u.playSlideVideo(w(this).find(".cycle-slide-active")),u.setupActiveSlide(n,i.slides[0]),d.find(">li").removeClass("sow-active").eq(0).addClass("sow-active"),w(this).find(".cycle-slide-active").trigger("sowSlideInitial"),i.slideCount<=1&&(d.hide(),a.hide()),w(window).resize(),setTimeout(function(){t(),u.setupActiveSlide(n,i.slides[0]),n.find(".cycle-sentinel").empty()},200)}}).cycle({slides:"> .sow-slider-image",speed:c.speed,timeout:c.timeout,swipe:c.swipe,"swipe-fx":"scrollHorz",log:!1}),n.find("video.sow-background-element").on("loadeddata",function(){u.setupActiveSlide(n,n.find(".cycle-slide-active"))}),d.add(a).hide(),1<l.length)if(o.hasClass("sow-slider-is-mobile"))c.nav_always_show_mobile&&window.matchMedia("(max-width: "+c.breakpoint+")").matches&&(d.show(),a.show());else{var i=!1;o.mouseenter(function(){d.add(a).clearQueue().fadeIn(150),i=!1}).mouseleave(function(){i=!0,setTimeout(function(){i&&d.add(a).clearQueue().fadeOut(150),i=!1},750)})}var s=function(){u.setupActiveSlide(n,n.find(".cycle-slide-active"))};w(window).on("resize",s),w(sowb).on("setup_widgets",s),d.find("> li > a").click(function(e){e.preventDefault(),n.cycle("goto",w(this).data("goto"))}),a.find("> a").click(function(e){e.preventDefault(),n.cycle(w(this).data("action"))}),o.keydown(function(e){37===e.which?n.cycle("prev"):39===e.which&&n.cycle("next")})}},e=n.find("img"),i=0,t=!1;e.each(function(){w(this);this.complete?i++:w(this).one("load",function(){++i!==e.length||t||(r(),t=!0)}).attr("src",w(this).attr("src")),i!==e.length||t||(r(),t=!0)}),0===e.length&&r(),n.data("initialized",!0)})},sowb.setupSliders(),w(sowb).on("setup_widgets",sowb.setupSliders)}),window.sowb=sowb;
js/sow.google-map.js CHANGED
@@ -16,13 +16,18 @@ sowb.SiteOriginGoogleMap = function($) {
16
var zoom = Number(options.zoom);
17
18
if ( !zoom ) zoom = 14;
19
20
var userMapTypeId = 'user_map_style';
21
22
var mapOptions = {
23
zoom: zoom,
24
- scrollwheel: options.scrollZoom,
25
- draggable: options.draggable,
26
disableDefaultUI: options.disableUi,
27
zoomControl: options.zoomControl,
28
panControl: options.panControl,
@@ -458,15 +463,19 @@ jQuery(function ($) {
458
}
459
}, 100 );
460
} else {
461
- var apiUrl = 'https://maps.googleapis.com/maps/api/js?callback=soGoogleMapInitialize';
462
463
if ( libraries && libraries.length ) {
464
apiUrl += '&libraries=' + libraries.join(',');
465
}
466
467
- if ( apiKey ) {
468
- apiUrl += '&key=' + apiKey;
469
- }
470
471
// This allows us to "catch" Google Maps JavaScript API errors and do a bit of custom handling. In this case,
472
// we display a user-specified fallback image if there is one.
16
var zoom = Number(options.zoom);
17
18
if ( !zoom ) zoom = 14;
19
+
20
+ var breakpointCheck = window.matchMedia( '(max-width: ' + options.breakpoint + 'px)' )
21
+ // Check if the user is viewing the map on mobile
22
+ if ( breakpointCheck.matches ) {
23
+ zoom = options.mobileZoom;
24
+ }
25
26
var userMapTypeId = 'user_map_style';
27
28
var mapOptions = {
29
zoom: zoom,
30
+ gestureHandling: options.gestureHandling,
31
disableDefaultUI: options.disableUi,
32
zoomControl: options.zoomControl,
33
panControl: options.panControl,
463
}
464
}, 100 );
465
} else {
466
+
467
+ if ( ! apiKey ) {
468
+ console.warn( 'SiteOrigin Google Maps: Could not find API key. Google Maps API key is required.' );
469
+ apiKey = '';
470
+ }
471
+
472
+ // Try to load even if API key is missing to allow Google Maps API to provide it's own warnings/errors about missing API key.
473
+ var apiUrl = 'https://maps.googleapis.com/maps/api/js?key=' + apiKey + '&callback=soGoogleMapInitialize';
474
475
if ( libraries && libraries.length ) {
476
apiUrl += '&libraries=' + libraries.join(',');
477
}
478
479
480
// This allows us to "catch" Google Maps JavaScript API errors and do a bit of custom handling. In this case,
481
// we display a user-specified fallback image if there is one.
js/sow.google-map.min.js CHANGED
@@ -1 +1 @@
1
- function soGoogleMapInitialize(){new sowb.SiteOriginGoogleMap(jQuery).initMaps()}window.sowb=window.sowb||{},sowb.SiteOriginGoogleMap=function(l){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);var a,n="user_map_style",s={zoom:i,scrollwheel:t.scrollZoom,draggable:t.draggable,disableDefaultUI:t.disableUi,zoomControl:t.zoomControl,panControl:t.panControl,center:o,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,google.maps.MapTypeId.SATELLITE,n]}},r=new google.maps.Map(e,s),l={name:t.mapName},c=t.mapStyles;if(c){var d=new google.maps.StyledMapType(c,l);r.mapTypes.set(n,d),r.setMapTypeId(n)}(t.markerAtCenter&&(this.centerMarker=new google.maps.Marker({position:o,map:r,draggable:t.markersDraggable,icon:t.markerIcon,title:""})),t.keepCentered)&&(google.maps.event.addDomListener(r,"idle",function(){a=r.getCenter()}),google.maps.event.addDomListener(window,"resize",function(){r.setCenter(a)}));this.linkAutocompleteField(t.autocomplete,t.autocompleteElement,r,t),this.showMarkers(t.markerPositions,r,t),this.showDirections(t.directions,r,t)},linkAutocompleteField:function(o,e,t,i){if(o&&e){var a=function(e){this.inputAddress!==e&&(this.inputAddress=e,this.getLocation(this.inputAddress).done(function(e){t.setZoom(15),t.setCenter(e),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(this.inputAddress))}.bind(this)))}.bind(this),n=l(e);o.addListener("place_changed",function(){var e=o.getPlace();t.setZoom(15),e.geometry&&(t.setCenter(e.geometry.location),this.centerMarker&&this.centerMarker.setPosition(e.geometry.location))}.bind(this)),google.maps.event.addDomListener(e,"keypress",function(e){"13"===(e.keyCode||e.which)&&e.preventDefault()}),n.focusin(function(){if(!this.resultsObserver){var e=document.querySelector(".pac-container");this.resultsObserver=new MutationObserver(function(){var e=l(l(".pac-item").get(0)),o=e.find(".pac-item-query").text(),t=e.find("span").not("[class]").text(),i=o+(t?", "+t:"");i&&a(i)});this.resultsObserver.observe(e,{attributes:!0,childList:!0,characterData:!0})}}.bind(this));var s=function(i){this.getGeocoder().geocode({location:i},function(e,o){if(o===google.maps.GeocoderStatus.OK&&0<e.length){var t=e[0].formatted_address;n.val(t),this.centerMarker&&(this.centerMarker.setPosition(i),this.centerMarker.setTitle(t))}}.bind(this))}.bind(this);t.addListener("click",function(e){s(e.latLng)}),this.centerMarker.addListener("dragend",function(e){s(e.latLng)})}},showMarkers:function(e,d,p){if(e&&e.length){this.infoWindows=[];for(var o=[],t=0;t<e.length;t++){var i=parseInt(t/10);o.length===i&&(o[i]=[]),o[i][t%10]=e[t]}var a=function(e){var r=e.custom_marker_icon,l=e.hasOwnProperty("info")?e.info:null,c=e.hasOwnProperty("info_max_width")?e.info_max_width:null;return this.getLocation(e.place).done(function(e){var o=p.markerIcon;r&&(o=r);var t=new google.maps.Marker({position:e,map:d,draggable:p.markersDraggable,icon:o,title:""});if(l){var i={content:l};c&&(i.maxWidth=c);var a=p.markerInfoDisplay;i.disableAutoPan="always"===a;var n=new google.maps.InfoWindow(i);this.infoWindows.push(n);var s=a;"always"===a&&(s="click",n.open(d,t)),t.addListener(s,function(){n.open(d,t),"always"===a||p.markerInfoMultiple||this.infoWindows.forEach(function(e){e!==n&&e.close()})}.bind(this)),"mouseover"===a&&t.addListener("mouseout",function(){setTimeout(function(){n.close()},100)})}}.bind(this)).fail(function(e){n=e===google.maps.GeocoderStatus.OVER_QUERY_LIMIT,console.log(e)})}.bind(this),n=!1,s=function(e,o){for(var t=0,i=0;i<e.length&&!n;i++)a(e[i]).then(function(){++t===e.length&&o.length&&s(o.shift(),o)})}.bind(this);s(o.shift(),o)}},showDirections:function(t,e){if(t){t.waypoints&&t.waypoints.length&&t.waypoints.map(function(e){e.stopover=Boolean(e.stopover)});var i=new google.maps.DirectionsRenderer;i.setMap(e),(new google.maps.DirectionsService).route({origin:t.origin,destination:t.destination,travelMode:t.travelMode.toUpperCase(),avoidHighways:t.avoidHighways,avoidTolls:t.avoidTolls,waypoints:t.waypoints,optimizeWaypoints:t.optimizeWaypoints},function(e,o){o===google.maps.DirectionsStatus.OK&&(i.setOptions({preserveViewport:t.preserveViewport}),i.setDirections(e))})}},initMaps:function(){var e=l(".sow-google-map-autocomplete"),n=new l.Deferred;0===e.length?n.resolve():e.each(function(e,o){if(void 0!==google.maps.places){var t=new google.maps.places.Autocomplete(o),i=l(o).siblings(".sow-google-map-canvas");if(0<i.length){var a=i.data("options");a.autocomplete=t,a.autocompleteElement=o,this.getLocation(a.address).done(function(e){this.showMap(i.get(0),e,a),i.data("initialized",!0),n.resolve()}.bind(this)).fail(function(){i.append("<div><p><strong>"+soWidgetsGoogleMap.geocode.noResults+"</strong></p></div>"),n.reject()})}}else n.reject('Sorry, we couldn\'t load the "places" library due to another plugin, so the autocomplete feature is not available.')}.bind(this)),n.always(function(){l(".sow-google-map-canvas").each(function(e,o){var t=l(o);if(t.data("initialized"))return!0;var i=t.data("options"),a=i.address;if(!a){var n=i.markerPositions;n&&n.length&&(a=n[0].place)}this.getLocation(a).done(function(e){this.showMap(t.get(0),e,i),t.data("initialized",!0)}.bind(this)).fail(function(){t.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(e){var o,t=new l.Deferred,i={address:e};if(e&&-1<e.indexOf(",")){var a=e.replace(/[\(\)]/g,"").split(",");a&&2===a.length&&(o=new google.maps.LatLng(a[0],a[1]),isNaN(o.lat())||isNaN(o.lng())||(i={location:{lat:o.lat(),lng:o.lng()}}))}if(i.hasOwnProperty("location"))t.resolve(i.location);else if(i.hasOwnProperty("address")){if(!i.address){var n=parseInt(Math.random()*this.DEFAULT_LOCATIONS.length);i.address=this.DEFAULT_LOCATIONS[n]}var s=0,r=function(e,o){o===google.maps.GeocoderStatus.OK?t.resolve(e[0].geometry.location):o===google.maps.GeocoderStatus.OVER_QUERY_LIMIT?++s<3?setTimeout(function(){this.getGeocoder().geocode.call(this,i,r)}.bind(this),1e3):t.reject(o):o!==google.maps.GeocoderStatus.ZERO_RESULTS&&o!==google.maps.GeocoderStatus.OVER_DAILY_LIMIT||t.reject(o)}.bind(this);this.getGeocoder().geocode(i,r)}return t}}},jQuery(function(r){sowb.setupGoogleMaps=function(){var a,n=[],e=r(".sow-google-map-canvas");if(e.length){e.each(function(e,o){var t=r(o);if(!t.is(":visible")||t.data("apiInitialized"))return t;var i=t.data("options");i&&(void 0!==i.libraries&&null!==i.libraries&&(n=n.concat(i.libraries)),!a&&i.apiKey&&(a=i.apiKey)),t.data("apiInitialized",!0)});var o=void 0!==window.google&&void 0!==window.google.maps;if(sowb.mapsApiInitialized)var t=setTimeout(function(){o&&(clearTimeout(t),soGoogleMapInitialize())},100);else{var i="https://maps.googleapis.com/maps/api/js?callback=soGoogleMapInitialize";if(n&&n.length&&(i+="&libraries="+n.join(",")),a&&(i+="&key="+a),window.console&&window.console.error){var s=window.console.error;sowb.onLoadMapsApiError=function(e){var o;"string"==typeof e&&(o=e.match(/^Google Maps API (error|warning): ([^\s]*)\s([^\s]*)(?:\s(.*))?/)),o&&o.length&&o[0]&&r(".sow-google-map-canvas").each(function(e,o){var t=r(o);if(t.data("fallbackImage")){var i=t.data("fallbackImage");i.hasOwnProperty("img")&&t.append(i.img)}}),s.apply(window.console,arguments)},window.console.error=sowb.onLoadMapsApiError}r("body").append('<script async type="text/javascript" src="'+i+'">'),sowb.mapsApiInitialized=!0}}},sowb.setupGoogleMaps(),r(sowb).on("setup_widgets",sowb.setupGoogleMaps)});
1
+ function soGoogleMapInitialize(){new sowb.SiteOriginGoogleMap(jQuery).initMaps()}window.sowb=window.sowb||{},sowb.SiteOriginGoogleMap=function(l){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="user_map_style",s={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,a]}},r=new google.maps.Map(e,s),l={name:t.mapName},d=t.mapStyles;if(d){var c=new google.maps.StyledMapType(d,l);r.mapTypes.set(a,c),r.setMapTypeId(a)}(t.markerAtCenter&&(this.centerMarker=new google.maps.Marker({position:o,map:r,draggable:t.markersDraggable,icon:t.markerIcon,title:""})),t.keepCentered)&&(google.maps.event.addDomListener(r,"idle",function(){n=r.getCenter()}),google.maps.event.addDomListener(window,"resize",function(){r.setCenter(n)}));this.linkAutocompleteField(t.autocomplete,t.autocompleteElement,r,t),this.showMarkers(t.markerPositions,r,t),this.showDirections(t.directions,r,t)},linkAutocompleteField:function(o,e,t,i){if(o&&e){var n=function(e){this.inputAddress!==e&&(this.inputAddress=e,this.getLocation(this.inputAddress).done(function(e){t.setZoom(15),t.setCenter(e),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(this.inputAddress))}.bind(this)))}.bind(this),a=l(e);o.addListener("place_changed",function(){var e=o.getPlace();t.setZoom(15),e.geometry&&(t.setCenter(e.geometry.location),this.centerMarker&&this.centerMarker.setPosition(e.geometry.location))}.bind(this)),google.maps.event.addDomListener(e,"keypress",function(e){"13"===(e.keyCode||e.which)&&e.preventDefault()}),a.focusin(function(){if(!this.resultsObserver){var e=document.querySelector(".pac-container");this.resultsObserver=new MutationObserver(function(){var e=l(l(".pac-item").get(0)),o=e.find(".pac-item-query").text(),t=e.find("span").not("[class]").text(),i=o+(t?", "+t:"");i&&n(i)});this.resultsObserver.observe(e,{attributes:!0,childList:!0,characterData:!0})}}.bind(this));var s=function(i){this.getGeocoder().geocode({location:i},function(e,o){if(o===google.maps.GeocoderStatus.OK&&0<e.length){var t=e[0].formatted_address;a.val(t),this.centerMarker&&(this.centerMarker.setPosition(i),this.centerMarker.setTitle(t))}}.bind(this))}.bind(this);t.addListener("click",function(e){s(e.latLng)}),this.centerMarker.addListener("dragend",function(e){s(e.latLng)})}},showMarkers:function(e,c,p){if(e&&e.length){this.infoWindows=[];for(var o=[],t=0;t<e.length;t++){var i=parseInt(t/10);o.length===i&&(o[i]=[]),o[i][t%10]=e[t]}var n=function(e){var r=e.custom_marker_icon,l=e.hasOwnProperty("info")?e.info:null,d=e.hasOwnProperty("info_max_width")?e.info_max_width:null;return this.getLocation(e.place).done(function(e){var o=p.markerIcon;r&&(o=r);var t=new google.maps.Marker({position:e,map:c,draggable:p.markersDraggable,icon:o,title:""});if(l){var i={content:l};d&&(i.maxWidth=d);var n=p.markerInfoDisplay;i.disableAutoPan="always"===n;var a=new google.maps.InfoWindow(i);this.infoWindows.push(a);var s=n;"always"===n&&(s="click",a.open(c,t)),t.addListener(s,function(){a.open(c,t),"always"===n||p.markerInfoMultiple||this.infoWindows.forEach(function(e){e!==a&&e.close()})}.bind(this)),"mouseover"===n&&t.addListener("mouseout",function(){setTimeout(function(){a.close()},100)})}}.bind(this)).fail(function(e){a=e===google.maps.GeocoderStatus.OVER_QUERY_LIMIT,console.log(e)})}.bind(this),a=!1,s=function(e,o){for(var t=0,i=0;i<e.length&&!a;i++)n(e[i]).then(function(){++t===e.length&&o.length&&s(o.shift(),o)})}.bind(this);s(o.shift(),o)}},showDirections:function(t,e){if(t){t.waypoints&&t.waypoints.length&&t.waypoints.map(function(e){e.stopover=Boolean(e.stopover)});var i=new google.maps.DirectionsRenderer;i.setMap(e),(new google.maps.DirectionsService).route({origin:t.origin,destination:t.destination,travelMode:t.travelMode.toUpperCase(),avoidHighways:t.avoidHighways,avoidTolls:t.avoidTolls,waypoints:t.waypoints,optimizeWaypoints:t.optimizeWaypoints},function(e,o){o===google.maps.DirectionsStatus.OK&&(i.setOptions({preserveViewport:t.preserveViewport}),i.setDirections(e))})}},initMaps:function(){var e=l(".sow-google-map-autocomplete"),a=new l.Deferred;0===e.length?a.resolve():e.each(function(e,o){if(void 0!==google.maps.places){var t=new google.maps.places.Autocomplete(o),i=l(o).siblings(".sow-google-map-canvas");if(0<i.length){var n=i.data("options");n.autocomplete=t,n.autocompleteElement=o,this.getLocation(n.address).done(function(e){this.showMap(i.get(0),e,n),i.data("initialized",!0),a.resolve()}.bind(this)).fail(function(){i.append("<div><p><strong>"+soWidgetsGoogleMap.geocode.noResults+"</strong></p></div>"),a.reject()})}}else a.reject('Sorry, we couldn\'t load the "places" library due to another plugin, so the autocomplete feature is not available.')}.bind(this)),a.always(function(){l(".sow-google-map-canvas").each(function(e,o){var t=l(o);if(t.data("initialized"))return!0;var i=t.data("options"),n=i.address;if(!n){var a=i.markerPositions;a&&a.length&&(n=a[0].place)}this.getLocation(n).done(function(e){this.showMap(t.get(0),e,i),t.data("initialized",!0)}.bind(this)).fail(function(){t.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(e){var o,t=new l.Deferred,i={address:e};if(e&&-1<e.indexOf(",")){var n=e.replace(/[\(\)]/g,"").split(",");n&&2===n.length&&(o=new google.maps.LatLng(n[0],n[1]),isNaN(o.lat())||isNaN(o.lng())||(i={location:{lat:o.lat(),lng:o.lng()}}))}if(i.hasOwnProperty("location"))t.resolve(i.location);else if(i.hasOwnProperty("address")){if(!i.address){var a=parseInt(Math.random()*this.DEFAULT_LOCATIONS.length);i.address=this.DEFAULT_LOCATIONS[a]}var s=0,r=function(e,o){o===google.maps.GeocoderStatus.OK?t.resolve(e[0].geometry.location):o===google.maps.GeocoderStatus.OVER_QUERY_LIMIT?++s<3?setTimeout(function(){this.getGeocoder().geocode.call(this,i,r)}.bind(this),1e3):t.reject(o):o!==google.maps.GeocoderStatus.ZERO_RESULTS&&o!==google.maps.GeocoderStatus.OVER_DAILY_LIMIT||t.reject(o)}.bind(this);this.getGeocoder().geocode(i,r)}return t}}},jQuery(function(r){sowb.setupGoogleMaps=function(){var n,a=[],e=r(".sow-google-map-canvas");if(e.length){e.each(function(e,o){var t=r(o);if(!t.is(":visible")||t.data("apiInitialized"))return t;var i=t.data("options");i&&(void 0!==i.libraries&&null!==i.libraries&&(a=a.concat(i.libraries)),!n&&i.apiKey&&(n=i.apiKey)),t.data("apiInitialized",!0)});var o=void 0!==window.google&&void 0!==window.google.maps;if(sowb.mapsApiInitialized)var t=setTimeout(function(){o&&(clearTimeout(t),soGoogleMapInitialize())},100);else{n||(console.warn("SiteOrigin Google Maps: Could not find API key. Google Maps API key is required."),n="");var i="https://maps.googleapis.com/maps/api/js?key="+n+"&callback=soGoogleMapInitialize";if(a&&a.length&&(i+="&libraries="+a.join(",")),window.console&&window.console.error){var s=window.console.error;sowb.onLoadMapsApiError=function(e){var o;"string"==typeof e&&(o=e.match(/^Google Maps API (error|warning): ([^\s]*)\s([^\s]*)(?:\s(.*))?/)),o&&o.length&&o[0]&&r(".sow-google-map-canvas").each(function(e,o){var t=r(o);if(t.data("fallbackImage")){var i=t.data("fallbackImage");i.hasOwnProperty("img")&&t.append(i.img)}}),s.apply(window.console,arguments)},window.console.error=sowb.onLoadMapsApiError}r("body").append('<script async type="text/javascript" src="'+i+'">'),sowb.mapsApiInitialized=!0}}},sowb.setupGoogleMaps(),r(sowb).on("setup_widgets",sowb.setupGoogleMaps)});
lang/so-widgets-bundle.pot CHANGED
@@ -24,7 +24,7 @@ msgstr ""
24
msgid "Filter Widgets"
25
msgstr ""
26
27
- #: admin/tpl/admin.php:17, base/inc/fields/posts.class.php:12, widgets/google-map/google-map.php:346
28
msgid "All"
29
msgstr ""
30
@@ -48,7 +48,7 @@ msgstr ""
48
msgid "Deactivate"
49
msgstr ""
50
51
- #: admin/tpl/admin.php:90, widgets/contact/contact.php:59, widgets/google-map/google-map.php:73, widgets/testimonial/testimonial.php:100
52
msgid "Settings"
53
msgstr ""
54
@@ -72,27 +72,31 @@ msgstr ""
72
msgid "Save"
73
msgstr ""
74
75
- #: base/base.php:51, base/base.php:55, base/inc/actions.php:10, base/inc/actions.php:74, base/inc/actions.php:118, base/inc/actions.php:154, base/inc/actions.php:167, base/inc/actions.php:171, base/inc/actions.php:262, base/inc/actions.php:265, so-widgets-bundle.php:370, so-widgets-bundle.php:394, so-widgets-bundle.php:407, so-widgets-bundle.php:437, so-widgets-bundle.php:448, so-widgets-bundle.php:514, so-widgets-bundle.php:525
76
msgid "Invalid request."
77
msgstr ""
78
79
- #: base/inc/actions.php:12, base/inc/actions.php:20, so-widgets-bundle.php:377, so-widgets-bundle.php:520
80
msgid "Invalid post."
81
msgstr ""
82
83
- #: base/inc/actions.php:50, base/siteorigin-widget.class.php:660
84
msgid "Widget Preview"
85
msgstr ""
86
87
- #: base/inc/actions.php:210
88
msgid "Nonce error"
89
msgstr ""
90
91
- #: base/inc/actions.php:220
92
msgid "Signature error"
93
msgstr ""
94
95
- #: base/inc/actions.php:246
96
msgid "Attachment error"
97
msgstr ""
98
@@ -241,139 +245,139 @@ msgstr ""
241
msgid "Sponsored"
242
msgstr ""
243
244
- #: base/inc/fields/posts.class.php:22
245
msgid "Post type"
246
msgstr ""
247
248
- #: base/inc/fields/posts.class.php:30
249
msgid "Post in"
250
msgstr ""
251
252
- #: base/inc/fields/posts.class.php:36, widgets/taxonomy/taxonomy.php:38
253
msgid "Taxonomies"
254
msgstr ""
255
256
- #: base/inc/fields/posts.class.php:38
257
msgid "Taxonomies are groups such as categories, tags, posts and products."
258
msgstr ""
259
260
- #: base/inc/fields/posts.class.php:43
261
msgid "Date selection type"
262
msgstr ""
263
264
- #: base/inc/fields/posts.class.php:45
265
msgid "Specific"
266
msgstr ""
267
268
- #: base/inc/fields/posts.class.php:46
269
msgid "Relative"
270
msgstr ""
271
272
- #: base/inc/fields/posts.class.php:48
273
msgid "Select a range between specific dates or relative to the current date."
274
msgstr ""
275
276
- #: base/inc/fields/posts.class.php:58, base/inc/fields/posts.class.php:68
277
msgid "Dates"
278
msgstr ""
279
280
- #: base/inc/fields/posts.class.php:78
281
msgid "Order by"
282
msgstr ""
283
284
- #: base/inc/fields/posts.class.php:80
285
msgid "No order"
286
msgstr ""
287
288
- #: base/inc/fields/posts.class.php:81
289
msgid "Post ID"
290
msgstr ""
291
292
- #: base/inc/fields/posts.class.php:82
293
msgid "Author"
294
msgstr ""
295
296
- #: base/inc/fields/posts.class.php:83, widgets/accordion/accordion.php:47, widgets/accordion/accordion.php:60, widgets/contact/contact.php:48, widgets/cta/cta.php:64, widgets/editor/editor.php:33, widgets/features/features.php:133, widgets/post-carousel/post-carousel.php:98, 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:75, 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
297
msgid "Title"
298
msgstr ""
299
300
- #: base/inc/fields/posts.class.php:84
301
msgid "Published date"
302
msgstr ""
303
304
- #: base/inc/fields/posts.class.php:85
305
msgid "Modified date"
306
msgstr ""
307
308
- #: base/inc/fields/posts.class.php:86
309
msgid "By parent"
310
msgstr ""
311
312
- #: base/inc/fields/posts.class.php:87
313
msgid "Random order"
314
msgstr ""
315
316
- #: base/inc/fields/posts.class.php:88
317
msgid "Comment count"
318
msgstr ""
319
320
- #: base/inc/fields/posts.class.php:89
321
msgid "Menu order"
322
msgstr ""
323
324
- #: base/inc/fields/posts.class.php:90
325
msgid "By meta value"
326
msgstr ""
327
328
- #: base/inc/fields/posts.class.php:91
329
msgid "By numeric meta value"
330
msgstr ""
331
332
- #: base/inc/fields/posts.class.php:92
333
msgid "By include order"
334
msgstr ""
335
336
- #: base/inc/fields/posts.class.php:99
337
msgid "Order direction"
338
msgstr ""
339
340
- #: base/inc/fields/posts.class.php:101
341
msgid "Ascending"
342
msgstr ""
343
344
- #: base/inc/fields/posts.class.php:102
345
msgid "Descending"
346
msgstr ""
347
348
- #: base/inc/fields/posts.class.php:109
349
msgid "Posts per page"
350
msgstr ""
351
352
- #: base/inc/fields/posts.class.php:114
353
msgid "Sticky posts"
354
msgstr ""
355
356
- #: base/inc/fields/posts.class.php:116, compat/beaver-builder/beaver-builder.php:66, widgets/google-map/google-map.php:278, widgets/image/image.php:47, widgets/image/image.php:59
357
msgid "Default"
358
msgstr ""
359
360
- #: base/inc/fields/posts.class.php:117
361
msgid "Ignore sticky"
362
msgstr ""
363
364
- #: base/inc/fields/posts.class.php:118
365
msgid "Exclude sticky"
366
msgstr ""
367
368
- #: base/inc/fields/posts.class.php:119
369
msgid "Only sticky"
370
msgstr ""
371
372
- #: base/inc/fields/posts.class.php:125
373
msgid "Additional"
374
msgstr ""
375
376
- #: base/inc/fields/posts.class.php:126
377
msgid "Additional query arguments. See <a href=\"http://codex.wordpress.org/Function_Reference/query_posts\" target=\"_blank\" rel=\"noopener noreferrer\">query_posts</a>."
378
msgstr ""
379
@@ -474,58 +478,70 @@ msgid "Navigation size"
474
msgstr ""
475
476
#: base/inc/widgets/base-slider.class.php:96
477
- msgid "Swipe Control"
478
msgstr ""
479
480
- #: base/inc/widgets/base-slider.class.php:97
481
msgid "Allow users to swipe through frames on mobile devices."
482
msgstr ""
483
484
- #: base/inc/widgets/base-slider.class.php:103
485
msgid "Show slide background videos on mobile"
486
msgstr ""
487
488
- #: base/inc/widgets/base-slider.class.php:104
489
msgid "Allow slide background videos to appear on mobile devices that support autoplay."
490
msgstr ""
491
492
- #: base/inc/widgets/base-slider.class.php:114
493
msgid "Video file"
494
msgstr ""
495
496
- #: base/inc/widgets/base-slider.class.php:120, widgets/video/video.php:85
497
msgid "Video URL"
498
msgstr ""
499
500
- #: base/inc/widgets/base-slider.class.php:122
501
msgid "An external URL of the video. Overrides video file."
502
msgstr ""
503
504
- #: base/inc/widgets/base-slider.class.php:127, widgets/video/video.php:101
505
msgid "Autoplay"
506
msgstr ""
507
508
- #: base/inc/widgets/base-slider.class.php:129
509
msgid "Currently only for YouTube videos."
510
msgstr ""
511
512
- #: base/inc/widgets/base-slider.class.php:134
513
msgid "Video format"
514
msgstr ""
515
516
- #: base/inc/widgets/base-slider.class.php:144
517
msgid "Maximum height"
518
msgstr ""
519
520
- #: base/inc/widgets/base-slider.class.php:188
521
msgid "display slide %s"
522
msgstr ""
523
524
- #: base/inc/widgets/base-slider.class.php:193
525
msgid "next slide"
526
msgstr ""
527
528
- #: base/inc/widgets/base-slider.class.php:199
529
msgid "previous slide"
530
msgstr ""
531
@@ -621,7 +637,7 @@ msgstr ""
621
msgid "Regular"
622
msgstr ""
623
624
- #: icons/fontawesome/filter.php:1343, widgets/contact/contact.php:330, widgets/contact/contact.php:447, widgets/contact/contact.php:555, widgets/contact/contact.php:633, widgets/headline/headline.php:189
625
msgid "Solid"
626
msgstr ""
627
@@ -681,11 +697,11 @@ msgstr ""
681
msgid "Deactivated"
682
msgstr ""
683
684
- #: so-widgets-bundle.php:754
685
msgid "Manage Widgets"
686
msgstr ""
687
688
- #: so-widgets-bundle.php:755
689
msgid "Support"
690
msgstr ""
691
@@ -725,7 +741,7 @@ msgstr ""
725
msgid "Closed"
726
msgstr ""
727
728
- #: widgets/accordion/accordion.php:80, widgets/contact/contact.php:293, widgets/cta/cta.php:74, widgets/tabs/tabs.php:76, widgets/testimonial/testimonial.php:183
729
msgid "Design"
730
msgstr ""
731
@@ -733,7 +749,7 @@ msgstr ""
733
msgid "Headings"
734
msgstr ""
735
736
- #: widgets/accordion/accordion.php:90, widgets/accordion/accordion.php:128, widgets/contact/contact.php:303, widgets/contact/contact.php:536, widgets/cta/cta.php:78, widgets/hero/hero.php:122, widgets/layout-slider/layout-slider.php:82, widgets/social-media-buttons/social-media-buttons.php:86, widgets/tabs/tabs.php:86, widgets/tabs/tabs.php:106, widgets/tabs/tabs.php:150
737
msgid "Background color"
738
msgstr ""
739
@@ -749,7 +765,7 @@ msgstr ""
749
msgid "Title hover color"
750
msgstr ""
751
752
- #: widgets/accordion/accordion.php:109, widgets/accordion/accordion.php:137, widgets/contact/contact.php:313, widgets/contact/contact.php:430, widgets/contact/contact.php:546, widgets/cta/cta.php:82, widgets/tabs/tabs.php:91, widgets/tabs/tabs.php:125, widgets/tabs/tabs.php:159
753
msgid "Border color"
754
msgstr ""
755
@@ -757,7 +773,7 @@ msgstr ""
757
msgid "Border hover color"
758
msgstr ""
759
760
- #: widgets/accordion/accordion.php:117, widgets/accordion/accordion.php:141, widgets/contact/contact.php:318, widgets/contact/contact.php:435, widgets/contact/contact.php:562, widgets/tabs/tabs.php:95, widgets/tabs/tabs.php:135, widgets/tabs/tabs.php:163
761
msgid "Border width"
762
msgstr ""
763
@@ -789,11 +805,11 @@ msgstr ""
789
msgid "Button text"
790
msgstr ""
791
792
- #: widgets/button/button.php:51, widgets/google-map/google-map.php:107, widgets/headline/headline.php:47, widgets/headline/headline.php:118, widgets/hero/hero.php:128, widgets/icon/icon.php:57, widgets/image/image.php:89, widgets/layout-slider/layout-slider.php:88, widgets/simple-masonry/simple-masonry.php:79, widgets/slider/slider.php:85
793
msgid "Destination URL"
794
msgstr ""
795
796
- #: widgets/button/button.php:57, widgets/google-map/google-map.php:118, widgets/headline/headline.php:52, widgets/headline/headline.php:123, widgets/icon/icon.php:63, widgets/simple-masonry/simple-masonry.php:84, widgets/social-media-buttons/social-media-buttons.php:97, widgets/taxonomy/taxonomy.php:65
797
msgid "Open in a new window"
798
msgstr ""
799
@@ -821,7 +837,7 @@ msgstr ""
821
msgid "Top"
822
msgstr ""
823
824
- #: widgets/button/button.php:86, widgets/button/button.php:112, widgets/contact/contact.php:368, widgets/contact/contact.php:383, widgets/contact/contact.php:607, widgets/cta/cta.php:103, widgets/features/features.php:65, 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/social-media-buttons/social-media-buttons.php:153, widgets/social-media-buttons/social-media-buttons.php:164, widgets/testimonial/testimonial.php:255
825
msgid "Right"
826
msgstr ""
827
@@ -829,7 +845,7 @@ msgstr ""
829
msgid "Bottom"
830
msgstr ""
831
832
- #: widgets/button/button.php:88, widgets/button/button.php:111, widgets/contact/contact.php:367, widgets/contact/contact.php:382, widgets/contact/contact.php:606, widgets/cta/cta.php:102, widgets/features/features.php:67, 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/social-media-buttons/social-media-buttons.php:152, widgets/social-media-buttons/social-media-buttons.php:163, widgets/testimonial/testimonial.php:254
833
msgid "Left"
834
msgstr ""
835
@@ -837,7 +853,7 @@ msgstr ""
837
msgid "Design and layout"
838
msgstr ""
839
840
- #: widgets/button/button.php:102, widgets/contact/contact.php:374, widgets/contact/contact.php:599, widgets/contact/contact.php:650, widgets/google-map/google-map.php:98
841
msgid "Width"
842
msgstr ""
843
@@ -845,15 +861,15 @@ msgstr ""
845
msgid "Leave blank to let the button resize according to content."
846
msgstr ""
847
848
- #: widgets/button/button.php:108, widgets/contact/contact.php:379, widgets/contact/contact.php:603, widgets/social-media-buttons/social-media-buttons.php:149
849
msgid "Align"
850
msgstr ""
851
852
- #: widgets/button/button.php:113, widgets/contact/contact.php:384, widgets/contact/contact.php:608, 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
853
msgid "Center"
854
msgstr ""
855
856
- #: widgets/button/button.php:114, widgets/contact/contact.php:385, 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
857
msgid "Justify"
858
msgstr ""
859
@@ -877,7 +893,7 @@ msgstr ""
877
msgid "Button color"
878
msgstr ""
879
880
- #: widgets/button/button.php:137, widgets/contact/contact.php:574, widgets/hero/hero.php:253, widgets/layout-slider/layout-slider.php:186
881
msgid "Text color"
882
msgstr ""
883
@@ -885,15 +901,15 @@ msgstr ""
885
msgid "Use hover effects"
886
msgstr ""
887
888
- #: widgets/button/button.php:148, widgets/contact/contact.php:347, widgets/contact/contact.php:397, widgets/features/features.php:138, widgets/features/features.php:159, widgets/features/features.php:180, widgets/headline/headline.php:78, widgets/headline/headline.php:149
889
msgid "Font"
890
msgstr ""
891
892
- #: widgets/button/button.php:154, widgets/contact/contact.php:352, widgets/contact/contact.php:579
893
msgid "Font size"
894
msgstr ""
895
896
- #: widgets/button/button.php:156, widgets/contact/contact.php:260, widgets/contact/contact.php:485, widgets/contact/contact.php:587, widgets/social-media-buttons/social-media-buttons.php:119
897
msgid "Normal"
898
msgstr ""
899
@@ -909,7 +925,7 @@ msgstr ""
909
msgid "Rounding"
910
msgstr ""
911
912
- #: widgets/button/button.php:168, widgets/contact/contact.php:326, widgets/contact/contact.php:443, widgets/contact/contact.php:554, widgets/contact/contact.php:639, widgets/headline/headline.php:188, widgets/social-media-buttons/social-media-buttons.php:130
913
msgid "None"
914
msgstr ""
915
@@ -925,7 +941,7 @@ msgstr ""
925
msgid "Completely rounded"
926
msgstr ""
927
928
- #: widgets/button/button.php:177, widgets/contact/contact.php:308, widgets/contact/contact.php:414, widgets/contact/contact.php:594, widgets/social-media-buttons/social-media-buttons.php:138, widgets/testimonial/testimonial.php:234
929
msgid "Padding"
930
msgstr ""
931
@@ -1077,7 +1093,7 @@ msgstr ""
1077
msgid "Log IP addresses."
1078
msgstr ""
1079
1080
- #: widgets/contact/contact.php:136, widgets/contact/contact.php:393
1081
msgid "Fields"
1082
msgstr ""
1083
@@ -1105,7 +1121,7 @@ msgstr ""
1105
msgid "Phone Number"
1106
msgstr ""
1107
1108
- #: widgets/contact/contact.php:151, widgets/contact/contact.php:714
1109
msgid "Subject"
1110
msgstr ""
1111
@@ -1145,7 +1161,7 @@ msgstr ""
1145
msgid "Required Field"
1146
msgstr ""
1147
1148
- #: widgets/contact/contact.php:181, widgets/contact/contact.php:1013
1149
msgid "Required field"
1150
msgstr ""
1151
@@ -1178,314 +1194,318 @@ msgid "Spam Protection"
1178
msgstr ""
1179
1180
#: widgets/contact/contact.php:222
1181
- msgid "reCAPTCHA"
1182
msgstr ""
1183
1184
#: widgets/contact/contact.php:226
1185
- msgid "Use reCAPTCHA"
1186
msgstr ""
1187
1188
- #: widgets/contact/contact.php:231
1189
- msgid "reCAPTCHA Site Key"
1190
msgstr ""
1191
1192
- #: widgets/contact/contact.php:235
1193
- msgid "reCAPTCHA Secret Key"
1194
msgstr ""
1195
1196
- #: widgets/contact/contact.php:239
1197
msgid "Theme"
1198
msgstr ""
1199
1200
- #: widgets/contact/contact.php:242
1201
msgid "Light"
1202
msgstr ""
1203
1204
- #: widgets/contact/contact.php:243
1205
msgid "Dark"
1206
msgstr ""
1207
1208
- #: widgets/contact/contact.php:248
1209
msgid "Challenge type"
1210
msgstr ""
1211
1212
- #: widgets/contact/contact.php:251, widgets/image-grid/image-grid.php:55, widgets/image-grid/image-grid.php:64, widgets/price-table/price-table.php:70, widgets/simple-masonry/simple-masonry.php:55, widgets/testimonial/testimonial.php:72, widgets/testimonial/testimonial.php:188
1213
msgid "Image"
1214
msgstr ""
1215
1216
- #: widgets/contact/contact.php:252
1217
msgid "Audio"
1218
msgstr ""
1219
1220
- #: widgets/contact/contact.php:257, widgets/contact/contact.php:471, widgets/features/features.php:143, widgets/features/features.php:164, widgets/features/features.php:185, widgets/icon/icon.php:41
1221
msgid "Size"
1222
msgstr ""
1223
1224
- #: widgets/contact/contact.php:261
1225
msgid "Compact"
1226
msgstr ""
1227
1228
- #: widgets/contact/contact.php:269
1229
msgid "Akismet"
1230
msgstr ""
1231
1232
- #: widgets/contact/contact.php:273
1233
msgid "Use Akismet filtering"
1234
msgstr ""
1235
1236
- #: widgets/contact/contact.php:278
1237
msgid "Spam action"
1238
msgstr ""
1239
1240
- #: widgets/contact/contact.php:280
1241
msgid "Show error message"
1242
msgstr ""
1243
1244
- #: widgets/contact/contact.php:281
1245
msgid "Tag as spam in subject"
1246
msgstr ""
1247
1248
- #: widgets/contact/contact.php:283
1249
msgid "How to handle submissions that are identified as spam."
1250
msgstr ""
1251
1252
- #: widgets/contact/contact.php:299
1253
msgid "Container"
1254
msgstr ""
1255
1256
- #: widgets/contact/contact.php:323, widgets/contact/contact.php:551
1257
msgid "Border style"
1258
msgstr ""
1259
1260
- #: widgets/contact/contact.php:327, widgets/contact/contact.php:444, widgets/contact/contact.php:640, widgets/image/image.php:76
1261
msgid "Hidden"
1262
msgstr ""
1263
1264
- #: widgets/contact/contact.php:328, widgets/contact/contact.php:445, widgets/contact/contact.php:556, widgets/contact/contact.php:631, widgets/headline/headline.php:190
1265
msgid "Dotted"
1266
msgstr ""
1267
1268
- #: widgets/contact/contact.php:329, widgets/contact/contact.php:446, widgets/contact/contact.php:557, widgets/contact/contact.php:632, widgets/headline/headline.php:191
1269
msgid "Dashed"
1270
msgstr ""
1271
1272
- #: widgets/contact/contact.php:331, widgets/contact/contact.php:448, widgets/contact/contact.php:634, widgets/headline/headline.php:192
1273
msgid "Double"
1274
msgstr ""
1275
1276
- #: widgets/contact/contact.php:332, widgets/contact/contact.php:449, widgets/contact/contact.php:635, widgets/headline/headline.php:193
1277
msgid "Groove"
1278
msgstr ""
1279
1280
- #: widgets/contact/contact.php:333, widgets/contact/contact.php:450, widgets/contact/contact.php:636, widgets/headline/headline.php:194
1281
msgid "Ridge"
1282
msgstr ""
1283
1284
- #: widgets/contact/contact.php:334, widgets/contact/contact.php:451, widgets/contact/contact.php:637, widgets/headline/headline.php:195
1285
msgid "Inset"
1286
msgstr ""
1287
1288
- #: widgets/contact/contact.php:335, widgets/contact/contact.php:452, widgets/contact/contact.php:638, widgets/headline/headline.php:196
1289
msgid "Outset"
1290
msgstr ""
1291
1292
- #: widgets/contact/contact.php:343
1293
msgid "Field labels"
1294
msgstr ""
1295
1296
- #: widgets/contact/contact.php:357, widgets/contact/contact.php:476, widgets/contact/contact.php:645, widgets/features/features.php:147, widgets/features/features.php:168, widgets/features/features.php:189, widgets/google-map/google-map.php:356, widgets/headline/headline.php:70, widgets/headline/headline.php:141, widgets/headline/headline.php:201, widgets/icon/icon.php:36, widgets/taxonomy/taxonomy.php:56
1297
msgid "Color"
1298
msgstr ""
1299
1300
- #: widgets/contact/contact.php:362
1301
msgid "Position"
1302
msgstr ""
1303
1304
- #: widgets/contact/contact.php:365, widgets/image/image.php:77
1305
msgid "Above"
1306
msgstr ""
1307
1308
- #: widgets/contact/contact.php:366, widgets/image/image.php:78
1309
msgid "Below"
1310
msgstr ""
1311
1312
- #: widgets/contact/contact.php:369
1313
msgid "Inside"
1314
msgstr ""
1315
1316
- #: widgets/contact/contact.php:402, widgets/headline/headline.php:83, widgets/headline/headline.php:154
1317
msgid "Font Size"
1318
msgstr ""
1319
1320
- #: widgets/contact/contact.php:406, widgets/testimonial/testimonial.php:226
1321
msgid "Text Color"
1322
msgstr ""
1323
1324
- #: widgets/contact/contact.php:410, widgets/social-media-buttons/social-media-buttons.php:171
1325
msgid "Margin"
1326
msgstr ""
1327
1328
- #: widgets/contact/contact.php:418, widgets/google-map/google-map.php:103, widgets/hero/hero.php:165, widgets/layout-slider/layout-slider.php:125
1329
msgid "Height"
1330
msgstr ""
1331
1332
- #: widgets/contact/contact.php:422
1333
msgid "Text Area Height"
1334
msgstr ""
1335
1336
- #: widgets/contact/contact.php:426, widgets/hero/hero.php:89, widgets/layout-slider/layout-slider.php:53
1337
msgid "Background"
1338
msgstr ""
1339
1340
- #: widgets/contact/contact.php:440
1341
msgid " Border style"
1342
msgstr ""
1343
1344
- #: widgets/contact/contact.php:457, widgets/contact/contact.php:567
1345
msgid "Border rounding"
1346
msgstr ""
1347
1348
- #: widgets/contact/contact.php:467
1349
msgid "Field descriptions"
1350
msgstr ""
1351
1352
- #: widgets/contact/contact.php:481, widgets/contact/contact.php:628, widgets/google-map/google-map.php:309, widgets/headline/headline.php:185
1353
msgid "Style"
1354
msgstr ""
1355
1356
- #: widgets/contact/contact.php:484
1357
msgid "Italic"
1358
msgstr ""
1359
1360
- #: widgets/contact/contact.php:493
1361
msgid "Error messages"
1362
msgstr ""
1363
1364
- #: widgets/contact/contact.php:497
1365
msgid "Error background color"
1366
msgstr ""
1367
1368
- #: widgets/contact/contact.php:502
1369
msgid "Error border color"
1370
msgstr ""
1371
1372
- #: widgets/contact/contact.php:507
1373
msgid "Error text color"
1374
msgstr ""
1375
1376
- #: widgets/contact/contact.php:512
1377
msgid "Error padding"
1378
msgstr ""
1379
1380
- #: widgets/contact/contact.php:517
1381
msgid "Error margin"
1382
msgstr ""
1383
1384
- #: widgets/contact/contact.php:525
1385
msgid "Submit button"
1386
msgstr ""
1387
1388
- #: widgets/contact/contact.php:529
1389
msgid "Style submit button"
1390
msgstr ""
1391
1392
- #: widgets/contact/contact.php:530
1393
msgid "Style the button or leave it with default theme styling."
1394
msgstr ""
1395
1396
- #: widgets/contact/contact.php:541
1397
msgid "Gradient intensity"
1398
msgstr ""
1399
1400
- #: widgets/contact/contact.php:584
1401
msgid "Font weight"
1402
msgstr ""
1403
1404
- #: widgets/contact/contact.php:588
1405
msgid "Semi-bold"
1406
msgstr ""
1407
1408
- #: widgets/contact/contact.php:589
1409
msgid "Bold"
1410
msgstr ""
1411
1412
- #: widgets/contact/contact.php:613
1413
msgid "Inset highlight"
1414
msgstr ""
1415
1416
- #: widgets/contact/contact.php:614
1417
msgid "The white highlight at the bottom of the button"
1418
msgstr ""
1419
1420
- #: widgets/contact/contact.php:624
1421
msgid "Input focus"
1422
msgstr ""
1423
1424
- #: widgets/contact/contact.php:671
1425
msgid "Get more form fields for the Contact Form Widget in %s"
1426
msgstr ""
1427
1428
- #: widgets/contact/contact.php:672
1429
msgid "SiteOrigin Premium"
1430
msgstr ""
1431
1432
- #: widgets/contact/contact.php:698
1433
msgid "Your Name"
1434
msgstr ""
1435
1436
- #: widgets/contact/contact.php:701
1437
msgid "Please enter your name"
1438
msgstr ""
1439
1440
- #: widgets/contact/contact.php:706
1441
msgid "Your Email"
1442
msgstr ""
1443
1444
- #: widgets/contact/contact.php:709
1445
msgid "Please enter a valid email address"
1446
msgstr ""
1447
1448
- #: widgets/contact/contact.php:717
1449
msgid "Please enter a subject"
1450
msgstr ""
1451
1452
- #: widgets/contact/contact.php:722
1453
msgid "Message"
1454
msgstr ""
1455
1456
- #: widgets/contact/contact.php:725
1457
msgid "Please write something"
1458
msgstr ""
1459
1460
- #: widgets/contact/contact.php:1025
1461
msgid "Invalid email address."
1462
msgstr ""
1463
1464
- #: widgets/contact/contact.php:1104
1465
msgid "Error sending email, please try again later."
1466
msgstr ""
1467
1468
- #: widgets/contact/contact.php:1130
1469
msgid "A valid email is required"
1470
msgstr ""
1471
1472
- #: widgets/contact/contact.php:1132
1473
msgid "The email address is invalid"
1474
msgstr ""
1475
1476
- #: widgets/contact/contact.php:1136
1477
msgid "Missing subject"
1478
msgstr ""
1479
1480
- #: widgets/contact/contact.php:1170
1481
msgid "Error validating your Captcha response."
1482
msgstr ""
1483
1484
- #: widgets/contact/contact.php:1202
1485
msgid "Unfortunately our system identified your message as spam."
1486
msgstr ""
1487
1488
- #: widgets/contact/contact.php:1210
1489
msgctxt "The name of who sent this email"
1490
msgid "From"
1491
msgstr ""
@@ -1646,14 +1666,18 @@ msgstr ""
1646
msgid "Open more URL in a new window"
1647
msgstr ""
1648
1649
- #: widgets/features/features.php:298, widgets/hero/hero.php:436, widgets/layout-slider/layout-slider.php:323, widgets/social-media-buttons/social-media-buttons.php:33
1650
- msgid "Responsive Breakpoint"
1651
- msgstr ""
1652
-
1653
#: widgets/features/features.php:300
1654
msgid "This setting controls when the features widget will collapse for mobile devices. The default value is 520px"
1655
msgstr ""
1656
1657
#: widgets/google-map/google-map.php:4
1658
msgid "A highly customisable Google Maps widget. Help your site find its place and give it some direction."
1659
msgstr ""
@@ -1674,367 +1698,383 @@ msgstr ""
1674
msgid "The name of a place, town, city, or even a country. Can be an exact address too. Please ensure you have enabled the <strong>Geocoding API</strong> in the %sGoogle APIs Dashboard%s."
1675
msgstr ""
1676
1677
- #: widgets/google-map/google-map.php:56, widgets/google-map/google-map.php:61, widgets/google-map/google-map.php:446
1678
- msgid "API key"
1679
- msgstr ""
1680
-
1681
- #: widgets/google-map/google-map.php:64
1682
- msgid "Enter your %sAPI key%s. Your map may not function correctly without one."
1683
- msgstr ""
1684
-
1685
- #: widgets/google-map/google-map.php:75
1686
msgid "Set map display options."
1687
msgstr ""
1688
1689
- #: widgets/google-map/google-map.php:80
1690
msgid "Map type"
1691
msgstr ""
1692
1693
- #: widgets/google-map/google-map.php:86
1694
msgid "Interactive"
1695
msgstr ""
1696
1697
- #: widgets/google-map/google-map.php:87
1698
msgid "Static image"
1699
msgstr ""
1700
1701
- #: widgets/google-map/google-map.php:127
1702
msgid "Zoom level"
1703
msgstr ""
1704
1705
- #: widgets/google-map/google-map.php:128
1706
msgid "A value from 0 (the world) to 21 (street level)."
1707
msgstr ""
1708
1709
- #: widgets/google-map/google-map.php:142
1710
- msgid "Scroll to zoom"
1711
msgstr ""
1712
1713
#: widgets/google-map/google-map.php:143
1714
- msgid "Allow scrolling over the map to zoom in or out."
1715
msgstr ""
1716
1717
- #: widgets/google-map/google-map.php:152
1718
- msgid "Draggable"
1719
msgstr ""
1720
1721
- #: widgets/google-map/google-map.php:153
1722
- msgid "Allow dragging the map to move it around."
1723
msgstr ""
1724
1725
- #: widgets/google-map/google-map.php:162
1726
msgid "Disable default UI"
1727
msgstr ""
1728
1729
- #: widgets/google-map/google-map.php:163
1730
msgid "Hides the default Google Maps controls."
1731
msgstr ""
1732
1733
- #: widgets/google-map/google-map.php:172
1734
msgid "Keep map centered"
1735
msgstr ""
1736
1737
- #: widgets/google-map/google-map.php:173
1738
msgid "Keeps the map centered when it's container is resized."
1739
msgstr ""
1740
1741
- #: widgets/google-map/google-map.php:177
1742
msgid "Fallback Image"
1743
msgstr ""
1744
1745
- #: widgets/google-map/google-map.php:178
1746
msgid "This image will be displayed if there are any problems with displaying the specified map."
1747
msgstr ""
1748
1749
- #: widgets/google-map/google-map.php:183
1750
msgid "Fallback Image Size"
1751
msgstr ""
1752
1753
- #: widgets/google-map/google-map.php:189
1754
msgid "Markers"
1755
msgstr ""
1756
1757
- #: widgets/google-map/google-map.php:191
1758
msgid "Use markers to identify points of interest on the map."
1759
msgstr ""
1760
1761
- #: widgets/google-map/google-map.php:196
1762
msgid "Show marker at map center"
1763
msgstr ""
1764
1765
- #: widgets/google-map/google-map.php:201
1766
msgid "Marker icon"
1767
msgstr ""
1768
1769
- #: widgets/google-map/google-map.php:202
1770
msgid "Replaces the default map marker with your own image."
1771
msgstr ""
1772
1773
- #: widgets/google-map/google-map.php:211
1774
msgid "Draggable markers"
1775
msgstr ""
1776
1777
- #: widgets/google-map/google-map.php:215
1778
msgid "Marker positions"
1779
msgstr ""
1780
1781
- #: widgets/google-map/google-map.php:216
1782
msgid "Marker"
1783
msgstr ""
1784
1785
- #: widgets/google-map/google-map.php:226
1786
msgid "Place"
1787
msgstr ""
1788
1789
- #: widgets/google-map/google-map.php:231
1790
msgid "Info Window Content"
1791
msgstr ""
1792
1793
- #: widgets/google-map/google-map.php:235
1794
msgid "Info Window max width"
1795
msgstr ""
1796
1797
- #: widgets/google-map/google-map.php:240
1798
msgid "Custom Marker icon"
1799
msgstr ""
1800
1801
- #: widgets/google-map/google-map.php:241
1802
msgid "Replace the default map marker with your own image for each marker."
1803
msgstr ""
1804
1805
- #: widgets/google-map/google-map.php:247
1806
msgid "When should Info Windows be displayed?"
1807
msgstr ""
1808
1809
- #: widgets/google-map/google-map.php:250
1810
msgid "Click"
1811
msgstr ""
1812
1813
- #: widgets/google-map/google-map.php:251
1814
msgid "Mouse over"
1815
msgstr ""
1816
1817
- #: widgets/google-map/google-map.php:252
1818
msgid "Always"
1819
msgstr ""
1820
1821
- #: widgets/google-map/google-map.php:257
1822
msgid "Allow multiple simultaneous Info Windows?"
1823
msgstr ""
1824
1825
- #: widgets/google-map/google-map.php:265
1826
msgid "Styles"
1827
msgstr ""
1828
1829
- #: widgets/google-map/google-map.php:267
1830
msgid "Apply custom colors to map features, or hide them completely."
1831
msgstr ""
1832
1833
- #: widgets/google-map/google-map.php:272
1834
msgid "Map styles"
1835
msgstr ""
1836
1837
- #: widgets/google-map/google-map.php:279
1838
msgid "Custom"
1839
msgstr ""
1840
1841
- #: widgets/google-map/google-map.php:280
1842
msgid "Predefined Styles"
1843
msgstr ""
1844
1845
- #: widgets/google-map/google-map.php:289
1846
msgid "Styled map name"
1847
msgstr ""
1848
1849
- #: widgets/google-map/google-map.php:299
1850
msgid "Raw JSON styles"
1851
msgstr ""
1852
1853
- #: widgets/google-map/google-map.php:300
1854
msgid "Copy and paste predefined styles here from <a href=\"http://snazzymaps.com/\" target=\"_blank\" rel=\"noopener noreferrer\">Snazzy Maps</a>."
1855
msgstr ""
1856
1857
- #: widgets/google-map/google-map.php:308
1858
msgid "Custom map styles"
1859
msgstr ""
1860
1861
- #: widgets/google-map/google-map.php:319
1862
msgid "Select map feature to style"
1863
msgstr ""
1864
1865
- #: widgets/google-map/google-map.php:321
1866
msgid "Water"
1867
msgstr ""
1868
1869
- #: widgets/google-map/google-map.php:322
1870
msgid "Highways"
1871
msgstr ""
1872
1873
- #: widgets/google-map/google-map.php:323
1874
msgid "Arterial roads"
1875
msgstr ""
1876
1877
- #: widgets/google-map/google-map.php:324
1878
msgid "Local roads"
1879
msgstr ""
1880
1881
- #: widgets/google-map/google-map.php:325
1882
msgid "Transit lines"
1883
msgstr ""
1884
1885
- #: widgets/google-map/google-map.php:326
1886
msgid "Transit stations"
1887
msgstr ""
1888
1889
- #: widgets/google-map/google-map.php:327
1890
msgid "Man-made landscape"
1891
msgstr ""
1892
1893
- #: widgets/google-map/google-map.php:328
1894
msgid "Natural landscape landcover"
1895
msgstr ""
1896
1897
- #: widgets/google-map/google-map.php:329
1898
msgid "Natural landscape terrain"
1899
msgstr ""
1900
1901
- #: widgets/google-map/google-map.php:330
1902
msgid "Point of interest - Attractions"
1903
msgstr ""
1904
1905
- #: widgets/google-map/google-map.php:331
1906
msgid "Point of interest - Business"
1907
msgstr ""
1908
1909
- #: widgets/google-map/google-map.php:332
1910
msgid "Point of interest - Government"
1911
msgstr ""
1912
1913
- #: widgets/google-map/google-map.php:333
1914
msgid "Point of interest - Medical"
1915
msgstr ""
1916
1917
- #: widgets/google-map/google-map.php:334
1918
msgid "Point of interest - Parks"
1919
msgstr ""
1920
1921
- #: widgets/google-map/google-map.php:335
1922
msgid "Point of interest - Places of worship"
1923
msgstr ""
1924
1925
- #: widgets/google-map/google-map.php:336
1926
msgid "Point of interest - Schools"
1927
msgstr ""
1928
1929
- #: widgets/google-map/google-map.php:337
1930
msgid "Point of interest - Sports complexes"
1931
msgstr ""
1932
1933
- #: widgets/google-map/google-map.php:342
1934
msgid "Select element type to style"
1935
msgstr ""
1936
1937
- #: widgets/google-map/google-map.php:344
1938
msgid "Geometry"
1939
msgstr ""
1940
1941
- #: widgets/google-map/google-map.php:345
1942
msgid "Labels"
1943
msgstr ""
1944
1945
- #: widgets/google-map/google-map.php:352
1946
msgid "Visible"
1947
msgstr ""
1948
1949
- #: widgets/google-map/google-map.php:364
1950
msgid "Directions"
1951
msgstr ""
1952
1953
- #: widgets/google-map/google-map.php:371
1954
msgid "Display a route on your map, with waypoints between your starting point and destination. Please ensure you have enabled the <strong>Directions API</strong> in the %sGoogle APIs Dashboard%s."
1955
msgstr ""
1956
1957
- #: widgets/google-map/google-map.php:378
1958
msgid "Starting point"
1959
msgstr ""
1960
1961
- #: widgets/google-map/google-map.php:382
1962
msgid "Destination"
1963
msgstr ""
1964
1965
- #: widgets/google-map/google-map.php:386
1966
msgid "Travel mode"
1967
msgstr ""
1968
1969
- #: widgets/google-map/google-map.php:389
1970
msgid "Driving"
1971
msgstr ""
1972
1973
- #: widgets/google-map/google-map.php:390
1974
msgid "Walking"
1975
msgstr ""
1976
1977
- #: widgets/google-map/google-map.php:391
1978
msgid "Bicycling"
1979
msgstr ""
1980
1981
- #: widgets/google-map/google-map.php:392
1982
msgid "Transit"
1983
msgstr ""
1984
1985
- #: widgets/google-map/google-map.php:397
1986
msgid "Avoid highways"
1987
msgstr ""
1988
1989
- #: widgets/google-map/google-map.php:401
1990
msgid "Avoid tolls"
1991
msgstr ""
1992
1993
- #: widgets/google-map/google-map.php:405
1994
msgid "Preserve viewport"
1995
msgstr ""
1996
1997
- #: widgets/google-map/google-map.php:406
1998
msgid "This will prevent the map from centering and zooming around the directions. Use this when you have other markers or features on your map."
1999
msgstr ""
2000
2001
- #: widgets/google-map/google-map.php:410
2002
msgid "Waypoints"
2003
msgstr ""
2004
2005
- #: widgets/google-map/google-map.php:411
2006
msgid "Waypoint"
2007
msgstr ""
2008
2009
- #: widgets/google-map/google-map.php:421, widgets/testimonial/testimonial.php:66
2010
msgid "Location"
2011
msgstr ""
2012
2013
- #: widgets/google-map/google-map.php:426
2014
msgid "Stopover"
2015
msgstr ""
2016
2017
- #: widgets/google-map/google-map.php:427
2018
msgid "Whether or not this is a stop on the route or just a route preference."
2019
msgstr ""
2020
2021
- #: widgets/google-map/google-map.php:433
2022
msgid "Optimize waypoints"
2023
msgstr ""
2024
2025
- #: widgets/google-map/google-map.php:435
2026
msgid "Allow the Google Maps service to reorder waypoints for the shortest travelling distance."
2027
msgstr ""
2028
2029
- #: widgets/google-map/google-map.php:449
2030
msgid "Enter your %sAPI key%s. Your map won't function correctly without one."
2031
msgstr ""
2032
2033
- #: widgets/google-map/google-map.php:573
2034
msgid "There were no results for the place you entered. Please try another."
2035
msgstr ""
2036
2037
- #: widgets/google-map/google-map.php:629
2038
msgid "Custom Map"
2039
msgstr ""
2040
@@ -2170,7 +2210,7 @@ msgstr ""
2170
msgid "Background image"
2171
msgstr ""
2172
2173
- #: widgets/hero/hero.php:100, widgets/image-grid/image-grid.php:87, widgets/image/image.php:39, widgets/testimonial/testimonial.php:131, widgets/testimonial/testimonial.php:160, widgets/testimonial/testimonial.php:202
2174
msgid "Image size"
2175
msgstr ""
2176
@@ -2266,10 +2306,6 @@ msgstr ""
2266
msgid "Link Hover Color"
2267
msgstr ""
2268
2269
- #: widgets/hero/hero.php:438
2270
- msgid "This setting controls when the Hero widget will switch to the responsive height for slides. This breakpoint will only be used if a responsive height is set in the hero settings. The default value is 780px"
2271
- msgstr ""
2272
-
2273
#: widgets/icon/icon.php:4
2274
msgid "An iconic icon."
2275
msgstr ""
@@ -2286,15 +2322,15 @@ msgstr ""
2286
msgid "Display a grid of images. Also useful for displaying client logos."
2287
msgstr ""
2288
2289
- #: widgets/image-grid/image-grid.php:16
2290
msgid "SiteOrigin Image Grid"
2291
msgstr ""
2292
2293
- #: widgets/image-grid/image-grid.php:18
2294
msgid "Display a grid of images."
2295
msgstr ""
2296
2297
- #: widgets/image-grid/image-grid.php:54, widgets/simple-masonry/simple-masonry.php:48
2298
msgid "Images"
2299
msgstr ""
2300
@@ -2302,35 +2338,39 @@ msgstr ""
2302
msgid "Image title"
2303
msgstr ""
2304
2305
- #: widgets/image-grid/image-grid.php:72, widgets/social-media-buttons/social-media-buttons.php:74, widgets/testimonial/testimonial.php:88
2306
msgid "URL"
2307
msgstr ""
2308
2309
- #: widgets/image-grid/image-grid.php:77, widgets/image/image.php:94, widgets/slider/slider.php:90
2310
msgid "Open in new window"
2311
msgstr ""
2312
2313
- #: widgets/image-grid/image-grid.php:84
2314
msgid "Display"
2315
msgstr ""
2316
2317
- #: widgets/image-grid/image-grid.php:93
2318
msgid "Maximum image height"
2319
msgstr ""
2320
2321
- #: widgets/image-grid/image-grid.php:98
2322
msgid "Maximum image width"
2323
msgstr ""
2324
2325
- #: widgets/image-grid/image-grid.php:103
2326
msgid "Spacing"
2327
msgstr ""
2328
2329
- #: widgets/image-grid/image-grid.php:104
2330
msgid "Amount of spacing between images."
2331
msgstr ""
2332
2333
- #: widgets/image-grid/image-grid.php:153, widgets/image/image.php:202
2334
msgid "Add a Lightbox to your images with %sSiteOrigin Premium%s"
2335
msgstr ""
2336
@@ -2362,10 +2402,6 @@ msgstr ""
2362
msgid "Title position"
2363
msgstr ""
2364
2365
- #: widgets/image/image.php:84
2366