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_\-,]+)\])?(\[\])?$/))){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+$/,"");var l=i.replace(/-\d+$/,"");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+$/)[0],y.find("label[for="+l+"]").attr("for",f)}else u=new RegExp("-\\d+$"),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+") *$").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_\-,]+)\])?(\[\])?$/))){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+$/,"");var l=i.replace(/-\d+$/,"");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+$/)[0],y.find("label[for="+l+"]").attr("for",f)}else u=new RegExp("-\\d+$"),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+") *$").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
- msgid "Alt text"
2367
- msgstr ""
2368
-
2369
  #: widgets/image/image.php:100
2370
  msgid "Bound"
2371
  msgstr ""
@@ -2406,10 +2442,6 @@ msgstr ""
2406
  msgid "This widget requires Page Builder."
2407
  msgstr ""
2408
 
2409
- #: widgets/layout-slider/layout-slider.php:325
2410
- msgid "This setting controls when the Layout Slider widget will switch to the responsive height for slides. This breakpoint will only be used if a responsive height is set in the Layout Slider's settings. The default value is 780px."
2411
- msgstr ""
2412
-
2413
  #: widgets/post-carousel/post-carousel.php:4
2414
  msgid "Gives you a widget to display your posts as a carousel."
2415
  msgstr ""
@@ -2442,14 +2474,22 @@ msgstr ""
2442
  msgid "Posts query"
2443
  msgstr ""
2444
 
2445
- #: widgets/post-carousel/tpl/base.php:16, widgets/post-carousel/tpl/base.php:24
2446
  msgid "Next"
2447
  msgstr ""
2448
 
2449
- #: widgets/post-carousel/tpl/base.php:17, widgets/post-carousel/tpl/base.php:22
 
 
 
 
2450
  msgid "Previous"
2451
  msgstr ""
2452
 
 
 
 
 
2453
  #: widgets/price-table/price-table.php:4
2454
  msgid "A powerful yet simple price table widget for your sidebars or Page Builder pages."
2455
  msgstr ""
@@ -2854,6 +2894,10 @@ msgstr ""
2854
  msgid "Mobile Align"
2855
  msgstr ""
2856
 
 
 
 
 
2857
  #: widgets/social-media-buttons/tpl/default.php:13
2858
  msgid "%s %s"
2859
  msgstr ""
24
  msgid "Filter Widgets"
25
  msgstr ""
26
 
27
+ #: admin/tpl/admin.php:17, base/inc/fields/posts.class.php:23, widgets/google-map/google-map.php:345
28
  msgid "All"
29
  msgstr ""
30
 
48
  msgid "Deactivate"
49
  msgstr ""
50
 
51
+ #: admin/tpl/admin.php:90, widgets/contact/contact.php:59, widgets/google-map/google-map.php:56, widgets/testimonial/testimonial.php:100
52
  msgid "Settings"
53
  msgstr ""
54
 
72
  msgid "Save"
73
  msgstr ""
74
 
75
+ #: base/base.php:51, base/base.php:55, base/inc/actions.php:11, base/inc/actions.php:77, base/inc/actions.php:121, base/inc/actions.php:157, base/inc/actions.php:170, base/inc/actions.php:174, base/inc/actions.php:265, base/inc/actions.php:268, 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:13
80
+ msgid "Invalid widget."
81
+ msgstr ""
82
+
83
+ #: base/inc/actions.php:23, so-widgets-bundle.php:377, so-widgets-bundle.php:520
84
  msgid "Invalid post."
85
  msgstr ""
86
 
87
+ #: base/inc/actions.php:53, base/siteorigin-widget.class.php:660
88
  msgid "Widget Preview"
89
  msgstr ""
90
 
91
+ #: base/inc/actions.php:213
92
  msgid "Nonce error"
93
  msgstr ""
94
 
95
+ #: base/inc/actions.php:223
96
  msgid "Signature error"
97
  msgstr ""
98
 
99
+ #: base/inc/actions.php:249
100
  msgid "Attachment error"
101
  msgstr ""
102
 
245
  msgid "Sponsored"
246
  msgstr ""
247
 
248
+ #: base/inc/fields/posts.class.php:36
249
  msgid "Post type"
250
  msgstr ""
251
 
252
+ #: base/inc/fields/posts.class.php:44
253
  msgid "Post in"
254
  msgstr ""
255
 
256
+ #: base/inc/fields/posts.class.php:50, widgets/taxonomy/taxonomy.php:38
257
  msgid "Taxonomies"
258
  msgstr ""
259
 
260
+ #: base/inc/fields/posts.class.php:52
261
  msgid "Taxonomies are groups such as categories, tags, posts and products."
262
  msgstr ""
263
 
264
+ #: base/inc/fields/posts.class.php:57
265
  msgid "Date selection type"
266
  msgstr ""
267
 
268
+ #: base/inc/fields/posts.class.php:59
269
  msgid "Specific"
270
  msgstr ""
271
 
272
+ #: base/inc/fields/posts.class.php:60
273
  msgid "Relative"
274
  msgstr ""
275
 
276
+ #: base/inc/fields/posts.class.php:62
277
  msgid "Select a range between specific dates or relative to the current date."
278
  msgstr ""
279
 
280
+ #: base/inc/fields/posts.class.php:72, base/inc/fields/posts.class.php:82
281
  msgid "Dates"
282
  msgstr ""
283
 
284
+ #: base/inc/fields/posts.class.php:92
285
  msgid "Order by"
286
  msgstr ""
287
 
288
+ #: base/inc/fields/posts.class.php:94
289
  msgid "No order"
290
  msgstr ""
291
 
292
+ #: base/inc/fields/posts.class.php:95
293
  msgid "Post ID"
294
  msgstr ""
295
 
296
+ #: base/inc/fields/posts.class.php:96
297
  msgid "Author"
298
  msgstr ""
299
 
300
+ #: base/inc/fields/posts.class.php:97, 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
301
  msgid "Title"
302
  msgstr ""
303
 
304
+ #: base/inc/fields/posts.class.php:98
305
  msgid "Published date"
306
  msgstr ""
307
 
308
+ #: base/inc/fields/posts.class.php:99
309
  msgid "Modified date"
310
  msgstr ""
311
 
312
+ #: base/inc/fields/posts.class.php:100
313
  msgid "By parent"
314
  msgstr ""
315
 
316
+ #: base/inc/fields/posts.class.php:101
317
  msgid "Random order"
318
  msgstr ""
319
 
320
+ #: base/inc/fields/posts.class.php:102
321
  msgid "Comment count"
322
  msgstr ""
323
 
324
+ #: base/inc/fields/posts.class.php:103
325
  msgid "Menu order"
326
  msgstr ""
327
 
328
+ #: base/inc/fields/posts.class.php:104
329
  msgid "By meta value"
330
  msgstr ""
331
 
332
+ #: base/inc/fields/posts.class.php:105
333
  msgid "By numeric meta value"
334
  msgstr ""
335
 
336
+ #: base/inc/fields/posts.class.php:106
337
  msgid "By include order"
338
  msgstr ""
339
 
340
+ #: base/inc/fields/posts.class.php:113
341
  msgid "Order direction"
342
  msgstr ""
343
 
344
+ #: base/inc/fields/posts.class.php:115
345
  msgid "Ascending"
346
  msgstr ""
347
 
348
+ #: base/inc/fields/posts.class.php:116
349
  msgid "Descending"
350
  msgstr ""
351
 
352
+ #: base/inc/fields/posts.class.php:123
353
  msgid "Posts per page"
354
  msgstr ""
355
 
356
+ #: base/inc/fields/posts.class.php:128
357
  msgid "Sticky posts"
358
  msgstr ""
359
 
360
+ #: base/inc/fields/posts.class.php:130, compat/beaver-builder/beaver-builder.php:66, widgets/google-map/google-map.php:277, widgets/image/image.php:47, widgets/image/image.php:59
361
  msgid "Default"
362
  msgstr ""
363
 
364
+ #: base/inc/fields/posts.class.php:131
365
  msgid "Ignore sticky"
366
  msgstr ""
367
 
368
+ #: base/inc/fields/posts.class.php:132
369
  msgid "Exclude sticky"
370
  msgstr ""
371
 
372
+ #: base/inc/fields/posts.class.php:133
373
  msgid "Only sticky"
374
  msgstr ""
375
 
376
+ #: base/inc/fields/posts.class.php:139
377
  msgid "Additional"
378
  msgstr ""
379
 
380
+ #: base/inc/fields/posts.class.php:140
381
  msgid "Additional query arguments. See <a href=\"http://codex.wordpress.org/Function_Reference/query_posts\" target=\"_blank\" rel=\"noopener noreferrer\">query_posts</a>."
382
  msgstr ""
383
 
478
  msgstr ""
479
 
480
  #: base/inc/widgets/base-slider.class.php:96
481
+ msgid "Always show navigation on mobile"
482
+ msgstr ""
483
+
484
+ #: base/inc/widgets/base-slider.class.php:101
485
+ msgid "Swipe control"
486
  msgstr ""
487
 
488
+ #: base/inc/widgets/base-slider.class.php:102
489
  msgid "Allow users to swipe through frames on mobile devices."
490
  msgstr ""
491
 
492
+ #: base/inc/widgets/base-slider.class.php:108
493
  msgid "Show slide background videos on mobile"
494
  msgstr ""
495
 
496
+ #: base/inc/widgets/base-slider.class.php:109
497
  msgid "Allow slide background videos to appear on mobile devices that support autoplay."
498
  msgstr ""
499
 
500
+ #: base/inc/widgets/base-slider.class.php:119
501
  msgid "Video file"
502
  msgstr ""
503
 
504
+ #: base/inc/widgets/base-slider.class.php:125, widgets/video/video.php:85
505
  msgid "Video URL"
506
  msgstr ""
507
 
508
+ #: base/inc/widgets/base-slider.class.php:127
509
  msgid "An external URL of the video. Overrides video file."
510
  msgstr ""
511
 
512
+ #: base/inc/widgets/base-slider.class.php:132, widgets/video/video.php:101
513
  msgid "Autoplay"
514
  msgstr ""
515
 
516
+ #: base/inc/widgets/base-slider.class.php:134
517
  msgid "Currently only for YouTube videos."
518
  msgstr ""
519
 
520
+ #: base/inc/widgets/base-slider.class.php:139
521
  msgid "Video format"
522
  msgstr ""
523
 
524
+ #: base/inc/widgets/base-slider.class.php:149
525
  msgid "Maximum height"
526
  msgstr ""
527
 
528
+ #: base/inc/widgets/base-slider.class.php:159, widgets/features/features.php:298, widgets/social-media-buttons/social-media-buttons.php:33
529
+ msgid "Responsive Breakpoint"
530
+ msgstr ""
531
+
532
+ #: base/inc/widgets/base-slider.class.php:161
533
+ msgid "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."
534
+ msgstr ""
535
+
536
+ #: base/inc/widgets/base-slider.class.php:206
537
  msgid "display slide %s"
538
  msgstr ""
539
 
540
+ #: base/inc/widgets/base-slider.class.php:211
541
  msgid "next slide"
542
  msgstr ""
543
 
544
+ #: base/inc/widgets/base-slider.class.php:217
545
  msgid "previous slide"
546
  msgstr ""
547
 
637
  msgid "Regular"
638
  msgstr ""
639
 
640
+ #: icons/fontawesome/filter.php:1343, widgets/contact/contact.php:362, widgets/contact/contact.php:479, widgets/contact/contact.php:587, widgets/contact/contact.php:665, widgets/headline/headline.php:189
641
  msgid "Solid"
642
  msgstr ""
643
 
697
  msgid "Deactivated"
698
  msgstr ""
699
 
700
+ #: so-widgets-bundle.php:755
701
  msgid "Manage Widgets"
702
  msgstr ""
703
 
704
+ #: so-widgets-bundle.php:756
705
  msgid "Support"
706
  msgstr ""
707
 
741
  msgid "Closed"
742
  msgstr ""
743
 
744
+ #: widgets/accordion/accordion.php:80, widgets/contact/contact.php:325, widgets/cta/cta.php:74, widgets/tabs/tabs.php:76, widgets/testimonial/testimonial.php:183
745
  msgid "Design"
746
  msgstr ""
747
 
749
  msgid "Headings"
750
  msgstr ""
751
 
752
+ #: widgets/accordion/accordion.php:90, widgets/accordion/accordion.php:128, widgets/contact/contact.php:335, widgets/contact/contact.php:568, 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
753
  msgid "Background color"
754
  msgstr ""
755
 
765
  msgid "Title hover color"
766
  msgstr ""
767
 
768
+ #: widgets/accordion/accordion.php:109, widgets/accordion/accordion.php:137, widgets/contact/contact.php:345, widgets/contact/contact.php:462, widgets/contact/contact.php:578, widgets/cta/cta.php:82, widgets/tabs/tabs.php:91, widgets/tabs/tabs.php:125, widgets/tabs/tabs.php:159
769
  msgid "Border color"
770
  msgstr ""
771
 
773
  msgid "Border hover color"
774
  msgstr ""
775
 
776
+ #: widgets/accordion/accordion.php:117, widgets/accordion/accordion.php:141, widgets/contact/contact.php:350, widgets/contact/contact.php:467, widgets/contact/contact.php:594, widgets/tabs/tabs.php:95, widgets/tabs/tabs.php:135, widgets/tabs/tabs.php:163
777
  msgid "Border width"
778
  msgstr ""
779
 
805
  msgid "Button text"
806
  msgstr ""
807
 
808
+ #: widgets/button/button.php:51, widgets/google-map/google-map.php:90, 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
809
  msgid "Destination URL"
810
  msgstr ""
811
 
812
+ #: widgets/button/button.php:57, widgets/google-map/google-map.php:101, 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
813
  msgid "Open in a new window"
814
  msgstr ""
815
 
837
  msgid "Top"
838
  msgstr ""
839
 
840
+ #: widgets/button/button.php:86, widgets/button/button.php:112, widgets/contact/contact.php:400, widgets/contact/contact.php:415, widgets/contact/contact.php:639, 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
841
  msgid "Right"
842
  msgstr ""
843
 
845
  msgid "Bottom"
846
  msgstr ""
847
 
848
+ #: widgets/button/button.php:88, widgets/button/button.php:111, widgets/contact/contact.php:399, widgets/contact/contact.php:414, widgets/contact/contact.php:638, 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
849
  msgid "Left"
850
  msgstr ""
851
 
853
  msgid "Design and layout"
854
  msgstr ""
855
 
856
+ #: widgets/button/button.php:102, widgets/contact/contact.php:406, widgets/contact/contact.php:631, widgets/contact/contact.php:682, widgets/google-map/google-map.php:81
857
  msgid "Width"
858
  msgstr ""
859
 
861
  msgid "Leave blank to let the button resize according to content."
862
  msgstr ""
863
 
864
+ #: widgets/button/button.php:108, widgets/contact/contact.php:411, widgets/contact/contact.php:635, widgets/social-media-buttons/social-media-buttons.php:149
865
  msgid "Align"
866
  msgstr ""
867
 
868
+ #: widgets/button/button.php:113, widgets/contact/contact.php:416, widgets/contact/contact.php:640, 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
869
  msgid "Center"
870
  msgstr ""
871
 
872
+ #: widgets/button/button.php:114, widgets/contact/contact.php:417, 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
873
  msgid "Justify"
874
  msgstr ""
875
 
893
  msgid "Button color"
894
  msgstr ""
895
 
896
+ #: widgets/button/button.php:137, widgets/contact/contact.php:606, widgets/hero/hero.php:253, widgets/layout-slider/layout-slider.php:186
897
  msgid "Text color"
898
  msgstr ""
899
 
901
  msgid "Use hover effects"
902
  msgstr ""
903
 
904
+ #: widgets/button/button.php:148, widgets/contact/contact.php:379, widgets/contact/contact.php:429, 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
905
  msgid "Font"
906
  msgstr ""
907
 
908
+ #: widgets/button/button.php:154, widgets/contact/contact.php:384, widgets/contact/contact.php:611
909
  msgid "Font size"
910
  msgstr ""
911
 
912
+ #: widgets/button/button.php:156, widgets/contact/contact.php:288, widgets/contact/contact.php:517, widgets/contact/contact.php:619, widgets/social-media-buttons/social-media-buttons.php:119
913
  msgid "Normal"
914
  msgstr ""
915
 
925
  msgid "Rounding"
926
  msgstr ""
927
 
928
+ #: widgets/button/button.php:168, widgets/contact/contact.php:358, widgets/contact/contact.php:475, widgets/contact/contact.php:586, widgets/contact/contact.php:671, widgets/google-map/google-map.php:145, widgets/headline/headline.php:188, widgets/social-media-buttons/social-media-buttons.php:130
929
  msgid "None"
