SiteOrigin Widgets Bundle - Version 1.11.0

Version Description

  • 7 November 2017 =
  • New Tabs widget!
  • Contact: mention it's possible to send to multiple emails.
  • Features: Fixes margin causing extended page.
  • Presets field.
  • Accordion: Add Repeater Label Title.
  • Hero: ability to select an image size.
  • TinyMCE field: Remember last selected editor.
  • Add rel="noopener noreferrer" for all 3rd party/unknown links.
  • Social Media Buttons Widget: comply WCAG 2.4.4
Download this release

Release Info

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

Code changes from version 1.10.2 to 1.11.0

Files changed (46) hide show
  1. admin/tpl/admin.php +2 -2
  2. base/inc/fields/builder.class.php +1 -1
  3. base/inc/fields/js/presets-field.js +66 -0
  4. base/inc/fields/js/presets-field.min.js +1 -0
  5. base/inc/fields/js/tinymce-field.js +3 -4
  6. base/inc/fields/js/tinymce-field.min.js +1 -1
  7. base/inc/fields/media.class.php +1 -1
  8. base/inc/fields/posts.class.php +1 -1
  9. base/inc/fields/presets.class.php +61 -0
  10. base/js/admin.js +23 -7
  11. base/js/admin.min.js +1 -1
  12. base/siteorigin-widget.class.php +2 -2
  13. base/tpl/posts-selector/post.html +1 -1
  14. js/slider/jquery.slider.js +9 -8
  15. js/slider/jquery.slider.min.js +1 -1
  16. lang/so-widgets-bundle.pot +95 -55
  17. readme.txt +14 -3
  18. so-widgets-bundle.php +3 -3
  19. widgets/accordion/accordion.php +14 -2
  20. widgets/accordion/js/accordion.js +59 -9
  21. widgets/accordion/js/accordion.min.js +1 -1
  22. widgets/accordion/styles/default.less +6 -0
  23. widgets/accordion/tpl/default.php +2 -1
  24. widgets/button/button.php +6 -1
  25. widgets/contact/contact.php +2 -2
  26. widgets/features/styles/default.less +1 -0
  27. widgets/features/tpl/default.php +3 -3
  28. widgets/google-map/google-map.php +5 -5
  29. widgets/google-map/tpl/static-map.php +1 -1
  30. widgets/headline/tpl/default.php +2 -2
  31. widgets/hero/hero.php +6 -1
  32. widgets/icon/tpl/default.php +1 -1
  33. widgets/image-grid/image-grid.php +2 -1
  34. widgets/image/image.php +2 -1
  35. widgets/layout-slider/layout-slider.php +1 -1
  36. widgets/price-table/tpl/atom.php +1 -1
  37. widgets/simple-masonry/simple-masonry.php +2 -1
  38. widgets/slider/slider.php +2 -1
  39. widgets/social-media-buttons/tpl/default.php +7 -2
  40. widgets/tabs/js/tabs.js +63 -0
  41. widgets/tabs/js/tabs.min.js +1 -0
  42. widgets/tabs/styles/default.less +122 -0
  43. widgets/tabs/tabs.php +247 -0
  44. widgets/tabs/tpl/default.php +34 -0
  45. widgets/taxonomy/tpl/default.php +1 -1
  46. widgets/testimonial/tpl/default.php +3 -3
admin/tpl/admin.php CHANGED
@@ -58,7 +58,7 @@
58
  By
59
  <strong>
60
  <?php
61
- if( !empty($widget['AuthorURI']) ) echo '<a href="' . esc_url( $widget['AuthorURI'] ) . '" target="_blank">';
62
  echo esc_html( $widget['Author'] );
63
  if( !empty($widget['AuthorURI']) ) echo '</a>';
64
  ?>
@@ -102,7 +102,7 @@
102
 
103
  <div class="developers-link">
104
  <?php _e('Developers - create your own widgets for the Widgets Bundle.', 'so-widgets-bundle') ?>
105
- <a href="https://siteorigin.com/docs/widgets-bundle/" target="_blank"><?php _e('Read More', 'so-widgets-bundle') ?></a>.
106
  </div>
107
 
108
  <div id="sow-settings-dialog">
58
  By
59
  <strong>
60
  <?php
61
+ if( !empty($widget['AuthorURI']) ) echo '<a href="' . esc_url( $widget['AuthorURI'] ) . '" target="_blank" rel="noopener noreferrer">';
62
  echo esc_html( $widget['Author'] );
63
  if( !empty($widget['AuthorURI']) ) echo '</a>';
64
  ?>
102
 
103
  <div class="developers-link">
104
  <?php _e('Developers - create your own widgets for the Widgets Bundle.', 'so-widgets-bundle') ?>
105
+ <a href="https://siteorigin.com/docs/widgets-bundle/" target="_blank" rel="noopener noreferrer"><?php _e('Read More', 'so-widgets-bundle') ?></a>.
106
  </div>
107
 
108
  <div id="sow-settings-dialog">
base/inc/fields/builder.class.php CHANGED
@@ -34,7 +34,7 @@ class SiteOrigin_Widget_Field_Builder extends SiteOrigin_Widget_Field_Base {
34
  ?>
35
  <p>
36
  <?php _e( 'This field requires: ', 'so-widgets-bundle' ) ?>
37
- <a href="https://siteorigin.com/page-builder/" target="_blank"><?php _e( 'SiteOrigin Page Builder', 'so-widgets-bundle' ) ?></a>
38
  </p>
39
  <?php
40
  }
34
  ?>
35
  <p>
36
  <?php _e( 'This field requires: ', 'so-widgets-bundle' ) ?>
37
+ <a href="https://siteorigin.com/page-builder/" target="_blank" rel="noopener noreferrer"><?php _e( 'SiteOrigin Page Builder', 'so-widgets-bundle' ) ?></a>
38
  </p>
39
  <?php
40
  }
base/inc/fields/js/presets-field.js ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global jQuery, sowbForms */
2
+
3
+ (function ( $ ) {
4
+ $( document ).on( 'sowsetupformfield', '.siteorigin-widget-field-type-presets', function ( e ) {
5
+
6
+ var $presetSelect = $( this ).find( 'select[class="siteorigin-widget-input"]' );
7
+ if ( $presetSelect.data( 'initialized' ) ) {
8
+ return;
9
+ }
10
+
11
+ var $undoLink = $presetSelect.find( '+ .sowb-presets-field-undo' );
12
+ $undoLink.hide();
13
+
14
+ var presets = $presetSelect.data( 'presets' );
15
+ $presetSelect.change( function () {
16
+
17
+ var selectedPreset = $presetSelect.val();
18
+ if ( selectedPreset && presets.hasOwnProperty( selectedPreset ) ) {
19
+
20
+ var presetValues = presets[ selectedPreset ].values;
21
+
22
+ var $formContainer = $presetSelect.closest( '.siteorigin-widget-form-main' );
23
+ var previousValues = $presetSelect.data( 'previousValues' );
24
+ if ( ! previousValues ) {
25
+ var presetClone = JSON.parse( JSON.stringify( presetValues ) );
26
+ var widgetData = sowbForms.getWidgetFormValues( $formContainer );
27
+ var recurseDepth = 0;
28
+ var copyValues = function( from, to ) {
29
+ if ( ++recurseDepth > 10 ) {
30
+ return to;
31
+ }
32
+ for ( var key in to ) {
33
+ if ( from.hasOwnProperty( key ) ) {
34
+ var fromItem = from[ key ];
35
+ var toItem = to[ key ];
36
+ if ( fromItem !== null && toItem !== null && typeof fromItem === 'object' ) {
37
+ copyValues( fromItem, toItem );
38
+ } else {
39
+ to[ key ] = fromItem;
40
+ }
41
+ }
42
+ }
43
+ return to;
44
+ };
45
+ // Copy existing widget values for preset properties to allow for undo.
46
+ previousValues = copyValues( widgetData, presetClone );
47
+ $presetSelect.data( 'previousValues', previousValues );
48
+ }
49
+ if ( $undoLink.not( ':visible' ) ) {
50
+ $undoLink.show();
51
+ $undoLink.click( function ( event ) {
52
+ event.preventDefault();
53
+ $undoLink.hide();
54
+ sowbForms.setWidgetFormValues( $formContainer, previousValues, true );
55
+ $presetSelect.removeData( 'previousValues' );
56
+ $presetSelect.val( '' );
57
+ } );
58
+ }
59
+
60
+ sowbForms.setWidgetFormValues( $formContainer, presetValues, true );
61
+ }
62
+ } );
63
+
64
+ $presetSelect.data( 'initialized', true );
65
+ } );
66
+ })( jQuery );
base/inc/fields/js/presets-field.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){e(document).on("sowsetupformfield",".siteorigin-widget-field-type-presets",function(i){var t=e(this).find('select[class="siteorigin-widget-input"]');if(!t.data("initialized")){var s=t.find("+ .sowb-presets-field-undo");s.hide();var r=t.data("presets");t.change(function(){var e=t.val();if(e&&r.hasOwnProperty(e)){var i=r[e].values,a=t.closest(".siteorigin-widget-form-main"),o=t.data("previousValues");if(!o){var n=JSON.parse(JSON.stringify(i)),u=sowbForms.getWidgetFormValues(a),l=0,d=function(e,i){if(++l>10)return i;for(var t in i)if(e.hasOwnProperty(t)){var s=e[t],r=i[t];null!==s&&null!==r&&"object"==typeof s?d(s,r):i[t]=s}return i};o=d(u,n),t.data("previousValues",o)}s.not(":visible")&&(s.show(),s.click(function(e){e.preventDefault(),s.hide(),sowbForms.setWidgetFormValues(a,o,!0),t.removeData("previousValues"),t.val("")})),sowbForms.setWidgetFormValues(a,i,!0)}}),t.data("initialized",!0)}})}(jQuery);
base/inc/fields/js/tinymce-field.js CHANGED
@@ -52,11 +52,11 @@
52
 
53
  $field.on( 'click', function ( event ) {
54
  var $target = $( event.target );
55
- var mode = $target.hasClass( 'wp-switch-editor' ) ? 'tmce' : 'html';
56
  if ( mode === 'tmce' ) {
57
  var editor = window.tinymce.get( id );
58
  // Quick bit of sanitization to prevent catastrophic backtracking in TinyMCE HTML parser regex
59
- if ( $target.hasClass( 'switch-tmce' ) && editor !== null ) {
60
  var content = $textarea.val();
61
  if ( content.search( '<' ) !== -1 && content.search( '>' ) === -1) {
62
  content = content.replace( /</g, '' );
@@ -64,9 +64,8 @@
64
  }
65
  editor.setContent(window.switchEditors.wpautop(content));
66
  }
67
-
68
- $field.find( '.siteorigin-widget-tinymce-selected-editor' ).val( mode );
69
  }
 
70
  } );
71
 
72
  $field.data( 'initialized', true );
52
 
53
  $field.on( 'click', function ( event ) {
54
  var $target = $( event.target );
55
+ var mode = $target.hasClass( 'switch-tmce' ) ? 'tmce' : 'html';
56
  if ( mode === 'tmce' ) {
57
  var editor = window.tinymce.get( id );
58
  // Quick bit of sanitization to prevent catastrophic backtracking in TinyMCE HTML parser regex
59
+ if ( $target.hasClass( 'wp-switch-editor' ) && editor !== null ) {
60
  var content = $textarea.val();
61
  if ( content.search( '<' ) !== -1 && content.search( '>' ) === -1) {
62
  content = content.replace( /</g, '' );
64
  }
65
  editor.setContent(window.switchEditors.wpautop(content));
66
  }
 
 
67
  }
68
+ $field.find( '.siteorigin-widget-tinymce-selected-editor' ).val( mode );
69
  } );
70
 
71
  $field.data( 'initialized', true );
base/inc/fields/js/tinymce-field.min.js CHANGED
@@ -1 +1 @@
1
- !function(i){var e=function(e){if(!e.data("initialized")){var t=e.find(".siteorigin-widget-tinymce-container"),n=t.data("editorSettings"),o=t.find("textarea"),r=o.attr("id"),s=function(i){i.on("change",function(){window.tinymce.get(r).save(),o.trigger("change")})};if(n.tinymce=i.extend({},n.tinymce,{selector:"#"+r,setup:s}),i(document).one("wp-before-tinymce-init",function(i,o){if(o.selector===n.tinymce.selector){var r=t.data("mediaButtons");e.find(".wp-editor-tabs").before(r.html)}}),i(document).one("tinymce-editor-setup",function(){e.find(".wp-editor-wrap").hasClass(n.selectedEditor+"-active")||setTimeout(function(){window.switchEditors.go(r)},10)}),wp.editor.remove(r),o.is(":visible"))wp.editor.initialize(r,n);else var d=setInterval(function(){o.is(":visible")&&(wp.editor.initialize(r,n),clearInterval(d))},500);e.on("click",function(t){var n=i(t.target),s=n.hasClass("wp-switch-editor")?"tmce":"html";if("tmce"===s){var d=window.tinymce.get(r);if(n.hasClass("switch-tmce")&&null!==d){var a=o.val();-1!==a.search("<")&&-1===a.search(">")&&(a=a.replace(/</g,""),o.val(a)),d.setContent(window.switchEditors.wpautop(a))}e.find(".siteorigin-widget-tinymce-selected-editor").val(s)}}),e.data("initialized",!0)}};i(document).on("sowsetupformfield",".siteorigin-widget-field-type-tinymce",function(){var t=i(this),n=t.closest(".siteorigin-widget-field-repeater-item-form");n.length>0?n.is(":visible")?e(t):n.on("slideToggleOpenComplete",function(){n.is(":visible")&&(e(t),n.off("slideToggleOpenComplete"))}):e(t)}),i(document).on("sortstop",function(t,n){var o;o=n.item.is(".siteorigin-widget-field-repeater-item")?n.item.find("> .siteorigin-widget-field-repeater-item-form"):n.item.find(".siteorigin-widget-form"),o.find(".siteorigin-widget-field-type-tinymce").each(function(){i(this).data("initialized",null),e(i(this))})})}(jQuery);
1
+ !function(i){var e=function(e){if(!e.data("initialized")){var t=e.find(".siteorigin-widget-tinymce-container"),n=t.data("editorSettings"),o=t.find("textarea"),r=o.attr("id"),s=function(i){i.on("change",function(){window.tinymce.get(r).save(),o.trigger("change")})};if(n.tinymce=i.extend({},n.tinymce,{selector:"#"+r,setup:s}),i(document).one("wp-before-tinymce-init",function(i,o){if(o.selector===n.tinymce.selector){var r=t.data("mediaButtons");e.find(".wp-editor-tabs").before(r.html)}}),i(document).one("tinymce-editor-setup",function(){e.find(".wp-editor-wrap").hasClass(n.selectedEditor+"-active")||setTimeout(function(){window.switchEditors.go(r)},10)}),wp.editor.remove(r),o.is(":visible"))wp.editor.initialize(r,n);else var d=setInterval(function(){o.is(":visible")&&(wp.editor.initialize(r,n),clearInterval(d))},500);e.on("click",function(t){var n=i(t.target),s=n.hasClass("switch-tmce")?"tmce":"html";if("tmce"===s){var d=window.tinymce.get(r);if(n.hasClass("wp-switch-editor")&&null!==d){var a=o.val();-1!==a.search("<")&&-1===a.search(">")&&(a=a.replace(/</g,""),o.val(a)),d.setContent(window.switchEditors.wpautop(a))}}e.find(".siteorigin-widget-tinymce-selected-editor").val(s)}),e.data("initialized",!0)}};i(document).on("sowsetupformfield",".siteorigin-widget-field-type-tinymce",function(){var t=i(this),n=t.closest(".siteorigin-widget-field-repeater-item-form");n.length>0?n.is(":visible")?e(t):n.on("slideToggleOpenComplete",function(){n.is(":visible")&&(e(t),n.off("slideToggleOpenComplete"))}):e(t)}),i(document).on("sortstop",function(t,n){var o;o=n.item.is(".siteorigin-widget-field-repeater-item")?n.item.find("> .siteorigin-widget-field-repeater-item-form"):n.item.find(".siteorigin-widget-form"),o.find(".siteorigin-widget-field-type-tinymce").each(function(){i(this).data("initialized",null),e(i(this))})})}(jQuery);
base/inc/fields/media.class.php CHANGED
@@ -192,7 +192,7 @@ class SiteOrigin_Widget_Field_Media extends SiteOrigin_Widget_Field_Base {
192
  <?php
193
  printf(
194
  __( 'Powered by %s', 'so-widgets-bundle' ),
195
- '<a href="https://pixabay.com/" target="_blank">Pixabay</a>'
196
  );
197
  ?>
198
  </div>
192
  <?php
193
  printf(
194
  __( 'Powered by %s', 'so-widgets-bundle' ),
195
+ '<a href="https://pixabay.com/" target="_blank" rel="noopener noreferrer">Pixabay</a>'
196
  );
197
  ?>
198
  </div>
base/inc/fields/posts.class.php CHANGED
@@ -122,7 +122,7 @@ class SiteOrigin_Widget_Field_Posts extends SiteOrigin_Widget_Field_Container_Ba
122
  'additional' => array(
123
  'type' => 'text',
124
  'label' => __( 'Additional', 'so-widgets-bundle' ),
125
- 'description' => __( 'Additional query arguments. See <a href="http://codex.wordpress.org/Function_Reference/query_posts" target="_blank">query_posts</a>.', 'so-widgets-bundle' ),
126
  ),
127
  );
128
  }
122
  'additional' => array(
123
  'type' => 'text',
124
  'label' => __( 'Additional', 'so-widgets-bundle' ),
125
+ 'description' => __( 'Additional query arguments. See <a href="http://codex.wordpress.org/Function_Reference/query_posts" target="_blank" rel="noopener noreferrer">query_posts</a>.', 'so-widgets-bundle' ),
126
  ),
127
  );
128
  }
base/inc/fields/presets.class.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class SiteOrigin_Widget_Field_Presets
5
+ */
6
+
7
+ class SiteOrigin_Widget_Field_Presets extends SiteOrigin_Widget_Field_Base {
8
+ /**
9
+ * The list of options which may be selected.
10
+ *
11
+ * @access protected
12
+ * @var array
13
+ */
14
+ protected $options;
15
+
16
+ protected function get_default_options() {
17
+ return array(
18
+ 'description' => __( 'Warning! This will override some or all of the current form values.', 'so-widgets-bundle' ),
19
+ );
20
+ }
21
+
22
+
23
+ protected function render_field( $value, $instance ) {
24
+
25
+ $preset_options = array();
26
+ foreach ( $this->options as $name => $preset ) {
27
+ $preset_options[ $name ] = $preset['label'];
28
+ }
29
+
30
+ ?>
31
+ <select id="<?php echo esc_attr( $this->element_id ) ?>"
32
+ class="siteorigin-widget-input"
33
+ data-presets="<?php echo esc_attr( json_encode( $this->options ) ) ?>">
34
+ <option value="default"></option>
35
+ <?php if( ! empty( $preset_options ) ) : ?>
36
+ <?php foreach( $preset_options as $key => $val ) : ?>
37
+ <?php
38
+ if( is_array( $value ) ) {
39
+ $selected = selected( true, in_array( $key, $value ), false );
40
+ }
41
+ else {
42
+ $selected = selected( $key, $value, false );
43
+ } ?>
44
+ <option value="<?php echo esc_attr( $key ) ?>" <?php echo $selected ?>><?php echo esc_html( $val ) ?></option>
45
+ <?php endforeach; ?>
46
+ <?php endif; ?>
47
+ </select>
48
+ <a href="#" class="sowb-presets-field-undo"><?php _e( 'Undo', 'so-widgets-bundle' ) ?></a>
49
+ <?php
50
+ }
51
+
52
+ public function enqueue_scripts() {
53
+ wp_enqueue_script( 'so-presets-field',
54
+ plugin_dir_url( __FILE__ ) . 'js/presets-field' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'jquery' ),
55
+ SOW_BUNDLE_VERSION );
56
+ }
57
+
58
+ protected function sanitize_field_input( $value, $instance ) {
59
+ return $value;
60
+ }
61
+ }
base/js/admin.js CHANGED
@@ -1027,9 +1027,18 @@ var sowbForms = window.sowbForms || {};
1027
  });
1028
  return data;
1029
  };
