SiteOrigin Widgets Bundle - Version 1.14.0

Version Description

  • 4 January 2019 =
  • Accordion: allow multiple panels with the same title.
  • Actions when widgets' CSS files are created/deleted.
  • Compat fixes for PHP 7.3
  • Indicate when 'setup_widgets' is triggered for previews.
  • Accordion: Debounce window.location.hash updates to prevent incorrect states.
  • Don't remove FitText window listener to ensure previously set up FitText elements still work.
  • Icon field: Show loading indicator while icons are loading.
  • Widget documentation links.
  • Icons: Update to use latest FontAwesome icon sets.
  • Sliders: Resize slides when widgets are set up.
  • Elementor compat: Directly enqueue necessary scripts and styles for previews.
  • Allow widget headers to be translated.
  • Accordion: Keep the clicked panel in the viewport, if it moves out.
  • TinyMCE field: Check if tinymce is available before using.
Download this release

Release Info

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

Code changes from version 1.13.4 to 1.14.0

Files changed (80) hide show
  1. admin/admin.css +15 -7
  2. admin/tpl/admin.php +31 -24
  3. base/base.php +37 -17
  4. base/css/img/menu-icon.svg +1 -0
  5. base/inc/fields/container-base.class.php +3 -0
  6. base/inc/fields/css/icon-field.css +12 -2
  7. base/inc/fields/icon.class.php +41 -6
  8. base/inc/fields/js/icon-field.js +67 -21
  9. base/inc/fields/js/icon-field.min.js +1 -1
  10. base/inc/fields/js/tinymce-field.js +3 -1
  11. base/inc/fields/js/tinymce-field.min.js +1 -1
  12. base/inc/routes/siteorigin-widgets-resource.class.php +1 -1
  13. base/js/admin.js +2 -2
  14. base/js/admin.min.js +1 -1
  15. base/less/mixins.less +193 -193
  16. base/siteorigin-widget.class.php +7 -1
  17. compat/beaver-builder/sowb-beaver-builder.js +1 -1
  18. compat/beaver-builder/sowb-beaver-builder.min.js +1 -1
  19. compat/block-editor/widget-block.js +9 -2
  20. compat/block-editor/widget-block.min.js +1 -1
  21. compat/elementor/elementor.php +16 -40
  22. compat/elementor/sowb-elementor.js +25 -25
  23. compat/elementor/sowb-elementor.min.js +1 -1
  24. compat/visual-composer/sowb-vc-widget.js +80 -80
  25. compat/visual-composer/sowb-vc-widget.min.js +1 -1
  26. icons/fontawesome/filter.php +1653 -786
  27. icons/fontawesome/font/FontAwesome.otf +0 -0
  28. icons/fontawesome/font/fontawesome-webfont.eot +0 -0
  29. icons/fontawesome/font/fontawesome-webfont.svg +0 -2671
  30. icons/fontawesome/font/fontawesome-webfont.ttf +0 -0
  31. icons/fontawesome/font/fontawesome-webfont.woff +0 -0
  32. icons/fontawesome/font/fontawesome-webfont.woff2 +0 -0
  33. icons/fontawesome/style.css +302 -20
  34. icons/fontawesome/webfonts/fa-brands-400.eot +0 -0
  35. icons/fontawesome/webfonts/fa-brands-400.svg +1260 -0
  36. icons/fontawesome/webfonts/fa-brands-400.ttf +0 -0
  37. icons/fontawesome/webfonts/fa-brands-400.woff +0 -0
  38. icons/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
  39. icons/fontawesome/webfonts/fa-regular-400.eot +0 -0
  40. icons/fontawesome/webfonts/fa-regular-400.svg +471 -0
  41. icons/fontawesome/webfonts/fa-regular-400.ttf +0 -0
  42. icons/fontawesome/webfonts/fa-regular-400.woff +0 -0
  43. icons/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
  44. icons/fontawesome/webfonts/fa-solid-900.eot +0 -0
  45. icons/fontawesome/webfonts/fa-solid-900.svg +2763 -0
  46. icons/fontawesome/webfonts/fa-solid-900.ttf +0 -0
  47. icons/fontawesome/webfonts/fa-solid-900.woff +0 -0
  48. icons/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
  49. icons/icons.php +9 -3
  50. js/slider/jquery.slider.js +7 -4
  51. js/slider/jquery.slider.min.js +1 -1
  52. js/sow.jquery.fittext.js +1 -1
  53. js/sow.jquery.fittext.min.js +1 -1
  54. lang/so-widgets-bundle.pot +567 -462
  55. readme.txt +19 -3
  56. so-widgets-bundle.php +10 -4
  57. widgets/accordion/accordion.php +240 -233
  58. widgets/accordion/js/accordion.js +47 -24
  59. widgets/accordion/js/accordion.min.js +1 -1
  60. widgets/button/button.php +1 -0
  61. widgets/contact/contact.php +4 -4
  62. widgets/cta/cta.php +1 -0
  63. widgets/editor/editor.php +1 -0
  64. widgets/features/features.php +1 -0
  65. widgets/google-map/google-map.php +8 -4
  66. widgets/headline/headline.php +1 -0
  67. widgets/hero/hero.php +1 -0
  68. widgets/icon/icon.php +93 -92
  69. widgets/image-grid/image-grid.php +1 -0
  70. widgets/image/image.php +1 -0
  71. widgets/layout-slider/layout-slider.php +1 -0
  72. widgets/post-carousel/post-carousel.php +1 -0
  73. widgets/price-table/price-table.php +326 -325
  74. widgets/simple-masonry/simple-masonry.php +232 -231
  75. widgets/slider/slider.php +275 -274
  76. widgets/social-media-buttons/social-media-buttons.php +1 -0
  77. widgets/tabs/tabs.php +255 -254
  78. widgets/taxonomy/taxonomy.php +102 -101
  79. widgets/testimonial/testimonial.php +1 -0
  80. widgets/video/video.php +1 -0