930
  msgstr ""
931
 
941
  msgid "Completely rounded"
942
  msgstr ""
943
 
944
+ #: widgets/button/button.php:177, widgets/contact/contact.php:340, widgets/contact/contact.php:446, widgets/contact/contact.php:626, widgets/social-media-buttons/social-media-buttons.php:138, widgets/testimonial/testimonial.php:234
945
  msgid "Padding"
946
  msgstr ""
947
 
1093
  msgid "Log IP addresses."
1094
  msgstr ""
1095
 
1096
+ #: widgets/contact/contact.php:136, widgets/contact/contact.php:425
1097
  msgid "Fields"
1098
  msgstr ""
1099
 
1121
  msgid "Phone Number"
1122
  msgstr ""
1123
 
1124
+ #: widgets/contact/contact.php:151, widgets/contact/contact.php:746
1125
  msgid "Subject"
1126
  msgstr ""
1127
 
1161
  msgid "Required Field"
1162
  msgstr ""
1163
 
1164
+ #: widgets/contact/contact.php:181, widgets/contact/contact.php:1045
1165
  msgid "Required field"
1166
  msgstr ""
1167
 
1194
  msgstr ""
1195
 
1196
  #: widgets/contact/contact.php:222
1197
+ msgid "reCAPTCHA v2"
1198
  msgstr ""
1199
 
1200
  #: widgets/contact/contact.php:226
1201
+ msgid "Use reCAPTCHA v2"
1202
  msgstr ""
1203
 
1204
+ #: widgets/contact/contact.php:229
1205
+ msgid "Please make sure you register a new reCAPTCHA v2 key %shere%s."
1206
  msgstr ""
1207
 
1208
+ #: widgets/contact/contact.php:243
1209
+ msgid "reCAPTCHA v2 Site Key"
1210
  msgstr ""
1211
 
1212
+ #: widgets/contact/contact.php:251
1213
+ msgid "reCAPTCHA v2 Secret Key"
1214
+ msgstr ""
1215
+
1216
+ #: widgets/contact/contact.php:259
1217
  msgid "Theme"
1218
  msgstr ""
1219
 
1220
+ #: widgets/contact/contact.php:262
1221
  msgid "Light"
1222
  msgstr ""
1223
 
1224
+ #: widgets/contact/contact.php:263
1225
  msgid "Dark"
1226
  msgstr ""
1227
 
1228
+ #: widgets/contact/contact.php:272
1229
  msgid "Challenge type"
1230
  msgstr ""
1231
 
1232
+ #: widgets/contact/contact.php:275, widgets/image-grid/image-grid.php:53, widgets/image-grid/image-grid.php:62, widgets/price-table/price-table.php:70, widgets/simple-masonry/simple-masonry.php:55, widgets/testimonial/testimonial.php:72, widgets/testimonial/testimonial.php:188
1233
  msgid "Image"
1234
  msgstr ""
1235
 
1236
+ #: widgets/contact/contact.php:276
1237
  msgid "Audio"
1238
  msgstr ""
1239
 
1240
+ #: widgets/contact/contact.php:285, widgets/contact/contact.php:503, widgets/features/features.php:143, widgets/features/features.php:164, widgets/features/features.php:185, widgets/icon/icon.php:41
1241
  msgid "Size"
1242
  msgstr ""
1243
 
1244
+ #: widgets/contact/contact.php:289
1245
  msgid "Compact"
1246
  msgstr ""
1247
 
1248
+ #: widgets/contact/contact.php:301
1249
  msgid "Akismet"
1250
  msgstr ""
1251
 
1252
+ #: widgets/contact/contact.php:305
1253
  msgid "Use Akismet filtering"
1254
  msgstr ""
1255
 
1256
+ #: widgets/contact/contact.php:310
1257
  msgid "Spam action"
1258
  msgstr ""
1259
 
1260
+ #: widgets/contact/contact.php:312
1261
  msgid "Show error message"
1262
  msgstr ""
1263
 
1264
+ #: widgets/contact/contact.php:313
1265
  msgid "Tag as spam in subject"
1266
  msgstr ""
1267
 
1268
+ #: widgets/contact/contact.php:315
1269
  msgid "How to handle submissions that are identified as spam."
1270
  msgstr ""
1271
 
1272
+ #: widgets/contact/contact.php:331
1273
  msgid "Container"
1274
  msgstr ""
1275
 
1276
+ #: widgets/contact/contact.php:355, widgets/contact/contact.php:583
1277
  msgid "Border style"
1278
  msgstr ""
1279
 
1280
+ #: widgets/contact/contact.php:359, widgets/contact/contact.php:476, widgets/contact/contact.php:672, widgets/image/image.php:76
1281
  msgid "Hidden"
1282
  msgstr ""
1283
 
1284
+ #: widgets/contact/contact.php:360, widgets/contact/contact.php:477, widgets/contact/contact.php:588, widgets/contact/contact.php:663, widgets/headline/headline.php:190
1285
  msgid "Dotted"
1286
  msgstr ""
1287
 
1288
+ #: widgets/contact/contact.php:361, widgets/contact/contact.php:478, widgets/contact/contact.php:589, widgets/contact/contact.php:664, widgets/headline/headline.php:191
1289
  msgid "Dashed"
1290
  msgstr ""
1291
 
1292
+ #: widgets/contact/contact.php:363, widgets/contact/contact.php:480, widgets/contact/contact.php:666, widgets/headline/headline.php:192
1293
  msgid "Double"
1294
  msgstr ""
1295
 
1296
+ #: widgets/contact/contact.php:364, widgets/contact/contact.php:481, widgets/contact/contact.php:667, widgets/headline/headline.php:193
1297
  msgid "Groove"
1298
  msgstr ""
1299
 
1300
+ #: widgets/contact/contact.php:365, widgets/contact/contact.php:482, widgets/contact/contact.php:668, widgets/headline/headline.php:194
1301
  msgid "Ridge"
1302
  msgstr ""
1303
 
1304
+ #: widgets/contact/contact.php:366, widgets/contact/contact.php:483, widgets/contact/contact.php:669, widgets/headline/headline.php:195
1305
  msgid "Inset"
1306
  msgstr ""
1307
 
1308
+ #: widgets/contact/contact.php:367, widgets/contact/contact.php:484, widgets/contact/contact.php:670, widgets/headline/headline.php:196
1309
  msgid "Outset"
1310
  msgstr ""
1311
 
1312
+ #: widgets/contact/contact.php:375
1313
  msgid "Field labels"
1314
  msgstr ""
1315
 
1316
+ #: widgets/contact/contact.php:389, widgets/contact/contact.php:508, widgets/contact/contact.php:677, widgets/features/features.php:147, widgets/features/features.php:168, widgets/features/features.php:189, widgets/google-map/google-map.php:355, 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
1317
  msgid "Color"
1318
  msgstr ""
1319
 
1320
+ #: widgets/contact/contact.php:394
1321
  msgid "Position"
1322
  msgstr ""
1323
 
1324
+ #: widgets/contact/contact.php:397, widgets/image/image.php:77
1325
  msgid "Above"
1326
  msgstr ""
1327
 
1328
+ #: widgets/contact/contact.php:398, widgets/image/image.php:78
1329
  msgid "Below"
1330
  msgstr ""
1331
 
1332
+ #: widgets/contact/contact.php:401
1333
  msgid "Inside"
1334
  msgstr ""
1335
 
1336
+ #: widgets/contact/contact.php:434, widgets/headline/headline.php:83, widgets/headline/headline.php:154
1337
  msgid "Font Size"
1338
  msgstr ""
1339
 
1340
+ #: widgets/contact/contact.php:438, widgets/testimonial/testimonial.php:226
1341
  msgid "Text Color"
1342
  msgstr ""
1343
 
1344
+ #: widgets/contact/contact.php:442, widgets/social-media-buttons/social-media-buttons.php:171
1345
  msgid "Margin"
1346
  msgstr ""
1347
 
1348
+ #: widgets/contact/contact.php:450, widgets/google-map/google-map.php:85, widgets/hero/hero.php:165, widgets/layout-slider/layout-slider.php:125
1349
  msgid "Height"
1350
  msgstr ""
1351
 
1352
+ #: widgets/contact/contact.php:454
1353
  msgid "Text Area Height"
1354
  msgstr ""
1355
 
1356
+ #: widgets/contact/contact.php:458, widgets/hero/hero.php:89, widgets/layout-slider/layout-slider.php:53
1357
  msgid "Background"
1358
  msgstr ""
1359
 
1360
+ #: widgets/contact/contact.php:472
1361
  msgid " Border style"
1362
  msgstr ""
1363
 
1364
+ #: widgets/contact/contact.php:489, widgets/contact/contact.php:599
1365
  msgid "Border rounding"
1366
  msgstr ""
1367
 
1368
+ #: widgets/contact/contact.php:499
1369
  msgid "Field descriptions"
1370
  msgstr ""
1371
 
1372
+ #: widgets/contact/contact.php:513, widgets/contact/contact.php:660, widgets/google-map/google-map.php:308, widgets/headline/headline.php:185
1373
  msgid "Style"
1374
  msgstr ""
1375
 
1376
+ #: widgets/contact/contact.php:516
1377
  msgid "Italic"
1378
  msgstr ""
1379
 
1380
+ #: widgets/contact/contact.php:525
1381
  msgid "Error messages"
1382
  msgstr ""
1383
 
1384
+ #: widgets/contact/contact.php:529
1385
  msgid "Error background color"
1386
  msgstr ""
1387
 
1388
+ #: widgets/contact/contact.php:534
1389
  msgid "Error border color"
1390
  msgstr ""
1391
 
1392
+ #: widgets/contact/contact.php:539
1393
  msgid "Error text color"
1394
  msgstr ""
1395
 
1396
+ #: widgets/contact/contact.php:544
1397
  msgid "Error padding"
1398
  msgstr ""
1399
 
1400
+ #: widgets/contact/contact.php:549
1401
  msgid "Error margin"
1402
  msgstr ""
1403
 
1404
+ #: widgets/contact/contact.php:557
1405
  msgid "Submit button"
1406
  msgstr ""
1407
 
1408
+ #: widgets/contact/contact.php:561
1409
  msgid "Style submit button"
1410
  msgstr ""
1411
 
1412
+ #: widgets/contact/contact.php:562
1413
  msgid "Style the button or leave it with default theme styling."
1414
  msgstr ""
1415
 
1416
+ #: widgets/contact/contact.php:573
1417
  msgid "Gradient intensity"
1418
  msgstr ""
1419
 
1420
+ #: widgets/contact/contact.php:616
1421
  msgid "Font weight"
1422
  msgstr ""
1423
 
1424
+ #: widgets/contact/contact.php:620
1425
  msgid "Semi-bold"
1426
  msgstr ""
1427
 
1428
+ #: widgets/contact/contact.php:621
1429
  msgid "Bold"
1430
  msgstr ""
1431
 
1432
+ #: widgets/contact/contact.php:645
1433
  msgid "Inset highlight"
1434
  msgstr ""
1435
 
1436
+ #: widgets/contact/contact.php:646
1437
  msgid "The white highlight at the bottom of the button"
1438
  msgstr ""
1439
 
1440
+ #: widgets/contact/contact.php:656
1441
  msgid "Input focus"
1442
  msgstr ""
1443
 
1444
+ #: widgets/contact/contact.php:703
1445
  msgid "Get more form fields for the Contact Form Widget in %s"
1446
  msgstr ""
1447
 
1448
+ #: widgets/contact/contact.php:704
1449
  msgid "SiteOrigin Premium"
1450
  msgstr ""
1451
 
1452
+ #: widgets/contact/contact.php:730
1453
  msgid "Your Name"
1454
  msgstr ""
1455
 
1456
+ #: widgets/contact/contact.php:733
1457
  msgid "Please enter your name"
1458
  msgstr ""
1459
 
1460
+ #: widgets/contact/contact.php:738
1461
  msgid "Your Email"
1462
  msgstr ""
1463
 
1464
+ #: widgets/contact/contact.php:741
1465
  msgid "Please enter a valid email address"
1466
  msgstr ""
1467
 
1468
+ #: widgets/contact/contact.php:749
1469
  msgid "Please enter a subject"
1470
  msgstr ""
1471
 
1472
+ #: widgets/contact/contact.php:754
1473
  msgid "Message"
1474
  msgstr ""
1475
 
1476
+ #: widgets/contact/contact.php:757
1477
  msgid "Please write something"
1478
  msgstr ""
1479
 
1480
+ #: widgets/contact/contact.php:1057
1481
  msgid "Invalid email address."
1482
  msgstr ""
1483
 
1484
+ #: widgets/contact/contact.php:1136
1485
  msgid "Error sending email, please try again later."
1486
  msgstr ""
1487
 
1488
+ #: widgets/contact/contact.php:1162
1489
  msgid "A valid email is required"
1490
  msgstr ""
1491
 
1492
+ #: widgets/contact/contact.php:1164
1493
  msgid "The email address is invalid"
1494
  msgstr ""
1495
 
1496
+ #: widgets/contact/contact.php:1168
1497
  msgid "Missing subject"
1498
  msgstr ""
1499
 
1500
+ #: widgets/contact/contact.php:1202
1501
  msgid "Error validating your Captcha response."
1502
  msgstr ""
1503
 
1504
+ #: widgets/contact/contact.php:1234
1505
  msgid "Unfortunately our system identified your message as spam."
1506
  msgstr ""
1507
 
1508
+ #: widgets/contact/contact.php:1242
1509
  msgctxt "The name of who sent this email"
1510
  msgid "From"
1511
  msgstr ""
1666
  msgid "Open more URL in a new window"
1667
  msgstr ""
1668
 
 
 
 
 
1669
  #: widgets/features/features.php:300
1670
  msgid "This setting controls when the features widget will collapse for mobile devices. The default value is 520px"
1671
  msgstr ""
1672
 
1673
+ #: widgets/google-map/fields/location.class.php:56
1674
+ msgid "This widget requires a Google Maps API key. Please ensure you have set yours in the Google Maps Widget settings."
1675
+ msgstr ""
1676
+
1677
+ #: widgets/google-map/fields/location.class.php:57
1678
+ msgid "Go to Google Maps Widget settings"
1679
+ msgstr ""
1680
+
1681
  #: widgets/google-map/google-map.php:4
1682
  msgid "A highly customisable Google Maps widget. Help your site find its place and give it some direction."
1683
  msgstr ""
1698
  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."
1699
  msgstr ""
1700
 
1701
+ #: widgets/google-map/google-map.php:58
 
 
 
 
 
 
 
 
1702
  msgid "Set map display options."
1703
  msgstr ""
1704
 
1705
+ #: widgets/google-map/google-map.php:63
1706
  msgid "Map type"
1707
  msgstr ""
1708
 
1709
+ #: widgets/google-map/google-map.php:69
1710
  msgid "Interactive"
1711
  msgstr ""
1712
 
1713
+ #: widgets/google-map/google-map.php:70
1714
  msgid "Static image"
1715
  msgstr ""
1716
 
1717
+ #: widgets/google-map/google-map.php:111
1718
  msgid "Zoom level"
1719
  msgstr ""
1720
 
1721
+ #: widgets/google-map/google-map.php:112
1722
  msgid "A value from 0 (the world) to 21 (street level)."
1723
  msgstr ""
1724
 
1725
+ #: widgets/google-map/google-map.php:122
1726
+ msgid "Mobile zoom level"
1727
+ msgstr ""
1728
+
1729
+ #: widgets/google-map/google-map.php:123
1730
+ msgid "A value from 0 (the world) to 21 (street level). This zoom is specific to mobile devices."
1731
+ msgstr ""
1732
+
1733
+ #: widgets/google-map/google-map.php:136
1734
+ msgid "Gesture Handling"
1735
  msgstr ""
1736
 
1737
  #: widgets/google-map/google-map.php:143
1738
+ msgid "Greedy"
1739
  msgstr ""
1740
 
1741
+ #: widgets/google-map/google-map.php:144
1742
+ msgid "Cooperative"
1743
  msgstr ""
1744
 
1745
+ #: widgets/google-map/google-map.php:146
1746
+ msgid "Auto"
1747
  msgstr ""
1748
 
1749
+ #: widgets/google-map/google-map.php:149
1750
+ msgid "For information on what these settings do, %sclick here%s."
1751
+ msgstr ""
1752
+
1753
+ #: widgets/google-map/google-map.php:161
1754
  msgid "Disable default UI"
1755
  msgstr ""
1756
 
1757
+ #: widgets/google-map/google-map.php:162
1758
  msgid "Hides the default Google Maps controls."