1030
-
1031
- sowbForms.setWidgetFormValues = function (formContainer, data) {
1032
-
 
 
 
 
 
 
 
 
 
1033
  // First check if this form has any repeaters.
1034
  var depth = 0;
1035
  var updateRepeaterChildren = function ( formParent, formData ) {
@@ -1041,7 +1050,7 @@ var sowbForms = window.sowbForms || {};
1041
  var $repeater = $( this ).find( '> .siteorigin-widget-field-repeater' );
1042
  var repeaterName = $repeater.data( 'repeaterName' );
1043
  var repeaterData = formData.hasOwnProperty( repeaterName ) ? formData[ repeaterName ] : null;
1044
- if ( ! repeaterData || ! Array.isArray( repeaterData ) || repeaterData.length === 0 ) {
1045
  return;
1046
  }
1047
  // Check that the number of child items matches the number of data items.
@@ -1054,7 +1063,7 @@ var sowbForms = window.sowbForms || {};
1054
  $repeater.find( '> .siteorigin-widget-field-repeater-add' ).click();
1055
  }
1056
 
1057
- } else if ( numItems < numChildren ) {
1058
  // If child items > data items, remove extra child items.
1059
  for ( var j = numItems; j < numChildren; j++) {
1060
  var $child = $( repeaterChildren.eq( j ) );
@@ -1099,7 +1108,14 @@ var sowbForms = window.sowbForms || {};
1099
  var sub = data;
1100
  var value;
1101
  for (var i = 0; i < parts.length; i++) {
1102
-
 
 
 
 
 
 
 
1103
  if (i === parts.length - 1) {
1104
  value = sub[ parts[ i ] ];
1105
  } else {
@@ -1108,7 +1124,7 @@ var sowbForms = window.sowbForms || {};
1108
  }
1109
 
1110
  // This is the end, so we need to set the value on the field here.
1111
- if ( $$.attr( 'type' ) === 'checkbox' ) {
1112
  $$.prop( 'checked', value );
1113
  } else if ( $$.attr( 'type' ) === 'radio' ) {
1114
  $$.prop( 'checked', value === $$.val() );
1027
  });
1028
  return data;
1029
  };
1030
+
1031
+
1032
+ /**
1033
+ * Sets all the widget form fields in the given container with the given data values.
1034
+ *
1035
+ * @param formContainer The jQuery element containing the widget form fields.
1036
+ * @param data The data from which to set the widget form field values.
1037
+ * @param skipMissingValues If `true`, this will skip form fields for which the data values are missing.
1038
+ * If `false`, the form fields will be cleared. Default is `false`.
1039
+ */
1040
+ sowbForms.setWidgetFormValues = function (formContainer, data, skipMissingValues) {
1041
+ skipMissingValues = skipMissingValues || false;
1042
  // First check if this form has any repeaters.
1043
  var depth = 0;
1044
  var updateRepeaterChildren = function ( formParent, formData ) {
1050
  var $repeater = $( this ).find( '> .siteorigin-widget-field-repeater' );
1051
  var repeaterName = $repeater.data( 'repeaterName' );
1052
  var repeaterData = formData.hasOwnProperty( repeaterName ) ? formData[ repeaterName ] : null;
1053
+ if ( ! repeaterData || ! Array.isArray( repeaterData ) ) {
1054
  return;
1055
  }
1056
  // Check that the number of child items matches the number of data items.
1063
  $repeater.find( '> .siteorigin-widget-field-repeater-add' ).click();
1064
  }
1065
 
1066
+ } else if ( ! skipMissingValues && numItems < numChildren ) {
1067
  // If child items > data items, remove extra child items.
1068
  for ( var j = numItems; j < numChildren; j++) {
1069
  var $child = $( repeaterChildren.eq( j ) );
1108
  var sub = data;
1109
  var value;
1110
  for (var i = 0; i < parts.length; i++) {
1111
+ // If the field is missing from the data, just leave `value` as `undefined`.
1112
+ if ( ! sub.hasOwnProperty( parts[ i ] ) ) {
1113
+ if ( skipMissingValues ) {
1114
+ return true;
1115
+ } else {
1116
+ break;
1117
+ }
1118
+ }
1119
  if (i === parts.length - 1) {
1120
  value = sub[ parts[ i ] ];
1121
  } else {
1124
  }
1125
 
1126
  // This is the end, so we need to set the value on the field here.
1127
+ if ( $$.attr( 'type' ) === 'checkbox' ) {
1128
  $$.prop( 'checked', value );
1129
  } else if ( $$.attr( 'type' ) === 'radio' ) {
1130
  $$.prop( 'checked', value === $$.val() );
base/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- var sowbForms=window.sowbForms||{};!function(e){e.fn.sowSetupForm=function(){return e(this).each(function(i,t){var r,n=e(t),a=!0,s=e("body"),o=n.find("input[name]");if(o.length&&-1!==o.attr("name").indexOf("__i__"))return this;if(n.is(".siteorigin-widget-form-main")){if(!0===n.data("sow-form-setup"))return!0;if(s.hasClass("widgets-php")&&!n.is(":visible")&&0===n.closest(".panel-dialog").length)return!0;n.on("sowstatechange",function(i,t,r){n.find("[data-state-handler]").each(function(){var i=e(this),n=e.extend({},i.data("state-handler"),a?i.data("state-handler-initial"):{});if(0===Object.keys(n).length)return!0;var s,o,d,l,g,f,c={},p=sowbForms.getContainerFieldId(i,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==p){var u={};for(var m in n)u[m.replace("{$repeater}",p)]=n[m];n=u}var w=sowbForms.getContainerFieldId(i,"widget",".siteorigin-widget-widget");if(!1!==w){var v={};for(var h in n){var b=h.match(/_else\[(.*)\]|(.*)\[(.*)\]/),y="";y=b&&b.length&&void 0===b[1]?b[2]+"_"+w+"["+b[3]+"]":"_else["+b[1]+"_"+w+"]",v[y]=n[h]}n=v}for(var k in n)if(g=!1,null!==(s=k.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?$/))){if(o={group:"default",name:"",multi:!1},void 0!==s[2]?(o.group=s[1],o.name=s[3]):o.name=s[0],o.multi=void 0!==s[4],"_else"===o.group)o.group=o.name,o.name="",g=o.group===t&&void 0===c[o.group];else{f=o.name.split(",").map(function(e){return e.trim()});for(var F=0;F<f.length&&!(g=o.group===t&&f[F]===r);F++);}if(g){d=n[k],o.multi||(d=[d]);for(var F=0;F<d.length;F++)l=void 0!==d[F][1]&&Boolean(d[F][1])?i.find(d[F][1]):i,l[d[F][0]].apply(l,void 0!==d[F][2]?d[F][2]:[]);c[o.group]=!0}}})}),n.sowSetupPreview(),r=n;var d=n.find(".siteorigin-widget-teaser");d.find(".dashicons-dismiss").click(function(){var i=e(this);e.get(i.data("dismiss-url")),d.slideUp("normal",function(){d.remove()})});var l=n.find("> .siteorigin-widgets-form-id").val(),g=n.find("> .siteorigin-widgets-form-timestamp"),f=parseInt(g.val()||0),c=JSON.parse(sessionStorage.getItem(l));if(c)if(c._sow_form_timestamp>f){var p=e('<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>");n.prepend(p),p.find(".so-backup-restore").click(function(){sowbForms.setWidgetFormValues(r,c),p.slideUp("fast",function(){p.remove()})}),p.find(".so-backup-dismiss").click(function(){p.slideUp("fast",function(){sessionStorage.removeItem(l),p.remove()})})}else sessionStorage.removeItem(l);n.change(function(){g.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(n);sessionStorage.setItem(l,JSON.stringify(e))})}else r=n.closest(".siteorigin-widget-form-main");r.find("> .siteorigin-widgets-form-id").val();var u=n.find("> .siteorigin-widget-field");u.find("> .siteorigin-widget-section").sowSetupForm();var m=u.find("> .siteorigin-widget-widget");m.find("> .siteorigin-widget-section").sowSetupForm(),m.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),u.find(".siteorigin-widget-input").each(function(i,t){null===e(t).data("original-name")&&e(t).data("original-name",e(t).attr("name"))}),u.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),n.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),u.find("> .siteorigin-widget-input-color").each(function(){var i=e(this),t={change:function(i,t){setTimeout(function(){e(i.target).trigger("change")},100)}};i.data("defaultColor")&&(t.defaultColor=i.data("defaultColor")),i.wpColorPicker(t)});var w=function(){e(this).toggleClass("siteorigin-widget-section-visible"),e(this).parent().find("> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section").slideToggle("fast",function(){if(e(window).resize(),e(this).find("> .siteorigin-widget-field-container-state").val(e(this).is(":visible")?"open":"closed"),e(this).is(":visible")){e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")}})};u.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").click(w),u.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").click(w),u.filter(".siteorigin-widget-field-type-slider").each(function(){var i=e(this),t=i.find('input[type="number"]'),r=i.find(".siteorigin-widget-value-slider");r.slider({max:parseInt(t.attr("max")),min:parseInt(t.attr("min")),value:parseInt(t.val()),slide:function(e,i){t.val(parseInt(i.value)),t.trigger("change")},change:function(e,t){i.find(".siteorigin-widget-slider-value").html(t.value)}}),t.change(function(e,i){i&&i.silent||r.slider("value",parseInt(t.val()))})}),u.filter(".siteorigin-widget-field-type-link").each(function(){var i=e(this),t=null,r=function(){null!==t&&t.abort();var r=i.find(".content-text-search"),n=r.val(),a=r.data("postTypes"),s=i.find("ul.posts").empty().addClass("loading");e.get(soWidgets.ajaxurl,{action:"so_widgets_search_posts",query:n,postTypes:a},function(i){for(var t=0;t<i.length;t++)""===i[t].label&&(i[t].label="&nbsp;"),s.append(e("<li>").addClass("post").html(i[t].label+"<span>("+i[t].type+")</span>").data(i[t]));s.removeClass("loading")})};i.find(".select-content-button, .button-close").click(function(t){t.preventDefault(),e(this).blur();var n=i.find(".existing-content-selector");n.toggle(),n.is(":visible")&&0===n.find("ul.posts li").length&&r()}),i.on("click",".posts li",function(t){t.preventDefault();var r=e(this);i.find("input.siteorigin-widget-input").val("post: "+r.data("value")),i.find(".existing-content-selector").toggle()});var n=null;i.find(".content-text-search").keyup(function(){null!==n&&clearTimeout(n),n=setTimeout(function(){r()},500)})}),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&u.filter(".siteorigin-widget-field-type-builder").each(function(){e(this).find("> .siteorigin-page-builder-field").soPanelsSetupBuilderWidget()});var v=function(){var i=e(this),t=i.closest("[data-state-emitter]").data("state-emitter");if(void 0!==t){var n={default:""};void 0===t.length&&(t=[t]);for(var a=0;a<t.length;a++)n=function(t,r){if(void 0===sowEmitters[t.callback]||"_"===t.callback.substr(0,1))return r;var n=sowbForms.getContainerFieldId(i,"repeater",".siteorigin-widget-field-repeater-item");!1!==n&&(t.args=t.args.map(function(e){return e.replace("{$repeater}",n)}));var a=sowbForms.getContainerFieldId(i,"widget",".siteorigin-widget-widget");!1===a||t.hasOwnProperty("widgetFieldId")||(t.widgetFieldId=a,t.args=t.args.map(function(e){return e+"_"+a}));var s=i.is('[type="checkbox"]')?i.is(":checked"):i.val();return e.extend(r,sowEmitters[t.callback](s,t.args))}(t[a],n);var s=r.data("states");void 0===s&&(s={default:""});for(var o in n)void 0!==s[o]&&n[o]===s[o]||(s[o]=n[o],r.trigger("sowstatechange",[o,n[o]]));r.data("states",s)}};u.filter("[data-state-emitter]").each(function(){e(this).find(".siteorigin-widget-input").on("keyup change",v),e(this).find(".siteorigin-widget-input").each(function(){var i=e(this);i.is(":radio")?i.is(":checked")&&v.call(i[0]):v.call(i[0])})}),n.trigger("sowsetupform",u).data("sow-form-setup",!0),u.trigger("sowsetupformfield"),n.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(s.hasClass("wp-customizer")||s.hasClass("widgets-php"))&&n.closest(".ui-sortable").on("sortstop",function(e,i){i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}),a=!1})},e.fn.sowSetupPreview=function(){var i=e(this);i.siblings(".siteorigin-widget-preview").find("> a").click(function(t){t.preventDefault();var r=sowbForms.getWidgetFormValues(i),n=e(e("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");n.find('input[name="data"]').val(JSON.stringify(r)),n.find('input[name="class"]').val(i.data("class")),n.find("iframe").on("load",function(){e(this).css("visibility","visible")}),n.find("form").submit(),n.find(".close").click(function(){n.remove()})})},e.fn.sowSetupRepeater=function(){return e(this).each(function(i,t){var r=e(t),n=r.find(".siteorigin-widget-field-repeater-items"),a=r.data("repeater-name");n.bind("updateFieldPositions",function(){var i=e(this),t=i.find("> .siteorigin-widget-field-repeater-item");t.each(function(i,t){e(t).find(".siteorigin-widget-input").each(function(t,r){var n=e(r).data("repeater-positions");void 0===n&&(n={}),n[a]=i,e(r).data("repeater-positions",n)})}),i.find(".siteorigin-widget-input").each(function(i,t){var r=e(t).data("repeater-positions"),n=e(t);if(void 0!==r){var a=n.attr("data-original-name");if(a||(n.attr("data-original-name",n.attr("name")),a=n.attr("name")),!a)return;if(r)for(var s in r)a=a.replace("#"+s+"#",r[s]);n.attr("name",a)}}),i.data("initialSetup")||(i.find(".siteorigin-widget-input").each(function(i,t){var r=e(t);r.prop("checked",r.prop("defaultChecked"))}),i.data("initialSetup",!0));var n=r.data("scroll-count")?parseInt(r.data("scroll-count")):0;if(n>0&&t.length>n){var s=t.first().outerHeight();i.css("max-height",s*n).css("overflow","auto")}else i.css("max-height","").css("overflow","")}),n.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){n.trigger("updateFieldPositions")},sortstop:function(i,t){if(t.item.is(".siteorigin-widget-field-repeater-item"))t.item.find("> .siteorigin-widget-field-repeater-item-form").each(function(){e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")});else{t.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}}}),n.trigger("updateFieldPositions"),r.find("> .siteorigin-widget-field-repeater-add").disableSelection().click(function(i){i.preventDefault(),r.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",function(){e(window).resize()})}),r.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").click(function(i){i.preventDefault(),r.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",function(){e(window).resize()})})})},e.fn.sowAddRepeaterItem=function(){return e(this).each(function(i,t){var r=e(t),n=r.find("> .siteorigin-widget-field-repeater-items").children().length+1,a=e("<div>"+r.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");a.find(".siteorigin-widget-input[data-name]").each(function(){var i=e(this);0===i.closest(".siteorigin-widget-field-repeater-item-html").length&&i.attr("name",e(this).data("name"))});var s=a.html().replace(/_id_/g,n),o=void 0!==r.attr("readonly"),d=e('<div class="siteorigin-widget-field-repeater-item ui-draggable" />').append(e('<div class="siteorigin-widget-field-repeater-item-top" />').append(e('<div class="siteorigin-widget-field-expand" />')).append(o?"":e('<div class="siteorigin-widget-field-copy" />')).append(o?"":e('<div class="siteorigin-widget-field-remove" />')).append(e("<h4 />").html(r.data("item-name")))).append(e('<div class="siteorigin-widget-field-repeater-item-form" />').html(s));r.find("> .siteorigin-widget-field-repeater-items").append(d).sortable("refresh").trigger("updateFieldPositions"),d.sowSetupRepeaterItems(),d.hide().slideDown("fast",function(){e(window).resize()})})},e.fn.sowRemoveRepeaterItem=function(){return e(this).each(function(i,t){var r=e(this).closest(".siteorigin-widget-field-repeater-items");e(this).remove(),r.sortable("refresh").trigger("updateFieldPositions")})},e.fn.sowSetupRepeaterItems=function(){return e(this).each(function(i,t){var r=e(t);if(void 0===r.data("sowrepeater-actions-setup")){var n=r.closest(".siteorigin-widget-field-repeater"),a=r.find("> .siteorigin-widget-field-repeater-item-top"),s=n.data("item-label");if(s&&s.selector){var o=function(){var e=s.hasOwnProperty("valueMethod")&&s.valueMethod?s.valueMethod:"val",i=r.find(s.selector)[e]();i&&(i.length>80&&(i=i.substr(0,79)+"..."),a.find("h4").text(i))};o();var d=s.hasOwnProperty("updateEvent")&&s.updateEvent?s.updateEvent:"change";r.bind(d,o)}a.click(function(i){"siteorigin-widget-field-remove"!==i.target.className&&"siteorigin-widget-field-copy"!==i.target.className&&(i.preventDefault(),e(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",function(){if(e(window).resize(),e(this).is(":visible")){e(this).trigger("slideToggleOpenComplete");e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")}else e(this).trigger("slideToggleCloseComplete")}))}),a.find(".siteorigin-widget-field-remove").click(function(i,t){i.preventDefault();var r=e(this).closest(".siteorigin-widget-field-repeater-items"),n=e(this).closest(".siteorigin-widget-field-repeater-item"),a=function(){n.remove(),r.sortable("refresh").trigger("updateFieldPositions"),e(window).resize()};t&&t.silent?a():confirm(soWidgets.sure)&&n.slideUp("fast",a)}),a.find(".siteorigin-widget-field-copy").click(function(i){i.preventDefault();var t=e(this).closest(".siteorigin-widget-form-main"),n=e(this).closest(".siteorigin-widget-field-repeater-item"),a=n.clone(),s=n.closest(".siteorigin-widget-field-repeater-items"),o=s.children().length,d={};a.find("*[name]").each(function(){var i=e(this),s=i.attr("id"),l=i.attr("name");if(i.is("textarea")&&i.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){i.parent().empty().append(i),i.css("display","");var g=tinymce.get(s);g&&i.val(g.getContent())}else if(i.is(".wp-color-picker")){var f=i.closest(".wp-picker-container"),c=i.closest(".siteorigin-widget-field");f.remove(),c.append(i.remove())}else{var p=n.find('[name="'+l+'"]');p.length&&null!=p.val()&&i.val(p.val())}if(s){var u,m,w;if(i.is('[type="radio"]')){m=s.replace(/-\d+-\d+$/,"");var v=s.replace(/-\d+$/,"");if(!d[m]){var h={};d[m]=t.find(".siteorigin-widget-input[id^="+m+"]").not("[id*=_id_]").filter(function(i,t){var r=e(t).attr("name");return!h[r]&&(h[r]=!0,!0)}).length+1}var b=m+"-"+d[m];w=b+s.match(/-\d+$/)[0],a.find("label[for="+v+"]").attr("for",b)}else u=new RegExp("-\\d+$"),m=s.replace(u,""),d[m]||(d[m]=t.find(".siteorigin-widget-input[id^="+m+"]").not("[id*=_id_]").length+1),w=m+"-"+d[m]++;i.attr("id",w),a.find("label[for="+s+"]").attr("for",w),a.find("[id*="+s+"]").each(function(){var i=e(this).attr("id"),t=i.replace(s,w);e(this).attr("id",t)}),"undefined"!=typeof tinymce&&tinymce.get(w)&&tinymce.get(w).remove()}var y=n.parents(".siteorigin-widget-field-repeater").length,k=e("body");(k.hasClass("wp-customizer")||k.hasClass("widgets-php"))&&0===r.closest(".panel-dialog").length&&(y+=1);var F=l.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(y-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+o.toString()+"$3");i.attr("name",F),i.data("original-name",F)}),s.append(a).sortable("refresh").trigger("updateFieldPositions"),a.sowSetupRepeaterItems(),a.hide().slideDown("fast",function(){e(window).resize()})}),r.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),r.data("sowrepeater-actions-setup",!0)}})},sowbForms.getContainerFieldId=function(e,i,t){var r=i+"FieldId";this.hasOwnProperty(r)||(this[r]=1);var n=e.closest(t);if(n.length){var a=n.data("field-id");return void 0===a&&(a=this[r]++),n.data("field-id",a),a}return!1},sowbForms.getWidgetFieldVariable=function(e,i,t){var r=window.sow_field_javascript_variables[e];i=i.replace(/\[#.*?#\]/g,"");for(var n=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(i)[1],a=n.split("]["),s=a.length?r:null;a.length;)s=s[a.shift()];return s[t]},sowbForms.fetchWidgetVariable=function(i,t,r){window.sowVars=window.sowVars||{},void 0===window.sowVars[t]?e.post(soWidgets.ajaxurl,{action:"sow_get_javascript_variables",widget:t,key:i},function(e){window.sowVars[t]=e,r(window.sowVars[t][i])}):r(window.sowVars[t][i])},sowbForms.getWidgetFormValues=function(i){if(_.isUndefined(i))return null;var t={};return i.find("*[name]").each(function(){var i=e(this);try{var r=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(r))return!0;r=r[1];var n=r.split("][");n=n.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var a=t,s=null,o=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===o)s=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===o){if(!i.is(":checked"))return;s=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var d=null;"undefined"!=typeof tinyMCE&&(d=tinyMCE.get(i.attr("id"))),s=null===d||"function"!=typeof d.getContent||d.isHidden()?i.val():d.getContent()}else if("SELECT"===i.prop("tagName")){var l=i.find("option:selected");1===l.length?s=i.find("option:selected").val():l.length>1&&(s=_.map(i.find("option:selected"),function(i,t){return e(i).val()}))}else s=i.val();for(var g=0;g<n.length;g++)g===n.length-1?""===n[g]?a.push(s):a[n[g]]=s:(_.isUndefined(a[n[g]])&&(_.isNumber(n[g+1])||""===n[g+1]?a[n[g]]=[]:a[n[g]]={}),a=a[n[g]])}catch(e){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+e.message)}}),t},sowbForms.setWidgetFormValues=function(i,t){var r=0,n=function(i,t){10!=++r&&i.find("> .siteorigin-widget-field-type-repeater").each(function(){var i=e(this).find("> .siteorigin-widget-field-repeater"),r=i.data("repeaterName"),a=t.hasOwnProperty(r)?t[r]:null;if(a&&Array.isArray(a)&&0!==a.length){var s=i.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),o=a.length,d=s.length;if(o>d)for(var l=0;l<o-d;l++)i.find("> .siteorigin-widget-field-repeater-add").click();else if(o<d)for(var g=o;g<d;g++){var f=e(s.eq(g));f.find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}s=i.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var c=0;c<s.length;c++)s.eq(c).find("> .siteorigin-widget-field-repeater-item-form"),n(s.eq(c).find("> .siteorigin-widget-field-repeater-item-form"),a[c])}})};n(i,t),i.find("*[name]").each(function(){var i=e(this),r=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(void 0===r)return!0;r=r[1];var n=r.split("][");n=n.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});for(var a,s=t,o=0;o<n.length;o++)o===n.length-1?a=s[n[o]]:s=s[n[o]];if("checkbox"===i.attr("type"))i.prop("checked",a);else if("radio"===i.attr("type"))i.prop("checked",a===i.val());else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var d=null;"undefined"!=typeof tinyMCE&&(d=tinyMCE.get(i.attr("id"))),null===d||"function"!=typeof d.getContent||d.isHidden()?i.val(a):d.setContent(a)}else i.val(a);i.trigger("change")})},e(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",function(){var i=e(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout(function(){i.sowSetupForm()},200)}),e("body").hasClass("wp-customizer")&&e(document).on("widget-added",function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()}),e(document).on("open_dialog",function(i,t){if(t.$el.find(".so-panels-dialog").is(".so-panels-dialog-edit-widget")){e(i.target).find(".siteorigin-widget-form-main").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}}),e(function(){e(document).trigger("sowadminloaded")})}(jQuery);var sowEmitters={_match:function(e,i){void 0===i&&(i=".*");var t=new RegExp("^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *("+i+") *$"),r=t.exec(e);if(null===r)return!1;var n="",a="default";return void 0!==r[3]?(a=r[1],n=r[3]):n=r[1],{match:r[4].trim(),group:a,state:n}},_checker:function(e,i,t,r){var n={};void 0===i.length&&(i=[i]);for(var a,s=0;s<i.length;s++)!1!==(a=sowEmitters._match(i[s],t))&&("_true"===a.match||r(e,i,a.match))&&(n[a.group]=a.state);return n},select:function(e,i){void 0===i.length&&(i=[i]);for(var t={},r=0;r<i.length;r++)""===i[r]&&(i[r]="default"),t[i[r]]=e;return t},conditional:function(val,args){return sowEmitters._checker(val,args,"[^;{}]*",function(val,args,match){return eval(match)})},in:function(e,i){return sowEmitters._checker(e,i,"[^;{}]*",function(e,i,t){return-1!==t.split(",").map(function(e){return e.trim()}).indexOf(e)})}};window.sowbForms=sowbForms;
1
+ var sowbForms=window.sowbForms||{};!function(e){e.fn.sowSetupForm=function(){return e(this).each(function(i,t){var r,n=e(t),a=!0,s=e("body"),o=n.find("input[name]");if(o.length&&-1!==o.attr("name").indexOf("__i__"))return this;if(n.is(".siteorigin-widget-form-main")){if(!0===n.data("sow-form-setup"))return!0;if(s.hasClass("widgets-php")&&!n.is(":visible")&&0===n.closest(".panel-dialog").length)return!0;n.on("sowstatechange",function(i,t,r){n.find("[data-state-handler]").each(function(){var i=e(this),n=e.extend({},i.data("state-handler"),a?i.data("state-handler-initial"):{});if(0===Object.keys(n).length)return!0;var s,o,d,l,f,g,c={},p=sowbForms.getContainerFieldId(i,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==p){var u={};for(var m in n)u[m.replace("{$repeater}",p)]=n[m];n=u}var w=sowbForms.getContainerFieldId(i,"widget",".siteorigin-widget-widget");if(!1!==w){var v={};for(var h in n){var b=h.match(/_else\[(.*)\]|(.*)\[(.*)\]/),y="";y=b&&b.length&&void 0===b[1]?b[2]+"_"+w+"["+b[3]+"]":"_else["+b[1]+"_"+w+"]",v[y]=n[h]}n=v}for(var k in n)if(f=!1,null!==(s=k.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?$/))){if(o={group:"default",name:"",multi:!1},void 0!==s[2]?(o.group=s[1],o.name=s[3]):o.name=s[0],o.multi=void 0!==s[4],"_else"===o.group)o.group=o.name,o.name="",f=o.group===t&&void 0===c[o.group];else{g=o.name.split(",").map(function(e){return e.trim()});for(var F=0;F<g.length&&!(f=o.group===t&&g[F]===r);F++);}if(f){d=n[k],o.multi||(d=[d]);for(var F=0;F<d.length;F++)l=void 0!==d[F][1]&&Boolean(d[F][1])?i.find(d[F][1]):i,l[d[F][0]].apply(l,void 0!==d[F][2]?d[F][2]:[]);c[o.group]=!0}}})}),n.sowSetupPreview(),r=n;var d=n.find(".siteorigin-widget-teaser");d.find(".dashicons-dismiss").click(function(){var i=e(this);e.get(i.data("dismiss-url")),d.slideUp("normal",function(){d.remove()})});var l=n.find("> .siteorigin-widgets-form-id").val(),f=n.find("> .siteorigin-widgets-form-timestamp"),g=parseInt(f.val()||0),c=JSON.parse(sessionStorage.getItem(l));if(c)if(c._sow_form_timestamp>g){var p=e('<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>");n.prepend(p),p.find(".so-backup-restore").click(function(){sowbForms.setWidgetFormValues(r,c),p.slideUp("fast",function(){p.remove()})}),p.find(".so-backup-dismiss").click(function(){p.slideUp("fast",function(){sessionStorage.removeItem(l),p.remove()})})}else sessionStorage.removeItem(l);n.change(function(){f.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(n);sessionStorage.setItem(l,JSON.stringify(e))})}else r=n.closest(".siteorigin-widget-form-main");r.find("> .siteorigin-widgets-form-id").val();var u=n.find("> .siteorigin-widget-field");u.find("> .siteorigin-widget-section").sowSetupForm();var m=u.find("> .siteorigin-widget-widget");m.find("> .siteorigin-widget-section").sowSetupForm(),m.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),u.find(".siteorigin-widget-input").each(function(i,t){null===e(t).data("original-name")&&e(t).data("original-name",e(t).attr("name"))}),u.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),n.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),u.find("> .siteorigin-widget-input-color").each(function(){var i=e(this),t={change:function(i,t){setTimeout(function(){e(i.target).trigger("change")},100)}};i.data("defaultColor")&&(t.defaultColor=i.data("defaultColor")),i.wpColorPicker(t)});var w=function(){e(this).toggleClass("siteorigin-widget-section-visible"),e(this).parent().find("> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section").slideToggle("fast",function(){if(e(window).resize(),e(this).find("> .siteorigin-widget-field-container-state").val(e(this).is(":visible")?"open":"closed"),e(this).is(":visible")){e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")}})};u.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").click(w),u.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").click(w),u.filter(".siteorigin-widget-field-type-slider").each(function(){var i=e(this),t=i.find('input[type="number"]'),r=i.find(".siteorigin-widget-value-slider");r.slider({max:parseInt(t.attr("max")),min:parseInt(t.attr("min")),value:parseInt(t.val()),slide:function(e,i){t.val(parseInt(i.value)),t.trigger("change")},change:function(e,t){i.find(".siteorigin-widget-slider-value").html(t.value)}}),t.change(function(e,i){i&&i.silent||r.slider("value",parseInt(t.val()))})}),u.filter(".siteorigin-widget-field-type-link").each(function(){var i=e(this),t=null,r=function(){null!==t&&t.abort();var r=i.find(".content-text-search"),n=r.val(),a=r.data("postTypes"),s=i.find("ul.posts").empty().addClass("loading");e.get(soWidgets.ajaxurl,{action:"so_widgets_search_posts",query:n,postTypes:a},function(i){for(var t=0;t<i.length;t++)""===i[t].label&&(i[t].label="&nbsp;"),s.append(e("<li>").addClass("post").html(i[t].label+"<span>("+i[t].type+")</span>").data(i[t]));s.removeClass("loading")})};i.find(".select-content-button, .button-close").click(function(t){t.preventDefault(),e(this).blur();var n=i.find(".existing-content-selector");n.toggle(),n.is(":visible")&&0===n.find("ul.posts li").length&&r()}),i.on("click",".posts li",function(t){t.preventDefault();var r=e(this);i.find("input.siteorigin-widget-input").val("post: "+r.data("value")),i.find(".existing-content-selector").toggle()});var n=null;i.find(".content-text-search").keyup(function(){null!==n&&clearTimeout(n),n=setTimeout(function(){r()},500)})}),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&u.filter(".siteorigin-widget-field-type-builder").each(function(){e(this).find("> .siteorigin-page-builder-field").soPanelsSetupBuilderWidget()});var v=function(){var i=e(this),t=i.closest("[data-state-emitter]").data("state-emitter");if(void 0!==t){var n={default:""};void 0===t.length&&(t=[t]);for(var a=0;a<t.length;a++)n=function(t,r){if(void 0===sowEmitters[t.callback]||"_"===t.callback.substr(0,1))return r;var n=sowbForms.getContainerFieldId(i,"repeater",".siteorigin-widget-field-repeater-item");!1!==n&&(t.args=t.args.map(function(e){return e.replace("{$repeater}",n)}));var a=sowbForms.getContainerFieldId(i,"widget",".siteorigin-widget-widget");!1===a||t.hasOwnProperty("widgetFieldId")||(t.widgetFieldId=a,t.args=t.args.map(function(e){return e+"_"+a}));var s=i.is('[type="checkbox"]')?i.is(":checked"):i.val();return e.extend(r,sowEmitters[t.callback](s,t.args))}(t[a],n);var s=r.data("states");void 0===s&&(s={default:""});for(var o in n)void 0!==s[o]&&n[o]===s[o]||(s[o]=n[o],r.trigger("sowstatechange",[o,n[o]]));r.data("states",s)}};u.filter("[data-state-emitter]").each(function(){e(this).find(".siteorigin-widget-input").on("keyup change",v),e(this).find(".siteorigin-widget-input").each(function(){var i=e(this);i.is(":radio")?i.is(":checked")&&v.call(i[0]):v.call(i[0])})}),n.trigger("sowsetupform",u).data("sow-form-setup",!0),u.trigger("sowsetupformfield"),n.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(s.hasClass("wp-customizer")||s.hasClass("widgets-php"))&&n.closest(".ui-sortable").on("sortstop",function(e,i){i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}),a=!1})},e.fn.sowSetupPreview=function(){var i=e(this);i.siblings(".siteorigin-widget-preview").find("> a").click(function(t){t.preventDefault();var r=sowbForms.getWidgetFormValues(i),n=e(e("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");n.find('input[name="data"]').val(JSON.stringify(r)),n.find('input[name="class"]').val(i.data("class")),n.find("iframe").on("load",function(){e(this).css("visibility","visible")}),n.find("form").submit(),n.find(".close").click(function(){n.remove()})})},e.fn.sowSetupRepeater=function(){return e(this).each(function(i,t){var r=e(t),n=r.find(".siteorigin-widget-field-repeater-items"),a=r.data("repeater-name");n.bind("updateFieldPositions",function(){var i=e(this),t=i.find("> .siteorigin-widget-field-repeater-item");t.each(function(i,t){e(t).find(".siteorigin-widget-input").each(function(t,r){var n=e(r).data("repeater-positions");void 0===n&&(n={}),n[a]=i,e(r).data("repeater-positions",n)})}),i.find(".siteorigin-widget-input").each(function(i,t){var r=e(t).data("repeater-positions"),n=e(t);if(void 0!==r){var a=n.attr("data-original-name");if(a||(n.attr("data-original-name",n.attr("name")),a=n.attr("name")),!a)return;if(r)for(var s in r)a=a.replace("#"+s+"#",r[s]);n.attr("name",a)}}),i.data("initialSetup")||(i.find(".siteorigin-widget-input").each(function(i,t){var r=e(t);r.prop("checked",r.prop("defaultChecked"))}),i.data("initialSetup",!0));var n=r.data("scroll-count")?parseInt(r.data("scroll-count")):0;if(n>0&&t.length>n){var s=t.first().outerHeight();i.css("max-height",s*n).css("overflow","auto")}else i.css("max-height","").css("overflow","")}),n.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){n.trigger("updateFieldPositions")},sortstop:function(i,t){if(t.item.is(".siteorigin-widget-field-repeater-item"))t.item.find("> .siteorigin-widget-field-repeater-item-form").each(function(){e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")});else{t.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}}}),n.trigger("updateFieldPositions"),r.find("> .siteorigin-widget-field-repeater-add").disableSelection().click(function(i){i.preventDefault(),r.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",function(){e(window).resize()})}),r.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").click(function(i){i.preventDefault(),r.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",function(){e(window).resize()})})})},e.fn.sowAddRepeaterItem=function(){return e(this).each(function(i,t){var r=e(t),n=r.find("> .siteorigin-widget-field-repeater-items").children().length+1,a=e("<div>"+r.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");a.find(".siteorigin-widget-input[data-name]").each(function(){var i=e(this);0===i.closest(".siteorigin-widget-field-repeater-item-html").length&&i.attr("name",e(this).data("name"))});var s=a.html().replace(/_id_/g,n),o=void 0!==r.attr("readonly"),d=e('<div class="siteorigin-widget-field-repeater-item ui-draggable" />').append(e('<div class="siteorigin-widget-field-repeater-item-top" />').append(e('<div class="siteorigin-widget-field-expand" />')).append(o?"":e('<div class="siteorigin-widget-field-copy" />')).append(o?"":e('<div class="siteorigin-widget-field-remove" />')).append(e("<h4 />").html(r.data("item-name")))).append(e('<div class="siteorigin-widget-field-repeater-item-form" />').html(s));r.find("> .siteorigin-widget-field-repeater-items").append(d).sortable("refresh").trigger("updateFieldPositions"),d.sowSetupRepeaterItems(),d.hide().slideDown("fast",function(){e(window).resize()})})},e.fn.sowRemoveRepeaterItem=function(){return e(this).each(function(i,t){var r=e(this).closest(".siteorigin-widget-field-repeater-items");e(this).remove(),r.sortable("refresh").trigger("updateFieldPositions")})},e.fn.sowSetupRepeaterItems=function(){return e(this).each(function(i,t){var r=e(t);if(void 0===r.data("sowrepeater-actions-setup")){var n=r.closest(".siteorigin-widget-field-repeater"),a=r.find("> .siteorigin-widget-field-repeater-item-top"),s=n.data("item-label");if(s&&s.selector){var o=function(){var e=s.hasOwnProperty("valueMethod")&&s.valueMethod?s.valueMethod:"val",i=r.find(s.selector)[e]();i&&(i.length>80&&(i=i.substr(0,79)+"..."),a.find("h4").text(i))};o();var d=s.hasOwnProperty("updateEvent")&&s.updateEvent?s.updateEvent:"change";r.bind(d,o)}a.click(function(i){"siteorigin-widget-field-remove"!==i.target.className&&"siteorigin-widget-field-copy"!==i.target.className&&(i.preventDefault(),e(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",function(){if(e(window).resize(),e(this).is(":visible")){e(this).trigger("slideToggleOpenComplete");e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")}else e(this).trigger("slideToggleCloseComplete")}))}),a.find(".siteorigin-widget-field-remove").click(function(i,t){i.preventDefault();var r=e(this).closest(".siteorigin-widget-field-repeater-items"),n=e(this).closest(".siteorigin-widget-field-repeater-item"),a=function(){n.remove(),r.sortable("refresh").trigger("updateFieldPositions"),e(window).resize()};t&&t.silent?a():confirm(soWidgets.sure)&&n.slideUp("fast",a)}),a.find(".siteorigin-widget-field-copy").click(function(i){i.preventDefault();var t=e(this).closest(".siteorigin-widget-form-main"),n=e(this).closest(".siteorigin-widget-field-repeater-item"),a=n.clone(),s=n.closest(".siteorigin-widget-field-repeater-items"),o=s.children().length,d={};a.find("*[name]").each(function(){var i=e(this),s=i.attr("id"),l=i.attr("name");if(i.is("textarea")&&i.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){i.parent().empty().append(i),i.css("display","");var f=tinymce.get(s);f&&i.val(f.getContent())}else if(i.is(".wp-color-picker")){var g=i.closest(".wp-picker-container"),c=i.closest(".siteorigin-widget-field");g.remove(),c.append(i.remove())}else{var p=n.find('[name="'+l+'"]');p.length&&null!=p.val()&&i.val(p.val())}if(s){var u,m,w;if(i.is('[type="radio"]')){m=s.replace(/-\d+-\d+$/,"");var v=s.replace(/-\d+$/,"");if(!d[m]){var h={};d[m]=t.find(".siteorigin-widget-input[id^="+m+"]").not("[id*=_id_]").filter(function(i,t){var r=e(t).attr("name");return!h[r]&&(h[r]=!0,!0)}).length+1}var b=m+"-"+d[m];w=b+s.match(/-\d+$/)[0],a.find("label[for="+v+"]").attr("for",b)}else u=new RegExp("-\\d+$"),m=s.replace(u,""),d[m]||(d[m]=t.find(".siteorigin-widget-input[id^="+m+"]").not("[id*=_id_]").length+1),w=m+"-"+d[m]++;i.attr("id",w),a.find("label[for="+s+"]").attr("for",w),a.find("[id*="+s+"]").each(function(){var i=e(this).attr("id"),t=i.replace(s,w);e(this).attr("id",t)}),"undefined"!=typeof tinymce&&tinymce.get(w)&&tinymce.get(w).remove()}var y=n.parents(".siteorigin-widget-field-repeater").length,k=e("body");(k.hasClass("wp-customizer")||k.hasClass("widgets-php"))&&0===r.closest(".panel-dialog").length&&(y+=1);var F=l.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(y-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+o.toString()+"$3");i.attr("name",F),i.data("original-name",F)}),s.append(a).sortable("refresh").trigger("updateFieldPositions"),a.sowSetupRepeaterItems(),a.hide().slideDown("fast",function(){e(window).resize()})}),r.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),r.data("sowrepeater-actions-setup",!0)}})},sowbForms.getContainerFieldId=function(e,i,t){var r=i+"FieldId";this.hasOwnProperty(r)||(this[r]=1);var n=e.closest(t);if(n.length){var a=n.data("field-id");return void 0===a&&(a=this[r]++),n.data("field-id",a),a}return!1},sowbForms.getWidgetFieldVariable=function(e,i,t){var r=window.sow_field_javascript_variables[e];i=i.replace(/\[#.*?#\]/g,"");for(var n=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(i)[1],a=n.split("]["),s=a.length?r:null;a.length;)s=s[a.shift()];return s[t]},sowbForms.fetchWidgetVariable=function(i,t,r){window.sowVars=window.sowVars||{},void 0===window.sowVars[t]?e.post(soWidgets.ajaxurl,{action:"sow_get_javascript_variables",widget:t,key:i},function(e){window.sowVars[t]=e,r(window.sowVars[t][i])}):r(window.sowVars[t][i])},sowbForms.getWidgetFormValues=function(i){if(_.isUndefined(i))return null;var t={};return i.find("*[name]").each(function(){var i=e(this);try{var r=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(r))return!0;r=r[1];var n=r.split("][");n=n.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var a=t,s=null,o=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===o)s=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===o){if(!i.is(":checked"))return;s=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var d=null;"undefined"!=typeof tinyMCE&&(d=tinyMCE.get(i.attr("id"))),s=null===d||"function"!=typeof d.getContent||d.isHidden()?i.val():d.getContent()}else if("SELECT"===i.prop("tagName")){var l=i.find("option:selected");1===l.length?s=i.find("option:selected").val():l.length>1&&(s=_.map(i.find("option:selected"),function(i,t){return e(i).val()}))}else s=i.val();for(var f=0;f<n.length;f++)f===n.length-1?""===n[f]?a.push(s):a[n[f]]=s:(_.isUndefined(a[n[f]])&&(_.isNumber(n[f+1])||""===n[f+1]?a[n[f]]=[]:a[n[f]]={}),a=a[n[f]])}catch(e){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+e.message)}}),t},sowbForms.setWidgetFormValues=function(i,t,r){r=r||!1;var n=0,a=function(i,t){10!=++n&&i.find("> .siteorigin-widget-field-type-repeater").each(function(){var i=e(this).find("> .siteorigin-widget-field-repeater"),n=i.data("repeaterName"),s=t.hasOwnProperty(n)?t[n]:null;if(s&&Array.isArray(s)){var o=i.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),d=s.length,l=o.length;if(d>l)for(var f=0;f<d-l;f++)i.find("> .siteorigin-widget-field-repeater-add").click();else if(!r&&d<l)for(var g=d;g<l;g++){var c=e(o.eq(g));c.find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}o=i.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var p=0;p<o.length;p++)o.eq(p).find("> .siteorigin-widget-field-repeater-item-form"),a(o.eq(p).find("> .siteorigin-widget-field-repeater-item-form"),s[p])}})};a(i,t),i.find("*[name]").each(function(){var i=e(this),n=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(void 0===n)return!0;n=n[1];var a=n.split("][");a=a.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});for(var s,o=t,d=0;d<a.length;d++){if(!o.hasOwnProperty(a[d])){if(r)return!0;break}d===a.length-1?s=o[a[d]]:o=o[a[d]]}if("checkbox"===i.attr("type"))i.prop("checked",s);else if("radio"===i.attr("type"))i.prop("checked",s===i.val());else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var l=null;"undefined"!=typeof tinyMCE&&(l=tinyMCE.get(i.attr("id"))),null===l||"function"!=typeof l.getContent||l.isHidden()?i.val(s):l.setContent(s)}else i.val(s);i.trigger("change")})},e(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",function(){var i=e(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout(function(){i.sowSetupForm()},200)}),e("body").hasClass("wp-customizer")&&e(document).on("widget-added",function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()}),e(document).on("open_dialog",function(i,t){if(t.$el.find(".so-panels-dialog").is(".so-panels-dialog-edit-widget")){e(i.target).find(".siteorigin-widget-form-main").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}}),e(function(){e(document).trigger("sowadminloaded")})}(jQuery);var sowEmitters={_match:function(e,i){void 0===i&&(i=".*");var t=new RegExp("^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *("+i+") *$"),r=t.exec(e);if(null===r)return!1;var n="",a="default";return void 0!==r[3]?(a=r[1],n=r[3]):n=r[1],{match:r[4].trim(),group:a,state:n}},_checker:function(e,i,t,r){var n={};void 0===i.length&&(i=[i]);for(var a,s=0;s<i.length;s++)!1!==(a=sowEmitters._match(i[s],t))&&("_true"===a.match||r(e,i,a.match))&&(n[a.group]=a.state);return n},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
@@ -248,7 +248,7 @@ abstract class SiteOrigin_Widget extends WP_Widget {
248
  );
249
  $wrapper_attr_string = '';
250
  foreach ( $data as $name => $value ) {
251
- $wrapper_attr_string = ' data-' . esc_html( $name ) . '="' . esc_attr( $value ) . '"';
252
  }
253
 
254
  return $wrapper_attr_string;
@@ -481,7 +481,7 @@ abstract class SiteOrigin_Widget extends WP_Widget {
481
  <?php endif; ?>
482
 
483
  <?php if( !empty( $this->widget_options['help'] ) ) : ?>
484
- <a href="<?php echo sow_esc_url($this->widget_options['help']) ?>" class="siteorigin-widget-help-link siteorigin-panels-help-link" target="_blank"><?php _e('Help', 'so-widgets-bundle') ?></a>
485
  <?php endif; ?>
486
 
487
  <script type="text/javascript">
248
  );
249
  $wrapper_attr_string = '';
250
  foreach ( $data as $name => $value ) {
251
+ $wrapper_attr_string .= ' data-' . esc_html( $name ) . '="' . esc_attr( $value ) . '"';
252
  }
253
 
254
  return $wrapper_attr_string;
481
  <?php endif; ?>
482
 
483
  <?php if( !empty( $this->widget_options['help'] ) ) : ?>
484
+ <a href="<?php echo sow_esc_url($this->widget_options['help']) ?>" class="siteorigin-widget-help-link siteorigin-panels-help-link" target="_blank" rel="noopener noreferrer"><?php _e('Help', 'so-widgets-bundle') ?></a>
485
  <?php endif; ?>
486
 
487
  <script type="text/javascript">
base/tpl/posts-selector/post.html CHANGED
@@ -1,6 +1,6 @@
1
  <div class="sow-post-selector-summary ui-draggable" data-id="<%= id %>">
2
  <div class="sow-thumbnail">
3
- <a href="<%= editUrl %>" target="_blank">
4
  <img src="<%= thumbnail %>" />
5
  </a>
6
  </div>
1
  <div class="sow-post-selector-summary ui-draggable" data-id="<%= id %>">
2
  <div class="sow-thumbnail">
3
+ <a href="<%= editUrl %>" target="_blank" rel="noopener noreferrer">
4
  <img src="<%= thumbnail %>" />
5
  </a>
6
  </div>
js/slider/jquery.slider.js CHANGED
@@ -84,10 +84,11 @@ jQuery( function($){
84
  $slide.click(function(event) {
85
 
86
  event.preventDefault();
87
- window.open(
88
  urlData.url,
89
  urlData.hasOwnProperty( 'new_window' ) && urlData.new_window ? '_blank' : '_self'
90
  );
 
91
  } );
92
  $slide.find( 'a' ).click( function ( event ) {
93
  event.stopPropagation();
@@ -98,13 +99,13 @@ jQuery( function($){
98
  var setupSlider = function() {
99
 
100
  // If we're inside a fittext wrapper, wait for it to complete, before setting up the slider.
101
- var fitTextWrapper = $$.closest('.so-widget-fittext-wrapper');
102
- if ( fitTextWrapper.length > 0 && ! fitTextWrapper.data('fitTextDone') ) {
103
- fitTextWrapper.on('fitTextDone', function () {
104
- setupSlider();
105
- });
106
- return;
107
- }
108
 
109
  // Show everything for this slider
110
  $base.show();
84
  $slide.click(function(event) {
85
 
86
  event.preventDefault();
87
+ var sliderWindow = window.open(
88
  urlData.url,
89
  urlData.hasOwnProperty( 'new_window' ) && urlData.new_window ? '_blank' : '_self'
90
  );
91
+ sliderWindow.opener = null;
92
  } );
93
  $slide.find( 'a' ).click( function ( event ) {
94
  event.stopPropagation();
99
  var setupSlider = function() {
100
 
101
  // If we're inside a fittext wrapper, wait for it to complete, before setting up the slider.
102
+ var fitTextWrapper = $$.closest('.so-widget-fittext-wrapper');
103
+ if ( fitTextWrapper.length > 0 && ! fitTextWrapper.data('fitTextDone') ) {
104
+ fitTextWrapper.on('fitTextDone', function () {
105
+ setupSlider();
106
+ });
107
+ return;
108
+ }
109
 
110
  // Show everything for this slider
111
  $base.show();
js/slider/jquery.slider.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};sowb.SiteOriginSlider=function(e){return{playSlideVideo:function(i){e(i).find("video").each(function(){void 0!==this.play&&this.play()})},pauseSlideVideo:function(i){e(i).find("video").each(function(){void 0!==this.pause&&this.pause()})},setupActiveSlide:function(i,t,s){var n=e(i).find(".cycle-sentinel"),o=e(t),d=o.find("video.sow-background-element");if(void 0==s?n.css("height",o.outerHeight()):n.animate({height:o.outerHeight()},s),d.length){o.outerWidth()/o.outerHeight()>d.outerWidth()/d.outerHeight()?d.css({width:"100%",height:"auto"}):d.css({width:"auto",height:"100%"}),d.css({"margin-left":-Math.ceil(d.width()/2),"margin-top":-Math.ceil(d.height()/2)})}}}},jQuery(function(e){sowb.setupSliders=sowb.setupSlider=function(){var i=new sowb.SiteOriginSlider(e);e(".sow-slider-images").each(function(){var t=e(this),s=t.siblings(".sow-slider-pagination"),n=t.closest(".sow-slider-base"),o=n.find(".sow-slide-nav"),d=t.find(".sow-slider-image"),c=t.data("settings");d.each(function(i,t){var s=e(t),n=s.data("url");void 0!==n&&n.hasOwnProperty("url")&&(s.click(function(e){e.preventDefault(),window.open(n.url,n.hasOwnProperty("new_window")&&n.new_window?"_blank":"_self")}),s.find("a").click(function(e){e.stopPropagation()}))});var l=function(){var a=t.closest(".so-widget-fittext-wrapper");if(a.length>0&&!a.data("fitTextDone"))return void a.on("fitTextDone",function(){l()});if(n.show(),t.find(".sow-slider-image").each(function(){var i=e(this);e(window).on("resize panelsStretchRows",function(){i.css("height",i.find(".sow-slider-image-wrapper").outerHeight())}).resize()}),t.on({"cycle-after":function(t,s,n,o,d){var c=e(this);i.playSlideVideo(o),i.setupActiveSlide(c,o),e(o).trigger("sowSlideCycleAfter")},"cycle-before":function(t,n,o,d,c){var l=e(this);s.find("> li").removeClass("sow-active").eq(n.slideNum-1).addClass("sow-active"),i.pauseSlideVideo(o),i.setupActiveSlide(l,d,n.speed),e(d).trigger("sowSlideCycleBefore")},"cycle-initialized":function(n,d){i.playSlideVideo(e(this).find(".cycle-slide-active")),i.setupActiveSlide(t,d.slides[0]),s.find(">li").removeClass("sow-active").eq(0).addClass("sow-active"),e(this).find(".cycle-slide-active").trigger("sowSlideInitial"),d.slideCount<=1&&(s.hide(),o.hide()),e(window).resize(),setTimeout(function(){i.setupActiveSlide(t,d.slides[0]),t.find(".cycle-sentinel").empty()},200)}}).cycle({slides:"> .sow-slider-image",speed:c.speed,timeout:c.timeout,swipe:c.swipe,"swipe-fx":"scrollHorz"}),t.find("video.sow-background-element").on("loadeddata",function(){i.setupActiveSlide(t,t.find(".cycle-slide-active"))}),s.add(o).hide(),!n.hasClass("sow-slider-is-mobile")&&d.length>1){var r=!1;n.mouseenter(function(){s.add(o).clearQueue().fadeIn(150),r=!1}).mouseleave(function(){r=!0,setTimeout(function(){r&&s.add(o).clearQueue().fadeOut(150),r=!1},750)})}e(window).resize(function(){i.setupActiveSlide(t,t.find(".cycle-slide-active"))}),s.find("> li > a").click(function(i){i.preventDefault(),t.cycle("goto",e(this).data("goto"))}),o.find("> a").click(function(i){i.preventDefault(),t.cycle(e(this).data("action"))}),n.keydown(function(e){37===e.which?t.cycle("prev"):39===e.which&&t.cycle("next")})},a=t.find("img"),r=0,u=!1;a.each(function(){e(this);this.complete?r++:e(this).one("load",function(){++r!==a.length||u||(l(),u=!0)}).attr("src",e(this).attr("src")),r!==a.length||u||(l(),u=!0)}),0===a.length&&l()})},sowb.setupSliders(),e(sowb).on("setup_widgets",sowb.setupSliders)}),window.sowb=sowb;
1
+ var sowb=window.sowb||{};sowb.SiteOriginSlider=function(e){return{playSlideVideo:function(i){e(i).find("video").each(function(){void 0!==this.play&&this.play()})},pauseSlideVideo:function(i){e(i).find("video").each(function(){void 0!==this.pause&&this.pause()})},setupActiveSlide:function(i,t,s){var n=e(i).find(".cycle-sentinel"),o=e(t),d=o.find("video.sow-background-element");if(void 0==s?n.css("height",o.outerHeight()):n.animate({height:o.outerHeight()},s),d.length){o.outerWidth()/o.outerHeight()>d.outerWidth()/d.outerHeight()?d.css({width:"100%",height:"auto"}):d.css({width:"auto",height:"100%"}),d.css({"margin-left":-Math.ceil(d.width()/2),"margin-top":-Math.ceil(d.height()/2)})}}}},jQuery(function(e){sowb.setupSliders=sowb.setupSlider=function(){var i=new sowb.SiteOriginSlider(e);e(".sow-slider-images").each(function(){var t=e(this),s=t.siblings(".sow-slider-pagination"),n=t.closest(".sow-slider-base"),o=n.find(".sow-slide-nav"),d=t.find(".sow-slider-image"),c=t.data("settings");d.each(function(i,t){var s=e(t),n=s.data("url");void 0!==n&&n.hasOwnProperty("url")&&(s.click(function(e){e.preventDefault(),window.open(n.url,n.hasOwnProperty("new_window")&&n.new_window?"_blank":"_self").opener=null}),s.find("a").click(function(e){e.stopPropagation()}))});var l=function(){var a=t.closest(".so-widget-fittext-wrapper");if(a.length>0&&!a.data("fitTextDone"))return void a.on("fitTextDone",function(){l()});if(n.show(),t.find(".sow-slider-image").each(function(){var i=e(this);e(window).on("resize panelsStretchRows",function(){i.css("height",i.find(".sow-slider-image-wrapper").outerHeight())}).resize()}),t.on({"cycle-after":function(t,s,n,o,d){var c=e(this);i.playSlideVideo(o),i.setupActiveSlide(c,o),e(o).trigger("sowSlideCycleAfter")},"cycle-before":function(t,n,o,d,c){var l=e(this);s.find("> li").removeClass("sow-active").eq(n.slideNum-1).addClass("sow-active"),i.pauseSlideVideo(o),i.setupActiveSlide(l,d,n.speed),e(d).trigger("sowSlideCycleBefore")},"cycle-initialized":function(n,d){i.playSlideVideo(e(this).find(".cycle-slide-active")),i.setupActiveSlide(t,d.slides[0]),s.find(">li").removeClass("sow-active").eq(0).addClass("sow-active"),e(this).find(".cycle-slide-active").trigger("sowSlideInitial"),d.slideCount<=1&&(s.hide(),o.hide()),e(window).resize(),setTimeout(function(){i.setupActiveSlide(t,d.slides[0]),t.find(".cycle-sentinel").empty()},200)}}).cycle({slides:"> .sow-slider-image",speed:c.speed,timeout:c.timeout,swipe:c.swipe,"swipe-fx":"scrollHorz"}),t.find("video.sow-background-element").on("loadeddata",function(){i.setupActiveSlide(t,t.find(".cycle-slide-active"))}),s.add(o).hide(),!n.hasClass("sow-slider-is-mobile")&&d.length>1){var r=!1;n.mouseenter(function(){s.add(o).clearQueue().fadeIn(150),r=!1}).mouseleave(function(){r=!0,setTimeout(function(){r&&s.add(o).clearQueue().fadeOut(150),r=!1},750)})}e(window).resize(function(){i.setupActiveSlide(t,t.find(".cycle-slide-active"))}),s.find("> li > a").click(function(i){i.preventDefault(),t.cycle("goto",e(this).data("goto"))}),o.find("> a").click(function(i){i.preventDefault(),t.cycle(e(this).data("action"))}),n.keydown(function(e){37===e.which?t.cycle("prev"):39===e.which&&t.cycle("next")})},a=t.find("img"),r=0,u=!1;a.each(function(){e(this);this.complete?r++:e(this).one("load",function(){++r!==a.length||u||(l(),u=!0)}).attr("src",e(this).attr("src")),r!==a.length||u||(l(),u=!0)}),0===a.length&&l()})},sowb.setupSliders(),e(sowb).on("setup_widgets",sowb.setupSliders)}),window.sowb=sowb;
lang/so-widgets-bundle.pot CHANGED
@@ -297,7 +297,7 @@ msgstr ""
297
  msgid "Author"
298
  msgstr ""
299
 
300
- #: tmp/base/inc/fields/posts.class.php:82, tmp/widgets/accordion/accordion.php:50, tmp/widgets/contact/contact.php:47, tmp/widgets/cta/cta.php:63, tmp/widgets/editor/editor.php:32, tmp/widgets/features/features.php:132, tmp/widgets/post-carousel/post-carousel.php:97, tmp/widgets/price-table/price-table.php:41, tmp/widgets/price-table/price-table.php:60, tmp/widgets/simple-masonry/simple-masonry.php:43, tmp/widgets/simple-masonry/simple-masonry.php:74, tmp/widgets/social-media-buttons/social-media-buttons.php:42, tmp/widgets/taxonomy/taxonomy.php:33, tmp/widgets/testimonial/testimonial.php:40, tmp/widgets/video/video.php:32
301
  msgid "Title"
302
  msgstr ""
303
 
@@ -378,7 +378,15 @@ msgid "Additional"
378
  msgstr ""
379
 
380
  #: tmp/base/inc/fields/posts.class.php:125
381
- msgid "Additional query arguments. See <a href=\"http://codex.wordpress.org/Function_Reference/query_posts\" target=\"_blank\">query_posts</a>."
 
 
 
 
 
 
 
 
382
  msgstr ""
383
 
384
  #: tmp/base/inc/fields/repeater.class.php:54
@@ -629,75 +637,75 @@ msgstr ""
629
  msgid "An accordion widget."
630
  msgstr ""
631
 
632
- #: tmp/widgets/accordion/accordion.php:46, tmp/widgets/accordion/accordion.php:113
633
  msgid "Panels"
634
  msgstr ""
635
 
636
- #: tmp/widgets/accordion/accordion.php:54, tmp/widgets/hero/hero.php:59, tmp/widgets/layout-slider/layout-slider.php:47
637
  msgid "Content"
638
  msgstr ""
639
 
640
- #: tmp/widgets/accordion/accordion.php:58
641
  msgid "Initial state"
642
  msgstr ""
643
 
644
- #: tmp/widgets/accordion/accordion.php:59
645
  msgid "Whether this panel should be open or closed when the page first loads."
646
  msgstr ""
647
 
648
- #: tmp/widgets/accordion/accordion.php:61
649
  msgid "Open"
650
  msgstr ""
651
 
652
- #: tmp/widgets/accordion/accordion.php:62
653
  msgid "Closed"
654
  msgstr ""
655
 
656
- #: tmp/widgets/accordion/accordion.php:70, tmp/widgets/contact/contact.php:276, tmp/widgets/cta/cta.php:73, tmp/widgets/testimonial/testimonial.php:182
657
  msgid "Design"
658
  msgstr ""
659
 
660
- #: tmp/widgets/accordion/accordion.php:75
661
  msgid "Headings"
662
  msgstr ""
663
 
664
- #: tmp/widgets/accordion/accordion.php:80, tmp/widgets/accordion/accordion.php:118, tmp/widgets/contact/contact.php:286, tmp/widgets/contact/contact.php:515, tmp/widgets/cta/cta.php:77, tmp/widgets/hero/hero.php:113, tmp/widgets/layout-slider/layout-slider.php:81, tmp/widgets/social-media-buttons/social-media-buttons.php:74
665
  msgid "Background color"
666
  msgstr ""
667
 
668
- #: tmp/widgets/accordion/accordion.php:85
669
  msgid "Background hover color"
670
  msgstr ""
671
 
672
- #: tmp/widgets/accordion/accordion.php:90, tmp/widgets/cta/cta.php:85
673
  msgid "Title color"
674
  msgstr ""
675
 
676
- #: tmp/widgets/accordion/accordion.php:95
677
  msgid "Title hover color"
678
  msgstr ""
679
 
680
- #: tmp/widgets/accordion/accordion.php:99, tmp/widgets/accordion/accordion.php:127, tmp/widgets/contact/contact.php:296, tmp/widgets/contact/contact.php:409, tmp/widgets/contact/contact.php:525, tmp/widgets/cta/cta.php:81
681
  msgid "Border color"
682
  msgstr ""
683
 
684
- #: tmp/widgets/accordion/accordion.php:103
685
  msgid "Border hover color"
686
  msgstr ""
687
 
688
- #: tmp/widgets/accordion/accordion.php:107, tmp/widgets/accordion/accordion.php:131, tmp/widgets/contact/contact.php:301, tmp/widgets/contact/contact.php:414, tmp/widgets/contact/contact.php:541
689
  msgid "Border width"
690
  msgstr ""
691
 
692
- #: tmp/widgets/accordion/accordion.php:123
693
  msgid "Font color"
694
  msgstr ""
695
 
696
- #: tmp/widgets/accordion/accordion.php:135
697
  msgid "Bottom margin"
698
  msgstr ""
699
 
700
- #: tmp/widgets/accordion/accordion.php:204
701
  msgid "Get more customization options and the ability to use widgets and layouts as your accordion content with %sSiteOrigin Premium%s"
702
  msgstr ""
703
 
@@ -713,7 +721,7 @@ msgstr ""
713
  msgid "Button text"
714
  msgstr ""
715
 
716
- #: tmp/widgets/button/button.php:50, tmp/widgets/google-map/google-map.php:104, tmp/widgets/headline/headline.php:44, tmp/widgets/headline/headline.php:115, tmp/widgets/hero/hero.php:119, tmp/widgets/icon/icon.php:56, tmp/widgets/image/image.php:76, tmp/widgets/layout-slider/layout-slider.php:87, tmp/widgets/simple-masonry/simple-masonry.php:78, tmp/widgets/slider/slider.php:84
717
  msgid "Destination URL"
718
  msgstr ""
719
 
@@ -789,7 +797,7 @@ msgstr ""
789
  msgid "Button color"
790
  msgstr ""
791
 
792
- #: tmp/widgets/button/button.php:124, tmp/widgets/contact/contact.php:553, tmp/widgets/hero/hero.php:244, tmp/widgets/layout-slider/layout-slider.php:181
793
  msgid "Text color"
794
  msgstr ""
795
 
@@ -918,7 +926,7 @@ msgid "To email address"
918
  msgstr ""
919
 
920
  #: tmp/widgets/contact/contact.php:64
921
- msgid "Where contact emails will be delivered to."
922
  msgstr ""
923
 
924
  #: tmp/widgets/contact/contact.php:69
@@ -1217,7 +1225,7 @@ msgstr ""
1217
  msgid "Margin"
1218
  msgstr ""
1219
 
1220
- #: tmp/widgets/contact/contact.php:401, tmp/widgets/google-map/google-map.php:100, tmp/widgets/hero/hero.php:156, tmp/widgets/layout-slider/layout-slider.php:124
1221
  msgid "Height"
1222
  msgstr ""
1223
 
@@ -1714,7 +1722,7 @@ msgid "Raw JSON styles"
1714
  msgstr ""
1715
 
1716
  #: tmp/widgets/google-map/google-map.php:298
1717
- msgid "Copy and paste predefined styles here from <a href=\"http://snazzymaps.com/\" target=\"_blank\">Snazzy Maps</a>."
1718
  msgstr ""
1719
 
1720
  #: tmp/widgets/google-map/google-map.php:306
@@ -1985,19 +1993,19 @@ msgstr ""
1985
  msgid "Sub Headline"
1986
  msgstr ""
1987
 
1988
- #: tmp/widgets/headline/headline.php:244, tmp/widgets/hero/hero.php:205
1989
  msgid "Use FitText"
1990
  msgstr ""
1991
 
1992
- #: tmp/widgets/headline/headline.php:245, tmp/widgets/hero/hero.php:206
1993
  msgid "Dynamically adjust your heading font size based on screen size."
1994
  msgstr ""
1995
 
1996
- #: tmp/widgets/headline/headline.php:258, tmp/widgets/hero/hero.php:219
1997
  msgid "FitText Compressor Strength"
1998
  msgstr ""
1999
 
2000
- #: tmp/widgets/headline/headline.php:259, tmp/widgets/hero/hero.php:220
2001
  msgid "How aggressively FitText should resize your heading."
2002
  msgstr ""
2003
 
@@ -2029,75 +2037,79 @@ msgstr ""
2029
  msgid "Background image"
2030
  msgstr ""
2031
 
2032
- #: tmp/widgets/hero/hero.php:96, tmp/widgets/layout-slider/layout-slider.php:63, tmp/widgets/slider/slider.php:67
 
 
 
 
2033
  msgid "Background image type"
2034
  msgstr ""
2035
 
2036
- #: tmp/widgets/hero/hero.php:98, tmp/widgets/slider/slider.php:69
2037
  msgid "Cover"
2038
  msgstr ""
2039
 
2040
- #: tmp/widgets/hero/hero.php:104, tmp/widgets/layout-slider/layout-slider.php:72
2041
  msgid "Background image opacity"
2042
  msgstr ""
2043
 
2044
- #: tmp/widgets/hero/hero.php:124, tmp/widgets/layout-slider/layout-slider.php:92
2045
  msgid "Open URL in a new window"
2046
  msgstr ""
2047
 
2048
- #: tmp/widgets/hero/hero.php:129, tmp/widgets/layout-slider/layout-slider.php:97, tmp/widgets/slider/slider.php:43
2049
  msgid "Video"
2050
  msgstr ""
2051
 
2052
- #: tmp/widgets/hero/hero.php:130, tmp/widgets/layout-slider/layout-slider.php:98, tmp/widgets/slider/slider.php:44
2053
  msgid "Background videos"
2054
  msgstr ""
2055
 
2056
- #: tmp/widgets/hero/hero.php:145, tmp/widgets/layout-slider/layout-slider.php:113
2057
  msgid "Slider Controls"
2058
  msgstr ""
2059
 
2060
- #: tmp/widgets/hero/hero.php:151, tmp/widgets/layout-slider/layout-slider.php:119
2061
  msgid "Design and Layout"
2062
  msgstr ""
2063
 
2064
- #: tmp/widgets/hero/hero.php:162, tmp/widgets/layout-slider/layout-slider.php:130
2065
  msgid "Top and bottom padding"
2066
  msgstr ""
2067
 
2068
- #: tmp/widgets/hero/hero.php:168, tmp/widgets/layout-slider/layout-slider.php:136
2069
  msgid "Extra top padding"
2070
  msgstr ""
2071
 
2072
- #: tmp/widgets/hero/hero.php:169, tmp/widgets/layout-slider/layout-slider.php:137
2073
  msgid "Additional padding added to the top of the slider"
2074
  msgstr ""
2075
 
2076
- #: tmp/widgets/hero/hero.php:175, tmp/widgets/layout-slider/layout-slider.php:143
2077
  msgid "Side padding"
2078
  msgstr ""
2079
 
2080
- #: tmp/widgets/hero/hero.php:181, tmp/widgets/layout-slider/layout-slider.php:149
2081
  msgid "Maximum container width"
2082
  msgstr ""
2083
 
2084
- #: tmp/widgets/hero/hero.php:187
2085
  msgid "Heading font"
2086
  msgstr ""
2087
 
2088
- #: tmp/widgets/hero/hero.php:193, tmp/widgets/layout-slider/layout-slider.php:155
2089
  msgid "Heading color"
2090
  msgstr ""
2091
 
2092
- #: tmp/widgets/hero/hero.php:199, tmp/widgets/layout-slider/layout-slider.php:161
2093
  msgid "Heading size"
2094
  msgstr ""
2095
 
2096
- #: tmp/widgets/hero/hero.php:230, tmp/widgets/layout-slider/layout-slider.php:167
2097
  msgid "Heading shadow intensity"
2098
  msgstr ""
2099
 
2100
- #: tmp/widgets/hero/hero.php:238, tmp/widgets/layout-slider/layout-slider.php:175
2101
  msgid "Text size"
2102
  msgstr ""
2103
 
@@ -2137,10 +2149,6 @@ msgstr ""
2137
  msgid "Display"
2138
  msgstr ""
2139
 
2140
- #: tmp/widgets/image-grid/image-grid.php:86, tmp/widgets/image/image.php:38, tmp/widgets/testimonial/testimonial.php:130, tmp/widgets/testimonial/testimonial.php:159, tmp/widgets/testimonial/testimonial.php:201
2141
- msgid "Image size"
2142
- msgstr ""
2143
-
2144
  #: tmp/widgets/image-grid/image-grid.php:92
2145
  msgid "Maximum image height"
2146
  msgstr ""
@@ -2157,7 +2165,7 @@ msgstr ""
2157
  msgid "Amount of spacing between images."
2158
  msgstr ""
2159
 
2160
- #: tmp/widgets/image-grid/image-grid.php:151, tmp/widgets/image/image.php:187
2161
  msgid "Add a Lightbox to your images with %sSiteOrigin Premium%s"
2162
  msgstr ""
2163
 
@@ -2385,7 +2393,7 @@ msgstr ""
2385
  msgid "Mobile Layout"
2386
  msgstr ""
2387
 
2388
- #: tmp/widgets/simple-masonry/simple-masonry.php:223
2389
  msgid "Add a Lightbox to your masonry images with %sSiteOrigin Premium%s"
2390
  msgstr ""
2391
 
@@ -2409,7 +2417,7 @@ msgstr ""
2409
  msgid "Controls"
2410
  msgstr ""
2411
 
2412
- #: tmp/widgets/slider/slider.php:266
2413
  msgid "Add a Lightbox to your image slides with %sSiteOrigin Premium%s"
2414
  msgstr ""
2415
 
@@ -2609,10 +2617,42 @@ msgstr ""
2609
  msgid "Select network"
2610
  msgstr ""
2611
 
2612
- #: tmp/widgets/social-media-buttons/tpl/default.php:11
2613
  msgid "%s on %s"
2614
  msgstr ""
2615
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2616
  #: tmp/widgets/taxonomy/taxonomy.php:16
2617
  msgid "SiteOrigin Taxonomy"
2618
  msgstr ""
297
  msgid "Author"
298
  msgstr ""
299
 
300
+ #: tmp/base/inc/fields/posts.class.php:82, tmp/widgets/accordion/accordion.php:55, tmp/widgets/contact/contact.php:47, tmp/widgets/cta/cta.php:63, tmp/widgets/editor/editor.php:32, tmp/widgets/features/features.php:132, tmp/widgets/post-carousel/post-carousel.php:97, tmp/widgets/price-table/price-table.php:41, tmp/widgets/price-table/price-table.php:60, tmp/widgets/simple-masonry/simple-masonry.php:43, tmp/widgets/simple-masonry/simple-masonry.php:74, tmp/widgets/social-media-buttons/social-media-buttons.php:42, tmp/widgets/tabs/tabs.php:46, tmp/widgets/tabs/tabs.php:59, tmp/widgets/taxonomy/taxonomy.php:33, tmp/widgets/testimonial/testimonial.php:40, tmp/widgets/video/video.php:32
301
  msgid "Title"
302
  msgstr ""
303
 
378
  msgstr ""
379
 
380
  #: tmp/base/inc/fields/posts.class.php:125
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
+
384
+ #: tmp/base/inc/fields/presets.class.php:18
385
+ msgid "Warning! This will override some or all of the current form values."
386
+ msgstr ""
387
+
388
+ #: tmp/base/inc/fields/presets.class.php:48
389
+ msgid "Undo"
390
  msgstr ""
391
 
392
  #: tmp/base/inc/fields/repeater.class.php:54
637
  msgid "An accordion widget."
638
  msgstr ""
639
 
640
+ #: tmp/widgets/accordion/accordion.php:46, tmp/widgets/accordion/accordion.php:118, tmp/widgets/tabs/tabs.php:144
641
  msgid "Panels"
642
  msgstr ""
643
 
644
+ #: tmp/widgets/accordion/accordion.php:59, tmp/widgets/hero/hero.php:59, tmp/widgets/layout-slider/layout-slider.php:47, tmp/widgets/tabs/tabs.php:63
645
  msgid "Content"
646
  msgstr ""
647
 
648
+ #: tmp/widgets/accordion/accordion.php:63
649
  msgid "Initial state"
650
  msgstr ""
651
 
652
+ #: tmp/widgets/accordion/accordion.php:64
653
  msgid "Whether this panel should be open or closed when the page first loads."
654
  msgstr ""
655
 
656
+ #: tmp/widgets/accordion/accordion.php:66
657
  msgid "Open"
658
  msgstr ""
659
 
660
+ #: tmp/widgets/accordion/accordion.php:67
661
  msgid "Closed"
662
  msgstr ""
663
 
664
+ #: tmp/widgets/accordion/accordion.php:75, tmp/widgets/contact/contact.php:276, tmp/widgets/cta/cta.php:73, tmp/widgets/tabs/tabs.php:75, tmp/widgets/testimonial/testimonial.php:182
665
  msgid "Design"
666
  msgstr ""
667
 
668
+ #: tmp/widgets/accordion/accordion.php:80
669
  msgid "Headings"
670
  msgstr ""
671
 
672
+ #: tmp/widgets/accordion/accordion.php:85, tmp/widgets/accordion/accordion.php:123, tmp/widgets/contact/contact.php:286, tmp/widgets/contact/contact.php:515, tmp/widgets/cta/cta.php:77, tmp/widgets/hero/hero.php:118, tmp/widgets/layout-slider/layout-slider.php:81, tmp/widgets/social-media-buttons/social-media-buttons.php:74, tmp/widgets/tabs/tabs.php:85, tmp/widgets/tabs/tabs.php:105, tmp/widgets/tabs/tabs.php:149
673
  msgid "Background color"
674
  msgstr ""
675
 
676
+ #: tmp/widgets/accordion/accordion.php:90, tmp/widgets/tabs/tabs.php:109
677
  msgid "Background hover color"
678
  msgstr ""
679
 
680
+ #: tmp/widgets/accordion/accordion.php:95, tmp/widgets/cta/cta.php:85, tmp/widgets/tabs/tabs.php:114
681
  msgid "Title color"
682
  msgstr ""
683
 
684
+ #: tmp/widgets/accordion/accordion.php:100, tmp/widgets/tabs/tabs.php:119
685
  msgid "Title hover color"
686
  msgstr ""
687
 
688
+ #: tmp/widgets/accordion/accordion.php:104, tmp/widgets/accordion/accordion.php:132, tmp/widgets/contact/contact.php:296, tmp/widgets/contact/contact.php:409, tmp/widgets/contact/contact.php:525, tmp/widgets/cta/cta.php:81, tmp/widgets/tabs/tabs.php:90, tmp/widgets/tabs/tabs.php:124, tmp/widgets/tabs/tabs.php:158
689
  msgid "Border color"
690
  msgstr ""
691
 
692
+ #: tmp/widgets/accordion/accordion.php:108, tmp/widgets/tabs/tabs.php:129
693
  msgid "Border hover color"
694
  msgstr ""
695
 
696
+ #: tmp/widgets/accordion/accordion.php:112, tmp/widgets/accordion/accordion.php:136, tmp/widgets/contact/contact.php:301, tmp/widgets/contact/contact.php:414, tmp/widgets/contact/contact.php:541, tmp/widgets/tabs/tabs.php:94, tmp/widgets/tabs/tabs.php:134, tmp/widgets/tabs/tabs.php:162
697
  msgid "Border width"
698
  msgstr ""
699
 
700
+ #: tmp/widgets/accordion/accordion.php:128, tmp/widgets/tabs/tabs.php:154
701
  msgid "Font color"
702
  msgstr ""
703
 
704
+ #: tmp/widgets/accordion/accordion.php:140
705
  msgid "Bottom margin"
706
  msgstr ""
707
 
708
+ #: tmp/widgets/accordion/accordion.php:216
709
  msgid "Get more customization options and the ability to use widgets and layouts as your accordion content with %sSiteOrigin Premium%s"
710
  msgstr ""
711
 
721
  msgid "Button text"
722
  msgstr ""
723
 
724
+ #: tmp/widgets/button/button.php:50, tmp/widgets/google-map/google-map.php:104, tmp/widgets/headline/headline.php:44, tmp/widgets/headline/headline.php:115, tmp/widgets/hero/hero.php:124, tmp/widgets/icon/icon.php:56, tmp/widgets/image/image.php:76, tmp/widgets/layout-slider/layout-slider.php:87, tmp/widgets/simple-masonry/simple-masonry.php:78, tmp/widgets/slider/slider.php:84
725
  msgid "Destination URL"
726
  msgstr ""
727
 
797
  msgid "Button color"
798
  msgstr ""
799
 
800
+ #: tmp/widgets/button/button.php:124, tmp/widgets/contact/contact.php:553, tmp/widgets/hero/hero.php:249, tmp/widgets/layout-slider/layout-slider.php:181
801
  msgid "Text color"
802
  msgstr ""
803
 
926
  msgstr ""
927
 
928
  #: tmp/widgets/contact/contact.php:64
929
+ msgid "Where contact emails will be delivered to. You can send to multiple emails by separating the emails with a comma (,)"
930
  msgstr ""
931
 
932
  #: tmp/widgets/contact/contact.php:69
1225
  msgid "Margin"
1226
  msgstr ""
1227
 
1228
+ #: tmp/widgets/contact/contact.php:401, tmp/widgets/google-map/google-map.php:100, tmp/widgets/hero/hero.php:161, tmp/widgets/layout-slider/layout-slider.php:124
1229
  msgid "Height"
1230
  msgstr ""
1231
 
1722
  msgstr ""
1723
 
1724
  #: tmp/widgets/google-map/google-map.php:298
1725
+ msgid "Copy and paste predefined styles here from <a href=\"http://snazzymaps.com/\" target=\"_blank\" rel=\"noopener noreferrer\">Snazzy Maps</a>."
1726
  msgstr ""
1727
 
1728
  #: tmp/widgets/google-map/google-map.php:306
1993
  msgid "Sub Headline"
1994
  msgstr ""
1995
 
1996
+ #: tmp/widgets/headline/headline.php:244, tmp/widgets/hero/hero.php:210
1997
  msgid "Use FitText"
1998
  msgstr ""
1999
 
2000
+ #: tmp/widgets/headline/headline.php:245, tmp/widgets/hero/hero.php:211
2001
  msgid "Dynamically adjust your heading font size based on screen size."
2002
  msgstr ""
2003
 
2004
+ #: tmp/widgets/headline/headline.php:258, tmp/widgets/hero/hero.php:224
2005
  msgid "FitText Compressor Strength"
2006
  msgstr ""
2007
 
2008
+ #: tmp/widgets/headline/headline.php:259, tmp/widgets/hero/hero.php:225
2009
  msgid "How aggressively FitText should resize your heading."
2010
  msgstr ""
2011
 
2037
  msgid "Background image"
2038
  msgstr ""
2039
 
2040
+ #: tmp/widgets/hero/hero.php:96, tmp/widgets/image-grid/image-grid.php:86, tmp/widgets/image/image.php:38, tmp/widgets/testimonial/testimonial.php:130, tmp/widgets/testimonial/testimonial.php:159, tmp/widgets/testimonial/testimonial.php:201
2041
+ msgid "Image size"
2042
+ msgstr ""
2043
+
2044
+ #: tmp/widgets/hero/hero.php:101, tmp/widgets/layout-slider/layout-slider.php:63, tmp/widgets/slider/slider.php:67
2045
  msgid "Background image type"
2046
  msgstr ""
2047
 
2048
+ #: tmp/widgets/hero/hero.php:103, tmp/widgets/slider/slider.php:69
2049
  msgid "Cover"
2050
  msgstr ""
2051
 
2052
+ #: tmp/widgets/hero/hero.php:109, tmp/widgets/layout-slider/layout-slider.php:72
2053
  msgid "Background image opacity"
2054
  msgstr ""
2055
 
2056
+ #: tmp/widgets/hero/hero.php:129, tmp/widgets/layout-slider/layout-slider.php:92
2057
  msgid "Open URL in a new window"
2058
  msgstr ""
2059
 
2060
+ #: tmp/widgets/hero/hero.php:134, tmp/widgets/layout-slider/layout-slider.php:97, tmp/widgets/slider/slider.php:43
2061
  msgid "Video"
2062
  msgstr ""
2063
 
2064
+ #: tmp/widgets/hero/hero.php:135, tmp/widgets/layout-slider/layout-slider.php:98, tmp/widgets/slider/slider.php:44
2065
  msgid "Background videos"
2066
  msgstr ""
2067
 
2068
+ #: tmp/widgets/hero/hero.php:150, tmp/widgets/layout-slider/layout-slider.php:113
2069
  msgid "Slider Controls"
2070
  msgstr ""
2071
 
2072
+ #: tmp/widgets/hero/hero.php:156, tmp/widgets/layout-slider/layout-slider.php:119
2073
  msgid "Design and Layout"
2074
  msgstr ""
2075
 
2076
+ #: tmp/widgets/hero/hero.php:167, tmp/widgets/layout-slider/layout-slider.php:130
2077
  msgid "Top and bottom padding"
2078
  msgstr ""
2079
 
2080
+ #: tmp/widgets/hero/hero.php:173, tmp/widgets/layout-slider/layout-slider.php:136
2081
  msgid "Extra top padding"
2082
  msgstr ""
2083
 
2084
+ #: tmp/widgets/hero/hero.php:174, tmp/widgets/layout-slider/layout-slider.php:137
2085
  msgid "Additional padding added to the top of the slider"
2086
  msgstr ""
2087
 
2088
+ #: tmp/widgets/hero/hero.php:180, tmp/widgets/layout-slider/layout-slider.php:143
2089
  msgid "Side padding"
2090
  msgstr ""
2091
 
2092
+ #: tmp/widgets/hero/hero.php:186, tmp/widgets/layout-slider/layout-slider.php:149
2093
  msgid "Maximum container width"
2094
  msgstr ""
2095
 
2096
+ #: tmp/widgets/hero/hero.php:192
2097
  msgid "Heading font"
2098
  msgstr ""
2099
 
2100
+ #: tmp/widgets/hero/hero.php:198, tmp/widgets/layout-slider/layout-slider.php:155
2101
  msgid "Heading color"
2102
  msgstr ""
2103
 
2104
+ #: tmp/widgets/hero/hero.php:204, tmp/widgets/layout-slider/layout-slider.php:161
2105
  msgid "Heading size"
2106
  msgstr ""
2107
 
2108
+ #: tmp/widgets/hero/hero.php:235, tmp/widgets/layout-slider/layout-slider.php:167
2109
  msgid "Heading shadow intensity"
2110
  msgstr ""
2111
 
2112
+ #: tmp/widgets/hero/hero.php:243, tmp/widgets/layout-slider/layout-slider.php:175
2113
  msgid "Text size"
2114
  msgstr ""
2115
 
2149
  msgid "Display"
2150
  msgstr ""
2151
 
 
 
 
 
2152
  #: tmp/widgets/image-grid/image-grid.php:92
2153
  msgid "Maximum image height"
2154
  msgstr ""
2165
  msgid "Amount of spacing between images."
2166
  msgstr ""
2167
 
2168
+ #: tmp/widgets/image-grid/image-grid.php:152, tmp/widgets/image/image.php:188
2169
  msgid "Add a Lightbox to your images with %sSiteOrigin Premium%s"
2170
  msgstr ""
2171
 
2393
  msgid "Mobile Layout"
2394
  msgstr ""
2395
 
2396
+ #: tmp/widgets/simple-masonry/simple-masonry.php:224
2397
  msgid "Add a Lightbox to your masonry images with %sSiteOrigin Premium%s"
2398
  msgstr ""
2399
 
2417
  msgid "Controls"
2418
  msgstr ""
2419
 
2420
+ #: tmp/widgets/slider/slider.php:267
2421
  msgid "Add a Lightbox to your image slides with %sSiteOrigin Premium%s"
2422
  msgstr ""
2423
 
2617
  msgid "Select network"
2618
  msgstr ""
2619
 
2620
+ #: tmp/widgets/social-media-buttons/tpl/default.php:9
2621
  msgid "%s on %s"
2622
  msgstr ""
2623
 
2624
+ #: tmp/widgets/tabs/tabs.php:14
2625
+ msgid "SiteOrigin Tabs"
2626
+ msgstr ""
2627
+
2628
+ #: tmp/widgets/tabs/tabs.php:16
2629
+ msgid "A tabs widget."
2630
+ msgstr ""
2631
+
2632
+ #: tmp/widgets/tabs/tabs.php:50, tmp/widgets/tabs/tabs.php:100
2633
+ msgid "Tabs"
2634
+ msgstr ""
2635
+
2636
+ #: tmp/widgets/tabs/tabs.php:69
2637
+ msgid "Initially selected tab"
2638
+ msgstr ""
2639
+
2640
+ #: tmp/widgets/tabs/tabs.php:71
2641
+ msgid "The position of the tab to be selected when the page first loads."
2642
+ msgstr ""
2643
+
2644
+ #: tmp/widgets/tabs/tabs.php:80
2645
+ msgid "Tabs container"
2646
+ msgstr ""
2647
+
2648
+ #: tmp/widgets/tabs/tabs.php:138
2649
+ msgid "Border hover width"
2650
+ msgstr ""
2651
+
2652
+ #: tmp/widgets/tabs/tabs.php:240
2653
+ msgid "Get more customization options and the ability to use widgets and layouts as your tabs content with %sSiteOrigin Premium%s"
2654
+ msgstr ""
2655
+
2656
  #: tmp/widgets/taxonomy/taxonomy.php:16
2657
  msgid "SiteOrigin Taxonomy"
2658
  msgstr ""
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === SiteOrigin Widgets Bundle ===
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: 4.8.1
5
- Stable tag: 1.10.2
6
- Build time: 2017-10-20T17:00:13+02:00
7
  License: GPLv3 or later
8
  Contributors: gpriday, braam-genis
9
  Donate link: https://siteorigin.com/downloads/contribution/
@@ -54,6 +54,17 @@ The SiteOrigin Widgets Bundle is the perfect platform to build widgets for your
54
 
55
  == Changelog ==
56
 
 
 
 
 
 
 
 
 
 
 
 
57
  = 1.10.2 - 20 October 2017 =
58
  * Fix for links sometimes not working in slider widgets.
59
  * Fix multi-measurement field labels.
1
  === SiteOrigin Widgets Bundle ===
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: 4.9
5
+ Stable tag: 1.11.0
6
+ Build time: 2017-11-07T09:54:35+02:00
7
  License: GPLv3 or later
8
  Contributors: gpriday, braam-genis
9
  Donate link: https://siteorigin.com/downloads/contribution/
54
 
55
  == Changelog ==
56
 
57
+ = 1.11.0 - 7 November 2017 =
58
+ * New Tabs widget!
59
+ * Contact: mention it's possible to send to multiple emails.
60
+ * Features: Fixes margin causing extended page.
61
+ * Presets field.
62
+ * Accordion: Add Repeater Label Title.
63
+ * Hero: ability to select an image size.
64
+ * TinyMCE field: Remember last selected editor.
65
+ * Add rel="noopener noreferrer" for all 3rd party/unknown links.
66
+ * Social Media Buttons Widget: comply WCAG 2.4.4
67
+
68
  = 1.10.2 - 20 October 2017 =
69
  * Fix for links sometimes not working in slider widgets.
70
  * Fix multi-measurement field labels.
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.10.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.10.2');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
@@ -727,7 +727,7 @@ class SiteOrigin_Widgets_Bundle {
727
  function plugin_action_links($links){
728
  unset( $links['edit'] );
729
  $links['manage'] = '<a href="' . admin_url('plugins.php?page=so-widgets-plugins') . '">'.__('Manage Widgets', 'so-widgets-bundle').'</a>';
730
- $links['support'] = '<a href="https://siteorigin.com/thread/" target="_blank">'.__('Support', 'so-widgets-bundle').'</a>';
731
  return $links;
732
  }
733
 
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.11.0
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
+ define('SOW_BUNDLE_VERSION', '1.11.0');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
727
  function plugin_action_links($links){
728
  unset( $links['edit'] );
729
  $links['manage'] = '<a href="' . admin_url('plugins.php?page=so-widgets-plugins') . '">'.__('Manage Widgets', 'so-widgets-bundle').'</a>';
730
+ $links['support'] = '<a href="https://siteorigin.com/thread/" target="_blank" rel="noopener noreferrer">'.__('Support', 'so-widgets-bundle').'</a>';
731
  return $links;
732
  }
733
 
widgets/accordion/accordion.php CHANGED
@@ -44,6 +44,11 @@ class SiteOrigin_Widget_Accordion_Widget extends SiteOrigin_Widget {
44
  'panels' => array(
45
  'type' => 'repeater',
46
  'label' => __( 'Panels', 'so-widgets-bundle' ),
 
 
 
 
 
47
  'fields' => array(
48
  'title' => array(
49
  'type' => 'text',
@@ -168,15 +173,22 @@ class SiteOrigin_Widget_Accordion_Widget extends SiteOrigin_Widget {
168
 
169
  $panels = empty( $instance['panels'] ) ? array() : $instance['panels'];
170
 
171
- foreach ( $panels as &$panel ) {
172
  if ( empty( $panel['before_title'] ) ) {
173
  $panel['before_title'] = '';
174
  }
175
  if ( empty( $panel['after_title'] ) ) {
176
  $panel['after_title'] = '';
177
  }
 
 
 
 
 
 
178
  }
179
 
 
180
  if ( empty( $instance['design']['heading']['icon_open'] ) ) {
181
  $instance['design']['heading']['icon_open'] = 'ionicons-plus';
182
  }
@@ -202,7 +214,7 @@ class SiteOrigin_Widget_Accordion_Widget extends SiteOrigin_Widget {
202
  if( class_exists( 'SiteOrigin_Premium' ) ) return false;
203
  return sprintf(
204
  __( 'Get more customization options and the ability to use widgets and layouts as your accordion content with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
205
- '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/accordion" target="_blank">',
206
  '</a>'
207
  );
208
  }
44
  'panels' => array(
45
  'type' => 'repeater',
46
  'label' => __( 'Panels', 'so-widgets-bundle' ),
47
+ 'item_label' => array(
48
+ 'selector' => "[id*='panels-title']",
49
+ 'update_event' => 'change',
50
+ 'value_method' => 'val'
51
+ ),
52
  'fields' => array(
53
  'title' => array(
54
  'type' => 'text',
173
 
174
  $panels = empty( $instance['panels'] ) ? array() : $instance['panels'];
175
 
176
+ foreach ( $panels as $i => &$panel ) {
177
  if ( empty( $panel['before_title'] ) ) {
178
  $panel['before_title'] = '';
179
  }
180
  if ( empty( $panel['after_title'] ) ) {
181
  $panel['after_title'] = '';
182
  }
183
+
184
+ if ( empty( $panel['title'] ) ) {
185
+ $panel['anchor'] = $this->id_base . $instance['_sow_form_id'] . '-' . $i;
186
+ } else {
187
+ $panel['anchor'] = $panel['title'];
188
+ }
189
  }
190
 
191
+
192
  if ( empty( $instance['design']['heading']['icon_open'] ) ) {
193
  $instance['design']['heading']['icon_open'] = 'ionicons-plus';
194
  }
214
  if( class_exists( 'SiteOrigin_Premium' ) ) return false;
215
  return sprintf(
216
  __( 'Get more customization options and the ability to use widgets and layouts as your accordion content with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
217
+ '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/accordion" target="_blank" rel="noopener noreferrer">',
218
  '</a>'
219
  );
220
  }
widgets/accordion/js/accordion.js CHANGED
@@ -1,27 +1,44 @@
1
  jQuery( function ( $ ) {
2
 
3
  $( '.sow-accordion' ).each( function ( index, element ) {
 
 
 
4
  var $accordionPanels = $( element ).find( '> .sow-accordion-panel' );
5
 
6
  $accordionPanels.not( '.sow-accordion-panel-open' ).find( '.sow-accordion-panel-content' ).hide();
7
 
8
  var openPanels = $accordionPanels.filter( '.sow-accordion-panel-open' ).toArray();
 
 
 
9
 
10
- var openPanel = function ( panel ) {
11
- $( panel ).find( '> .sow-accordion-panel-content' ).slideDown();
12
- $( panel ).addClass( 'sow-accordion-panel-open' );
13
- openPanels.push( panel );
 
 
 
 
 
 
14
  };
15
 
16
- var closePanel = function ( panel ) {
17
- $( panel ).find( '> .sow-accordion-panel-content' ).slideUp();
18
- $( panel ).removeClass( 'sow-accordion-panel-open' );
19
- openPanels.splice( openPanels.indexOf( panel ), 1 );
 
 
 
 
 
 
20
  };
21
 
22
  $accordionPanels.find( '> .sow-accordion-panel-header' ).click( function () {
23
  var $this = $( this );
24
- var $widget = $this.closest( '.so-widget-sow-accordion' );
25
  var maxOpenPanels = $widget.data( 'maxOpenPanels' );
26
  var $panel = $this.closest( '.sow-accordion-panel' );
27
  if ( $panel.is( '.sow-accordion-panel-open' ) ) {
@@ -33,5 +50,38 @@ jQuery( function ( $ ) {
33
  closePanel( openPanels[ 0 ] );
34
  }
35
  } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  } );
37
  } );
1
  jQuery( function ( $ ) {
2
 
3
  $( '.sow-accordion' ).each( function ( index, element ) {
4
+ var $widget = $( this ).closest( '.so-widget-sow-accordion' );
5
+ var useAnchorTags = $widget.data( 'useAnchorTags' );
6
+
7
  var $accordionPanels = $( element ).find( '> .sow-accordion-panel' );
8
 
9
  $accordionPanels.not( '.sow-accordion-panel-open' ).find( '.sow-accordion-panel-content' ).hide();
10
 
11
  var openPanels = $accordionPanels.filter( '.sow-accordion-panel-open' ).toArray();
12
+ var updateHash = function () {
13
+ // noop
14
+ };
15
 
16
+ var openPanel = function ( panel, preventHashChange ) {
17
+ var $panel = $( panel );
18
+ if ( ! $panel.is( '.sow-accordion-panel-open' ) ) {
19
+ $panel.find( '> .sow-accordion-panel-content' ).slideDown();
20
+ $panel.addClass( 'sow-accordion-panel-open' );
21
+ openPanels.push( panel );
22
+ if ( ! preventHashChange ) {
23
+ updateHash();
24
+ }
25
+ }
26
  };
27
 
28
+ var closePanel = function ( panel, preventHashChange ) {
29
+ var $panel = $( panel );
30
+ if ( $panel.is( '.sow-accordion-panel-open' ) ) {
31
+ $panel.find( '> .sow-accordion-panel-content' ).slideUp();
32
+ $panel.removeClass( 'sow-accordion-panel-open' );
33
+ openPanels.splice( openPanels.indexOf( panel ), 1 );
34
+ if ( ! preventHashChange ) {
35
+ updateHash();
36
+ }
37
+ }
38
  };
39
 
40
  $accordionPanels.find( '> .sow-accordion-panel-header' ).click( function () {
41
  var $this = $( this );
 
42
  var maxOpenPanels = $widget.data( 'maxOpenPanels' );
43
  var $panel = $this.closest( '.sow-accordion-panel' );
44
  if ( $panel.is( '.sow-accordion-panel-open' ) ) {
50
  closePanel( openPanels[ 0 ] );
51
  }
52
  } );
53
+
54
+ if ( useAnchorTags ) {
55
+ updateHash = function () {
56
+ var anchors = [];
57
+ for ( var i = 0; i < openPanels.length; i++ ) {
58
+ var anchor = $( openPanels[ i ] ).data( 'anchor' );
59
+ if ( anchor ) {
60
+ anchors[ i ] = anchor;
61
+ }
62
+ }
63
+
64
+ window.location.hash = anchors.join( ',' );
65
+ };
66
+
67
+ var updatePanelStates = function () {
68
+ var panels = $accordionPanels.toArray();
69
+ for ( var i = 0; i < panels.length; i++ ) {
70
+ panel = panels[ i ];
71
+ var anchor = $( panel ).data( 'anchor' );
72
+ if ( anchor && window.location.hash.indexOf( anchor ) > -1 ) {
73
+ openPanel( panel, true );
74
+ } else {
75
+ closePanel( panel, true );
76
+ }
77
+ }
78
+ };
79
+ $( window ).on( 'hashchange', updatePanelStates );
80
+ if ( window.location.hash ) {
81
+ updatePanelStates();
82
+ } else {
83
+ updateHash();
84
+ }
85
+ }
86
  } );
87
  } );
widgets/accordion/js/accordion.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(o){o(".sow-accordion").each(function(n,c){var e=o(c).find("> .sow-accordion-panel");e.not(".sow-accordion-panel-open").find(".sow-accordion-panel-content").hide();var a=e.filter(".sow-accordion-panel-open").toArray(),i=function(n){o(n).find("> .sow-accordion-panel-content").slideDown(),o(n).addClass("sow-accordion-panel-open"),a.push(n)},s=function(n){o(n).find("> .sow-accordion-panel-content").slideUp(),o(n).removeClass("sow-accordion-panel-open"),a.splice(a.indexOf(n),1)};e.find("> .sow-accordion-panel-header").click(function(){var n=o(this),c=n.closest(".so-widget-sow-accordion"),e=c.data("maxOpenPanels"),d=n.closest(".sow-accordion-panel");d.is(".sow-accordion-panel-open")?s(d.get(0)):i(d.get(0)),!isNaN(e)&&e>0&&a.length>e&&s(a[0])})})});
1
+ jQuery(function(n){n(".sow-accordion").each(function(o,a){var c=n(this).closest(".so-widget-sow-accordion"),e=c.data("useAnchorTags"),i=n(a).find("> .sow-accordion-panel");i.not(".sow-accordion-panel-open").find(".sow-accordion-panel-content").hide();var s=i.filter(".sow-accordion-panel-open").toArray(),r=function(){},d=function(o,a){var c=n(o);c.is(".sow-accordion-panel-open")||(c.find("> .sow-accordion-panel-content").slideDown(),c.addClass("sow-accordion-panel-open"),s.push(o),a||r())},t=function(o,a){var c=n(o);c.is(".sow-accordion-panel-open")&&(c.find("> .sow-accordion-panel-content").slideUp(),c.removeClass("sow-accordion-panel-open"),s.splice(s.indexOf(o),1),a||r())};if(i.find("> .sow-accordion-panel-header").click(function(){var o=n(this),a=c.data("maxOpenPanels"),e=o.closest(".sow-accordion-panel");e.is(".sow-accordion-panel-open")?t(e.get(0)):d(e.get(0)),!isNaN(a)&&a>0&&s.length>a&&t(s[0])}),e){r=function(){for(var o=[],a=0;a<s.length;a++){var c=n(s[a]).data("anchor");c&&(o[a]=c)}window.location.hash=o.join(",")};var l=function(){for(var o=i.toArray(),a=0;a<o.length;a++){panel=o[a];var c=n(panel).data("anchor");c&&window.location.hash.indexOf(c)>-1?d(panel,!0):t(panel,!0)}};n(window).on("hashchange",l),window.location.hash?l():r()}})});
widgets/accordion/styles/default.less CHANGED
@@ -10,6 +10,7 @@
10
  @heading_title_font_family: default;
11
  @heading_title_font_weight: default;
12
  @heading_title_font_size: default;
 
13
  @heading_border_color: default;
14
  @heading_border_hover_color: default;
15
  @has_heading_border_width: default;
@@ -20,6 +21,8 @@
20
  @open_close_location: right;
21
 
22
  @panels_background_color: default;
 
 
23
  @panels_font_color: default;
24
  @panels_border_color: default;
25
  @has_panels_border_width: default;
@@ -40,6 +43,7 @@
40
  font-family: @heading_title_font_family;
41
  font-weight: @heading_title_font_weight;
42
  font-size: @heading_title_font_size;
 
43
 
44
  & when( @has_heading_border_width = true ) {
45
  border-style: solid;
@@ -90,6 +94,8 @@
90
  }
91
  padding: @panels_padding;
92
  color: @panels_font_color;
 
 
93
  }
94
  }
95
  margin-bottom: @panels_margin_bottom;
10
  @heading_title_font_family: default;
11
  @heading_title_font_weight: default;
12
  @heading_title_font_size: default;
13
+ @heading_title_text_transform: default;
14
  @heading_border_color: default;
15
  @heading_border_hover_color: default;
16
  @has_heading_border_width: default;
21
  @open_close_location: right;
22
 
23
  @panels_background_color: default;
24
+ @panels_font_family: default;
25
+ @panels_font_size: default;
26
  @panels_font_color: default;
27
  @panels_border_color: default;
28
  @has_panels_border_width: default;
43
  font-family: @heading_title_font_family;
44
  font-weight: @heading_title_font_weight;
45
  font-size: @heading_title_font_size;
46
+ text-transform: @heading_title_text_transform;
47
 
48
  & when( @has_heading_border_width = true ) {
49
  border-style: solid;
94
  }
95
  padding: @panels_padding;
96
  color: @panels_font_color;
97
+ font-family: @panels_font_family;
98
+ font-size: @panels_font_size;
99
  }
100
  }
101
  margin-bottom: @panels_margin_bottom;
widgets/accordion/tpl/default.php CHANGED
@@ -10,7 +10,8 @@
10
  <div>
11
  <div class="sow-accordion">
12
  <?php foreach ( $panels as $panel ) : ?>
13
- <div class="sow-accordion-panel<?php if ( $panel['initial_state'] == 'open' ) echo ' sow-accordion-panel-open'; ?>">
 
14
  <div class="sow-accordion-panel-header">
15
  <div class="sow-accordion-title">
16
  <?php echo $panel['before_title']; ?>
10
  <div>
11
  <div class="sow-accordion">
12
  <?php foreach ( $panels as $panel ) : ?>
13
+ <div class="sow-accordion-panel<?php if ( $panel['initial_state'] == 'open' ) echo ' sow-accordion-panel-open'; ?>"
14
+ data-anchor="<?php echo sanitize_title_with_dashes( $panel['anchor'] ); ?>">
15
  <div class="sow-accordion-panel-header">
16
  <div class="sow-accordion-title">
17
  <?php echo $panel['before_title']; ?>
widgets/button/button.php CHANGED
@@ -242,6 +242,7 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
242
 
243
  if ( ! empty( $instance['new_window'] ) ) {
244
  $button_attributes['target'] = '_blank';
 
245
  }
246
 
247
  if ( ! empty( $attributes['id'] ) ) {
@@ -251,7 +252,11 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
251
  $button_attributes['title'] = $attributes['title'];
252
  }
253
  if ( ! empty( $attributes['rel'] ) ) {
254
- $button_attributes['rel'] = $attributes['rel'];
 
 
 
 
255
  }
256
 
257
  $icon_image_url = '';
242
 
243
  if ( ! empty( $instance['new_window'] ) ) {
244
  $button_attributes['target'] = '_blank';
245
+ $button_attributes['rel'] = 'noopener noreferrer';
246
  }
247
 
248
  if ( ! empty( $attributes['id'] ) ) {
252
  $button_attributes['title'] = $attributes['title'];
253
  }
254
  if ( ! empty( $attributes['rel'] ) ) {
255
+ if ( isset ( $button_attributes['rel'] ) ) {
256
+ $button_attributes['rel'] .= " $attributes[rel]";
257
+ } else {
258
+ $button_attributes['rel'] = $attributes['rel'];
259
+ }
260
  }
261
 
262
  $icon_image_url = '';
widgets/contact/contact.php CHANGED
@@ -61,7 +61,7 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
61
  'to' => array(
62
  'type' => 'text',
63
  'label' => __( 'To email address', 'so-widgets-bundle' ),
64
- 'description' => __( 'Where contact emails will be delivered to.', 'so-widgets-bundle' ),
65
  'sanitize' => 'multiple_emails',
66
  ),
67
  'from' => array(
@@ -634,7 +634,7 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
634
 
635
  return sprintf(
636
  __( 'Get more form fields for the Contact Form Widget in %s', 'so-widgets-bundle' ),
637
- '<a href="' . esc_url( $url ) . '" target="_blank">' . __( 'SiteOrigin Premium', 'so-widgets-bundle' ) . '</a>'
638
  );
639
  }
640
 
61
  'to' => array(
62
  'type' => 'text',
63
  'label' => __( 'To email address', 'so-widgets-bundle' ),
64
+ 'description' => __( 'Where contact emails will be delivered to. You can send to multiple emails by separating the emails with a comma (,)', 'so-widgets-bundle' ),
65
  'sanitize' => 'multiple_emails',
66
  ),
67
  'from' => array(
634
 
635
  return sprintf(
636
  __( 'Get more form fields for the Contact Form Widget in %s', 'so-widgets-bundle' ),
637
+ '<a href="' . esc_url( $url ) . '" target="_blank" rel="noopener noreferrer">' . __( 'SiteOrigin Premium', 'so-widgets-bundle' ) . '</a>'
638
  );
639
  }
640
 
widgets/features/styles/default.less CHANGED
@@ -164,6 +164,7 @@
164
 
165
  @media (max-width: 520px) {
166
  &.sow-features-responsive {
 
167
 
168
  .sow-features-feature {
169
  width: 100% !important;
164
 
165
  @media (max-width: 520px) {
166
  &.sow-features-responsive {
167
+ margin: 0;
168
 
169
  .sow-features-feature {
170
  width: 100% !important;
widgets/features/tpl/default.php CHANGED
@@ -13,7 +13,7 @@ $last_row = floor( ( count($instance['features']) - 1 ) / $instance['per_row'] )
13
 
14
  <div class="sow-features-feature sow-icon-container-position-<?php echo esc_attr( $feature['container_position'] ) ?> <?php if( floor( $i / $instance['per_row'] ) == $last_row ) echo 'sow-features-feature-last-row' ?>" style="width: <?php echo round( 100 / $instance['per_row'], 3 ) ?>%">
15
 
16
- <?php if( !empty( $feature['more_url'] ) && $instance['icon_link'] ) echo '<a href="' . sow_esc_url( $feature['more_url'] ) . '" ' . ( $instance['new_window'] ? 'target="_blank"' : '' ) . '>'; ?>
17
  <div
18
  class="sow-icon-container <?php echo !empty($instance['container_shape']) ? 'sow-container-' . esc_attr($instance['container_shape']) : 'sow-container-none'?>"
19
  style="color: <?php echo esc_attr($feature['container_color']) ?>; "
@@ -43,7 +43,7 @@ $last_row = floor( ( count($instance['features']) - 1 ) / $instance['per_row'] )
43
  <div class="textwidget">
44
  <?php if(!empty($feature['title'])) : ?>
45
  <h5>
46
- <?php if( !empty( $feature['more_url'] ) && $instance['title_link'] ) echo '<a href="' . sow_esc_url( $feature['more_url'] ) . '" ' . ( $instance['new_window'] ? 'target="_blank"' : '' ) . '>'; ?>
47
  <?php echo wp_kses_post( $feature['title'] ) ?>
48
  <?php if( !empty( $feature['more_url'] ) && $instance['title_link'] ) echo '</a>'; ?>
49
  </h5>
@@ -55,7 +55,7 @@ $last_row = floor( ( count($instance['features']) - 1 ) / $instance['per_row'] )
55
 
56
  <?php if(!empty($feature['more_text'])) : ?>
57
  <p class="sow-more-text">
58
- <?php if( !empty( $feature['more_url'] ) ) echo '<a href="' . sow_esc_url( $feature['more_url'] ) . '" ' . ( $instance['new_window'] ? 'target="_blank"' : '' ) . '>'; ?>
59
  <?php echo wp_kses_post( $feature['more_text'] ) ?>
60
  <?php if( !empty( $feature['more_url'] ) ) echo '</a>'; ?>
61
  </p>
13
 
14
  <div class="sow-features-feature sow-icon-container-position-<?php echo esc_attr( $feature['container_position'] ) ?> <?php if( floor( $i / $instance['per_row'] ) == $last_row ) echo 'sow-features-feature-last-row' ?>" style="width: <?php echo round( 100 / $instance['per_row'], 3 ) ?>%">
15
 
16
+ <?php if( !empty( $feature['more_url'] ) && $instance['icon_link'] ) echo '<a href="' . sow_esc_url( $feature['more_url'] ) . '" ' . ( $instance['new_window'] ? 'target="_blank" rel="noopener noreferrer"' : '' ) . '>'; ?>
17
  <div
18
  class="sow-icon-container <?php echo !empty($instance['container_shape']) ? 'sow-container-' . esc_attr($instance['container_shape']) : 'sow-container-none'?>"
19
  style="color: <?php echo esc_attr($feature['container_color']) ?>; "
43
  <div class="textwidget">
44
  <?php if(!empty($feature['title'])) : ?>
45
  <h5>
46
+ <?php if( !empty( $feature['more_url'] ) && $instance['title_link'] ) echo '<a href="' . sow_esc_url( $feature['more_url'] ) . '" ' . ( $instance['new_window'] ? 'target="_blank" rel="noopener noreferrer"' : '' ) . '>'; ?>
47
  <?php echo wp_kses_post( $feature['title'] ) ?>
48
  <?php if( !empty( $feature['more_url'] ) && $instance['title_link'] ) echo '</a>'; ?>
49
  </h5>
55
 
56
  <?php if(!empty($feature['more_text'])) : ?>
57
  <p class="sow-more-text">
58
+ <?php if( !empty( $feature['more_url'] ) ) echo '<a href="' . sow_esc_url( $feature['more_url'] ) . '" ' . ( $instance['new_window'] ? 'target="_blank" rel="noopener noreferrer"' : '' ) . '>'; ?>
59
  <?php echo wp_kses_post( $feature['more_text'] ) ?>
60
  <?php if( !empty( $feature['more_url'] ) ) echo '</a>'; ?>
61
  </p>
widgets/google-map/google-map.php CHANGED
@@ -44,7 +44,7 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
44
  'label' => __( 'Map center', 'so-widgets-bundle' ),
45
  'description' => sprintf(
46
  __( '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.', 'so-widgets-bundle' ),
47
- '<a href="https://console.developers.google.com/apis/dashboard?project=_" target="_blank">',
48
  '</a>'
49
  ),
50
  ),
@@ -59,7 +59,7 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
59
  'required' => true,
60
  'description' => sprintf(
61
  __( 'Enter your %sAPI key%s. Your map may not function correctly without one.', 'so-widgets-bundle' ),
62
- '<a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank">',
63
  '</a>'
64
  )
65
  )
@@ -295,7 +295,7 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
295
  'rows' => 5,
296
  'hidden' => true,
297
  'label' => __( 'Raw JSON styles', 'so-widgets-bundle' ),
298
- 'description' => __( 'Copy and paste predefined styles here from <a href="http://snazzymaps.com/" target="_blank">Snazzy Maps</a>.', 'so-widgets-bundle' )
299
  ),
300
  'custom_map_styles' => array(
301
  'type' => 'repeater',
@@ -367,7 +367,7 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
367
  'hide' => true,
368
  'description' => sprintf(
369
  __( '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.', 'so-widgets-bundle' ),
370
- '<a href="https://console.developers.google.com/apis/dashboard?project=_" target="_blank">',
371
  '</a>'
372
  ),
373
  'fields' => array(
@@ -445,7 +445,7 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
445
  'required' => true,
446
  'description' => sprintf(
447
  __( 'Enter your %sAPI key%s. Your map won\'t function correctly without one.', 'so-widgets-bundle' ),
448
- '<a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank">',
449
  '</a>'
450
  )
451
  )
44
  'label' => __( 'Map center', 'so-widgets-bundle' ),
45
  'description' => sprintf(
46
  __( '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.', 'so-widgets-bundle' ),
47
+ '<a href="https://console.developers.google.com/apis/dashboard?project=_" target="_blank" rel="noopener noreferrer">',
48
  '</a>'
49
  ),
50
  ),
59
  'required' => true,
60
  'description' => sprintf(
61
  __( 'Enter your %sAPI key%s. Your map may not function correctly without one.', 'so-widgets-bundle' ),
62
+ '<a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank" rel="noopener noreferrer">',
63
  '</a>'
64
  )
65
  )
295
  'rows' => 5,
296
  'hidden' => true,
297
  'label' => __( 'Raw JSON styles', 'so-widgets-bundle' ),
298
+ 'description' => __( 'Copy and paste predefined styles here from <a href="http://snazzymaps.com/" target="_blank" rel="noopener noreferrer">Snazzy Maps</a>.', 'so-widgets-bundle' )
299
  ),
300
  'custom_map_styles' => array(
301
  'type' => 'repeater',
367
  'hide' => true,
368
  'description' => sprintf(
369
  __( '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.', 'so-widgets-bundle' ),
370
+ '<a href="https://console.developers.google.com/apis/dashboard?project=_" target="_blank" rel="noopener noreferrer">',
371
  '</a>'
372
  ),
373
  'fields' => array(
445
  'required' => true,
446
  'description' => sprintf(
447
  __( 'Enter your %sAPI key%s. Your map won\'t function correctly without one.', 'so-widgets-bundle' ),
448
+ '<a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank" rel="noopener noreferrer">',
449
  '</a>'
450
  )
451
  )
widgets/google-map/tpl/static-map.php CHANGED
@@ -8,7 +8,7 @@
8
  ?>
9
 
10
  <?php if( !empty( $destination_url ) ): ?>
11
- <a href="<?php echo sow_esc_url( $destination_url ) ?>" <?php echo $new_window ? 'target="_blank"' : '' ?>>
12
  <?php endif; ?>
13
 
14
  <img
8
  ?>
9
 
10
  <?php if( !empty( $destination_url ) ): ?>
11
+ <a href="<?php echo sow_esc_url( $destination_url ) ?>" <?php echo $new_window ? 'target="_blank" rel="noopener noreferrer"' : '' ?>>
12
  <?php endif; ?>
13
 
14
  <img
widgets/headline/tpl/default.php CHANGED
@@ -7,7 +7,7 @@
7
  echo "<$headline_tag class='sow-headline'>";
8
 
9
  if( !empty( $headline_destination_url ) ): ?>
10
- <a href="<?php echo sow_esc_url( $headline_destination_url ) ?>" <?php echo $headline_new_window ? 'target="_blank"' : '' ?>>
11
  <?php
12
  endif;
13
 
@@ -32,7 +32,7 @@
32
  echo "<$sub_headline_tag class='sow-sub-headline'>";
33
 
34
  if( !empty( $sub_headline_destination_url ) ): ?>
35
- <a href="<?php echo sow_esc_url( $sub_headline_destination_url ) ?>" <?php echo $sub_headline_new_window ? 'target="_blank"' : '' ?>>
36
  <?php
37
  endif;
38
 
7
  echo "<$headline_tag class='sow-headline'>";
8
 
9
  if( !empty( $headline_destination_url ) ): ?>
10
+ <a href="<?php echo sow_esc_url( $headline_destination_url ) ?>" <?php echo $headline_new_window ? 'target="_blank" rel="noopener noreferrer"' : '' ?>>
11
  <?php
12
  endif;
13
 
32
  echo "<$sub_headline_tag class='sow-sub-headline'>";
33
 
34
  if( !empty( $sub_headline_destination_url ) ): ?>
35
+ <a href="<?php echo sow_esc_url( $sub_headline_destination_url ) ?>" <?php echo $sub_headline_new_window ? 'target="_blank" rel="noopener noreferrer"' : '' ?>>
36
  <?php
37
  endif;
38
 
widgets/hero/hero.php CHANGED
@@ -91,6 +91,11 @@ class SiteOrigin_Widget_Hero_Widget extends SiteOrigin_Widget_Base_Slider {
91
  'fallback' => true,
92
  ),
93
 
 
 
 
 
 
94
  'image_type' => array(
95
  'type' => 'select',
96
  'label' => __('Background image type', 'so-widgets-bundle'),
@@ -261,7 +266,7 @@ class SiteOrigin_Widget_Hero_Widget extends SiteOrigin_Widget_Base_Slider {
261
  function get_frame_background( $i, $frame ){
262
  $background_image = siteorigin_widgets_get_attachment_image_src(
263
  $frame['background']['image'],
264
- 'full',
265
  !empty( $frame['background']['image_fallback'] ) ? $frame['background']['image_fallback'] : ''
266
  );
267
 
91
  'fallback' => true,
92
  ),
93
 
94
+ 'size' => array(
95
+ 'type' => 'image-size',
96
+ 'label' => __('Image size', 'so-widgets-bundle'),
97
+ ),
98
+
99
  'image_type' => array(
100
  'type' => 'select',
101
  'label' => __('Background image type', 'so-widgets-bundle'),
266
  function get_frame_background( $i, $frame ){
267
  $background_image = siteorigin_widgets_get_attachment_image_src(
268
  $frame['background']['image'],
269
+ !empty( $frame['background']['size'] ) ? $frame['background']['size'] : 'full',
270
  !empty( $frame['background']['image_fallback'] ) ? $frame['background']['image_fallback'] : ''
271
  );
272
 
widgets/icon/tpl/default.php CHANGED
@@ -8,7 +8,7 @@
8
 
9
  <div class="sow-icon-container sow-icon">
10
  <?php if ( ! empty( $url ) ) : ?>
11
- <a href="<?php echo sow_esc_url( $url ) ?>" <?php if ( ! empty( $new_window ) ) echo 'target="_blank"'; ?>>
12
  <?php endif; ?>
13
  <?php echo siteorigin_widget_get_icon( $icon ); ?>
14
  <?php if ( ! empty( $url ) ) : ?>
8
 
9
  <div class="sow-icon-container sow-icon">
10
  <?php if ( ! empty( $url ) ) : ?>
11
+ <a href="<?php echo sow_esc_url( $url ) ?>" <?php if ( ! empty( $new_window ) ) echo 'target="_blank" rel="noopener noreferrer"'; ?>>
12
  <?php endif; ?>
13
  <?php echo siteorigin_widget_get_icon( $icon ); ?>
14
  <?php if ( ! empty( $url ) ) : ?>
widgets/image-grid/image-grid.php CHANGED
@@ -116,6 +116,7 @@ class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
116
  $link_atts = empty( $image['link_attributes'] ) ? array() : $image['link_attributes'];
117
  if ( ! empty( $image['new_window'] ) ) {
118
  $link_atts['target'] = '_blank';
 
119
  }
120
  $image['link_attributes'] = $link_atts;
121
  }
@@ -149,7 +150,7 @@ class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
149
 
150
  return sprintf(
151
  __( 'Add a Lightbox to your images with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
152
- '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/lightbox" target="_blank">',
153
  '</a>'
154
  );
155
  }
116
  $link_atts = empty( $image['link_attributes'] ) ? array() : $image['link_attributes'];
117
  if ( ! empty( $image['new_window'] ) ) {
118
  $link_atts['target'] = '_blank';
119
+ $link_atts['rel'] = 'noopener noreferrer';
120
  }
121
  $image['link_attributes'] = $link_atts;
122
  }
150
 
151
  return sprintf(
152
  __( 'Add a Lightbox to your images with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
153
+ '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/lightbox" target="_blank" rel="noopener noreferrer">',
154
  '</a>'
155
  );
156
  }
widgets/image/image.php CHANGED
@@ -156,6 +156,7 @@ class SiteOrigin_Widget_Image_Widget extends SiteOrigin_Widget {
156
  $link_atts = array();
157
  if ( ! empty( $instance['new_window'] ) ) {
158
  $link_atts['target'] = '_blank';
 
159
  }
160
 
161
  return array(
@@ -185,7 +186,7 @@ class SiteOrigin_Widget_Image_Widget extends SiteOrigin_Widget {
185
 
186
  return sprintf(
187
  __( 'Add a Lightbox to your images with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
188
- '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/lightbox" target="_blank">',
189
  '</a>'
190
  );
191
  }
156
  $link_atts = array();
157
  if ( ! empty( $instance['new_window'] ) ) {
158
  $link_atts['target'] = '_blank';
159
+ $link_atts['rel'] = 'noopener noreferrer';
160
  }
161
 
162
  return array(
186
 
187
  return sprintf(
188
  __( 'Add a Lightbox to your images with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
189
+ '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/lightbox" target="_blank" rel="noopener noreferrer">',
190
  '</a>'
191
  );
192
  }
widgets/layout-slider/layout-slider.php CHANGED
@@ -194,7 +194,7 @@ class SiteOrigin_Widget_LayoutSlider_Widget extends SiteOrigin_Widget_Base_Slide
194
  ?>
195
  <p>
196
  <?php _e( 'This widget requires: ', 'so-widgets-bundle' ) ?>
197
- <a href="https://siteorigin.com/page-builder/" target="_blank"><?php _e( 'SiteOrigin Page Builder', 'so-widgets-bundle' ) ?></a>
198
  </p>
199
  <?php
200
  }
194
  ?>
195
  <p>
196
  <?php _e( 'This widget requires: ', 'so-widgets-bundle' ) ?>
197
+ <a href="https://siteorigin.com/page-builder/" target="_blank" rel="noopener noreferrer"><?php _e( 'SiteOrigin Page Builder', 'so-widgets-bundle' ) ?></a>
198
  </p>
199
  <?php
200
  }
widgets/price-table/tpl/atom.php CHANGED
@@ -65,7 +65,7 @@
65
  <div class="ow-pt-button">
66
  <a href='<?php echo sow_esc_url( $column['url'] ) ?>'
67
  class="ow-pt-link" <?php if ( ! empty( $button_new_window ) )
68
- echo 'target="_blank"' ?>><?php echo esc_html( $column['button'] ) ?></a>
69
  </div>
70
  <?php endif; ?>
71
  </div>
65
  <div class="ow-pt-button">
66
  <a href='<?php echo sow_esc_url( $column['url'] ) ?>'
67
  class="ow-pt-link" <?php if ( ! empty( $button_new_window ) )
68
+ echo 'target="_blank" rel="noopener noreferrer"' ?>><?php echo esc_html( $column['button'] ) ?></a>
69
  </div>
70
  <?php endif; ?>
71
  </div>
widgets/simple-masonry/simple-masonry.php CHANGED
@@ -181,6 +181,7 @@ class SiteOrigin_Widget_Simple_Masonry_Widget extends SiteOrigin_Widget {
181
  $link_atts = empty( $item['link_attributes'] ) ? array() : $item['link_attributes'];
182
  if ( ! empty( $item['new_window'] ) ) {
183
  $link_atts['target'] = '_blank';
 
184
  }
185
  $item['link_attributes'] = $link_atts;
186
  }
@@ -221,7 +222,7 @@ class SiteOrigin_Widget_Simple_Masonry_Widget extends SiteOrigin_Widget {
221
 
222
  return sprintf(
223
  __( 'Add a Lightbox to your masonry images with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
224
- '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/lightbox" target="_blank">',
225
  '</a>'
226
  );
227
  }
181
  $link_atts = empty( $item['link_attributes'] ) ? array() : $item['link_attributes'];
182
  if ( ! empty( $item['new_window'] ) ) {
183
  $link_atts['target'] = '_blank';
184
+ $link_atts['rel'] = 'noopener noreferrer';
185
  }
186
  $item['link_attributes'] = $link_atts;
187
  }
222
 
223
  return sprintf(
224
  __( 'Add a Lightbox to your masonry images with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
225
+ '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/lightbox" target="_blank" rel="noopener noreferrer">',
226
  '</a>'
227
  );
228
  }
widgets/slider/slider.php CHANGED
@@ -198,6 +198,7 @@ class SiteOrigin_Widget_Slider_Widget extends SiteOrigin_Widget_Base_Slider {
198
  $link_atts = array();
199
  if ( ! empty( $frame['new_window'] ) ) {
200
  $link_atts['target'] = '_blank';
 
201
  }
202
  $frame['link_attributes'] = $link_atts;
203
  }
@@ -264,7 +265,7 @@ class SiteOrigin_Widget_Slider_Widget extends SiteOrigin_Widget_Base_Slider {
264
 
265
  return sprintf(
266
  __( 'Add a Lightbox to your image slides with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
267
- '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/lightbox" target="_blank">',
268
  '</a>'
269
  );
270
  }
198
  $link_atts = array();
199
  if ( ! empty( $frame['new_window'] ) ) {
200
  $link_atts['target'] = '_blank';
201
+ $link_atts['rel'] = 'noopener noreferrer';
202
  }
203
  $frame['link_attributes'] = $link_atts;
204
  }
265
 
266
  return sprintf(
267
  __( 'Add a Lightbox to your image slides with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
268
+ '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/lightbox" target="_blank" rel="noopener noreferrer">',
269
  '</a>'
270
  );
271
  }
widgets/social-media-buttons/tpl/default.php CHANGED
@@ -6,11 +6,16 @@
6
  if( !empty($instance['design']['hover']) ) $classes[] = 'ow-button-hover';
7
  $classes[] = "sow-social-media-button-" . sanitize_html_class( $network['name'] );
8
  $classes[] = "sow-social-media-button";
 
9
  $button_attributes = array(
10
  'class' => esc_attr( implode(' ', $classes) ),
11
- 'title' => empty( $network['icon_title'] ) ? sprintf( __( '%s on %s', 'so-widgets-bundle' ), get_bloginfo( 'name' ), ucwords( str_replace( '-', ' ', $network['name'] ) ) ) : $network['icon_title'],
 
12
  );
13
- if( !empty( $instance['design']['new_window'] ) ) $button_attributes['target'] = '_blank';
 
 
 
14
  if ( ! empty( $network['url'] ) ) $button_attributes['href'] = sow_esc_url( trim( $network['url'] ) );
15
  ?>
16
 
6
  if( !empty($instance['design']['hover']) ) $classes[] = 'ow-button-hover';
7
  $classes[] = "sow-social-media-button-" . sanitize_html_class( $network['name'] );
8
  $classes[] = "sow-social-media-button";
9
+ $title = empty( $network['icon_title'] ) ? sprintf( __( '%s on %s', 'so-widgets-bundle' ), get_bloginfo( 'name' ), ucwords( str_replace( '-', ' ', $network['name'] ) ) ) : $network['icon_title'];
10
  $button_attributes = array(
11
  'class' => esc_attr( implode(' ', $classes) ),
12
+ 'title' => $title,
13
+ 'aria-label' => $title,
14
  );
15
+ if( !empty( $instance['design']['new_window'] ) ) {
16
+ $button_attributes['target'] = '_blank';
17
+ $button_attributes['rel'] = 'noopener noreferrer';
18
+ }
19
  if ( ! empty( $network['url'] ) ) $button_attributes['href'] = sow_esc_url( trim( $network['url'] ) );
20
  ?>
21
 
widgets/tabs/js/tabs.js ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery( function ( $ ) {
2
+
3
+ $( '.sow-tabs' ).each( function ( index, element ) {
4
+ var $this = $( element );
5
+ var $widget = $this.closest( '.so-widget-sow-tabs' );
6
+ var useAnchorTags = $widget.data( 'useAnchorTags' );
7
+
8
+ var $tabPanelsContainer = $this.find( '> .sow-tabs-panel-container' );
9
+
10
+ var $tabs = $this.find( '> .sow-tabs-tab-container > .sow-tabs-tab' );
11
+
12
+ var $selectedTab = $this.find( '.sow-tabs-tab-selected' );
13
+ var selectedIndex = $selectedTab.index();
14
+
15
+ var $tabPanels = $tabPanelsContainer.find( '> .sow-tabs-panel' );
16
+ $tabPanels.not(':eq(' + selectedIndex + ')').hide();
17
+
18
+ setTimeout( function () {
19
+ $tabPanelsContainer.height( $tabPanels.eq( selectedIndex ).outerHeight() );
20
+ }, 100 );
21
+
22
+ var selectTab = function( tab, preventHashChange ) {
23
+ var $tab = $( tab );
24
+ if ( $tab.is( '.sow-tabs-tab-selected' ) ) {
25
+ return true;
26
+ }
27
+ var selectedIndex = $tab.index();
28
+ if ( selectedIndex > -1 ) {
29
+ $tabs.removeClass( 'sow-tabs-tab-selected' );
30
+ $tabPanels.not( ':eq(' + selectedIndex + ')' ).fadeOut( 'fast' );
31
+ $tab.addClass( 'sow-tabs-tab-selected' );
32
+ $tabPanels.eq( selectedIndex ).fadeIn( 'fast' );
33
+ setTimeout( function () {
34
+ $tabPanelsContainer.height( $tabPanels.eq( selectedIndex ).outerHeight() );
35
+ }, 100 );
36
+ if ( useAnchorTags && !preventHashChange ) {
37
+ window.location.hash = $tab.data( 'anchor' );
38
+ }
39
+ }
40
+ };
41
+
42
+ $tabs.click( function () {
43
+ selectTab( this );
44
+ } );
45
+
46
+ if ( useAnchorTags ) {
47
+ var updateSelectedTab = function() {
48
+ if ( window.location.hash ) {
49
+ var tab = $tabs.filter( '[data-anchor="' + window.location.hash.replace( '#', '' ) + '"]' );
50
+ if ( tab ) {
51
+ selectTab( tab, true );
52
+ }
53
+ }
54
+ };
55
+ $( window ).on( 'hashchange', updateSelectedTab );
56
+ if ( window.location.hash ) {
57
+ updateSelectedTab();
58
+ } else {
59
+ window.location.hash = $selectedTab.data( 'anchor' );
60
+ }
61
+ }
62
+ } );
63
+ } );
widgets/tabs/js/tabs.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(function(a){a(".sow-tabs").each(function(t,o){var e=a(o),n=e.closest(".so-widget-sow-tabs"),s=n.data("useAnchorTags"),i=e.find("> .sow-tabs-panel-container"),c=e.find("> .sow-tabs-tab-container > .sow-tabs-tab"),d=e.find(".sow-tabs-tab-selected"),h=d.index(),w=i.find("> .sow-tabs-panel");w.not(":eq("+h+")").hide(),setTimeout(function(){i.height(w.eq(h).outerHeight())},100);var r=function(t,o){var e=a(t);if(e.is(".sow-tabs-tab-selected"))return!0;var n=e.index();n>-1&&(c.removeClass("sow-tabs-tab-selected"),w.not(":eq("+n+")").fadeOut("fast"),e.addClass("sow-tabs-tab-selected"),w.eq(n).fadeIn("fast"),setTimeout(function(){i.height(w.eq(n).outerHeight())},100),s&&!o&&(window.location.hash=e.data("anchor")))};if(c.click(function(){r(this)}),s){var f=function(){if(window.location.hash){var a=c.filter('[data-anchor="'+window.location.hash.replace("#","")+'"]');a&&r(a,!0)}};a(window).on("hashchange",f),window.location.hash?f():window.location.hash=d.data("anchor")}})});
widgets/tabs/styles/default.less ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../../../base/less/mixins";
2
+
3
+ .widget-function('import_google_font');
4
+
5
+ @tabs_container_background_color: default;
6
+ @tabs_container_border_color: default;
7
+ @tabs_container_border_width: default;
8
+ @has_tabs_container_border_width: default;
9
+ @tabs_container_border_radius: default;
10
+ @tabs_container_padding: 12px 10px 0px 10px;
11
+ @tabs_container_tabs_align: default;
12
+
13
+ @tabs_background_color: default;
14
+ @tabs_background_hover_color: default;
15
+ @tabs_title_color: default;
16
+ @tabs_title_hover_color: default;
17
+ @tabs_font_family: default;
18
+ @tabs_font_weight: default;
19
+ @tabs_font_size: 18px;
20
+ @tabs_border_color: default;
21
+ @tabs_border_hover_color: default;
22
+ @tabs_border_width: default;
23
+ @has_tabs_border_width: default;
24
+ @tabs_border_hover_width: default;
25
+ @has_tabs_border_hover_width: default;
26
+ @tabs_border_radius: default;
27
+ @tabs_padding: 16px 15px 16px 15px;
28
+ @tabs_margin: 0px 5px 0px 5px;
29
+
30
+ @panels_background_color: default;
31
+ @panels_font_family: default;
32
+ @panels_font_weight: default;
33
+ @panels_font_size: 16px;
34
+ @panels_font_color: default;
35
+ @panels_border_width: default;
36
+ @has_panels_border_width: default;
37
+ @panels_border_color: default;
38
+ @panels_border_radius: default;
39
+ @panels_padding: 30px 30px 30px 35px;
40
+
41
+ .sow-tabs {
42
+ .sow-tabs-tab-container {
43
+ background-color: @tabs_container_background_color;
44
+ padding: @tabs_container_padding;
45
+ text-align: @tabs_container_tabs_align;
46
+
47
+ //noinspection CssOptimizeSimilarProperties
48
+ & when ( @has_tabs_container_border_width = true ) {
49
+ border-style: solid;
50
+ border-color: @tabs_container_border_color;
51
+ border-width: @tabs_container_border_width;
52
+ border-radius: @tabs_container_border_radius;
53
+ }
54
+
55
+ .sow-tabs-tab {
56
+ display: inline-block;
57
+ cursor: pointer;
58
+ background-color: @tabs_background_color;
59
+ padding: @tabs_padding;
60
+ margin: @tabs_margin;
61
+ color: @tabs_title_color;
62
+ font-family: @tabs_font_family;
63
+ font-weight: @tabs_font_weight;
64
+ font-size: @tabs_font_size;
65
+ transition: all 0.3s;
66
+
67
+ //noinspection CssOptimizeSimilarProperties
68
+ & when ( @has_tabs_border_width = true ) {
69
+ border-style: solid;
70
+ border-color: @tabs_border_color;
71
+ border-width: @tabs_border_width;
72
+ border-radius: @tabs_border_radius;
73
+ }
74
+
75
+ &.sow-tabs-tab-selected, &:hover {
76
+ background-color: @tabs_background_hover_color;
77
+ color: @tabs_title_hover_color;
78
+
79
+ //noinspection CssOptimizeSimilarProperties
80
+ & when ( @has_tabs_border_hover_width = true ) {
81
+ border-style: solid;
82
+ border-color: @tabs_border_hover_color;
83
+ border-width: @tabs_border_hover_width;
84
+ border-radius: @tabs_border_radius;
85
+ }
86
+ }
87
+
88
+ .sow-tabs-title {
89
+ line-height: 1;
90
+ }
91
+ }
92
+ }
93
+
94
+ .sow-tabs-panel-container {
95
+ position: relative;
96
+ transition: height 0.3s;
97
+ background-color: @panels_background_color;
98
+ color: @panels_font_color;
99
+
100
+ //noinspection CssOptimizeSimilarProperties
101
+ & when( @has_panels_border_width = true ) {
102
+ border-style: solid;
103
+ border-width: @panels_border_width;
104
+ border-color: @panels_border_color;
105
+ border-radius: @panels_border_radius;
106
+ }
107
+
108
+ .sow-tabs-panel {
109
+ position: absolute;
110
+ padding: @panels_padding;
111
+ .sow-tabs-panel-content {
112
+ font-family: @panels_font_family;
113
+ font-weight: @panels_font_weight;
114
+ font-size: @panels_font_size;
115
+
116
+ > p {
117
+ margin: 0;
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
widgets/tabs/tabs.php ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Widget Name: Tabs
4
+ Description: A tabby widget to switch between tabbed content panels.
5
+ Author: SiteOrigin
6
+ Author URI: https://siteorigin.com
7
+ */
8
+
9
+ class SiteOrigin_Widget_Tabs_Widget extends SiteOrigin_Widget {
10
+ function __construct() {
11
+
12
+ parent::__construct(
13
+ 'sow-tabs',
14
+ __( 'SiteOrigin Tabs', 'so-widgets-bundle' ),
15
+ array(
16
+ 'description' => __( 'A tabs widget.', 'so-widgets-bundle' ),
17
+ 'help' => 'https://siteorigin.com/widgets-bundle/tabs-widget/',
18
+ ),
19
+ array(),
20
+ false,
21
+ plugin_dir_path( __FILE__ )
22
+ );
23
+ }
24
+
25
+ /**
26
+ * Initialize the tabs widget.
27
+ */
28
+ function initialize() {
29
+ $this->register_frontend_scripts(
30
+ array(
31
+ array(
32
+ 'sow-tabs',
33
+ plugin_dir_url( __FILE__ ) . 'js/tabs' . SOW_BUNDLE_JS_SUFFIX . '.js',
34
+ array( 'jquery' ),
35
+ SOW_BUNDLE_VERSION
36
+ )
37
+ )
38
+ );
39
+ }
40
+
41
+ function get_widget_form() {
42
+
43
+ return array(
44
+ 'title' => array(
45
+ 'type' => 'text',
46
+ 'label' => __( 'Title', 'so-widgets-bundle' ),
47
+ ),
48
+ 'tabs' => array(
49
+ 'type' => 'repeater',
50
+ 'label' => __( 'Tabs', 'so-widgets-bundle' ),
51
+ 'item_label' => array(
52
+ 'selector' => "[id*='tabs-title']",
53
+ 'update_event' => 'change',
54
+ 'value_method' => 'val'
55
+ ),
56
+ 'fields' => array(
57
+ 'title' => array(
58
+ 'type' => 'text',
59
+ 'label' => __( 'Title', 'so-widgets-bundle' ),
60
+ ),
61
+ 'content_text' => array(
62
+ 'type' => 'tinymce',
63
+ 'label' => __( 'Content', 'so-widgets-bundle' ),
64
+ ),
65
+ ),
66
+ ),
67
+ 'initial_tab_position' => array(
68
+ 'type' => 'number',
69
+ 'label' => __( 'Initially selected tab', 'so-widgets-bundle' ),
70
+ 'default' => 1,
71
+ 'description' => __( 'The position of the tab to be selected when the page first loads.', 'so-widgets-bundle' ),
72
+ ),
73
+ 'design' => array(
74
+ 'type' => 'section',
75
+ 'label' => __( 'Design', 'so-widgets-bundle' ),
76
+ 'hide' => true,
77
+ 'fields' => array(
78
+ 'tabs_container' => array(
79
+ 'type' => 'section',
80
+ 'label' => __( 'Tabs container', 'so-widgets-bundle' ),
81
+ 'hide' => true,
82
+ 'fields' => array(
83
+ 'background_color' => array(
84
+ 'type' => 'color',
85
+ 'label' => __( 'Background color', 'so-widgets-bundle' ),
86
+ 'default' => '#828282',
87
+ ),
88
+ 'border_color' => array(
89
+ 'type' => 'color',
90
+ 'label' => __( 'Border color', 'so-widgets-bundle' ),
91
+ ),
92
+ 'border_width' => array(
93
+ 'type' => 'measurement',
94
+ 'label' => __( 'Border width', 'so-widgets-bundle' ),
95
+ ),
96
+ ),
97
+ ),
98
+ 'tabs' => array(
99
+ 'type' => 'section',
100
+ 'label' => __( 'Tabs', 'so-widgets-bundle' ),
101
+ 'hide' => true,
102
+ 'fields' => array(
103
+ 'background_color' => array(
104
+ 'type' => 'color',
105
+ 'label' => __( 'Background color', 'so-widgets-bundle' ),
106
+ ),
107
+ 'background_hover_color' => array(
108
+ 'type' => 'color',
109
+ 'label' => __( 'Background hover color', 'so-widgets-bundle' ),
110
+ 'default' => '#F9F9F9',
111
+ ),
112
+ 'title_color' => array(
113
+ 'type' => 'color',
114
+ 'label' => __( 'Title color', 'so-widgets-bundle' ),
115
+ 'default' => '#FFFFFF',
116
+ ),
117
+ 'title_hover_color' => array(
118
+ 'type' => 'color',
119
+ 'label' => __( 'Title hover color', 'so-widgets-bundle' ),
120
+ 'default' => '#2D2D2D',
121
+ ),
122
+ 'border_color' => array(
123
+ 'type' => 'color',
124
+ 'label' => __( 'Border color', 'so-widgets-bundle' ),
125
+ 'default' => '#828282',
126
+ ),
127
+ 'border_hover_color' => array(
128
+ 'type' => 'color',
129
+ 'label' => __( 'Border hover color', 'so-widgets-bundle' ),
130
+ 'default' => '#F9F9F9',
131
+ ),
132
+ 'border_width' => array(
133
+ 'type' => 'measurement',
134
+ 'label' => __( 'Border width', 'so-widgets-bundle' ),
135
+ ),
136
+ 'border_hover_width' => array(
137
+ 'type' => 'measurement',
138
+ 'label' => __( 'Border hover width', 'so-widgets-bundle' ),
139
+ ),
140
+ ),
141
+ ),
142
+ 'panels' => array(
143
+ 'type' => 'section',
144
+ 'label' => __( 'Panels', 'so-widgets-bundle' ),
145
+ 'hide' => true,
146
+ 'fields' => array(
147
+ 'background_color' => array(
148
+ 'type' => 'color',
149
+ 'label' => __( 'Background color', 'so-widgets-bundle' ),
150
+ 'default' => '#F9F9F9',
151
+ ),
152
+ 'font_color' => array(
153
+ 'type' => 'color',
154
+ 'label' => __( 'Font color', 'so-widgets-bundle' ),
155
+ ),
156
+ 'border_color' => array(
157
+ 'type' => 'color',
158
+ 'label' => __( 'Border color', 'so-widgets-bundle' ),
159
+ ),
160
+ 'border_width' => array(
161
+ 'type' => 'measurement',
162
+ 'label' => __( 'Border width', 'so-widgets-bundle' ),
163
+ ),
164
+ ),
165
+ ),
166
+ ),
167
+ ),
168
+ );
169
+ }
170
+
171
+ public function get_less_variables( $instance ) {
172
+ $design = $instance['design'];
173
+
174
+ return array(
175
+ 'tabs_container_background_color' => $design['tabs_container']['background_color'],
176
+ 'tabs_container_border_color' => $design['tabs_container']['border_color'],
177
+ 'tabs_container_border_width' => $design['tabs_container']['border_width'],
178
+ 'has_tabs_container_border_width' => empty( $design['tabs_container']['border_width'] ) ? 'false' : 'true',
179
+ 'tabs_background_color' => $design['tabs']['background_color'],
180
+ 'tabs_background_hover_color' => $design['tabs']['background_hover_color'],
181
+ 'tabs_title_color' => $design['tabs']['title_color'],
182
+ 'tabs_title_hover_color' => $design['tabs']['title_hover_color'],
183
+ 'tabs_border_color' => $design['tabs']['border_color'],
184
+ 'tabs_border_hover_color' => $design['tabs']['border_hover_color'],
185
+ 'tabs_border_width' => $design['tabs']['border_width'],
186
+ 'has_tabs_border_width' => empty( $design['tabs']['border_width'] ) ? 'false' : 'true',
187
+ 'tabs_border_hover_width' => $design['tabs']['border_hover_width'],
188
+ 'has_tabs_border_hover_width' => empty( $design['tabs']['border_hover_width'] ) ? 'false' : 'true',
189
+ 'panels_background_color' => $design['panels']['background_color'],
190
+ 'panels_font_color' => $design['panels']['font_color'],
191
+ 'panels_border_color' => $design['panels']['border_color'],
192
+ 'panels_border_width' => $design['panels']['border_width'],
193
+ 'has_panels_border_width' => empty( $design['panels']['border_width'] ) ? 'false' : 'true',
194
+ );
195
+ }
196
+
197
+ public function get_template_variables( $instance, $args ) {
198
+ if( empty( $instance ) ) return array();
199
+
200
+ $tabs = empty( $instance['tabs'] ) ? array() : $instance['tabs'];
201
+
202
+ foreach ( $tabs as $i => &$tab ) {
203
+ if ( empty( $tab['before_title'] ) ) {
204
+ $tab['before_title'] = '';
205
+ }
206
+ if ( empty( $tab['after_title'] ) ) {
207
+ $tab['after_title'] = '';
208
+ }
209
+ if ( empty( $tab['title'] ) ) {
210
+ $tab['anchor'] = 'tabs-' . $instance['_sow_form_id'] . '-' . $i;
211
+ } else {
212
+ $tab['anchor'] = $tab['title'];
213
+ }
214
+ }
215
+
216
+ if ( empty( $instance['initial_tab_position'] ) ||
217
+ $instance['initial_tab_position'] < 1 ||
218
+ $instance['initial_tab_position'] > count( $tabs ) ) {
219
+
220
+ $init_tab_index = 0;
221
+ } else {
222
+ $init_tab_index = $instance['initial_tab_position'] - 1;
223
+ }
224
+
225
+ return array(
226
+ 'tabs' => $tabs,
227
+ 'initial_tab_index' => $init_tab_index,
228
+ );
229
+ }
230
+
231
+ public function render_panel_content( $panel, $instance ) {
232
+ $content = wp_kses_post( $panel['content_text'] );
233
+
234
+ echo apply_filters( 'siteorigin_widgets_tabs_render_panel_content', $content, $panel, $instance );
235
+ }
236
+
237
+ function get_form_teaser(){
238
+ if( class_exists( 'SiteOrigin_Premium' ) ) return false;
239
+ return sprintf(
240
+ __( 'Get more customization options and the ability to use widgets and layouts as your tabs content with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
241
+ '<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/tabs" target="_blank">',
242
+ '</a>'
243
+ );
244
+ }
245
+ }
246
+
247
+ siteorigin_widget_register('sow-tabs', __FILE__, 'SiteOrigin_Widget_Tabs_Widget');
widgets/tabs/tpl/default.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var array $args
4
+ * @var array $instance
5
+ * @var array $tabs
6
+ * @var array $initial_tab_index
7
+ */
8
+
9
+ echo $args['before_title'] . $instance['title'] . $args['after_title'];
10
+ ?>
11
+ <div class="sow-tabs">
12
+ <div class="sow-tabs-tab-container">
13
+ <?php foreach ( $tabs as $i => $tab ) : ?>
14
+ <div class="sow-tabs-tab<?php if ( $i == $initial_tab_index ) echo ' sow-tabs-tab-selected'; ?>"
15
+ data-anchor="<?php echo sanitize_title_with_dashes( $tab['anchor'] ); ?>">
16
+ <div class="sow-tabs-title">
17
+ <?php echo $tab['before_title']; ?>
18
+ <?php echo wp_kses_post( $tab['title'] ); ?>
19
+ <?php echo $tab['after_title']; ?>
20
+ </div>
21
+ </div>
22
+ <?php endforeach; ?>
23
+ </div>
24
+
25
+ <div class="sow-tabs-panel-container">
26
+ <?php foreach ( $tabs as $i => $tab ) : ?>
27
+ <div class="sow-tabs-panel">
28
+ <div class="sow-tabs-panel-content">
29
+ <?php $this->render_panel_content( $tab, $instance ); ?>
30
+ </div>
31
+ </div>
32
+ <?php endforeach; ?>
33
+ </div>
34
+ </div>
widgets/taxonomy/tpl/default.php CHANGED
@@ -22,7 +22,7 @@
22
  <?php if ( $display_format == 'text' ) : ?>
23
  <span class="so-taxonomy-text" ref="tag"><?php echo esc_html( $term->name ) ?></span>
24
  <?php else: ?>
25
- <a class="so-taxonomy-<?php echo esc_attr( $display_format )?>" href="<?php echo get_term_link( $term, $taxonomy_name ) ?>" rel="tag" <?php if ( ! empty( $new_window ) ) echo 'target="_blank"'; ?>><?php echo esc_html( $term->name ) ?></a>
26
  <?php endif; ?>
27
  <?php endforeach; ?>
28
 
22
  <?php if ( $display_format == 'text' ) : ?>
23
  <span class="so-taxonomy-text" ref="tag"><?php echo esc_html( $term->name ) ?></span>
24
  <?php else: ?>
25
+ <a class="so-taxonomy-<?php echo esc_attr( $display_format )?>" href="<?php echo get_term_link( $term, $taxonomy_name ) ?>" rel="tag" <?php if ( ! empty( $new_window ) ) echo 'target="_blank" rel="noopener noreferrer"'; ?>><?php echo esc_html( $term->name ) ?></a>
26
  <?php endif; ?>
27
  <?php endforeach; ?>
28
 
widgets/testimonial/tpl/default.php CHANGED
@@ -30,7 +30,7 @@
30
  <?php if( ! empty( $image_id ) ) : ?>
31
  <div class="sow-image-wrapper">
32
  <?php if( $link_image ) : ?>
33
- <a href="<?php echo sow_esc_url( $url ) ?>" <?php if( ! empty( $new_window ) ) { echo 'target="_blank"'; } ?>>
34
  <?php endif; ?>
35
  <?php echo $this->testimonial_user_image( $image_id, $design ); ?>
36
  <?php if( $link_image ) : ?>
@@ -41,14 +41,14 @@
41
 
42
  <div class="sow-text">
43
  <?php if( $link_name ) : ?>
44
- <a href="<?php echo sow_esc_url( $url ) ?>" <?php if( ! empty( $new_window ) ) { echo 'target="_blank"'; } ?>>
45
  <?php endif; ?>
46
  <strong><?php echo esc_html( $testimonial['name'] ) ?></strong>
47
  <?php if( $link_name ) : ?>
48
  </a>
49
  <?php endif; ?>
50
  <?php if( $link_location ) : ?>
51
- <a href="<?php echo sow_esc_url( $url ) ?>" <?php if( ! empty( $new_window ) ) { echo 'target="_blank"'; } ?>>
52
  <?php endif; ?>
53
  <?php if( ! empty( $location ) ) : ?>
54
  <span><?php echo esc_html( $location ) ?></span>
30
  <?php if( ! empty( $image_id ) ) : ?>
31
  <div class="sow-image-wrapper">
32
  <?php if( $link_image ) : ?>
33
+ <a href="<?php echo sow_esc_url( $url ) ?>" <?php if( ! empty( $new_window ) ) { echo 'target="_blank" rel="noopener noreferrer"'; } ?>>
34
  <?php endif; ?>
35
  <?php echo $this->testimonial_user_image( $image_id, $design ); ?>
36
  <?php if( $link_image ) : ?>
41
 
42
  <div class="sow-text">
43
  <?php if( $link_name ) : ?>
44
+ <a href="<?php echo sow_esc_url( $url ) ?>" <?php if( ! empty( $new_window ) ) { echo 'target="_blank" rel="noopener noreferrer"'; } ?>>
45
  <?php endif; ?>
46
  <strong><?php echo esc_html( $testimonial['name'] ) ?></strong>
47
  <?php if( $link_name ) : ?>
48
  </a>
49
  <?php endif; ?>
50
  <?php if( $link_location ) : ?>
51
+ <a href="<?php echo sow_esc_url( $url ) ?>" <?php if( ! empty( $new_window ) ) { echo 'target="_blank" rel="noopener noreferrer"'; } ?>>
52
  <?php endif; ?>
53
  <?php if( ! empty( $location ) ) : ?>
54
  <span><?php echo esc_html( $location ) ?></span>