admin/admin.css CHANGED
@@ -227,13 +227,25 @@
227
color: #555;
228
text-decoration: underline;
229
}
230
- #sow-widgets-page #widgets-list .so-widget .so-widget-toggle-active {
231
- margin-top: 15px;
232
display: inline-block;
233
}
234
- #sow-widgets-page #widgets-list .so-widget .so-widget-toggle-active button:focus {
235
outline: none;
236
}
237
#sow-widgets-page #widgets-list .so-widget.so-widget-is-active .so-widget-toggle-active .so-widget-activate {
238
display: none;
239
}
@@ -253,10 +265,6 @@
253
-webkit-filter: grayscale(1);
254
opacity: 0.7;
255
}
256
- #sow-widgets-page #widgets-list .so-widget .so-widget-settings {
257
- margin-top: 15px;
258
- display: inline-block;
259
- }
260
#sow-widgets-page #widgets-list.so-animated img,
261
#sow-widgets-page #widgets-list.so-animated svg {
262
-webkit-transition: all 0.45s ease;
227
color: #555;
228
text-decoration: underline;
229
}
230
+ #sow-widgets-page #widgets-list .so-widget .so-action-links:after {
231
+ content: "";
232
+ display: table;
233
+ clear: both;
234
+ }
235
+ #sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-toggle-active,
236
+ #sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-settings,
237
+ #sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-documentation {
238
display: inline-block;
239
+ float: left;
240
+ margin-right: 1em;
241
+ margin-top: 0.5em;
242
}
243
+ #sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-toggle-active button:focus {
244
outline: none;
245
}
246
+ #sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-documentation {
247
+ margin-top: 1em;
248
+ }
249
#sow-widgets-page #widgets-list .so-widget.so-widget-is-active .so-widget-toggle-active .so-widget-activate {
250
display: none;
251
}
265
-webkit-filter: grayscale(1);
266
opacity: 0.7;
267
}
268
#sow-widgets-page #widgets-list.so-animated img,
269
#sow-widgets-page #widgets-list.so-animated svg {
270
-webkit-transition: all 0.45s ease;
admin/tpl/admin.php CHANGED
@@ -65,33 +65,40 @@
65
</strong>
66
</div>
67
<?php endif; ?>
68
69
- <div class="so-widget-toggle-active">
70
- <button class="button-secondary so-widget-activate" data-status="1"><?php esc_html_e( 'Activate', 'so-widgets-bundle' ) ?></button>
71
- <button class="button-secondary so-widget-deactivate" data-status="0"><?php esc_html_e( 'Deactivate', 'so-widgets-bundle' ) ?></button>
72
- </div>
73
-
74
- <?php
75
- /** @var SiteOrigin_Widget $widget_object */
76
- $widget_object = !empty( $widget_objects[ $file ] ) ? $widget_objects[ $file ] : false;
77
- if( !empty( $widget_object ) && $widget_object->has_form( 'settings' ) ) {
78
- $rel_path = str_replace( wp_normalize_path( WP_CONTENT_DIR ), '', $file );
79
-
80
- $form_url = add_query_arg( array(
81
- 'id' => $rel_path,
82
- 'action' => 'so_widgets_setting_form',
83
- ),
84
- admin_url( 'admin-ajax.php' )
85
- );
86
- $form_url = wp_nonce_url( $form_url, 'display-widget-form' );
87
88
?>
89
- <button class="button-secondary so-widget-settings" data-form-url="<?php echo esc_url( $form_url ) ?>">
90
- <?php esc_html_e( 'Settings', 'so-widgets-bundle' ) ?>
91
- </button>
92
- <?php
93
- }
94
- ?>
95
</div>
96
97
</div>
65
</strong>
66
</div>
67
<?php endif; ?>
68
+ <div class="so-action-links">
69
+ <div class="so-widget-toggle-active">
70
+ <button class="button-secondary so-widget-activate" data-status="1"><?php esc_html_e( 'Activate', 'so-widgets-bundle' ) ?></button>
71
+ <button class="button-secondary so-widget-deactivate" data-status="0"><?php esc_html_e( 'Deactivate', 'so-widgets-bundle' ) ?></button>
72
+ </div>
73
74
+ <?php
75
+ /** @var SiteOrigin_Widget $widget_object */
76
+ $widget_object = !empty( $widget_objects[ $file ] ) ? $widget_objects[ $file ] : false;
77
+ if( !empty( $widget_object ) && $widget_object->has_form( 'settings' ) ) {
78
+ $rel_path = str_replace( wp_normalize_path( WP_CONTENT_DIR ), '', $file );
79
+
80
+ $form_url = add_query_arg( array(
81
+ 'id' => $rel_path,
82
+ 'action' => 'so_widgets_setting_form',
83
+ ),
84
+ admin_url( 'admin-ajax.php' )
85
+ );
86
+ $form_url = wp_nonce_url( $form_url, 'display-widget-form' );
87
88
+ ?>
89
+ <button class="button-secondary so-widget-settings" data-form-url="<?php echo esc_url( $form_url ) ?>">
90
+ <?php esc_html_e( 'Settings', 'so-widgets-bundle' ) ?>
91
+ </button>
92
+ <?php
93
+ }
94
?>
95
+
96
+ <?php if( ! empty( $widget['Documentation'] ) ) : ?>
97
+ <a href="<?php echo esc_url( $widget['Documentation'] ) ?>" target="_blank" rel="noopener noreferrer" class="so-widget-documentation">
98
+ <?php _e( 'Documentation', 'so-widgets-bundle' ) ?>
99
+ </a>
100
+ <?php endif; ?>
101
+ </div>
102
</div>
103
104
</div>
base/base.php CHANGED
@@ -47,14 +47,17 @@ add_action('wp_footer', 'siteorigin_widget_print_styles');
47
* The ajax handler for getting a list of available icons.
48
*/
49
function siteorigin_widget_get_icon_list(){
50
- if(empty($_GET['family'])) exit();
51
- if ( empty( $_REQUEST['_widgets_nonce'] ) || !wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' ) ) return;
52
-
53
- $widget_icon_families = apply_filters('siteorigin_widgets_icon_families', array() );
54
-
55
- header('content-type: application/json');
56
- echo json_encode( !empty($widget_icon_families[$_GET['family']]) ? $widget_icon_families[$_GET['family']] : array() );
57
- exit();
58
}
59
add_action('wp_ajax_siteorigin_widgets_get_icons', 'siteorigin_widget_get_icon_list');
60
@@ -66,20 +69,37 @@ add_action('wp_ajax_siteorigin_widgets_get_icons', 'siteorigin_widget_get_icon_l
66
*/
67
function siteorigin_widget_get_icon($icon_value, $icon_styles = false) {
68
if( empty( $icon_value ) ) return false;
69
- list( $family, $icon ) = explode('-', $icon_value, 2);
70
if( empty( $family ) || empty( $icon ) ) return false;
71
72
static $widget_icon_families;
73
static $widget_icons_enqueued = array();
74
-
75
- if( empty($widget_icon_families) ) $widget_icon_families = apply_filters('siteorigin_widgets_icon_families', array() );
76
- if( empty($widget_icon_families[$family]) || empty($widget_icon_families[$family]['icons'][$icon]) ) return false;
77
-
78
- if(empty($widget_icons_enqueued[$family]) && !empty($widget_icon_families[$family]['style_uri'])) {
79
- if( !wp_style_is( 'siteorigin-widget-icon-font-'.$family ) ) {
80
- wp_enqueue_style('siteorigin-widget-icon-font-'.$family, $widget_icon_families[$family]['style_uri'] );
81
}
82
- return '<span class="sow-icon-' . esc_attr($family) . '" data-sow-icon="' . $widget_icon_families[$family]['icons'][$icon] . '" ' . ( !empty($icon_styles) ? 'style="'.implode('; ', $icon_styles).'"' : '' ) . '></span>';
83
}
84
else {
85
return false;
47
* The ajax handler for getting a list of available icons.
48
*/
49
function siteorigin_widget_get_icon_list(){
50
+ if ( empty( $_REQUEST['_widgets_nonce'] ) || ! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' ) ) {
51
+ wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
52
+ }
53
+
54
+ if ( empty( $_GET['family'] ) ) {
55
+ wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 400 );
56
+ }
57
+
58
+ $widget_icon_families = apply_filters( 'siteorigin_widgets_icon_families', array() );
59
+ $icons = ! empty( $widget_icon_families[ $_GET['family'] ] ) ? $widget_icon_families[ $_GET['family'] ] : array();
60
+ wp_send_json( $icons );
61
}
62
add_action('wp_ajax_siteorigin_widgets_get_icons', 'siteorigin_widget_get_icon_list');
63
69
*/
70
function siteorigin_widget_get_icon($icon_value, $icon_styles = false) {
71
if( empty( $icon_value ) ) return false;
72
+ $value_parts = SiteOrigin_Widget_Field_Icon::get_value_parts( $icon_value );
73
+ $family = $value_parts['family'];
74
+ $style = empty( $value_parts['style'] ) ? null : $value_parts['style'];
75
+ $icon = $value_parts['icon'];
76
if( empty( $family ) || empty( $icon ) ) return false;
77
78
static $widget_icon_families;
79
static $widget_icons_enqueued = array();
80
+
81
+ if ( empty( $widget_icon_families ) ) {
82
+ $widget_icon_families = apply_filters('siteorigin_widgets_icon_families', array() );
83
+ }
84
+ if ( empty( $widget_icon_families[ $family ] ) ||
85
+ empty( $widget_icon_families[ $family ]['icons'][ $icon ] ) ) {
86
+ return false;
87
+ }
88
+
89
+ if ( empty( $widget_icons_enqueued[ $family ] ) &&
90
+ ! empty( $widget_icon_families[ $family ]['style_uri'] ) ) {
91
+ if( ! wp_style_is( 'siteorigin-widget-icon-font-'.$family ) ) {
92
+ wp_enqueue_style( 'siteorigin-widget-icon-font-' . $family, $widget_icon_families[ $family ]['style_uri'] );
93
+ }
94
+ $family_style = 'sow-icon-' . $family . ( empty( $style ) ? '' : ' ' . $style );
95
+ $icon_data = $widget_icon_families[ $family ]['icons'][ $icon ];
96
+ $unicode = '';
97
+ if ( ! empty( $icon_data['unicode'] ) ) {
98
+ $unicode = $icon_data['unicode'];
99
+ } else if ( is_string( $icon_data ) ) {
100
+ $unicode = $icon_data;
101
}
102
+ return '<span class="' . esc_attr( $family_style ) . '" data-sow-icon="' . $unicode . '" ' . ( ! empty( $icon_styles ) ? 'style="' . implode( '; ', $icon_styles ) . '"' : '' ) . '></span>';
103
}
104
else {
105
return false;
base/css/img/menu-icon.svg ADDED
@@ -0,0 +1 @@
1
+ <svg enable-background="new 0 0 212.3 101.7" viewBox="0 0 212.3 101.7" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m145 56.9c4.6 5.5 7.7 6.7 13.6-1.9 1.3-2 7.7-7.8 9.8-8.8.6-.3 9.9 5.2 9.9 5.3 1.1 1.4-14.1 2-15.8 3.6-6 5.7-4.5 11-14.5 11.9-12.6 1.2-16.2-7.7-19.4-10.8-2-1.2-4-2.3-6-3.5 1.7 10.8.2 22.1.2 33 0 7.6-27.5 3.5-27 1.8 9.7-29.1-32.4-37.3-22.6-.8-8.8 3.9-17.7 3.9-26.5 0-1.5-17.5-3.4-34.9 4.1-46.5-5.2-2.2-7.7-2.9-8.1 3.9-.1 1.3-.9 4.4-1.6 5.5-.2.3-2.2-1.2-2.1-1.2.1-.5 1.5-2 1.9-3.3 1.3-4.4-.9-6.6 3.7-9.8 4.9-3.4 8.6-1.6 11.1-.6 6.3-5.4 13.8-8.6 29-8.6-.5 9.1 11.4 30.9 28.6 34.1-14.3-7.1-21.4-20.3-22.7-27.6 0-.2-.1-.4-.1-.6-4.6-26.9 25.8-25.2 31.3-9 16.7-2.8 14.7 7.6 18.9 14.5 3.2 6.6 5.4 14.6 4.3 19.4"/></clipPath><linearGradient id="b" gradientTransform="matrix(-179.082 -103.3928 85.8686 -148.7292 -74733.3203 117016.5)" gradientUnits="userSpaceOnUse" x1="-30.7393" x2="-30.2793" y1="807.7318" y2="807.7318"><stop offset="0" stop-color="#e5e5e5"/><stop offset="1" stop-color="#fff"/></linearGradient><path d="m145 56.9c4.6 5.5 7.7 6.7 13.6-1.9 1.3-2 7.7-7.8 9.8-8.8.6-.3 9.9 5.2 9.9 5.3 1.1 1.4-14.1 2-15.8 3.6-6 5.7-4.5 11-14.5 11.9-12.6 1.2-16.2-7.7-19.4-10.8-2-1.2-4-2.3-6-3.5 1.7 10.8.2 22.1.2 33 0 7.6-27.5 3.5-27 1.8 9.7-29.1-32.4-37.3-22.6-.8-8.8 3.9-17.7 3.9-26.5 0-1.5-17.5-3.4-34.9 4.1-46.5-5.2-2.2-7.7-2.9-8.1 3.9-.1 1.3-.9 4.4-1.6 5.5-.2.3-2.2-1.2-2.1-1.2.1-.5 1.5-2 1.9-3.3 1.3-4.4-.9-6.6 3.7-9.8 4.9-3.4 8.6-1.6 11.1-.6 6.3-5.4 13.8-8.6 29-8.6-.5 9.1 11.4 30.9 28.6 34.1-14.3-7.1-21.4-20.3-22.7-27.6 0-.2-.1-.4-.1-.6-4.6-26.9 25.8-25.1 31.4-8.9 16.7-2.8 14.7 7.6 18.9 14.5 3.1 6.5 5.3 14.5 4.2 19.3z" style="fill:none;stroke:#4d4d4d;stroke-width:8.7434;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:22.9256"/><path clip-path="url(#a)" d="m217.6 27.1-143.6-82.9-73.4 127 143.7 83z" fill="url(#b)"/><path clip-rule="evenodd" d="m131.3 32c1.2.3 2 1.3 1.8 2.2s-1.4 1.3-2.6 1-2-1.3-1.8-2.2 1.4-1.4 2.6-1" fill="#4d4d4d" fill-rule="evenodd"/></svg>
base/inc/fields/container-base.class.php CHANGED
@@ -96,6 +96,9 @@ abstract class SiteOrigin_Widget_Field_Container_Base extends SiteOrigin_Widget_
96
}
97
98
protected function sanitize_field_input( $value, $instance ) {
99
/* @var $field_factory SiteOrigin_Widget_Field_Factory */
100
$field_factory = SiteOrigin_Widget_Field_Factory::single();
101
foreach( $this->fields as $sub_field_name => $sub_field_options ) {
96
}
97
98
protected function sanitize_field_input( $value, $instance ) {
99
+ if ( ! is_array( $value ) ) {
100
+ return array();
101
+ }
102
/* @var $field_factory SiteOrigin_Widget_Field_Factory */
103
$field_factory = SiteOrigin_Widget_Field_Factory::single();
104
foreach( $this->fields as $sub_field_name => $sub_field_options ) {
base/inc/fields/css/icon-field.css CHANGED
@@ -103,10 +103,10 @@
103
width: 58px;
104
height: 48px;
105
margin: 3px;
106
- padding: 4px 0;
107
border: 1px solid #D0D0D0;
108
background: #FFFFFF;
109
- font-size: 40px;
110
overflow: hidden;
111
cursor: pointer;
112
text-align: center;
@@ -119,3 +119,13 @@
119
-moz-box-shadow: 0 1px 2px rgba(0,0,0,0.25);
120
box-shadow: 0 1px 2px rgba(0,0,0,0.25);
121
}
103
width: 58px;
104
height: 48px;
105
margin: 3px;
106
+ padding: 5px 0;
107
border: 1px solid #D0D0D0;
108
background: #FFFFFF;
109
+ font-size: 35px;
110
overflow: hidden;
111
cursor: pointer;
112
text-align: center;
119
-moz-box-shadow: 0 1px 2px rgba(0,0,0,0.25);
120
box-shadow: 0 1px 2px rgba(0,0,0,0.25);
121
}
122
+ .siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-icons.loading {
123
+ min-height: 40px;
124
+ background: #FFFFFF url("../../../css/img/wpspin_light.gif") center center no-repeat;
125
+ }
126
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
127
+ .siteorigin-widget-form .siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector .siteorigin-widget-icon-icons.loading {
128
+ background-image: url("../../../css/img/wpspin_light-2x.gif");
129
+ background-size: 16px 16px;
130
+ }
131
+ }
base/inc/fields/icon.class.php CHANGED
@@ -17,8 +17,9 @@ class SiteOrigin_Widget_Field_Icon extends SiteOrigin_Widget_Field_Base {
17
18
protected function render_field( $value, $instance ) {
19
$widget_icon_families = $this->get_widget_icon_families();
20
- list( $value_family, $null ) = !empty($value) ? explode('-', $value, 2) : array('fontawesome', '');
21
-
22
?>
23
24
<div class="siteorigin-widget-icon-selector-current">
@@ -41,6 +42,19 @@ class SiteOrigin_Widget_Field_Icon extends SiteOrigin_Widget_Field_Base {
41
</option>
42
<?php endforeach; ?>
43
</select>
44
45
<input type="search" class="siteorigin-widget-icon-search" placeholder="<?php esc_attr_e( 'Search Icons' ) ?>" />
46
@@ -61,13 +75,13 @@ class SiteOrigin_Widget_Field_Icon extends SiteOrigin_Widget_Field_Base {
61
else {
62
$sanitized_value = '';
63
}
64
- list( $value_family, $value_icon ) = ( ! empty( $sanitized_value ) && strpos( $sanitized_value, '-' ) !== false ) ? explode( '-', $sanitized_value, 2 ) : array('', '');
65
-
66
$widget_icon_families = $this->get_widget_icon_families();
67
- if( ! ( isset( $widget_icon_families[$value_family] ) && isset( $widget_icon_families[$value_family]['icons'][$value_icon] ) ) ) {
68
$sanitized_value = isset( $this->default ) ? $this->default : '';
69
}
70
-
71
return $sanitized_value;
72
}
73
@@ -84,6 +98,27 @@ class SiteOrigin_Widget_Field_Icon extends SiteOrigin_Widget_Field_Base {
84
85
return $widget_icon_families;
86
}
87
88
public function enqueue_scripts(){
89
wp_enqueue_script( 'so-icon-field', plugin_dir_url( __FILE__ ) . 'js/icon-field' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'jquery' ), SOW_BUNDLE_VERSION );
17
18
protected function render_field( $value, $instance ) {
19
$widget_icon_families = $this->get_widget_icon_families();
20
+ $value_parts = self::get_value_parts( $value );
21
+ $value_family = ! empty( $value ) ? $value_parts['family'] : 'fontawesome';
22
+ $value = $value_parts['family'] . '-' . ( empty( $value_parts['style'] ) ? '' : $value_parts['style'] ) . '-' . $value_parts['icon'];
23
?>
24
25
<div class="siteorigin-widget-icon-selector-current">
42
</option>
43
<?php endforeach; ?>
44
</select>
45
+
46
+ <?php if ( ! empty( $widget_icon_families[$value_family]['styles'] ) ) :
47
+ $family_styles = $widget_icon_families[ $value_family ]['styles'];
48
+ ?>
49
+ <select class="siteorigin-widget-icon-family-styles">
50
+ <?php foreach ( $family_styles as $family_style => $family_style_name ) : ?>
51
+ <option value="<?php echo esc_attr( $family_style ) ?>"
52
+ <?php selected( $value_parts['style'], $family_style ) ?>>
53
+ <?php esc_html_e( $family_style_name ); ?>
54
+ </option>
55
+ <?php endforeach; ?>
56
+ </select>
57
+ <?php endif;?>
58
59
<input type="search" class="siteorigin-widget-icon-search" placeholder="<?php esc_attr_e( 'Search Icons' ) ?>" />
60
75
else {
76
$sanitized_value = '';
77
}
78
+
79
+ $value_parts = self::get_value_parts( $sanitized_value );
80
$widget_icon_families = $this->get_widget_icon_families();
81
+ if( ! ( isset( $widget_icon_families[$value_parts['family']] ) && isset( $widget_icon_families[$value_parts['family']]['icons'][$value_parts['icon']] ) ) ) {
82
$sanitized_value = isset( $this->default ) ? $this->default : '';
83
}
84
+
85
return $sanitized_value;
86
}
87
98
99
return $widget_icon_families;
100
}
101
+
102
+ static function get_value_parts( $value ) {
103
+
104
+ list( $value_family, $value_icon ) = ( ! empty( $value ) && strpos( $value, '-' ) !== false ) ? explode( '-', $value, 2 ) : array('', '');
105
+
106
+ $matched = preg_match( '/(sow\-fa\w?)\-/', $value_icon, $style_matches );
107
+ if ( ! empty( $matched ) ) {
108
+ $value_icon = str_replace( $style_matches[0], '', $value_icon );
109
+ $value_style = $style_matches[1];
110
+ }
111
+
112
+ if ( ! empty( $value_family ) ) {
113
+ include_once plugin_dir_path(SOW_BUNDLE_BASE_FILE) . 'icons/' . $value_family . '/filter.php';
114
+ }
115
+
116
+ return apply_filters( 'siteorigin_widgets_icon_migrate_' . $value_family, array(
117
+ 'family' => $value_family,
118
+ 'style' => ! empty( $value_style ) ? $value_style : null,
119
+ 'icon' => $value_icon,
120
+ ) );
121
+ }
122
123
public function enqueue_scripts(){
124
wp_enqueue_script( 'so-icon-field', plugin_dir_url( __FILE__ ) . 'js/icon-field' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'jquery' ), SOW_BUNDLE_VERSION );
base/inc/fields/js/icon-field.js CHANGED
@@ -53,16 +53,52 @@
53
};
54
55
$search.keyup( searchIcons ).change( searchIcons );
56
57
var rerenderIcons = function() {
58
- var family = $is.find('select.siteorigin-widget-icon-family').val();
59
var container = $is.find('.siteorigin-widget-icon-icons');
60
-
61
if(typeof iconWidgetCache[family] === 'undefined') {
62
return;
63
}
64
65
container.empty();
66
67
if( $('#'+'siteorigin-widget-font-'+family).length === 0) {
68
@@ -72,11 +108,17 @@
72
.appendTo('head');
73
}
74
75
- for ( var i in iconWidgetCache[family].icons ) {
76
-
77
- var icon = $('<div data-sow-icon="' + iconWidgetCache[family].icons[i] + '"/>')
78
- .attr('data-value', family + '-' + i)
79
- .addClass( 'sow-icon-' + family )
80
.addClass( 'siteorigin-widget-icon-icons-icon' )
81
.click(function(){
82
var $ = $(this);
@@ -95,14 +137,14 @@
95
// This is being selected
96
container.find('.siteorigin-widget-icon-icons-icon').removeClass('siteorigin-widget-active');
97
$.addClass('siteorigin-widget-active');
98
- $v.val( $.data('value') );
99
100
// Also add this to the button
101
$b.find('span')
102
.show()
103
.attr( 'data-sow-icon', $.attr('data-sow-icon') )
104
.attr( 'class', '' )
105
- .addClass( 'sow-icon-' + family );
106
107
$remove.show();
108
}
@@ -112,17 +154,17 @@
112
// Hide the icon selector
113
$is.slideUp();
114
});
115
116
- container.append(icon);
117
-
118
- if( $v.val() === family + '-' + i ) {
119
// Add selected icon to the button.
120
- $b.find('span')
121
- .show()
122
- .attr( 'data-sow-icon', icon.attr('data-sow-icon') )
123
- .attr( 'class', '' )
124
- .addClass( 'sow-icon-' + family );
125
- icon.addClass('siteorigin-widget-active');
126
}
127
}
128
@@ -133,7 +175,7 @@
133
};
134
135
// Create the function for changing the icon family and call it once
136
- var changeIconFamily = function(){
137
// Fetch the family icons from the server
138
var family = $is.find('select.siteorigin-widget-icon-family').val();
139
@@ -142,12 +184,14 @@
142
iconWidgetCache[family] = dataIcons;
143
}
144
145
-
146
if(typeof family === 'undefined' || family === '') {
147
return;
148
}
149
150
if(typeof iconWidgetCache[family] === 'undefined') {
151
$.getJSON(
152
soWidgets.ajaxurl,
153
{
@@ -156,6 +200,8 @@
156
},
157
function(data) {
158
iconWidgetCache[family] = data;
159
rerenderIcons();
160
}
161
);
@@ -164,7 +210,7 @@
164
rerenderIcons();
165
}
166
};
167
- changeIconFamily();
168
169
$is.find('select.siteorigin-widget-icon-family').change(function(){
170
$is.find('.siteorigin-widget-icon-icons').empty();
53
};
54
55
$search.keyup( searchIcons ).change( searchIcons );
56
+
57
+ var renderStylesSelect = function ( init ) {
58
+ var $familySelect = $is.find( 'select.siteorigin-widget-icon-family' );
59
+ var family = $familySelect.val();
60
+
61
+ if(typeof iconWidgetCache[family] === 'undefined') {
62
+ return;
63
+ }
64
+
65
+ var $stylesSelect = $is.find( '.siteorigin-widget-icon-family-styles' );
66
+ if ( !init ) {
67
+ $stylesSelect.off( 'change', rerenderIcons );
68
+ $stylesSelect.remove();
69
+ var iconFamily = iconWidgetCache[ family ];
70
+ if ( iconFamily.hasOwnProperty( 'styles' ) && iconFamily.styles ) {
71
+ var options = '';
72
+ for ( var styleClass in iconFamily.styles ) {
73
+ options += '<option value="' + styleClass + '">' + iconFamily.styles[styleClass] + '</option>';
74
+ }
75
+ if ( options ) {
76
+ $stylesSelect = $( '<select class="siteorigin-widget-icon-family-styles"></select>' ).append( options );
77
+ $familySelect.after( $stylesSelect );
78
+
79
+ }
80
+ }
81
+ }
82
+ $stylesSelect.on( 'change', rerenderIcons );
83
+ };
84
85
var rerenderIcons = function() {
86
+ var $familySelect = $is.find( 'select.siteorigin-widget-icon-family' );
87
+ var family = $familySelect.val();
88
var container = $is.find('.siteorigin-widget-icon-icons');
89
+
90
if(typeof iconWidgetCache[family] === 'undefined') {
91
return;
92
}
93
94
container.empty();
95
+
96
+ var iconFamily = iconWidgetCache[ family ];
97
+ var icons = iconFamily.icons;
98
+ var style;
99
+ if ( iconFamily.hasOwnProperty( 'styles' ) && iconFamily.styles ) {
100
+ style = $is.find( '.siteorigin-widget-icon-family-styles' ).val();
101
+ }
102
103
if( $('#'+'siteorigin-widget-font-'+family).length === 0) {
104
108
.appendTo('head');
109
}
110
111
+ for ( var i in icons ) {
112
+ var iconData = icons[ i ];
113
+ var unicode = iconData.hasOwnProperty('unicode' ) ? iconData.unicode : iconData;
114
+ if ( iconData.hasOwnProperty( 'styles' ) && iconData.styles.indexOf( style ) === -1 ) {
115
+ continue;
116
+ }
117
+ var familyStyle = 'sow-icon-' + family + ( style ? ' ' + style : '' );
118
+ var familyValue = family + ( style ? '-' + style : '' ) + '-' + i;
119
+ var $icon = $('<div data-sow-icon="' + unicode + '"/>')
120
+ .attr('data-value', familyValue )
121
+ .addClass( familyStyle )
122
.addClass( 'siteorigin-widget-icon-icons-icon' )
123
.click(function(){
124
var $ = $(this);
137
// This is being selected
138
container.find('.siteorigin-widget-icon-icons-icon').removeClass('siteorigin-widget-active');
139
$.addClass('siteorigin-widget-active');
140
+ $v.val( $.data( 'value' ) );
141
142
// Also add this to the button
143
$b.find('span')
144
.show()
145
.attr( 'data-sow-icon', $.attr('data-sow-icon') )
146
.attr( 'class', '' )
147
+ .addClass( familyStyle );
148
149
$remove.show();
150
}
154
// Hide the icon selector
155
$is.slideUp();
156
});
157
+
158
+ container.append( $icon );
159
160
+ if( $v.val() === familyValue ) {
161
// Add selected icon to the button.
162
+ $b.find( 'span' )
163
+ .show()
164
+ .attr( 'data-sow-icon', $icon.attr( 'data-sow-icon' ) )
165
+ .attr( 'class', '' )
166
+ .addClass( familyStyle );
167
+ $icon.addClass( 'siteorigin-widget-active' );
168
}
169
}
170
175
};
176
177
// Create the function for changing the icon family and call it once
178
+ var changeIconFamily = function( init ){
179
// Fetch the family icons from the server
180
var family = $is.find('select.siteorigin-widget-icon-family').val();
181
184
iconWidgetCache[family] = dataIcons;
185
}
186
187
if(typeof family === 'undefined' || family === '') {
188
return;
189
}
190
191
if(typeof iconWidgetCache[family] === 'undefined') {
192
+ var $container = $is.find('.siteorigin-widget-icon-icons');
193
+ $container.addClass( 'loading' );
194
+
195
$.getJSON(
196
soWidgets.ajaxurl,
197
{
200
},
201
function(data) {
202
iconWidgetCache[family] = data;
203
+ renderStylesSelect( init );
204
+ $container.removeClass( 'loading' );
205
rerenderIcons();
206
}
207
);
210
rerenderIcons();
211
}
212
};
213
+ changeIconFamily( true );
214
215
$is.find('select.siteorigin-widget-icon-family').change(function(){
216
$is.find('.siteorigin-widget-icon-icons').empty();
base/inc/fields/js/icon-field.min.js CHANGED
@@ -1 +1 @@
1
- !function(g){var l={};g(document).on("sowsetupformfield",".siteorigin-widget-field-type-icon",function(i){var e=g(this),o=e.find(".siteorigin-widget-icon-selector"),a=o.find(".siteorigin-widget-icon-icon"),s=e.find(".siteorigin-widget-icon-selector-current"),d=e.find(".so-icon-remove"),t=e.find(".siteorigin-widget-icon-search");if(!e.data("initialized")){s.click(function(){o.slideToggle(),t.val(""),c()}),d.click(function(i){i.preventDefault(),e.find(".siteorigin-widget-active").click()});var c=function(){var n=t.val().toLowerCase();""===n?o.find(".siteorigin-widget-icon-icons-icon").show():o.find(".siteorigin-widget-icon-icons-icon").each(function(){var i=g(this),e=i.attr("data-value");-1===(e=e.replace(/-/," ")).indexOf(n)?i.hide():i.show()})};t.keyup(c).change(c);var n=function(){var e=o.find("select.siteorigin-widget-icon-family").val(),n=o.find(".siteorigin-widget-icon-icons");if(void 0!==l[e]){for(var i in n.empty(),0===g("#siteorigin-widget-font-"+e).length&&g("<link rel='stylesheet' type='text/css'>").attr("id","siteorigin-widget-font-"+e).attr("href",l[e].style_uri).appendTo("head"),l[e].icons){var t=g('<div data-sow-icon="'+l[e].icons[i]+'"/>').attr("data-value",e+"-"+i).addClass("sow-icon-"+e).addClass("siteorigin-widget-icon-icons-icon").click(function(){var i=g(this);i.hasClass("siteorigin-widget-active")?(i.removeClass("siteorigin-widget-active"),a.val(""),s.find("span").hide(),d.hide()):(n.find(".siteorigin-widget-icon-icons-icon").removeClass("siteorigin-widget-active"),i.addClass("siteorigin-widget-active"),a.val(i.data("value")),s.find("span").show().attr("data-sow-icon",i.attr("data-sow-icon")).attr("class","").addClass("sow-icon-"+e),d.show()),a.trigger("change",{isRendering:!0}),o.slideUp()});n.append(t),a.val()===e+"-"+i&&(s.find("span").show().attr("data-sow-icon",t.attr("data-sow-icon")).attr("class","").addClass("sow-icon-"+e),t.addClass("siteorigin-widget-active"))}n.prepend(n.find(".siteorigin-widget-active")),c()}},r=function(){var e=o.find("select.siteorigin-widget-icon-family").val(),i=o.find("select.siteorigin-widget-icon-family option:selected").data("icons");null!==i&&(l[e]=i),void 0!==e&&""!==e&&(void 0===l[e]?g.getJSON(soWidgets.ajaxurl,{action:"siteorigin_widgets_get_icons",family:o.find("select.siteorigin-widget-icon-family").val()},function(i){l[e]=i,n()}):n())};r(),o.find("select.siteorigin-widget-icon-family").change(function(){o.find(".siteorigin-widget-icon-icons").empty(),r()}),a.change(function(i,e){e&&e.isRendering||n()}),e.data("initialized",!0)}})}(jQuery);
1
+ !function(h){var u={};h(document).on("sowsetupformfield",".siteorigin-widget-field-type-icon",function(i){var e=h(this),g=e.find(".siteorigin-widget-icon-selector"),f=g.find(".siteorigin-widget-icon-icon"),v=e.find(".siteorigin-widget-icon-selector-current"),w=e.find(".so-icon-remove"),n=e.find(".siteorigin-widget-icon-search");if(!e.data("initialized")){v.click(function(){g.slideToggle(),n.val(""),y()}),w.click(function(i){i.preventDefault(),e.find(".siteorigin-widget-active").click()});var y=function(){var t=n.val().toLowerCase();""===t?g.find(".siteorigin-widget-icon-icons-icon").show():g.find(".siteorigin-widget-icon-icons-icon").each(function(){var i=h(this),e=i.attr("data-value");-1===(e=e.replace(/-/," ")).indexOf(t)?i.hide():i.show()})};n.keyup(y).change(y);var d=function(){var i=g.find("select.siteorigin-widget-icon-family").val(),e=g.find(".siteorigin-widget-icon-icons");if(void 0!==u[i]){e.empty();var t,n=u[i],s=n.icons;for(var o in n.hasOwnProperty("styles")&&n.styles&&(t=g.find(".siteorigin-widget-icon-family-styles").val()),0===h("#siteorigin-widget-font-"+i).length&&h("<link rel='stylesheet' type='text/css'>").attr("id","siteorigin-widget-font-"+i).attr("href",u[i].style_uri).appendTo("head"),s){var a=s[o],d=a.hasOwnProperty("unicode")?a.unicode:a;if(!a.hasOwnProperty("styles")||-1!==a.styles.indexOf(t)){var c="sow-icon-"+i+(t?" "+t:""),r=i+(t?"-"+t:"")+"-"+o,l=h('<div data-sow-icon="'+d+'"/>').attr("data-value",r).addClass(c).addClass("siteorigin-widget-icon-icons-icon").click(function(){var i=h(this);i.hasClass("siteorigin-widget-active")?(i.removeClass("siteorigin-widget-active"),f.val(""),v.find("span").hide(),w.hide()):(e.find(".siteorigin-widget-icon-icons-icon").removeClass("siteorigin-widget-active"),i.addClass("siteorigin-widget-active"),f.val(i.data("value")),v.find("span").show().attr("data-sow-icon",i.attr("data-sow-icon")).attr("class","").addClass(c),w.show()),f.trigger("change",{isRendering:!0}),g.slideUp()});e.append(l),f.val()===r&&(v.find("span").show().attr("data-sow-icon",l.attr("data-sow-icon")).attr("class","").addClass(c),l.addClass("siteorigin-widget-active"))}}e.prepend(e.find(".siteorigin-widget-active")),y()}},t=function(e){var t=g.find("select.siteorigin-widget-icon-family").val(),i=g.find("select.siteorigin-widget-icon-family option:selected").data("icons");if(null!==i&&(u[t]=i),void 0!==t&&""!==t)if(void 0===u[t]){var n=g.find(".siteorigin-widget-icon-icons");n.addClass("loading"),h.getJSON(soWidgets.ajaxurl,{action:"siteorigin_widgets_get_icons",family:g.find("select.siteorigin-widget-icon-family").val()},function(i){u[t]=i,function(i){var e=g.find("select.siteorigin-widget-icon-family"),t=e.val();if(void 0!==u[t]){var n=g.find(".siteorigin-widget-icon-family-styles");if(!i){n.off("change",d),n.remove();var s=u[t];if(s.hasOwnProperty("styles")&&s.styles){var o="";for(var a in s.styles)o+='<option value="'+a+'">'+s.styles[a]+"</option>";o&&(n=h('<select class="siteorigin-widget-icon-family-styles"></select>').append(o),e.after(n))}}n.on("change",d)}}(e),n.removeClass("loading"),d()})}else d()};t(!0),g.find("select.siteorigin-widget-icon-family").change(function(){g.find(".siteorigin-widget-icon-icons").empty(),t()}),f.change(function(i,e){e&&e.isRendering||d()}),e.data("initialized",!0)}})}(jQuery);
base/inc/fields/js/tinymce-field.js CHANGED
@@ -62,7 +62,9 @@
62
} );
63
64
wpEditor.remove( id );
65
- window.tinymce.EditorManager.overrideDefaults( { base_url: settings.baseURL, suffix: settings.suffix } );
66
// Wait for textarea to be visible before initialization.
67
if ( $textarea.is( ':visible' ) ) {
68
wpEditor.initialize( id, settings );
62
} );
63
64
wpEditor.remove( id );
65
+ if ( window.tinymce ) {
66
+ window.tinymce.EditorManager.overrideDefaults( { base_url: settings.baseURL, suffix: settings.suffix } );
67
+ }
68
// Wait for textarea to be visible before initialization.
69
if ( $textarea.is( ':visible' ) ) {
70
wpEditor.initialize( id, settings );
base/inc/fields/js/tinymce-field.min.js CHANGED
@@ -1 +1 @@
1
- !function(c){var t=function(r){if(!r.data("initialized")){var i=wp.oldEditor?wp.oldEditor:wp.editor;i&&i.hasOwnProperty("autop")&&(wp.editor.autop=i.autop,wp.editor.removep=i.removep,wp.editor.initialize=i.initialize);var e,n=r.find(".siteorigin-widget-tinymce-container"),d=n.data("editorSettings");if(d.wpautopToggleField){var t=n.closest(".siteorigin-widget-form");e=t.find(d.wpautopToggleField),d.tinymce.wpautop=e.is(":checked")}var a=n.find("textarea"),s=a.attr("id");if(d.tinymce&&(d.tinymce=c.extend({},d.tinymce,{selector:"#"+s,setup:function(i){i.on("change",function(){window.tinymce.get(s).save(),a.trigger("change")}),e&&(e.off("change"),e.on("change",function(){wp.editor.remove(s),d.tinymce.wpautop=e.is(":checked"),wp.editor.initialize(s,d)}))}})),c(document).on("wp-before-tinymce-init",function(i,e){if(e.selector===d.tinymce.selector){var t=n.data("mediaButtons");0===r.find(".wp-media-buttons").length&&r.find(".wp-editor-tabs").before(t.html)}}),c(document).on("tinymce-editor-setup",function(){r.find(".wp-editor-wrap").hasClass(d.selectedEditor+"-active")||setTimeout(function(){window.switchEditors.go(s)},10)}),i.remove(s),window.tinymce.EditorManager.overrideDefaults({base_url:d.baseURL,suffix:d.suffix}),a.is(":visible"))i.initialize(s,d);else var o=setInterval(function(){a.is(":visible")&&(i.initialize(s,d),clearInterval(o))},500);r.on("click",function(i){var e=c(i.target);if(e.is(".wp-switch-editor")){var t=e.hasClass("switch-tmce")?"tmce":"html";if("tmce"===t){var n=window.tinymce.get(s);if(null!==n){var o=a.val();-1!==o.search("<")&&-1===o.search(">")&&(o=o.replace(/</g,""),a.val(o)),n.setContent(window.switchEditors.wpautop(o))}}d.selectedEditor=t,r.find(".siteorigin-widget-tinymce-selected-editor").val(t)}}),r.data("initialized",!0)}};c(document).on("sowsetupformfield",".siteorigin-widget-field-type-tinymce",function(){var i=c(this),e=i.closest(".siteorigin-widget-field-repeater-item-form");0<e.length?e.is(":visible")?t(i):e.on("slideToggleOpenComplete",function(){e.is(":visible")&&(t(i),e.off("slideToggleOpenComplete"))}):t(i)}),c(document).on("sortstop",function(i,e){(e.item.is(".siteorigin-widget-field-repeater-item")?e.item.find("> .siteorigin-widget-field-repeater-item-form"):e.item.find(".siteorigin-widget-form")).find(".siteorigin-widget-field-type-tinymce").each(function(){c(this).data("initialized",null),t(c(this))})})}(jQuery);
1
+ !function(c){var t=function(r){if(!r.data("initialized")){var i=wp.oldEditor?wp.oldEditor:wp.editor;i&&i.hasOwnProperty("autop")&&(wp.editor.autop=i.autop,wp.editor.removep=i.removep,wp.editor.initialize=i.initialize);var e,n=r.find(".siteorigin-widget-tinymce-container"),d=n.data("editorSettings");if(d.wpautopToggleField){var t=n.closest(".siteorigin-widget-form");e=t.find(d.wpautopToggleField),d.tinymce.wpautop=e.is(":checked")}var a=n.find("textarea"),s=a.attr("id");if(d.tinymce&&(d.tinymce=c.extend({},d.tinymce,{selector:"#"+s,setup:function(i){i.on("change",function(){window.tinymce.get(s).save(),a.trigger("change")}),e&&(e.off("change"),e.on("change",function(){wp.editor.remove(s),d.tinymce.wpautop=e.is(":checked"),wp.editor.initialize(s,d)}))}})),c(document).on("wp-before-tinymce-init",function(i,e){if(e.selector===d.tinymce.selector){var t=n.data("mediaButtons");0===r.find(".wp-media-buttons").length&&r.find(".wp-editor-tabs").before(t.html)}}),c(document).on("tinymce-editor-setup",function(){r.find(".wp-editor-wrap").hasClass(d.selectedEditor+"-active")||setTimeout(function(){window.switchEditors.go(s)},10)}),i.remove(s),window.tinymce&&window.tinymce.EditorManager.overrideDefaults({base_url:d.baseURL,suffix:d.suffix}),a.is(":visible"))i.initialize(s,d);else var o=setInterval(function(){a.is(":visible")&&(i.initialize(s,d),clearInterval(o))},500);r.on("click",function(i){var e=c(i.target);if(e.is(".wp-switch-editor")){var t=e.hasClass("switch-tmce")?"tmce":"html";if("tmce"===t){var n=window.tinymce.get(s);if(null!==n){var o=a.val();-1!==o.search("<")&&-1===o.search(">")&&(o=o.replace(/</g,""),a.val(o)),n.setContent(window.switchEditors.wpautop(o))}}d.selectedEditor=t,r.find(".siteorigin-widget-tinymce-selected-editor").val(t)}}),r.data("initialized",!0)}};c(document).on("sowsetupformfield",".siteorigin-widget-field-type-tinymce",function(){var i=c(this),e=i.closest(".siteorigin-widget-field-repeater-item-form");0<e.length?e.is(":visible")?t(i):e.on("slideToggleOpenComplete",function(){e.is(":visible")&&(t(i),e.off("slideToggleOpenComplete"))}):t(i)}),c(document).on("sortstop",function(i,e){(e.item.is(".siteorigin-widget-field-repeater-item")?e.item.find("> .siteorigin-widget-field-repeater-item-form"):e.item.find(".siteorigin-widget-form")).find(".siteorigin-widget-field-type-tinymce").each(function(){c(this).data("initialized",null),t(c(this))})})}(jQuery);
base/inc/routes/siteorigin-widgets-resource.class.php CHANGED
@@ -58,7 +58,7 @@ class SiteOrigin_Widgets_Resource extends WP_REST_Controller {
58
$status_code = rest_authorization_required_code();
59
return new WP_Error(
60
$status_code,
61
- __( '', 'so-widgets-bundle' ),
62
array(
63
'status' => $status_code,
64
)
58
$status_code = rest_authorization_required_code();
59
return new WP_Error(
60
$status_code,
61
+ __( 'Insufficient permissions.', 'so-widgets-bundle' ),
62
array(
63
'status' => $status_code,
64
)
base/js/admin.js CHANGED
@@ -1238,9 +1238,9 @@ var sowbForms = window.sowbForms || {};
1238
}
1239
1240
if ( $body.hasClass('block-editor-page') ) {
1241
- // Setup new widgets when they're added in the customizer interface
1242
$(document).on('panels_setup_preview', function () {
1243
- $( sowb ).trigger( 'setup_widgets' );
1244
});
1245
}
1246
1238
}
1239
1240
if ( $body.hasClass('block-editor-page') ) {
1241
+ // Setup new widgets when they're previewed in the block editor.
1242
$(document).on('panels_setup_preview', function () {
1243
+ $( sowb ).trigger( 'setup_widgets', { preview: true } );
1244
});
1245
}
1246
base/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- var sowbForms=window.sowbForms||{};!function(C){C.fn.sowSetupForm=function(){return C(this).each(function(e,i){var o,t=C(i),y=!0,r=C("body"),n=t.find("input[name]");if(n.length&&-1!==n.attr("name").indexOf("__i__"))return this;if(t.is(".siteorigin-widget-form-main")){if(!0===t.data("sow-form-setup"))return!0;if(r.hasClass("widgets-php")&&!t.is(":visible")&&0===t.closest(".panel-dialog").length)return!0;t.on("sowstatechange",function(e,h,b){t.find("[data-state-handler]").each(function(){var e,i,t,r,n,a,s=C(this),o=C.extend({},s.data("state-handler"),y?s.data("state-handler-initial"):{});if(0===Object.keys(o).length)return!0;var d={},l=sowbForms.getContainerFieldId(s,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==l){var g={};for(var f in o)g[f.replace("{$repeater}",l)]=o[f];o=g}var c=sowbForms.getContainerFieldId(s,"widget",".siteorigin-widget-widget");if(!1!==c){var p={};for(var u in o){var m=u.match(/_else\[(.*)\]|(.*)\[(.*)\]/);p[m&&m.length&&void 0===m[1]?m[2]+"_"+c+"["+m[3]+"]":"_else["+m[1]+"_"+c+"]"]=o[u]}o=p}for(var w in o)if(n=!1,null!==(e=w.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?#x2F;))){if(i={group:"default",name:"",multi:!1},void 0!==e[2]?(i.group=e[1],i.name=e[3]):i.name=e[0],i.multi=void 0!==e[4],"_else"===i.group)i.group=i.name,i.name="",n=i.group===h&&void 0===d[i.group];else{a=i.name.split(",").map(function(e){return e.trim()});for(var v=0;v<a.length&&!(n=i.group===h&&a[v]===b);v++);}if(n){t=o[w],i.multi||(t=[t]);for(v=0;v<t.length;v++)(r=void 0!==t[v][1]&&Boolean(t[v][1])?s.find(t[v][1]):s)[t[v][0]].apply(r,void 0!==t[v][2]?t[v][2]:[]);d[i.group]=!0}}})}),t.sowSetupPreview();var a=(o=t).find(".siteorigin-widget-teaser");if(a.find(".dashicons-dismiss").click(function(){var e=C(this);C.get(e.data("dismiss-url")),a.slideUp("normal",function(){a.remove()})}),!t.data("backupDisabled")){var s=t.find("> .siteorigin-widgets-form-id").val(),d=t.find("> .siteorigin-widgets-form-timestamp"),l=parseInt(d.val()||0),g=JSON.parse(sessionStorage.getItem(s));if(g)if(g._sow_form_timestamp>l){var f=C('<div class="siteorigin-widget-form-notification"><span>'+soWidgets.backup.newerVersion+'</span><a class="button button-small so-backup-restore">'+soWidgets.backup.restore+'</a><a class="button button-small so-backup-dismiss">'+soWidgets.backup.dismiss+"</a><div><small>"+soWidgets.backup.replaceWarning+"</small></div></div>");t.prepend(f),f.find(".so-backup-restore").click(function(){sowbForms.setWidgetFormValues(o,g),f.slideUp("fast",function(){f.remove()})}),f.find(".so-backup-dismiss").click(function(){f.slideUp("fast",function(){sessionStorage.removeItem(s),f.remove()})})}else sessionStorage.removeItem(s);t.change(function(){d.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(t);sessionStorage.setItem(s,JSON.stringify(e))})}}else o=t.closest(".siteorigin-widget-form-main");o.find("> .siteorigin-widgets-form-id").val();var c=t.find("> .siteorigin-widget-field");c.find("> .siteorigin-widget-section").sowSetupForm();var p=c.find("> .siteorigin-widget-widget");p.find("> .siteorigin-widget-section").sowSetupForm(),p.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),c.find(".siteorigin-widget-input").each(function(e,i){null===C(i).data("original-name")&&C(i).data("original-name",C(i).attr("name"))}),c.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),t.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),c.find("> .siteorigin-widget-input-color").each(function(){var e=C(this),i={change:function(e,i){setTimeout(function(){C(e.target).trigger("change")},100)}};e.data("defaultColor")&&(i.defaultColor=e.data("defaultColor")),e.wpColorPicker(i)});var u=function(){C(this).toggleClass("siteorigin-widget-section-visible"),C(this).parent().find("> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section").slideToggle("fast",function(){(C(window).resize(),C(this).find("> .siteorigin-widget-field-container-state").val(C(this).is(":visible")?"open":"closed"),C(this).is(":visible"))&&C(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})};c.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").click(u),c.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").click(u),c.filter(".siteorigin-widget-field-type-slider").each(function(){var t=C(this),r=t.find('input[type="number"]'),n=t.find(".siteorigin-widget-value-slider");n.slider({max:parseFloat(r.attr("max")),min:parseFloat(r.attr("min")),step:parseFloat(r.attr("step")),value:parseFloat(r.val()),slide:function(e,i){r.val(parseFloat(i.value)),r.trigger("change")},change:function(e,i){t.find(".siteorigin-widget-slider-value").html(i.value)}}),r.change(function(e,i){i&&i.silent||n.slider("value",parseFloat(r.val()))})}),c.filter(".siteorigin-widget-field-type-link").each(function(){var n=C(this),t=function(){var e=n.find(".content-text-search"),i=e.val(),t=e.data("postTypes"),r=n.find("ul.posts").empty().addClass("loading");C.get(soWidgets.ajaxurl,{action:"so_widgets_search_posts",query:i,postTypes:t},function(e){for(var i=0;i<e.length;i++)""===e[i].label&&(e[i].label="&nbsp;"),r.append(C("<li>").addClass("post").html(e[i].label+"<span>("+e[i].type+")</span>").data(e[i]));r.removeClass("loading")})};n.find(".select-content-button, .button-close").click(function(e){e.preventDefault(),C(this).blur();var i=n.find(".existing-content-selector");i.toggle(),i.is(":visible")&&0===i.find("ul.posts li").length&&t()}),n.on("click",".posts li",function(e){e.preventDefault();var i=C(this);n.find("input.siteorigin-widget-input").val("post: "+i.data("value")),n.change(),n.find(".existing-content-selector").toggle()});var e=null;n.find(".content-text-search").keyup(function(){null!==e&&clearTimeout(e),e=setTimeout(function(){t()},500)})}),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&c.filter(".siteorigin-widget-field-type-builder").each(function(){C(this).find("> .siteorigin-page-builder-field").each(function(){var e=C(this);e.soPanelsSetupBuilderWidget({builderType:e.data("type")})})});var m=function(){var a=C(this),e=a.closest("[data-state-emitter]").data("state-emitter");if(void 0!==e){var i=function(e,i){if(void 0===sowEmitters[e.callback]||"_"===e.callback.substr(0,1))return i;if(a.is('[type="radio"]')&&!a.is(":checked"))return i;var t=sowbForms.getContainerFieldId(a,"repeater",".siteorigin-widget-field-repeater-item");!1!==t&&(e.args=e.args.map(function(e){return e.replace("{$repeater}",t)}));var r=sowbForms.getContainerFieldId(a,"widget",".siteorigin-widget-widget");!1===r||e.hasOwnProperty("widgetFieldId")||(e.widgetFieldId=r,e.args=e.args.map(function(e){return e+"_"+r}));var n=a.is('[type="checkbox"]')?a.is(":checked"):a.val();return C.extend(i,sowEmitters[e.callback](n,e.args))},t={default:""};void 0===e.length&&(e=[e]);for(var r=0;r<e.length;r++)t=i(e[r],t);var n=o.data("states");for(var s in void 0===n&&(n={default:""}),t)void 0!==n[s]&&t[s]===n[s]||(n[s]=t[s],o.trigger("sowstatechange",[s,t[s]]));o.data("states",n)}};c.filter("[data-state-emitter]").each(function(){var e=C(this).find(".siteorigin-widget-input");e.on("keyup change",m),e.each(function(){var e=C(this);e.is(":radio")?e.is(":checked")&&m.call(e[0]):m.call(e[0])})}),t.trigger("sowsetupform",c).data("sow-form-setup",!0),c.trigger("sowsetupformfield"),t.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(r.hasClass("wp-customizer")||r.hasClass("widgets-php"))&&t.closest(".ui-sortable").on("sortstop",function(e,i){i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}),y=!1})},C.fn.sowSetupPreview=function(){var r=C(this);r.siblings(".siteorigin-widget-preview").find("> a").click(function(e){e.preventDefault();var i=sowbForms.getWidgetFormValues(r),t=C(C("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");t.find('input[name="data"]').val(JSON.stringify(i)),t.find('input[name="class"]').val(r.data("class")),t.find("iframe").on("load",function(){C(this).css("visibility","visible")}),t.find("form").submit(),t.find(".close").click(function(){t.remove()})})},C.fn.sowSetupRepeater=function(){return C(this).each(function(e,i){var n=C(i),t=n.find(".siteorigin-widget-field-repeater-items"),a=n.data("repeater-name");t.bind("updateFieldPositions",function(){var e=C(this),i=e.find("> .siteorigin-widget-field-repeater-item");i.each(function(r,e){C(e).find(".siteorigin-widget-input").each(function(e,i){var t=C(i).data("repeater-positions");void 0===t&&(t={}),t[a]=r,C(i).data("repeater-positions",t)})}),e.find(".siteorigin-widget-input").each(function(e,i){var t=C(i),r=t.data("repeater-positions");if(void 0!==r){var n=t.attr("data-original-name");if(n||(t.attr("data-original-name",t.attr("name")),n=t.attr("name")),!n)return;if(r)for(var a in r)n=n.replace("#"+a+"#",r[a]);t.attr("name",n)}}),e.data("initialSetup")||(e.find(".siteorigin-widget-input").each(function(e,i){var t=C(i);t.prop("checked",t.prop("defaultChecked"))}),e.data("initialSetup",!0));var t=n.data("scroll-count")?parseInt(n.data("scroll-count")):0;if(0<t&&i.length>t){var r=i.first().outerHeight();e.css("max-height",r*t).css("overflow","auto")}else e.css("max-height","").css("overflow","")}),t.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){t.find('input[type="radio"].siteorigin-widget-input').attr("name",""),t.trigger("updateFieldPositions"),n.trigger("change")},sortstop:function(e,i){i.item.is(".siteorigin-widget-field-repeater-item")?i.item.find("> .siteorigin-widget-field-repeater-item-form").each(function(){C(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")}):i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield");n.trigger("change")}}),t.trigger("updateFieldPositions"),n.find("> .siteorigin-widget-field-repeater-add").disableSelection().click(function(e){e.preventDefault(),n.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",function(){C(window).resize()})}),n.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").click(function(e){e.preventDefault(),n.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",function(){C(window).resize()})})})},C.fn.sowAddRepeaterItem=function(){return C(this).each(function(e,i){var t=C(i),r=t.find("> .siteorigin-widget-field-repeater-items").children().length+1,n=C("<div>"+t.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");n.find(".siteorigin-widget-input[data-name]").each(function(){var e=C(this);0===e.closest(".siteorigin-widget-field-repeater-item-html").length&&e.attr("name",C(this).data("name"))});var a="";n.find("> .siteorigin-widget-field").each(function(e,i){var t=i.outerHTML;C(i).is(".siteorigin-widget-field-type-repeater")||(t=t.replace(/_id_/g,r)),a+=t});var s=void 0!==t.attr("readonly"),o=C('<div class="siteorigin-widget-field-repeater-item ui-draggable" />').append(C('<div class="siteorigin-widget-field-repeater-item-top" />').append(C('<div class="siteorigin-widget-field-expand" />')).append(s?"":C('<div class="siteorigin-widget-field-copy" />')).append(s?"":C('<div class="siteorigin-widget-field-remove" />')).append(C("<h4 />").html(t.data("item-name")))).append(C('<div class="siteorigin-widget-field-repeater-item-form" />').html(a));t.find("> .siteorigin-widget-field-repeater-items").append(o).sortable("refresh").trigger("updateFieldPositions"),o.sowSetupRepeaterItems(),o.hide().slideDown("fast",function(){C(window).resize()}),t.trigger("change")})},C.fn.sowRemoveRepeaterItem=function(){return C(this).each(function(e,i){var t=C(this).closest(".siteorigin-widget-field-repeater-items");C(this).remove(),t.sortable("refresh").trigger("updateFieldPositions"),C(i).trigger("change")})},C.fn.sowSetupRepeaterItems=function(){return C(this).each(function(e,i){var _=C(i);if(void 0===_.data("sowrepeater-actions-setup")){var t=_.closest(".siteorigin-widget-field-repeater"),r=_.find("> .siteorigin-widget-field-repeater-item-top"),n=t.data("item-label");if(n&&n.selector){var a=function(){var e=n.hasOwnProperty("valueMethod")&&n.valueMethod?n.valueMethod:"val",i=_.find(n.selector)[e]();i&&(80<i.length&&(i=i.substr(0,79)+"..."),r.find("h4").text(i))};a();var s=n.hasOwnProperty("updateEvent")&&n.updateEvent?n.updateEvent:"change";_.bind(s,a)}r.click(function(e){"siteorigin-widget-field-remove"!==e.target.className&&"siteorigin-widget-field-copy"!==e.target.className&&(e.preventDefault(),C(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",function(){(C(window).resize(),C(this).is(":visible"))?(C(this).trigger("slideToggleOpenComplete"),C(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")):C(this).trigger("slideToggleCloseComplete")}))}),r.find(".siteorigin-widget-field-remove").click(function(e,i){e.preventDefault();var t=C(this).closest(".siteorigin-widget-field-repeater-items"),r=C(this).closest(".siteorigin-widget-field-repeater-item"),n=function(){r.remove(),t.sortable("refresh").trigger("updateFieldPositions"),C(window).resize()};i&&i.silent?n():confirm(soWidgets.sure)&&r.slideUp("fast",n),_.trigger("change")}),r.find(".siteorigin-widget-field-copy").click(function(e){e.preventDefault();var h=C(this).closest(".siteorigin-widget-form-main"),b=C(this).closest(".siteorigin-widget-field-repeater-item"),y=b.clone(),i=b.closest(".siteorigin-widget-field-repeater-items"),F=i.children().length,k={};y.find("*[name]").each(function(){var e=C(this),i=e.attr("id"),t=e.attr("name");if(e.is("textarea")&&e.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){e.parent().empty().append(e),e.css("display","");var r=tinymce.get(i);r&&e.val(r.getContent())}else if(e.is(".wp-color-picker")){var n=e.closest(".wp-picker-container"),a=e.closest(".siteorigin-widget-field");n.remove(),a.append(e.remove())}else{var s=i?b.find("#"+i):b.find('[name="'+t+'"]');s.length&&null!=s.val()&&e.val(s.val())}if(i){var o,d;if(e.is('[type="radio"]')){o=i.replace(/-\d+-\d+#x2F;,"");var l=i.replace(/-\d+#x2F;,"");if(!k[o]){var g={};k[o]=h.find(".siteorigin-widget-input[id^="+o+"]").not("[id*=_id_]").filter(function(e,i){var t=C(i).attr("name");return!g[t]&&(g[t]=!0)}).length+1}var f=o+"-"+k[o];d=f+i.match(/-\d+#x2F;)[0],y.find("label[for="+l+"]").attr("for",f)}else u=new RegExp("-\\d+quot;),o=i.replace(u,""),k[o]||(k[o]=h.find(".siteorigin-widget-input[id^="+o+"]").not("[id*=_id_]").length+1),d=o+"-"+k[o]++;if(e.attr("id",d),e.is(".wp-editor-area")){var c=e.closest(".siteorigin-widget-tinymce-container"),p=c.data("media-buttons");if(p&&p.html){var u=new RegExp(i,"g");p.html=p.html.replace(u,d),c.data("media-buttons",p)}}y.find("label[for="+i+"]").attr("for",d),y.find("[id*="+i+"]").each(function(){var e=C(this).attr("id").replace(i,d);C(this).attr("id",e)}),"undefined"!=typeof tinymce&&tinymce.get(d)&&tinymce.get(d).remove()}var m=b.parents(".siteorigin-widget-field-repeater").length,w=C("body");(w.hasClass("wp-customizer")||w.hasClass("widgets-php"))&&0===_.closest(".panel-dialog").length&&(m+=1);var v=t.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(m-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+F.toString()+"$3");e.attr("name",v),e.data("original-name",v)}),i.append(y).sortable("refresh").trigger("updateFieldPositions"),y.sowSetupRepeaterItems(),y.hide().slideDown("fast",function(){C(window).resize()}),_.trigger("change")}),_.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),_.data("sowrepeater-actions-setup",!0)}})},sowbForms.getContainerFieldId=function(e,i,t){var r=i+"FieldId";this.hasOwnProperty(r)||(this[r]=1);var n=e.closest(t);if(n.length){var a=n.data("field-id");return void 0===a&&(a=this[r]++),n.data("field-id",a),a}return!1},sowbForms.getWidgetFieldVariable=function(e,i,t){var r=window.sow_field_javascript_variables[e];i=i.replace(/\[#.*?#\]/g,"");for(var n=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(i)[1].split("]["),a=n.length?r:null;n.length;)a=a[n.shift()];return a[t]},sowbForms.fetchWidgetVariable=function(i,t,r){window.sowVars=window.sowVars||{},void 0===window.sowVars[t]?C.post(soWidgets.ajaxurl,{action:"sow_get_javascript_variables",widget:t,key:i},function(e){window.sowVars[t]=e,r(window.sowVars[t][i])}):r(window.sowVars[t][i])},sowbForms.getWidgetFormValues=function(e){if(_.isUndefined(e))return null;var l={};return e.find("*[name]").each(function(){var i=C(this);try{var e=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(e))return!0;var t=(e=e[1]).split("][");t=t.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var r=l,n=null,a=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===a)n=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===a){if(!i.is(":checked"))return;n=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var s=null;"undefined"!=typeof tinyMCE&&(s=tinyMCE.get(i.attr("id"))),n=null===s||"function"!=typeof s.getContent||s.isHidden()?i.val():s.getContent()}else if("SELECT"===i.prop("tagName")){var o=i.find("option:selected");1===o.length?n=i.find("option:selected").val():1<o.length&&(n=_.map(i.find("option:selected"),function(e,i){return C(e).val()}))}else n=i.val();for(var d=0;d<t.length;d++)d===t.length-1?""===t[d]?r.push(n):r[t[d]]=n:(_.isUndefined(r[t[d]])&&(_.isNumber(t[d+1])||""===t[d+1]?r[t[d]]=[]:r[t[d]]={}),r=r[t[d]])}catch(e){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+e.message)}}),l},sowbForms.setWidgetFormValues=function(e,d,v,l){v=v||!1,l=void 0!==l&&l||void 0===l;var i=0,h=function(e,w){10!=++i&&e.find("> .siteorigin-widget-field-type-repeater,> .siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field-type-repeater").each(function(e,i){var t=C(this),r=t.find("> .siteorigin-widget-field-repeater"),n=r.data("repeaterName"),a=w.hasOwnProperty(n)?w[n]:null;if(t.parent().is(".siteorigin-widget-section")){var s=r.data("element-name");s=s.replace(/\[#.*?#\]/g,"");for(var o=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(s)[1].split("]["),d=o.length?w:null;o.length;){var l=o.shift();d=d.hasOwnProperty(l)?d[l]:d}a=d}if(a&&Array.isArray(a)){var g=r.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),f=a.length,c=g.length;if(c<f)for(var p=0;p<f-c;p++)r.find("> .siteorigin-widget-field-repeater-add").click();else if(!v&&f<c)for(var u=f;u<c;u++){C(g.eq(u)).find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}g=r.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var m=0;m<g.length;m++)g.eq(m).find("> .siteorigin-widget-field-repeater-item-form"),h(g.eq(m).find("> .siteorigin-widget-field-repeater-item-form"),a[m])}}),--i};h(e,d),e.find("*[name]").each(function(){var e=C(this),i=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(e.attr("name"));if(null==i)return!0;var t=(i=i[1]).split("][");t=t.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});for(var r,n=d,a=0;a<t.length;a++){if(!n.hasOwnProperty(t[a])){if(v)return!0;break}a===t.length-1?r=n[t[a]]:n=n[t[a]]}if("checkbox"===e.attr("type"))e.prop("checked",r);else if("radio"===e.attr("type"))e.prop("checked",r===e.val());else if("TEXTAREA"===e.prop("tagName")&&e.hasClass("wp-editor-area")){var s=null;"undefined"!=typeof tinyMCE&&(s=tinyMCE.get(e.attr("id"))),null!==s&&"function"==typeof s.setContent&&!s.isHidden()&&e.parent().is(":visible")?s.initialized?s.setContent(r):s.on("init",function(){s.setContent(r)}):e.val(r)}else if(e.is(".panels-data")){e.val(r);var o=e.data("builder");o&&o.setDataField(e)}else e.val(r);l&&e.trigger("change")})},C(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",function(){var e=C(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout(function(){e.sowSetupForm()},200)});var e=C("body");e.hasClass("wp-customizer")&&C(document).on("widget-added",function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()}),e.hasClass("block-editor-page")&&C(document).on("panels_setup_preview",function(){C(sowb).trigger("setup_widgets")}),C(document).on("open_dialog",function(e,i){i.$el.find(".so-panels-dialog").is(".so-panels-dialog-edit-widget")&&i.$el.find(".siteorigin-widget-form-main").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}),C(function(){C(document).trigger("sowadminloaded")})}(jQuery);var sowEmitters={_match:function(e,i){void 0===i&&(i=".*");var t=new RegExp("^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *("+i+") *quot;).exec(e);if(null===t)return!1;var r="",n="default";return r=void 0!==t[3]?(n=t[1],t[3]):t[1],{match:t[4].trim(),group:n,state:r}},_checker:function(e,i,t,r){var n,a={};void 0===i.length&&(i=[i]);for(var s=0;s<i.length;s++)!1!==(n=sowEmitters._match(i[s],t))&&("_true"===n.match||r(e,i,n.match))&&(a[n.group]=n.state);return a},select:function(e,i){void 0===i.length&&(i=[i]);for(var t={},r=0;r<i.length;r++)""===i[r]&&(i[r]="default"),t[i[r]]=e;return t},conditional:function(val,args){return sowEmitters._checker(val,args,"[^;{}]*",function(val,args,match){return eval(match)})},in:function(e,i){return sowEmitters._checker(e,i,"[^;{}]*",function(e,i,t){return-1!==t.split(",").map(function(e){return e.trim()}).indexOf(e)})}};window.sowbForms=sowbForms;
1
+ var sowbForms=window.sowbForms||{};!function(C){C.fn.sowSetupForm=function(){return C(this).each(function(e,i){var o,t=C(i),y=!0,r=C("body"),n=t.find("input[name]");if(n.length&&-1!==n.attr("name").indexOf("__i__"))return this;if(t.is(".siteorigin-widget-form-main")){if(!0===t.data("sow-form-setup"))return!0;if(r.hasClass("widgets-php")&&!t.is(":visible")&&0===t.closest(".panel-dialog").length)return!0;t.on("sowstatechange",function(e,h,b){t.find("[data-state-handler]").each(function(){var e,i,t,r,n,a,s=C(this),o=C.extend({},s.data("state-handler"),y?s.data("state-handler-initial"):{});if(0===Object.keys(o).length)return!0;var d={},l=sowbForms.getContainerFieldId(s,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==l){var g={};for(var f in o)g[f.replace("{$repeater}",l)]=o[f];o=g}var c=sowbForms.getContainerFieldId(s,"widget",".siteorigin-widget-widget");if(!1!==c){var p={};for(var u in o){var m=u.match(/_else\[(.*)\]|(.*)\[(.*)\]/);p[m&&m.length&&void 0===m[1]?m[2]+"_"+c+"["+m[3]+"]":"_else["+m[1]+"_"+c+"]"]=o[u]}o=p}for(var w in o)if(n=!1,null!==(e=w.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?#x2F;))){if(i={group:"default",name:"",multi:!1},void 0!==e[2]?(i.group=e[1],i.name=e[3]):i.name=e[0],i.multi=void 0!==e[4],"_else"===i.group)i.group=i.name,i.name="",n=i.group===h&&void 0===d[i.group];else{a=i.name.split(",").map(function(e){return e.trim()});for(var v=0;v<a.length&&!(n=i.group===h&&a[v]===b);v++);}if(n){t=o[w],i.multi||(t=[t]);for(v=0;v<t.length;v++)(r=void 0!==t[v][1]&&Boolean(t[v][1])?s.find(t[v][1]):s)[t[v][0]].apply(r,void 0!==t[v][2]?t[v][2]:[]);d[i.group]=!0}}})}),t.sowSetupPreview();var a=(o=t).find(".siteorigin-widget-teaser");if(a.find(".dashicons-dismiss").click(function(){var e=C(this);C.get(e.data("dismiss-url")),a.slideUp("normal",function(){a.remove()})}),!t.data("backupDisabled")){var s=t.find("> .siteorigin-widgets-form-id").val(),d=t.find("> .siteorigin-widgets-form-timestamp"),l=parseInt(d.val()||0),g=JSON.parse(sessionStorage.getItem(s));if(g)if(g._sow_form_timestamp>l){var f=C('<div class="siteorigin-widget-form-notification"><span>'+soWidgets.backup.newerVersion+'</span><a class="button button-small so-backup-restore">'+soWidgets.backup.restore+'</a><a class="button button-small so-backup-dismiss">'+soWidgets.backup.dismiss+"</a><div><small>"+soWidgets.backup.replaceWarning+"</small></div></div>");t.prepend(f),f.find(".so-backup-restore").click(function(){sowbForms.setWidgetFormValues(o,g),f.slideUp("fast",function(){f.remove()})}),f.find(".so-backup-dismiss").click(function(){f.slideUp("fast",function(){sessionStorage.removeItem(s),f.remove()})})}else sessionStorage.removeItem(s);t.change(function(){d.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(t);sessionStorage.setItem(s,JSON.stringify(e))})}}else o=t.closest(".siteorigin-widget-form-main");o.find("> .siteorigin-widgets-form-id").val();var c=t.find("> .siteorigin-widget-field");c.find("> .siteorigin-widget-section").sowSetupForm();var p=c.find("> .siteorigin-widget-widget");p.find("> .siteorigin-widget-section").sowSetupForm(),p.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),c.find(".siteorigin-widget-input").each(function(e,i){null===C(i).data("original-name")&&C(i).data("original-name",C(i).attr("name"))}),c.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),t.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),c.find("> .siteorigin-widget-input-color").each(function(){var e=C(this),i={change:function(e,i){setTimeout(function(){C(e.target).trigger("change")},100)}};e.data("defaultColor")&&(i.defaultColor=e.data("defaultColor")),e.wpColorPicker(i)});var u=function(){C(this).toggleClass("siteorigin-widget-section-visible"),C(this).parent().find("> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section").slideToggle("fast",function(){(C(window).resize(),C(this).find("> .siteorigin-widget-field-container-state").val(C(this).is(":visible")?"open":"closed"),C(this).is(":visible"))&&C(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})};c.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").click(u),c.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").click(u),c.filter(".siteorigin-widget-field-type-slider").each(function(){var t=C(this),r=t.find('input[type="number"]'),n=t.find(".siteorigin-widget-value-slider");n.slider({max:parseFloat(r.attr("max")),min:parseFloat(r.attr("min")),step:parseFloat(r.attr("step")),value:parseFloat(r.val()),slide:function(e,i){r.val(parseFloat(i.value)),r.trigger("change")},change:function(e,i){t.find(".siteorigin-widget-slider-value").html(i.value)}}),r.change(function(e,i){i&&i.silent||n.slider("value",parseFloat(r.val()))})}),c.filter(".siteorigin-widget-field-type-link").each(function(){var n=C(this),t=function(){var e=n.find(".content-text-search"),i=e.val(),t=e.data("postTypes"),r=n.find("ul.posts").empty().addClass("loading");C.get(soWidgets.ajaxurl,{action:"so_widgets_search_posts",query:i,postTypes:t},function(e){for(var i=0;i<e.length;i++)""===e[i].label&&(e[i].label="&nbsp;"),r.append(C("<li>").addClass("post").html(e[i].label+"<span>("+e[i].type+")</span>").data(e[i]));r.removeClass("loading")})};n.find(".select-content-button, .button-close").click(function(e){e.preventDefault(),C(this).blur();var i=n.find(".existing-content-selector");i.toggle(),i.is(":visible")&&0===i.find("ul.posts li").length&&t()}),n.on("click",".posts li",function(e){e.preventDefault();var i=C(this);n.find("input.siteorigin-widget-input").val("post: "+i.data("value")),n.change(),n.find(".existing-content-selector").toggle()});var e=null;n.find(".content-text-search").keyup(function(){null!==e&&clearTimeout(e),e=setTimeout(function(){t()},500)})}),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&c.filter(".siteorigin-widget-field-type-builder").each(function(){C(this).find("> .siteorigin-page-builder-field").each(function(){var e=C(this);e.soPanelsSetupBuilderWidget({builderType:e.data("type")})})});var m=function(){var a=C(this),e=a.closest("[data-state-emitter]").data("state-emitter");if(void 0!==e){var i=function(e,i){if(void 0===sowEmitters[e.callback]||"_"===e.callback.substr(0,1))return i;if(a.is('[type="radio"]')&&!a.is(":checked"))return i;var t=sowbForms.getContainerFieldId(a,"repeater",".siteorigin-widget-field-repeater-item");!1!==t&&(e.args=e.args.map(function(e){return e.replace("{$repeater}",t)}));var r=sowbForms.getContainerFieldId(a,"widget",".siteorigin-widget-widget");!1===r||e.hasOwnProperty("widgetFieldId")||(e.widgetFieldId=r,e.args=e.args.map(function(e){return e+"_"+r}));var n=a.is('[type="checkbox"]')?a.is(":checked"):a.val();return C.extend(i,sowEmitters[e.callback](n,e.args))},t={default:""};void 0===e.length&&(e=[e]);for(var r=0;r<e.length;r++)t=i(e[r],t);var n=o.data("states");for(var s in void 0===n&&(n={default:""}),t)void 0!==n[s]&&t[s]===n[s]||(n[s]=t[s],o.trigger("sowstatechange",[s,t[s]]));o.data("states",n)}};c.filter("[data-state-emitter]").each(function(){var e=C(this).find(".siteorigin-widget-input");e.on("keyup change",m),e.each(function(){var e=C(this);e.is(":radio")?e.is(":checked")&&m.call(e[0]):m.call(e[0])})}),t.trigger("sowsetupform",c).data("sow-form-setup",!0),c.trigger("sowsetupformfield"),t.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(r.hasClass("wp-customizer")||r.hasClass("widgets-php"))&&t.closest(".ui-sortable").on("sortstop",function(e,i){i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}),y=!1})},C.fn.sowSetupPreview=function(){var r=C(this);r.siblings(".siteorigin-widget-preview").find("> a").click(function(e){e.preventDefault();var i=sowbForms.getWidgetFormValues(r),t=C(C("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");t.find('input[name="data"]').val(JSON.stringify(i)),t.find('input[name="class"]').val(r.data("class")),t.find("iframe").on("load",function(){C(this).css("visibility","visible")}),t.find("form").submit(),t.find(".close").click(function(){t.remove()})})},C.fn.sowSetupRepeater=function(){return C(this).each(function(e,i){var n=C(i),t=n.find(".siteorigin-widget-field-repeater-items"),a=n.data("repeater-name");t.bind("updateFieldPositions",function(){var e=C(this),i=e.find("> .siteorigin-widget-field-repeater-item");i.each(function(r,e){C(e).find(".siteorigin-widget-input").each(function(e,i){var t=C(i).data("repeater-positions");void 0===t&&(t={}),t[a]=r,C(i).data("repeater-positions",t)})}),e.find(".siteorigin-widget-input").each(function(e,i){var t=C(i),r=t.data("repeater-positions");if(void 0!==r){var n=t.attr("data-original-name");if(n||(t.attr("data-original-name",t.attr("name")),n=t.attr("name")),!n)return;if(r)for(var a in r)n=n.replace("#"+a+"#",r[a]);t.attr("name",n)}}),e.data("initialSetup")||(e.find(".siteorigin-widget-input").each(function(e,i){var t=C(i);t.prop("checked",t.prop("defaultChecked"))}),e.data("initialSetup",!0));var t=n.data("scroll-count")?parseInt(n.data("scroll-count")):0;if(0<t&&i.length>t){var r=i.first().outerHeight();e.css("max-height",r*t).css("overflow","auto")}else e.css("max-height","").css("overflow","")}),t.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){t.find('input[type="radio"].siteorigin-widget-input').attr("name",""),t.trigger("updateFieldPositions"),n.trigger("change")},sortstop:function(e,i){i.item.is(".siteorigin-widget-field-repeater-item")?i.item.find("> .siteorigin-widget-field-repeater-item-form").each(function(){C(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")}):i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield");n.trigger("change")}}),t.trigger("updateFieldPositions"),n.find("> .siteorigin-widget-field-repeater-add").disableSelection().click(function(e){e.preventDefault(),n.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",function(){C(window).resize()})}),n.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").click(function(e){e.preventDefault(),n.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",function(){C(window).resize()})})})},C.fn.sowAddRepeaterItem=function(){return C(this).each(function(e,i){var t=C(i),r=t.find("> .siteorigin-widget-field-repeater-items").children().length+1,n=C("<div>"+t.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");n.find(".siteorigin-widget-input[data-name]").each(function(){var e=C(this);0===e.closest(".siteorigin-widget-field-repeater-item-html").length&&e.attr("name",C(this).data("name"))});var a="";n.find("> .siteorigin-widget-field").each(function(e,i){var t=i.outerHTML;C(i).is(".siteorigin-widget-field-type-repeater")||(t=t.replace(/_id_/g,r)),a+=t});var s=void 0!==t.attr("readonly"),o=C('<div class="siteorigin-widget-field-repeater-item ui-draggable" />').append(C('<div class="siteorigin-widget-field-repeater-item-top" />').append(C('<div class="siteorigin-widget-field-expand" />')).append(s?"":C('<div class="siteorigin-widget-field-copy" />')).append(s?"":C('<div class="siteorigin-widget-field-remove" />')).append(C("<h4 />").html(t.data("item-name")))).append(C('<div class="siteorigin-widget-field-repeater-item-form" />').html(a));t.find("> .siteorigin-widget-field-repeater-items").append(o).sortable("refresh").trigger("updateFieldPositions"),o.sowSetupRepeaterItems(),o.hide().slideDown("fast",function(){C(window).resize()}),t.trigger("change")})},C.fn.sowRemoveRepeaterItem=function(){return C(this).each(function(e,i){var t=C(this).closest(".siteorigin-widget-field-repeater-items");C(this).remove(),t.sortable("refresh").trigger("updateFieldPositions"),C(i).trigger("change")})},C.fn.sowSetupRepeaterItems=function(){return C(this).each(function(e,i){var _=C(i);if(void 0===_.data("sowrepeater-actions-setup")){var t=_.closest(".siteorigin-widget-field-repeater"),r=_.find("> .siteorigin-widget-field-repeater-item-top"),n=t.data("item-label");if(n&&n.selector){var a=function(){var e=n.hasOwnProperty("valueMethod")&&n.valueMethod?n.valueMethod:"val",i=_.find(n.selector)[e]();i&&(80<i.length&&(i=i.substr(0,79)+"..."),r.find("h4").text(i))};a();var s=n.hasOwnProperty("updateEvent")&&n.updateEvent?n.updateEvent:"change";_.bind(s,a)}r.click(function(e){"siteorigin-widget-field-remove"!==e.target.className&&"siteorigin-widget-field-copy"!==e.target.className&&(e.preventDefault(),C(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",function(){(C(window).resize(),C(this).is(":visible"))?(C(this).trigger("slideToggleOpenComplete"),C(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")):C(this).trigger("slideToggleCloseComplete")}))}),r.find(".siteorigin-widget-field-remove").click(function(e,i){e.preventDefault();var t=C(this).closest(".siteorigin-widget-field-repeater-items"),r=C(this).closest(".siteorigin-widget-field-repeater-item"),n=function(){r.remove(),t.sortable("refresh").trigger("updateFieldPositions"),C(window).resize()};i&&i.silent?n():confirm(soWidgets.sure)&&r.slideUp("fast",n),_.trigger("change")}),r.find(".siteorigin-widget-field-copy").click(function(e){e.preventDefault();var h=C(this).closest(".siteorigin-widget-form-main"),b=C(this).closest(".siteorigin-widget-field-repeater-item"),y=b.clone(),i=b.closest(".siteorigin-widget-field-repeater-items"),F=i.children().length,k={};y.find("*[name]").each(function(){var e=C(this),i=e.attr("id"),t=e.attr("name");if(e.is("textarea")&&e.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){e.parent().empty().append(e),e.css("display","");var r=tinymce.get(i);r&&e.val(r.getContent())}else if(e.is(".wp-color-picker")){var n=e.closest(".wp-picker-container"),a=e.closest(".siteorigin-widget-field");n.remove(),a.append(e.remove())}else{var s=i?b.find("#"+i):b.find('[name="'+t+'"]');s.length&&null!=s.val()&&e.val(s.val())}if(i){var o,d;if(e.is('[type="radio"]')){o=i.replace(/-\d+-\d+#x2F;,"");var l=i.replace(/-\d+#x2F;,"");if(!k[o]){var g={};k[o]=h.find(".siteorigin-widget-input[id^="+o+"]").not("[id*=_id_]").filter(function(e,i){var t=C(i).attr("name");return!g[t]&&(g[t]=!0)}).length+1}var f=o+"-"+k[o];d=f+i.match(/-\d+#x2F;)[0],y.find("label[for="+l+"]").attr("for",f)}else u=new RegExp("-\\d+quot;),o=i.replace(u,""),k[o]||(k[o]=h.find(".siteorigin-widget-input[id^="+o+"]").not("[id*=_id_]").length+1),d=o+"-"+k[o]++;if(e.attr("id",d),e.is(".wp-editor-area")){var c=e.closest(".siteorigin-widget-tinymce-container"),p=c.data("media-buttons");if(p&&p.html){var u=new RegExp(i,"g");p.html=p.html.replace(u,d),c.data("media-buttons",p)}}y.find("label[for="+i+"]").attr("for",d),y.find("[id*="+i+"]").each(function(){var e=C(this).attr("id").replace(i,d);C(this).attr("id",e)}),"undefined"!=typeof tinymce&&tinymce.get(d)&&tinymce.get(d).remove()}var m=b.parents(".siteorigin-widget-field-repeater").length,w=C("body");(w.hasClass("wp-customizer")||w.hasClass("widgets-php"))&&0===_.closest(".panel-dialog").length&&(m+=1);var v=t.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(m-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+F.toString()+"$3");e.attr("name",v),e.data("original-name",v)}),i.append(y).sortable("refresh").trigger("updateFieldPositions"),y.sowSetupRepeaterItems(),y.hide().slideDown("fast",function(){C(window).resize()}),_.trigger("change")}),_.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),_.data("sowrepeater-actions-setup",!0)}})},sowbForms.getContainerFieldId=function(e,i,t){var r=i+"FieldId";this.hasOwnProperty(r)||(this[r]=1);var n=e.closest(t);if(n.length){var a=n.data("field-id");return void 0===a&&(a=this[r]++),n.data("field-id",a),a}return!1},sowbForms.getWidgetFieldVariable=function(e,i,t){var r=window.sow_field_javascript_variables[e];i=i.replace(/\[#.*?#\]/g,"");for(var n=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(i)[1].split("]["),a=n.length?r:null;n.length;)a=a[n.shift()];return a[t]},sowbForms.fetchWidgetVariable=function(i,t,r){window.sowVars=window.sowVars||{},void 0===window.sowVars[t]?C.post(soWidgets.ajaxurl,{action:"sow_get_javascript_variables",widget:t,key:i},function(e){window.sowVars[t]=e,r(window.sowVars[t][i])}):r(window.sowVars[t][i])},sowbForms.getWidgetFormValues=function(e){if(_.isUndefined(e))return null;var l={};return e.find("*[name]").each(function(){var i=C(this);try{var e=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(e))return!0;var t=(e=e[1]).split("][");t=t.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var r=l,n=null,a=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===a)n=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===a){if(!i.is(":checked"))return;n=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var s=null;"undefined"!=typeof tinyMCE&&(s=tinyMCE.get(i.attr("id"))),n=null===s||"function"!=typeof s.getContent||s.isHidden()?i.val():s.getContent()}else if("SELECT"===i.prop("tagName")){var o=i.find("option:selected");1===o.length?n=i.find("option:selected").val():1<o.length&&(n=_.map(i.find("option:selected"),function(e,i){return C(e).val()}))}else n=i.val();for(var d=0;d<t.length;d++)d===t.length-1?""===t[d]?r.push(n):r[t[d]]=n:(_.isUndefined(r[t[d]])&&(_.isNumber(t[d+1])||""===t[d+1]?r[t[d]]=[]:r[t[d]]={}),r=r[t[d]])}catch(e){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+e.message)}}),l},sowbForms.setWidgetFormValues=function(e,d,v,l){v=v||!1,l=void 0!==l&&l||void 0===l;var i=0,h=function(e,w){10!=++i&&e.find("> .siteorigin-widget-field-type-repeater,> .siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field-type-repeater").each(function(e,i){var t=C(this),r=t.find("> .siteorigin-widget-field-repeater"),n=r.data("repeaterName"),a=w.hasOwnProperty(n)?w[n]:null;if(t.parent().is(".siteorigin-widget-section")){var s=r.data("element-name");s=s.replace(/\[#.*?#\]/g,"");for(var o=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(s)[1].split("]["),d=o.length?w:null;o.length;){var l=o.shift();d=d.hasOwnProperty(l)?d[l]:d}a=d}if(a&&Array.isArray(a)){var g=r.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),f=a.length,c=g.length;if(c<f)for(var p=0;p<f-c;p++)r.find("> .siteorigin-widget-field-repeater-add").click();else if(!v&&f<c)for(var u=f;u<c;u++){C(g.eq(u)).find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}g=r.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var m=0;m<g.length;m++)g.eq(m).find("> .siteorigin-widget-field-repeater-item-form"),h(g.eq(m).find("> .siteorigin-widget-field-repeater-item-form"),a[m])}}),--i};h(e,d),e.find("*[name]").each(function(){var e=C(this),i=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(e.attr("name"));if(null==i)return!0;var t=(i=i[1]).split("][");t=t.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});for(var r,n=d,a=0;a<t.length;a++){if(!n.hasOwnProperty(t[a])){if(v)return!0;break}a===t.length-1?r=n[t[a]]:n=n[t[a]]}if("checkbox"===e.attr("type"))e.prop("checked",r);else if("radio"===e.attr("type"))e.prop("checked",r===e.val());else if("TEXTAREA"===e.prop("tagName")&&e.hasClass("wp-editor-area")){var s=null;"undefined"!=typeof tinyMCE&&(s=tinyMCE.get(e.attr("id"))),null!==s&&"function"==typeof s.setContent&&!s.isHidden()&&e.parent().is(":visible")?s.initialized?s.setContent(r):s.on("init",function(){s.setContent(r)}):e.val(r)}else if(e.is(".panels-data")){e.val(r);var o=e.data("builder");o&&o.setDataField(e)}else e.val(r);l&&e.trigger("change")})},C(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",function(){var e=C(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout(function(){e.sowSetupForm()},200)});var e=C("body");e.hasClass("wp-customizer")&&C(document).on("widget-added",function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()}),e.hasClass("block-editor-page")&&C(document).on("panels_setup_preview",function(){C(sowb).trigger("setup_widgets",{preview:!0})}),C(document).on("open_dialog",function(e,i){i.$el.find(".so-panels-dialog").is(".so-panels-dialog-edit-widget")&&i.$el.find(".siteorigin-widget-form-main").find("> .siteorigin-widget-field").trigger("sowsetupformfield")}),C(function(){C(document).trigger("sowadminloaded")})}(jQuery);var sowEmitters={_match:function(e,i){void 0===i&&(i=".*");var t=new RegExp("^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *("+i+") *quot;).exec(e);if(null===t)return!1;var r="",n="default";return r=void 0!==t[3]?(n=t[1],t[3]):t[1],{match:t[4].trim(),group:n,state:r}},_checker:function(e,i,t,r){var n,a={};void 0===i.length&&(i=[i]);for(var s=0;s<i.length;s++)!1!==(n=sowEmitters._match(i[s],t))&&("_true"===n.match||r(e,i,n.match))&&(a[n.group]=n.state);return a},select:function(e,i){void 0===i.length&&(i=[i]);for(var t={},r=0;r<i.length;r++)""===i[r]&&(i[r]="default"),t[i[r]]=e;return t},conditional:function(val,args){return sowEmitters._checker(val,args,"[^;{}]*",function(val,args,match){return eval(match)})},in:function(e,i){return sowEmitters._checker(e,i,"[^;{}]*",function(e,i,t){return-1!==t.split(",").map(function(e){return e.trim()}).indexOf(e)})}};window.sowbForms=sowbForms;
base/less/mixins.less CHANGED
@@ -1,194 +1,194 @@
1
- .gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
2
- background: @color;
3
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, @start), color-stop(1, @stop));
4
- background: -ms-linear-gradient(bottom,@start,@stop);
5
- background: -moz-linear-gradient(center bottom,@start 0%,@stop 100%);
6
- background: -o-linear-gradient(@stop,@start);
7
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", @stop, @start));
8
- }
9
-
10
- .bw-gradient(@color: #F5F5F5, @start: 0, @stop: 255) {
11
- background: @color;
12
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgb(@start,@start,@start)), color-stop(1, rgb(@stop,@stop,@stop)));
13
- background: -ms-linear-gradient(bottom, rgb(@start,@start,@start) 0%, rgb(@stop,@stop,@stop) 100%);
14
- background: -moz-linear-gradient(center bottom, rgb(@start,@start,@start) 0%, rgb(@stop,@stop,@stop) 100%);
15
- background: -o-linear-gradient(rgb(@stop,@stop,@stop), rgb(@start,@start,@start));
16
- background: linear-gradient(rgb(@stop,@stop,@stop), rgb(@start,@start,@start));
17
-
18
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",rgb(@stop,@stop,@stop), rgb(@start,@start,@start)));
19
- }
20
-
21
- .linear-gradient(@color, @gradient) {
22
- background: @color;
23
- background: -moz-linear-gradient(@gradient);
24
- background: -webkit-linear-gradient(@gradient);
25
- background: -o-linear-gradient(@gradient);
26
- background: -ms-linear-gradient(@gradient);
27
- background: linear-gradient(@gradient);
28
- }
29
-
30
- .bordered(@top-color: #EEE, @right-color: #EEE, @bottom-color: #EEE, @left-color: #EEE) {
31
- border-top: solid 1px @top-color;
32
- border-left: solid 1px @left-color;
33
- border-right: solid 1px @right-color;
34
- border-bottom: solid 1px @bottom-color;
35
- }
36
-
37
- .drop-shadow(@x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1) {
38
- -webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
39
- -moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
40
- box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
41
- }
42
-
43
- .box-shadow(@shadow) {
44
- -webkit-box-shadow: @shadow;
45
- -moz-box-shadow: @shadow;
46
- box-shadow: @shadow;
47
- }
48
-
49
- .rounded(@radius: 2px) {
50
- -webkit-border-radius: @radius;
51
- -moz-border-radius: @radius;
52
- border-radius: @radius;
53
- }
54
-
55
- .border-radius(@topright: 0, @bottomright: 0, @bottomleft: 0, @topleft: 0) {
56
- -webkit-border-top-right-radius: @topright;
57
- -webkit-border-bottom-right-radius: @bottomright;
58
- -webkit-border-bottom-left-radius: @bottomleft;
59
- -webkit-border-top-left-radius: @topleft;
60
- -moz-border-radius-topright: @topright;
61
- -moz-border-radius-bottomright: @bottomright;
62
- -moz-border-radius-bottomleft: @bottomleft;
63
- -moz-border-radius-topleft: @topleft;
64
- border-top-right-radius: @topright;
65
- border-bottom-right-radius: @bottomright;
66
- border-bottom-left-radius: @bottomleft;
67
- border-top-left-radius: @topleft;
68
- .background-clip(padding-box);
69
- }
70
-
71
- .opacity(@opacity: 0.5) {
72
- -moz-opacity: @opacity;
73
- -khtml-opacity: @opacity;
74
- -webkit-opacity: @opacity;
75
- opacity: @opacity;
76
- @opperc: @opacity * 100;
77
- -ms-filter: ~"progid:DXImageTransform.Microsoft.Alpha(opacity=@{opperc})";
78
- filter: ~"alpha(opacity=@{opperc})";
79
- }
80
-
81
- .transition-duration(@duration: 0.2s) {
82
- -moz-transition-duration: @duration;
83
- -webkit-transition-duration: @duration;
84
- -o-transition-duration: @duration;
85
- transition-duration: @duration;
86
- }
87
-
88
- .transform(...) {
89
- -webkit-transform: @arguments;
90
- -moz-transform: @arguments;
91
- -o-transform: @arguments;
92
- -ms-transform: @arguments;
93
- transform: @arguments;
94
- }
95
-
96
- .rotation(@deg:5deg) {
97
- .transform(rotate(@deg));
98
- }
99
-
100
- .scale(@ratio:1.5) {
101
- .transform(scale(@ratio));
102
- }
103
-
104
- .transition(@duration:0.2s, @on: all, @ease:ease) {
105
- -webkit-transition: @on @duration @ease;
106
- -moz-transition: @on @duration @ease;
107
- -o-transition: @on @duration @ease;
108
- transition: @on @duration @ease;
109
- }
110
-
111
- .inner-shadow(@horizontal:0, @vertical:1px, @blur:2px, @alpha: 0.4) {
112
- -webkit-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
113
- -moz-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
114
- box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
115
- }
116
-
117
- .box-sizing(@sizing: border-box) {
118
- -ms-box-sizing: @sizing;
119
- -moz-box-sizing: @sizing;
120
- -webkit-box-sizing: @sizing;
121
- box-sizing: @sizing;
122
- }
123
-
124
- .user-select(@argument: none) {
125
- -webkit-user-select: @argument;
126
- -moz-user-select: @argument;
127
- -ms-user-select: @argument;
128
- user-select: @argument;
129
- }
130
-
131
- .columns(@colwidth: 250px, @colcount: 0, @colgap: 50px, @columnRuleColor: #EEE, @columnRuleStyle: solid, @columnRuleWidth: 1px) {
132
- -moz-column-width: @colwidth;
133
- -moz-column-count: @colcount;
134
- -moz-column-gap: @colgap;
135
- -moz-column-rule-color: @columnRuleColor;
136
- -moz-column-rule-style: @columnRuleStyle;
137
- -moz-column-rule-width: @columnRuleWidth;
138
- -webkit-column-width: @colwidth;
139
- -webkit-column-count: @colcount;
140
- -webkit-column-gap: @colgap;
141
- -webkit-column-rule-color: @columnRuleColor;
142
- -webkit-column-rule-style: @columnRuleStyle;
143
- -webkit-column-rule-width: @columnRuleWidth;
144
- column-width: @colwidth;
145
- column-count: @colcount;
146
- column-gap: @colgap;
147
- column-rule-color: @columnRuleColor;
148
- column-rule-style: @columnRuleStyle;
149
- column-rule-width: @columnRuleWidth;
150
- }
151
-
152
- .translate(@x:0, @y:0) {
153
- .transform(translate(@x, @y));
154
- }
155
-
156
- .background-clip(@argument: padding-box) {
157
- -moz-background-clip: @argument;
158
- -webkit-background-clip: @argument;
159
- background-clip: @argument;
160
- }
161
-
162
- .clearfix() {
163
- zoom: 1;
164
- &:before {
165
- content: '';
166
- display: block;
167
- }
168
- &:after {
169
- content: '';
170
- display: table;
171
- clear: both;
172
- }
173
- }
174
-
175
- .button-style(@base_color, @bg_var: 3.5%, @border_darken: 18%, @border_var: 4%) {
176
- @gradient_start: darken(@base_color, @bg_var);
177
- @gradient_end: lighten(@base_color, @bg_var);
178
-
179
- @border_color: darken(@base_color, @border_darken);
180
-
181
- @border_top: lighten(@border_color, @border_var );
182
- @border_bottom: darken(@border_color, @border_var );
183
-
184
- .gradient(@base_color, @gradient_start, @gradient_end);
185
- .bordered(@border_top, @border_color, @border_bottom, @border_color);
186
- }
187
-
188
- .font(@font, @weight) when not (@font = default) {
189
- font-family: @font;
190
- font-weight: @weight;
191
- }
192
-
193
- //this is to remove annoying IDE warnings for not being able to resolve .widget-function() calls
194
.widget-function(...){}
1
+ .gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
2
+ background: @color;
3
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, @start), color-stop(1, @stop));
4
+ background: -ms-linear-gradient(bottom,@start,@stop);
5
+ background: -moz-linear-gradient(center bottom,@start 0%,@stop 100%);
6
+ background: -o-linear-gradient(@stop,@start);
7
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", @stop, @start));
8
+ }
9
+
10
+ .bw-gradient(@color: #F5F5F5, @start: 0, @stop: 255) {
11
+ background: @color;
12
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgb(@start,@start,@start)), color-stop(1, rgb(@stop,@stop,@stop)));
13
+ background: -ms-linear-gradient(bottom, rgb(@start,@start,@start) 0%, rgb(@stop,@stop,@stop) 100%);
14
+ background: -moz-linear-gradient(center bottom, rgb(@start,@start,@start) 0%, rgb(@stop,@stop,@stop) 100%);
15
+ background: -o-linear-gradient(rgb(@stop,@stop,@stop), rgb(@start,@start,@start));
16
+ background: linear-gradient(rgb(@stop,@stop,@stop), rgb(@start,@start,@start));
17
+
18
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",rgb(@stop,@stop,@stop), rgb(@start,@start,@start)));
19
+ }
20
+
21
+ .linear-gradient(@color, @gradient) {
22
+ background: @color;
23
+ background: -moz-linear-gradient(@gradient);
24
+ background: -webkit-linear-gradient(@gradient);
25
+ background: -o-linear-gradient(@gradient);
26
+ background: -ms-linear-gradient(@gradient);
27
+ background: linear-gradient(@gradient);
28
+ }
29
+
30
+ .bordered(@top-color: #EEE, @right-color: #EEE, @bottom-color: #EEE, @left-color: #EEE) {
31
+ border-top: solid 1px @top-color;
32
+ border-left: solid 1px @left-color;
33
+ border-right: solid 1px @right-color;
34
+ border-bottom: solid 1px @bottom-color;
35
+ }
36
+
37
+ .drop-shadow(@x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1) {
38
+ -webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
39
+ -moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
40
+ box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
41
+ }
42
+
43
+ .box-shadow(@shadow) {
44
+ -webkit-box-shadow: @shadow;
45
+ -moz-box-shadow: @shadow;
46
+ box-shadow: @shadow;
47
+ }
48
+
49
+ .rounded(@radius: 2px) {
50
+ -webkit-border-radius: @radius;
51
+ -moz-border-radius: @radius;
52
+ border-radius: @radius;
53
+ }
54
+
55
+ .border-radius(@topright: 0, @bottomright: 0, @bottomleft: 0, @topleft: 0) {
56
+ -webkit-border-top-right-radius: @topright;
57
+ -webkit-border-bottom-right-radius: @bottomright;
58
+ -webkit-border-bottom-left-radius: @bottomleft;
59
+ -webkit-border-top-left-radius: @topleft;
60
+ -moz-border-radius-topright: @topright;
61
+ -moz-border-radius-bottomright: @bottomright;
62
+ -moz-border-radius-bottomleft: @bottomleft;
63
+ -moz-border-radius-topleft: @topleft;
64
+ border-top-right-radius: @topright;
65
+ border-bottom-right-radius: @bottomright;
66
+ border-bottom-left-radius: @bottomleft;
67
+ border-top-left-radius: @topleft;
68
+ .background-clip(padding-box);
69
+ }
70
+
71
+ .opacity(@opacity: 0.5) {
72
+ -moz-opacity: @opacity;
73
+ -khtml-opacity: @opacity;
74
+ -webkit-opacity: @opacity;
75
+ opacity: @opacity;
76
+ @opperc: @opacity * 100;
77
+ -ms-filter: ~"progid:DXImageTransform.Microsoft.Alpha(opacity=@{opperc})";
78
+ filter: ~"alpha(opacity=@{opperc})";
79
+ }
80
+
81
+ .transition-duration(@duration: 0.2s) {
82
+ -moz-transition-duration: @duration;
83
+ -webkit-transition-duration: @duration;
84
+ -o-transition-duration: @duration;
85
+ transition-duration: @duration;
86
+ }
87
+
88
+ .transform(...) {
89
+ -webkit-transform: @arguments;
90
+ -moz-transform: @arguments;
91
+ -o-transform: @arguments;
92
+ -ms-transform: @arguments;
93
+ transform: @arguments;
94
+ }
95
+
96
+ .rotation(@deg:5deg) {
97
+ .transform(rotate(@deg));
98
+ }
99
+
100
+ .scale(@ratio:1.5) {
101
+ .transform(scale(@ratio));
102
+ }
103
+
104
+ .transition(@duration:0.2s, @on: all, @ease:ease) {
105
+ -webkit-transition: @on @duration @ease;
106
+ -moz-transition: @on @duration @ease;
107
+ -o-transition: @on @duration @ease;
108
+ transition: @on @duration @ease;
109
+ }
110
+
111
+ .inner-shadow(@horizontal:0, @vertical:1px, @blur:2px, @alpha: 0.4) {
112
+ -webkit-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
113
+ -moz-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
114
+ box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
115
+ }
116
+
117
+ .box-sizing(@sizing: border-box) {
118
+ -ms-box-sizing: @sizing;
119
+ -moz-box-sizing: @sizing;
120
+ -webkit-box-sizing: @sizing;
121
+ box-sizing: @sizing;
122
+ }
123
+
124
+ .user-select(@argument: none) {
125
+ -webkit-user-select: @argument;
126
+ -moz-user-select: @argument;
127
+ -ms-user-select: @argument;
128
+ user-select: @argument;
129
+ }
130
+
131
+ .columns(@colwidth: 250px, @colcount: 0, @colgap: 50px, @columnRuleColor: #EEE, @columnRuleStyle: solid, @columnRuleWidth: 1px) {
132
+ -moz-column-width: @colwidth;
133
+ -moz-column-count: @colcount;
134
+ -moz-column-gap: @colgap;
135
+ -moz-column-rule-color: @columnRuleColor;
136
+ -moz-column-rule-style: @columnRuleStyle;
137
+ -moz-column-rule-width: @columnRuleWidth;
138
+ -webkit-column-width: @colwidth;
139
+ -webkit-column-count: @colcount;
140
+ -webkit-column-gap: @colgap;
141
+ -webkit-column-rule-color: @columnRuleColor;
142
+ -webkit-column-rule-style: @columnRuleStyle;
143
+ -webkit-column-rule-width: @columnRuleWidth;
144
+ column-width: @colwidth;
145
+ column-count: @colcount;
146
+ column-gap: @colgap;
147
+ column-rule-color: @columnRuleColor;
148
+ column-rule-style: @columnRuleStyle;
149
+ column-rule-width: @columnRuleWidth;
150
+ }
151
+
152
+ .translate(@x:0, @y:0) {
153
+ .transform(translate(@x, @y));
154
+ }
155
+
156
+ .background-clip(@argument: padding-box) {
157
+ -moz-background-clip: @argument;
158
+ -webkit-background-clip: @argument;
159
+ background-clip: @argument;
160
+ }
161
+
162
+ .clearfix() {
163
+ zoom: 1;
164
+ &:before {
165
+ content: '';
166
+ display: block;
167
+ }
168
+ &:after {
169
+ content: '';
170
+ display: table;
171
+ clear: both;
172
+ }
173
+ }
174
+
175
+ .button-style(@base_color, @bg_var: 3.5%, @border_darken: 18%, @border_var: 4%) {
176
+ @gradient_start: darken(@base_color, @bg_var);
177
+ @gradient_end: lighten(@base_color, @bg_var);
178
+
179
+ @border_color: darken(@base_color, @border_darken);
180
+
181
+ @border_top: lighten(@border_color, @border_var );
182
+ @border_bottom: darken(@border_color, @border_var );
183
+
184
+ .gradient(@base_color, @gradient_start, @gradient_end);
185
+ .bordered(@border_top, @border_color, @border_bottom, @border_color);
186
+ }
187
+
188
+ .font(@font, @weight) when not (@font = default) {
189
+ font-family: @font;
190
+ font-weight: @weight;
191
+ }
192
+
193
+ //this is to remove annoying IDE warnings for not being able to resolve .widget-function() calls
194
.widget-function(...){}
base/siteorigin-widget.class.php CHANGED
@@ -746,6 +746,9 @@ abstract class SiteOrigin_Widget extends WP_Widget {
746
$upload_dir['basedir'] . '/siteorigin-widgets/' . $name,
747
$css
748
);
749
}
750
}
751
@@ -781,6 +784,9 @@ abstract class SiteOrigin_Widget extends WP_Widget {
781
//Reindex array
782
$this->generated_css = array_values( $this->generated_css );
783
}
784
}
785
}
786
@@ -850,7 +856,7 @@ abstract class SiteOrigin_Widget extends WP_Widget {
850
$less = preg_replace_callback( '/\.widget-function\((.*)\);/', array( $this, 'less_widget_inject' ), $less );
851
852
//handle less @import statements
853
- $less = preg_replace_callback( '/^@import\s+".*?\/?([\w-\.]+)";/m', array( $this, 'get_less_import_contents' ), $less );
854
855
$vars = apply_filters( 'siteorigin_widgets_less_variables_' . $this->id_base, $this->get_less_variables( $instance ), $instance, $this );
856
if( !empty( $vars ) ){
746
$upload_dir['basedir'] . '/siteorigin-widgets/' . $name,
747
$css
748
);
749
+
750
+ // Alert other plugins that we've added a new CSS file
751
+ do_action( 'siteorigin_widgets_stylesheet_added', $name, $instance );
752
}
753
}
754
784
//Reindex array
785
$this->generated_css = array_values( $this->generated_css );
786
}
787
+
788
+ // Alert other plugins that we've deleted a CSS file
789
+ do_action( 'siteorigin_widgets_stylesheet_deleted', $name, $instance );
790
}
791
}
792
856
$less = preg_replace_callback( '/\.widget-function\((.*)\);/', array( $this, 'less_widget_inject' ), $less );
857
858
//handle less @import statements
859
+ $less = preg_replace_callback( '/^@import\s+".*?\/?([\w\-\.]+)";/m', array( $this, 'get_less_import_contents' ), $less );
860
861
$vars = apply_filters( 'siteorigin_widgets_less_variables_' . $this->id_base, $this->get_less_variables( $instance ), $instance, $this );
862
if( !empty( $vars ) ){
compat/beaver-builder/sowb-beaver-builder.js CHANGED
@@ -125,7 +125,7 @@ var sowb = window.sowb || {};
125
// To ensure necessary scripts are executed again when settings are changed
126
$( document ).on( 'fl-builder.preview-rendered fl-builder.layout-rendered', '.fl-builder-content', function() {
127
// Trigger Widgets Bundle widgets to setup
128
- $( sowb ).trigger( 'setup_widgets' );
129
} );
130
131
})(jQuery);
125
// To ensure necessary scripts are executed again when settings are changed
126
$( document ).on( 'fl-builder.preview-rendered fl-builder.layout-rendered', '.fl-builder-content', function() {
127
// Trigger Widgets Bundle widgets to setup
128
+ $( sowb ).trigger( 'setup_widgets', { preview: true } );
129
} );
130
131
})(jQuery);
compat/beaver-builder/sowb-beaver-builder.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};!function(c){"undefined"!=typeof FLBuilder&&(sowb.orig_FLBuilder_initJQueryReadyFix=FLBuilder._initJQueryReadyFix,FLBuilder._initJQueryReadyFix=function(){},sowb.orig_FLBuilder_getSettings=FLBuilder._getSettings,FLBuilder._getSettings=function(e){FLBuilder._updateEditorFields();var i=e.serializeArray(),r=0,t=0,n="",l="",d="",o=[],u=[],s={};for(r=0;r<i.length;r++)if(n=i[r].value.replace(/\r/gm,""),!(-1<i[r].name.indexOf("flrich")))if(-1<i[r].name.indexOf("[")){for(l=i[r].name.replace(/\[(.*)\]/,""),o=[],u=(d=i[r].name.replace(l,"")).match(/\[[^\]]*\]/g),t=0;t<u.length;t++)"[]"!==u[t]&&o.push(u[t].replace(/\[|\]/g,""));var a=function(e,i,r,t){0===t.length?e[r]=i:(void 0===e[r]&&(e[r]={}),a(e[r],i,t.shift(),t))};if(0<o.length){var g=o.slice();void 0===s[l]&&(s[l]={}),a(s[l],n,g.shift(),g)}else void 0===s[l]&&(s[l]=[]),s[l].push(n)}else s[i[r].name]=n;for(d in s)if(void 0!==s["as_values_"+d]){s[d]=c.grep(s["as_values_"+d].split(","),function(e){return""!==e}).join(",");try{delete s["as_values_"+d]}catch(e){}}"function"==typeof FLBuilder._getOriginalSettings&&(s=c.extend({},FLBuilder._getOriginalSettings(e),s));var f=e.find(".siteorigin-widget-form");return f.length&&(s[l]=sowbForms.getWidgetFormValues(f)),s}),c(document).on("fl-builder.preview-rendered fl-builder.layout-rendered",".fl-builder-content",function(){c(sowb).trigger("setup_widgets")})}(jQuery),window.sowb=sowb;
1
+ var sowb=window.sowb||{};!function(c){"undefined"!=typeof FLBuilder&&(sowb.orig_FLBuilder_initJQueryReadyFix=FLBuilder._initJQueryReadyFix,FLBuilder._initJQueryReadyFix=function(){},sowb.orig_FLBuilder_getSettings=FLBuilder._getSettings,FLBuilder._getSettings=function(e){FLBuilder._updateEditorFields();var i=e.serializeArray(),r=0,t=0,n="",l="",d="",o=[],u=[],s={};for(r=0;r<i.length;r++)if(n=i[r].value.replace(/\r/gm,""),!(-1<i[r].name.indexOf("flrich")))if(-1<i[r].name.indexOf("[")){for(l=i[r].name.replace(/\[(.*)\]/,""),o=[],u=(d=i[r].name.replace(l,"")).match(/\[[^\]]*\]/g),t=0;t<u.length;t++)"[]"!==u[t]&&o.push(u[t].replace(/\[|\]/g,""));var a=function(e,i,r,t){0===t.length?e[r]=i:(void 0===e[r]&&(e[r]={}),a(e[r],i,t.shift(),t))};if(0<o.length){var g=o.slice();void 0===s[l]&&(s[l]={}),a(s[l],n,g.shift(),g)}else void 0===s[l]&&(s[l]=[]),s[l].push(n)}else s[i[r].name]=n;for(d in s)if(void 0!==s["as_values_"+d]){s[d]=c.grep(s["as_values_"+d].split(","),function(e){return""!==e}).join(",");try{delete s["as_values_"+d]}catch(e){}}"function"==typeof FLBuilder._getOriginalSettings&&(s=c.extend({},FLBuilder._getOriginalSettings(e),s));var f=e.find(".siteorigin-widget-form");return f.length&&(s[l]=sowbForms.getWidgetFormValues(f)),s}),c(document).on("fl-builder.preview-rendered fl-builder.layout-rendered",".fl-builder-content",function(){c(sowb).trigger("setup_widgets",{preview:!0})})}(jQuery),window.sowb=sowb;
compat/block-editor/widget-block.js CHANGED
@@ -12,7 +12,7 @@
12
var __ = i18n.__;
13
14
registerBlockType( 'sowb/widget-block', {
15
- title: __( 'SiteOrigin Widget (in beta)', 'so-widgets-bundle' ),
16
17
description: __( 'Select a SiteOrigin widget from the dropdown.', 'so-widgets-bundle' ),
18
@@ -27,6 +27,13 @@
27
28
category: 'widgets',
29
30
supports: {
31
html: false,
32
},
@@ -105,7 +112,7 @@
105
106
function setupWidgetPreview() {
107
if ( ! props.previewInitialized ) {
108
- $( window.sowb ).trigger( 'setup_widgets' );
109
props.setState( { previewInitialized: true } );
110
}
111
}
12
var __ = i18n.__;
13
14
registerBlockType( 'sowb/widget-block', {
15
+ title: __( 'SiteOrigin Widget', 'so-widgets-bundle' ),
16
17
description: __( 'Select a SiteOrigin widget from the dropdown.', 'so-widgets-bundle' ),
18
27
28
category: 'widgets',
29
30
+ keywords: [_.reduce( sowbBlockEditorAdmin.widgets, function ( keywords, widgetObj ) {
31
+ if ( !_.isEmpty( keywords ) ) {
32
+ keywords += ',';
33
+ }
34
+ return keywords + widgetObj.name;
35
+ }, '' )],
36
+
37
supports: {
38
html: false,
39
},
112
113
function setupWidgetPreview() {
114
if ( ! props.previewInitialized ) {
115
+ $( window.sowb ).trigger( 'setup_widgets', { preview: true } );
116
props.setState( { previewInitialized: true } );
117
}
118
}
compat/block-editor/widget-block.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t,i,n,o,s){var a=n.createElement,d=t.registerBlockType,r=e.BlockControls,l=o.SelectControl,w=s.withState,g=o.Toolbar,c=o.IconButton,u=o.Placeholder,m=o.Spinner,b=i.__;d("sowb/widget-block",{title:b("SiteOrigin Widget (in beta)","so-widgets-bundle"),description:b("Select a SiteOrigin widget from the dropdown.","so-widgets-bundle"),icon:function(){return a("span",{className:"widget-icon so-widget-icon so-block-editor-icon"})},category:"widgets",supports:{html:!1},attributes:{widgetClass:{type:"string"},widgetData:{type:"object"}},edit:w({editing:!1,formInitialized:!1,previewInitialized:!1,widgetFormHtml:"",widgetSettingsChanged:!1,widgetPreviewHtml:""})(function(i){function n(){i.setState({editing:!1,previewInitialized:!1})}if(i.editing||!i.attributes.widgetClass){var e=[];sowbBlockEditorAdmin.widgets&&(sowbBlockEditorAdmin.widgets.sort(function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}),(e=sowbBlockEditorAdmin.widgets.map(function(e){return{value:e.class,label:e.name}})).unshift({value:"",label:b("Select widget type","so-widgets-bundle")}));var t=i.attributes.widgetClass&&!i.widgetFormHtml;t&&$.post({url:sowbBlockEditorAdmin.restUrl+"sowb/v1/widgets/forms",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",sowbBlockEditorAdmin.nonce)},data:{widgetClass:i.attributes.widgetClass}}).then(function(e){i.setState({widgetFormHtml:e})});var o=i.widgetFormHtml?i.widgetFormHtml:"";return[!!o&&a(r,{key:"controls"},a(g,null,a(c,{className:"components-icon-button components-toolbar__control",label:b("Preview widget.","so-widgets-bundle"),onClick:n,icon:"visibility"}))),a(u,{key:"placeholder",className:"so-widget-placeholder",label:b("SiteOrigin Widget","so-widgets-bundle"),instructions:b("Select the type of widget you want to use:","so-widgets-bundle")},i.loadingWidgets||t?a(m):a("div",{className:"so-widget-block-container"},a(l,{options:e,value:i.attributes.widgetClass,onChange:function(e){if(""!==e){if(i.widgetSettingsChanged&&!confirm(sowbBlockEditorAdmin.confirmChangeWidget))return!1;i.setAttributes({widgetClass:e,widgetData:null}),i.setState({editing:!0,widgetFormHtml:null,formInitialized:!1,widgetSettingsChanged:!1,widgetPreviewHtml:null,previewInitialized:!1})}}}),a("div",{className:"so-widget-block-form-container",dangerouslySetInnerHTML:{__html:o},ref:function(e){var t=$(e).find(".siteorigin-widget-form-main");0<t.length&&!i.formInitialized&&(t.siblings(".siteorigin-widget-preview").find("> a").on("click",function(e){e.stopImmediatePropagation(),n()}),t.data("backupDisabled",!0),t.sowSetupForm(),i.attributes.widgetData?sowbForms.setWidgetFormValues(t,i.attributes.widgetData):i.setAttributes({widgetData:sowbForms.getWidgetFormValues(t)}),t.on("change",function(){i.setAttributes({widgetData:sowbForms.getWidgetFormValues(t)}),i.setState({widgetSettingsChanged:!0,widgetPreviewHtml:null,previewInitialized:!1})}),i.setState({formInitialized:!0}))}})))]}var s=!i.loadingWidgets&&!i.editing&&!i.widgetPreviewHtml&&i.attributes.widgetClass;s&&$.post({url:sowbBlockEditorAdmin.restUrl+"sowb/v1/widgets/previews",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",sowbBlockEditorAdmin.nonce)},data:{widgetClass:i.attributes.widgetClass,widgetData:i.attributes.widgetData||{}}}).then(function(e){i.setState({widgetPreviewHtml:e,previewInitialized:!1})});var d=i.widgetPreviewHtml?i.widgetPreviewHtml:"";return[a(r,{key:"controls"},a(g,null,a(c,{className:"components-icon-button components-toolbar__control",label:b("Edit widget.","so-widgets-bundle"),onClick:function(){i.setState({editing:!0,formInitialized:!1})},icon:"edit"}))),a("div",{key:"preview",className:"so-widget-preview-container"},s?a("div",{className:"so-widgets-spinner-container"},a("span",null,a(m))):a("div",{dangerouslySetInnerHTML:{__html:d},ref:function(){i.previewInitialized||($(window.sowb).trigger("setup_widgets"),i.setState({previewInitialized:!0}))}}))]}),save:function(){return null}})}(window.wp.editor,window.wp.blocks,window.wp.i18n,window.wp.element,window.wp.components,window.wp.compose);
1
+ !function(e,t,i,n,o,s){var r=n.createElement,d=t.registerBlockType,a=e.BlockControls,l=o.SelectControl,w=s.withState,g=o.Toolbar,c=o.IconButton,u=o.Placeholder,m=o.Spinner,b=i.__;d("sowb/widget-block",{title:b("SiteOrigin Widget","so-widgets-bundle"),description:b("Select a SiteOrigin widget from the dropdown.","so-widgets-bundle"),icon:function(){return r("span",{className:"widget-icon so-widget-icon so-block-editor-icon"})},category:"widgets",keywords:[_.reduce(sowbBlockEditorAdmin.widgets,function(e,t){return _.isEmpty(e)||(e+=","),e+t.name},"")],supports:{html:!1},attributes:{widgetClass:{type:"string"},widgetData:{type:"object"}},edit:w({editing:!1,formInitialized:!1,previewInitialized:!1,widgetFormHtml:"",widgetSettingsChanged:!1,widgetPreviewHtml:""})(function(i){function n(){i.setState({editing:!1,previewInitialized:!1})}if(i.editing||!i.attributes.widgetClass){var e=[];sowbBlockEditorAdmin.widgets&&(sowbBlockEditorAdmin.widgets.sort(function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}),(e=sowbBlockEditorAdmin.widgets.map(function(e){return{value:e.class,label:e.name}})).unshift({value:"",label:b("Select widget type","so-widgets-bundle")}));var t=i.attributes.widgetClass&&!i.widgetFormHtml;t&&$.post({url:sowbBlockEditorAdmin.restUrl+"sowb/v1/widgets/forms",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",sowbBlockEditorAdmin.nonce)},data:{widgetClass:i.attributes.widgetClass}}).then(function(e){i.setState({widgetFormHtml:e})});var o=i.widgetFormHtml?i.widgetFormHtml:"";return[!!o&&r(a,{key:"controls"},r(g,null,r(c,{className:"components-icon-button components-toolbar__control",label:b("Preview widget.","so-widgets-bundle"),onClick:n,icon:"visibility"}))),r(u,{key:"placeholder",className:"so-widget-placeholder",label:b("SiteOrigin Widget","so-widgets-bundle"),instructions:b("Select the type of widget you want to use:","so-widgets-bundle")},i.loadingWidgets||t?r(m):r("div",{className:"so-widget-block-container"},r(l,{options:e,value:i.attributes.widgetClass,onChange:function(e){if(""!==e){if(i.widgetSettingsChanged&&!confirm(sowbBlockEditorAdmin.confirmChangeWidget))return!1;i.setAttributes({widgetClass:e,widgetData:null}),i.setState({editing:!0,widgetFormHtml:null,formInitialized:!1,widgetSettingsChanged:!1,widgetPreviewHtml:null,previewInitialized:!1})}}}),r("div",{className:"so-widget-block-form-container",dangerouslySetInnerHTML:{__html:o},ref:function(e){var t=$(e).find(".siteorigin-widget-form-main");0<t.length&&!i.formInitialized&&(t.siblings(".siteorigin-widget-preview").find("> a").on("click",function(e){e.stopImmediatePropagation(),n()}),t.data("backupDisabled",!0),t.sowSetupForm(),i.attributes.widgetData?sowbForms.setWidgetFormValues(t,i.attributes.widgetData):i.setAttributes({widgetData:sowbForms.getWidgetFormValues(t)}),t.on("change",function(){i.setAttributes({widgetData:sowbForms.getWidgetFormValues(t)}),i.setState({widgetSettingsChanged:!0,widgetPreviewHtml:null,previewInitialized:!1})}),i.setState({formInitialized:!0}))}})))]}var s=!i.loadingWidgets&&!i.editing&&!i.widgetPreviewHtml&&i.attributes.widgetClass;s&&$.post({url:sowbBlockEditorAdmin.restUrl+"sowb/v1/widgets/previews",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",sowbBlockEditorAdmin.nonce)},data:{widgetClass:i.attributes.widgetClass,widgetData:i.attributes.widgetData||{}}}).then(function(e){i.setState({widgetPreviewHtml:e,previewInitialized:!1})});var d=i.widgetPreviewHtml?i.widgetPreviewHtml:"";return[r(a,{key:"controls"},r(g,null,r(c,{className:"components-icon-button components-toolbar__control",label:b("Edit widget.","so-widgets-bundle"),onClick:function(){i.setState({editing:!0,formInitialized:!1})},icon:"edit"}))),r("div",{key:"preview",className:"so-widget-preview-container"},s?r("div",{className:"so-widgets-spinner-container"},r("span",null,r(m))):r("div",{dangerouslySetInnerHTML:{__html:d},ref:function(){i.previewInitialized||($(window.sowb).trigger("setup_widgets",{preview:!0}),i.setState({previewInitialized:!0}))}}))]}),save:function(){return null}})}(window.wp.editor,window.wp.blocks,window.wp.i18n,window.wp.element,window.wp.components,window.wp.compose);
compat/elementor/elementor.php CHANGED
@@ -18,8 +18,8 @@ class SiteOrigin_Widgets_Bundle_Elementor {
18
function __construct() {
19
add_action( 'admin_action_elementor', array( $this, 'init_editor' ) );
20
add_action( 'template_redirect', array( $this, 'init_preview' ) );
21
-
22
- add_action( 'wp_ajax_elementor_render_widget', array( $this, 'ajax_render_widget_preview' ) );
23
add_action( 'wp_ajax_elementor_editor_get_wp_widget_form', array( $this, 'ajax_render_widget_form' ) );
24
}
25
@@ -31,51 +31,23 @@ class SiteOrigin_Widgets_Bundle_Elementor {
31
$this->plugin = Elementor\Plugin::instance();
32
if ( !empty( $this->plugin->preview ) && method_exists( $this->plugin->preview, 'is_preview_mode' ) && $this->plugin->preview->is_preview_mode() ) {
33
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend_scripts' ) );
34
- add_action( 'elementor/preview/enqueue_styles', array( $this, 'enqueue_preview_scripts' ) );
35
}
36
}
37
38
function enqueue_frontend_scripts() {
39
-
40
- $post_id = get_the_ID();
41
-
42
- if( defined( 'Elementor\\DB::STATUS_DRAFT' ) && ! empty( $this->plugin->db ) && method_exists( $this->plugin->db, 'get_builder' ) ) {
43
- // This is necessary to ensure styles and scripts are enqueued. Not sure why this is enough, but I assume
44
- // Elementor is calling widgets' `widget` method with instance data in the process of retrieving editor data.
45
- $this->plugin->db->get_builder( $post_id, Elementor\DB::STATUS_DRAFT );
46
- }
47
- }
48
-
49
- function enqueue_preview_scripts() {
50
-
51
- global $wp_widget_factory;
52
-
53
- foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
54
- if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
55
- /* @var $widget_obj SiteOrigin_Widget */
56
- ob_start();
57
- $widget_obj->widget( array(), array() );
58
- ob_clean();
59
- }
60
- }
61
-
62
}
63
64
function enqueue_active_widgets_scripts() {
65
66
add_action( 'wp_print_footer_scripts', array( $this, 'print_footer_templates' ) );
67
-
68
- global $wp_widget_factory;
69
-
70
- // Elementor does it's editing in it's own front end so enqueue required form scripts for active widgets.
71
- foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
72
- if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
73
- /* @var $widget_obj SiteOrigin_Widget */
74
- ob_start();
75
- $widget_obj->form( array() );
76
- ob_clean();
77
- }
78
- }
79
80
wp_enqueue_style( 'sowb-styles-for-elementor', plugin_dir_url( __FILE__ ) . 'styles.css' );
81
@@ -99,8 +71,12 @@ class SiteOrigin_Widgets_Bundle_Elementor {
99
}
100
}
101
102
- function ajax_render_widget_preview() {
103
- add_filter( 'siteorigin_widgets_is_preview', '__return_true' );
104
}
105
106
function ajax_render_widget_form() {
18
function __construct() {
19
add_action( 'admin_action_elementor', array( $this, 'init_editor' ) );
20
add_action( 'template_redirect', array( $this, 'init_preview' ) );
21
+
22
+ add_filter( 'siteorigin_widgets_is_preview', array( $this, 'is_elementor_preview' ) );
23
add_action( 'wp_ajax_elementor_editor_get_wp_widget_form', array( $this, 'ajax_render_widget_form' ) );
24
}
25
31
$this->plugin = Elementor\Plugin::instance();
32
if ( !empty( $this->plugin->preview ) && method_exists( $this->plugin->preview, 'is_preview_mode' ) && $this->plugin->preview->is_preview_mode() ) {
33
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend_scripts' ) );
34
+ add_action( 'elementor/preview/enqueue_styles', array( $this, 'enqueue_frontend_scripts' ) );
35
}
36
}
37
38
function enqueue_frontend_scripts() {
39
+ $so_widgets_bundle = SiteOrigin_Widgets_Bundle::single();
40
+ $so_widgets_bundle->register_general_scripts();
41
+ $so_widgets_bundle->enqueue_registered_widgets_scripts( true, false );
42
}
43
44
function enqueue_active_widgets_scripts() {
45
46
add_action( 'wp_print_footer_scripts', array( $this, 'print_footer_templates' ) );
47
+
48
+ $so_widgets_bundle = SiteOrigin_Widgets_Bundle::single();
49
+ $so_widgets_bundle->register_general_scripts();
50
+ $so_widgets_bundle->enqueue_registered_widgets_scripts( false, true );
51
52
wp_enqueue_style( 'sowb-styles-for-elementor', plugin_dir_url( __FILE__ ) . 'styles.css' );
53
71
}
72
}
73
74
+ function is_elementor_preview( $is_preview ) {
75
+ $this->plugin = Elementor\Plugin::instance();
76
+ $is_elementor_preview = ! empty( $this->plugin->preview ) && method_exists( $this->plugin->preview, 'is_preview_mode' ) && $this->plugin->preview->is_preview_mode();
77
+ $is_elementor_edit_mode = $this->plugin->editor->is_edit_mode();
78
+ return $is_preview || $is_elementor_preview || $is_elementor_edit_mode ||
79
+ ( !empty( $_REQUEST['action'] ) && $_REQUEST['action'] == 'elementor_ajax' );
80
}
81
82
function ajax_render_widget_form() {
compat/elementor/sowb-elementor.js CHANGED
@@ -1,25 +1,25 @@
1
- var sowb = window.sowb || {};
2
-
3
- ( function($){
4
-
5
- // To ensure necessary scripts are executed again when settings are changed
6
- $( window ).on( 'elementor:init', function() {
7
- elementor.on( 'preview:loaded', function () {
8
- var preview_window = elementor.$preview.get( 0 ).contentWindow;
9
- var $sowb = preview_window.jQuery( preview_window.sowb );
10
- var timeoutId;
11
- elementorFrontend.hooks.addAction( 'frontend/element_ready/widget', function(){
12
- // Debounce
13
- if ( timeoutId ) {
14
- clearTimeout( timeoutId );
15
- }
16
- timeoutId = setTimeout( function () {
17
- // Trigger Widgets Bundle widgets to setup
18
- $sowb.trigger( 'setup_widgets' );
19
- timeoutId = null;
20
- }, 300 );
21
- } );
22
- } );
23
- } );
24
-
25
- })(jQuery);
1
+ var sowb = window.sowb || {};
2
+
3
+ ( function($){
4
+
5
+ // To ensure necessary scripts are executed again when settings are changed
6
+ $( window ).on( 'elementor:init', function() {
7
+ elementor.on( 'preview:loaded', function () {
8
+ var preview_window = elementor.$preview.get( 0 ).contentWindow;
9
+ var $sowb = preview_window.jQuery( preview_window.sowb );
10
+ var timeoutId;
11
+ elementorFrontend.hooks.addAction( 'frontend/element_ready/widget', function(){
12
+ // Debounce
13
+ if ( timeoutId ) {
14
+ clearTimeout( timeoutId );
15
+ }
16
+ timeoutId = setTimeout( function () {
17
+ // Trigger Widgets Bundle widgets to setup
18
+ $sowb.trigger( 'setup_widgets', { preview: true } );
19
+ timeoutId = null;
20
+ }, 300 );
21
+ } );
22
+ } );
23
+ } );
24
+
25
+ })(jQuery);
compat/elementor/sowb-elementor.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery(window).on("elementor:init",function(){elementor.on("preview:loaded",function(){var e,n=elementor.$preview.get(0).contentWindow,o=n.jQuery(n.sowb);elementorFrontend.hooks.addAction("frontend/element_ready/widget",function(){e&&clearTimeout(e),e=setTimeout(function(){o.trigger("setup_widgets"),e=null},300)})})});
1
+ var sowb=window.sowb||{};jQuery(window).on("elementor:init",function(){elementor.on("preview:loaded",function(){var e,n=elementor.$preview.get(0).contentWindow,o=n.jQuery(n.sowb);elementorFrontend.hooks.addAction("frontend/element_ready/widget",function(){e&&clearTimeout(e),e=setTimeout(function(){o.trigger("setup_widgets",{preview:!0}),e=null},300)})})});
compat/visual-composer/sowb-vc-widget.js CHANGED
@@ -1,80 +1,80 @@
1
- /* globals jQuery, sowbForms, confirm, soWidgetsVC */
2
- var sowbForms = window.sowbForms || {};
3
-
4
- sowbForms.setupVcWidgetForm = function () {
5
- var $ = jQuery;
6
- var $widgetDropdown = $( '[name="so_widget_class"]' );
7
- var $formContainer = $( '.siteorigin_widget_form_container' );
8
- var formDirty = false;
9
- $formContainer.on( 'change', '.siteorigin-widget-field', function () {
10
- formDirty = true;
11
- var widgetData = sowbForms.getWidgetFormValues( $formContainer );
12
- var widgetClass = $widgetDropdown.val();
13
-
14
- var jsonString = JSON.stringify( { widget_class: widgetClass, widget_data: widgetData } );
15
- jsonString = jsonString.replace( /\\/g, '\\\\' );
16
- $( '[name="so_widget_data"]' ).val( jsonString );
17
- } );
18
-
19
- var prevWidget;
20
- $widgetDropdown.mousedown( function () {
21
- prevWidget = $widgetDropdown.find( 'option:selected' );
22
- } );
23
-
24
- $widgetDropdown.on( 'change', function ( event ) {
25
- if ( formDirty && !confirm( soWidgetsVC.confirmChangeWidget ) ) {
26
- prevWidget.attr( 'selected', true );
27
- return;
28
- }
29
-
30
- formDirty = false;
31
-
32
- var widget = $widgetDropdown.val();
33
-
34
- var data = {
35
- 'action': 'sowb_vc_widget_render_form',
36
- 'widget': widget,
37
- };
38
-
39
- $.post(
40
- soWidgetsVC.ajaxUrl,
41
- data,
42
- function ( result ) {
43
- $formContainer.html( result );
44
- // To ensure data is updated.
45
- $formContainer.trigger( 'change' );
46
- },
47
- 'html'
48
- );
49
- } );
50
- vc.atts.sowb_json_escaped = {
51
- parse: function ( param ) {
52
- var $field = this.content().find( '.wpb_vc_param_value[name=' + param.param_name + ']' );
53
- // We double encode in the front end to prevent accidental decoding when the content is set on the
54
- // WP visual editor.
55
- return _.escape( _.escape( $field.val().toString() ).replace( /\[/g, '&#91;' ).replace( /\]/g, '&#93;' ) );
56
- },
57
- render: function ( param, value ) {
58
- return _.unescape( _.unescape( value ) ).replace( /&#91;/g, '[' ).replace( /&#93;/g, ']' );
59
- }
60
- };
61
- vc.events.on( "shortcodeView:updated:siteorigin_widget_vc", function () {
62
-
63
- if ( typeof vc.frame_window !== 'undefined' && typeof vc.frame_window.sowb !== 'undefined' ) {
64
-
65
- // Have to use jQuery from iframe window for triggered events to be detected there.
66
- var $ = vc.frame_window.jQuery;
67
- var sowb = vc.frame_window.sowb;
68
-
69
- // Trigger Widgets Bundle widgets to setup
70
- $( sowb ).trigger( 'setup_widgets' );
71
- }
72
- } );
73
-
74
- };
75
-
76
- jQuery( function ( $ ) {
77
- sowbForms.setupVcWidgetForm();
78
- } );
79
-
80
- window.sowbForms = sowbForms;
1
+ /* globals jQuery, sowbForms, confirm, soWidgetsVC */
2
+ var sowbForms = window.sowbForms || {};
3
+
4
+ sowbForms.setupVcWidgetForm = function () {
5
+ var $ = jQuery;
6
+ var $widgetDropdown = $( '[name="so_widget_class"]' );
7
+ var $formContainer = $( '.siteorigin_widget_form_container' );
8
+ var formDirty = false;
9
+ $formContainer.on( 'change', '.siteorigin-widget-field', function () {
10
+ formDirty = true;
11
+ var widgetData = sowbForms.getWidgetFormValues( $formContainer );
12
+ var widgetClass = $widgetDropdown.val();
13
+
14
+ var jsonString = JSON.stringify( { widget_class: widgetClass, widget_data: widgetData } );
15
+ jsonString = jsonString.replace( /\\/g, '\\\\' );
16
+ $( '[name="so_widget_data"]' ).val( jsonString );
17
+ } );
18
+
19
+ var prevWidget;
20
+ $widgetDropdown.mousedown( function () {
21
+ prevWidget = $widgetDropdown.find( 'option:selected' );
22
+ } );
23
+
24
+ $widgetDropdown.on( 'change', function ( event ) {
25
+ if ( formDirty && !confirm( soWidgetsVC.confirmChangeWidget ) ) {
26
+ prevWidget.attr( 'selected', true );
27
+ return;
28
+ }
29
+
30
+ formDirty = false;
31
+
32
+ var widget = $widgetDropdown.val();
33
+
34
+ var data = {
35
+ 'action': 'sowb_vc_widget_render_form',
36
+ 'widget': widget,
37
+ };
38
+
39
+ $.post(
40
+ soWidgetsVC.ajaxUrl,
41
+ data,
42
+ function ( result ) {
43
+ $formContainer.html( result );
44
+ // To ensure data is updated.
45
+ $formContainer.trigger( 'change' );
46
+ },
47
+ 'html'
48
+ );
49
+ } );
50
+ vc.atts.sowb_json_escaped = {
51
+ parse: function ( param ) {
52
+ var $field = this.content().find( '.wpb_vc_param_value[name=' + param.param_name + ']' );
53
+ // We double encode in the front end to prevent accidental decoding when the content is set on the
54
+ // WP visual editor.
55
+ return _.escape( _.escape( $field.val().toString() ).replace( /\[/g, '&#91;' ).replace( /\]/g, '&#93;' ) );
56
+ },
57
+ render: function ( param, value ) {
58
+ return _.unescape( _.unescape( value ) ).replace( /&#91;/g, '[' ).replace( /&#93;/g, ']' );
59
+ }
60
+ };
61
+ vc.events.on( "shortcodeView:updated:siteorigin_widget_vc", function () {
62
+
63
+ if ( typeof vc.frame_window !== 'undefined' && typeof vc.frame_window.sowb !== 'undefined' ) {
64
+
65
+ // Have to use jQuery from iframe window for triggered events to be detected there.
66
+ var $ = vc.frame_window.jQuery;
67
+ var sowb = vc.frame_window.sowb;
68
+
69
+ // Trigger Widgets Bundle widgets to setup
70
+ $( sowb ).trigger( 'setup_widgets', { preview: true } );
71
+ }
72
+ } );
73
+
74
+ };
75
+
76
+ jQuery( function ( $ ) {
77
+ sowbForms.setupVcWidgetForm();
78
+ } );
79
+
80
+ window.sowbForms = sowbForms;
compat/visual-composer/sowb-vc-widget.min.js CHANGED
@@ -1 +1 @@
1
- var sowbForms=window.sowbForms||{};sowbForms.setupVcWidgetForm=function(){var n,t=jQuery,i=t('[name="so_widget_class"]'),r=t(".siteorigin_widget_form_container"),s=!1;r.on("change",".siteorigin-widget-field",function(){s=!0;var e=sowbForms.getWidgetFormValues(r),o=i.val(),n=JSON.stringify({widget_class:o,widget_data:e});n=n.replace(/\\/g,"\\\\"),t('[name="so_widget_data"]').val(n)}),i.mousedown(function(){n=i.find("option:selected")}),i.on("change",function(e){if(!s||confirm(soWidgetsVC.confirmChangeWidget)){s=!1;var o={action:"sowb_vc_widget_render_form",widget:i.val()};t.post(soWidgetsVC.ajaxUrl,o,function(e){r.html(e),r.trigger("change")},"html")}else n.attr("selected",!0)}),vc.atts.sowb_json_escaped={parse:function(e){var o=this.content().find(".wpb_vc_param_value[name="+e.param_name+"]");return _.escape(_.escape(o.val().toString()).replace(/\[/g,"&#91;").replace(/\]/g,"&#93;"))},render:function(e,o){return _.unescape(_.unescape(o)).replace(/&#91;/g,"[").replace(/&#93;/g,"]")}},vc.events.on("shortcodeView:updated:siteorigin_widget_vc",function(){void 0!==vc.frame_window&&void 0!==vc.frame_window.sowb&&(0,vc.frame_window.jQuery)(vc.frame_window.sowb).trigger("setup_widgets")})},jQuery(function(e){sowbForms.setupVcWidgetForm()}),window.sowbForms=sowbForms;
1
+ var sowbForms=window.sowbForms||{};sowbForms.setupVcWidgetForm=function(){var i,n=jQuery,t=n('[name="so_widget_class"]'),r=n(".siteorigin_widget_form_container"),s=!1;r.on("change",".siteorigin-widget-field",function(){s=!0;var e=sowbForms.getWidgetFormValues(r),o=t.val(),i=JSON.stringify({widget_class:o,widget_data:e});i=i.replace(/\\/g,"\\\\"),n('[name="so_widget_data"]').val(i)}),t.mousedown(function(){i=t.find("option:selected")}),t.on("change",function(e){if(!s||confirm(soWidgetsVC.confirmChangeWidget)){s=!1;var o={action:"sowb_vc_widget_render_form",widget:t.val()};n.post(soWidgetsVC.ajaxUrl,o,function(e){r.html(e),r.trigger("change")},"html")}else i.attr("selected",!0)}),vc.atts.sowb_json_escaped={parse:function(e){var o=this.content().find(".wpb_vc_param_value[name="+e.param_name+"]");return _.escape(_.escape(o.val().toString()).replace(/\[/g,"&#91;").replace(/\]/g,"&#93;"))},render:function(e,o){return _.unescape(_.unescape(o)).replace(/&#91;/g,"[").replace(/&#93;/g,"]")}},vc.events.on("shortcodeView:updated:siteorigin_widget_vc",function(){void 0!==vc.frame_window&&void 0!==vc.frame_window.sowb&&(0,vc.frame_window.jQuery)(vc.frame_window.sowb).trigger("setup_widgets",{preview:!0})})},jQuery(function(e){sowbForms.setupVcWidgetForm()}),window.sowbForms=sowbForms;
icons/fontawesome/filter.php CHANGED
@@ -2,792 +2,1659 @@
2
3
function siteorigin_widgets_icons_fontawesome_filter( $icons ){
4
return array_merge($icons, array(
5
- '500px' => '&#xf26e;',
6
- 'address-book' => '&#xf2b9;',
7
- 'address-book-o' => '&#xf2ba;',
8
- 'address-card' => '&#xf2bb;',
9
- 'address-card-o' => '&#xf2bc;',
10
- 'adjust' => '&#xf042;',
11
- 'adn' => '&#xf170;',
12
- 'align-center' => '&#xf037;',
13
- 'align-justify' => '&#xf039;',
14
- 'align-left' => '&#xf036;',
15
- 'align-right' => '&#xf038;',
16
- 'amazon' => '&#xf270;',
17
- 'ambulance' => '&#xf0f9;',
18
- 'american-sign-language-interpreting' => '&#xf2a3;',
19
- 'anchor' => '&#xf13d;',
20
- 'android' => '&#xf17b;',
21
- 'angellist' => '&#xf209;',
22
- 'angle-double-down' => '&#xf103;',
23
- 'angle-double-left' => '&#xf100;',
24
- 'angle-double-right' => '&#xf101;',
25
- 'angle-double-up' => '&#xf102;',
26
- 'angle-down' => '&#xf107;',
27
- 'angle-left' => '&#xf104;',
28
- 'angle-right' => '&#xf105;',
29
- 'angle-up' => '&#xf106;',
30
- 'apple' => '&#xf179;',
31
- 'archive' => '&#xf187;',
32
- 'area-chart' => '&#xf1fe;',
33
- 'arrow-circle-down' => '&#xf0ab;',
34
- 'arrow-circle-left' => '&#xf0a8;',
35
- 'arrow-circle-o-down' => '&#xf01a;',
36
- 'arrow-circle-o-left' => '&#xf190;',
37
- 'arrow-circle-o-right' => '&#xf18e;',
38
- 'arrow-circle-o-up' => '&#xf01b;',
39
- 'arrow-circle-right' => '&#xf0a9;',
40
- 'arrow-circle-up' => '&#xf0aa;',
41
- 'arrow-down' => '&#xf063;',
42
- 'arrow-left' => '&#xf060;',
43
- 'arrow-right' => '&#xf061;',
44
- 'arrow-up' => '&#xf062;',
45
- 'arrows' => '&#xf047;',
46
- 'arrows-alt' => '&#xf0b2;',
47
- 'arrows-h' => '&#xf07e;',
48
- 'arrows-v' => '&#xf07d;',
49
- 'asl-interpreting' => '&#xf2a3;',
50
- 'assistive-listening-systems' => '&#xf2a2;',
51
- 'asterisk' => '&#xf069;',
52
- 'at' => '&#xf1fa;',
53
- 'audio-description' => '&#xf29e;',
54
- 'automobile' => '&#xf1b9;',
55
- 'backward' => '&#xf04a;',
56
- 'balance-scale' => '&#xf24e;',
57
- 'ban' => '&#xf05e;',
58
- 'bandcamp' => '&#xf2d5;',
59
- 'bank' => '&#xf19c;',
60
- 'bar-chart' => '&#xf080;',
61
- 'bar-chart-o' => '&#xf080;',
62
- 'barcode' => '&#xf02a;',
63
- 'bars' => '&#xf0c9;',
64
- 'bath' => '&#xf2cd;',
65
- 'bathtub' => '&#xf2cd;',
66
- 'battery' => '&#xf240;',
67
- 'battery-0' => '&#xf244;',
68
- 'battery-1' => '&#xf243;',
69
- 'battery-2' => '&#xf242;',
70
- 'battery-3' => '&#xf241;',
71
- 'battery-4' => '&#xf240;',
72
- 'battery-empty' => '&#xf244;',
73
- 'battery-full' => '&#xf240;',
74
- 'battery-half' => '&#xf242;',
75
- 'battery-quarter' => '&#xf243;',
76
- 'battery-three-quarters' => '&#xf241;',
77
- 'bed' => '&#xf236;',
78
- 'beer' => '&#xf0fc;',
79
- 'behance' => '&#xf1b4;',
80
- 'behance-square' => '&#xf1b5;',
81
- 'bell' => '&#xf0f3;',
82
- 'bell-o' => '&#xf0a2;',
83
- 'bell-slash' => '&#xf1f6;',
84
- 'bell-slash-o' => '&#xf1f7;',
85
- 'bicycle' => '&#xf206;',
86
- 'binoculars' => '&#xf1e5;',
87
- 'birthday-cake' => '&#xf1fd;',
88
- 'bitbucket' => '&#xf171;',
89
- 'bitbucket-square' => '&#xf172;',
90
- 'bitcoin' => '&#xf15a;',
91
- 'black-tie' => '&#xf27e;',
92
- 'blind' => '&#xf29d;',
93
- 'bluetooth' => '&#xf293;',
94
- 'bluetooth-b' => '&#xf294;',
95
- 'bold' => '&#xf032;',
96
- 'bolt' => '&#xf0e7;',
97
- 'bomb' => '&#xf1e2;',
98
- 'book' => '&#xf02d;',
99
- 'bookmark' => '&#xf02e;',
100
- 'bookmark-o' => '&#xf097;',
101
- 'braille' => '&#xf2a1;',
102
- 'briefcase' => '&#xf0b1;',
103
- 'btc' => '&#xf15a;',
104
- 'bug' => '&#xf188;',
105
- 'building' => '&#xf1ad;',
106
- 'building-o' => '&#xf0f7;',
107
- 'bullhorn' => '&#xf0a1;',
108
- 'bullseye' => '&#xf140;',
109
- 'bus' => '&#xf207;',
110
- 'buysellads' => '&#xf20d;',
111
- 'cab' => '&#xf1ba;',
112
- 'calculator' => '&#xf1ec;',
113
- 'calendar' => '&#xf073;',
114
- 'calendar-check-o' => '&#xf274;',
115
- 'calendar-minus-o' => '&#xf272;',
116
- 'calendar-o' => '&#xf133;',
117
- 'calendar-plus-o' => '&#xf271;',
118
- 'calendar-times-o' => '&#xf273;',
119
- 'camera' => '&#xf030;',
120
- 'camera-retro' => '&#xf083;',
121
- 'car' => '&#xf1b9;',
122
- 'caret-down' => '&#xf0d7;',
123
- 'caret-left' => '&#xf0d9;',
124
- 'caret-right' => '&#xf0da;',
125
- 'caret-square-o-down' => '&#xf150;',
126
- 'caret-square-o-left' => '&#xf191;',
127
- 'caret-square-o-right' => '&#xf152;',
128
- 'caret-square-o-up' => '&#xf151;',
129
- 'caret-up' => '&#xf0d8;',
130
- 'cart-arrow-down' => '&#xf218;',
131
- 'cart-plus' => '&#xf217;',
132
- 'cc' => '&#xf20a;',
133
- 'cc-amex' => '&#xf1f3;',
134
- 'cc-diners-club' => '&#xf24c;',
135
- 'cc-discover' => '&#xf1f2;',
136
- 'cc-jcb' => '&#xf24b;',
137
- 'cc-mastercard' => '&#xf1f1;',
138
- 'cc-paypal' => '&#xf1f4;',
139
- 'cc-stripe' => '&#xf1f5;',
140
- 'cc-visa' => '&#xf1f0;',
141
- 'certificate' => '&#xf0a3;',
142
- 'chain' => '&#xf0c1;',
143
- 'chain-broken' => '&#xf127;',
144
- 'check' => '&#xf00c;',
145
- 'check-circle' => '&#xf058;',
146
- 'check-circle-o' => '&#xf05d;',
147
- 'check-square' => '&#xf14a;',
148
- 'check-square-o' => '&#xf046;',
149
- 'chevron-circle-down' => '&#xf13a;',
150
- 'chevron-circle-left' => '&#xf137;',
151
- 'chevron-circle-right' => '&#xf138;',
152
- 'chevron-circle-up' => '&#xf139;',
153
- 'chevron-down' => '&#xf078;',
154
- 'chevron-left' => '&#xf053;',
155
- 'chevron-right' => '&#xf054;',
156
- 'chevron-up' => '&#xf077;',
157
- 'child' => '&#xf1ae;',
158
- 'chrome' => '&#xf268;',
159
- 'circle' => '&#xf111;',
160
- 'circle-o' => '&#xf10c;',
161
- 'circle-o-notch' => '&#xf1ce;',
162
- 'circle-thin' => '&#xf1db;',
163
- 'clipboard' => '&#xf0ea;',
164
- 'clock-o' => '&#xf017;',
165
- 'clone' => '&#xf24d;',
166
- 'close' => '&#xf00d;',
167
- 'cloud' => '&#xf0c2;',
168
- 'cloud-download' => '&#xf0ed;',
169
- 'cloud-upload' => '&#xf0ee;',
170
- 'cny' => '&#xf157;',
171
- 'code' => '&#xf121;',
172
- 'code-fork' => '&#xf126;',
173
- 'codepen' => '&#xf1cb;',
174
- 'codiepie' => '&#xf284;',
175
- 'coffee' => '&#xf0f4;',
176
- 'cog' => '&#xf013;',
177
- 'cogs' => '&#xf085;',
178
- 'columns' => '&#xf0db;',
179
- 'comment' => '&#xf075;',
180
- 'comment-o' => '&#xf0e5;',
181
- 'commenting' => '&#xf27a;',
182
- 'commenting-o' => '&#xf27b;',
183
- 'comments' => '&#xf086;',
184
- 'comments-o' => '&#xf0e6;',
185
- 'compass' => '&#xf14e;',
186
- 'compress' => '&#xf066;',
187
- 'connectdevelop' => '&#xf20e;',
188
- 'contao' => '&#xf26d;',
189
- 'copy' => '&#xf0c5;',
190
- 'copyright' => '&#xf1f9;',
191
- 'creative-commons' => '&#xf25e;',
192
- 'credit-card' => '&#xf09d;',
193
- 'credit-card-alt' => '&#xf283;',
194
- 'crop' => '&#xf125;',
195
- 'crosshairs' => '&#xf05b;',
196
- 'css3' => '&#xf13c;',
197
- 'cube' => '&#xf1b2;',
198
- 'cubes' => '&#xf1b3;',
199
- 'cut' => '&#xf0c4;',
200
- 'cutlery' => '&#xf0f5;',
201
- 'dashboard' => '&#xf0e4;',
202
- 'dashcube' => '&#xf210;',
203
- 'database' => '&#xf1c0;',
204
- 'deaf' => '&#xf2a4;',
205
- 'deafness' => '&#xf2a4;',
206
- 'dedent' => '&#xf03b;',
207
- 'delicious' => '&#xf1a5;',
208
- 'desktop' => '&#xf108;',
209
- 'deviantart' => '&#xf1bd;',
210
- 'diamond' => '&#xf219;',
211
- 'digg' => '&#xf1a6;',
212
- 'dollar' => '&#xf155;',
213
- 'dot-circle-o' => '&#xf192;',
214
- 'download' => '&#xf019;',
215
- 'dribbble' => '&#xf17d;',
216
- 'drivers-license' => '&#xf2c2;',
217
- 'drivers-license-o' => '&#xf2c3;',
218
- 'dropbox' => '&#xf16b;',
219
- 'drupal' => '&#xf1a9;',
220
- 'edge' => '&#xf282;',
221
- 'edit' => '&#xf044;',
222
- 'eercast' => '&#xf2da;',
223
- 'eject' => '&#xf052;',
224
- 'ellipsis-h' => '&#xf141;',
225
- 'ellipsis-v' => '&#xf142;',
226
- 'empire' => '&#xf1d1;',
227
- 'envelope' => '&#xf0e0;',
228
- 'envelope-o' => '&#xf003;',
229
- 'envelope-open' => '&#xf2b6;',
230
- 'envelope-open-o' => '&#xf2b7;',
231
- 'envelope-square' => '&#xf199;',
232
- 'envira' => '&#xf299;',
233
- 'eraser' => '&#xf12d;',
234
- 'etsy' => '&#xf2d7;',
235
- 'eur' => '&#xf153;',
236
- 'euro' => '&#xf153;',
237
- 'exchange' => '&#xf0ec;',
238
- 'exclamation' => '&#xf12a;',
239
- 'exclamation-circle' => '&#xf06a;',
240
- 'exclamation-triangle' => '&#xf071;',
241
- 'expand' => '&#xf065;',
242
- 'expeditedssl' => '&#xf23e;',
243
- 'external-link' => '&#xf08e;',
244
- 'external-link-square' => '&#xf14c;',
245
- 'eye' => '&#xf06e;',
246
- 'eye-slash' => '&#xf070;',
247
- 'eyedropper' => '&#xf1fb;',
248
- 'fa' => '&#xf2b4;',
249
- 'facebook' => '&#xf09a;',
250
- 'facebook-f' => '&#xf09a;',
251
- 'facebook-official' => '&#xf230;',
252
- 'facebook-square' => '&#xf082;',
253
- 'fast-backward' => '&#xf049;',
254
- 'fast-forward' => '&#xf050;',
255
- 'fax' => '&#xf1ac;',
256
- 'feed' => '&#xf09e;',
257
- 'female' => '&#xf182;',
258
- 'fighter-jet' => '&#xf0fb;',
259
- 'file' => '&#xf15b;',
260
- 'file-archive-o' => '&#xf1c6;',
261
- 'file-audio-o' => '&#xf1c7;',
262
- 'file-code-o' => '&#xf1c9;',
263
- 'file-excel-o' => '&#xf1c3;',
264
- 'file-image-o' => '&#xf1c5;',
265
- 'file-movie-o' => '&#xf1c8;',
266
- 'file-o' => '&#xf016;',
267
- 'file-pdf-o' => '&#xf1c1;',
268
- 'file-photo-o' => '&#xf1c5;',
269
- 'file-picture-o' => '&#xf1c5;',
270
- 'file-powerpoint-o' => '&#xf1c4;',
271
- 'file-sound-o' => '&#xf1c7;',
272
- 'file-text' => '&#xf15c;',
273
- 'file-text-o' => '&#xf0f6;',
274
- 'file-video-o' => '&#xf1c8;',
275
- 'file-word-o' => '&#xf1c2;',
276
- 'file-zip-o' => '&#xf1c6;',
277
- 'files-o' => '&#xf0c5;',
278
- 'film' => '&#xf008;',
279
- 'filter' => '&#xf0b0;',
280
- 'fire' => '&#xf06d;',
281
- 'fire-extinguisher' => '&#xf134;',
282
- 'firefox' => '&#xf269;',
283
- 'first-order' => '&#xf2b0;',
284
- 'flag' => '&#xf024;',
285
- 'flag-checkered' => '&#xf11e;',
286
- 'flag-o' => '&#xf11d;',
287
- 'flash' => '&#xf0e7;',
288
- 'flask' => '&#xf0c3;',
289
- 'flickr' => '&#xf16e;',
290
- 'floppy-o' => '&#xf0c7;',
291
- 'folder' => '&#xf07b;',
292
- 'folder-o' => '&#xf114;',
293
- 'folder-open' => '&#xf07c;',
294
- 'folder-open-o' => '&#xf115;',
295
- 'font' => '&#xf031;',
296
- 'font-awesome' => '&#xf2b4;',
297
- 'fonticons' => '&#xf280;',
298
- 'fort-awesome' => '&#xf286;',
299
- 'forumbee' => '&#xf211;',
300
- 'forward' => '&#xf04e;',
301
- 'foursquare' => '&#xf180;',
302
- 'free-code-camp' => '&#xf2c5;',
303
- 'frown-o' => '&#xf119;',
304
- 'futbol-o' => '&#xf1e3;',
305
- 'gamepad' => '&#xf11b;',
306
- 'gavel' => '&#xf0e3;',
307
- 'gbp' => '&#xf154;',
308
- 'ge' => '&#xf1d1;',
309
- 'gear' => '&#xf013;',
310
- 'gears' => '&#xf085;',
311
- 'genderless' => '&#xf22d;',
312
- 'get-pocket' => '&#xf265;',
313
- 'gg' => '&#xf260;',
314
- 'gg-circle' => '&#xf261;',
315
- 'gift' => '&#xf06b;',
316
- 'git' => '&#xf1d3;',
317
- 'git-square' => '&#xf1d2;',
318
- 'github' => '&#xf09b;',
319
- 'github-alt' => '&#xf113;',
320
- 'github-square' => '&#xf092;',
321
- 'gitlab' => '&#xf296;',
322
- 'gittip' => '&#xf184;',
323
- 'glass' => '&#xf000;',
324
- 'glide' => '&#xf2a5;',
325
- 'glide-g' => '&#xf2a6;',
326
- 'globe' => '&#xf0ac;',
327
- 'google' => '&#xf1a0;',
328
- 'google-plus' => '&#xf0d5;',
329
- 'google-plus-circle' => '&#xf2b3;',
330
- 'google-plus-official' => '&#xf2b3;',
331
- 'google-plus-square' => '&#xf0d4;',
332
- 'google-wallet' => '&#xf1ee;',
333
- 'graduation-cap' => '&#xf19d;',
334
- 'gratipay' => '&#xf184;',
335
- 'grav' => '&#xf2d6;',
336
- 'group' => '&#xf0c0;',
337
- 'h-square' => '&#xf0fd;',
338
- 'hacker-news' => '&#xf1d4;',
339
- 'hand-grab-o' => '&#xf255;',
340
- 'hand-lizard-o' => '&#xf258;',
341
- 'hand-o-down' => '&#xf0a7;',
342
- 'hand-o-left' => '&#xf0a5;',
343
- 'hand-o-right' => '&#xf0a4;',
344
- 'hand-o-up' => '&#xf0a6;',
345
- 'hand-paper-o' => '&#xf256;',
346
- 'hand-peace-o' => '&#xf25b;',
347
- 'hand-pointer-o' => '&#xf25a;',
348
- 'hand-rock-o' => '&#xf255;',
349
- 'hand-scissors-o' => '&#xf257;',
350
- 'hand-spock-o' => '&#xf259;',
351
- 'hand-stop-o' => '&#xf256;',
352
- 'handshake-o' => '&#xf2b5;',
353
- 'hard-of-hearing' => '&#xf2a4;',
354
- 'hashtag' => '&#xf292;',
355
- 'hdd-o' => '&#xf0a0;',
356
- 'header' => '&#xf1dc;',
357
- 'headphones' => '&#xf025;',
358
- 'heart' => '&#xf004;',
359
- 'heart-o' => '&#xf08a;',
360
- 'heartbeat' => '&#xf21e;',
361
- 'history' => '&#xf1da;',
362
- 'home' => '&#xf015;',
363
- 'hospital-o' => '&#xf0f8;',
364
- 'hotel' => '&#xf236;',
365
- 'hourglass' => '&#xf254;',
366
- 'hourglass-1' => '&#xf251;',
367
- 'hourglass-2' => '&#xf252;',
368
- 'hourglass-3' => '&#xf253;',
369
- 'hourglass-end' => '&#xf253;',
370
- 'hourglass-half' => '&#xf252;',
371
- 'hourglass-o' => '&#xf250;',
372
- 'hourglass-start' => '&#xf251;',
373
- 'houzz' => '&#xf27c;',
374
- 'html5' => '&#xf13b;',
375
- 'i-cursor' => '&#xf246;',
376
- 'id-badge' => '&#xf2c1;',
377
- 'id-card' => '&#xf2c2;',
378
- 'id-card-o' => '&#xf2c3;',
379
- 'ils' => '&#xf20b;',
380
- 'image' => '&#xf03e;',
381
- 'imdb' => '&#xf2d8;',
382
- 'inbox' => '&#xf01c;',
383
- 'indent' => '&#xf03c;',
384
- 'industry' => '&#xf275;',
385
- 'info' => '&#xf129;',
386
- 'info-circle' => '&#xf05a;',
387
- 'inr' => '&#xf156;',
388
- 'instagram' => '&#xf16d;',
389
- 'institution' => '&#xf19c;',
390
- 'internet-explorer' => '&#xf26b;',
391
- 'intersex' => '&#xf224;',
392
- 'ioxhost' => '&#xf208;',
393
- 'italic' => '&#xf033;',
394
- 'joomla' => '&#xf1aa;',
395
- 'jpy' => '&#xf157;',
396
- 'jsfiddle' => '&#xf1cc;',
397
- 'key' => '&#xf084;',
398
- 'keyboard-o' => '&#xf11c;',
399
- 'krw' => '&#xf159;',
400
- 'language' => '&#xf1ab;',
401
- 'laptop' => '&#xf109;',
402
- 'lastfm' => '&#xf202;',
403
- 'lastfm-square' => '&#xf203;',
404
- 'leaf' => '&#xf06c;',
405
- 'leanpub' => '&#xf212;',
406
- 'legal' => '&#xf0e3;',
407
- 'lemon-o' => '&#xf094;',
408
- 'level-down' => '&#xf149;',
409
- 'level-up' => '&#xf148;',
410
- 'life-bouy' => '&#xf1cd;',
411
- 'life-buoy' => '&#xf1cd;',
412
- 'life-ring' => '&#xf1cd;',
413
- 'life-saver' => '&#xf1cd;',
414
- 'lightbulb-o' => '&#xf0eb;',
415
- 'line-chart' => '&#xf201;',
416
- 'link' => '&#xf0c1;',
417
- 'linkedin' => '&#xf0e1;',
418
- 'linkedin-square' => '&#xf08c;',
419
- 'linode' => '&#xf2b8;',
420
- 'linux' => '&#xf17c;',
421
- 'list' => '&#xf03a;',
422
- 'list-alt' => '&#xf022;',
423
- 'list-ol' => '&#xf0cb;',
424
- 'list-ul' => '&#xf0ca;',
425
- 'location-arrow' => '&#xf124;',
426
- 'lock' => '&#xf023;',
427
- 'long-arrow-down' => '&#xf175;',
428
- 'long-arrow-left' => '&#xf177;',
429
- 'long-arrow-right' => '&#xf178;',
430
- 'long-arrow-up' => '&#xf176;',
431
- 'low-vision' => '&#xf2a8;',
432
- 'magic' => '&#xf0d0;',
433
- 'magnet' => '&#xf076;',
434
- 'mail-forward' => '&#xf064;',
435
- 'mail-reply' => '&#xf112;',
436
- 'mail-reply-all' => '&#xf122;',
437
- 'male' => '&#xf183;',
438
- 'map' => '&#xf279;',
439
- 'map-marker' => '&#xf041;',
440
- 'map-o' => '&#xf278;',
441
- 'map-pin' => '&#xf276;',
442
- 'map-signs' => '&#xf277;',
443
- 'mars' => '&#xf222;',
444
- 'mars-double' => '&#xf227;',
445
- 'mars-stroke' => '&#xf229;',
446
- 'mars-stroke-h' => '&#xf22b;',
447
- 'mars-stroke-v' => '&#xf22a;',
448
- 'maxcdn' => '&#xf136;',
449
- 'meanpath' => '&#xf20c;',
450
- 'medium' => '&#xf23a;',
451
- 'medkit' => '&#xf0fa;',
452
- 'meetup' => '&#xf2e0;',
453
- 'meh-o' => '&#xf11a;',
454
- 'mercury' => '&#xf223;',
455
- 'microchip' => '&#xf2db;',
456
- 'microphone' => '&#xf130;',
457
- 'microphone-slash' => '&#xf131;',
458
- 'minus' => '&#xf068;',
459
- 'minus-circle' => '&#xf056;',
460
- 'minus-square' => '&#xf146;',
461
- 'minus-square-o' => '&#xf147;',
462
- 'mixcloud' => '&#xf289;',
463
- 'mobile' => '&#xf10b;',
464
- 'mobile-phone' => '&#xf10b;',
465
- 'modx' => '&#xf285;',
466
- 'money' => '&#xf0d6;',
467
- 'moon-o' => '&#xf186;',
468
- 'mortar-board' => '&#xf19d;',
469
- 'motorcycle' => '&#xf21c;',
470
- 'mouse-pointer' => '&#xf245;',
471
- 'music' => '&#xf001;',
472
- 'navicon' => '&#xf0c9;',
473
- 'neuter' => '&#xf22c;',
474
- 'newspaper-o' => '&#xf1ea;',
475
- 'object-group' => '&#xf247;',
476
- 'object-ungroup' => '&#xf248;',
477
- 'odnoklassniki' => '&#xf263;',
478
- 'odnoklassniki-square' => '&#xf264;',
479
- 'opencart' => '&#xf23d;',
480
- 'openid' => '&#xf19b;',
481
- 'opera' => '&#xf26a;',
482
- 'optin-monster' => '&#xf23c;',
483
- 'outdent' => '&#xf03b;',
484
- 'pagelines' => '&#xf18c;',
485
- 'paint-brush' => '&#xf1fc;',
486
- 'paper-plane' => '&#xf1d8;',
487
- 'paper-plane-o' => '&#xf1d9;',
488
- 'paperclip' => '&#xf0c6;',
489
- 'paragraph' => '&#xf1dd;',
490
- 'paste' => '&#xf0ea;',
491
- 'pause' => '&#xf04c;',
492
- 'pause-circle' => '&#xf28b;',
493
- 'pause-circle-o' => '&#xf28c;',
494
- 'paw' => '&#xf1b0;',
495
- 'paypal' => '&#xf1ed;',
496
- 'pencil' => '&#xf040;',
497
- 'pencil-square' => '&#xf14b;',
498
- 'pencil-square-o' => '&#xf044;',
499
- 'percent' => '&#xf295;',
500
- 'phone' => '&#xf095;',
501
- 'phone-square' => '&#xf098;',
502
- 'photo' => '&#xf03e;',
503
- 'picture-o' => '&#xf03e;',
504
- 'pie-chart' => '&#xf200;',
505
- 'pied-piper' => '&#xf2ae;',
506
- 'pied-piper-alt' => '&#xf1a8;',
507
- 'pied-piper-pp' => '&#xf1a7;',
508
- 'pinterest' => '&#xf0d2;',
509
- 'pinterest-p' => '&#xf231;',
510
- 'pinterest-square' => '&#xf0d3;',
511
- 'plane' => '&#xf072;',
512
- 'play' => '&#xf04b;',
513
- 'play-circle' => '&#xf144;',
514
- 'play-circle-o' => '&#xf01d;',
515
- 'plug' => '&#xf1e6;',
516
- 'plus' => '&#xf067;',
517
- 'plus-circle' => '&#xf055;',
518
- 'plus-square' => '&#xf0fe;',
519
- 'plus-square-o' => '&#xf196;',
520
- 'podcast' => '&#xf2ce;',
521
- 'power-off' => '&#xf011;',
522
- 'print' => '&#xf02f;',
523
- 'product-hunt' => '&#xf288;',
524
- 'puzzle-piece' => '&#xf12e;',
525
- 'qq' => '&#xf1d6;',
526
- 'qrcode' => '&#xf029;',
527
- 'question' => '&#xf128;',
528
- 'question-circle' => '&#xf059;',
529
- 'question-circle-o' => '&#xf29c;',
530
- 'quora' => '&#xf2c4;',
531
- 'quote-left' => '&#xf10d;',
532
- 'quote-right' => '&#xf10e;',
533
- 'ra' => '&#xf1d0;',
534
- 'random' => '&#xf074;',
535
- 'ravelry' => '&#xf2d9;',
536
- 'rebel' => '&#xf1d0;',
537
- 'recycle' => '&#xf1b8;',
538
- 'reddit' => '&#xf1a1;',
539
- 'reddit-alien' => '&#xf281;',
540
- 'reddit-square' => '&#xf1a2;',
541
- 'refresh' => '&#xf021;',
542
- 'registered' => '&#xf25d;',
543
- 'remove' => '&#xf00d;',
544
- 'renren' => '&#xf18b;',
545
- 'reorder' => '&#xf0c9;',
546
- 'repeat' => '&#xf01e;',
547
- 'reply' => '&#xf112;',
548
- 'reply-all' => '&#xf122;',
549
- 'resistance' => '&#xf1d0;',
550
- 'retweet' => '&#xf079;',
551
- 'rmb' => '&#xf157;',
552
- 'road' => '&#xf018;',
553
- 'rocket' => '&#xf135;',
554
- 'rotate-left' => '&#xf0e2;',
555
- 'rotate-right' => '&#xf01e;',
556
- 'rouble' => '&#xf158;',
557
- 'rss' => '&#xf09e;',
558
- 'rss-square' => '&#xf143;',
559
- 'rub' => '&#xf158;',
560
- 'ruble' => '&#xf158;',
561
- 'rupee' => '&#xf156;',
562
- 's15' => '&#xf2cd;',
563
- 'safari' => '&#xf267;',
564
- 'save' => '&#xf0c7;',
565
- 'scissors' => '&#xf0c4;',
566
- 'scribd' => '&#xf28a;',
567
- 'search' => '&#xf002;',
568
- 'search-minus' => '&#xf010;',
569
- 'search-plus' => '&#xf00e;',
570
- 'sellsy' => '&#xf213;',
571
- 'send' => '&#xf1d8;',
572
- 'send-o' => '&#xf1d9;',
573
- 'server' => '&#xf233;',
574
- 'share' => '&#xf064;',
575
- 'share-alt' => '&#xf1e0;',
576
- 'share-alt-square' => '&#xf1e1;',
577
- 'share-square' => '&#xf14d;',
578
- 'share-square-o' => '&#xf045;',
579
- 'shekel' => '&#xf20b;',
580
- 'sheqel' => '&#xf20b;',
581
- 'shield' => '&#xf132;',
582
- 'ship' => '&#xf21a;',
583
- 'shirtsinbulk' => '&#xf214;',
584
- 'shopping-bag' => '&#xf290;',
585
- 'shopping-basket' => '&#xf291;',
586
- 'shopping-cart' => '&#xf07a;',
587
- 'shower' => '&#xf2cc;',
588
- 'sign-in' => '&#xf090;',
589
- 'sign-language' => '&#xf2a7;',
590
- 'sign-out' => '&#xf08b;',
591
- 'signal' => '&#xf012;',
592
- 'signing' => '&#xf2a7;',
593
- 'simplybuilt' => '&#xf215;',
594
- 'sitemap' => '&#xf0e8;',
595
- 'skyatlas' => '&#xf216;',
596
- 'skype' => '&#xf17e;',
597
- 'slack' => '&#xf198;',
598
- 'sliders' => '&#xf1de;',
599
- 'slideshare' => '&#xf1e7;',
600
- 'smile-o' => '&#xf118;',
601
- 'snapchat' => '&#xf2ab;',
602
- 'snapchat-ghost' => '&#xf2ac;',
603
- 'snapchat-square' => '&#xf2ad;',
604
- 'snowflake-o' => '&#xf2dc;',
605
- 'soccer-ball-o' => '&#xf1e3;',
606
- 'sort' => '&#xf0dc;',
607
- 'sort-alpha-asc' => '&#xf15d;',
608
- 'sort-alpha-desc' => '&#xf15e;',
609
- 'sort-amount-asc' => '&#xf160;',
610
- 'sort-amount-desc' => '&#xf161;',
611
- 'sort-asc' => '&#xf0de;',
612
- 'sort-desc' => '&#xf0dd;',
613
- 'sort-down' => '&#xf0dd;',
614
- 'sort-numeric-asc' => '&#xf162;',
615
- 'sort-numeric-desc' => '&#xf163;',
616
- 'sort-up' => '&#xf0de;',
617
- 'soundcloud' => '&#xf1be;',
618
- 'space-shuttle' => '&#xf197;',
619
- 'spinner' => '&#xf110;',
620
- 'spoon' => '&#xf1b1;',
621
- 'spotify' => '&#xf1bc;',
622
- 'square' => '&#xf0c8;',
623
- 'square-o' => '&#xf096;',
624
- 'stack-exchange' => '&#xf18d;',
625
- 'stack-overflow' => '&#xf16c;',
626
- 'star' => '&#xf005;',
627
- 'star-half' => '&#xf089;',
628
- 'star-half-empty' => '&#xf123;',
629
- 'star-half-full' => '&#xf123;',
630
- 'star-half-o' => '&#xf123;',
631
- 'star-o' => '&#xf006;',
632
- 'steam' => '&#xf1b6;',
633
- 'steam-square' => '&#xf1b7;',
634
- 'step-backward' => '&#xf048;',
635
- 'step-forward' => '&#xf051;',
636
- 'stethoscope' => '&#xf0f1;',
637
- 'sticky-note' => '&#xf249;',
638
- 'sticky-note-o' => '&#xf24a;',
639
- 'stop' => '&#xf04d;',
640
- 'stop-circle' => '&#xf28d;',
641
- 'stop-circle-o' => '&#xf28e;',
642
- 'street-view' => '&#xf21d;',
643
- 'strikethrough' => '&#xf0cc;',
644
- 'stumbleupon' => '&#xf1a4;',
645
- 'stumbleupon-circle' => '&#xf1a3;',
646
- 'subscript' => '&#xf12c;',
647
- 'subway' => '&#xf239;',
648
- 'suitcase' => '&#xf0f2;',
649
- 'sun-o' => '&#xf185;',
650
- 'superpowers' => '&#xf2dd;',
651
- 'superscript' => '&#xf12b;',
652
- 'support' => '&#xf1cd;',
653
- 'table' => '&#xf0ce;',
654
- 'tablet' => '&#xf10a;',
655
- 'tachometer' => '&#xf0e4;',
656
- 'tag' => '&#xf02b;',
657
- 'tags' => '&#xf02c;',
658
- 'tasks' => '&#xf0ae;',
659
- 'taxi' => '&#xf1ba;',
660
- 'telegram' => '&#xf2c6;',
661
- 'television' => '&#xf26c;',
662
- 'tencent-weibo' => '&#xf1d5;',
663
- 'terminal' => '&#xf120;',
664
- 'text-height' => '&#xf034;',
665
- 'text-width' => '&#xf035;',
666
- 'th' => '&#xf00a;',
667
- 'th-large' => '&#xf009;',
668
- 'th-list' => '&#xf00b;',
669
- 'themeisle' => '&#xf2b2;',
670
- 'thermometer' => '&#xf2c7;',
671
- 'thermometer-0' => '&#xf2cb;',
672
- 'thermometer-1' => '&#xf2ca;',
673
- 'thermometer-2' => '&#xf2c9;',
674
- 'thermometer-3' => '&#xf2c8;',
675
- 'thermometer-4' => '&#xf2c7;',
676
- 'thermometer-empty' => '&#xf2cb;',
677
- 'thermometer-full' => '&#xf2c7;',
678
- 'thermometer-half' => '&#xf2c9;',
679
- 'thermometer-quarter' => '&#xf2ca;',
680
- 'thermometer-three-quarters' => '&#xf2c8;',
681
- 'thumb-tack' => '&#xf08d;',
682
- 'thumbs-down' => '&#xf165;',
683
- 'thumbs-o-down' => '&#xf088;',
684
- 'thumbs-o-up' => '&#xf087;',
685
- 'thumbs-up' => '&#xf164;',
686
- 'ticket' => '&#xf145;',
687
- 'times' => '&#xf00d;',
688
- 'times-circle' => '&#xf057;',
689
- 'times-circle-o' => '&#xf05c;',
690
- 'times-rectangle' => '&#xf2d3;',
691
- 'times-rectangle-o' => '&#xf2d4;',
692
- 'tint' => '&#xf043;',
693
- 'toggle-down' => '&#xf150;',
694
- 'toggle-left' => '&#xf191;',
695
- 'toggle-off' => '&#xf204;',
696
- 'toggle-on' => '&#xf205;',
697
- 'toggle-right' => '&#xf152;',
698
- 'toggle-up' => '&#xf151;',
699
- 'trademark' => '&#xf25c;',
700
- 'train' => '&#xf238;',
701
- 'transgender' => '&#xf224;',
702
- 'transgender-alt' => '&#xf225;',
703
- 'trash' => '&#xf1f8;',
704
- 'trash-o' => '&#xf014;',
705
- 'tree' => '&#xf1bb;',
706
- 'trello' => '&#xf181;',
707
- 'tripadvisor' => '&#xf262;',
708
- 'trophy' => '&#xf091;',
709
- 'truck' => '&#xf0d1;',
710
- 'try' => '&#xf195;',
711
- 'tty' => '&#xf1e4;',
712
- 'tumblr' => '&#xf173;',
713
- 'tumblr-square' => '&#xf174;',
714
- 'turkish-lira' => '&#xf195;',
715
- 'tv' => '&#xf26c;',
716
- 'twitch' => '&#xf1e8;',
717
- 'twitter' => '&#xf099;',
718
- 'twitter-square' => '&#xf081;',
719
- 'umbrella' => '&#xf0e9;',
720
- 'underline' => '&#xf0cd;',
721
- 'undo' => '&#xf0e2;',
722
- 'universal-access' => '&#xf29a;',
723
- 'university' => '&#xf19c;',
724
- 'unlink' => '&#xf127;',
725
- 'unlock' => '&#xf09c;',
726
- 'unlock-alt' => '&#xf13e;',
727
- 'unsorted' => '&#xf0dc;',
728
- 'upload' => '&#xf093;',
729
- 'usb' => '&#xf287;',
730
- 'usd' => '&#xf155;',
731
- 'user' => '&#xf007;',
732
- 'user-circle' => '&#xf2bd;',
733
- 'user-circle-o' => '&#xf2be;',
734
- 'user-md' => '&#xf0f0;',
735
- 'user-o' => '&#xf2c0;',
736
- 'user-plus' => '&#xf234;',
737
- 'user-secret' => '&#xf21b;',
738
- 'user-times' => '&#xf235;',
739
- 'users' => '&#xf0c0;',
740
- 'vcard' => '&#xf2bb;',
741
- 'vcard-o' => '&#xf2bc;',
742
- 'venus' => '&#xf221;',
743
- 'venus-double' => '&#xf226;',
744
- 'venus-mars' => '&#xf228;',
745
- 'viacoin' => '&#xf237;',
746
- 'viadeo' => '&#xf2a9;',
747
- 'viadeo-square' => '&#xf2aa;',
748
- 'video-camera' => '&#xf03d;',
749
- 'vimeo' => '&#xf27d;',
750
- 'vimeo-square' => '&#xf194;',
751
- 'vine' => '&#xf1ca;',
752
- 'vk' => '&#xf189;',
753
- 'volume-control-phone' => '&#xf2a0;',
754
- 'volume-down' => '&#xf027;',
755
- 'volume-off' => '&#xf026;',
756
- 'volume-up' => '&#xf028;',
757
- 'warning' => '&#xf071;',
758
- 'wechat' => '&#xf1d7;',
759
- 'weibo' => '&#xf18a;',
760
- 'weixin' => '&#xf1d7;',
761
- 'whatsapp' => '&#xf232;',
762
- 'wheelchair' => '&#xf193;',
763
- 'wheelchair-alt' => '&#xf29b;',
764
- 'wifi' => '&#xf1eb;',
765
- 'wikipedia-w' => '&#xf266;',
766
- 'window-close' => '&#xf2d3;',
767
- 'window-close-o' => '&#xf2d4;',
768
- 'window-maximize' => '&#xf2d0;',
769
- 'window-minimize' => '&#xf2d1;',
770
- 'window-restore' => '&#xf2d2;',
771
- 'windows' => '&#xf17a;',
772
- 'won' => '&#xf159;',
773
- 'wordpress' => '&#xf19a;',
774
- 'wpbeginner' => '&#xf297;',
775
- 'wpexplorer' => '&#xf2de;',
776
- 'wpforms' => '&#xf298;',
777
- 'wrench' => '&#xf0ad;',
778
- 'xing' => '&#xf168;',
779
- 'xing-square' => '&#xf169;',
780
- 'y-combinator' => '&#xf23b;',
781
- 'y-combinator-square' => '&#xf1d4;',
782
- 'yahoo' => '&#xf19e;',
783
- 'yc' => '&#xf23b;',
784
- 'yc-square' => '&#xf1d4;',
785
- 'yelp' => '&#xf1e9;',
786
- 'yen' => '&#xf157;',
787
- 'yoast' => '&#xf2b1;',
788
- 'youtube' => '&#xf167;',
789
- 'youtube-play' => '&#xf16a;',
790
- 'youtube-square' => '&#xf166;',