1759
  msgstr ""
1760
 
1761
+ #: widgets/google-map/google-map.php:171
1762
  msgid "Keep map centered"
1763
  msgstr ""
1764
 
1765
+ #: widgets/google-map/google-map.php:172
1766
  msgid "Keeps the map centered when it's container is resized."
1767
  msgstr ""
1768
 
1769
+ #: widgets/google-map/google-map.php:176
1770
  msgid "Fallback Image"
1771
  msgstr ""
1772
 
1773
+ #: widgets/google-map/google-map.php:177
1774
  msgid "This image will be displayed if there are any problems with displaying the specified map."
1775
  msgstr ""
1776
 
1777
+ #: widgets/google-map/google-map.php:182
1778
  msgid "Fallback Image Size"
1779
  msgstr ""
1780
 
1781
+ #: widgets/google-map/google-map.php:188
1782
  msgid "Markers"
1783
  msgstr ""
1784
 
1785
+ #: widgets/google-map/google-map.php:190
1786
  msgid "Use markers to identify points of interest on the map."
1787
  msgstr ""
1788
 
1789
+ #: widgets/google-map/google-map.php:195
1790
  msgid "Show marker at map center"
1791
  msgstr ""
1792
 
1793
+ #: widgets/google-map/google-map.php:200
1794
  msgid "Marker icon"
1795
  msgstr ""
1796
 
1797
+ #: widgets/google-map/google-map.php:201
1798
  msgid "Replaces the default map marker with your own image."
1799
  msgstr ""
1800
 
1801
+ #: widgets/google-map/google-map.php:210
1802
  msgid "Draggable markers"
1803
  msgstr ""
1804
 
1805
+ #: widgets/google-map/google-map.php:214
1806
  msgid "Marker positions"
1807
  msgstr ""
1808
 
1809
+ #: widgets/google-map/google-map.php:215
1810
  msgid "Marker"
1811
  msgstr ""
1812
 
1813
+ #: widgets/google-map/google-map.php:225
1814
  msgid "Place"
1815
  msgstr ""
1816
 
1817
+ #: widgets/google-map/google-map.php:230
1818
  msgid "Info Window Content"
1819
  msgstr ""
1820
 
1821
+ #: widgets/google-map/google-map.php:234
1822
  msgid "Info Window max width"
1823
  msgstr ""
1824
 
1825
+ #: widgets/google-map/google-map.php:239
1826
  msgid "Custom Marker icon"
1827
  msgstr ""
1828
 
1829
+ #: widgets/google-map/google-map.php:240
1830
  msgid "Replace the default map marker with your own image for each marker."
1831
  msgstr ""
1832
 
1833
+ #: widgets/google-map/google-map.php:246
1834
  msgid "When should Info Windows be displayed?"
1835
  msgstr ""
1836
 
1837
+ #: widgets/google-map/google-map.php:249
1838
  msgid "Click"
1839
  msgstr ""
1840
 
1841
+ #: widgets/google-map/google-map.php:250
1842
  msgid "Mouse over"
1843
  msgstr ""
1844
 
1845
+ #: widgets/google-map/google-map.php:251
1846
  msgid "Always"
1847
  msgstr ""
1848
 
1849
+ #: widgets/google-map/google-map.php:256
1850
  msgid "Allow multiple simultaneous Info Windows?"
1851
  msgstr ""
1852
 
1853
+ #: widgets/google-map/google-map.php:264
1854
  msgid "Styles"
1855
  msgstr ""
1856
 
1857
+ #: widgets/google-map/google-map.php:266
1858
  msgid "Apply custom colors to map features, or hide them completely."
1859
  msgstr ""
1860
 
1861
+ #: widgets/google-map/google-map.php:271
1862
  msgid "Map styles"
1863
  msgstr ""
1864
 
1865
+ #: widgets/google-map/google-map.php:278
1866
  msgid "Custom"
1867
  msgstr ""
1868
 
1869
+ #: widgets/google-map/google-map.php:279
1870
  msgid "Predefined Styles"
1871
  msgstr ""
1872
 
1873
+ #: widgets/google-map/google-map.php:288
1874
  msgid "Styled map name"
1875
  msgstr ""
1876
 
1877
+ #: widgets/google-map/google-map.php:298
1878
  msgid "Raw JSON styles"
1879
  msgstr ""
1880
 
1881
+ #: widgets/google-map/google-map.php:299
1882
  msgid "Copy and paste predefined styles here from <a href=\"http://snazzymaps.com/\" target=\"_blank\" rel=\"noopener noreferrer\">Snazzy Maps</a>."
1883
  msgstr ""
1884
 
1885
+ #: widgets/google-map/google-map.php:307
1886
  msgid "Custom map styles"
1887
  msgstr ""
1888
 
1889
+ #: widgets/google-map/google-map.php:318
1890
  msgid "Select map feature to style"
1891
  msgstr ""
1892
 
1893
+ #: widgets/google-map/google-map.php:320
1894
  msgid "Water"
1895
  msgstr ""
1896
 
1897
+ #: widgets/google-map/google-map.php:321
1898
  msgid "Highways"
1899
  msgstr ""
1900
 
1901
+ #: widgets/google-map/google-map.php:322
1902
  msgid "Arterial roads"
1903
  msgstr ""
1904
 
1905
+ #: widgets/google-map/google-map.php:323
1906
  msgid "Local roads"
1907
  msgstr ""
1908
 
1909
+ #: widgets/google-map/google-map.php:324
1910
  msgid "Transit lines"
1911
  msgstr ""
1912
 
1913
+ #: widgets/google-map/google-map.php:325
1914
  msgid "Transit stations"
1915
  msgstr ""
1916
 
1917
+ #: widgets/google-map/google-map.php:326
1918
  msgid "Man-made landscape"
1919
  msgstr ""
1920
 
1921
+ #: widgets/google-map/google-map.php:327
1922
  msgid "Natural landscape landcover"
1923
  msgstr ""
1924
 
1925
+ #: widgets/google-map/google-map.php:328
1926
  msgid "Natural landscape terrain"
1927
  msgstr ""
1928
 
1929
+ #: widgets/google-map/google-map.php:329
1930
  msgid "Point of interest - Attractions"
1931
  msgstr ""
1932
 
1933
+ #: widgets/google-map/google-map.php:330
1934
  msgid "Point of interest - Business"
1935
  msgstr ""
1936
 
1937
+ #: widgets/google-map/google-map.php:331
1938
  msgid "Point of interest - Government"
1939
  msgstr ""
1940
 
1941
+ #: widgets/google-map/google-map.php:332
1942
  msgid "Point of interest - Medical"
1943
  msgstr ""
1944
 
1945
+ #: widgets/google-map/google-map.php:333
1946
  msgid "Point of interest - Parks"
1947
  msgstr ""
1948
 
1949
+ #: widgets/google-map/google-map.php:334
1950
  msgid "Point of interest - Places of worship"
1951
  msgstr ""
1952
 
1953
+ #: widgets/google-map/google-map.php:335
1954
  msgid "Point of interest - Schools"
1955
  msgstr ""
1956
 
1957
+ #: widgets/google-map/google-map.php:336
1958
  msgid "Point of interest - Sports complexes"
1959
  msgstr ""
1960
 
1961
+ #: widgets/google-map/google-map.php:341
1962
  msgid "Select element type to style"
1963
  msgstr ""
1964
 
1965
+ #: widgets/google-map/google-map.php:343
1966
  msgid "Geometry"
1967
  msgstr ""
1968
 
1969
+ #: widgets/google-map/google-map.php:344
1970
  msgid "Labels"
1971
  msgstr ""
1972
 
1973
+ #: widgets/google-map/google-map.php:351
1974
  msgid "Visible"
1975
  msgstr ""
1976
 
1977
+ #: widgets/google-map/google-map.php:363
1978
  msgid "Directions"
1979
  msgstr ""
1980
 
1981
+ #: widgets/google-map/google-map.php:370
1982
  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."
1983
  msgstr ""
1984
 
1985
+ #: widgets/google-map/google-map.php:377
1986
  msgid "Starting point"
1987
  msgstr ""
1988
 
1989
+ #: widgets/google-map/google-map.php:381
1990
  msgid "Destination"
1991
  msgstr ""
1992
 
1993
+ #: widgets/google-map/google-map.php:385
1994
  msgid "Travel mode"
1995
  msgstr ""
1996
 
1997
+ #: widgets/google-map/google-map.php:388
1998
  msgid "Driving"
1999
  msgstr ""
2000
 
2001
+ #: widgets/google-map/google-map.php:389
2002
  msgid "Walking"
2003
  msgstr ""
2004
 
2005
+ #: widgets/google-map/google-map.php:390
2006
  msgid "Bicycling"
2007
  msgstr ""
2008
 
2009
+ #: widgets/google-map/google-map.php:391
2010
  msgid "Transit"
2011
  msgstr ""
2012
 
2013
+ #: widgets/google-map/google-map.php:396
2014
  msgid "Avoid highways"
2015
  msgstr ""
2016
 
2017
+ #: widgets/google-map/google-map.php:400
2018
  msgid "Avoid tolls"
2019
  msgstr ""
2020
 
2021
+ #: widgets/google-map/google-map.php:404
2022
  msgid "Preserve viewport"
2023
  msgstr ""
2024
 
2025
+ #: widgets/google-map/google-map.php:405
2026
  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."
2027
  msgstr ""
2028
 
2029
+ #: widgets/google-map/google-map.php:409
2030
  msgid "Waypoints"
2031
  msgstr ""
2032
 
2033
+ #: widgets/google-map/google-map.php:410
2034
  msgid "Waypoint"
2035
  msgstr ""
2036
 
2037
+ #: widgets/google-map/google-map.php:420, widgets/testimonial/testimonial.php:66
2038
  msgid "Location"
2039
  msgstr ""
2040
 
2041
+ #: widgets/google-map/google-map.php:425
2042
  msgid "Stopover"
2043
  msgstr ""
2044
 
2045
+ #: widgets/google-map/google-map.php:426
2046
  msgid "Whether or not this is a stop on the route or just a route preference."
2047
  msgstr ""
2048
 
2049
+ #: widgets/google-map/google-map.php:432
2050
  msgid "Optimize waypoints"
2051
  msgstr ""
2052
 
2053
+ #: widgets/google-map/google-map.php:434
2054
  msgid "Allow the Google Maps service to reorder waypoints for the shortest travelling distance."
2055
  msgstr ""
2056
 
2057
+ #: widgets/google-map/google-map.php:445
2058
+ msgid "API key"
2059
+ msgstr ""
2060
+
2061
+ #: widgets/google-map/google-map.php:448
2062
  msgid "Enter your %sAPI key%s. Your map won't function correctly without one."
2063
  msgstr ""
2064
 
2065
+ #: widgets/google-map/google-map.php:456
2066
+ msgid "Responsive breakpoint"
2067
+ msgstr ""
2068
+
2069
+ #: widgets/google-map/google-map.php:458
2070
+ msgid "This setting controls when the map will use the mobile zoom. This breakpoint will only be used if a mobile zoom is set in the SiteOrigin Google Maps settings. The default value is 780px"
2071
+ msgstr ""
2072
+
2073
+ #: widgets/google-map/google-map.php:585
2074
  msgid "There were no results for the place you entered. Please try another."
2075
  msgstr ""
2076
 
2077
+ #: widgets/google-map/google-map.php:606
2078
  msgid "Custom Map"
2079
  msgstr ""
2080
 
2210
  msgid "Background image"
2211
  msgstr ""
2212
 
2213
+ #: widgets/hero/hero.php:100, widgets/image-grid/image-grid.php:91, widgets/image/image.php:39, widgets/testimonial/testimonial.php:131, widgets/testimonial/testimonial.php:160, widgets/testimonial/testimonial.php:202
2214
  msgid "Image size"
2215
  msgstr ""
2216
 
2306
  msgid "Link Hover Color"
2307
  msgstr ""
2308
 
 
 
 
 
2309
  #: widgets/icon/icon.php:4
2310
  msgid "An iconic icon."
2311
  msgstr ""
2322
  msgid "Display a grid of images. Also useful for displaying client logos."
2323
  msgstr ""
2324
 
2325
+ #: widgets/image-grid/image-grid.php:21
2326
  msgid "SiteOrigin Image Grid"
2327
  msgstr ""
2328
 
2329
+ #: widgets/image-grid/image-grid.php:23
2330
  msgid "Display a grid of images."
2331
  msgstr ""
2332
 
2333
+ #: widgets/image-grid/image-grid.php:52, widgets/simple-masonry/simple-masonry.php:48
2334
  msgid "Images"
2335
  msgstr ""
2336
 
2338
  msgid "Image title"
2339
  msgstr ""
2340
 
2341
+ #: widgets/image-grid/image-grid.php:72, widgets/image/image.php:84
2342
+ msgid "Alt text"
2343
+ msgstr ""
2344
+
2345
+ #: widgets/image-grid/image-grid.php:76, widgets/social-media-buttons/social-media-buttons.php:74, widgets/testimonial/testimonial.php:88
2346
  msgid "URL"
2347
  msgstr ""
2348
 
2349
+ #: widgets/image-grid/image-grid.php:81, widgets/image/image.php:94, widgets/slider/slider.php:90
2350
  msgid "Open in new window"
2351
  msgstr ""
2352
 
2353
+ #: widgets/image-grid/image-grid.php:88
2354
  msgid "Display"
2355
  msgstr ""
2356
 
2357
+ #: widgets/image-grid/image-grid.php:97
2358
  msgid "Maximum image height"
2359
  msgstr ""
2360
 
2361
+ #: widgets/image-grid/image-grid.php:102
2362
  msgid "Maximum image width"
2363
  msgstr ""
2364
 
2365
+ #: widgets/image-grid/image-grid.php:107
2366
  msgid "Spacing"
2367
  msgstr ""
2368
 
2369
+ #: widgets/image-grid/image-grid.php:108
2370
  msgid "Amount of spacing between images."
2371
  msgstr ""
2372
 
2373
+ #: widgets/image-grid/image-grid.php:192, widgets/image/image.php:202
2374
  msgid "Add a Lightbox to your images with %sSiteOrigin Premium%s"
2375
  msgstr ""
2376
 
2402
  msgid "Title position"
2403
  msgstr ""
2404
 
 
 
 
 
2405
  #: widgets/image/image.php:100
2406
  msgid "Bound"
2407
  msgstr ""
2442
  msgid "This widget requires Page Builder."
2443
  msgstr ""
2444
 
 
 
 
 
2445
  #: widgets/post-carousel/post-carousel.php:4
2446
  msgid "Gives you a widget to display your posts as a carousel."
2447
  msgstr ""
2474
  msgid "Posts query"
2475
  msgstr ""
2476
 
2477
+ #: widgets/post-carousel/tpl/base.php:16, widgets/post-carousel/tpl/base.php:25
2478
  msgid "Next"
2479
  msgstr ""
2480
 
2481
+ #: widgets/post-carousel/tpl/base.php:16, widgets/post-carousel/tpl/base.php:25
2482
+ msgid "Next Posts"
2483
+ msgstr ""
2484
+
2485
+ #: widgets/post-carousel/tpl/base.php:17, widgets/post-carousel/tpl/base.php:23
2486
  msgid "Previous"
2487
  msgstr ""
2488
 
2489
+ #: widgets/post-carousel/tpl/base.php:17, widgets/post-carousel/tpl/base.php:23
2490
+ msgid "Previous Posts"
2491
+ msgstr ""
2492
+
2493
  #: widgets/price-table/price-table.php:4
2494
  msgid "A powerful yet simple price table widget for your sidebars or Page Builder pages."
2495
  msgstr ""
2894
  msgid "Mobile Align"
2895
  msgstr ""
2896
 
2897
+ #: widgets/social-media-buttons/social-media-buttons.php:314
2898
+ msgid "Add custom social networks with %sSiteOrigin Premium%s"
2899
+ msgstr ""
2900
+
2901
  #: widgets/social-media-buttons/tpl/default.php:13
2902
  msgid "%s %s"
2903
  msgstr ""
readme.txt CHANGED
@@ -2,11 +2,11 @@
2
  Tags: bundle, widget, button, slider, image, carousel, price table, google maps, tinymce, social links
3
  Requires at least: 4.2
4
  Tested up to: 5.1
5
- Stable tag: 1.15.2
6
- Build time: 2019-02-18T11:05:09-08:00
7
  License: GPLv3 or later
8
  Contributors: gpriday, braam-genis
9
- Donate link: https://siteorigin.com/downloads/contribution/
10
 
11
  The SiteOrigin widget bundle gives you a collection of widgets that you can use and customize. All the widgets are built on our powerful framework, giving you advanced forms, unlimited colours and 1500+ icons.
12
 
@@ -65,6 +65,31 @@ The SiteOrigin Widgets Bundle is the perfect platform to build widgets for your
65
 
66
  == Changelog ==
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  = 1.15.2 - 18 February 2019 =
69
  * Tabs: Set default tab position to top.
70
 
2
  Tags: bundle, widget, button, slider, image, carousel, price table, google maps, tinymce, social links
3
  Requires at least: 4.2
4
  Tested up to: 5.1
5
+ Stable tag: 1.15.3
6
+ Build time: 2019-03-06T09:36:20-08:00
7
  License: GPLv3 or later
8
  Contributors: gpriday, braam-genis
9
+ Donate link: https://siteorigin.com/downloads/premium/
10
 
11
  The SiteOrigin widget bundle gives you a collection of widgets that you can use and customize. All the widgets are built on our powerful framework, giving you advanced forms, unlimited colours and 1500+ icons.
12
 
65
 
66
  == Changelog ==
67
 
68
+ = 1.15.3 - 6 March 2019 =
69
+ * Image grid: Fallback support, alt text, use measurement fields.
70
+ * Features: Fix responsive layout.
71
+ * Google Maps: Update to use gesture handling and separate zoom level for mobile.
72
+ * Google Maps: Default height when height field is empty.
73
+ * Sliders: Option to always show navigation on mobile devices.
74
+ * Accordion: Keyboard navigation.
75
+ * Beaver Builder: Fix icons and widgets not saving.
76
+ * Video: Allow using YouTube embed URLs.
77
+ * Post Carousel: Accessibility improvements.
78
+ * Escape namespaced widgets in previews.
79
+ * Flag additional metaboxes as incompatible with the block editor.
80
+ * Fix state emitters for sub-widget fields.
81
+ * Google Maps: Remove API key field from widget form, in favor of global API key field.
82
+ * Google Maps: Display notice when API key missing.
83
+ * Contact form: Prevent double nonce.
84
+ * TinyMCE field: Prevent twemoji from replacing emoji in the textarea.
85
+ * Widget block: Show appropriate message when widget is missing or deactivated.
86
+ * Accordion: Fix open/close icon layout when set to left position.
87
+ * Social Media Buttons: Prevent the phone network from opening in a new window.
88
+ * Google Maps: Add map styles filter.
89
+ * Image radio field: New field created.
90
+ * Posts field: Option to specify allowed post types.
91
+ * Contact form: Add description to reCAPTCHA field specifying reCAPTCHA v2.
92
+
93
  = 1.15.2 - 18 February 2019 =
94
  * Tabs: Set default tab position to top.
95
 
so-widgets-bundle.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: SiteOrigin Widgets Bundle
4
  Description: A collection of all widgets, neatly bundled into a single plugin. It's also a framework to code your own widgets on top of.
5
- Version: 1.15.2
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
@@ -12,7 +12,7 @@ License: GPL3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
- define('SOW_BUNDLE_VERSION', '1.15.2');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
@@ -540,7 +540,8 @@ class SiteOrigin_Widgets_Bundle {
540
  */
541
  function activate_widget( $widget_id, $include = true ){
542
  $exists = false;
543
- foreach( $this->widget_folders as $folder ) {
 
544
  if( !file_exists($folder . $widget_id . '/' . $widget_id . '.php') ) continue;
545
  $exists = true;
546
  }
@@ -560,7 +561,7 @@ class SiteOrigin_Widgets_Bundle {
560
  // Now, lets actually include the files
561
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
562
 
563
- foreach( $this->widget_folders as $folder ) {
564
  if( !file_exists($folder . $widget_id . '/' . $widget_id . '.php') ) continue;
565
  include_once $folder . $widget_id . '/' . $widget_id . '.php';
566
 
@@ -820,6 +821,7 @@ class SiteOrigin_Widgets_Bundle {
820
  preg_match( '/-([0-9]+$)/', $id, $num_match );
821
  $widget_instance = $opt_wid[ $num_match[1] ];
822
  $widget->enqueue_frontend_scripts( $widget_instance);
 
823
  $widget->generate_and_enqueue_instance_styles( $widget_instance );
824
  }
825
  }
2
  /*
3
  Plugin Name: SiteOrigin Widgets Bundle
4
  Description: A collection of all widgets, neatly bundled into a single plugin. It's also a framework to code your own widgets on top of.
5
+ Version: 1.15.3
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
+ define('SOW_BUNDLE_VERSION', '1.15.3');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
540
  */
541
  function activate_widget( $widget_id, $include = true ){
542
  $exists = false;
543
+ $widget_folders = $this->get_widget_folders();
544
+ foreach( $widget_folders as $folder ) {
545
  if( !file_exists($folder . $widget_id . '/' . $widget_id . '.php') ) continue;
546
  $exists = true;
547
  }
561
  // Now, lets actually include the files
562
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
563
 
564
+ foreach( $widget_folders as $folder ) {
565
  if( !file_exists($folder . $widget_id . '/' . $widget_id . '.php') ) continue;
566
  include_once $folder . $widget_id . '/' . $widget_id . '.php';
567
 
821
  preg_match( '/-([0-9]+$)/', $id, $num_match );
822
  $widget_instance = $opt_wid[ $num_match[1] ];
823
  $widget->enqueue_frontend_scripts( $widget_instance);
824
+ // TODO: Should be calling modify_instance here before generating the CSS.
825
  $widget->generate_and_enqueue_instance_styles( $widget_instance );
826
  }
827
  }
widgets/accordion/js/accordion.js CHANGED
@@ -43,6 +43,7 @@ jQuery( function ( $ ) {
43
  $( sowb ).trigger( 'setup_widgets' );
44
  }
45
  );
 
46
  $panel.addClass( 'sow-accordion-panel-open' );
47
  openPanels.push( panel );
48
 
@@ -65,6 +66,7 @@ jQuery( function ( $ ) {
65
  $( this ).trigger( 'hide' );
66
  }
67
  );
 
68
  $panel.removeClass( 'sow-accordion-panel-open' );
69
  openPanels.splice( openPanels.indexOf( panel ), 1 );
70
  if ( ! preventHashChange ) {
@@ -73,7 +75,13 @@ jQuery( function ( $ ) {
73
  }
74
  };
75
 
76
- $accordionPanels.find( '> .sow-accordion-panel-header' ).click( function () {
 
 
 
 
 
 
77
  var $this = $( this );
78
  var maxOpenPanels = $widget.data( 'maxOpenPanels' );
79
  var $panel = $this.closest( '.sow-accordion-panel' );
43
  $( sowb ).trigger( 'setup_widgets' );
44
  }
45
  );
46
+ $panel.find( '> .sow-accordion-panel-header-container > .sow-accordion-panel-header' ).attr( 'aria-expanded', true );
47
  $panel.addClass( 'sow-accordion-panel-open' );
48
  openPanels.push( panel );
49
 
66
  $( this ).trigger( 'hide' );
67
  }
68
  );
69
+ $panel.find( '> .sow-accordion-panel-header-container > .sow-accordion-panel-header' ).attr( 'aria-expanded', false );
70
  $panel.removeClass( 'sow-accordion-panel-open' );
71
  openPanels.splice( openPanels.indexOf( panel ), 1 );
72
  if ( ! preventHashChange ) {
75
  }
76
  };
77
 
78
+ $accordionPanels.find( '> .sow-accordion-panel-header-container > .sow-accordion-panel-header' ).on( 'click keydown', function( e ) {
79
+ if ( e.type == 'keydown' ) {
80
+ if ( e.keyCode !== 13 && e.keyCode !== 32 ){
81
+ return;
82
+ }
83
+ e.preventDefault();
84
+ }
85
  var $this = $( this );
86
  var maxOpenPanels = $widget.data( 'maxOpenPanels' );
87
  var $panel = $this.closest( '.sow-accordion-panel' );
widgets/accordion/js/accordion.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery(function(h){sowb.setupAccordion=function(){h(".sow-accordion").each(function(o,n){var e=h(this).closest(".so-widget-sow-accordion");if(e.data("initialized"))return h(this);var t=h(n).find("> .sow-accordion-panel");t.not(".sow-accordion-panel-open").find(".sow-accordion-panel-content").hide();var s=t.filter(".sow-accordion-panel-open").toArray(),c=function(){},r=function(o,n){var a=o.offset().top-90;n?h("body,html").animate({scrollTop:a},200):window.scrollTo(0,a)},d=function(o,n,a){var i=h(o);if(!i.is(".sow-accordion-panel-open")){i.find("> .sow-accordion-panel-content").slideDown(function(){a&&i.offset().top<window.scrollY&&r(i,!0),h(this).trigger("show"),h(sowb).trigger("setup_widgets")}),i.addClass("sow-accordion-panel-open"),s.push(o);var e=h(o).parents(".sow-accordion-panel");e.length&&!e.hasClass("sow-accordion-panel-open")&&d(e.get(0),!0),n||c()}},l=function(o,n){var a=h(o);a.is(".sow-accordion-panel-open")&&(a.find("> .sow-accordion-panel-content").slideUp(function(){h(this).trigger("hide")}),a.removeClass("sow-accordion-panel-open"),s.splice(s.indexOf(o),1),n||c())};if(t.find("> .sow-accordion-panel-header").click(function(){var o=h(this),a=e.data("maxOpenPanels"),n=o.closest(".sow-accordion-panel");if(n.is(".sow-accordion-panel-open")?l(n.get(0)):d(n.get(0),!1,!0),!isNaN(a)&&0<a&&s.length>a){var i=0;h.each(s.reverse(),function(o,n){i!==a?i++:l(s[o])})}}),e.data("useAnchorTags")){var a;c=function(){a&&clearTimeout(a),a=setTimeout(function(){for(var o=[],n=h(".sow-accordion-panel-open").toArray(),a=0;a<n.length;a++){var i=h(n[a]).data("anchor");if(i){var e=h(n[a]).parents(".sow-accordion-panel");(!e.length||e.length&&e.hasClass("sow-accordion-panel-open"))&&(o[a]=i)}}o&&o.length?window.location.hash=o.join(","):window.location.hash&&window.history.pushState("",document.title,window.location.pathname+window.location.search)},100)};var i=function(){for(var o=t.toArray(),n=0;n<o.length;n++){var a=o[n],i=h(a).data("anchor"),e=window.location.hash.substring(1).split(",");i&&-1<h.inArray(i.toString(),e)?d(a,!0):l(a,!0)}};h(window).on("hashchange",i),window.location.hash?i():c();var w=e.data("initialScrollPanel");if(0<w){var p=w>t.length?t.last():t.eq(w-1);setTimeout(function(){r(p)},500)}}e.data("initialized",!0)})},sowb.setupAccordion(),h(sowb).on("setup_widgets",sowb.setupAccordion)}),window.sowb=sowb;
1
+ var sowb=window.sowb||{};jQuery(function(h){sowb.setupAccordion=function(){h(".sow-accordion").each(function(o,n){var t=h(this).closest(".so-widget-sow-accordion");if(t.data("initialized"))return h(this);var c=h(n).find("> .sow-accordion-panel");c.not(".sow-accordion-panel-open").find(".sow-accordion-panel-content").hide();var r=c.filter(".sow-accordion-panel-open").toArray(),s=function(){},d=function(o,n){var a=o.offset().top-90;n?h("body,html").animate({scrollTop:a},200):window.scrollTo(0,a)},l=function(o,n,a){var e=h(o);if(!e.is(".sow-accordion-panel-open")){e.find("> .sow-accordion-panel-content").slideDown(function(){a&&e.offset().top<window.scrollY&&d(e,!0),h(this).trigger("show"),h(sowb).trigger("setup_widgets")}),e.find("> .sow-accordion-panel-header-container > .sow-accordion-panel-header").attr("aria-expanded",!0),e.addClass("sow-accordion-panel-open"),r.push(o);var i=h(o).parents(".sow-accordion-panel");i.length&&!i.hasClass("sow-accordion-panel-open")&&l(i.get(0),!0),n||s()}},w=function(o,n){var a=h(o);a.is(".sow-accordion-panel-open")&&(a.find("> .sow-accordion-panel-content").slideUp(function(){h(this).trigger("hide")}),a.find("> .sow-accordion-panel-header-container > .sow-accordion-panel-header").attr("aria-expanded",!1),a.removeClass("sow-accordion-panel-open"),r.splice(r.indexOf(o),1),n||s())};if(c.find("> .sow-accordion-panel-header-container > .sow-accordion-panel-header").on("click keydown",function(o){if("keydown"==o.type){if(13!==o.keyCode&&32!==o.keyCode)return;o.preventDefault()}var n=h(this),a=t.data("maxOpenPanels"),e=n.closest(".sow-accordion-panel");if(e.is(".sow-accordion-panel-open")?w(e.get(0)):l(e.get(0),!1,!0),!isNaN(a)&&0<a&&r.length>a){var i=0;h.each(r.reverse(),function(o,n){i!==a?i++:w(r[o])})}}),t.data("useAnchorTags")){var a;s=function(){a&&clearTimeout(a),a=setTimeout(function(){for(var o=[],n=h(".sow-accordion-panel-open").toArray(),a=0;a<n.length;a++){var e=h(n[a]).data("anchor");if(e){var i=h(n[a]).parents(".sow-accordion-panel");(!i.length||i.length&&i.hasClass("sow-accordion-panel-open"))&&(o[a]=e)}}o&&o.length?window.location.hash=o.join(","):window.location.hash&&window.history.pushState("",document.title,window.location.pathname+window.location.search)},100)};var e=function(){for(var o=c.toArray(),n=0;n<o.length;n++){var a=o[n],e=h(a).data("anchor"),i=window.location.hash.substring(1).split(",");e&&-1<h.inArray(e.toString(),i)?l(a,!0):w(a,!0)}};h(window).on("hashchange",e),window.location.hash?e():s();var i=t.data("initialScrollPanel");if(0<i){var p=i>c.length?c.last():c.eq(i-1);setTimeout(function(){d(p)},500)}}t.data("initialized",!0)})},sowb.setupAccordion(),h(sowb).on("setup_widgets",sowb.setupAccordion)}),window.sowb=sowb;
widgets/accordion/styles/default.less CHANGED
@@ -57,10 +57,15 @@
57
  color: @title_hover_color;
58
  border-color: @heading_border_hover_color;
59
  }
 
 
 
 
 
60
 
61
  .sow-accordion-title {
62
  display: inline-block;
63
- width: ~"calc(100% - 20px)";
64
  & when ( @show_open_close_icon = true ) and ( @heading_title_align = @open_close_location ) {
65
  margin-@{open_close_location}: 5px;
66
  }
@@ -74,12 +79,12 @@
74
  }
75
  }
76
  }
77
- &:not(.sow-accordion-panel-open) > .sow-accordion-panel-header {
78
  .sow-accordion-close-button {
79
  display: none;
80
  }
81
  }
82
- &.sow-accordion-panel-open > .sow-accordion-panel-header {
83
  .sow-accordion-open-button {
84
  display: none;
85
  }
@@ -98,6 +103,10 @@
98
  font-family: @panels_font_family;
99
  font-size: @panels_font_size;
100
  overflow: auto;
 
 
 
 
101
  }
102
  }
103
  margin-bottom: @panels_margin_bottom;
57
  color: @title_hover_color;
58
  border-color: @heading_border_hover_color;
59
  }
60
+
61
+ &:focus {
62
+ outline: 1px dotted #666;
63
+ outline: auto 5px -webkit-focus-ring-color;
64
+ }
65
 
66
  .sow-accordion-title {
67
  display: inline-block;
68
+ width: ~"calc(100% - 25px)";
69
  & when ( @show_open_close_icon = true ) and ( @heading_title_align = @open_close_location ) {
70
  margin-@{open_close_location}: 5px;
71
  }
79
  }
80
  }
81
  }
82
+ &:not(.sow-accordion-panel-open) > .sow-accordion-panel-header-container > .sow-accordion-panel-header {
83
  .sow-accordion-close-button {
84
  display: none;
85
  }
86
  }
87
+ &.sow-accordion-panel-open > .sow-accordion-panel-header-container > .sow-accordion-panel-header {
88
  .sow-accordion-open-button {
89
  display: none;
90
  }
103
  font-family: @panels_font_family;
104
  font-size: @panels_font_size;
105
  overflow: auto;
106
+ &:focus {
107
+ outline: 1px dotted #666;
108
+ outline: auto 5px -webkit-focus-ring-color;
109
+ }
110
  }
111
  }
112
  margin-bottom: @panels_margin_bottom;
widgets/accordion/tpl/default.php CHANGED
@@ -15,23 +15,26 @@ if( !empty( $instance['title'] ) ) {
15
  <?php foreach ( $panels as $panel ) : ?>
16
  <div class="sow-accordion-panel<?php if ( $panel['initial_state'] == 'open' ) echo ' sow-accordion-panel-open'; ?>"
17
  data-anchor="<?php echo sanitize_title_with_dashes( $panel['anchor'] ); ?>">
18
- <div class="sow-accordion-panel-header">
19
- <div class="sow-accordion-title">
20
- <?php echo $panel['before_title']; ?>
21
- <?php echo wp_kses_post( $panel['title'] ); ?>
22
- <?php echo $panel['after_title']; ?>
23
- </div>
24
- <div class="sow-accordion-open-close-button">
25
- <div class="sow-accordion-open-button">
26
- <?php echo siteorigin_widget_get_icon( $icon_open ); ?>
27
- </div>
28
- <div class="sow-accordion-close-button">
29
- <?php echo siteorigin_widget_get_icon( $icon_close ); ?>
 
 
 
30
  </div>
31
  </div>
32
- </div>
33
- <div class="sow-accordion-panel-content">
34
- <div class="sow-accordion-panel-border">
35
  <?php $this->render_panel_content( $panel, $instance ); ?>
36
  </div>
37
  </div>
15
  <?php foreach ( $panels as $panel ) : ?>
16
  <div class="sow-accordion-panel<?php if ( $panel['initial_state'] == 'open' ) echo ' sow-accordion-panel-open'; ?>"
17
  data-anchor="<?php echo sanitize_title_with_dashes( $panel['anchor'] ); ?>">
18
+ <div class="sow-accordion-panel-header-container" role="heading" aria-level="2">
19
+ <div class="sow-accordion-panel-header" tabindex="0" role="button" id="accordion-label-<?php echo sanitize_title_with_dashes( $panel['anchor'] ); ?>" aria-controls="accordion-content-<?php echo sanitize_title_with_dashes( $panel['anchor'] ); ?>" aria-expanded="<?php echo $panel['initial_state'] == 'open' ? 'true' : 'false'; ?>">
20
+ <div class="sow-accordion-title">
21
+ <?php echo $panel['before_title']; ?>
22
+ <?php echo wp_kses_post( $panel['title'] ); ?>
23
+ <?php echo $panel['after_title']; ?>
24
+ </div>
25
+ <div class="sow-accordion-open-close-button">
26
+ <div class="sow-accordion-open-button">
27
+ <?php echo siteorigin_widget_get_icon( $icon_open ); ?>
28
+ </div>
29
+ <div class="sow-accordion-close-button">
30
+ <?php echo siteorigin_widget_get_icon( $icon_close ); ?>
31
+ </div>
32
+ </div>
33
  </div>
34
  </div>
35
+
36
+ <div class="sow-accordion-panel-content" role="region" aria-labelledby="accordion-label-<?php echo sanitize_title_with_dashes( $panel['anchor'] ); ?>" id="accordion-content-<?php echo sanitize_title_with_dashes( $panel['anchor'] ); ?>">
37
+ <div class="sow-accordion-panel-border" tabindex="0">
38
  <?php $this->render_panel_content( $panel, $instance ); ?>
39
  </div>
40
  </div>
widgets/contact/contact.php CHANGED
@@ -219,20 +219,40 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
219
 
220
  'recaptcha' => array(
221
  'type' => 'section',
222
- 'label' => __( 'reCAPTCHA', 'so-widgets-bundle' ),
223
  'fields' => array(
224
  'use_captcha' => array(
225
  'type' => 'checkbox',
226
- 'label' => __( 'Use reCAPTCHA', 'so-widgets-bundle' ),
227
  'default' => false,
 
 
 
 
 
 
 
 
 
 
 
 
228
  ),
229
  'site_key' => array(
230
  'type' => 'text',
231
- 'label' => __( 'reCAPTCHA Site Key', 'so-widgets-bundle' ),
 
 
 
 
232
  ),
233
  'secret_key' => array(
234
  'type' => 'text',
235
- 'label' => __( 'reCAPTCHA Secret Key', 'so-widgets-bundle' ),
 
 
 
 
236
  ),
237
  'theme' => array(
238
  'type' => 'select',
@@ -242,6 +262,10 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
242
  'light' => __( 'Light', 'so-widgets-bundle' ),
243
  'dark' => __( 'Dark', 'so-widgets-bundle' ),
244
  ),
 
 
 
 
245
  ),
246
  'type' => array(
247
  'type' => 'select',
@@ -251,6 +275,10 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
251
  'image' => __( 'Image', 'so-widgets-bundle' ),
252
  'audio' => __( 'Audio', 'so-widgets-bundle' ),
253
  ),
 
 
 
 
254
  ),
255
  'size' => array(
256
  'type' => 'select',
@@ -260,6 +288,10 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
260
  'normal' => __( 'Normal', 'so-widgets-bundle' ),
261
  'compact' => __( 'Compact', 'so-widgets-bundle' ),
262
  ),
 
 
 
 
263
  ),
264
  )
265
  ),
219
 
220
  'recaptcha' => array(
221
  'type' => 'section',
222
+ 'label' => __( 'reCAPTCHA v2', 'so-widgets-bundle' ),
223
  'fields' => array(
224
  'use_captcha' => array(
225
  'type' => 'checkbox',
226
+ 'label' => __( 'Use reCAPTCHA v2', 'so-widgets-bundle' ),
227
  'default' => false,
228
+ 'description' => sprintf(
229
+ __( 'Please make sure you register a new reCAPTCHA v2 key %shere%s.', 'so-widgets-bundle' ),
230
+ '<a href="https://www.google.com/recaptcha/admin/create" target="_blank" rel="noopener noreferrer">',
231
+ '</a>'
232
+ ),
233
+ 'state_emitter' => array(
234
+ 'callback' => 'conditional',
235
+ 'args' => array(
236
+ 'use_captcha[show]: val',
237
+ 'use_captcha[hide]: ! val',
238
+ ),
239
+ ),
240
  ),
241
  'site_key' => array(
242
  'type' => 'text',
243
+ 'label' => __( 'reCAPTCHA v2 Site Key', 'so-widgets-bundle' ),
244
+ 'state_handler' => array(
245
+ 'use_captcha[show]' => array( 'slideDown' ),
246
+ 'use_captcha[hide]' => array( 'slideUp' ),
247
+ ),
248
  ),
249
  'secret_key' => array(
250
  'type' => 'text',
251
+ 'label' => __( 'reCAPTCHA v2 Secret Key', 'so-widgets-bundle' ),
252
+ 'state_handler' => array(
253
+ 'use_captcha[show]' => array( 'slideDown' ),
254
+ 'use_captcha[hide]' => array( 'slideUp' ),
255
+ ),
256
  ),
257
  'theme' => array(
258
  'type' => 'select',
262
  'light' => __( 'Light', 'so-widgets-bundle' ),
263
  'dark' => __( 'Dark', 'so-widgets-bundle' ),
264
  ),
265
+ 'state_handler' => array(
266
+ 'use_captcha[show]' => array( 'slideDown' ),
267
+ 'use_captcha[hide]' => array( 'slideUp' ),
268
+ ),
269
  ),
270
  'type' => array(
271
  'type' => 'select',
275
  'image' => __( 'Image', 'so-widgets-bundle' ),
276
  'audio' => __( 'Audio', 'so-widgets-bundle' ),
277
  ),
278
+ 'state_handler' => array(
279
+ 'use_captcha[show]' => array( 'slideDown' ),
280
+ 'use_captcha[hide]' => array( 'slideUp' ),
281
+ ),
282
  ),
283
  'size' => array(
284
  'type' => 'select',
288
  'normal' => __( 'Normal', 'so-widgets-bundle' ),
289
  'compact' => __( 'Compact', 'so-widgets-bundle' ),
290
  ),
291
+ 'state_handler' => array(
292
+ 'use_captcha[show]' => array( 'slideDown' ),
293
+ 'use_captcha[hide]' => array( 'slideUp' ),
294
+ ),
295
  ),
296
  )
297
  ),
widgets/contact/tpl/default.php CHANGED
@@ -41,7 +41,7 @@ else {
41
 
42
  <?php $this->render_form_fields( $instance['fields'], $result['errors'], $instance ) ?>
43
  <input type="hidden" name="instance_hash" value="<?php echo esc_attr( $instance_hash ) ?>" />
44
- <?php echo wp_nonce_field( '_contact_form_submit' ) ?>
45
 
46
  <?php if( $use_recaptcha ) : ?>
47
  <div class="sow-recaptcha"
41
 
42
  <?php $this->render_form_fields( $instance['fields'], $result['errors'], $instance ) ?>
43
  <input type="hidden" name="instance_hash" value="<?php echo esc_attr( $instance_hash ) ?>" />
44
+ <?php wp_nonce_field( '_contact_form_submit' ) ?>
45
 
46
  <?php if( $use_recaptcha ) : ?>
47
  <div class="sow-recaptcha"
widgets/features/styles/default.less CHANGED
@@ -190,6 +190,7 @@
190
  width: 100% !important;
191
  float: none;
192
  margin-bottom: 40px;
 
193
 
194
  &:last-child {
195
  margin-bottom: 0px;
190
  width: 100% !important;
191
  float: none;
192
  margin-bottom: 40px;
193
+ display: block;
194
 
195
  &:last-child {
196
  margin-bottom: 0px;
widgets/google-map/fields/js/location-field.js CHANGED
@@ -160,18 +160,28 @@ function sowbAdminGoogleMapInit() {
160
  sowbForms.setupLocationFields();
161
  return;
162
  }
 
 
 
163
 
164
- var $apiKeyField = $( this ).closest( '.siteorigin-widget-form' ).find( 'input[type="text"][name*="api_key"]' ).first();
165
- var apiKey = $apiKeyField.val();
166
  if ( ! apiKey ) {
 
 
 
 
 
 
 
 
 
 
 
167
  console.warn( 'SiteOrigin Google Maps Widget: Could not find API key. Google Maps API key is required.' );
 
168
  }
169
-
170
  var apiUrl = 'https://maps.googleapis.com/maps/api/js?key=' + apiKey + '&libraries=places&callback=sowbAdminGoogleMapInit';
171
-
172
  $( 'body' ).append( '<script async type="text/javascript" src="' + apiUrl + '">' );
173
-
174
- sowbForms.mapsInitializing = true;
175
  } );
176
 
177
  } )( jQuery );
160
  sowbForms.setupLocationFields();
161
  return;
162
  }
163
+ sowbForms.mapsInitializing = true;
164
+
165
+ var apiKey = $( this ).find( '.location-field-data' ).data( 'apiKey' );
166
 
 
 
167
  if ( ! apiKey ) {
168
+ sowbForms.displayNotice(
169
+ $( this ).closest( '.siteorigin-widget-form' ),
170
+ soLocationField.missingApiKey,
171
+ '',
172
+ [
173
+ {
174
+ label: soLocationField.globalSettingsButtonLabel,
175
+ url: soLocationField.globalSettingsButtonUrl,
176
+ }
177
+ ]
178
+ );
179
  console.warn( 'SiteOrigin Google Maps Widget: Could not find API key. Google Maps API key is required.' );
180
+ apiKey = '';
181
  }
182
+ // 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.
183
  var apiUrl = 'https://maps.googleapis.com/maps/api/js?key=' + apiKey + '&libraries=places&callback=sowbAdminGoogleMapInit';
 
184
  $( 'body' ).append( '<script async type="text/javascript" src="' + apiUrl + '">' );
 
 
185
  } );
186
 
187
  } )( jQuery );
widgets/google-map/fields/js/location-field.min.js CHANGED
@@ -1 +1 @@
1
- function sowbAdminGoogleMapInit(){sowbForms.mapsInitializing=!1,sowbForms.mapsInitialized=!0,sowbForms.setupLocationFields()}window.sowbForms=window.sowbForms||{},sowbForms.LocationField=function(){return{init:function(o){if(void 0!==google.maps.places){var e=$(o).find(".siteorigin-widget-location-input"),i=$(o).find(".siteorigin-widget-input"),t=new google.maps.places.Autocomplete(e.get(0)),s=function(o){var i=new $.Deferred,t={name:o.name};if(t.address=o.hasOwnProperty("formatted_address")?o.formatted_address:"",o.hasOwnProperty("geometry"))t.location=o.geometry.location.toString(),i.resolve(t);else{var e={address:o.hasOwnProperty("formatted_address")?o.formatted_address:o.name};(new google.maps.Geocoder).geocode(e,function(o,e){e===google.maps.GeocoderStatus.OK?(t.location=o[0].geometry.location.toString(),i.resolve(t)):i.reject(e)})}return i};if(t.addListener("place_changed",function(){var e=t.getPlace();s(e).done(function(o){i.val(JSON.stringify(o)),i.trigger("change")}).fail(function(o){console.warn('SiteOrigin Google Maps Widget: Geocoding failed for "'+e.name+'" with status: '+o)})}),e.on("change",function(){i.val(JSON.stringify({name:e.val()})),i.trigger("change")}),i.val()){var a={};try{var n=JSON.parse(i.val());n.hasOwnProperty("location")||n.hasOwnProperty("address")&&(a.name=n.address)}catch(o){a.name=i.val()}if(a.hasOwnProperty("name")&&"null"!==a.name){sowbForms.mapsMigrationLogged||(console.info("SiteOrigin Google Maps Widget: Starting automatic migration of location. Please wait a moment..."),sowbForms.mapsMigrationLogged=!0);var r=100;sowbForms._geocodeQueue.push({place:a,field:i}),1===sowbForms._geocodeQueue.length&&setTimeout(function(){!function i(o,t){s(o).done(function(o){if(t.val(JSON.stringify(o)),t.trigger("change"),sowbForms._geocodeQueue.shift(),0<sowbForms._geocodeQueue.length){var e=sowbForms._geocodeQueue[0];setTimeout(function(){i(e.place,e.field)},r)}else console.info("SiteOrigin Google Maps Widget: Location fields updated. Please save the post to complete the migration.")}).fail(function(o){if(o===google.maps.GeocoderStatus.OVER_QUERY_LIMIT)if(sowbForms.hasOwnProperty("overQueryLimitCount")?sowbForms.overQueryLimitCount++:sowbForms.overQueryLimitCount=1,sowbForms.overQueryLimitCount<3){var e=sowbForms._geocodeQueue[0];r*=10,setTimeout(function(){i(e.place,e.field)},r)}else console.warn("SiteOrigin Google Maps Widget: Automatic migration of old address failed with status: "+o),console.info("SiteOrigin Google Maps Widget: Please save this post and open the form to try again.")})}(a,i)},r)}}}else console.error("SiteOrigin Google Maps Widget: Failed to load the places library.")}}},sowbForms.setupLocationFields=function(){google&&google.maps&&google.maps.places&&$(".siteorigin-widget-field-type-location").each(function(o,e){$(e).data("initialized")||((new sowbForms.LocationField).init(e),$(e).data("initialized",!0))})},function(i){i(document).on("sowsetupformfield",".siteorigin-widget-field-type-location",function(){if(sowbForms._geocodeQueue=sowbForms._geocodeQueue||[],!sowbForms.mapsInitializing)if(sowbForms.mapsInitialized)sowbForms.setupLocationFields();else{var o=i(this).closest(".siteorigin-widget-form").find('input[type="text"][name*="api_key"]').first().val();o||console.warn("SiteOrigin Google Maps Widget: Could not find API key. Google Maps API key is required.");var e="https://maps.googleapis.com/maps/api/js?key="+o+"&libraries=places&callback=sowbAdminGoogleMapInit";i("body").append('<script async type="text/javascript" src="'+e+'">'),sowbForms.mapsInitializing=!0}})}(jQuery);
1
+ function sowbAdminGoogleMapInit(){sowbForms.mapsInitializing=!1,sowbForms.mapsInitialized=!0,sowbForms.setupLocationFields()}window.sowbForms=window.sowbForms||{},sowbForms.LocationField=function(){return{init:function(o){if(void 0!==google.maps.places){var e=$(o).find(".siteorigin-widget-location-input"),i=$(o).find(".siteorigin-widget-input"),t=new google.maps.places.Autocomplete(e.get(0)),s=function(o){var i=new $.Deferred,t={name:o.name};if(t.address=o.hasOwnProperty("formatted_address")?o.formatted_address:"",o.hasOwnProperty("geometry"))t.location=o.geometry.location.toString(),i.resolve(t);else{var e={address:o.hasOwnProperty("formatted_address")?o.formatted_address:o.name};(new google.maps.Geocoder).geocode(e,function(o,e){e===google.maps.GeocoderStatus.OK?(t.location=o[0].geometry.location.toString(),i.resolve(t)):i.reject(e)})}return i};if(t.addListener("place_changed",function(){var e=t.getPlace();s(e).done(function(o){i.val(JSON.stringify(o)),i.trigger("change")}).fail(function(o){console.warn('SiteOrigin Google Maps Widget: Geocoding failed for "'+e.name+'" with status: '+o)})}),e.on("change",function(){i.val(JSON.stringify({name:e.val()})),i.trigger("change")}),i.val()){var a={};try{var n=JSON.parse(i.val());n.hasOwnProperty("location")||n.hasOwnProperty("address")&&(a.name=n.address)}catch(o){a.name=i.val()}if(a.hasOwnProperty("name")&&"null"!==a.name){sowbForms.mapsMigrationLogged||(console.info("SiteOrigin Google Maps Widget: Starting automatic migration of location. Please wait a moment..."),sowbForms.mapsMigrationLogged=!0);var r=100;sowbForms._geocodeQueue.push({place:a,field:i}),1===sowbForms._geocodeQueue.length&&setTimeout(function(){!function i(o,t){s(o).done(function(o){if(t.val(JSON.stringify(o)),t.trigger("change"),sowbForms._geocodeQueue.shift(),0<sowbForms._geocodeQueue.length){var e=sowbForms._geocodeQueue[0];setTimeout(function(){i(e.place,e.field)},r)}else console.info("SiteOrigin Google Maps Widget: Location fields updated. Please save the post to complete the migration.")}).fail(function(o){if(o===google.maps.GeocoderStatus.OVER_QUERY_LIMIT)if(sowbForms.hasOwnProperty("overQueryLimitCount")?sowbForms.overQueryLimitCount++:sowbForms.overQueryLimitCount=1,sowbForms.overQueryLimitCount<3){var e=sowbForms._geocodeQueue[0];r*=10,setTimeout(function(){i(e.place,e.field)},r)}else console.warn("SiteOrigin Google Maps Widget: Automatic migration of old address failed with status: "+o),console.info("SiteOrigin Google Maps Widget: Please save this post and open the form to try again.")})}(a,i)},r)}}}else console.error("SiteOrigin Google Maps Widget: Failed to load the places library.")}}},sowbForms.setupLocationFields=function(){google&&google.maps&&google.maps.places&&$(".siteorigin-widget-field-type-location").each(function(o,e){$(e).data("initialized")||((new sowbForms.LocationField).init(e),$(e).data("initialized",!0))})},function(i){i(document).on("sowsetupformfield",".siteorigin-widget-field-type-location",function(){if(sowbForms._geocodeQueue=sowbForms._geocodeQueue||[],!sowbForms.mapsInitializing)if(sowbForms.mapsInitialized)sowbForms.setupLocationFields();else{sowbForms.mapsInitializing=!0;var o=i(this).find(".location-field-data").data("apiKey");o||(sowbForms.displayNotice(i(this).closest(".siteorigin-widget-form"),soLocationField.missingApiKey,"",[{label:soLocationField.globalSettingsButtonLabel,url:soLocationField.globalSettingsButtonUrl}]),console.warn("SiteOrigin Google Maps Widget: Could not find API key. Google Maps API key is required."),o="");var e="https://maps.googleapis.com/maps/api/js?key="+o+"&libraries=places&callback=sowbAdminGoogleMapInit";i("body").append('<script async type="text/javascript" src="'+e+'">')}})}(jQuery);
widgets/google-map/fields/location.class.php CHANGED
@@ -18,14 +18,20 @@ class SiteOrigin_Widget_Field_Location extends SiteOrigin_Widget_Field_Base {
18
  } else if ( ! empty( $value['name'] ) ) {
19
  $address = $value['name'];
20
  }
 
 
 
21
  ?>
22
  <input type="text" value="<?php echo esc_attr( $address ) ?>"
23
  class="widefat siteorigin-widget-location-input"/>
24
- <input type="hidden"
25
- class="siteorigin-widget-input location-field-data"
26
- value="<?php echo esc_attr( json_encode( $value ) ); ?>"
27
- name="<?php echo esc_attr( $this->element_name ) ?>"
28
- id="<?php echo esc_attr( $this->element_id ) ?>"/>
 
 
 
29
  <?php
30
  }
31
 
@@ -42,6 +48,16 @@ class SiteOrigin_Widget_Field_Location extends SiteOrigin_Widget_Field_Base {
42
  array(),
43
  SOW_BUNDLE_VERSION
44
  );
 
 
 
 
 
 
 
 
 
 
45
  }
46
 
47
  protected function sanitize_field_input( $value, $instance ) {
18
  } else if ( ! empty( $value['name'] ) ) {
19
  $address = $value['name'];
20
  }
21
+
22
+ $api_key = SiteOrigin_Widget_GoogleMap_Widget::get_api_key( $instance );
23
+
24
  ?>
25
  <input type="text" value="<?php echo esc_attr( $address ) ?>"
26
  class="widefat siteorigin-widget-location-input"/>
27
+ <input
28
+ type="hidden"
29
+ class="siteorigin-widget-input location-field-data"
30
+ data-api-key="<?php echo esc_attr( $api_key ); ?>"
31
+ value="<?php if ( ! empty( $value ) ) echo esc_attr( json_encode( $value ) ); ?>"
32
+ name="<?php echo esc_attr( $this->element_name ) ?>"
33
+ id="<?php echo esc_attr( $this->element_id ) ?>"
34
+ />
35
  <?php
36
  }
37
 
48
  array(),
49
  SOW_BUNDLE_VERSION
50
  );
51
+
52
+ wp_localize_script(
53
+ 'so-location-field',
54
+ 'soLocationField',
55
+ array(
56
+ 'missingApiKey' => __( 'This widget requires a Google Maps API key. Please ensure you have set yours in the Google Maps Widget settings.', 'so-widgets-bundle' ),
57
+ 'globalSettingsButtonLabel' => __( 'Go to Google Maps Widget settings', 'so-widgets-bundle' ),
58
+ 'globalSettingsButtonUrl' => admin_url( 'plugins.php?page=so-widgets-plugins' ),
59
+ )
60
+ );
61
  }
62
 
63
  protected function sanitize_field_input( $value, $instance ) {
widgets/google-map/google-map.php CHANGED
@@ -51,23 +51,6 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
51
  '</a>'
52
  ),
53
  ),
54
- 'api_key_section' => array(
55
- 'type' => 'section',
56
- 'label' => __( 'API key', 'so-widgets-bundle' ),
57
- 'hide' => false,
58
- 'fields' => array(
59
- 'api_key' => array(
60
- 'type' => 'text',
61
- 'label' => __( 'API key', 'so-widgets-bundle' ),
62
- 'required' => true,
63
- 'description' => sprintf(
64
- __( 'Enter your %sAPI key%s. Your map may not function correctly without one.', 'so-widgets-bundle' ),
65
- '<a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank" rel="noopener noreferrer">',
66
- '</a>'
67
- )
68
- )
69
- )
70
- ),
71
  'settings' => array(
72
  'type' => 'section',
73
  'label' => __( 'Settings', 'so-widgets-bundle' ),
@@ -99,8 +82,8 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
99
  ),
100
  'height' => array(
101
  'type' => 'text',
 
102
  'default' => 480,
103
- 'label' => __( 'Height', 'so-widgets-bundle' )
104
  ),
105
  'destination_url' => array(
106
  'type' => 'link',
@@ -122,6 +105,7 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
122
  '_else[map_type]' => array('hide'),
123
  ),
124
  ),
 
125
  'zoom' => array(
126
  'type' => 'slider',
127
  'label' => __( 'Zoom level', 'so-widgets-bundle' ),
@@ -132,25 +116,40 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
132
  'integer' => true,
133
 
134
  ),
135
- 'scroll_zoom' => array(
136
- 'type' => 'checkbox',
137
- 'default' => true,
138
- 'state_handler' => array(
139
- 'map_type[interactive]' => array('show'),
140
- '_else[map_type]' => array('hide'),
141
- ),
142
- 'label' => __( 'Scroll to zoom', 'so-widgets-bundle' ),
143
- 'description' => __( 'Allow scrolling over the map to zoom in or out.', 'so-widgets-bundle' )
 
 
 
 
144
  ),
145
- 'draggable' => array(
146
- 'type' => 'checkbox',
147
- 'default' => true,
 
 
148
  'state_handler' => array(
149
  'map_type[interactive]' => array('show'),
150
  '_else[map_type]' => array('hide'),
151
  ),
152
- 'label' => __( 'Draggable', 'so-widgets-bundle' ),
153
- 'description' => __( 'Allow dragging the map to move it around.', 'so-widgets-bundle' )
 
 
 
 
 
 
 
 
 
154
  ),
155
  'disable_default_ui' => array(
156
  'type' => 'checkbox',
@@ -283,7 +282,7 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
283
  'styled_map_name' => array(
284
  'type' => 'text',
285
  'state_handler' => array(
286
- 'style_method[default]' => array('hide'),
287
  '_else[style_method]' => array('show'),
288
  ),
289
  'label' => __( 'Styled map name', 'so-widgets-bundle' )
@@ -450,6 +449,13 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
450
  '<a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank" rel="noopener noreferrer">',
451
  '</a>'
452
  )
 
 
 
 
 
 
 
453
  )
454
  );
455
  }
@@ -479,13 +485,17 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
479
  $instance['settings']['fallback_image_size'],
480
  false );
481
  }
 
 
482
 
483
  if ( $settings['map_type'] == 'static' ) {
 
484
  return array(
485
- 'src_url' => $this->get_static_image_src( $instance, $settings['width'], $settings['height'], ! empty( $styles ) ? $styles['styles'] : array() ),
486
  'destination_url' => $instance['settings']['destination_url'],
487
  'new_window' => $instance['settings']['new_window'],
488
  'fallback_image_data' => array( 'img' => $fallback_image ),
 
489
  );
490
  } else {
491
  $markers = $instance['markers'];
@@ -509,13 +519,14 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
509
  }
510
  }
511
  }
 
512
  $location = $this->get_location_string( $instance['map_center'] );
513
-
514
  $map_data = siteorigin_widgets_underscores_to_camel_case( array(
515
  'address' => $location,
516
  'zoom' => $settings['zoom'],
517
- 'scroll_zoom' => $settings['scroll_zoom'],
518
- 'draggable' => $settings['draggable'],
519
  'disable_ui' => $settings['disable_default_ui'],
520
  'keep_centered' => $settings['keep_centered'],
521
  'marker_icon' => ! empty( $mrkr_src ) ? $mrkr_src[0] : '',
@@ -524,10 +535,11 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
524
  'marker_info_display' => $markers['info_display'],
525
  'marker_info_multiple' => $markers['info_multiple'],
526
  'marker_positions' => ! empty( $markerpos ) ? $markerpos : '',
527
- 'map_name' => ! empty( $styles ) ? $styles['map_name'] : '',
528
- 'map_styles' => ! empty( $styles ) ? $styles['styles'] : '',
529
  'directions' => $directions,
530
- 'api_key' => $instance['api_key_section']['api_key'],
 
531
  ));
532
 
533
  return array(
@@ -590,14 +602,14 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
590
 
591
  private function get_styles( $instance ) {
592
  $style_config = $instance['styles'];
 
 
 
593
  switch ( $style_config['style_method'] ) {
594
  case 'custom':
595
- if ( empty( $style_config['custom_map_styles'] ) ) {
596
- return array();
597
- } else {
598
- $map_name = ! empty( $style_config['styled_map_name'] ) ? $style_config['styled_map_name'] : 'Custom Map';
599
  $map_styles = $style_config['custom_map_styles'];
600
- $styles = array();
601
  foreach ( $map_styles as $style_item ) {
602
  $map_feature = $style_item['map_feature'];
603
  unset( $style_item['map_feature'] );
@@ -613,28 +625,30 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
613
  }
614
  $map_feature = str_replace( '_', '.', $map_feature );
615
  $map_feature = str_replace( '-', '_', $map_feature );
616
- array_push( $styles, array(
617
  'featureType' => $map_feature,
618
  'elementType' => $element_type,
619
  'stylers' => $stylers
620
  ) );
621
  }
622
 
623
- return array( 'map_name' => $map_name, 'styles' => $styles );
624
  }
 
625
  case 'raw_json':
626
- if ( empty( $style_config['raw_json_map_styles'] ) ) {
627
- return array();
628
- } else {
629
- $map_name = ! empty( $style_config['styled_map_name'] ) ? $style_config['styled_map_name'] : __( 'Custom Map', 'so-widgets-bundle' );
630
  $styles_string = $style_config['raw_json_map_styles'];
631
 
632
- return array( 'map_name' => $map_name, 'styles' => json_decode( $styles_string, true ) );
633
  }
 
634
  case 'normal':
635
  default:
636
- return array();
637
  }
 
 
638
  }
639
 
640
  private function get_static_image_src( $instance, $width, $height, $styles ) {
@@ -643,9 +657,11 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
643
  $src_url .= "center=" . $location;
644
  $src_url .= "&zoom=" . $instance['settings']['zoom'];
645
  $src_url .= "&size=" . $width . "x" . $height;
646
-
647
- if ( ! empty( $instance['api_key_section']['api_key'] ) ) {
648
- $src_url .= "&key=" . $instance['api_key_section']['api_key'];
 
 
649
  }
650
 
651
  if ( ! empty( $styles ) ) {
@@ -716,6 +732,33 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
716
  }
717
 
718
  public function modify_instance( $instance ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
719
 
720
  if ( ! empty( $instance['map_center'] ) && empty( $instance['map_center']['name'] ) ) {
721
  $instance['map_center'] = $this->migrate_location( $instance['map_center'] );
@@ -729,14 +772,15 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
729
  }
730
  }
731
 
732
- if ( empty( $instance['api_key_section'] ) ) {
733
- $instance['api_key_section'] = array();
734
- }
735
- if ( empty( $instance['api_key_section']['api_key'] ) ) {
736
  $global_settings = $this->get_global_settings();
737
- if ( ! empty( $global_settings['api_key'] ) ) {
738
- $instance['api_key_section']['api_key'] = $global_settings['api_key'];
 
 
739
  }
 
740
  }
741
  return $instance;
742
  }
@@ -769,6 +813,21 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
769
 
770
  return $location;
771
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
772
  }
773
 
774
  siteorigin_widget_register( 'sow-google-map', __FILE__, 'SiteOrigin_Widget_GoogleMap_Widget' );
51
  '</a>'
52
  ),
53
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  'settings' => array(
55
  'type' => 'section',
56
  'label' => __( 'Settings', 'so-widgets-bundle' ),
82
  ),
83
  'height' => array(
84
  'type' => 'text',
85
+ 'label' => __( 'Height', 'so-widgets-bundle' ),
86
  'default' => 480,
 
87
  ),
88
  'destination_url' => array(
89
  'type' => 'link',
105
  '_else[map_type]' => array('hide'),
106
  ),
107
  ),
108
+
109
  'zoom' => array(
110
  'type' => 'slider',
111
  'label' => __( 'Zoom level', 'so-widgets-bundle' ),
116
  'integer' => true,
117
 
118
  ),
119
+
120
+ 'mobile_zoom' => array(
121
+ 'type' => 'slider',
122
+ 'label' => __( 'Mobile zoom level', 'so-widgets-bundle' ),
123
+ 'description' => __( 'A value from 0 (the world) to 21 (street level). This zoom is specific to mobile devices.', 'so-widgets-bundle' ),
124
+ 'min' => 0,
125
+ 'max' => 21,
126
+ 'default' => 12,
127
+ 'integer' => true,
128
+ 'state_handler' => array(
129
+ 'map_type[interactive]' => array('show'),
130
+ '_else[map_type]' => array('hide'),
131
+ ),
132
  ),
133
+
134
+ 'gesture_handling' => array(
135
+ 'type' => 'radio',
136
+ 'label' => __( 'Gesture Handling', 'so-widgets-bundle' ),
137
+ 'default' => 'greedy',
138
  'state_handler' => array(
139
  'map_type[interactive]' => array('show'),
140
  '_else[map_type]' => array('hide'),
141
  ),
142
+ 'options' => array(
143
+ 'greedy' => __( 'Greedy', 'so-widgets-bundle' ),
144
+ 'cooperative' => __( 'Cooperative', 'so-widgets-bundle' ),
145
+ 'none' => __( 'None', 'so-widgets-bundle' ),
146
+ 'auto' => __( 'Auto', 'so-widgets-bundle' ),
147
+ ),
148
+ 'description' => sprintf(
149
+ __( 'For information on what these settings do, %sclick here%s.', 'so-widgets-bundle' ),
150
+ '<a href="https://developers.google.com/maps/documentation/javascript/interaction#gestureHandling" target="_blank" rel="noopener noreferrer">',
151
+ '</a>'
152
+ ),
153
  ),
154
  'disable_default_ui' => array(
155
  'type' => 'checkbox',
282
  'styled_map_name' => array(
283
  'type' => 'text',
284
  'state_handler' => array(
285
+ 'style_method[normal]' => array('hide'),
286
  '_else[style_method]' => array('show'),
287
  ),
288
  'label' => __( 'Styled map name', 'so-widgets-bundle' )
449
  '<a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank" rel="noopener noreferrer">',
450
  '</a>'
451
  )
452
+ ),
453
+
454
+ 'responsive_breakpoint' => array(
455
+ 'type' => 'number',
456
+ 'label' => __( 'Responsive breakpoint', 'so-widgets-bundle' ),
457
+ 'default' => '780',
458
+ 'description' => __( 'This setting controls when the map will use the mobile zoom. This breakpoint will only be used if a mobile zoom is set in the SiteOrigin Google Maps settings. The default value is 780px', 'so-widgets-bundle' )
459
  )
460
  );
461
  }
485
  $instance['settings']['fallback_image_size'],
486
  false );
487
  }
488
+ $global_settings = $this->get_global_settings();
489
+ $breakpoint = ! empty( $global_settings['responsive_breakpoint'] ) ? $global_settings['responsive_breakpoint'] : '780';
490
 
491
  if ( $settings['map_type'] == 'static' ) {
492
+
493
  return array(
494
+ 'src_url' => $this->get_static_image_src( $instance, $settings['width'], $settings['height'], ! empty( $styles['styles'] ) ? $styles['styles'] : array() ),
495
  'destination_url' => $instance['settings']['destination_url'],
496
  'new_window' => $instance['settings']['new_window'],
497
  'fallback_image_data' => array( 'img' => $fallback_image ),
498
+ 'breakpoint' => $breakpoint,
499
  );
500
  } else {
501
  $markers = $instance['markers'];
519
  }
520
  }
521
  }
522
+
523
  $location = $this->get_location_string( $instance['map_center'] );
524
+
525
  $map_data = siteorigin_widgets_underscores_to_camel_case( array(
526
  'address' => $location,
527
  'zoom' => $settings['zoom'],
528
+ 'mobileZoom' => $settings['mobile_zoom'],
529
+ 'gestureHandling' => isset( $settings['gesture_handling'] ) ? $settings['gesture_handling'] : 'greedy',
530
  'disable_ui' => $settings['disable_default_ui'],
531
  'keep_centered' => $settings['keep_centered'],
532
  'marker_icon' => ! empty( $mrkr_src ) ? $mrkr_src[0] : '',
535
  'marker_info_display' => $markers['info_display'],
536
  'marker_info_multiple' => $markers['info_multiple'],
537
  'marker_positions' => ! empty( $markerpos ) ? $markerpos : '',
538
+ 'map_name' => ! empty( $styles['styles'] ) ? $styles['map_name'] : '',
539
+ 'map_styles' => ! empty( $styles['styles'] ) ? $styles['styles'] : '',
540
  'directions' => $directions,
541
+ 'api_key' => self::get_api_key( $instance ),
542
+ 'breakpoint' => $breakpoint,
543
  ));
544
 
545
  return array(
602
 
603
  private function get_styles( $instance ) {
604
  $style_config = $instance['styles'];
605
+ $styles = array();
606
+ $styles['map_name'] = ! empty( $style_config['styled_map_name'] ) ? $style_config['styled_map_name'] : __( 'Custom Map', 'so-widgets-bundle' );
607
+
608
  switch ( $style_config['style_method'] ) {
609
  case 'custom':
610
+ if ( ! empty( $style_config['custom_map_styles'] ) ) {
 
 
 
611
  $map_styles = $style_config['custom_map_styles'];
612
+ $style_values = array();
613
  foreach ( $map_styles as $style_item ) {
614
  $map_feature = $style_item['map_feature'];
615
  unset( $style_item['map_feature'] );
625
  }
626
  $map_feature = str_replace( '_', '.', $map_feature );
627
  $map_feature = str_replace( '-', '_', $map_feature );
628
+ array_push( $style_values, array(
629
  'featureType' => $map_feature,
630
  'elementType' => $element_type,
631
  'stylers' => $stylers
632
  ) );
633
  }
634
 
635
+ $styles['styles'] = $style_values;
636
  }
637
+ break;
638
  case 'raw_json':
639
+ if ( ! empty( $style_config['raw_json_map_styles'] ) ) {
640
+
 
 
641
  $styles_string = $style_config['raw_json_map_styles'];
642
 
643
+ $styles['styles'] = json_decode( $styles_string, true );
644
  }
645
+ break;
646
  case 'normal':
647
  default:
648
+ break;
649
  }
650
+
651
+ return apply_filters( 'siteorigin_widgets_google_maps_widget_styles', $styles, $instance );
652
  }
653
 
654
  private function get_static_image_src( $instance, $width, $height, $styles ) {
657
  $src_url .= "center=" . $location;
658
  $src_url .= "&zoom=" . $instance['settings']['zoom'];
659
  $src_url .= "&size=" . $width . "x" . $height;
660
+
661
+ $api_key = self::get_api_key( $instance );
662
+
663
+ if ( ! empty( $api_key ) ) {
664
+ $src_url .= "&key=" . $api_key;
665
  }
666
 
667
  if ( ! empty( $styles ) ) {
732
  }
733
 
734
  public function modify_instance( $instance ) {
735
+ if ( ! empty( $instance['settings'] ) ) {
736
+ if ( empty( $instance['settings']['mobile_zoom'] ) ) {
737
+ // Check if a zoom is set, and if it is, set the mobile zoom to that
738
+ if ( empty( $instance['settings']['zoom'] ) ) {
739
+ $instance['settings']['mobile_zoom'] = 12;
740
+ } else {
741
+ $instance['settings']['mobile_zoom'] = $instance['settings']['zoom'];
742
+ }
743
+ }
744
+
745
+ // Migrate draggable and scroll_zoom to gesture_handling
746
+ if ( isset( $instance['settings']['draggable'] ) && ! $instance['settings']['draggable'] ) {
747
+ $instance['settings']['gesture_handling'] = 'none';
748
+ } elseif ( isset( $instance['settings']['scroll_zoom'] ) && ! $instance['settings']['scroll_zoom'] ) {
749
+ $instance['settings']['gesture_handling'] = 'cooperative';
750
+ } else {
751
+ $instance['settings']['gesture_handling'] = 'greedy';
752
+ }
753
+
754
+ // Remove draggable and scroll_zoom settings due to being deprecated
755
+ unset( $instance['settings']['draggable'] );
756
+ unset( $instance['settings']['scroll_zoom'] );
757
+
758
+ if ( empty( $instance['settings']['height'] ) ) {
759
+ $instance['settings']['height'] = 480;
760
+ }
761
+ }
762
 
763
  if ( ! empty( $instance['map_center'] ) && empty( $instance['map_center']['name'] ) ) {
764
  $instance['map_center'] = $this->migrate_location( $instance['map_center'] );
772
  }
773
  }
774
 
775
+ // The API key form field has been removed. Migrate any previously set API keys to the global settings.
776
+ if ( ! empty( $instance['api_key_section'] ) && ! empty( $instance['api_key_section']['api_key'] ) ) {
 
 
777
  $global_settings = $this->get_global_settings();
778
+
779
+ if ( empty( $global_settings['api_key'] ) ) {
780
+ $global_settings['api_key'] = $instance['api_key_section']['api_key'];
781
+ $this->save_global_settings( $global_settings );
782
  }
783
+ unset( $instance['api_key_section'] );
784
  }
785
  return $instance;
786
  }
813
 
814
  return $location;
815
  }
816
+
817
+ static function get_api_key( $instance ) {
818
+ $widget = new self();
819
+ $global_settings = $widget->get_global_settings();
820
+ $api_key = '';
821
+ if ( ! empty( $global_settings['api_key'] ) ) {
822
+ $api_key = $global_settings['api_key'];
823
+ }
824
+
825
+ if ( ! empty( $instance['api_key_section'] ) && ! empty( $instance['api_key_section']['api_key'] ) ) {
826
+ $api_key = $instance['api_key_section']['api_key'];
827
+ }
828
+
829
+ return trim( $api_key );
830
+ }
831
  }
832
 
833
  siteorigin_widget_register( 'sow-google-map', __FILE__, 'SiteOrigin_Widget_GoogleMap_Widget' );
widgets/google-map/js/static-map.js CHANGED
@@ -25,6 +25,25 @@ jQuery( function ( $ ) {
25
 
26
  };
27
  setupStaticMapErrorHandler();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  } );
29
 
30
  window.sowb = sowb;
25
 
26
  };
27
  setupStaticMapErrorHandler();
28
+
29
+ $( window ).on('load resize setup_widgets', function() {
30
+ $( '.sowb-google-map-static' ).each( function () {
31
+ var $this = $( this );
32
+ var src = $this.prop( 'src' );
33
+ var breakpointCheck = window.matchMedia( '(max-width: ' + $this.data( 'breakpoint' ) + 'px)' )
34
+ // Check if the user is viewing the map on mobile
35
+ if ( breakpointCheck.matches ) {
36
+ // Scale the map for mobile
37
+ $this.attr( 'src', src + '&scale=2' );
38
+ } else {
39
+ // Check if the static map enabled for mobile and if it is, restore it back to normal
40
+ if ( src.indexOf( '&scale=2' ) >= 0 ) {
41
+ $this.attr( 'src', src.split('&scale=2')[0] );
42
+ }
43
+ }
44
+
45
+ } );
46
+ } );
47
  } );
48
 
49
  window.sowb = sowb;
widgets/google-map/js/static-map.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery(function(e){e(".sowb-google-map-static").each(function(){var o=e(this),a=function(){if(o.data("fallbackImage")){var a=o.data("fallbackImage");a.hasOwnProperty("img")&&0<a.img.length&&(o.parent().append(a.img),o.remove())}};this.sowbLoadError?a():this.complete||o.error(a)})}),window.sowb=sowb;
1
+ var sowb=window.sowb||{};jQuery(function(o){o(".sowb-google-map-static").each(function(){var t=o(this),a=function(){if(t.data("fallbackImage")){var a=t.data("fallbackImage");a.hasOwnProperty("img")&&0<a.img.length&&(t.parent().append(a.img),t.remove())}};this.sowbLoadError?a():this.complete||t.error(a)}),o(window).on("load resize setup_widgets",function(){o(".sowb-google-map-static").each(function(){var a=o(this),t=a.prop("src");window.matchMedia("(max-width: "+a.data("breakpoint")+"px)").matches?a.attr("src",t+"&scale=2"):0<=t.indexOf("&scale=2")&&a.attr("src",t.split("&scale=2")[0])})})}),window.sowb=sowb;
widgets/google-map/tpl/static-map.php CHANGED
@@ -4,6 +4,7 @@
4
  * @var $new_window
5
  * @var $src_url
6
  * @var $fallback_image_data
 
7
  */
8
  ?>
9
 
@@ -16,6 +17,7 @@
16
  border="0"
17
  src="<?php echo sow_esc_url( $src_url ) ?>"
18
  data-fallback-image="<?php echo esc_attr( json_encode( $fallback_image_data ) ); ?>"
 
19
  onerror="this.sowbLoadError = true;">
20
 
21
  <?php
4
  * @var $new_window
5
  * @var $src_url
6
  * @var $fallback_image_data
7
+ * @var $breakpoint
8
  */
9
  ?>
10
 
17
  border="0"
18
  src="<?php echo sow_esc_url( $src_url ) ?>"
19
  data-fallback-image="<?php echo esc_attr( json_encode( $fallback_image_data ) ); ?>"
20
+ data-breakpoint="<?php echo esc_attr( $breakpoint ); ?>"
21
  onerror="this.sowbLoadError = true;">
22
 
23
  <?php
widgets/hero/hero.php CHANGED
@@ -423,23 +423,12 @@ class SiteOrigin_Widget_Hero_Widget extends SiteOrigin_Widget_Base_Slider {
423
  $global_settings = $this->get_global_settings();
424
 
425
  if ( ! empty( $global_settings['responsive_breakpoint'] ) ) {
426
- $less_vars['responsive_breakpoint'] = $global_settings['responsive_breakpoint'];
427
  }
428
 
429
  return $less;
430
  }
431
 
432
- function get_settings_form() {
433
- return array(
434
- 'responsive_breakpoint' => array(
435
- 'type' => 'measurement',
436
- 'label' => __( 'Responsive Breakpoint', 'so-widgets-bundle' ),
437
- 'default' => '780px',
438
- 'description' => __( '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', 'so-widgets-bundle' )
439
- )
440
- );
441
- }
442
-
443
  function add_default_measurement_unit($val) {
444
  if (!empty($val)) {
445
  if (!preg_match('/\d+([a-zA-Z%]+)/', $val)) {
423
  $global_settings = $this->get_global_settings();
424
 
425
  if ( ! empty( $global_settings['responsive_breakpoint'] ) ) {
426
+ $less['responsive_breakpoint'] = $global_settings['responsive_breakpoint'];
427
  }
428
 
429
  return $less;
430
  }
431
 
 
 
 
 
 
 
 
 
 
 
 
432
  function add_default_measurement_unit($val) {
433
  if (!empty($val)) {
434
  if (!preg_match('/\d+([a-zA-Z%]+)/', $val)) {
widgets/image-grid/image-grid.php CHANGED
@@ -8,8 +8,13 @@ Documentation: https://siteorigin.com/widgets-bundle/image-grid/
8
  */
9
 
10
  class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
 
 
 
 
 
11
 
12
- function __construct(){
13
 
14
  parent::__construct(
15
  'sow-image-grid',
@@ -26,14 +31,7 @@ class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
26
  /**
27
  * Initialize the image grid, mainly to add scripts and styles.
28
  */
29
- function initialize(){
30
- $this->register_frontend_styles( array(
31
- array(
32
- 'sow-image-grid',
33
- plugin_dir_url( __FILE__ ) . 'css/image-grid.css',
34
- )
35
- ) );
36
-
37
  $this->register_frontend_scripts( array(
38
  array(
39
  'sow-image-grid',
@@ -45,13 +43,13 @@ class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
45
  ) );
46
  }
47
 
48
- function get_widget_form(){
49
 
50
  return array(
51
 
52
  'images' => array(
53
  'type' => 'repeater',
54
- 'label' => __('Images', 'so-widgets-bundle'),
55
  'item_name' => __( 'Image', 'so-widgets-bundle' ),
56
  'item_label' => array(
57
  'selector' => "[name*='title']",
@@ -61,15 +59,21 @@ class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
61
  'fields' => array(
62
  'image' => array(
63
  'type' => 'media',
64
- 'label' => __('Image', 'so-widgets-bundle')
 
 
65
  ),
66
  'title' => array(
67
  'type' => 'text',
68
- 'label' => __('Image title', 'so-widgets-bundle')
 
 
 
 
69
  ),
70
  'url' => array(
71
  'type' => 'link',
72
- 'label' => __('URL', 'so-widgets-bundle')
73
  ),
74
  'new_window' => array(
75
  'type' => 'checkbox',
@@ -81,29 +85,29 @@ class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
81
 
82
  'display' => array(
83
  'type' => 'section',
84
- 'label' => __('Display', 'so-widgets-bundle'),
85
  'fields' => array(
86
  'attachment_size' => array(
87
- 'label' => __('Image size', 'so-widgets-bundle'),
88
  'type' => 'image-size',
89
  'default' => 'full',
90
  ),
91
 
92
  'max_height' => array(
93
- 'label' => __('Maximum image height', 'so-widgets-bundle'),
94
- 'type' => 'number',
95
  ),
96
 
97
  'max_width' => array(
98
- 'label' => __('Maximum image width', 'so-widgets-bundle'),
99
- 'type' => 'number',
100
  ),
101
 
102
  'spacing' => array(
103
- 'label' => __('Spacing', 'so-widgets-bundle'),
104
- 'description' => __('Amount of spacing between images.', 'so-widgets-bundle'),
105
- 'type' => 'number',
106
- 'default' => 10,
107
  ),
108
  )
109
  )
@@ -113,23 +117,56 @@ class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
113
  function get_template_variables( $instance, $args ) {
114
  $images = isset( $instance['images'] ) ? $instance['images'] : array();
115
 
116
- foreach ( $images as &$image ) {
 
 
 
 
 
117
  $link_atts = empty( $image['link_attributes'] ) ? array() : $image['link_attributes'];
118
  if ( ! empty( $image['new_window'] ) ) {
119
  $link_atts['target'] = '_blank';
120
  $link_atts['rel'] = 'noopener noreferrer';
121
  }
122
  $image['link_attributes'] = $link_atts;
 
 
 
 
 
 
 
 
 
 
123
  }
124
 
125
  return array(
126
  'images' => $images,
127
  'max_height' => $instance['display']['max_height'],
128
  'max_width' => $instance['display']['max_width'],
129
- 'attachment_size' => $instance['display']['attachment_size'],
130
  );
131
  }
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  /**
134
  * Get the less variables for the image grid
135
  *
@@ -139,15 +176,17 @@ class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
139
  */
140
  function get_less_variables( $instance ) {
141
  $less = array();
142
- if( isset( $instance['display']['spacing'] ) ) {
143
- $less['spacing'] = intval($instance['display']['spacing']) . 'px';
144
  }
145
 
146
  return $less;
147
  }
148
 
149
- function get_form_teaser(){
150
- if( class_exists( 'SiteOrigin_Premium' ) ) return false;
 
 
151
 
152
  return sprintf(
153
  __( 'Add a Lightbox to your images with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
8
  */
9
 
10
  class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
11
+
12
+ /**
13
+ * @var int This is used to indicate that the widget's LESS styles have changed and the CSS needs to be recompiled.
14
+ */
15
+ protected $version = 2;
16
 
17
+ function __construct() {
18
 
19
  parent::__construct(
20
  'sow-image-grid',
31
  /**
32
  * Initialize the image grid, mainly to add scripts and styles.
33
  */
34
+ function initialize() {
 
 
 
 
 
 
 
35
  $this->register_frontend_scripts( array(
36
  array(
37
  'sow-image-grid',
43
  ) );
44
  }
45
 
46
+ function get_widget_form() {
47
 
48
  return array(
49
 
50
  'images' => array(
51
  'type' => 'repeater',
52
+ 'label' => __( 'Images', 'so-widgets-bundle' ),
53
  'item_name' => __( 'Image', 'so-widgets-bundle' ),
54
  'item_label' => array(
55
  'selector' => "[name*='title']",
59
  'fields' => array(
60
  'image' => array(
61
  'type' => 'media',
62
+ 'label' => __( 'Image', 'so-widgets-bundle' ),
63
+ 'library' => 'image',
64
+ 'fallback' => true,
65
  ),
66
  'title' => array(
67
  'type' => 'text',
68
+ 'label' => __( 'Image title', 'so-widgets-bundle' )
69
+ ),
70
+ 'alt' => array(
71
+ 'type' => 'text',
72
+ 'label' => __( 'Alt text', 'so-widgets-bundle' ),
73
  ),
74
  'url' => array(
75
  'type' => 'link',
76
+ 'label' => __( 'URL', 'so-widgets-bundle' )
77
  ),
78
  'new_window' => array(
79
  'type' => 'checkbox',
85
 
86
  'display' => array(
87
  'type' => 'section',
88
+ 'label' => __( 'Display', 'so-widgets-bundle' ),
89
  'fields' => array(
90
  'attachment_size' => array(
91
+ 'label' => __( 'Image size', 'so-widgets-bundle' ),
92
  'type' => 'image-size',
93
  'default' => 'full',
94
  ),
95
 
96
  'max_height' => array(
97
+ 'label' => __( 'Maximum image height', 'so-widgets-bundle' ),
98
+ 'type' => 'measurement',
99
  ),
100
 
101
  'max_width' => array(
102
+ 'label' => __( 'Maximum image width', 'so-widgets-bundle' ),
103
+ 'type' => 'measurement',
104
  ),
105
 
106
  'spacing' => array(
107
+ 'label' => __( 'Spacing', 'so-widgets-bundle' ),
108
+ 'description' => __( 'Amount of spacing between images.', 'so-widgets-bundle' ),
109
+ 'type' => 'measurement',
110
+ 'default' => '10px',
111
  ),
112
  )
113
  )
117
  function get_template_variables( $instance, $args ) {
118
  $images = isset( $instance['images'] ) ? $instance['images'] : array();
119
 
120
+ foreach ( $images as $id => &$image ) {
121
+ if ( empty( $image['image'] ) && empty( $image['image_fallback'] ) ) {
122
+ unset( $images[$id] );
123
+ continue;
124
+ }
125
+
126
  $link_atts = empty( $image['link_attributes'] ) ? array() : $image['link_attributes'];
127
  if ( ! empty( $image['new_window'] ) ) {
128
  $link_atts['target'] = '_blank';
129
  $link_atts['rel'] = 'noopener noreferrer';
130
  }
131
  $image['link_attributes'] = $link_atts;
132
+
133
+ if ( empty( $image['image'] ) && ! empty( $image['image_fallback'] ) ) {
134
+ $alt = ! empty ( $image['alt'] ) ? $image['alt'] .'"' : '';
135
+ $image['image_html'] = '<img src="'. esc_url( $image['image_fallback'] ) .'" alt="'. esc_attr( $alt ) .'" title="'. esc_attr( $image['title'] ) .'">';
136
+ } else {
137
+ $image['image_html'] = wp_get_attachment_image( $image['image'], $instance['display']['attachment_size'], false, array(
138
+ 'title' => $image['title'],
139
+ 'alt' => $image['alt'],
140
+ ) );
141
+ }
142
  }
143
 
144
  return array(
145
  'images' => $images,
146
  'max_height' => $instance['display']['max_height'],
147
  'max_width' => $instance['display']['max_width'],
 
148
  );
149
  }
150
 
151
+ function modify_instance( $instance ) {
152
+ // Account for number to measurement form field type changes
153
+ if ( ! empty( $instance['display'] ) ) {
154
+ if ( is_numeric( $instance['display']['max_height'] ) ) {
155
+ $instance['display']['max_height'] = $instance['display']['max_height'] .'px';
156
+ }
157
+
158
+ if ( is_numeric( $instance['display']['max_width'] ) ) {
159
+ $instance['display']['max_width'] = $instance['display']['max_width'] .'px';
160
+ }
161
+
162
+ if ( is_numeric( $instance['display']['spacing'] ) ) {
163
+ $instance['display']['spacing'] = $instance['display']['spacing'] .'px';
164
+ }
165
+ }
166
+
167
+ return $instance;
168
+ }
169
+
170
  /**
171
  * Get the less variables for the image grid
172
  *
176
  */
177
  function get_less_variables( $instance ) {
178
  $less = array();
179
+ if ( ! empty( $instance['display']['spacing'] ) ) {
180
+ $less['spacing'] = $instance['display']['spacing'];
181
  }
182
 
183
  return $less;
184
  }
185
 
186
+ function get_form_teaser() {
187
+ if ( class_exists( 'SiteOrigin_Premium' ) ) {
188
+ return false;
189
+ }
190
 
191
  return sprintf(
192
  __( 'Add a Lightbox to your images with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
widgets/image-grid/styles/default.less CHANGED
@@ -1,11 +1,18 @@
1
- @spacing: 20px;
2
 
3
  .sow-image-grid-wrapper {
4
  padding-top: @spacing;
5
- margin: 0 -@spacing;
 
6
 
7
  .sow-image-grid-image {
8
  padding: 0 @spacing @spacing @spacing;
9
- }
10
 
11
- }
 
 
 
 
 
 
1
+ @spacing: default;
2
 
3
  .sow-image-grid-wrapper {
4
  padding-top: @spacing;
5
+ line-height: 0;
6
+ text-align:center;
7
 
8
  .sow-image-grid-image {
9
  padding: 0 @spacing @spacing @spacing;
10
+ display: inline-block;
11
 
12
+ img {
13
+ display:none;
14
+ max-width:100%;
15
+ height:auto;
16
+ }
17
+ }
18
+ }
widgets/image-grid/tpl/default.php CHANGED
@@ -3,7 +3,6 @@
3
  * @var $images array
4
  * @var $max_height int
5
  * @var $max_width int
6
- * @var $attachment_size string
7
  */
8
  ?>
9
  <?php if( ! empty( $images ) ) : ?>
@@ -20,9 +19,7 @@
20
  <?php endif; ?>
21
  <?php endforeach; ?>>
22
  <?php endif; ?>
23
- <?php echo wp_get_attachment_image( $image['image'], $attachment_size, false, array(
24
- 'title' => $image['title']
25
- ) );?>
26
  <?php if ( ! empty( $image['url'] ) ) : ?>
27
  </a>
28
  <?php endif; ?>
3
  * @var $images array
4
  * @var $max_height int
5
  * @var $max_width int
 
6
  */
7
  ?>
8
  <?php if( ! empty( $images ) ) : ?>
19
  <?php endif; ?>
20
  <?php endforeach; ?>>
21
  <?php endif; ?>
22
+ <?php echo $image['image_html']; ?>
 
 
23
  <?php if ( ! empty( $image['url'] ) ) : ?>
24
  </a>
25
  <?php endif; ?>
widgets/layout-slider/layout-slider.php CHANGED
@@ -316,17 +316,6 @@ class SiteOrigin_Widget_LayoutSlider_Widget extends SiteOrigin_Widget_Base_Slide
316
  return $less;
317
  }
318
 
319
- function get_settings_form() {
320
- return array(
321
- 'responsive_breakpoint' => array(
322
- 'type' => 'measurement',
323
- 'label' => __( 'Responsive Breakpoint', 'so-widgets-bundle' ),
324
- 'default' => '780px',
325
- 'description' => __( "This setting controls when the Layout Slider widget will switch to the responsive height for slides. This breakpoint will only be used if a responsive height is set in the Layout Slider's settings. The default value is 780px.", 'so-widgets-bundle' )
326
- )
327
- );
328
- }
329
-
330
  function add_default_measurement_unit($val) {
331
  if (!empty($val)) {
332
  if (!preg_match('/\d+([a-zA-Z%]+)/', $val)) {
316
  return $less;
317
  }
318
 
 
 
 
 
 
 
 
 
 
 
 
319
  function add_default_measurement_unit($val) {
320
  if (!empty($val)) {
321
  if (!preg_match('/\d+([a-zA-Z%]+)/', $val)) {
widgets/post-carousel/tpl/base.php CHANGED
@@ -13,15 +13,16 @@
13
  <div class="sow-carousel-title">
14
  <?php if( ! empty( $title ) ) echo $args['before_title'] . esc_html( $title ) . $args['after_title'] ?>
15
 
16
- <a href="#" class="sow-carousel-next" title="<?php esc_attr_e('Next', 'so-widgets-bundle') ?>"></a>
17
- <a href="#" class="sow-carousel-previous" title="<?php esc_attr_e('Previous', 'so-widgets-bundle') ?>"></a>
 
18
  </div>
19
 
20
  <div class="sow-carousel-container<?php if( is_rtl() ) echo ' js-rtl' ?>">
21
 
22
- <a href="#" class="sow-carousel-previous" title="<?php esc_attr_e('Previous', 'so-widgets-bundle') ?>"></a>
23
 
24
- <a href="#" class="sow-carousel-next" title="<?php esc_attr_e('Next', 'so-widgets-bundle') ?>"></a>
25
 
26
  <div class="sow-carousel-wrapper"
27
  data-found-posts="<?php echo esc_attr($posts->found_posts) ?>"
13
  <div class="sow-carousel-title">
14
  <?php if( ! empty( $title ) ) echo $args['before_title'] . esc_html( $title ) . $args['after_title'] ?>
15
 
16
+ <a href="#" class="sow-carousel-next" title="<?php esc_attr_e('Next', 'so-widgets-bundle') ?>" aria-label="<?php esc_attr_e( 'Next Posts', 'so-widgets-bundle') ?>" role="button"></a>
17
+ <a href="#" class="sow-carousel-previous" title="<?php esc_attr_e('Previous', 'so-widgets-bundle') ?>" aria-label="<?php esc_attr_e( 'Previous Posts', 'so-widgets-bundle') ?>" role="button"></a>
18
+
19
  </div>
20
 
21
  <div class="sow-carousel-container<?php if( is_rtl() ) echo ' js-rtl' ?>">
22
 
23
+ <a href="#" class="sow-carousel-previous" title="<?php esc_attr_e('Previous', 'so-widgets-bundle') ?>" aria-label="<?php esc_attr_e( 'Previous Posts', 'so-widgets-bundle') ?>" role="button"></a>
24
 
25
+ <a href="#" class="sow-carousel-next" title="<?php esc_attr_e('Next', 'so-widgets-bundle') ?>" aria-label="<?php esc_attr_e( 'Next Posts', 'so-widgets-bundle') ?>" role="button"></a>
26
 
27
  <div class="sow-carousel-wrapper"
28
  data-found-posts="<?php echo esc_attr($posts->found_posts) ?>"
widgets/post-carousel/tpl/carousel-post-loop.php CHANGED
@@ -7,15 +7,15 @@ while($posts->have_posts()) : $posts->the_post(); ?>
7
  <li class="sow-carousel-item<?php if( is_rtl() ) echo ' rtl' ?>">
8
  <div class="sow-carousel-thumbnail">
9
  <?php if( has_post_thumbnail() ) : $img = wp_get_attachment_image_src(get_post_thumbnail_id(), $instance['image_size']); ?>
10
- <a href="<?php the_permalink() ?>" style="background-image: url(<?php echo sow_esc_url($img[0]) ?>)">
11
  <span class="overlay"></span>
12
  </a>
13
  <?php else : ?>
14
  <a href="<?php the_permalink() ?>" class="sow-carousel-default-thumbnail"
15
  <?php echo ! empty( $default_thumbnail ) ?
16
- 'style="background-image: url('. sow_esc_url( $default_thumbnail ) .')"' : '' ?>><span class="overlay"></span></a>
17
  <?php endif; ?>
18
  </div>
19
- <h3><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h3>
20
  </li>
21
- <?php endwhile; wp_reset_postdata(); ?>
7
  <li class="sow-carousel-item<?php if( is_rtl() ) echo ' rtl' ?>">
8
  <div class="sow-carousel-thumbnail">
9
  <?php if( has_post_thumbnail() ) : $img = wp_get_attachment_image_src(get_post_thumbnail_id(), $instance['image_size']); ?>
10
+ <a href="<?php the_permalink() ?>" style="background-image: url(<?php echo sow_esc_url($img[0]) ?>)" aria-labelledby="sow-carousel-id-<?php echo the_ID(); ?>">
11
  <span class="overlay"></span>
12
  </a>
13
  <?php else : ?>
14
  <a href="<?php the_permalink() ?>" class="sow-carousel-default-thumbnail"
15
  <?php echo ! empty( $default_thumbnail ) ?
16
+ 'style="background-image: url('. sow_esc_url( $default_thumbnail ) .')"' : '' ?> aria-labelledby="sow-carousel-id-<?php echo the_ID(); ?>"><span class="overlay"></span></a>
17
  <?php endif; ?>
18
  </div>
19
+ <h3><a href="<?php the_permalink() ?>" id="sow-carousel-id-<?php echo the_ID(); ?>"><?php the_title() ?></a></h3>
20
  </li>
21
+ <?php endwhile; wp_reset_postdata(); ?>
widgets/social-media-buttons/social-media-buttons.php CHANGED
@@ -306,6 +306,16 @@ class SiteOrigin_Widget_SocialMediaButtons_Widget extends SiteOrigin_Widget {
306
  'networks' => $networks
307
  );
308
  }
 
 
 
 
 
 
 
 
 
 
309
  }
310
 
311
  siteorigin_widget_register( 'sow-social-media-buttons', __FILE__, 'SiteOrigin_Widget_SocialMediaButtons_Widget' );
306
  'networks' => $networks
307
  );
308
  }
309
+
310
+ function get_form_teaser(){
311
+ if( class_exists( 'SiteOrigin_Premium' ) ) return false;
312
+
313
+ return sprintf(
314
+ __( 'Add custom social networks with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
315
+ '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/social-widgets" target="_blank" rel="noopener noreferrer">',
316
+ '</a>'
317
+ );
318
+ }
319
  }
320
 
321
  siteorigin_widget_register( 'sow-social-media-buttons', __FILE__, 'SiteOrigin_Widget_SocialMediaButtons_Widget' );
widgets/social-media-buttons/tpl/default.php CHANGED
@@ -29,7 +29,7 @@
29
  'title' => $title,
30
  'aria-label' => $title,
31
  );
32
- if( !empty( $instance['design']['new_window'] ) ) {
33
  $button_attributes['target'] = '_blank';
34
  $button_attributes['rel'] = 'noopener noreferrer';
35
  }
29
  'title' => $title,
30
  'aria-label' => $title,
31
  );
32
+ if ( !empty( $instance['design']['new_window'] ) && $network['name'] != 'phone' ) {
33
  $button_attributes['target'] = '_blank';
34
  $button_attributes['rel'] = 'noopener noreferrer';
35
  }