Version Description
- 25 April 2019 =
- Removed admin notice for new widgets.
- Slider Base Widget: Removed unused background videos height setting.
- Price Table: Recalc equalized heights when window size or orientation changes.
- Google Maps location field: Use value in sanitization if already an array.
- Add compatibility for Autoptimize.
- Simple Masonry: Ensure all available width is used for layout.
- Image: Change alignment to use
display:flex
instead oftext-align
.
Download this release
Release Info
Developer | gpriday |
Plugin | SiteOrigin Widgets Bundle |
Version | 1.15.5 |
Comparing to | |
See all releases |
Code changes from version 1.15.4 to 1.15.5
- admin/tpl/admin.php +137 -137
- base/base.php +294 -294
- base/inc/actions.php +282 -282
- base/inc/fields/builder.class.php +72 -72
- base/inc/fields/checkbox.class.php +26 -26
- base/inc/fields/container-base.class.php +125 -125
- base/inc/fields/date-range.class.php +131 -131
- base/inc/fields/font.class.php +45 -45
- base/inc/fields/icon.class.php +142 -142
- base/inc/fields/image-radio.class.php +75 -75
- base/inc/fields/js/date-range-field.js +110 -110
- base/inc/fields/js/icon-field.js +229 -229
- base/inc/fields/js/image-radio-field.js +18 -18
- base/inc/fields/js/media-field.js +409 -409
- base/inc/fields/js/multi-measurement-field.js +57 -57
- base/inc/fields/js/tinymce-field.js +145 -145
- base/inc/fields/multi-measurement.class.php +122 -122
- base/inc/fields/order.class.php +61 -61
- base/inc/fields/posts.class.php +203 -203
- base/inc/fields/repeater.class.php +128 -128
- base/inc/fields/section.class.php +22 -22
- base/inc/fields/slider.class.php +49 -49
- base/inc/fields/tinymce.class.php +561 -561
- base/inc/fields/widget.class.php +71 -71
- base/inc/fonts.php +4846 -4846
- base/inc/less-functions.php +41 -41
- base/inc/lessc.inc.php +283 -283
- base/inc/lib/Less/Exception/Chunk.php +198 -198
- base/inc/meta-box-manager.php +177 -177
- base/inc/post-selector.php +134 -134
- base/inc/routes/siteorigin-widgets-resource.class.php +172 -172
- base/inc/routes/sowb-rest-routes.php +50 -50
- base/inc/video.php +99 -99
- base/inc/widget-manager.class.php +198 -198
- base/inc/widgets/base-slider.class.php +370 -379
- base/js/admin.js +1453 -1453
- base/js/meta-box-manager.js +13 -13
- base/less/mixins.less +193 -193
- base/siteorigin-widget.class.php +1406 -1406
- compat/beaver-builder/beaver-builder.php +98 -98
- compat/beaver-builder/sowb-beaver-builder.js +142 -142
- compat/block-editor/widget-block.js +299 -299
- compat/block-editor/widget-block.php +102 -102
- compat/compat.php +59 -59
- compat/elementor/elementor.php +88 -88
- compat/elementor/sowb-elementor.js +25 -25
- compat/visual-composer/sowb-vc-widget.js +80 -80
- compat/visual-composer/visual-composer.php +296 -296
- icons/fontawesome/filter.php +1660 -1660
- icons/fontawesome/style.css +316 -316
- icons/fontawesome/webfonts/fa-brands-400.svg +0 -36
admin/tpl/admin.php
CHANGED
@@ -1,137 +1,137 @@
|
|
1 |
-
<div class="wrap" id="sow-widgets-page">
|
2 |
-
<div class="page-banner">
|
3 |
-
|
4 |
-
<span class="icon">
|
5 |
-
<img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-back.png' )?>" class="icon-back" width="50" height="43">
|
6 |
-
<img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-gear.png' ) ?>" class="icon-gear" width="26" height="26">
|
7 |
-
<img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-front.png' ) ?>" class="icon-front" width="50" height="43">
|
8 |
-
</span>
|
9 |
-
<h1><?php _e('SiteOrigin Widgets Bundle', 'so-widgets-bundle') ?></h1>
|
10 |
-
|
11 |
-
<div id="sow-widget-search">
|
12 |
-
<input type="search" placeholder="<?php esc_attr_e('Filter Widgets', 'so-widgets-bundle') ?>" />
|
13 |
-
</div>
|
14 |
-
</div>
|
15 |
-
|
16 |
-
<ul class="page-nav">
|
17 |
-
<li class="active"><a href="#all"><?php _e('All', 'so-widgets-bundle') ?></a></li>
|
18 |
-
<li><a href="#enabled"><?php _e('Enabled', 'so-widgets-bundle') ?></a></li>
|
19 |
-
<li><a href="#disabled"><?php _e('Disabled', 'so-widgets-bundle') ?></a></li>
|
20 |
-
</ul>
|
21 |
-
|
22 |
-
|
23 |
-
<div id="widgets-list">
|
24 |
-
|
25 |
-
<?php
|
26 |
-
foreach( $widgets as $file => $widget ):
|
27 |
-
$file = wp_normalize_path( $file );
|
28 |
-
?>
|
29 |
-
<div class="so-widget-wrap">
|
30 |
-
<div class="so-widget so-widget-is-<?php echo $widget['Active'] ? 'active' : 'inactive' ?>" data-id="<?php echo esc_attr( $widget['ID'] ) ?>">
|
31 |
-
|
32 |
-
<?php
|
33 |
-
$banner = '';
|
34 |
-
$widget_dir = dirname( $file );
|
35 |
-
if( file_exists( $widget_dir . '/assets/banner.svg' ) ) {
|
36 |
-
$banner = str_replace( wp_normalize_path( WP_CONTENT_DIR ), content_url(), $widget_dir ) . '/assets/banner.svg';
|
37 |
-
}
|
38 |
-
$banner = apply_filters('siteorigin_widgets_widget_banner', $banner, $widget);
|
39 |
-
?>
|
40 |
-
<div class="so-widget-banner" data-seed="<?php echo esc_attr( substr( md5($widget['ID']), 0, 6 ) ) ?>">
|
41 |
-
<?php if( !empty( $banner ) ) : ?>
|
42 |
-
<img src="<?php echo esc_url($banner) ?>" />
|
43 |
-
<?php endif; ?>
|
44 |
-
</div>
|
45 |
-
|
46 |
-
<div class="so-widget-text">
|
47 |
-
|
48 |
-
<div class="so-widget-active-indicator"><?php _e('Active', 'so-widgets-bundle') ?></div>
|
49 |
-
|
50 |
-
<h3><?php echo esc_html( $widget['Name'] ); ?></h3>
|
51 |
-
|
52 |
-
<div class="so-widget-description">
|
53 |
-
<?php echo esc_html( $widget['Description'] ) ?>
|
54 |
-
</div>
|
55 |
-
|
56 |
-
<?php if( !empty( $widget['Author'] ) ) : ?>
|
57 |
-
<div class="so-widget-byline">
|
58 |
-
By
|
59 |
-
<strong>
|
60 |
-
<?php
|
61 |
-
if( !empty($widget['AuthorURI']) ) echo '<a href="' . esc_url( $widget['AuthorURI'] ) . '" target="_blank" rel="noopener noreferrer">';
|
62 |
-
echo esc_html( $widget['Author'] );
|
63 |
-
if( !empty($widget['AuthorURI']) ) echo '</a>';
|
64 |
-
?>
|
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>
|
105 |
-
</div>
|
106 |
-
<?php endforeach; ?>
|
107 |
-
|
108 |
-
</div>
|
109 |
-
|
110 |
-
<div class="developers-link">
|
111 |
-
<?php _e('Developers - create your own widgets for the Widgets Bundle.', 'so-widgets-bundle') ?>
|
112 |
-
<a href="https://siteorigin.com/docs/widgets-bundle/" target="_blank" rel="noopener noreferrer"><?php _e('Read More', 'so-widgets-bundle') ?></a>.
|
113 |
-
</div>
|
114 |
-
|
115 |
-
<div id="sow-settings-dialog">
|
116 |
-
<div class="so-overlay"></div>
|
117 |
-
|
118 |
-
<div class="so-title-bar">
|
119 |
-
<h3 class="so-title"><?php _e( 'Widget Settings', 'so-widgets-bundle' ) ?></h3>
|
120 |
-
<a class="so-close">
|
121 |
-
<span class="so-dialog-icon"></span>
|
122 |
-
</a>
|
123 |
-
</div>
|
124 |
-
|
125 |
-
<div class="so-content so-loading">
|
126 |
-
</div>
|
127 |
-
|
128 |
-
<div class="so-toolbar">
|
129 |
-
<div class="so-buttons">
|
130 |
-
<button class="button-primary so-save"><?php _e( 'Save', 'so-widgets-bundle' ) ?></button>
|
131 |
-
</div>
|
132 |
-
</div>
|
133 |
-
</div>
|
134 |
-
|
135 |
-
<iframe id="so-widget-settings-save" name="so-widget-settings-save"></iframe>
|
136 |
-
|
137 |
-
</div>
|
1 |
+
<div class="wrap" id="sow-widgets-page">
|
2 |
+
<div class="page-banner">
|
3 |
+
|
4 |
+
<span class="icon">
|
5 |
+
<img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-back.png' )?>" class="icon-back" width="50" height="43">
|
6 |
+
<img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-gear.png' ) ?>" class="icon-gear" width="26" height="26">
|
7 |
+
<img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-front.png' ) ?>" class="icon-front" width="50" height="43">
|
8 |
+
</span>
|
9 |
+
<h1><?php _e('SiteOrigin Widgets Bundle', 'so-widgets-bundle') ?></h1>
|
10 |
+
|
11 |
+
<div id="sow-widget-search">
|
12 |
+
<input type="search" placeholder="<?php esc_attr_e('Filter Widgets', 'so-widgets-bundle') ?>" />
|
13 |
+
</div>
|
14 |
+
</div>
|
15 |
+
|
16 |
+
<ul class="page-nav">
|
17 |
+
<li class="active"><a href="#all"><?php _e('All', 'so-widgets-bundle') ?></a></li>
|
18 |
+
<li><a href="#enabled"><?php _e('Enabled', 'so-widgets-bundle') ?></a></li>
|
19 |
+
<li><a href="#disabled"><?php _e('Disabled', 'so-widgets-bundle') ?></a></li>
|
20 |
+
</ul>
|
21 |
+
|
22 |
+
|
23 |
+
<div id="widgets-list">
|
24 |
+
|
25 |
+
<?php
|
26 |
+
foreach( $widgets as $file => $widget ):
|
27 |
+
$file = wp_normalize_path( $file );
|
28 |
+
?>
|
29 |
+
<div class="so-widget-wrap">
|
30 |
+
<div class="so-widget so-widget-is-<?php echo $widget['Active'] ? 'active' : 'inactive' ?>" data-id="<?php echo esc_attr( $widget['ID'] ) ?>">
|
31 |
+
|
32 |
+
<?php
|
33 |
+
$banner = '';
|
34 |
+
$widget_dir = dirname( $file );
|
35 |
+
if( file_exists( $widget_dir . '/assets/banner.svg' ) ) {
|
36 |
+
$banner = str_replace( wp_normalize_path( WP_CONTENT_DIR ), content_url(), $widget_dir ) . '/assets/banner.svg';
|
37 |
+
}
|
38 |
+
$banner = apply_filters('siteorigin_widgets_widget_banner', $banner, $widget);
|
39 |
+
?>
|
40 |
+
<div class="so-widget-banner" data-seed="<?php echo esc_attr( substr( md5($widget['ID']), 0, 6 ) ) ?>">
|
41 |
+
<?php if( !empty( $banner ) ) : ?>
|
42 |
+
<img src="<?php echo esc_url($banner) ?>" />
|
43 |
+
<?php endif; ?>
|
44 |
+
</div>
|
45 |
+
|
46 |
+
<div class="so-widget-text">
|
47 |
+
|
48 |
+
<div class="so-widget-active-indicator"><?php _e('Active', 'so-widgets-bundle') ?></div>
|
49 |
+
|
50 |
+
<h3><?php echo esc_html( $widget['Name'] ); ?></h3>
|
51 |
+
|
52 |
+
<div class="so-widget-description">
|
53 |
+
<?php echo esc_html( $widget['Description'] ) ?>
|
54 |
+
</div>
|
55 |
+
|
56 |
+
<?php if( !empty( $widget['Author'] ) ) : ?>
|
57 |
+
<div class="so-widget-byline">
|
58 |
+
By
|
59 |
+
<strong>
|
60 |
+
<?php
|
61 |
+
if( !empty($widget['AuthorURI']) ) echo '<a href="' . esc_url( $widget['AuthorURI'] ) . '" target="_blank" rel="noopener noreferrer">';
|
62 |
+
echo esc_html( $widget['Author'] );
|
63 |
+
if( !empty($widget['AuthorURI']) ) echo '</a>';
|
64 |
+
?>
|
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>
|
105 |
+
</div>
|
106 |
+
<?php endforeach; ?>
|
107 |
+
|
108 |
+
</div>
|
109 |
+
|
110 |
+
<div class="developers-link">
|
111 |
+
<?php _e('Developers - create your own widgets for the Widgets Bundle.', 'so-widgets-bundle') ?>
|
112 |
+
<a href="https://siteorigin.com/docs/widgets-bundle/" target="_blank" rel="noopener noreferrer"><?php _e('Read More', 'so-widgets-bundle') ?></a>.
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<div id="sow-settings-dialog">
|
116 |
+
<div class="so-overlay"></div>
|
117 |
+
|
118 |
+
<div class="so-title-bar">
|
119 |
+
<h3 class="so-title"><?php _e( 'Widget Settings', 'so-widgets-bundle' ) ?></h3>
|
120 |
+
<a class="so-close">
|
121 |
+
<span class="so-dialog-icon"></span>
|
122 |
+
</a>
|
123 |
+
</div>
|
124 |
+
|
125 |
+
<div class="so-content so-loading">
|
126 |
+
</div>
|
127 |
+
|
128 |
+
<div class="so-toolbar">
|
129 |
+
<div class="so-buttons">
|
130 |
+
<button class="button-primary so-save"><?php _e( 'Save', 'so-widgets-bundle' ) ?></button>
|
131 |
+
</div>
|
132 |
+
</div>
|
133 |
+
</div>
|
134 |
+
|
135 |
+
<iframe id="so-widget-settings-save" name="so-widget-settings-save"></iframe>
|
136 |
+
|
137 |
+
</div>
|
base/base.php
CHANGED
@@ -1,294 +1,294 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
include plugin_dir_path(__FILE__).'inc/fields/siteorigin-widget-field-class-loader.class.php';
|
4 |
-
include plugin_dir_path(__FILE__).'siteorigin-widget.class.php';
|
5 |
-
|
6 |
-
include plugin_dir_path(__FILE__).'inc/widget-manager.class.php';
|
7 |
-
include plugin_dir_path(__FILE__).'inc/meta-box-manager.php';
|
8 |
-
include plugin_dir_path(__FILE__).'inc/post-selector.php';
|
9 |
-
include plugin_dir_path(__FILE__).'inc/string-utils.php';
|
10 |
-
include plugin_dir_path(__FILE__).'inc/array-utils.php';
|
11 |
-
include plugin_dir_path(__FILE__).'inc/attachments.php';
|
12 |
-
include plugin_dir_path(__FILE__).'inc/actions.php';
|
13 |
-
include plugin_dir_path(__FILE__).'inc/shortcode.php';
|
14 |
-
include plugin_dir_path(__FILE__).'inc/video.php';
|
15 |
-
include plugin_dir_path(__FILE__).'inc/routes/sowb-rest-routes.php';
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @param $css
|
19 |
-
*/
|
20 |
-
function siteorigin_widget_add_inline_css($css){
|
21 |
-
global $siteorigin_widgets_inline_styles;
|
22 |
-
if ( empty( $siteorigin_widgets_inline_styles ) ) {
|
23 |
-
$siteorigin_widgets_inline_styles = array();
|
24 |
-
}
|
25 |
-
|
26 |
-
$siteorigin_widgets_inline_styles[] = $css;
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Print any inline styles that have been added with siteorigin_widget_add_inline_css
|
31 |
-
*/
|
32 |
-
function siteorigin_widget_print_styles(){
|
33 |
-
global $siteorigin_widgets_inline_styles;
|
34 |
-
if ( ! empty( $siteorigin_widgets_inline_styles ) ) {
|
35 |
-
foreach ($siteorigin_widgets_inline_styles as $widget_css) {
|
36 |
-
?>
|
37 |
-
<style type="text/css"><?php echo($widget_css) ?></style><?php
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
$siteorigin_widgets_inline_styles = array();
|
42 |
-
}
|
43 |
-
add_action('wp_head', 'siteorigin_widget_print_styles');
|
44 |
-
add_action('wp_footer', 'siteorigin_widget_print_styles');
|
45 |
-
|
46 |
-
/**
|
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 |
-
|
64 |
-
/**
|
65 |
-
* @param $icon_value
|
66 |
-
* @param bool $icon_styles
|
67 |
-
*
|
68 |
-
* @return bool|string
|
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 ( is_array($icon_data) && ! 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;
|
106 |
-
}
|
107 |
-
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* @param $font_value
|
112 |
-
*
|
113 |
-
* @return array
|
114 |
-
*/
|
115 |
-
function siteorigin_widget_get_font($font_value) {
|
116 |
-
|
117 |
-
$web_safe = array(
|
118 |
-
'Arial' => 'Arial, "Helvetica Neue", Helvetica, sans-serif',
|
119 |
-
'Helvetica Neue' => '"Helvetica Neue", Helvetica, Arial, sans-serif',
|
120 |
-
'Lucida Grande' => 'Lucida, Verdana, sans-serif',
|
121 |
-
'Georgia' => '"Times New Roman", Times, serif',
|
122 |
-
'Courier New' => 'Courier, mono',
|
123 |
-
'default' => 'default',
|
124 |
-
);
|
125 |
-
|
126 |
-
$font = array();
|
127 |
-
if ( isset( $web_safe[ $font_value ] ) ) {
|
128 |
-
$font['family'] = $web_safe[ $font_value ];
|
129 |
-
}
|
130 |
-
else if( siteorigin_widgets_is_google_webfont( $font_value ) ) {
|
131 |
-
$font_parts = explode( ':', $font_value );
|
132 |
-
$font['family'] = $font_parts[0];
|
133 |
-
$font_url_param = urlencode( $font_parts[0] );
|
134 |
-
if ( count( $font_parts ) > 1 ) {
|
135 |
-
$font['weight'] = $font_parts[1];
|
136 |
-
$font_url_param .= ':' . $font_parts[1];
|
137 |
-
}
|
138 |
-
$font['url'] = 'https://fonts.googleapis.com/css?family=' . $font_url_param;
|
139 |
-
$font['css_import'] = '@import url(https://fonts.googleapis.com/css?family=' . $font_url_param . ');';
|
140 |
-
}
|
141 |
-
else {
|
142 |
-
$font['family'] = $font_value;
|
143 |
-
$font = apply_filters( 'siteorigin_widget_get_custom_font_family', $font );
|
144 |
-
}
|
145 |
-
|
146 |
-
return $font;
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* Compatibility with Page Builder, add the groups and icons.
|
151 |
-
*
|
152 |
-
* @param $widgets
|
153 |
-
*
|
154 |
-
* @return mixed
|
155 |
-
*/
|
156 |
-
function siteorigin_widget_add_bundle_groups($widgets){
|
157 |
-
foreach( $widgets as $class => &$widget ) {
|
158 |
-
if( preg_match('/SiteOrigin_Widgets?_(.*)_Widget/i', $class, $matches) ) {
|
159 |
-
$widget['icon'] = 'so-widget-icon so-widget-icon-'.strtolower($matches[1]);
|
160 |
-
$widget['groups'] = array('so-widgets-bundle');
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
return $widgets;
|
165 |
-
}
|
166 |
-
add_filter('siteorigin_panels_widgets', 'siteorigin_widget_add_bundle_groups', 11);
|
167 |
-
|
168 |
-
/**
|
169 |
-
* Escape a URL
|
170 |
-
*
|
171 |
-
* @param $url
|
172 |
-
*
|
173 |
-
* @return string
|
174 |
-
*/
|
175 |
-
function sow_esc_url( $url ) {
|
176 |
-
if( preg_match('/^post: *([0-9]+)/', $url, $matches) ) {
|
177 |
-
// Convert the special post URL into a permalink
|
178 |
-
$url = get_the_permalink( intval($matches[1]) );
|
179 |
-
if( empty($url) ) return '';
|
180 |
-
}
|
181 |
-
|
182 |
-
$protocols = wp_allowed_protocols();
|
183 |
-
$protocols[] = 'skype';
|
184 |
-
return esc_url( $url, $protocols );
|
185 |
-
}
|
186 |
-
|
187 |
-
/**
|
188 |
-
* A special URL escaping function that handles additional protocols
|
189 |
-
*
|
190 |
-
* @param $url
|
191 |
-
*
|
192 |
-
* @return string
|
193 |
-
*/
|
194 |
-
function sow_esc_url_raw( $url ) {
|
195 |
-
if( preg_match('/^post: *([0-9]+)/', $url, $matches) ) {
|
196 |
-
// Convert the special post URL into a permalink
|
197 |
-
$url = get_the_permalink( intval($matches[1]) );
|
198 |
-
}
|
199 |
-
|
200 |
-
$protocols = wp_allowed_protocols();
|
201 |
-
$protocols[] = 'skype';
|
202 |
-
return esc_url_raw( $url, $protocols );
|
203 |
-
}
|
204 |
-
|
205 |
-
/**
|
206 |
-
* Escape an HTML attribute
|
207 |
-
*
|
208 |
-
* This is a copy of the WP core `esc_attr` function, but modified to allow specifying arguments to the
|
209 |
-
* `_wp_specialchars` function for a bit more control. This was specifically necessary to allow double-encoding for
|
210 |
-
* the layout builder field.
|
211 |
-
*
|
212 |
-
* @param $text
|
213 |
-
* @param int $quote_style
|
214 |
-
* @param bool $charset
|
215 |
-
* @param bool $double_encode
|
216 |
-
*
|
217 |
-
* @return string
|
218 |
-
*/
|
219 |
-
function sow_esc_attr( $text, $quote_style = ENT_QUOTES, $charset = false, $double_encode = false ) {
|
220 |
-
$safe_text = wp_check_invalid_utf8( $text );
|
221 |
-
$safe_text = _wp_specialchars( $safe_text, $quote_style, $charset, $double_encode );
|
222 |
-
return apply_filters( 'attribute_escape', $safe_text, $text );
|
223 |
-
}
|
224 |
-
|
225 |
-
/**
|
226 |
-
* Get all the Google Web Fonts.
|
227 |
-
*
|
228 |
-
* @return mixed|void
|
229 |
-
*/
|
230 |
-
function siteorigin_widgets_fonts_google_webfonts( ) {
|
231 |
-
$fonts = include plugin_dir_path( __FILE__ ) . 'inc/fonts.php';
|
232 |
-
$fonts = apply_filters( 'siteorigin_widgets_google_webfonts', $fonts );
|
233 |
-
return !empty( $fonts ) ? $fonts : array();
|
234 |
-
}
|
235 |
-
|
236 |
-
function siteorigin_widgets_is_google_webfont( $font_value ) {
|
237 |
-
$google_webfonts = siteorigin_widgets_fonts_google_webfonts();
|
238 |
-
|
239 |
-
$font_family = explode( ':', $font_value );
|
240 |
-
$font_family = $font_family[0];
|
241 |
-
|
242 |
-
return isset( $google_webfonts[$font_family] );
|
243 |
-
}
|
244 |
-
|
245 |
-
function siteorigin_widgets_font_families( ){
|
246 |
-
// Add the default fonts
|
247 |
-
$font_families = array(
|
248 |
-
'Arial' => 'Arial',
|
249 |
-
'Helvetica Neue' => 'Helvetica Neue',
|
250 |
-
'Lucida Grande' => 'Lucida Grande',
|
251 |
-
'Georgia' => 'Georgia',
|
252 |
-
'Courier New' => 'Courier New',
|
253 |
-
);
|
254 |
-
|
255 |
-
// Add in all the Google font families
|
256 |
-
foreach ( siteorigin_widgets_fonts_google_webfonts() as $font => $variants ) {
|
257 |
-
foreach ( $variants as $variant ) {
|
258 |
-
if ( $variant == 'regular' || $variant == 400 ) {
|
259 |
-
$font_families[ $font ] = $font;
|
260 |
-
}
|
261 |
-
else {
|
262 |
-
$font_families[ $font . ':' . $variant ] = $font . ' (' . $variant . ')';
|
263 |
-
}
|
264 |
-
}
|
265 |
-
}
|
266 |
-
|
267 |
-
return apply_filters('siteorigin_widgets_font_families', $font_families);
|
268 |
-
}
|
269 |
-
|
270 |
-
/**
|
271 |
-
* Get list of supported measurements
|
272 |
-
*
|
273 |
-
* @return array
|
274 |
-
*/
|
275 |
-
function siteorigin_widgets_get_measurements_list() {
|
276 |
-
$measurements = array(
|
277 |
-
'px', '%', 'in', 'cm', 'mm', 'em', 'rem', 'pt', 'pc', 'ex', 'ch', 'vw', 'vh', 'vmin', 'vmax',
|
278 |
-
);
|
279 |
-
|
280 |
-
// Allow themes and plugins to trim or enhance the list.
|
281 |
-
return apply_filters('siteorigin_widgets_get_measurements_list', $measurements);
|
282 |
-
}
|
283 |
-
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Returns the base URL of our widget with `$path` appended.
|
287 |
-
*
|
288 |
-
* @param string $path Extra path to append to the end of the URL.
|
289 |
-
*
|
290 |
-
* @return string Base URL of the widget, with $path appended.
|
291 |
-
*/
|
292 |
-
function siteorigin_widgets_url( $path = '' ) {
|
293 |
-
return plugins_url( 'so-widgets-bundle/' . $path );
|
294 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
include plugin_dir_path(__FILE__).'inc/fields/siteorigin-widget-field-class-loader.class.php';
|
4 |
+
include plugin_dir_path(__FILE__).'siteorigin-widget.class.php';
|
5 |
+
|
6 |
+
include plugin_dir_path(__FILE__).'inc/widget-manager.class.php';
|
7 |
+
include plugin_dir_path(__FILE__).'inc/meta-box-manager.php';
|
8 |
+
include plugin_dir_path(__FILE__).'inc/post-selector.php';
|
9 |
+
include plugin_dir_path(__FILE__).'inc/string-utils.php';
|
10 |
+
include plugin_dir_path(__FILE__).'inc/array-utils.php';
|
11 |
+
include plugin_dir_path(__FILE__).'inc/attachments.php';
|
12 |
+
include plugin_dir_path(__FILE__).'inc/actions.php';
|
13 |
+
include plugin_dir_path(__FILE__).'inc/shortcode.php';
|
14 |
+
include plugin_dir_path(__FILE__).'inc/video.php';
|
15 |
+
include plugin_dir_path(__FILE__).'inc/routes/sowb-rest-routes.php';
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @param $css
|
19 |
+
*/
|
20 |
+
function siteorigin_widget_add_inline_css($css){
|
21 |
+
global $siteorigin_widgets_inline_styles;
|
22 |
+
if ( empty( $siteorigin_widgets_inline_styles ) ) {
|
23 |
+
$siteorigin_widgets_inline_styles = array();
|
24 |
+
}
|
25 |
+
|
26 |
+
$siteorigin_widgets_inline_styles[] = $css;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Print any inline styles that have been added with siteorigin_widget_add_inline_css
|
31 |
+
*/
|
32 |
+
function siteorigin_widget_print_styles(){
|
33 |
+
global $siteorigin_widgets_inline_styles;
|
34 |
+
if ( ! empty( $siteorigin_widgets_inline_styles ) ) {
|
35 |
+
foreach ($siteorigin_widgets_inline_styles as $widget_css) {
|
36 |
+
?>
|
37 |
+
<style type="text/css"><?php echo($widget_css) ?></style><?php
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
$siteorigin_widgets_inline_styles = array();
|
42 |
+
}
|
43 |
+
add_action('wp_head', 'siteorigin_widget_print_styles');
|
44 |
+
add_action('wp_footer', 'siteorigin_widget_print_styles');
|
45 |
+
|
46 |
+
/**
|
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 |
+
|
64 |
+
/**
|
65 |
+
* @param $icon_value
|
66 |
+
* @param bool $icon_styles
|
67 |
+
*
|
68 |
+
* @return bool|string
|
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 ( is_array($icon_data) && ! 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;
|
106 |
+
}
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* @param $font_value
|
112 |
+
*
|
113 |
+
* @return array
|
114 |
+
*/
|
115 |
+
function siteorigin_widget_get_font($font_value) {
|
116 |
+
|
117 |
+
$web_safe = array(
|
118 |
+
'Arial' => 'Arial, "Helvetica Neue", Helvetica, sans-serif',
|
119 |
+
'Helvetica Neue' => '"Helvetica Neue", Helvetica, Arial, sans-serif',
|
120 |
+
'Lucida Grande' => 'Lucida, Verdana, sans-serif',
|
121 |
+
'Georgia' => '"Times New Roman", Times, serif',
|
122 |
+
'Courier New' => 'Courier, mono',
|
123 |
+
'default' => 'default',
|
124 |
+
);
|
125 |
+
|
126 |
+
$font = array();
|
127 |
+
if ( isset( $web_safe[ $font_value ] ) ) {
|
128 |
+
$font['family'] = $web_safe[ $font_value ];
|
129 |
+
}
|
130 |
+
else if( siteorigin_widgets_is_google_webfont( $font_value ) ) {
|
131 |
+
$font_parts = explode( ':', $font_value );
|
132 |
+
$font['family'] = $font_parts[0];
|
133 |
+
$font_url_param = urlencode( $font_parts[0] );
|
134 |
+
if ( count( $font_parts ) > 1 ) {
|
135 |
+
$font['weight'] = $font_parts[1];
|
136 |
+
$font_url_param .= ':' . $font_parts[1];
|
137 |
+
}
|
138 |
+
$font['url'] = 'https://fonts.googleapis.com/css?family=' . $font_url_param;
|
139 |
+
$font['css_import'] = '@import url(https://fonts.googleapis.com/css?family=' . $font_url_param . ');';
|
140 |
+
}
|
141 |
+
else {
|
142 |
+
$font['family'] = $font_value;
|
143 |
+
$font = apply_filters( 'siteorigin_widget_get_custom_font_family', $font );
|
144 |
+
}
|
145 |
+
|
146 |
+
return $font;
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Compatibility with Page Builder, add the groups and icons.
|
151 |
+
*
|
152 |
+
* @param $widgets
|
153 |
+
*
|
154 |
+
* @return mixed
|
155 |
+
*/
|
156 |
+
function siteorigin_widget_add_bundle_groups($widgets){
|
157 |
+
foreach( $widgets as $class => &$widget ) {
|
158 |
+
if( preg_match('/SiteOrigin_Widgets?_(.*)_Widget/i', $class, $matches) ) {
|
159 |
+
$widget['icon'] = 'so-widget-icon so-widget-icon-'.strtolower($matches[1]);
|
160 |
+
$widget['groups'] = array('so-widgets-bundle');
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
return $widgets;
|
165 |
+
}
|
166 |
+
add_filter('siteorigin_panels_widgets', 'siteorigin_widget_add_bundle_groups', 11);
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Escape a URL
|
170 |
+
*
|
171 |
+
* @param $url
|
172 |
+
*
|
173 |
+
* @return string
|
174 |
+
*/
|
175 |
+
function sow_esc_url( $url ) {
|
176 |
+
if( preg_match('/^post: *([0-9]+)/', $url, $matches) ) {
|
177 |
+
// Convert the special post URL into a permalink
|
178 |
+
$url = get_the_permalink( intval($matches[1]) );
|
179 |
+
if( empty($url) ) return '';
|
180 |
+
}
|
181 |
+
|
182 |
+
$protocols = wp_allowed_protocols();
|
183 |
+
$protocols[] = 'skype';
|
184 |
+
return esc_url( $url, $protocols );
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* A special URL escaping function that handles additional protocols
|
189 |
+
*
|
190 |
+
* @param $url
|
191 |
+
*
|
192 |
+
* @return string
|
193 |
+
*/
|
194 |
+
function sow_esc_url_raw( $url ) {
|
195 |
+
if( preg_match('/^post: *([0-9]+)/', $url, $matches) ) {
|
196 |
+
// Convert the special post URL into a permalink
|
197 |
+
$url = get_the_permalink( intval($matches[1]) );
|
198 |
+
}
|
199 |
+
|
200 |
+
$protocols = wp_allowed_protocols();
|
201 |
+
$protocols[] = 'skype';
|
202 |
+
return esc_url_raw( $url, $protocols );
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Escape an HTML attribute
|
207 |
+
*
|
208 |
+
* This is a copy of the WP core `esc_attr` function, but modified to allow specifying arguments to the
|
209 |
+
* `_wp_specialchars` function for a bit more control. This was specifically necessary to allow double-encoding for
|
210 |
+
* the layout builder field.
|
211 |
+
*
|
212 |
+
* @param $text
|
213 |
+
* @param int $quote_style
|
214 |
+
* @param bool $charset
|
215 |
+
* @param bool $double_encode
|
216 |
+
*
|
217 |
+
* @return string
|
218 |
+
*/
|
219 |
+
function sow_esc_attr( $text, $quote_style = ENT_QUOTES, $charset = false, $double_encode = false ) {
|
220 |
+
$safe_text = wp_check_invalid_utf8( $text );
|
221 |
+
$safe_text = _wp_specialchars( $safe_text, $quote_style, $charset, $double_encode );
|
222 |
+
return apply_filters( 'attribute_escape', $safe_text, $text );
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Get all the Google Web Fonts.
|
227 |
+
*
|
228 |
+
* @return mixed|void
|
229 |
+
*/
|
230 |
+
function siteorigin_widgets_fonts_google_webfonts( ) {
|
231 |
+
$fonts = include plugin_dir_path( __FILE__ ) . 'inc/fonts.php';
|
232 |
+
$fonts = apply_filters( 'siteorigin_widgets_google_webfonts', $fonts );
|
233 |
+
return !empty( $fonts ) ? $fonts : array();
|
234 |
+
}
|
235 |
+
|
236 |
+
function siteorigin_widgets_is_google_webfont( $font_value ) {
|
237 |
+
$google_webfonts = siteorigin_widgets_fonts_google_webfonts();
|
238 |
+
|
239 |
+
$font_family = explode( ':', $font_value );
|
240 |
+
$font_family = $font_family[0];
|
241 |
+
|
242 |
+
return isset( $google_webfonts[$font_family] );
|
243 |
+
}
|
244 |
+
|
245 |
+
function siteorigin_widgets_font_families( ){
|
246 |
+
// Add the default fonts
|
247 |
+
$font_families = array(
|
248 |
+
'Arial' => 'Arial',
|
249 |
+
'Helvetica Neue' => 'Helvetica Neue',
|
250 |
+
'Lucida Grande' => 'Lucida Grande',
|
251 |
+
'Georgia' => 'Georgia',
|
252 |
+
'Courier New' => 'Courier New',
|
253 |
+
);
|
254 |
+
|
255 |
+
// Add in all the Google font families
|
256 |
+
foreach ( siteorigin_widgets_fonts_google_webfonts() as $font => $variants ) {
|
257 |
+
foreach ( $variants as $variant ) {
|
258 |
+
if ( $variant == 'regular' || $variant == 400 ) {
|
259 |
+
$font_families[ $font ] = $font;
|
260 |
+
}
|
261 |
+
else {
|
262 |
+
$font_families[ $font . ':' . $variant ] = $font . ' (' . $variant . ')';
|
263 |
+
}
|
264 |
+
}
|
265 |
+
}
|
266 |
+
|
267 |
+
return apply_filters('siteorigin_widgets_font_families', $font_families);
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Get list of supported measurements
|
272 |
+
*
|
273 |
+
* @return array
|
274 |
+
*/
|
275 |
+
function siteorigin_widgets_get_measurements_list() {
|
276 |
+
$measurements = array(
|
277 |
+
'px', '%', 'in', 'cm', 'mm', 'em', 'rem', 'pt', 'pc', 'ex', 'ch', 'vw', 'vh', 'vmin', 'vmax',
|
278 |
+
);
|
279 |
+
|
280 |
+
// Allow themes and plugins to trim or enhance the list.
|
281 |
+
return apply_filters('siteorigin_widgets_get_measurements_list', $measurements);
|
282 |
+
}
|
283 |
+
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Returns the base URL of our widget with `$path` appended.
|
287 |
+
*
|
288 |
+
* @param string $path Extra path to append to the end of the URL.
|
289 |
+
*
|
290 |
+
* @return string Base URL of the widget, with $path appended.
|
291 |
+
*/
|
292 |
+
function siteorigin_widgets_url( $path = '' ) {
|
293 |
+
return plugins_url( 'so-widgets-bundle/' . $path );
|
294 |
+
}
|
base/inc/actions.php
CHANGED
@@ -1,282 +1,282 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Action for displaying the widget preview.
|
5 |
-
*/
|
6 |
-
function siteorigin_widget_preview_widget_action() {
|
7 |
-
if (
|
8 |
-
empty( $_REQUEST['_widgets_nonce'] ) ||
|
9 |
-
! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' )
|
10 |
-
) {
|
11 |
-
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
|
12 |
-
} else if ( empty( $_POST['class'] ) ) {
|
13 |
-
wp_die( __( 'Invalid widget.', 'so-widgets-bundle' ), 400 );
|
14 |
-
}
|
15 |
-
|
16 |
-
// Get the widget from the widget factory
|
17 |
-
global $wp_widget_factory;
|
18 |
-
$widget_class = str_replace('\\\\', '\\', $_POST['class']);
|
19 |
-
|
20 |
-
$widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
|
21 |
-
|
22 |
-
if( ! is_a( $widget, 'SiteOrigin_Widget' ) ) {
|
23 |
-
wp_die( __( 'Invalid post.', 'so-widgets-bundle' ), 400 );
|
24 |
-
}
|
25 |
-
|
26 |
-
$instance = json_decode( stripslashes_deep($_POST['data']), true);
|
27 |
-
/* @var $widget SiteOrigin_Widget */
|
28 |
-
$instance = $widget->update( $instance, $instance );
|
29 |
-
$instance['is_preview'] = true;
|
30 |
-
|
31 |
-
// The theme stylesheet will change how the button looks
|
32 |
-
wp_enqueue_style( 'theme-css', get_stylesheet_uri(), array(), rand( 0, 65536 ) );
|
33 |
-
wp_enqueue_style( 'so-widget-preview', siteorigin_widgets_url( 'base/css/preview.css' ), array(), rand( 0,65536 ) );
|
34 |
-
|
35 |
-
$sowb = SiteOrigin_Widgets_Bundle::single();
|
36 |
-
$sowb->register_general_scripts();
|
37 |
-
|
38 |
-
do_action( 'siteorigin_widgets_render_preview_' . $widget->id_base, $widget );
|
39 |
-
|
40 |
-
ob_start();
|
41 |
-
$widget->widget( array(
|
42 |
-
'before_widget' => '',
|
43 |
-
'after_widget' => '',
|
44 |
-
'before_title' => '<h3 class="widget-title">',
|
45 |
-
'after_title' => '</h3>',
|
46 |
-
), $instance);
|
47 |
-
$widget_html = ob_get_clean();
|
48 |
-
|
49 |
-
// Print all the scripts and styles
|
50 |
-
?>
|
51 |
-
<html>
|
52 |
-
<head>
|
53 |
-
<title><?php _e('Widget Preview', 'so-widgets-bundle') ?></title>
|
54 |
-
<?php
|
55 |
-
wp_print_scripts();
|
56 |
-
wp_print_styles();
|
57 |
-
?>
|
58 |
-
</head>
|
59 |
-
<body>
|
60 |
-
<?php // A lot of themes use entry-content as their main content wrapper ?>
|
61 |
-
<div class="entry-content">
|
62 |
-
<?php echo $widget_html ?>
|
63 |
-
</div>
|
64 |
-
</body>
|
65 |
-
</html>
|
66 |
-
|
67 |
-
<?php
|
68 |
-
wp_die();
|
69 |
-
}
|
70 |
-
add_action('wp_ajax_so_widgets_preview', 'siteorigin_widget_preview_widget_action');
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Action to handle searching posts
|
74 |
-
*/
|
75 |
-
function siteorigin_widget_action_search_posts() {
|
76 |
-
if ( empty( $_REQUEST['_widgets_nonce'] ) || ! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' ) ) {
|
77 |
-
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
|
78 |
-
}
|
79 |
-
|
80 |
-
// Get all public post types, besides attachments
|
81 |
-
$post_types = (array) get_post_types( array(
|
82 |
-
'public' => true,
|
83 |
-
) );
|
84 |
-
|
85 |
-
if ( ! empty( $_REQUEST['postTypes'] ) ) {
|
86 |
-
$post_types = array_intersect( explode( ',', $_REQUEST['postTypes'] ), $post_types );
|
87 |
-
} else {
|
88 |
-
unset( $post_types['attachment'] );
|
89 |
-
}
|
90 |
-
|
91 |
-
$post_types = apply_filters( 'siteorigin_widgets_search_posts_post_types', $post_types );
|
92 |
-
|
93 |
-
global $wpdb;
|
94 |
-
if( !empty($_GET['query']) ) {
|
95 |
-
$query = "AND post_title LIKE '%" . esc_sql( $_GET['query'] ) . "%'";
|
96 |
-
}
|
97 |
-
else {
|
98 |
-
$query = '';
|
99 |
-
}
|
100 |
-
|
101 |
-
$post_types = "'" . implode("', '", array_map( 'esc_sql', $post_types ) ) . "'";
|
102 |
-
|
103 |
-
$results = $wpdb->get_results( "
|
104 |
-
SELECT ID AS 'value', post_title AS label, post_type AS 'type'
|
105 |
-
FROM {$wpdb->posts}
|
106 |
-
WHERE
|
107 |
-
post_type IN ( {$post_types} ) AND post_status = 'publish' {$query}
|
108 |
-
ORDER BY post_modified DESC
|
109 |
-
LIMIT 20
|
110 |
-
", ARRAY_A );
|
111 |
-
|
112 |
-
wp_send_json( apply_filters( 'siteorigin_widgets_search_posts_results', $results ) );
|
113 |
-
}
|
114 |
-
add_action('wp_ajax_so_widgets_search_posts', 'siteorigin_widget_action_search_posts');
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Action to handle searching taxonomy terms.
|
118 |
-
*/
|
119 |
-
function siteorigin_widget_action_search_terms() {
|
120 |
-
if ( empty( $_REQUEST['_widgets_nonce'] ) || ! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' ) ) {
|
121 |
-
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
|
122 |
-
}
|
123 |
-
|
124 |
-
global $wpdb;
|
125 |
-
$term = ! empty($_GET['term']) ? stripslashes($_GET['term']) : '';
|
126 |
-
$term = trim($term, '%');
|
127 |
-
|
128 |
-
$query = $wpdb->prepare("
|
129 |
-
SELECT terms.term_id, terms.slug AS 'value', terms.name AS 'label', termtaxonomy.taxonomy AS 'type'
|
130 |
-
FROM $wpdb->terms AS terms
|
131 |
-
JOIN $wpdb->term_taxonomy AS termtaxonomy ON terms.term_id = termtaxonomy.term_id
|
132 |
-
WHERE
|
133 |
-
terms.name LIKE '%s'
|
134 |
-
LIMIT 20
|
135 |
-
", '%' . esc_sql( $term ) . '%');
|
136 |
-
|
137 |
-
$results = array();
|
138 |
-
|
139 |
-
foreach ( $wpdb->get_results( $query ) as $result ) {
|
140 |
-
$results[] = array(
|
141 |
-
'value' => $result->type . ':' . $result->value,
|
142 |
-
'label' => $result->label,
|
143 |
-
'type' => $result->type,
|
144 |
-
);
|
145 |
-
}
|
146 |
-
|
147 |
-
wp_send_json( $results );
|
148 |
-
}
|
149 |
-
add_action('wp_ajax_so_widgets_search_terms', 'siteorigin_widget_action_search_terms');
|
150 |
-
|
151 |
-
/**
|
152 |
-
* Action for getting the number of posts returned by a query.
|
153 |
-
*/
|
154 |
-
function siteorigin_widget_get_posts_count_action() {
|
155 |
-
|
156 |
-
if ( empty( $_REQUEST['_widgets_nonce'] ) || ! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' ) ) {
|
157 |
-
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
|
158 |
-
}
|
159 |
-
|
160 |
-
$query = stripslashes( $_POST['query'] );
|
161 |
-
|
162 |
-
wp_send_json( array( 'posts_count' => siteorigin_widget_post_selector_count_posts( $query ) ) );
|
163 |
-
}
|
164 |
-
|
165 |
-
add_action( 'wp_ajax_sow_get_posts_count', 'siteorigin_widget_get_posts_count_action' );
|
166 |
-
|
167 |
-
|
168 |
-
function siteorigin_widget_remote_image_search(){
|
169 |
-
if( empty( $_GET[ '_sononce' ] ) || ! wp_verify_nonce( $_GET[ '_sononce' ], 'so-image' ) ) {
|
170 |
-
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
|
171 |
-
}
|
172 |
-
|
173 |
-
if( empty( $_GET['q'] ) ) {
|
174 |
-
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 400 );
|
175 |
-
}
|
176 |
-
|
177 |
-
// Send the query to stock search server
|
178 |
-
$url = add_query_arg( array(
|
179 |
-
'q' => $_GET[ 'q' ],
|
180 |
-
'page' => !empty( $_GET[ 'page' ] ) ? intval( $_GET[ 'page' ] ) : 1,
|
181 |
-
), 'http://stock.siteorigin.com/wp-admin/admin-ajax.php?action=image_search' );
|
182 |
-
|
183 |
-
$result = wp_remote_get( $url, array(
|
184 |
-
'timeout' => 20,
|
185 |
-
) );
|
186 |
-
|
187 |
-
if( ! is_wp_error( $result ) ) {
|
188 |
-
$result = json_decode( $result['body'], true );
|
189 |
-
if( !empty( $result['items'] ) ) {
|
190 |
-
foreach( $result['items'] as & $r ) {
|
191 |
-
if( !empty( $r['full_url'] ) ) {
|
192 |
-
$r['import_signature'] = md5( $r['full_url'] . '::' . NONCE_SALT );
|
193 |
-
}
|
194 |
-
}
|
195 |
-
}
|
196 |
-
wp_send_json( $result );
|
197 |
-
}
|
198 |
-
else {
|
199 |
-
$result = array(
|
200 |
-
'error' => true,
|
201 |
-
'message' => $result->get_error_message()
|
202 |
-
);
|
203 |
-
wp_send_json_error( $result );
|
204 |
-
}
|
205 |
-
|
206 |
-
}
|
207 |
-
add_action('wp_ajax_so_widgets_image_search', 'siteorigin_widget_remote_image_search');
|
208 |
-
|
209 |
-
function siteorigin_widget_image_import(){
|
210 |
-
if( empty( $_GET[ '_sononce' ] ) || ! wp_verify_nonce( $_GET[ '_sononce' ], 'so-image' ) ) {
|
211 |
-
$result = array(
|
212 |
-
'error' => true,
|
213 |
-
'message' => __( 'Nonce error', 'so-widgets-bundle' ),
|
214 |
-
);
|
215 |
-
}
|
216 |
-
else if(
|
217 |
-
empty( $_GET['import_signature'] ) ||
|
218 |
-
empty( $_GET['full_url'] ) ||
|
219 |
-
md5( $_GET['full_url'] . '::' . NONCE_SALT ) !== $_GET['import_signature']
|
220 |
-
) {
|
221 |
-
$result = array(
|
222 |
-
'error' => true,
|
223 |
-
'message' => __( 'Signature error', 'so-widgets-bundle' ),
|
224 |
-
);
|
225 |
-
}
|
226 |
-
else {
|
227 |
-
// Fetch the image
|
228 |
-
$src = media_sideload_image( $_GET['full_url'], $_GET['post_id'], null, 'src' );
|
229 |
-
if( is_wp_error( $src ) ) {
|
230 |
-
$result = array(
|
231 |
-
'error' => true,
|
232 |
-
'message' => $src->get_error_code(),
|
233 |
-
);
|
234 |
-
}
|
235 |
-
else {
|
236 |
-
global $wpdb;
|
237 |
-
$attachment = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE guid='%s';", $src ) );
|
238 |
-
if( !empty( $attachment ) ) {
|
239 |
-
$thumb_src = wp_get_attachment_image_src( $attachment[0], 'thumbnail' );
|
240 |
-
$result = array(
|
241 |
-
'error' => false,
|
242 |
-
'attachment_id' => $attachment[0],
|
243 |
-
'thumb' => $thumb_src[0]
|
244 |
-
);
|
245 |
-
}
|
246 |
-
else {
|
247 |
-
$result = array(
|
248 |
-
'error' => true,
|
249 |
-
'message' => __( 'Attachment error', 'so-widgets-bundle' ),
|
250 |
-
);
|
251 |
-
}
|
252 |
-
}
|
253 |
-
}
|
254 |
-
|
255 |
-
// Return the result
|
256 |
-
wp_send_json( $result );
|
257 |
-
}
|
258 |
-
add_action('wp_ajax_so_widgets_image_import', 'siteorigin_widget_image_import');
|
259 |
-
|
260 |
-
/**
|
261 |
-
* Action to handle a user dismissing a teaser notice.
|
262 |
-
*/
|
263 |
-
function siteorigin_widgets_dismiss_widget_action(){
|
264 |
-
if( empty( $_GET[ '_wpnonce' ] ) || ! wp_verify_nonce( $_GET[ '_wpnonce' ], 'dismiss-widget-teaser' ) ) {
|
265 |
-
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
|
266 |
-
}
|
267 |
-
if( empty( $_GET[ 'widget' ] ) ) {
|
268 |
-
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 400 );
|
269 |
-
}
|
270 |
-
|
271 |
-
$dismissed = get_user_meta( get_current_user_id(), 'teasers_dismissed', true );
|
272 |
-
if( empty( $dismissed ) ) {
|
273 |
-
$dismissed = array();
|
274 |
-
}
|
275 |
-
|
276 |
-
$dismissed[ $_GET[ 'widget' ] ] = true;
|
277 |
-
|
278 |
-
update_user_meta( get_current_user_id(), 'teasers_dismissed', $dismissed );
|
279 |
-
|
280 |
-
wp_die();
|
281 |
-
}
|
282 |
-
add_action( 'wp_ajax_so_dismiss_widget_teaser', 'siteorigin_widgets_dismiss_widget_action' );
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Action for displaying the widget preview.
|
5 |
+
*/
|
6 |
+
function siteorigin_widget_preview_widget_action() {
|
7 |
+
if (
|
8 |
+
empty( $_REQUEST['_widgets_nonce'] ) ||
|
9 |
+
! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' )
|
10 |
+
) {
|
11 |
+
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
|
12 |
+
} else if ( empty( $_POST['class'] ) ) {
|
13 |
+
wp_die( __( 'Invalid widget.', 'so-widgets-bundle' ), 400 );
|
14 |
+
}
|
15 |
+
|
16 |
+
// Get the widget from the widget factory
|
17 |
+
global $wp_widget_factory;
|
18 |
+
$widget_class = str_replace('\\\\', '\\', $_POST['class']);
|
19 |
+
|
20 |
+
$widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
|
21 |
+
|
22 |
+
if( ! is_a( $widget, 'SiteOrigin_Widget' ) ) {
|
23 |
+
wp_die( __( 'Invalid post.', 'so-widgets-bundle' ), 400 );
|
24 |
+
}
|
25 |
+
|
26 |
+
$instance = json_decode( stripslashes_deep($_POST['data']), true);
|
27 |
+
/* @var $widget SiteOrigin_Widget */
|
28 |
+
$instance = $widget->update( $instance, $instance );
|
29 |
+
$instance['is_preview'] = true;
|
30 |
+
|
31 |
+
// The theme stylesheet will change how the button looks
|
32 |
+
wp_enqueue_style( 'theme-css', get_stylesheet_uri(), array(), rand( 0, 65536 ) );
|
33 |
+
wp_enqueue_style( 'so-widget-preview', siteorigin_widgets_url( 'base/css/preview.css' ), array(), rand( 0,65536 ) );
|
34 |
+
|
35 |
+
$sowb = SiteOrigin_Widgets_Bundle::single();
|
36 |
+
$sowb->register_general_scripts();
|
37 |
+
|
38 |
+
do_action( 'siteorigin_widgets_render_preview_' . $widget->id_base, $widget );
|
39 |
+
|
40 |
+
ob_start();
|
41 |
+
$widget->widget( array(
|
42 |
+
'before_widget' => '',
|
43 |
+
'after_widget' => '',
|
44 |
+
'before_title' => '<h3 class="widget-title">',
|
45 |
+
'after_title' => '</h3>',
|
46 |
+
), $instance);
|
47 |
+
$widget_html = ob_get_clean();
|
48 |
+
|
49 |
+
// Print all the scripts and styles
|
50 |
+
?>
|
51 |
+
<html>
|
52 |
+
<head>
|
53 |
+
<title><?php _e('Widget Preview', 'so-widgets-bundle') ?></title>
|
54 |
+
<?php
|
55 |
+
wp_print_scripts();
|
56 |
+
wp_print_styles();
|
57 |
+
?>
|
58 |
+
</head>
|
59 |
+
<body>
|
60 |
+
<?php // A lot of themes use entry-content as their main content wrapper ?>
|
61 |
+
<div class="entry-content">
|
62 |
+
<?php echo $widget_html ?>
|
63 |
+
</div>
|
64 |
+
</body>
|
65 |
+
</html>
|
66 |
+
|
67 |
+
<?php
|
68 |
+
wp_die();
|
69 |
+
}
|
70 |
+
add_action('wp_ajax_so_widgets_preview', 'siteorigin_widget_preview_widget_action');
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Action to handle searching posts
|
74 |
+
*/
|
75 |
+
function siteorigin_widget_action_search_posts() {
|
76 |
+
if ( empty( $_REQUEST['_widgets_nonce'] ) || ! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' ) ) {
|
77 |
+
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
|
78 |
+
}
|
79 |
+
|
80 |
+
// Get all public post types, besides attachments
|
81 |
+
$post_types = (array) get_post_types( array(
|
82 |
+
'public' => true,
|
83 |
+
) );
|
84 |
+
|
85 |
+
if ( ! empty( $_REQUEST['postTypes'] ) ) {
|
86 |
+
$post_types = array_intersect( explode( ',', $_REQUEST['postTypes'] ), $post_types );
|
87 |
+
} else {
|
88 |
+
unset( $post_types['attachment'] );
|
89 |
+
}
|
90 |
+
|
91 |
+
$post_types = apply_filters( 'siteorigin_widgets_search_posts_post_types', $post_types );
|
92 |
+
|
93 |
+
global $wpdb;
|
94 |
+
if( !empty($_GET['query']) ) {
|
95 |
+
$query = "AND post_title LIKE '%" . esc_sql( $_GET['query'] ) . "%'";
|
96 |
+
}
|
97 |
+
else {
|
98 |
+
$query = '';
|
99 |
+
}
|
100 |
+
|
101 |
+
$post_types = "'" . implode("', '", array_map( 'esc_sql', $post_types ) ) . "'";
|
102 |
+
|
103 |
+
$results = $wpdb->get_results( "
|
104 |
+
SELECT ID AS 'value', post_title AS label, post_type AS 'type'
|
105 |
+
FROM {$wpdb->posts}
|
106 |
+
WHERE
|
107 |
+
post_type IN ( {$post_types} ) AND post_status = 'publish' {$query}
|
108 |
+
ORDER BY post_modified DESC
|
109 |
+
LIMIT 20
|
110 |
+
", ARRAY_A );
|
111 |
+
|
112 |
+
wp_send_json( apply_filters( 'siteorigin_widgets_search_posts_results', $results ) );
|
113 |
+
}
|
114 |
+
add_action('wp_ajax_so_widgets_search_posts', 'siteorigin_widget_action_search_posts');
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Action to handle searching taxonomy terms.
|
118 |
+
*/
|
119 |
+
function siteorigin_widget_action_search_terms() {
|
120 |
+
if ( empty( $_REQUEST['_widgets_nonce'] ) || ! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' ) ) {
|
121 |
+
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
|
122 |
+
}
|
123 |
+
|
124 |
+
global $wpdb;
|
125 |
+
$term = ! empty($_GET['term']) ? stripslashes($_GET['term']) : '';
|
126 |
+
$term = trim($term, '%');
|
127 |
+
|
128 |
+
$query = $wpdb->prepare("
|
129 |
+
SELECT terms.term_id, terms.slug AS 'value', terms.name AS 'label', termtaxonomy.taxonomy AS 'type'
|
130 |
+
FROM $wpdb->terms AS terms
|
131 |
+
JOIN $wpdb->term_taxonomy AS termtaxonomy ON terms.term_id = termtaxonomy.term_id
|
132 |
+
WHERE
|
133 |
+
terms.name LIKE '%s'
|
134 |
+
LIMIT 20
|
135 |
+
", '%' . esc_sql( $term ) . '%');
|
136 |
+
|
137 |
+
$results = array();
|
138 |
+
|
139 |
+
foreach ( $wpdb->get_results( $query ) as $result ) {
|
140 |
+
$results[] = array(
|
141 |
+
'value' => $result->type . ':' . $result->value,
|
142 |
+
'label' => $result->label,
|
143 |
+
'type' => $result->type,
|
144 |
+
);
|
145 |
+
}
|
146 |
+
|
147 |
+
wp_send_json( $results );
|
148 |
+
}
|
149 |
+
add_action('wp_ajax_so_widgets_search_terms', 'siteorigin_widget_action_search_terms');
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Action for getting the number of posts returned by a query.
|
153 |
+
*/
|
154 |
+
function siteorigin_widget_get_posts_count_action() {
|
155 |
+
|
156 |
+
if ( empty( $_REQUEST['_widgets_nonce'] ) || ! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' ) ) {
|
157 |
+
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
|
158 |
+
}
|
159 |
+
|
160 |
+
$query = stripslashes( $_POST['query'] );
|
161 |
+
|
162 |
+
wp_send_json( array( 'posts_count' => siteorigin_widget_post_selector_count_posts( $query ) ) );
|
163 |
+
}
|
164 |
+
|
165 |
+
add_action( 'wp_ajax_sow_get_posts_count', 'siteorigin_widget_get_posts_count_action' );
|
166 |
+
|
167 |
+
|
168 |
+
function siteorigin_widget_remote_image_search(){
|
169 |
+
if( empty( $_GET[ '_sononce' ] ) || ! wp_verify_nonce( $_GET[ '_sononce' ], 'so-image' ) ) {
|
170 |
+
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
|
171 |
+
}
|
172 |
+
|
173 |
+
if( empty( $_GET['q'] ) ) {
|
174 |
+
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 400 );
|
175 |
+
}
|
176 |
+
|
177 |
+
// Send the query to stock search server
|
178 |
+
$url = add_query_arg( array(
|
179 |
+
'q' => $_GET[ 'q' ],
|
180 |
+
'page' => !empty( $_GET[ 'page' ] ) ? intval( $_GET[ 'page' ] ) : 1,
|
181 |
+
), 'http://stock.siteorigin.com/wp-admin/admin-ajax.php?action=image_search' );
|
182 |
+
|
183 |
+
$result = wp_remote_get( $url, array(
|
184 |
+
'timeout' => 20,
|
185 |
+
) );
|
186 |
+
|
187 |
+
if( ! is_wp_error( $result ) ) {
|
188 |
+
$result = json_decode( $result['body'], true );
|
189 |
+
if( !empty( $result['items'] ) ) {
|
190 |
+
foreach( $result['items'] as & $r ) {
|
191 |
+
if( !empty( $r['full_url'] ) ) {
|
192 |
+
$r['import_signature'] = md5( $r['full_url'] . '::' . NONCE_SALT );
|
193 |
+
}
|
194 |
+
}
|
195 |
+
}
|
196 |
+
wp_send_json( $result );
|
197 |
+
}
|
198 |
+
else {
|
199 |
+
$result = array(
|
200 |
+
'error' => true,
|
201 |
+
'message' => $result->get_error_message()
|
202 |
+
);
|
203 |
+
wp_send_json_error( $result );
|
204 |
+
}
|
205 |
+
|
206 |
+
}
|
207 |
+
add_action('wp_ajax_so_widgets_image_search', 'siteorigin_widget_remote_image_search');
|
208 |
+
|
209 |
+
function siteorigin_widget_image_import(){
|
210 |
+
if( empty( $_GET[ '_sononce' ] ) || ! wp_verify_nonce( $_GET[ '_sononce' ], 'so-image' ) ) {
|
211 |
+
$result = array(
|
212 |
+
'error' => true,
|
213 |
+
'message' => __( 'Nonce error', 'so-widgets-bundle' ),
|
214 |
+
);
|
215 |
+
}
|
216 |
+
else if(
|
217 |
+
empty( $_GET['import_signature'] ) ||
|
218 |
+
empty( $_GET['full_url'] ) ||
|
219 |
+
md5( $_GET['full_url'] . '::' . NONCE_SALT ) !== $_GET['import_signature']
|
220 |
+
) {
|
221 |
+
$result = array(
|
222 |
+
'error' => true,
|
223 |
+
'message' => __( 'Signature error', 'so-widgets-bundle' ),
|
224 |
+
);
|
225 |
+
}
|
226 |
+
else {
|
227 |
+
// Fetch the image
|
228 |
+
$src = media_sideload_image( $_GET['full_url'], $_GET['post_id'], null, 'src' );
|
229 |
+
if( is_wp_error( $src ) ) {
|
230 |
+
$result = array(
|
231 |
+
'error' => true,
|
232 |
+
'message' => $src->get_error_code(),
|
233 |
+
);
|
234 |
+
}
|
235 |
+
else {
|
236 |
+
global $wpdb;
|
237 |
+
$attachment = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE guid='%s';", $src ) );
|
238 |
+
if( !empty( $attachment ) ) {
|
239 |
+
$thumb_src = wp_get_attachment_image_src( $attachment[0], 'thumbnail' );
|
240 |
+
$result = array(
|
241 |
+
'error' => false,
|
242 |
+
'attachment_id' => $attachment[0],
|
243 |
+
'thumb' => $thumb_src[0]
|
244 |
+
);
|
245 |
+
}
|
246 |
+
else {
|
247 |
+
$result = array(
|
248 |
+
'error' => true,
|
249 |
+
'message' => __( 'Attachment error', 'so-widgets-bundle' ),
|
250 |
+
);
|
251 |
+
}
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
// Return the result
|
256 |
+
wp_send_json( $result );
|
257 |
+
}
|
258 |
+
add_action('wp_ajax_so_widgets_image_import', 'siteorigin_widget_image_import');
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Action to handle a user dismissing a teaser notice.
|
262 |
+
*/
|
263 |
+
function siteorigin_widgets_dismiss_widget_action(){
|
264 |
+
if( empty( $_GET[ '_wpnonce' ] ) || ! wp_verify_nonce( $_GET[ '_wpnonce' ], 'dismiss-widget-teaser' ) ) {
|
265 |
+
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
|
266 |
+
}
|
267 |
+
if( empty( $_GET[ 'widget' ] ) ) {
|
268 |
+
wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 400 );
|
269 |
+
}
|
270 |
+
|
271 |
+
$dismissed = get_user_meta( get_current_user_id(), 'teasers_dismissed', true );
|
272 |
+
if( empty( $dismissed ) ) {
|
273 |
+
$dismissed = array();
|
274 |
+
}
|
275 |
+
|
276 |
+
$dismissed[ $_GET[ 'widget' ] ] = true;
|
277 |
+
|
278 |
+
update_user_meta( get_current_user_id(), 'teasers_dismissed', $dismissed );
|
279 |
+
|
280 |
+
wp_die();
|
281 |
+
}
|
282 |
+
add_action( 'wp_ajax_so_dismiss_widget_teaser', 'siteorigin_widgets_dismiss_widget_action' );
|
base/inc/fields/builder.class.php
CHANGED
@@ -1,72 +1,72 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* A full instance of SiteOrigin Page Builder as a field.
|
5 |
-
*
|
6 |
-
* Class SiteOrigin_Widget_Field_Builder
|
7 |
-
*/
|
8 |
-
class SiteOrigin_Widget_Field_Builder extends SiteOrigin_Widget_Field_Base {
|
9 |
-
|
10 |
-
protected function render_field( $value, $instance ){
|
11 |
-
if( defined('SITEORIGIN_PANELS_VERSION') ) {
|
12 |
-
// Normal rendering code
|
13 |
-
// In some contexts this is already encoded, e.g. accordion widget using a layout field for content,
|
14 |
-
// inside a PB block in the block editor.
|
15 |
-
$valid_string = is_string( $value ); // Required for PHP <5.4
|
16 |
-
if ( empty( $valid_string ) ) {
|
17 |
-
$value = json_encode( $value );
|
18 |
-
}
|
19 |
-
?>
|
20 |
-
<div
|
21 |
-
class="siteorigin-page-builder-field"
|
22 |
-
data-mode="dialog"
|
23 |
-
data-type="<?php echo isset( $this->field_options['builder_type'] ) ? esc_attr( $this->field_options['builder_type'] ) : 'sow-builder-field' ?>"
|
24 |
-
>
|
25 |
-
<p>
|
26 |
-
<button class="button-secondary siteorigin-panels-display-builder" ><?php _e('Open Builder', 'siteorigin-panels') ?></button>
|
27 |
-
</p>
|
28 |
-
<input
|
29 |
-
type="hidden"
|
30 |
-
class="siteorigin-widget-input panels-data"
|
31 |
-
value="<?php echo sow_esc_attr( $value, ENT_QUOTES, false, true ); ?>"
|
32 |
-
name="<?php echo esc_attr( $this->element_name ) ?>"
|
33 |
-
id="<?php echo esc_attr( $this->element_id ) ?>"
|
34 |
-
/>
|
35 |
-
</div>
|
36 |
-
<?php
|
37 |
-
}
|
38 |
-
else {
|
39 |
-
// Let the user know that they need Page Builder installed
|
40 |
-
?>
|
41 |
-
<p>
|
42 |
-
<?php _e( 'This field requires: ', 'so-widgets-bundle' ) ?>
|
43 |
-
<a href="https://siteorigin.com/page-builder/" target="_blank" rel="noopener noreferrer"><?php _e( 'SiteOrigin Page Builder', 'so-widgets-bundle' ) ?></a>
|
44 |
-
</p>
|
45 |
-
<?php
|
46 |
-
}
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Process the panels_data
|
51 |
-
*
|
52 |
-
* @param mixed $value
|
53 |
-
* @param array $instance
|
54 |
-
*
|
55 |
-
* @return array|mixed|object
|
56 |
-
*/
|
57 |
-
protected function sanitize_field_input( $value, $instance ){
|
58 |
-
if ( empty( $value ) ) {
|
59 |
-
return array();
|
60 |
-
}
|
61 |
-
if ( is_string( $value ) ) {
|
62 |
-
$value = json_decode( $value, true );
|
63 |
-
}
|
64 |
-
|
65 |
-
if( function_exists('siteorigin_panels_process_raw_widgets') && !empty( $value['widgets'] ) && is_array( $value['widgets'] ) ) {
|
66 |
-
$value['widgets'] = siteorigin_panels_process_raw_widgets( $value['widgets'] );
|
67 |
-
}
|
68 |
-
|
69 |
-
return $value;
|
70 |
-
}
|
71 |
-
|
72 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* A full instance of SiteOrigin Page Builder as a field.
|
5 |
+
*
|
6 |
+
* Class SiteOrigin_Widget_Field_Builder
|
7 |
+
*/
|
8 |
+
class SiteOrigin_Widget_Field_Builder extends SiteOrigin_Widget_Field_Base {
|
9 |
+
|
10 |
+
protected function render_field( $value, $instance ){
|
11 |
+
if( defined('SITEORIGIN_PANELS_VERSION') ) {
|
12 |
+
// Normal rendering code
|
13 |
+
// In some contexts this is already encoded, e.g. accordion widget using a layout field for content,
|
14 |
+
// inside a PB block in the block editor.
|
15 |
+
$valid_string = is_string( $value ); // Required for PHP <5.4
|
16 |
+
if ( empty( $valid_string ) ) {
|
17 |
+
$value = json_encode( $value );
|
18 |
+
}
|
19 |
+
?>
|
20 |
+
<div
|
21 |
+
class="siteorigin-page-builder-field"
|
22 |
+
data-mode="dialog"
|
23 |
+
data-type="<?php echo isset( $this->field_options['builder_type'] ) ? esc_attr( $this->field_options['builder_type'] ) : 'sow-builder-field' ?>"
|
24 |
+
>
|
25 |
+
<p>
|
26 |
+
<button class="button-secondary siteorigin-panels-display-builder" ><?php _e('Open Builder', 'siteorigin-panels') ?></button>
|
27 |
+
</p>
|
28 |
+
<input
|
29 |
+
type="hidden"
|
30 |
+
class="siteorigin-widget-input panels-data"
|
31 |
+
value="<?php echo sow_esc_attr( $value, ENT_QUOTES, false, true ); ?>"
|
32 |
+
name="<?php echo esc_attr( $this->element_name ) ?>"
|
33 |
+
id="<?php echo esc_attr( $this->element_id ) ?>"
|
34 |
+
/>
|
35 |
+
</div>
|
36 |
+
<?php
|
37 |
+
}
|
38 |
+
else {
|
39 |
+
// Let the user know that they need Page Builder installed
|
40 |
+
?>
|
41 |
+
<p>
|
42 |
+
<?php _e( 'This field requires: ', 'so-widgets-bundle' ) ?>
|
43 |
+
<a href="https://siteorigin.com/page-builder/" target="_blank" rel="noopener noreferrer"><?php _e( 'SiteOrigin Page Builder', 'so-widgets-bundle' ) ?></a>
|
44 |
+
</p>
|
45 |
+
<?php
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Process the panels_data
|
51 |
+
*
|
52 |
+
* @param mixed $value
|
53 |
+
* @param array $instance
|
54 |
+
*
|
55 |
+
* @return array|mixed|object
|
56 |
+
*/
|
57 |
+
protected function sanitize_field_input( $value, $instance ){
|
58 |
+
if ( empty( $value ) ) {
|
59 |
+
return array();
|
60 |
+
}
|
61 |
+
if ( is_string( $value ) ) {
|
62 |
+
$value = json_decode( $value, true );
|
63 |
+
}
|
64 |
+
|
65 |
+
if( function_exists('siteorigin_panels_process_raw_widgets') && !empty( $value['widgets'] ) && is_array( $value['widgets'] ) ) {
|
66 |
+
$value['widgets'] = siteorigin_panels_process_raw_widgets( $value['widgets'] );
|
67 |
+
}
|
68 |
+
|
69 |
+
return $value;
|
70 |
+
}
|
71 |
+
|
72 |
+
}
|
base/inc/fields/checkbox.class.php
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget_Field_Checkbox
|
5 |
-
*/
|
6 |
-
class SiteOrigin_Widget_Field_Checkbox extends SiteOrigin_Widget_Field_Base {
|
7 |
-
|
8 |
-
protected function render_field( $value, $instance ) {
|
9 |
-
?>
|
10 |
-
<label for="<?php echo esc_attr( $this->element_id ) ?>" class="so-checkbox-label">
|
11 |
-
<input type="checkbox" name="<?php echo esc_attr( $this->element_name ) ?>" id="<?php echo esc_attr( $this->element_id ) ?>"
|
12 |
-
class="siteorigin-widget-input" <?php checked( !empty( $value ) ) ?> />
|
13 |
-
<?php echo esc_html( $this->label ) ?>
|
14 |
-
</label>
|
15 |
-
<?php
|
16 |
-
}
|
17 |
-
|
18 |
-
protected function render_field_label( $value, $instance ) {
|
19 |
-
// Empty override. This field renders it's own label in the render_field() function.
|
20 |
-
}
|
21 |
-
|
22 |
-
protected function sanitize_field_input( $value, $instance ) {
|
23 |
-
return ! empty( $value ) && ! ( is_string( $value ) && $value === 'false' );
|
24 |
-
}
|
25 |
-
|
26 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget_Field_Checkbox
|
5 |
+
*/
|
6 |
+
class SiteOrigin_Widget_Field_Checkbox extends SiteOrigin_Widget_Field_Base {
|
7 |
+
|
8 |
+
protected function render_field( $value, $instance ) {
|
9 |
+
?>
|
10 |
+
<label for="<?php echo esc_attr( $this->element_id ) ?>" class="so-checkbox-label">
|
11 |
+
<input type="checkbox" name="<?php echo esc_attr( $this->element_name ) ?>" id="<?php echo esc_attr( $this->element_id ) ?>"
|
12 |
+
class="siteorigin-widget-input" <?php checked( !empty( $value ) ) ?> />
|
13 |
+
<?php echo esc_html( $this->label ) ?>
|
14 |
+
</label>
|
15 |
+
<?php
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function render_field_label( $value, $instance ) {
|
19 |
+
// Empty override. This field renders it's own label in the render_field() function.
|
20 |
+
}
|
21 |
+
|
22 |
+
protected function sanitize_field_input( $value, $instance ) {
|
23 |
+
return ! empty( $value ) && ! ( is_string( $value ) && $value === 'false' );
|
24 |
+
}
|
25 |
+
|
26 |
+
}
|
base/inc/fields/container-base.class.php
CHANGED
@@ -1,125 +1,125 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
*
|
5 |
-
* The common base class for fields which may contain and render other fields.
|
6 |
-
*
|
7 |
-
* Class SiteOrigin_Widget_Field_Container_Base
|
8 |
-
*/
|
9 |
-
abstract class SiteOrigin_Widget_Field_Container_Base extends SiteOrigin_Widget_Field_Base {
|
10 |
-
/**
|
11 |
-
* The child field options.
|
12 |
-
*
|
13 |
-
* @access protected
|
14 |
-
* @var array
|
15 |
-
*/
|
16 |
-
protected $fields;
|
17 |
-
/**
|
18 |
-
* The child field instances.
|
19 |
-
*
|
20 |
-
* @access protected
|
21 |
-
* @var array
|
22 |
-
*/
|
23 |
-
protected $sub_fields;
|
24 |
-
/**
|
25 |
-
* Whether or not this container's fields should initially be hidden.
|
26 |
-
*
|
27 |
-
* @access protected
|
28 |
-
* @var bool
|
29 |
-
*/
|
30 |
-
protected $hide;
|
31 |
-
/**
|
32 |
-
* The current visibility state of this container.
|
33 |
-
*
|
34 |
-
* @access protected
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
protected $state;
|
38 |
-
/**
|
39 |
-
* Whether or not this container's fields are rendered within a collapsible container.
|
40 |
-
*
|
41 |
-
* @access protected
|
42 |
-
* @var bool
|
43 |
-
*/
|
44 |
-
protected $collapsible = true;
|
45 |
-
|
46 |
-
protected function render_before_field( $value, $instance ) {
|
47 |
-
if( ! empty( $value[ 'so_field_container_state' ] ) ) {
|
48 |
-
$this->state = $value[ 'so_field_container_state' ];
|
49 |
-
}
|
50 |
-
else {
|
51 |
-
$this->state = $this->hide ? 'closed' : 'open';
|
52 |
-
}
|
53 |
-
|
54 |
-
parent::render_before_field( $value, $instance );
|
55 |
-
}
|
56 |
-
|
57 |
-
protected function get_label_classes( $value, $instance ) {
|
58 |
-
$label_classes = parent::get_label_classes( $value, $instance );
|
59 |
-
if( $this->state == 'open' ) $label_classes[] = 'siteorigin-widget-section-visible';
|
60 |
-
return $label_classes;
|
61 |
-
}
|
62 |
-
|
63 |
-
protected function render_field_label( $value, $instance ) {
|
64 |
-
if ($this->collapsible ) {
|
65 |
-
parent::render_field_label( $value, $instance );
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
protected function create_and_render_sub_fields( $values, $parent_container = null, $is_template = false ) {
|
70 |
-
$this->sub_fields = array();
|
71 |
-
if( isset( $parent_container )) {
|
72 |
-
if( ! in_array( $parent_container, $this->parent_container, true ) ){
|
73 |
-
$this->parent_container[] = $parent_container;
|
74 |
-
}
|
75 |
-
}
|
76 |
-
/* @var $field_factory SiteOrigin_Widget_Field_Factory */
|
77 |
-
$field_factory = SiteOrigin_Widget_Field_Factory::single();
|
78 |
-
foreach( $this->fields as $sub_field_name => $sub_field_options ) {
|
79 |
-
/* @var $field SiteOrigin_Widget_Field_Base */
|
80 |
-
$field = $field_factory->create_field(
|
81 |
-
$sub_field_name,
|
82 |
-
$sub_field_options,
|
83 |
-
$this->for_widget,
|
84 |
-
$this->parent_container,
|
85 |
-
$is_template
|
86 |
-
);
|
87 |
-
$sub_value = ( ! empty( $values ) && isset( $values[$sub_field_name] ) ) ? $values[$sub_field_name] : null;
|
88 |
-
$field->render( $sub_value, $values );
|
89 |
-
$field_js_vars = $field->get_javascript_variables();
|
90 |
-
if( ! empty( $field_js_vars ) ) {
|
91 |
-
$this->javascript_variables[$sub_field_name] = $field_js_vars;
|
92 |
-
}
|
93 |
-
$field->enqueue_scripts();
|
94 |
-
$this->sub_fields[$sub_field_name] = $field;
|
95 |
-
}
|
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 ) {
|
105 |
-
|
106 |
-
/* @var $sub_field SiteOrigin_Widget_Field_Base */
|
107 |
-
if( ! empty( $this->sub_fields ) && ! empty( $this->sub_fields[$sub_field_name] ) ) {
|
108 |
-
$sub_field = $this->sub_fields[$sub_field_name];
|
109 |
-
}
|
110 |
-
else {
|
111 |
-
$sub_field = $field_factory->create_field(
|
112 |
-
$this->base_name . '][' . $sub_field_name,
|
113 |
-
$sub_field_options,
|
114 |
-
$this->for_widget,
|
115 |
-
$this->parent_container
|
116 |
-
);
|
117 |
-
}
|
118 |
-
$value[$sub_field_name] = $sub_field->sanitize( isset($value[$sub_field_name]) ? $value[$sub_field_name] : null, $value );
|
119 |
-
$value = $sub_field->sanitize_instance( $value );
|
120 |
-
}
|
121 |
-
|
122 |
-
return $value;
|
123 |
-
}
|
124 |
-
|
125 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
*
|
5 |
+
* The common base class for fields which may contain and render other fields.
|
6 |
+
*
|
7 |
+
* Class SiteOrigin_Widget_Field_Container_Base
|
8 |
+
*/
|
9 |
+
abstract class SiteOrigin_Widget_Field_Container_Base extends SiteOrigin_Widget_Field_Base {
|
10 |
+
/**
|
11 |
+
* The child field options.
|
12 |
+
*
|
13 |
+
* @access protected
|
14 |
+
* @var array
|
15 |
+
*/
|
16 |
+
protected $fields;
|
17 |
+
/**
|
18 |
+
* The child field instances.
|
19 |
+
*
|
20 |
+
* @access protected
|
21 |
+
* @var array
|
22 |
+
*/
|
23 |
+
protected $sub_fields;
|
24 |
+
/**
|
25 |
+
* Whether or not this container's fields should initially be hidden.
|
26 |
+
*
|
27 |
+
* @access protected
|
28 |
+
* @var bool
|
29 |
+
*/
|
30 |
+
protected $hide;
|
31 |
+
/**
|
32 |
+
* The current visibility state of this container.
|
33 |
+
*
|
34 |
+
* @access protected
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
protected $state;
|
38 |
+
/**
|
39 |
+
* Whether or not this container's fields are rendered within a collapsible container.
|
40 |
+
*
|
41 |
+
* @access protected
|
42 |
+
* @var bool
|
43 |
+
*/
|
44 |
+
protected $collapsible = true;
|
45 |
+
|
46 |
+
protected function render_before_field( $value, $instance ) {
|
47 |
+
if( ! empty( $value[ 'so_field_container_state' ] ) ) {
|
48 |
+
$this->state = $value[ 'so_field_container_state' ];
|
49 |
+
}
|
50 |
+
else {
|
51 |
+
$this->state = $this->hide ? 'closed' : 'open';
|
52 |
+
}
|
53 |
+
|
54 |
+
parent::render_before_field( $value, $instance );
|
55 |
+
}
|
56 |
+
|
57 |
+
protected function get_label_classes( $value, $instance ) {
|
58 |
+
$label_classes = parent::get_label_classes( $value, $instance );
|
59 |
+
if( $this->state == 'open' ) $label_classes[] = 'siteorigin-widget-section-visible';
|
60 |
+
return $label_classes;
|
61 |
+
}
|
62 |
+
|
63 |
+
protected function render_field_label( $value, $instance ) {
|
64 |
+
if ($this->collapsible ) {
|
65 |
+
parent::render_field_label( $value, $instance );
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
protected function create_and_render_sub_fields( $values, $parent_container = null, $is_template = false ) {
|
70 |
+
$this->sub_fields = array();
|
71 |
+
if( isset( $parent_container )) {
|
72 |
+
if( ! in_array( $parent_container, $this->parent_container, true ) ){
|
73 |
+
$this->parent_container[] = $parent_container;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
/* @var $field_factory SiteOrigin_Widget_Field_Factory */
|
77 |
+
$field_factory = SiteOrigin_Widget_Field_Factory::single();
|
78 |
+
foreach( $this->fields as $sub_field_name => $sub_field_options ) {
|
79 |
+
/* @var $field SiteOrigin_Widget_Field_Base */
|
80 |
+
$field = $field_factory->create_field(
|
81 |
+
$sub_field_name,
|
82 |
+
$sub_field_options,
|
83 |
+
$this->for_widget,
|
84 |
+
$this->parent_container,
|
85 |
+
$is_template
|
86 |
+
);
|
87 |
+
$sub_value = ( ! empty( $values ) && isset( $values[$sub_field_name] ) ) ? $values[$sub_field_name] : null;
|
88 |
+
$field->render( $sub_value, $values );
|
89 |
+
$field_js_vars = $field->get_javascript_variables();
|
90 |
+
if( ! empty( $field_js_vars ) ) {
|
91 |
+
$this->javascript_variables[$sub_field_name] = $field_js_vars;
|
92 |
+
}
|
93 |
+
$field->enqueue_scripts();
|
94 |
+
$this->sub_fields[$sub_field_name] = $field;
|
95 |
+
}
|
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 ) {
|
105 |
+
|
106 |
+
/* @var $sub_field SiteOrigin_Widget_Field_Base */
|
107 |
+
if( ! empty( $this->sub_fields ) && ! empty( $this->sub_fields[$sub_field_name] ) ) {
|
108 |
+
$sub_field = $this->sub_fields[$sub_field_name];
|
109 |
+
}
|
110 |
+
else {
|
111 |
+
$sub_field = $field_factory->create_field(
|
112 |
+
$this->base_name . '][' . $sub_field_name,
|
113 |
+
$sub_field_options,
|
114 |
+
$this->for_widget,
|
115 |
+
$this->parent_container
|
116 |
+
);
|
117 |
+
}
|
118 |
+
$value[$sub_field_name] = $sub_field->sanitize( isset($value[$sub_field_name]) ? $value[$sub_field_name] : null, $value );
|
119 |
+
$value = $sub_field->sanitize_instance( $value );
|
120 |
+
}
|
121 |
+
|
122 |
+
return $value;
|
123 |
+
}
|
124 |
+
|
125 |
+
}
|
base/inc/fields/date-range.class.php
CHANGED
@@ -1,131 +1,131 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget_Field_Date_Range
|
5 |
-
*/
|
6 |
-
class SiteOrigin_Widget_Field_Date_Range extends SiteOrigin_Widget_Field_Base {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Either 'relative' or 'specific'. Whether to allow relative or specific date selection.
|
10 |
-
*
|
11 |
-
* @access protected
|
12 |
-
* @var array
|
13 |
-
*/
|
14 |
-
protected $date_type;
|
15 |
-
|
16 |
-
protected function render_field( $value, $instance ) {
|
17 |
-
|
18 |
-
if ( $this->date_type == 'specific' ) {
|
19 |
-
$this->render_specific_date_selector();
|
20 |
-
} else {
|
21 |
-
$this->render_relative_date_selector( $value );
|
22 |
-
}
|
23 |
-
?><input type="hidden"
|
24 |
-
class="siteorigin-widget-input"
|
25 |
-
value="<?php echo esc_attr( $value ) ?>"
|
26 |
-
name="<?php echo esc_attr( $this->element_name ) ?>" /><?php
|
27 |
-
}
|
28 |
-
|
29 |
-
private function render_specific_date_selector() {
|
30 |
-
?><div class="sowb-specific-date-after"><span><?php
|
31 |
-
_ex( 'From', 'From this date', 'so-widgets-bundle' );
|
32 |
-
?></span><input type="text" class="datepicker after-picker"/></div><?php
|
33 |
-
?><div class="sowb-specific-date-before"><span><?php
|
34 |
-
_e( 'to', 'so-widgets-bundle' );
|
35 |
-
?></span><input type="text" class="datepicker before-picker"/></div><?php
|
36 |
-
}
|
37 |
-
|
38 |
-
private function render_relative_date_selector( $value ) {
|
39 |
-
$value = json_decode(
|
40 |
-
$value,
|
41 |
-
true
|
42 |
-
);
|
43 |
-
|
44 |
-
$from = ! empty( $value['from'] ) ? $value['from'] : array();
|
45 |
-
$this->render_relative_date_selector_part( 'from', __( 'From', 'so-widgets-bundle' ), $from );
|
46 |
-
|
47 |
-
$to = ! empty( $value['to'] ) ? $value['to'] : array();
|
48 |
-
$this->render_relative_date_selector_part( 'to', __( 'to', 'so-widgets-bundle' ), $to );
|
49 |
-
}
|
50 |
-
|
51 |
-
private function render_relative_date_selector_part( $name, $label, $value ) {
|
52 |
-
$units = $this->get_units();
|
53 |
-
|
54 |
-
$val = ! empty( $value['value'] ) ? $value['value'] : 0;
|
55 |
-
$unit = ! empty( $value['unit'] ) ? $value['unit'] : 'days';
|
56 |
-
|
57 |
-
?><div class="sowb-relative-date" data-name="<?php echo esc_attr( $name ) ?>"><span><?php
|
58 |
-
echo esc_html( $label );
|
59 |
-
?></span><input type="number" min="0" step="1" class="sowb-relative-date-value" value="<?php echo esc_attr( $val ) ?>"/>
|
60 |
-
<select class="sowb-relative-date-unit">
|
61 |
-
<?php foreach( $units as $value => $label) : ?>
|
62 |
-
<option value="<?php echo esc_attr( $value ) ?>" <?php selected( $value, $unit ) ?>><?php echo $label ?></option>
|
63 |
-
<?php endforeach; ?>
|
64 |
-
</select><span><?php _e( 'ago', 'so-widgets-bundle' ); ?></span></div><?php
|
65 |
-
}
|
66 |
-
|
67 |
-
private function get_units() {
|
68 |
-
return array(
|
69 |
-
'days' => __( 'days', 'so-widgets-bundle' ),
|
70 |
-
'weeks' => __( 'weeks', 'so-widgets-bundle' ),
|
71 |
-
'months' => __( 'months', 'so-widgets-bundle' ),
|
72 |
-
'years' => __( 'years', 'so-widgets-bundle' ),
|
73 |
-
);
|
74 |
-
}
|
75 |
-
|
76 |
-
public function enqueue_scripts() {
|
77 |
-
wp_enqueue_style(
|
78 |
-
'so-date-range-field',
|
79 |
-
plugin_dir_url(__FILE__) . 'css/date-range-field.css',
|
80 |
-
array( 'sowb-pikaday' ),
|
81 |
-
SOW_BUNDLE_VERSION
|
82 |
-
);
|
83 |
-
wp_enqueue_script(
|
84 |
-
'so-date-range-field',
|
85 |
-
plugin_dir_url(__FILE__) . 'js/date-range-field' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
86 |
-
array( 'jquery', 'sowb-pikaday' ),
|
87 |
-
SOW_BUNDLE_VERSION
|
88 |
-
);
|
89 |
-
}
|
90 |
-
|
91 |
-
protected function sanitize_field_input( $value, $instance ) {
|
92 |
-
if ( $this->date_type == 'specific' ) {
|
93 |
-
if ( ! empty( $value ) ) {
|
94 |
-
$value = json_decode(
|
95 |
-
$value,
|
96 |
-
true
|
97 |
-
);
|
98 |
-
if ( ! empty( $value['after'] ) ) {
|
99 |
-
$value_after = new DateTime( $value['after'] );
|
100 |
-
$value['after'] = $value_after->format( 'Y-m-d' );
|
101 |
-
}
|
102 |
-
if ( ! empty( $value['before'] ) ) {
|
103 |
-
$value_before = new DateTime( $value['before'] );
|
104 |
-
$value['before'] = $value_before->format( 'Y-m-d' );
|
105 |
-
}
|
106 |
-
} else {
|
107 |
-
$value = array( 'after' => '', 'before' => '' );
|
108 |
-
}
|
109 |
-
} else if ( $this->date_type == 'relative' ) {
|
110 |
-
if ( ! empty( $value ) ) {
|
111 |
-
$value = json_decode(
|
112 |
-
$value,
|
113 |
-
true
|
114 |
-
);
|
115 |
-
$unit_keys = array_keys( $this->get_units() );
|
116 |
-
foreach( array( 'from', 'to' ) as $key ) {
|
117 |
-
if ( empty( $value[$key] ) ) {
|
118 |
-
$value[$key] = array();
|
119 |
-
}
|
120 |
-
$item = $value[$key];
|
121 |
-
$val = empty( $item['value'] ) ? 0 : intval( $item['value'] );
|
122 |
-
$unit = ( ! empty( $item['unit'] ) && in_array( $item['unit'], $unit_keys ) ) ? $item['unit'] : $unit_keys[0];
|
123 |
-
$value[$key] = array( 'value' => $val, 'unit' => $unit );
|
124 |
-
}
|
125 |
-
} else {
|
126 |
-
$value = array( 'from' => array(), 'to' => array() );
|
127 |
-
}
|
128 |
-
}
|
129 |
-
return json_encode( $value );
|
130 |
-
}
|
131 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget_Field_Date_Range
|
5 |
+
*/
|
6 |
+
class SiteOrigin_Widget_Field_Date_Range extends SiteOrigin_Widget_Field_Base {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Either 'relative' or 'specific'. Whether to allow relative or specific date selection.
|
10 |
+
*
|
11 |
+
* @access protected
|
12 |
+
* @var array
|
13 |
+
*/
|
14 |
+
protected $date_type;
|
15 |
+
|
16 |
+
protected function render_field( $value, $instance ) {
|
17 |
+
|
18 |
+
if ( $this->date_type == 'specific' ) {
|
19 |
+
$this->render_specific_date_selector();
|
20 |
+
} else {
|
21 |
+
$this->render_relative_date_selector( $value );
|
22 |
+
}
|
23 |
+
?><input type="hidden"
|
24 |
+
class="siteorigin-widget-input"
|
25 |
+
value="<?php echo esc_attr( $value ) ?>"
|
26 |
+
name="<?php echo esc_attr( $this->element_name ) ?>" /><?php
|
27 |
+
}
|
28 |
+
|
29 |
+
private function render_specific_date_selector() {
|
30 |
+
?><div class="sowb-specific-date-after"><span><?php
|
31 |
+
_ex( 'From', 'From this date', 'so-widgets-bundle' );
|
32 |
+
?></span><input type="text" class="datepicker after-picker"/></div><?php
|
33 |
+
?><div class="sowb-specific-date-before"><span><?php
|
34 |
+
_e( 'to', 'so-widgets-bundle' );
|
35 |
+
?></span><input type="text" class="datepicker before-picker"/></div><?php
|
36 |
+
}
|
37 |
+
|
38 |
+
private function render_relative_date_selector( $value ) {
|
39 |
+
$value = json_decode(
|
40 |
+
$value,
|
41 |
+
true
|
42 |
+
);
|
43 |
+
|
44 |
+
$from = ! empty( $value['from'] ) ? $value['from'] : array();
|
45 |
+
$this->render_relative_date_selector_part( 'from', __( 'From', 'so-widgets-bundle' ), $from );
|
46 |
+
|
47 |
+
$to = ! empty( $value['to'] ) ? $value['to'] : array();
|
48 |
+
$this->render_relative_date_selector_part( 'to', __( 'to', 'so-widgets-bundle' ), $to );
|
49 |
+
}
|
50 |
+
|
51 |
+
private function render_relative_date_selector_part( $name, $label, $value ) {
|
52 |
+
$units = $this->get_units();
|
53 |
+
|
54 |
+
$val = ! empty( $value['value'] ) ? $value['value'] : 0;
|
55 |
+
$unit = ! empty( $value['unit'] ) ? $value['unit'] : 'days';
|
56 |
+
|
57 |
+
?><div class="sowb-relative-date" data-name="<?php echo esc_attr( $name ) ?>"><span><?php
|
58 |
+
echo esc_html( $label );
|
59 |
+
?></span><input type="number" min="0" step="1" class="sowb-relative-date-value" value="<?php echo esc_attr( $val ) ?>"/>
|
60 |
+
<select class="sowb-relative-date-unit">
|
61 |
+
<?php foreach( $units as $value => $label) : ?>
|
62 |
+
<option value="<?php echo esc_attr( $value ) ?>" <?php selected( $value, $unit ) ?>><?php echo $label ?></option>
|
63 |
+
<?php endforeach; ?>
|
64 |
+
</select><span><?php _e( 'ago', 'so-widgets-bundle' ); ?></span></div><?php
|
65 |
+
}
|
66 |
+
|
67 |
+
private function get_units() {
|
68 |
+
return array(
|
69 |
+
'days' => __( 'days', 'so-widgets-bundle' ),
|
70 |
+
'weeks' => __( 'weeks', 'so-widgets-bundle' ),
|
71 |
+
'months' => __( 'months', 'so-widgets-bundle' ),
|
72 |
+
'years' => __( 'years', 'so-widgets-bundle' ),
|
73 |
+
);
|
74 |
+
}
|
75 |
+
|
76 |
+
public function enqueue_scripts() {
|
77 |
+
wp_enqueue_style(
|
78 |
+
'so-date-range-field',
|
79 |
+
plugin_dir_url(__FILE__) . 'css/date-range-field.css',
|
80 |
+
array( 'sowb-pikaday' ),
|
81 |
+
SOW_BUNDLE_VERSION
|
82 |
+
);
|
83 |
+
wp_enqueue_script(
|
84 |
+
'so-date-range-field',
|
85 |
+
plugin_dir_url(__FILE__) . 'js/date-range-field' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
86 |
+
array( 'jquery', 'sowb-pikaday' ),
|
87 |
+
SOW_BUNDLE_VERSION
|
88 |
+
);
|
89 |
+
}
|
90 |
+
|
91 |
+
protected function sanitize_field_input( $value, $instance ) {
|
92 |
+
if ( $this->date_type == 'specific' ) {
|
93 |
+
if ( ! empty( $value ) ) {
|
94 |
+
$value = json_decode(
|
95 |
+
$value,
|
96 |
+
true
|
97 |
+
);
|
98 |
+
if ( ! empty( $value['after'] ) ) {
|
99 |
+
$value_after = new DateTime( $value['after'] );
|
100 |
+
$value['after'] = $value_after->format( 'Y-m-d' );
|
101 |
+
}
|
102 |
+
if ( ! empty( $value['before'] ) ) {
|
103 |
+
$value_before = new DateTime( $value['before'] );
|
104 |
+
$value['before'] = $value_before->format( 'Y-m-d' );
|
105 |
+
}
|
106 |
+
} else {
|
107 |
+
$value = array( 'after' => '', 'before' => '' );
|
108 |
+
}
|
109 |
+
} else if ( $this->date_type == 'relative' ) {
|
110 |
+
if ( ! empty( $value ) ) {
|
111 |
+
$value = json_decode(
|
112 |
+
$value,
|
113 |
+
true
|
114 |
+
);
|
115 |
+
$unit_keys = array_keys( $this->get_units() );
|
116 |
+
foreach( array( 'from', 'to' ) as $key ) {
|
117 |
+
if ( empty( $value[$key] ) ) {
|
118 |
+
$value[$key] = array();
|
119 |
+
}
|
120 |
+
$item = $value[$key];
|
121 |
+
$val = empty( $item['value'] ) ? 0 : intval( $item['value'] );
|
122 |
+
$unit = ( ! empty( $item['unit'] ) && in_array( $item['unit'], $unit_keys ) ) ? $item['unit'] : $unit_keys[0];
|
123 |
+
$value[$key] = array( 'value' => $val, 'unit' => $unit );
|
124 |
+
}
|
125 |
+
} else {
|
126 |
+
$value = array( 'from' => array(), 'to' => array() );
|
127 |
+
}
|
128 |
+
}
|
129 |
+
return json_encode( $value );
|
130 |
+
}
|
131 |
+
}
|
base/inc/fields/font.class.php
CHANGED
@@ -1,46 +1,46 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget_Field_Font
|
5 |
-
*/
|
6 |
-
class SiteOrigin_Widget_Field_Font extends SiteOrigin_Widget_Field_Base {
|
7 |
-
|
8 |
-
protected function render_field( $value, $instance ) {
|
9 |
-
static $widget_font_families;
|
10 |
-
if( empty($widget_font_families) ) {
|
11 |
-
|
12 |
-
$widget_font_families = siteorigin_widgets_font_families();
|
13 |
-
}
|
14 |
-
?>
|
15 |
-
<div class="siteorigin-widget-font-selector siteorigin-widget-field-subcontainer">
|
16 |
-
<select name="<?php echo esc_attr( $this->element_name ) ?>" id="<?php echo esc_attr( $this->element_id ) ?>" class="siteorigin-widget-input">
|
17 |
-
<option value="default" selected="selected"><?php esc_html_e( 'Use theme font', 'so-widgets-bundle' ) ?></option>
|
18 |
-
<?php foreach( $widget_font_families as $key => $val ) : ?>
|
19 |
-
<option value="<?php echo esc_attr( $key ) ?>" <?php selected( $key, $value ) ?>><?php echo esc_html( $val ) ?></option>
|
20 |
-
<?php endforeach; ?>
|
21 |
-
</select>
|
22 |
-
</div>
|
23 |
-
<?php
|
24 |
-
}
|
25 |
-
|
26 |
-
protected function sanitize_field_input( $value, $instance ) {
|
27 |
-
$sanitized_value = trim( $value );
|
28 |
-
// Any alphanumeric character followed by alphanumeric or whitespace characters (except newline),
|
29 |
-
// with optional colon and number.
|
30 |
-
if( preg_match( '/[\w\d]+[\w\d\t\r ]*(:\d+)?/', $sanitized_value, $sanitized_matches ) ) {
|
31 |
-
$sanitized_value = $sanitized_matches[0];
|
32 |
-
}
|
33 |
-
else {
|
34 |
-
$sanitized_value = 'default';
|
35 |
-
}
|
36 |
-
|
37 |
-
static $widget_font_families;
|
38 |
-
if( empty($widget_font_families) ) {
|
39 |
-
$widget_font_families = siteorigin_widgets_font_families();
|
40 |
-
}
|
41 |
-
$keys = array_keys( $widget_font_families );
|
42 |
-
if( ! in_array( $sanitized_value, $keys ) ) $sanitized_value = isset( $this->default ) ? $this->default : 'default';
|
43 |
-
|
44 |
-
return $sanitized_value;
|
45 |
-
}
|
46 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget_Field_Font
|
5 |
+
*/
|
6 |
+
class SiteOrigin_Widget_Field_Font extends SiteOrigin_Widget_Field_Base {
|
7 |
+
|
8 |
+
protected function render_field( $value, $instance ) {
|
9 |
+
static $widget_font_families;
|
10 |
+
if( empty($widget_font_families) ) {
|
11 |
+
|
12 |
+
$widget_font_families = siteorigin_widgets_font_families();
|
13 |
+
}
|
14 |
+
?>
|
15 |
+
<div class="siteorigin-widget-font-selector siteorigin-widget-field-subcontainer">
|
16 |
+
<select name="<?php echo esc_attr( $this->element_name ) ?>" id="<?php echo esc_attr( $this->element_id ) ?>" class="siteorigin-widget-input">
|
17 |
+
<option value="default" selected="selected"><?php esc_html_e( 'Use theme font', 'so-widgets-bundle' ) ?></option>
|
18 |
+
<?php foreach( $widget_font_families as $key => $val ) : ?>
|
19 |
+
<option value="<?php echo esc_attr( $key ) ?>" <?php selected( $key, $value ) ?>><?php echo esc_html( $val ) ?></option>
|
20 |
+
<?php endforeach; ?>
|
21 |
+
</select>
|
22 |
+
</div>
|
23 |
+
<?php
|
24 |
+
}
|
25 |
+
|
26 |
+
protected function sanitize_field_input( $value, $instance ) {
|
27 |
+
$sanitized_value = trim( $value );
|
28 |
+
// Any alphanumeric character followed by alphanumeric or whitespace characters (except newline),
|
29 |
+
// with optional colon and number.
|
30 |
+
if( preg_match( '/[\w\d]+[\w\d\t\r ]*(:\d+)?/', $sanitized_value, $sanitized_matches ) ) {
|
31 |
+
$sanitized_value = $sanitized_matches[0];
|
32 |
+
}
|
33 |
+
else {
|
34 |
+
$sanitized_value = 'default';
|
35 |
+
}
|
36 |
+
|
37 |
+
static $widget_font_families;
|
38 |
+
if( empty($widget_font_families) ) {
|
39 |
+
$widget_font_families = siteorigin_widgets_font_families();
|
40 |
+
}
|
41 |
+
$keys = array_keys( $widget_font_families );
|
42 |
+
if( ! in_array( $sanitized_value, $keys ) ) $sanitized_value = isset( $this->default ) ? $this->default : 'default';
|
43 |
+
|
44 |
+
return $sanitized_value;
|
45 |
+
}
|
46 |
}
|
base/inc/fields/icon.class.php
CHANGED
@@ -1,142 +1,142 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget_Field_Icon
|
5 |
-
*/
|
6 |
-
class SiteOrigin_Widget_Field_Icon extends SiteOrigin_Widget_Field_Base {
|
7 |
-
/**
|
8 |
-
* The number of visible rows in the icons selector.
|
9 |
-
*
|
10 |
-
* @access protected
|
11 |
-
* @var int
|
12 |
-
*
|
13 |
-
*/
|
14 |
-
protected $rows = 3;
|
15 |
-
|
16 |
-
protected $icons_callback;
|
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 |
-
if ( ! empty( $value ) ) {
|
22 |
-
$value_family = $value_parts['family'];
|
23 |
-
$value_style = empty( $value_parts['style'] ) ? '' : ( '-' . $value_parts['style'] );
|
24 |
-
$value = $value_parts['family'] . $value_style . '-' . $value_parts['icon'];
|
25 |
-
|
26 |
-
} else {
|
27 |
-
$value_family = 'fontawesome';
|
28 |
-
}
|
29 |
-
?>
|
30 |
-
|
31 |
-
<div class="siteorigin-widget-icon-selector-current">
|
32 |
-
<div class="siteorigin-widget-icon"><span></span></div>
|
33 |
-
<label><?php _e('Choose Icon', 'so-widgets-bundle') ?></label>
|
34 |
-
</div>
|
35 |
-
|
36 |
-
<a class="so-icon-remove" style="display: <?php echo !empty( $value ) ? 'inline-block' : 'none' ?>;"><?php esc_html_e( 'Remove', 'so-widgets-bundle' ) ?></a>
|
37 |
-
|
38 |
-
<div class="clear"></div>
|
39 |
-
|
40 |
-
<div class="siteorigin-widget-icon-selector siteorigin-widget-field-subcontainer">
|
41 |
-
<select class="siteorigin-widget-icon-family" >
|
42 |
-
<?php foreach( $widget_icon_families as $family_id => $family_info ) : ?>
|
43 |
-
<option value="<?php echo esc_attr( $family_id ) ?>"
|
44 |
-
<?php selected( $value_family, $family_id ) ?>
|
45 |
-
<?php if( !empty( $this->icons_callback ) ) echo 'data-icons="' . esc_attr( json_encode( $family_info ) ) . '"' ?>
|
46 |
-
>
|
47 |
-
<?php echo esc_html( $family_info['name'] ) ?> (<?php echo count( $family_info['icons'] ) ?>)
|
48 |
-
</option>
|
49 |
-
<?php endforeach; ?>
|
50 |
-
</select>
|
51 |
-
|
52 |
-
<?php if ( ! empty( $widget_icon_families[$value_family]['styles'] ) ) :
|
53 |
-
$family_styles = $widget_icon_families[ $value_family ]['styles'];
|
54 |
-
?>
|
55 |
-
<select class="siteorigin-widget-icon-family-styles">
|
56 |
-
<?php foreach ( $family_styles as $family_style => $family_style_name ) : ?>
|
57 |
-
<option value="<?php echo esc_attr( $family_style ) ?>"
|
58 |
-
<?php selected( $value_parts['style'], $family_style ) ?>>
|
59 |
-
<?php esc_html_e( $family_style_name ); ?>
|
60 |
-
</option>
|
61 |
-
<?php endforeach; ?>
|
62 |
-
</select>
|
63 |
-
<?php endif;?>
|
64 |
-
|
65 |
-
<input type="search" class="siteorigin-widget-icon-search" placeholder="<?php esc_attr_e( 'Search Icons' ) ?>" />
|
66 |
-
|
67 |
-
<input type="hidden" name="<?php echo esc_attr( $this->element_name ) ?>" value="<?php echo esc_attr( $value ) ?>"
|
68 |
-
class="siteorigin-widget-icon-icon siteorigin-widget-input" />
|
69 |
-
|
70 |
-
<div class="siteorigin-widget-icon-icons" style="height: <?php echo ( $this->rows * 54 ) - 3 ?>px;"></div>
|
71 |
-
</div>
|
72 |
-
<?php
|
73 |
-
}
|
74 |
-
|
75 |
-
protected function sanitize_field_input( $value, $instance ) {
|
76 |
-
$sanitized_value = $value;
|
77 |
-
// Alphanumeric characters and hyphens.
|
78 |
-
if( preg_match( '/[\w\d]+[\w\d-]*/', $sanitized_value, $sanitized_matches ) ) {
|
79 |
-
$sanitized_value = $sanitized_matches[0];
|
80 |
-
}
|
81 |
-
else {
|
82 |
-
$sanitized_value = '';
|
83 |
-
}
|
84 |
-
|
85 |
-
$value_parts = self::get_value_parts( $sanitized_value );
|
86 |
-
$widget_icon_families = $this->get_widget_icon_families();
|
87 |
-
if( ! ( isset( $widget_icon_families[$value_parts['family']] ) && isset( $widget_icon_families[$value_parts['family']]['icons'][$value_parts['icon']] ) ) ) {
|
88 |
-
$sanitized_value = isset( $this->default ) ? $this->default : '';
|
89 |
-
}
|
90 |
-
|
91 |
-
return $sanitized_value;
|
92 |
-
}
|
93 |
-
|
94 |
-
private function get_widget_icon_families(){
|
95 |
-
if( !empty( $this->icons_callback ) ) {
|
96 |
-
// We'll get the icons from the callback function
|
97 |
-
$widget_icon_families = call_user_func( $this->icons_callback );
|
98 |
-
}
|
99 |
-
else {
|
100 |
-
// We'll get icons from the main filter
|
101 |
-
$widget_icon_families = self::get_icon_families();
|
102 |
-
}
|
103 |
-
|
104 |
-
return $widget_icon_families;
|
105 |
-
}
|
106 |
-
|
107 |
-
static function get_icon_families() {
|
108 |
-
static $widget_icon_families;
|
109 |
-
if( empty( $widget_icon_families ) ) {
|
110 |
-
$widget_icon_families = apply_filters( 'siteorigin_widgets_icon_families', array() );
|
111 |
-
}
|
112 |
-
|
113 |
-
return $widget_icon_families;
|
114 |
-
}
|
115 |
-
|
116 |
-
static function get_value_parts( $value ) {
|
117 |
-
|
118 |
-
list( $value_family, $value_icon ) = ( ! empty( $value ) && strpos( $value, '-' ) !== false ) ? explode( '-', $value, 2 ) : array('', '');
|
119 |
-
|
120 |
-
$matched = preg_match( '/(sow\-fa\w?)\-/', $value_icon, $style_matches );
|
121 |
-
if ( ! empty( $matched ) ) {
|
122 |
-
$value_icon = str_replace( $style_matches[0], '', $value_icon );
|
123 |
-
$value_style = $style_matches[1];
|
124 |
-
}
|
125 |
-
|
126 |
-
// Trigger loading of the icon families and their filters. This isn't ideal, but necessary to ensure possible
|
127 |
-
// migrations are available.
|
128 |
-
self::get_icon_families();
|
129 |
-
|
130 |
-
return apply_filters( 'siteorigin_widgets_icon_migrate_' . $value_family, array(
|
131 |
-
'family' => $value_family,
|
132 |
-
'style' => ! empty( $value_style ) ? $value_style : null,
|
133 |
-
'icon' => $value_icon,
|
134 |
-
) );
|
135 |
-
}
|
136 |
-
|
137 |
-
public function enqueue_scripts(){
|
138 |
-
wp_enqueue_script( 'so-icon-field', plugin_dir_url( __FILE__ ) . 'js/icon-field' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'jquery' ), SOW_BUNDLE_VERSION );
|
139 |
-
wp_enqueue_style( 'so-icon-field', plugin_dir_url( __FILE__ ) . 'css/icon-field.css', array( ), SOW_BUNDLE_VERSION );
|
140 |
-
}
|
141 |
-
|
142 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget_Field_Icon
|
5 |
+
*/
|
6 |
+
class SiteOrigin_Widget_Field_Icon extends SiteOrigin_Widget_Field_Base {
|
7 |
+
/**
|
8 |
+
* The number of visible rows in the icons selector.
|
9 |
+
*
|
10 |
+
* @access protected
|
11 |
+
* @var int
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
protected $rows = 3;
|
15 |
+
|
16 |
+
protected $icons_callback;
|
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 |
+
if ( ! empty( $value ) ) {
|
22 |
+
$value_family = $value_parts['family'];
|
23 |
+
$value_style = empty( $value_parts['style'] ) ? '' : ( '-' . $value_parts['style'] );
|
24 |
+
$value = $value_parts['family'] . $value_style . '-' . $value_parts['icon'];
|
25 |
+
|
26 |
+
} else {
|
27 |
+
$value_family = 'fontawesome';
|
28 |
+
}
|
29 |
+
?>
|
30 |
+
|
31 |
+
<div class="siteorigin-widget-icon-selector-current">
|
32 |
+
<div class="siteorigin-widget-icon"><span></span></div>
|
33 |
+
<label><?php _e('Choose Icon', 'so-widgets-bundle') ?></label>
|
34 |
+
</div>
|
35 |
+
|
36 |
+
<a class="so-icon-remove" style="display: <?php echo !empty( $value ) ? 'inline-block' : 'none' ?>;"><?php esc_html_e( 'Remove', 'so-widgets-bundle' ) ?></a>
|
37 |
+
|
38 |
+
<div class="clear"></div>
|
39 |
+
|
40 |
+
<div class="siteorigin-widget-icon-selector siteorigin-widget-field-subcontainer">
|
41 |
+
<select class="siteorigin-widget-icon-family" >
|
42 |
+
<?php foreach( $widget_icon_families as $family_id => $family_info ) : ?>
|
43 |
+
<option value="<?php echo esc_attr( $family_id ) ?>"
|
44 |
+
<?php selected( $value_family, $family_id ) ?>
|
45 |
+
<?php if( !empty( $this->icons_callback ) ) echo 'data-icons="' . esc_attr( json_encode( $family_info ) ) . '"' ?>
|
46 |
+
>
|
47 |
+
<?php echo esc_html( $family_info['name'] ) ?> (<?php echo count( $family_info['icons'] ) ?>)
|
48 |
+
</option>
|
49 |
+
<?php endforeach; ?>
|
50 |
+
</select>
|
51 |
+
|
52 |
+
<?php if ( ! empty( $widget_icon_families[$value_family]['styles'] ) ) :
|
53 |
+
$family_styles = $widget_icon_families[ $value_family ]['styles'];
|
54 |
+
?>
|
55 |
+
<select class="siteorigin-widget-icon-family-styles">
|
56 |
+
<?php foreach ( $family_styles as $family_style => $family_style_name ) : ?>
|
57 |
+
<option value="<?php echo esc_attr( $family_style ) ?>"
|
58 |
+
<?php selected( $value_parts['style'], $family_style ) ?>>
|
59 |
+
<?php esc_html_e( $family_style_name ); ?>
|
60 |
+
</option>
|
61 |
+
<?php endforeach; ?>
|
62 |
+
</select>
|
63 |
+
<?php endif;?>
|
64 |
+
|
65 |
+
<input type="search" class="siteorigin-widget-icon-search" placeholder="<?php esc_attr_e( 'Search Icons' ) ?>" />
|
66 |
+
|
67 |
+
<input type="hidden" name="<?php echo esc_attr( $this->element_name ) ?>" value="<?php echo esc_attr( $value ) ?>"
|
68 |
+
class="siteorigin-widget-icon-icon siteorigin-widget-input" />
|
69 |
+
|
70 |
+
<div class="siteorigin-widget-icon-icons" style="height: <?php echo ( $this->rows * 54 ) - 3 ?>px;"></div>
|
71 |
+
</div>
|
72 |
+
<?php
|
73 |
+
}
|
74 |
+
|
75 |
+
protected function sanitize_field_input( $value, $instance ) {
|
76 |
+
$sanitized_value = $value;
|
77 |
+
// Alphanumeric characters and hyphens.
|
78 |
+
if( preg_match( '/[\w\d]+[\w\d-]*/', $sanitized_value, $sanitized_matches ) ) {
|
79 |
+
$sanitized_value = $sanitized_matches[0];
|
80 |
+
}
|
81 |
+
else {
|
82 |
+
$sanitized_value = '';
|
83 |
+
}
|
84 |
+
|
85 |
+
$value_parts = self::get_value_parts( $sanitized_value );
|
86 |
+
$widget_icon_families = $this->get_widget_icon_families();
|
87 |
+
if( ! ( isset( $widget_icon_families[$value_parts['family']] ) && isset( $widget_icon_families[$value_parts['family']]['icons'][$value_parts['icon']] ) ) ) {
|
88 |
+
$sanitized_value = isset( $this->default ) ? $this->default : '';
|
89 |
+
}
|
90 |
+
|
91 |
+
return $sanitized_value;
|
92 |
+
}
|
93 |
+
|
94 |
+
private function get_widget_icon_families(){
|
95 |
+
if( !empty( $this->icons_callback ) ) {
|
96 |
+
// We'll get the icons from the callback function
|
97 |
+
$widget_icon_families = call_user_func( $this->icons_callback );
|
98 |
+
}
|
99 |
+
else {
|
100 |
+
// We'll get icons from the main filter
|
101 |
+
$widget_icon_families = self::get_icon_families();
|
102 |
+
}
|
103 |
+
|
104 |
+
return $widget_icon_families;
|
105 |
+
}
|
106 |
+
|
107 |
+
static function get_icon_families() {
|
108 |
+
static $widget_icon_families;
|
109 |
+
if( empty( $widget_icon_families ) ) {
|
110 |
+
$widget_icon_families = apply_filters( 'siteorigin_widgets_icon_families', array() );
|
111 |
+
}
|
112 |
+
|
113 |
+
return $widget_icon_families;
|
114 |
+
}
|
115 |
+
|
116 |
+
static function get_value_parts( $value ) {
|
117 |
+
|
118 |
+
list( $value_family, $value_icon ) = ( ! empty( $value ) && strpos( $value, '-' ) !== false ) ? explode( '-', $value, 2 ) : array('', '');
|
119 |
+
|
120 |
+
$matched = preg_match( '/(sow\-fa\w?)\-/', $value_icon, $style_matches );
|
121 |
+
if ( ! empty( $matched ) ) {
|
122 |
+
$value_icon = str_replace( $style_matches[0], '', $value_icon );
|
123 |
+
$value_style = $style_matches[1];
|
124 |
+
}
|
125 |
+
|
126 |
+
// Trigger loading of the icon families and their filters. This isn't ideal, but necessary to ensure possible
|
127 |
+
// migrations are available.
|
128 |
+
self::get_icon_families();
|
129 |
+
|
130 |
+
return apply_filters( 'siteorigin_widgets_icon_migrate_' . $value_family, array(
|
131 |
+
'family' => $value_family,
|
132 |
+
'style' => ! empty( $value_style ) ? $value_style : null,
|
133 |
+
'icon' => $value_icon,
|
134 |
+
) );
|
135 |
+
}
|
136 |
+
|
137 |
+
public function enqueue_scripts(){
|
138 |
+
wp_enqueue_script( 'so-icon-field', plugin_dir_url( __FILE__ ) . 'js/icon-field' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'jquery' ), SOW_BUNDLE_VERSION );
|
139 |
+
wp_enqueue_style( 'so-icon-field', plugin_dir_url( __FILE__ ) . 'css/icon-field.css', array( ), SOW_BUNDLE_VERSION );
|
140 |
+
}
|
141 |
+
|
142 |
+
}
|
base/inc/fields/image-radio.class.php
CHANGED
@@ -1,75 +1,75 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget_Field_Radio
|
5 |
-
*/
|
6 |
-
class SiteOrigin_Widget_Field_Image_Radio extends SiteOrigin_Widget_Field_Base {
|
7 |
-
/**
|
8 |
-
* The list of options which may be selected.
|
9 |
-
*
|
10 |
-
* @access protected
|
11 |
-
* @var array
|
12 |
-
*/
|
13 |
-
protected $options;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Whether the image options should be laid out vertically (default) or horizontally.
|
17 |
-
*
|
18 |
-
* @access protected
|
19 |
-
* @var string
|
20 |
-
*/
|
21 |
-
protected $layout;
|
22 |
-
|
23 |
-
protected function get_default_options() {
|
24 |
-
return array(
|
25 |
-
'layout' => 'vertical',
|
26 |
-
);
|
27 |
-
}
|
28 |
-
|
29 |
-
protected function render_field( $value, $instance ) {
|
30 |
-
if ( ! isset( $this->options ) || empty( $this->options ) ) return;
|
31 |
-
$i = 0;
|
32 |
-
?>
|
33 |
-
<div class="siteorigin-widget-image-radio-items siteorigin-widget-image-radio-layout-<?php echo esc_attr( $this->layout )?>">
|
34 |
-
<?php
|
35 |
-
foreach( $this->options as $option_name => $option ) {
|
36 |
-
?>
|
37 |
-
<label class="so-image-radio" for="<?php echo esc_attr( $this->element_id . '-' . $i ) ?>">
|
38 |
-
<img src="<?php echo esc_attr( $option['image'] ) ?>"/>
|
39 |
-
<input
|
40 |
-
type="radio" name="<?php echo esc_attr( $this->element_name ) ?>"
|
41 |
-
id="<?php echo esc_attr( $this->element_id . '-' . $i ) ?>" class="siteorigin-widget-input"
|
42 |
-
value="<?php echo esc_attr( $option_name ) ?>"
|
43 |
-
<?php checked( $option_name, $value ) ?>
|
44 |
-
><?php echo esc_html( $option['label'] ) ?>
|
45 |
-
</label>
|
46 |
-
<?php
|
47 |
-
$i += 1;
|
48 |
-
}
|
49 |
-
?></div><?php
|
50 |
-
}
|
51 |
-
|
52 |
-
protected function sanitize_field_input( $value, $instance ) {
|
53 |
-
$sanitized_value = $value;
|
54 |
-
$keys = array_keys( $this->options );
|
55 |
-
if( ! in_array( $sanitized_value, $keys ) ) $sanitized_value = isset( $this->default ) ? $this->default : false;
|
56 |
-
return $sanitized_value;
|
57 |
-
}
|
58 |
-
|
59 |
-
public function enqueue_scripts(){
|
60 |
-
wp_enqueue_style(
|
61 |
-
'so-image-radio-field',
|
62 |
-
plugin_dir_url( __FILE__ ) . 'css/image-radio-field.css',
|
63 |
-
array(),
|
64 |
-
SOW_BUNDLE_VERSION
|
65 |
-
);
|
66 |
-
|
67 |
-
wp_enqueue_script(
|
68 |
-
'so-image-radio-field',
|
69 |
-
plugin_dir_url(__FILE__) . 'js/image-radio-field' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
70 |
-
array( 'jquery'),
|
71 |
-
SOW_BUNDLE_VERSION
|
72 |
-
);
|
73 |
-
}
|
74 |
-
|
75 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget_Field_Radio
|
5 |
+
*/
|
6 |
+
class SiteOrigin_Widget_Field_Image_Radio extends SiteOrigin_Widget_Field_Base {
|
7 |
+
/**
|
8 |
+
* The list of options which may be selected.
|
9 |
+
*
|
10 |
+
* @access protected
|
11 |
+
* @var array
|
12 |
+
*/
|
13 |
+
protected $options;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Whether the image options should be laid out vertically (default) or horizontally.
|
17 |
+
*
|
18 |
+
* @access protected
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
protected $layout;
|
22 |
+
|
23 |
+
protected function get_default_options() {
|
24 |
+
return array(
|
25 |
+
'layout' => 'vertical',
|
26 |
+
);
|
27 |
+
}
|
28 |
+
|
29 |
+
protected function render_field( $value, $instance ) {
|
30 |
+
if ( ! isset( $this->options ) || empty( $this->options ) ) return;
|
31 |
+
$i = 0;
|
32 |
+
?>
|
33 |
+
<div class="siteorigin-widget-image-radio-items siteorigin-widget-image-radio-layout-<?php echo esc_attr( $this->layout )?>">
|
34 |
+
<?php
|
35 |
+
foreach( $this->options as $option_name => $option ) {
|
36 |
+
?>
|
37 |
+
<label class="so-image-radio" for="<?php echo esc_attr( $this->element_id . '-' . $i ) ?>">
|
38 |
+
<img src="<?php echo esc_attr( $option['image'] ) ?>"/>
|
39 |
+
<input
|
40 |
+
type="radio" name="<?php echo esc_attr( $this->element_name ) ?>"
|
41 |
+
id="<?php echo esc_attr( $this->element_id . '-' . $i ) ?>" class="siteorigin-widget-input"
|
42 |
+
value="<?php echo esc_attr( $option_name ) ?>"
|
43 |
+
<?php checked( $option_name, $value ) ?>
|
44 |
+
><?php echo esc_html( $option['label'] ) ?>
|
45 |
+
</label>
|
46 |
+
<?php
|
47 |
+
$i += 1;
|
48 |
+
}
|
49 |
+
?></div><?php
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function sanitize_field_input( $value, $instance ) {
|
53 |
+
$sanitized_value = $value;
|
54 |
+
$keys = array_keys( $this->options );
|
55 |
+
if( ! in_array( $sanitized_value, $keys ) ) $sanitized_value = isset( $this->default ) ? $this->default : false;
|
56 |
+
return $sanitized_value;
|
57 |
+
}
|
58 |
+
|
59 |
+
public function enqueue_scripts(){
|
60 |
+
wp_enqueue_style(
|
61 |
+
'so-image-radio-field',
|
62 |
+
plugin_dir_url( __FILE__ ) . 'css/image-radio-field.css',
|
63 |
+
array(),
|
64 |
+
SOW_BUNDLE_VERSION
|
65 |
+
);
|
66 |
+
|
67 |
+
wp_enqueue_script(
|
68 |
+
'so-image-radio-field',
|
69 |
+
plugin_dir_url(__FILE__) . 'js/image-radio-field' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
70 |
+
array( 'jquery'),
|
71 |
+
SOW_BUNDLE_VERSION
|
72 |
+
);
|
73 |
+
}
|
74 |
+
|
75 |
+
}
|
base/inc/fields/js/date-range-field.js
CHANGED
@@ -1,110 +1,110 @@
|
|
1 |
-
/* global jQuery, pikaday */
|
2 |
-
|
3 |
-
(function( $ ) {
|
4 |
-
$( document ).on( 'sowsetupformfield', '.siteorigin-widget-field-type-date-range', function ( e ) {
|
5 |
-
var $dateRangeField = $( this );
|
6 |
-
var valField = $dateRangeField.find( 'input[type="hidden"][class="siteorigin-widget-input"]' );
|
7 |
-
|
8 |
-
if ( $dateRangeField.data( 'initialized' ) ) {
|
9 |
-
return;
|
10 |
-
}
|
11 |
-
|
12 |
-
if ( $dateRangeField.find( '[class*="sowb-specific-date"]' ).length > 0 ) {
|
13 |
-
var createPikadayInput = function ( inputName, initVal ) {
|
14 |
-
var $field = $dateRangeField.find( '.' + inputName + '-picker' );
|
15 |
-
var dateToString = function ( date, format ) {
|
16 |
-
var dateString = '';
|
17 |
-
if ( ! isNaN( date.valueOf() ) ) {
|
18 |
-
var day = date.getDate();
|
19 |
-
day = day < 10 ? '0' + day.toString() : day.toString();
|
20 |
-
var month = date.getMonth() + 1;
|
21 |
-
month = month < 10 ? '0' + month.toString() : month.toString();
|
22 |
-
var year = date.getFullYear();
|
23 |
-
return year + '-' + month + '-' + day;
|
24 |
-
}
|
25 |
-
|
26 |
-
return dateString;
|
27 |
-
};
|
28 |
-
var parse = function ( dateString, format ) {
|
29 |
-
var parts = dateString.split( '-' );
|
30 |
-
var day = parseInt( parts[ 2 ] );
|
31 |
-
var month = parseInt( parts[ 1 ] ) - 1;
|
32 |
-
var year = parseInt( parts[ 0 ] );
|
33 |
-
return new Date( year, month, day );
|
34 |
-
};
|
35 |
-
var updateValField = function ( date ) {
|
36 |
-
var curVal = valField.val() === '' ? {} : JSON.parse( valField.val() );
|
37 |
-
curVal[ inputName ] = dateToString( date );
|
38 |
-
$field.val( curVal[ inputName ] );
|
39 |
-
valField.val( JSON.stringify( curVal ) );
|
40 |
-
valField.trigger( 'change', { silent: true } );
|
41 |
-
};
|
42 |
-
var picker = new Pikaday( {
|
43 |
-
field: $field[ 0 ],
|
44 |
-
blurFieldOnSelect: false,
|
45 |
-
toString: dateToString,
|
46 |
-
parse: parse,
|
47 |
-
onSelect: updateValField,
|
48 |
-
} );
|
49 |
-
|
50 |
-
$field.change( function ( event ) {
|
51 |
-
var dateVal = parse( $field.val() );
|
52 |
-
updateValField( dateVal );
|
53 |
-
|
54 |
-
// We trigger the change event on the hidden value field, so prevent 'change' from individual date inputs.
|
55 |
-
event.preventDefault();
|
56 |
-
return false;
|
57 |
-
} );
|
58 |
-
|
59 |
-
if ( initVal ) {
|
60 |
-
$field.val( initVal );
|
61 |
-
}
|
62 |
-
return picker;
|
63 |
-
}.bind( this );
|
64 |
-
|
65 |
-
var initRange = valField.val() === '' ? { after: '', before: '' } : JSON.parse( valField.val() );
|
66 |
-
var afterPicker = createPikadayInput( 'after', initRange.after );
|
67 |
-
var beforePicker = createPikadayInput( 'before', initRange.before );
|
68 |
-
|
69 |
-
valField.change( function ( event, data ) {
|
70 |
-
if ( ! ( data && data.silent ) ) {
|
71 |
-
var newRange = valField.val() === '' ? { after: '', before: '' } : JSON.parse( valField.val() );
|
72 |
-
afterPicker.setDate( newRange.after );
|
73 |
-
beforePicker.setDate( newRange.before );
|
74 |
-
}
|
75 |
-
} );
|
76 |
-
} else if ( $dateRangeField.find( '.sowb-relative-date' ).length > 0 ) {
|
77 |
-
|
78 |
-
$dateRangeField.find( '.sowb-relative-date' ).each( function () {
|
79 |
-
var $name = $( this ).data( 'name' );
|
80 |
-
|
81 |
-
$( this ).change( function () {
|
82 |
-
var range = valField.val() === '' ? {} : JSON.parse( valField.val() );
|
83 |
-
|
84 |
-
if ( ! range.hasOwnProperty( $name ) ) {
|
85 |
-
range[ $name ] = {};
|
86 |
-
}
|
87 |
-
|
88 |
-
range[ $name ][ 'value' ] = $( this ).find( '> input' ).val();
|
89 |
-
range[ $name ][ 'unit' ] = $( this ).find( '> select' ).val();
|
90 |
-
|
91 |
-
valField.val( JSON.stringify( range ) );
|
92 |
-
valField.trigger( 'change', { silent: true } );
|
93 |
-
}.bind( this ) );
|
94 |
-
|
95 |
-
valField.change( function ( event, data ) {
|
96 |
-
if ( ! ( data && data.silent ) ) {
|
97 |
-
var range = valField.val() === '' ? { from: {}, to: {} } : JSON.parse( valField.val() );
|
98 |
-
|
99 |
-
if ( range.hasOwnProperty( $name ) ) {
|
100 |
-
$( this ).find( '> input' ).val( range[ $name ][ 'value' ] );
|
101 |
-
$( this ).find( '> select' ).val( range[ $name ][ 'unit' ] );
|
102 |
-
}
|
103 |
-
}
|
104 |
-
}.bind( this ) );
|
105 |
-
|
106 |
-
} );
|
107 |
-
}
|
108 |
-
$dateRangeField.data( 'initialized', true );
|
109 |
-
} );
|
110 |
-
})( jQuery );
|
1 |
+
/* global jQuery, pikaday */
|
2 |
+
|
3 |
+
(function( $ ) {
|
4 |
+
$( document ).on( 'sowsetupformfield', '.siteorigin-widget-field-type-date-range', function ( e ) {
|
5 |
+
var $dateRangeField = $( this );
|
6 |
+
var valField = $dateRangeField.find( 'input[type="hidden"][class="siteorigin-widget-input"]' );
|
7 |
+
|
8 |
+
if ( $dateRangeField.data( 'initialized' ) ) {
|
9 |
+
return;
|
10 |
+
}
|
11 |
+
|
12 |
+
if ( $dateRangeField.find( '[class*="sowb-specific-date"]' ).length > 0 ) {
|
13 |
+
var createPikadayInput = function ( inputName, initVal ) {
|
14 |
+
var $field = $dateRangeField.find( '.' + inputName + '-picker' );
|
15 |
+
var dateToString = function ( date, format ) {
|
16 |
+
var dateString = '';
|
17 |
+
if ( ! isNaN( date.valueOf() ) ) {
|
18 |
+
var day = date.getDate();
|
19 |
+
day = day < 10 ? '0' + day.toString() : day.toString();
|
20 |
+
var month = date.getMonth() + 1;
|
21 |
+
month = month < 10 ? '0' + month.toString() : month.toString();
|
22 |
+
var year = date.getFullYear();
|
23 |
+
return year + '-' + month + '-' + day;
|
24 |
+
}
|
25 |
+
|
26 |
+
return dateString;
|
27 |
+
};
|
28 |
+
var parse = function ( dateString, format ) {
|
29 |
+
var parts = dateString.split( '-' );
|
30 |
+
var day = parseInt( parts[ 2 ] );
|
31 |
+
var month = parseInt( parts[ 1 ] ) - 1;
|
32 |
+
var year = parseInt( parts[ 0 ] );
|
33 |
+
return new Date( year, month, day );
|
34 |
+
};
|
35 |
+
var updateValField = function ( date ) {
|
36 |
+
var curVal = valField.val() === '' ? {} : JSON.parse( valField.val() );
|
37 |
+
curVal[ inputName ] = dateToString( date );
|
38 |
+
$field.val( curVal[ inputName ] );
|
39 |
+
valField.val( JSON.stringify( curVal ) );
|
40 |
+
valField.trigger( 'change', { silent: true } );
|
41 |
+
};
|
42 |
+
var picker = new Pikaday( {
|
43 |
+
field: $field[ 0 ],
|
44 |
+
blurFieldOnSelect: false,
|
45 |
+
toString: dateToString,
|
46 |
+
parse: parse,
|
47 |
+
onSelect: updateValField,
|
48 |
+
} );
|
49 |
+
|
50 |
+
$field.change( function ( event ) {
|
51 |
+
var dateVal = parse( $field.val() );
|
52 |
+
updateValField( dateVal );
|
53 |
+
|
54 |
+
// We trigger the change event on the hidden value field, so prevent 'change' from individual date inputs.
|
55 |
+
event.preventDefault();
|
56 |
+
return false;
|
57 |
+
} );
|
58 |
+
|
59 |
+
if ( initVal ) {
|
60 |
+
$field.val( initVal );
|
61 |
+
}
|
62 |
+
return picker;
|
63 |
+
}.bind( this );
|
64 |
+
|
65 |
+
var initRange = valField.val() === '' ? { after: '', before: '' } : JSON.parse( valField.val() );
|
66 |
+
var afterPicker = createPikadayInput( 'after', initRange.after );
|
67 |
+
var beforePicker = createPikadayInput( 'before', initRange.before );
|
68 |
+
|
69 |
+
valField.change( function ( event, data ) {
|
70 |
+
if ( ! ( data && data.silent ) ) {
|
71 |
+
var newRange = valField.val() === '' ? { after: '', before: '' } : JSON.parse( valField.val() );
|
72 |
+
afterPicker.setDate( newRange.after );
|
73 |
+
beforePicker.setDate( newRange.before );
|
74 |
+
}
|
75 |
+
} );
|
76 |
+
} else if ( $dateRangeField.find( '.sowb-relative-date' ).length > 0 ) {
|
77 |
+
|
78 |
+
$dateRangeField.find( '.sowb-relative-date' ).each( function () {
|
79 |
+
var $name = $( this ).data( 'name' );
|
80 |
+
|
81 |
+
$( this ).change( function () {
|
82 |
+
var range = valField.val() === '' ? {} : JSON.parse( valField.val() );
|
83 |
+
|
84 |
+
if ( ! range.hasOwnProperty( $name ) ) {
|
85 |
+
range[ $name ] = {};
|
86 |
+
}
|
87 |
+
|
88 |
+
range[ $name ][ 'value' ] = $( this ).find( '> input' ).val();
|
89 |
+
range[ $name ][ 'unit' ] = $( this ).find( '> select' ).val();
|
90 |
+
|
91 |
+
valField.val( JSON.stringify( range ) );
|
92 |
+
valField.trigger( 'change', { silent: true } );
|
93 |
+
}.bind( this ) );
|
94 |
+
|
95 |
+
valField.change( function ( event, data ) {
|
96 |
+
if ( ! ( data && data.silent ) ) {
|
97 |
+
var range = valField.val() === '' ? { from: {}, to: {} } : JSON.parse( valField.val() );
|
98 |
+
|
99 |
+
if ( range.hasOwnProperty( $name ) ) {
|
100 |
+
$( this ).find( '> input' ).val( range[ $name ][ 'value' ] );
|
101 |
+
$( this ).find( '> select' ).val( range[ $name ][ 'unit' ] );
|
102 |
+
}
|
103 |
+
}
|
104 |
+
}.bind( this ) );
|
105 |
+
|
106 |
+
} );
|
107 |
+
}
|
108 |
+
$dateRangeField.data( 'initialized', true );
|
109 |
+
} );
|
110 |
+
})( jQuery );
|
base/inc/fields/js/icon-field.js
CHANGED
@@ -1,229 +1,229 @@
|
|
1 |
-
/* global jQuery, soWidgets */
|
2 |
-
|
3 |
-
( function( $ ) {
|
4 |
-
|
5 |
-
var iconWidgetCache = {};
|
6 |
-
|
7 |
-
$(document).on( 'sowsetupformfield', '.siteorigin-widget-field-type-icon', function(e) {
|
8 |
-
var $$ = $(this),
|
9 |
-
$is = $$.find('.siteorigin-widget-icon-selector'),
|
10 |
-
$v = $is.find('.siteorigin-widget-icon-icon'),
|
11 |
-
$b = $$.find('.siteorigin-widget-icon-selector-current'),
|
12 |
-
$remove = $$.find( '.so-icon-remove' ),
|
13 |
-
$search = $$.find( '.siteorigin-widget-icon-search' );
|
14 |
-
|
15 |
-
if ( $$.data( 'initialized' ) ) {
|
16 |
-
return;
|
17 |
-
}
|
18 |
-
|
19 |
-
// Clicking on the button should display the icon selector
|
20 |
-
$b.click( function(){
|
21 |
-
$is.slideToggle();
|
22 |
-
$search.val( '' );
|
23 |
-
searchIcons();
|
24 |
-
} );
|
25 |
-
|
26 |
-
// Clicking on the remove button
|
27 |
-
$remove.click( function( e ){
|
28 |
-
e.preventDefault();
|
29 |
-
|
30 |
-
// Trigger a click on the existing icon to remove it.
|
31 |
-
$$.find('.siteorigin-widget-active').click();
|
32 |
-
} );
|
33 |
-
|
34 |
-
var searchIcons = function(){
|
35 |
-
var q = $search.val().toLowerCase();
|
36 |
-
if( q === '' ) {
|
37 |
-
$is.find('.siteorigin-widget-icon-icons-icon').show();
|
38 |
-
}
|
39 |
-
else {
|
40 |
-
$is.find('.siteorigin-widget-icon-icons-icon').each( function(){
|
41 |
-
var $$ = $( this ),
|
42 |
-
value = $$.attr( 'data-value' );
|
43 |
-
|
44 |
-
value = value.replace( /-/, ' ' );
|
45 |
-
if( value.indexOf( q ) === -1 ) {
|
46 |
-
$$.hide();
|
47 |
-
}
|
48 |
-
else {
|
49 |
-
$$.show();
|
50 |
-
}
|
51 |
-
} );
|
52 |
-
}
|
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 |
-
|
105 |
-
$("<link rel='stylesheet' type='text/css'>")
|
106 |
-
.attr('id', 'siteorigin-widget-font-' + family)
|
107 |
-
.attr('href', iconWidgetCache[family].style_uri)
|
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);
|
125 |
-
|
126 |
-
if( $$.hasClass('siteorigin-widget-active') ) {
|
127 |
-
// This is being unselected
|
128 |
-
$$.removeClass('siteorigin-widget-active');
|
129 |
-
$v.val( '' );
|
130 |
-
|
131 |
-
// Hide the button icon
|
132 |
-
$b.find('span').hide();
|
133 |
-
|
134 |
-
$remove.hide();
|
135 |
-
}
|
136 |
-
else {
|
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 |
-
}
|
151 |
-
|
152 |
-
$v.trigger( 'change', { isRendering: true });
|
153 |
-
|
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 |
-
|
171 |
-
// Move a selected item to the first position
|
172 |
-
container.prepend( container.find('.siteorigin-widget-active') );
|
173 |
-
|
174 |
-
searchIcons();
|
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 |
-
|
182 |
-
var dataIcons = $is.find('select.siteorigin-widget-icon-family option:selected' ).data('icons');
|
183 |
-
if( dataIcons !== null ) {
|
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 |
-
{
|
198 |
-
'action' : 'siteorigin_widgets_get_icons',
|
199 |
-
'family' : $is.find('select.siteorigin-widget-icon-family').val()
|
200 |
-
},
|
201 |
-
function(data) {
|
202 |
-
iconWidgetCache[family] = data;
|
203 |
-
renderStylesSelect( init );
|
204 |
-
$container.removeClass( 'loading' );
|
205 |
-
rerenderIcons();
|
206 |
-
}
|
207 |
-
);
|
208 |
-
}
|
209 |
-
else {
|
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();
|
217 |
-
changeIconFamily();
|
218 |
-
});
|
219 |
-
|
220 |
-
$v.change( function ( event, data ) {
|
221 |
-
if ( ! ( data && data.isRendering ) ) {
|
222 |
-
rerenderIcons();
|
223 |
-
}
|
224 |
-
} );
|
225 |
-
|
226 |
-
$$.data( 'initialized', true );
|
227 |
-
} );
|
228 |
-
|
229 |
-
} )( jQuery );
|
1 |
+
/* global jQuery, soWidgets */
|
2 |
+
|
3 |
+
( function( $ ) {
|
4 |
+
|
5 |
+
var iconWidgetCache = {};
|
6 |
+
|
7 |
+
$(document).on( 'sowsetupformfield', '.siteorigin-widget-field-type-icon', function(e) {
|
8 |
+
var $$ = $(this),
|
9 |
+
$is = $$.find('.siteorigin-widget-icon-selector'),
|
10 |
+
$v = $is.find('.siteorigin-widget-icon-icon'),
|
11 |
+
$b = $$.find('.siteorigin-widget-icon-selector-current'),
|
12 |
+
$remove = $$.find( '.so-icon-remove' ),
|
13 |
+
$search = $$.find( '.siteorigin-widget-icon-search' );
|
14 |
+
|
15 |
+
if ( $$.data( 'initialized' ) ) {
|
16 |
+
return;
|
17 |
+
}
|
18 |
+
|
19 |
+
// Clicking on the button should display the icon selector
|
20 |
+
$b.click( function(){
|
21 |
+
$is.slideToggle();
|
22 |
+
$search.val( '' );
|
23 |
+
searchIcons();
|
24 |
+
} );
|
25 |
+
|
26 |
+
// Clicking on the remove button
|
27 |
+
$remove.click( function( e ){
|
28 |
+
e.preventDefault();
|
29 |
+
|
30 |
+
// Trigger a click on the existing icon to remove it.
|
31 |
+
$$.find('.siteorigin-widget-active').click();
|
32 |
+
} );
|
33 |
+
|
34 |
+
var searchIcons = function(){
|
35 |
+
var q = $search.val().toLowerCase();
|
36 |
+
if( q === '' ) {
|
37 |
+
$is.find('.siteorigin-widget-icon-icons-icon').show();
|
38 |
+
}
|
39 |
+
else {
|
40 |
+
$is.find('.siteorigin-widget-icon-icons-icon').each( function(){
|
41 |
+
var $$ = $( this ),
|
42 |
+
value = $$.attr( 'data-value' );
|
43 |
+
|
44 |
+
value = value.replace( /-/, ' ' );
|
45 |
+
if( value.indexOf( q ) === -1 ) {
|
46 |
+
$$.hide();
|
47 |
+
}
|
48 |
+
else {
|
49 |
+
$$.show();
|
50 |
+
}
|
51 |
+
} );
|
52 |
+
}
|
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 |
+
|
105 |
+
$("<link rel='stylesheet' type='text/css'>")
|
106 |
+
.attr('id', 'siteorigin-widget-font-' + family)
|
107 |
+
.attr('href', iconWidgetCache[family].style_uri)
|
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);
|
125 |
+
|
126 |
+
if( $$.hasClass('siteorigin-widget-active') ) {
|
127 |
+
// This is being unselected
|
128 |
+
$$.removeClass('siteorigin-widget-active');
|
129 |
+
$v.val( '' );
|
130 |
+
|
131 |
+
// Hide the button icon
|
132 |
+
$b.find('span').hide();
|
133 |
+
|
134 |
+
$remove.hide();
|
135 |
+
}
|
136 |
+
else {
|
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 |
+
}
|
151 |
+
|
152 |
+
$v.trigger( 'change', { isRendering: true });
|
153 |
+
|
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 |
+
|
171 |
+
// Move a selected item to the first position
|
172 |
+
container.prepend( container.find('.siteorigin-widget-active') );
|
173 |
+
|
174 |
+
searchIcons();
|
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 |
+
|
182 |
+
var dataIcons = $is.find('select.siteorigin-widget-icon-family option:selected' ).data('icons');
|
183 |
+
if( dataIcons !== null ) {
|
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 |
+
{
|
198 |
+
'action' : 'siteorigin_widgets_get_icons',
|
199 |
+
'family' : $is.find('select.siteorigin-widget-icon-family').val()
|
200 |
+
},
|
201 |
+
function(data) {
|
202 |
+
iconWidgetCache[family] = data;
|
203 |
+
renderStylesSelect( init );
|
204 |
+
$container.removeClass( 'loading' );
|
205 |
+
rerenderIcons();
|
206 |
+
}
|
207 |
+
);
|
208 |
+
}
|
209 |
+
else {
|
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();
|
217 |
+
changeIconFamily();
|
218 |
+
});
|
219 |
+
|
220 |
+
$v.change( function ( event, data ) {
|
221 |
+
if ( ! ( data && data.isRendering ) ) {
|
222 |
+
rerenderIcons();
|
223 |
+
}
|
224 |
+
} );
|
225 |
+
|
226 |
+
$$.data( 'initialized', true );
|
227 |
+
} );
|
228 |
+
|
229 |
+
} )( jQuery );
|
base/inc/fields/js/image-radio-field.js
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
-
/* global jQuery, soWidgets */
|
2 |
-
|
3 |
-
( function($){
|
4 |
-
|
5 |
-
$(document).on( 'sowsetupform', function(e) {
|
6 |
-
var $form = $(e.target);
|
7 |
-
|
8 |
-
$form.find( '.siteorigin-widget-field-type-image-radio' ).each( function(){
|
9 |
-
var $$ = $( this );
|
10 |
-
$$.find('input[type="radio"]:checked').parent().addClass('so-selected');
|
11 |
-
$$.find('input[type="radio"]').on('change', function(){
|
12 |
-
$$.find('input[type="radio"]').parent().removeClass('so-selected');
|
13 |
-
$$.find('input[type="radio"]:checked').parent().addClass('so-selected');
|
14 |
-
});
|
15 |
-
} );
|
16 |
-
});
|
17 |
-
|
18 |
-
}( jQuery ) );
|
1 |
+
/* global jQuery, soWidgets */
|
2 |
+
|
3 |
+
( function($){
|
4 |
+
|
5 |
+
$(document).on( 'sowsetupform', function(e) {
|
6 |
+
var $form = $(e.target);
|
7 |
+
|
8 |
+
$form.find( '.siteorigin-widget-field-type-image-radio' ).each( function(){
|
9 |
+
var $$ = $( this );
|
10 |
+
$$.find('input[type="radio"]:checked').parent().addClass('so-selected');
|
11 |
+
$$.find('input[type="radio"]').on('change', function(){
|
12 |
+
$$.find('input[type="radio"]').parent().removeClass('so-selected');
|
13 |
+
$$.find('input[type="radio"]:checked').parent().addClass('so-selected');
|
14 |
+
});
|
15 |
+
} );
|
16 |
+
});
|
17 |
+
|
18 |
+
}( jQuery ) );
|
base/inc/fields/js/media-field.js
CHANGED
@@ -1,409 +1,409 @@
|
|
1 |
-
/* global jQuery, soWidgets */
|
2 |
-
|
3 |
-
( function( $ ) {
|
4 |
-
|
5 |
-
$(document).on( 'sowsetupformfield', '.siteorigin-widget-field-type-media', function(e) {
|
6 |
-
var $field = $( this );
|
7 |
-
var $media = $field.find('> .media-field-wrapper');
|
8 |
-
var $inputField = $field.find( '.siteorigin-widget-input' ).not('.media-fallback-external');
|
9 |
-
|
10 |
-
if ( $media.data( 'initialized' ) ) {
|
11 |
-
return;
|
12 |
-
}
|
13 |
-
|
14 |
-
// Handle the media uploader
|
15 |
-
$media.find( '.media-upload-button' ).click(function(e){
|
16 |
-
e.preventDefault();
|
17 |
-
if( typeof wp.media === 'undefined' ) {
|
18 |
-
return;
|
19 |
-
}
|
20 |
-
|
21 |
-
var $$ = $(this);
|
22 |
-
var frame = $(this ).data('frame');
|
23 |
-
|
24 |
-
// If the media frame already exists, reopen it.
|
25 |
-
if ( frame ) {
|
26 |
-
frame.open();
|
27 |
-
return false;
|
28 |
-
}
|
29 |
-
|
30 |
-
// Create the media frame.
|
31 |
-
frame = wp.media( {
|
32 |
-
// Set the title of the modal.
|
33 |
-
title: $$.data('choose'),
|
34 |
-
|
35 |
-
// Tell the modal to show only images.
|
36 |
-
library: {
|
37 |
-
type: $$.data('library').split(',').map(function(v){ return v.trim(); })
|
38 |
-
},
|
39 |
-
|
40 |
-
// Customize the submit button.
|
41 |
-
button: {
|
42 |
-
// Set the text of the button.
|
43 |
-
text: $$.data('update'),
|
44 |
-
// Tell the button not to close the modal, since we're
|
45 |
-
// going to refresh the page when the image is selected.
|
46 |
-
close: false
|
47 |
-
}
|
48 |
-
} );
|
49 |
-
|
50 |
-
// Store the frame
|
51 |
-
$$.data('frame', frame);
|
52 |
-
|
53 |
-
// When an image is selected, run a callback.
|
54 |
-
frame.on( 'select', function() {
|
55 |
-
// Grab the selected attachment.
|
56 |
-
var attachment = frame.state().get('selection').first().attributes;
|
57 |
-
|
58 |
-
$field.find('.current .title' ).html(attachment.title);
|
59 |
-
$inputField.val(attachment.id);
|
60 |
-
$inputField.trigger( 'change', { silent: true } );
|
61 |
-
|
62 |
-
var $thumbnail = $field.find( '.current .thumbnail' );
|
63 |
-
|
64 |
-
if(typeof attachment.sizes !== 'undefined'){
|
65 |
-
if(typeof attachment.sizes.thumbnail !== 'undefined'){
|
66 |
-
$thumbnail.attr('src', attachment.sizes.thumbnail.url).fadeIn();
|
67 |
-
}
|
68 |
-
else {
|
69 |
-
$thumbnail.attr('src', attachment.sizes.full.url).fadeIn();
|
70 |
-
}
|
71 |
-
}
|
72 |
-
else{
|
73 |
-
$thumbnail.attr('src', attachment.icon).fadeIn();
|
74 |
-
}
|
75 |
-
|
76 |
-
$field.find('.media-remove-button').removeClass('remove-hide');
|
77 |
-
|
78 |
-
frame.close();
|
79 |
-
} );
|
80 |
-
|
81 |
-
// Finally, open the modal.
|
82 |
-
frame.open();
|
83 |
-
});
|
84 |
-
|
85 |
-
$media.find('.current' )
|
86 |
-
.mouseenter(function(){
|
87 |
-
var t = $(this ).find('.title' );
|
88 |
-
if( t.html() !== ''){
|
89 |
-
t.fadeIn('fast');
|
90 |
-
}
|
91 |
-
})
|
92 |
-
.mouseleave(function(){
|
93 |
-
$(this ).find('.title' ).clearQueue().fadeOut('fast');
|
94 |
-
});
|
95 |
-
|
96 |
-
$field.find('a.media-remove-button' )
|
97 |
-
.click( function( e ){
|
98 |
-
e.preventDefault();
|
99 |
-
$field.find('.current .title' ).html('');
|
100 |
-
$inputField.val('');
|
101 |
-
$inputField.trigger( 'change', { silent: true } );
|
102 |
-
$field.find('.current .thumbnail' ).fadeOut('fast');
|
103 |
-
$(this).addClass('remove-hide');
|
104 |
-
} );
|
105 |
-
|
106 |
-
// Everything for the dialog
|
107 |
-
var dialog;
|
108 |
-
|
109 |
-
var reflowDialog = function() {
|
110 |
-
if( ! dialog ) return;
|
111 |
-
|
112 |
-
var results = dialog.find('.so-widgets-image-results');
|
113 |
-
if( results.length === 0 ) return;
|
114 |
-
|
115 |
-
var width = results.width(),
|
116 |
-
perRow = Math.floor( width / 276 ),
|
117 |
-
spare = ( width - perRow * 276 ),
|
118 |
-
resultWidth = spare / perRow + 260;
|
119 |
-
|
120 |
-
results.find( '.so-widgets-result-image' ).css( {
|
121 |
-
'width' : resultWidth,
|
122 |
-
'height' : resultWidth / 1.4
|
123 |
-
} );
|
124 |
-
};
|
125 |
-
$(window).resize( reflowDialog );
|
126 |
-
|
127 |
-
var setupDialog = function(){
|
128 |
-
if( ! dialog ) {
|
129 |
-
// Create the dialog
|
130 |
-
dialog = $( $('#so-widgets-bundle-tpl-image-search-dialog').html().trim() ).appendTo( 'body' );
|
131 |
-
dialog.find( '.close' ).click( function(){
|
132 |
-
dialog.hide();
|
133 |
-
} );
|
134 |
-
|
135 |
-
var results = dialog.find( '.so-widgets-image-results' );
|
136 |
-
|
137 |
-
var fetchImages = function( query, page ){
|
138 |
-
dialog.find( '.so-widgets-results-loading' ).fadeIn('fast');
|
139 |
-
dialog.find( '.so-widgets-results-loading strong' ).html(
|
140 |
-
dialog.find( '.so-widgets-results-loading strong' ).data( 'loading' )
|
141 |
-
);
|
142 |
-
dialog.find( '.so-widgets-results-more' ).hide();
|
143 |
-
|
144 |
-
$.get(
|
145 |
-
ajaxurl,
|
146 |
-
{
|
147 |
-
'action' : 'so_widgets_image_search',
|
148 |
-
'q' : query,
|
149 |
-
'page' : page,
|
150 |
-
'_sononce' : dialog.find('input[name="_sononce"]').val()
|
151 |
-
},
|
152 |
-
function( response ){
|
153 |
-
if( response.error ) {
|
154 |
-
alert( response.message );
|
155 |
-
return;
|
156 |
-
}
|
157 |
-
|
158 |
-
results.removeClass( 'so-loading' );
|
159 |
-
$.each( response.items, function( i, r ){
|
160 |
-
var result = $( $('#so-widgets-bundle-tpl-image-search-result').html().trim() )
|
161 |
-
.appendTo( results )
|
162 |
-
.addClass( 'source-' + r.source );
|
163 |
-
var img = result.find('.so-widgets-result-image');
|
164 |
-
|
165 |
-
// Preload the image
|
166 |
-
img.css( 'background-image', 'url(' + r.thumbnail + ')' );
|
167 |
-
img.data( 'thumbnail', r.thumbnail );
|
168 |
-
img.data( 'preview', r.preview );
|
169 |
-
|
170 |
-
if( r.url ) {
|
171 |
-
img.attr( {
|
172 |
-
'href': r.url,
|
173 |
-
'target': '_blank'
|
174 |
-
} );
|
175 |
-
}
|
176 |
-
|
177 |
-
if( r.full_url ) {
|
178 |
-
img.data( {
|
179 |
-
'full_url' : r.full_url,
|
180 |
-
'import_signature' : r.import_signature
|
181 |
-
} );
|
182 |
-
img.attr( 'href', r.full_url );
|
183 |
-
}
|
184 |
-
|
185 |
-
if( r.source === 'shutterstock' ) {
|
186 |
-
img.append( $('#so-widgets-bundle-tpl-image-search-result-sponsored').html() );
|
187 |
-
}
|
188 |
-
} );
|
189 |
-
|
190 |
-
if( page === 1 ) {
|
191 |
-
dialog.find('#so-widgets-image-search-suggestions ul').empty();
|
192 |
-
$.each( response.keywords, function( i, r ){
|
193 |
-
dialog.find('#so-widgets-image-search-suggestions').show();
|
194 |
-
dialog.find('#so-widgets-image-search-suggestions ul').append(
|
195 |
-
$('<li></li>') . append( $('<a href="#"></a>').html( r ).data( 'keyword', r ) )
|
196 |
-
);
|
197 |
-
} );
|
198 |
-
}
|
199 |
-
|
200 |
-
dialog.find( '.so-widgets-results-loading' ).fadeOut('fast');
|
201 |
-
|
202 |
-
reflowDialog();
|
203 |
-
dialog
|
204 |
-
.find( '.so-widgets-results-more' ).show()
|
205 |
-
.find( 'button' ).data( { 'query': query, 'page' : page+1 } );
|
206 |
-
}
|
207 |
-
);
|
208 |
-
|
209 |
-
};
|
210 |
-
|
211 |
-
// Setup the search
|
212 |
-
dialog.find('#so-widgets-image-search-form').submit( function( e ){
|
213 |
-
e.preventDefault();
|
214 |
-
|
215 |
-
// Perform the search
|
216 |
-
var q = dialog.find('.so-widgets-search-input').val();
|
217 |
-
results.empty();
|
218 |
-
|
219 |
-
if( q !== '' ) {
|
220 |
-
// Send the query to the server
|
221 |
-
fetchImages( q, 1 );
|
222 |
-
}
|
223 |
-
} );
|
224 |
-
|
225 |
-
// Clicking on the related search buttons
|
226 |
-
dialog.on( 'click', '.so-keywords-list a', function( e ){
|
227 |
-
e.preventDefault();
|
228 |
-
var $$ = $(this).blur();
|
229 |
-
dialog.find('.so-widgets-search-input').val( $$.data( 'keyword' ) );
|
230 |
-
dialog.find('#so-widgets-image-search-form').submit();
|
231 |
-
} );
|
232 |
-
|
233 |
-
// Clicking on the more button
|
234 |
-
dialog.find('.so-widgets-results-more button').click( function(){
|
235 |
-
var $$ = $(this);
|
236 |
-
fetchImages( $$.data( 'query' ), $$.data( 'page' ) );
|
237 |
-
} );
|
238 |
-
|
239 |
-
var hoverTimeout;
|
240 |
-
|
241 |
-
// Clicking on an image to import it
|
242 |
-
dialog.on( 'click', '.so-widgets-result-image', function( e ){
|
243 |
-
var $$ = $(this);
|
244 |
-
if( ! $$.data( 'full_url' ) ) {
|
245 |
-
return;
|
246 |
-
}
|
247 |
-
|
248 |
-
e.preventDefault();
|
249 |
-
|
250 |
-
if( confirm( dialog.data('confirm-import') ) ) {
|
251 |
-
dialog.addClass( 'so-widgets-importing' );
|
252 |
-
|
253 |
-
var postId = $( '#post_ID' ).val();
|
254 |
-
if( postId === null ) {
|
255 |
-
postId = '';
|
256 |
-
}
|
257 |
-
|
258 |
-
// Send the message to import the URL
|
259 |
-
$.get(
|
260 |
-
ajaxurl,
|
261 |
-
{
|
262 |
-
'action' : 'so_widgets_image_import',
|
263 |
-
'full_url' : $$.data( 'full_url' ),
|
264 |
-
'import_signature' : $$.data( 'import_signature' ),
|
265 |
-
'post_id' : postId,
|
266 |
-
'_sononce' : dialog.find('input[name="_sononce"]').val()
|
267 |
-
},
|
268 |
-
function( response ) {
|
269 |
-
dialog.find('#so-widgets-image-search-frame').removeClass( 'so-widgets-importing' );
|
270 |
-
|
271 |
-
if( response.error === false ) {
|
272 |
-
// This was a success
|
273 |
-
dialog.hide();
|
274 |
-
dialog.find( '.so-widgets-results-loading' ).hide();
|
275 |
-
$inputField.val( response.attachment_id ).trigger('change', { silent: true } );
|
276 |
-
$field.find('.current .thumbnail' ).attr('src', response.thumb ).fadeIn();
|
277 |
-
|
278 |
-
$field.find('.media-remove-button').removeClass('remove-hide');
|
279 |
-
}
|
280 |
-
else {
|
281 |
-
alert( response.message );
|
282 |
-
dialog.find( '.so-widgets-results-loading' ).hide();
|
283 |
-
}
|
284 |
-
}
|
285 |
-
);
|
286 |
-
|
287 |
-
// Clear the dialog
|
288 |
-
dialog.find( '.so-widgets-results-loading' ).fadeIn('fast');
|
289 |
-
dialog.find( '.so-widgets-results-loading strong' ).html(
|
290 |
-
dialog.find( '.so-widgets-results-loading strong' ).data( 'importing' )
|
291 |
-
);
|
292 |
-
dialog.find( '.so-widgets-results-more' ).hide();
|
293 |
-
dialog.find('#so-widgets-image-search-frame').addClass( 'so-widgets-importing' );
|
294 |
-
}
|
295 |
-
} );
|
296 |
-
|
297 |
-
// Hovering over an image to preview it
|
298 |
-
var previewWindow = dialog.find('.so-widgets-preview-window');
|
299 |
-
dialog
|
300 |
-
.on( 'mouseenter', '.so-widgets-result-image', function(){
|
301 |
-
var $$ = $(this),
|
302 |
-
preview = $$.data('preview');
|
303 |
-
|
304 |
-
clearTimeout( hoverTimeout );
|
305 |
-
|
306 |
-
hoverTimeout = setTimeout( function(){
|
307 |
-
// Scale the preview sizes
|
308 |
-
var scalePreviewX = 1, scalePreviewY = 1;
|
309 |
-
if( preview[1] > $( window ).outerWidth() *0.33 ) {
|
310 |
-
scalePreviewX = $( window ).outerWidth() *0.33 / preview[1];
|
311 |
-
}
|
312 |
-
if( preview[2] > $( window ).outerHeight() *0.5 ) {
|
313 |
-
scalePreviewY = $( window ).outerHeight() *0.5 / preview[2];
|
314 |
-
}
|
315 |
-
var scalePreview = Math.min( scalePreviewX, scalePreviewY );
|
316 |
-
// Never upscale
|
317 |
-
if( scalePreview > 1 ) {
|
318 |
-
scalePreview = 1;
|
319 |
-
}
|
320 |
-
|
321 |
-
previewWindow.show()
|
322 |
-
.find('.so-widgets-preview-window-inside')
|
323 |
-
.css( {
|
324 |
-
'background-image' : 'url(' + $$.data('thumbnail') + ')',
|
325 |
-
'width' : preview[1] * scalePreview,
|
326 |
-
'height' : preview[2] * scalePreview
|
327 |
-
} )
|
328 |
-
.append( $( '<img />' ).attr( 'src', preview[0] ) );
|
329 |
-
|
330 |
-
dialog.trigger('mousemove');
|
331 |
-
}, 1000 );
|
332 |
-
|
333 |
-
} )
|
334 |
-
.on( 'mouseleave', '.so-widgets-result-image', function(){
|
335 |
-
previewWindow.hide().find('img').remove();
|
336 |
-
clearTimeout( hoverTimeout );
|
337 |
-
} );
|
338 |
-
|
339 |
-
var lastX, lastY;
|
340 |
-
dialog.on( 'mousemove', function( e ){
|
341 |
-
if( e.clientX ) lastX = e.clientX;
|
342 |
-
if( e.clientY ) lastY = e.clientY;
|
343 |
-
|
344 |
-
if( previewWindow.is( ':visible' ) ) {
|
345 |
-
var ph = previewWindow.outerHeight(),
|
346 |
-
pw = previewWindow.outerWidth(),
|
347 |
-
wh = $( window ).outerHeight(),
|
348 |
-
ww = $( window ).outerWidth();
|
349 |
-
|
350 |
-
|
351 |
-
// Calculate the top position
|
352 |
-
var top = lastY - ph/2;
|
353 |
-
top = Math.max( top, 10 );
|
354 |
-
top = Math.min( top, wh - 10 - ph );
|
355 |
-
|
356 |
-
// Calculate the left position
|
357 |
-
var left = (lastX < ww/2) ? lastX + 15 : lastX - 15 - pw;
|
358 |
-
|
359 |
-
// Figure out where the preview needs to go
|
360 |
-
previewWindow.css({
|
361 |
-
'top': top,
|
362 |
-
'left': left
|
363 |
-
});
|
364 |
-
|
365 |
-
}
|
366 |
-
} );
|
367 |
-
}
|
368 |
-
|
369 |
-
dialog.show();
|
370 |
-
dialog.find( '.so-widgets-search-input' ).focus();
|
371 |
-
};
|
372 |
-
|
373 |
-
// Handle displaying the image search dialog
|
374 |
-
$media.find( '.find-image-button' ).click( function(e){
|
375 |
-
e.preventDefault();
|
376 |
-
setupDialog();
|
377 |
-
} );
|
378 |
-
|
379 |
-
$inputField.change( function ( event, data ) {
|
380 |
-
if ( ! ( data && data.silent ) ) {
|
381 |
-
var newVal = $inputField.val();
|
382 |
-
if ( newVal) {
|
383 |
-
var $thumbnail = $field.find( '.current .thumbnail' );
|
384 |
-
var attachment = wp.media.attachment( newVal );
|
385 |
-
attachment.fetch().done( function () {
|
386 |
-
if ( attachment.has( 'sizes' ) ) {
|
387 |
-
var sizes = attachment.get( 'sizes' );
|
388 |
-
if ( typeof sizes.thumbnail !== 'undefined' ) {
|
389 |
-
$thumbnail.attr( 'src', sizes.thumbnail.url ).fadeIn();
|
390 |
-
}
|
391 |
-
else {
|
392 |
-
$thumbnail.attr( 'src', sizes.full.url ).fadeIn();
|
393 |
-
}
|
394 |
-
}
|
395 |
-
else {
|
396 |
-
$thumbnail.attr( 'src', attachment.get('icon') ).fadeIn();
|
397 |
-
}
|
398 |
-
$field.find('.media-remove-button').removeClass('remove-hide');
|
399 |
-
} );
|
400 |
-
} else {
|
401 |
-
$field.find( 'a.media-remove-button' ).click();
|
402 |
-
}
|
403 |
-
}
|
404 |
-
} );
|
405 |
-
|
406 |
-
$media.data( 'initialized', true );
|
407 |
-
});
|
408 |
-
|
409 |
-
} )( jQuery );
|
1 |
+
/* global jQuery, soWidgets */
|
2 |
+
|
3 |
+
( function( $ ) {
|
4 |
+
|
5 |
+
$(document).on( 'sowsetupformfield', '.siteorigin-widget-field-type-media', function(e) {
|
6 |
+
var $field = $( this );
|
7 |
+
var $media = $field.find('> .media-field-wrapper');
|
8 |
+
var $inputField = $field.find( '.siteorigin-widget-input' ).not('.media-fallback-external');
|
9 |
+
|
10 |
+
if ( $media.data( 'initialized' ) ) {
|
11 |
+
return;
|
12 |
+
}
|
13 |
+
|
14 |
+
// Handle the media uploader
|
15 |
+
$media.find( '.media-upload-button' ).click(function(e){
|
16 |
+
e.preventDefault();
|
17 |
+
if( typeof wp.media === 'undefined' ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
|
21 |
+
var $$ = $(this);
|
22 |
+
var frame = $(this ).data('frame');
|
23 |
+
|
24 |
+
// If the media frame already exists, reopen it.
|
25 |
+
if ( frame ) {
|
26 |
+
frame.open();
|
27 |
+
return false;
|
28 |
+
}
|
29 |
+
|
30 |
+
// Create the media frame.
|
31 |
+
frame = wp.media( {
|
32 |
+
// Set the title of the modal.
|
33 |
+
title: $$.data('choose'),
|
34 |
+
|
35 |
+
// Tell the modal to show only images.
|
36 |
+
library: {
|
37 |
+
type: $$.data('library').split(',').map(function(v){ return v.trim(); })
|
38 |
+
},
|
39 |
+
|
40 |
+
// Customize the submit button.
|
41 |
+
button: {
|
42 |
+
// Set the text of the button.
|
43 |
+
text: $$.data('update'),
|
44 |
+
// Tell the button not to close the modal, since we're
|
45 |
+
// going to refresh the page when the image is selected.
|
46 |
+
close: false
|
47 |
+
}
|
48 |
+
} );
|
49 |
+
|
50 |
+
// Store the frame
|
51 |
+
$$.data('frame', frame);
|
52 |
+
|
53 |
+
// When an image is selected, run a callback.
|
54 |
+
frame.on( 'select', function() {
|
55 |
+
// Grab the selected attachment.
|
56 |
+
var attachment = frame.state().get('selection').first().attributes;
|
57 |
+
|
58 |
+
$field.find('.current .title' ).html(attachment.title);
|
59 |
+
$inputField.val(attachment.id);
|
60 |
+
$inputField.trigger( 'change', { silent: true } );
|
61 |
+
|
62 |
+
var $thumbnail = $field.find( '.current .thumbnail' );
|
63 |
+
|
64 |
+
if(typeof attachment.sizes !== 'undefined'){
|
65 |
+
if(typeof attachment.sizes.thumbnail !== 'undefined'){
|
66 |
+
$thumbnail.attr('src', attachment.sizes.thumbnail.url).fadeIn();
|
67 |
+
}
|
68 |
+
else {
|
69 |
+
$thumbnail.attr('src', attachment.sizes.full.url).fadeIn();
|
70 |
+
}
|
71 |
+
}
|
72 |
+
else{
|
73 |
+
$thumbnail.attr('src', attachment.icon).fadeIn();
|
74 |
+
}
|
75 |
+
|
76 |
+
$field.find('.media-remove-button').removeClass('remove-hide');
|
77 |
+
|
78 |
+
frame.close();
|
79 |
+
} );
|
80 |
+
|
81 |
+
// Finally, open the modal.
|
82 |
+
frame.open();
|
83 |
+
});
|
84 |
+
|
85 |
+
$media.find('.current' )
|
86 |
+
.mouseenter(function(){
|
87 |
+
var t = $(this ).find('.title' );
|
88 |
+
if( t.html() !== ''){
|
89 |
+
t.fadeIn('fast');
|
90 |
+
}
|
91 |
+
})
|
92 |
+
.mouseleave(function(){
|
93 |
+
$(this ).find('.title' ).clearQueue().fadeOut('fast');
|
94 |
+
});
|
95 |
+
|
96 |
+
$field.find('a.media-remove-button' )
|
97 |
+
.click( function( e ){
|
98 |
+
e.preventDefault();
|
99 |
+
$field.find('.current .title' ).html('');
|
100 |
+
$inputField.val('');
|
101 |
+
$inputField.trigger( 'change', { silent: true } );
|
102 |
+
$field.find('.current .thumbnail' ).fadeOut('fast');
|
103 |
+
$(this).addClass('remove-hide');
|
104 |
+
} );
|
105 |
+
|
106 |
+
// Everything for the dialog
|
107 |
+
var dialog;
|
108 |
+
|
109 |
+
var reflowDialog = function() {
|
110 |
+
if( ! dialog ) return;
|
111 |
+
|
112 |
+
var results = dialog.find('.so-widgets-image-results');
|
113 |
+
if( results.length === 0 ) return;
|
114 |
+
|
115 |
+
var width = results.width(),
|
116 |
+
perRow = Math.floor( width / 276 ),
|
117 |
+
spare = ( width - perRow * 276 ),
|
118 |
+
resultWidth = spare / perRow + 260;
|
119 |
+
|
120 |
+
results.find( '.so-widgets-result-image' ).css( {
|
121 |
+
'width' : resultWidth,
|
122 |
+
'height' : resultWidth / 1.4
|
123 |
+
} );
|
124 |
+
};
|
125 |
+
$(window).resize( reflowDialog );
|
126 |
+
|
127 |
+
var setupDialog = function(){
|
128 |
+
if( ! dialog ) {
|
129 |
+
// Create the dialog
|
130 |
+
dialog = $( $('#so-widgets-bundle-tpl-image-search-dialog').html().trim() ).appendTo( 'body' );
|
131 |
+
dialog.find( '.close' ).click( function(){
|
132 |
+
dialog.hide();
|
133 |
+
} );
|
134 |
+
|
135 |
+
var results = dialog.find( '.so-widgets-image-results' );
|
136 |
+
|
137 |
+
var fetchImages = function( query, page ){
|
138 |
+
dialog.find( '.so-widgets-results-loading' ).fadeIn('fast');
|
139 |
+
dialog.find( '.so-widgets-results-loading strong' ).html(
|
140 |
+
dialog.find( '.so-widgets-results-loading strong' ).data( 'loading' )
|
141 |
+
);
|
142 |
+
dialog.find( '.so-widgets-results-more' ).hide();
|
143 |
+
|
144 |
+
$.get(
|
145 |
+
ajaxurl,
|
146 |
+
{
|
147 |
+
'action' : 'so_widgets_image_search',
|
148 |
+
'q' : query,
|
149 |
+
'page' : page,
|
150 |
+
'_sononce' : dialog.find('input[name="_sononce"]').val()
|
151 |
+
},
|
152 |
+
function( response ){
|
153 |
+
if( response.error ) {
|
154 |
+
alert( response.message );
|
155 |
+
return;
|
156 |
+
}
|
157 |
+
|
158 |
+
results.removeClass( 'so-loading' );
|
159 |
+
$.each( response.items, function( i, r ){
|
160 |
+
var result = $( $('#so-widgets-bundle-tpl-image-search-result').html().trim() )
|
161 |
+
.appendTo( results )
|
162 |
+
.addClass( 'source-' + r.source );
|
163 |
+
var img = result.find('.so-widgets-result-image');
|
164 |
+
|
165 |
+
// Preload the image
|
166 |
+
img.css( 'background-image', 'url(' + r.thumbnail + ')' );
|
167 |
+
img.data( 'thumbnail', r.thumbnail );
|
168 |
+
img.data( 'preview', r.preview );
|
169 |
+
|
170 |
+
if( r.url ) {
|
171 |
+
img.attr( {
|
172 |
+
'href': r.url,
|
173 |
+
'target': '_blank'
|
174 |
+
} );
|
175 |
+
}
|
176 |
+
|
177 |
+
if( r.full_url ) {
|
178 |
+
img.data( {
|
179 |
+
'full_url' : r.full_url,
|
180 |
+
'import_signature' : r.import_signature
|
181 |
+
} );
|
182 |
+
img.attr( 'href', r.full_url );
|
183 |
+
}
|
184 |
+
|
185 |
+
if( r.source === 'shutterstock' ) {
|
186 |
+
img.append( $('#so-widgets-bundle-tpl-image-search-result-sponsored').html() );
|
187 |
+
}
|
188 |
+
} );
|
189 |
+
|
190 |
+
if( page === 1 ) {
|
191 |
+
dialog.find('#so-widgets-image-search-suggestions ul').empty();
|
192 |
+
$.each( response.keywords, function( i, r ){
|
193 |
+
dialog.find('#so-widgets-image-search-suggestions').show();
|
194 |
+
dialog.find('#so-widgets-image-search-suggestions ul').append(
|
195 |
+
$('<li></li>') . append( $('<a href="#"></a>').html( r ).data( 'keyword', r ) )
|
196 |
+
);
|
197 |
+
} );
|
198 |
+
}
|
199 |
+
|
200 |
+
dialog.find( '.so-widgets-results-loading' ).fadeOut('fast');
|
201 |
+
|
202 |
+
reflowDialog();
|
203 |
+
dialog
|
204 |
+
.find( '.so-widgets-results-more' ).show()
|
205 |
+
.find( 'button' ).data( { 'query': query, 'page' : page+1 } );
|
206 |
+
}
|
207 |
+
);
|
208 |
+
|
209 |
+
};
|
210 |
+
|
211 |
+
// Setup the search
|
212 |
+
dialog.find('#so-widgets-image-search-form').submit( function( e ){
|
213 |
+
e.preventDefault();
|
214 |
+
|
215 |
+
// Perform the search
|
216 |
+
var q = dialog.find('.so-widgets-search-input').val();
|
217 |
+
results.empty();
|
218 |
+
|
219 |
+
if( q !== '' ) {
|
220 |
+
// Send the query to the server
|
221 |
+
fetchImages( q, 1 );
|
222 |
+
}
|
223 |
+
} );
|
224 |
+
|
225 |
+
// Clicking on the related search buttons
|
226 |
+
dialog.on( 'click', '.so-keywords-list a', function( e ){
|
227 |
+
e.preventDefault();
|
228 |
+
var $$ = $(this).blur();
|
229 |
+
dialog.find('.so-widgets-search-input').val( $$.data( 'keyword' ) );
|
230 |
+
dialog.find('#so-widgets-image-search-form').submit();
|
231 |
+
} );
|
232 |
+
|
233 |
+
// Clicking on the more button
|
234 |
+
dialog.find('.so-widgets-results-more button').click( function(){
|
235 |
+
var $$ = $(this);
|
236 |
+
fetchImages( $$.data( 'query' ), $$.data( 'page' ) );
|
237 |
+
} );
|
238 |
+
|
239 |
+
var hoverTimeout;
|
240 |
+
|
241 |
+
// Clicking on an image to import it
|
242 |
+
dialog.on( 'click', '.so-widgets-result-image', function( e ){
|
243 |
+
var $$ = $(this);
|
244 |
+
if( ! $$.data( 'full_url' ) ) {
|
245 |
+
return;
|
246 |
+
}
|
247 |
+
|
248 |
+
e.preventDefault();
|
249 |
+
|
250 |
+
if( confirm( dialog.data('confirm-import') ) ) {
|
251 |
+
dialog.addClass( 'so-widgets-importing' );
|
252 |
+
|
253 |
+
var postId = $( '#post_ID' ).val();
|
254 |
+
if( postId === null ) {
|
255 |
+
postId = '';
|
256 |
+
}
|
257 |
+
|
258 |
+
// Send the message to import the URL
|
259 |
+
$.get(
|
260 |
+
ajaxurl,
|
261 |
+
{
|
262 |
+
'action' : 'so_widgets_image_import',
|
263 |
+
'full_url' : $$.data( 'full_url' ),
|
264 |
+
'import_signature' : $$.data( 'import_signature' ),
|
265 |
+
'post_id' : postId,
|
266 |
+
'_sononce' : dialog.find('input[name="_sononce"]').val()
|
267 |
+
},
|
268 |
+
function( response ) {
|
269 |
+
dialog.find('#so-widgets-image-search-frame').removeClass( 'so-widgets-importing' );
|
270 |
+
|
271 |
+
if( response.error === false ) {
|
272 |
+
// This was a success
|
273 |
+
dialog.hide();
|
274 |
+
dialog.find( '.so-widgets-results-loading' ).hide();
|
275 |
+
$inputField.val( response.attachment_id ).trigger('change', { silent: true } );
|
276 |
+
$field.find('.current .thumbnail' ).attr('src', response.thumb ).fadeIn();
|
277 |
+
|
278 |
+
$field.find('.media-remove-button').removeClass('remove-hide');
|
279 |
+
}
|
280 |
+
else {
|
281 |
+
alert( response.message );
|
282 |
+
dialog.find( '.so-widgets-results-loading' ).hide();
|
283 |
+
}
|
284 |
+
}
|
285 |
+
);
|
286 |
+
|
287 |
+
// Clear the dialog
|
288 |
+
dialog.find( '.so-widgets-results-loading' ).fadeIn('fast');
|
289 |
+
dialog.find( '.so-widgets-results-loading strong' ).html(
|
290 |
+
dialog.find( '.so-widgets-results-loading strong' ).data( 'importing' )
|
291 |
+
);
|
292 |
+
dialog.find( '.so-widgets-results-more' ).hide();
|
293 |
+
dialog.find('#so-widgets-image-search-frame').addClass( 'so-widgets-importing' );
|
294 |
+
}
|
295 |
+
} );
|
296 |
+
|
297 |
+
// Hovering over an image to preview it
|
298 |
+
var previewWindow = dialog.find('.so-widgets-preview-window');
|
299 |
+
dialog
|
300 |
+
.on( 'mouseenter', '.so-widgets-result-image', function(){
|
301 |
+
var $$ = $(this),
|
302 |
+
preview = $$.data('preview');
|
303 |
+
|
304 |
+
clearTimeout( hoverTimeout );
|
305 |
+
|
306 |
+
hoverTimeout = setTimeout( function(){
|
307 |
+
// Scale the preview sizes
|
308 |
+
var scalePreviewX = 1, scalePreviewY = 1;
|
309 |
+
if( preview[1] > $( window ).outerWidth() *0.33 ) {
|
310 |
+
scalePreviewX = $( window ).outerWidth() *0.33 / preview[1];
|
311 |
+
}
|
312 |
+
if( preview[2] > $( window ).outerHeight() *0.5 ) {
|
313 |
+
scalePreviewY = $( window ).outerHeight() *0.5 / preview[2];
|
314 |
+
}
|
315 |
+
var scalePreview = Math.min( scalePreviewX, scalePreviewY );
|
316 |
+
// Never upscale
|
317 |
+
if( scalePreview > 1 ) {
|
318 |
+
scalePreview = 1;
|
319 |
+
}
|
320 |
+
|
321 |
+
previewWindow.show()
|
322 |
+
.find('.so-widgets-preview-window-inside')
|
323 |
+
.css( {
|
324 |
+
'background-image' : 'url(' + $$.data('thumbnail') + ')',
|
325 |
+
'width' : preview[1] * scalePreview,
|
326 |
+
'height' : preview[2] * scalePreview
|
327 |
+
} )
|
328 |
+
.append( $( '<img />' ).attr( 'src', preview[0] ) );
|
329 |
+
|
330 |
+
dialog.trigger('mousemove');
|
331 |
+
}, 1000 );
|
332 |
+
|
333 |
+
} )
|
334 |
+
.on( 'mouseleave', '.so-widgets-result-image', function(){
|
335 |
+
previewWindow.hide().find('img').remove();
|
336 |
+
clearTimeout( hoverTimeout );
|
337 |
+
} );
|
338 |
+
|
339 |
+
var lastX, lastY;
|
340 |
+
dialog.on( 'mousemove', function( e ){
|
341 |
+
if( e.clientX ) lastX = e.clientX;
|
342 |
+
if( e.clientY ) lastY = e.clientY;
|
343 |
+
|
344 |
+
if( previewWindow.is( ':visible' ) ) {
|
345 |
+
var ph = previewWindow.outerHeight(),
|
346 |
+
pw = previewWindow.outerWidth(),
|
347 |
+
wh = $( window ).outerHeight(),
|
348 |
+
ww = $( window ).outerWidth();
|
349 |
+
|
350 |
+
|
351 |
+
// Calculate the top position
|
352 |
+
var top = lastY - ph/2;
|
353 |
+
top = Math.max( top, 10 );
|
354 |
+
top = Math.min( top, wh - 10 - ph );
|
355 |
+
|
356 |
+
// Calculate the left position
|
357 |
+
var left = (lastX < ww/2) ? lastX + 15 : lastX - 15 - pw;
|
358 |
+
|
359 |
+
// Figure out where the preview needs to go
|
360 |
+
previewWindow.css({
|
361 |
+
'top': top,
|
362 |
+
'left': left
|
363 |
+
});
|
364 |
+
|
365 |
+
}
|
366 |
+
} );
|
367 |
+
}
|
368 |
+
|
369 |
+
dialog.show();
|
370 |
+
dialog.find( '.so-widgets-search-input' ).focus();
|
371 |
+
};
|
372 |
+
|
373 |
+
// Handle displaying the image search dialog
|
374 |
+
$media.find( '.find-image-button' ).click( function(e){
|
375 |
+
e.preventDefault();
|
376 |
+
setupDialog();
|
377 |
+
} );
|
378 |
+
|
379 |
+
$inputField.change( function ( event, data ) {
|
380 |
+
if ( ! ( data && data.silent ) ) {
|
381 |
+
var newVal = $inputField.val();
|
382 |
+
if ( newVal) {
|
383 |
+
var $thumbnail = $field.find( '.current .thumbnail' );
|
384 |
+
var attachment = wp.media.attachment( newVal );
|
385 |
+
attachment.fetch().done( function () {
|
386 |
+
if ( attachment.has( 'sizes' ) ) {
|
387 |
+
var sizes = attachment.get( 'sizes' );
|
388 |
+
if ( typeof sizes.thumbnail !== 'undefined' ) {
|
389 |
+
$thumbnail.attr( 'src', sizes.thumbnail.url ).fadeIn();
|
390 |
+
}
|
391 |
+
else {
|
392 |
+
$thumbnail.attr( 'src', sizes.full.url ).fadeIn();
|
393 |
+
}
|
394 |
+
}
|
395 |
+
else {
|
396 |
+
$thumbnail.attr( 'src', attachment.get('icon') ).fadeIn();
|
397 |
+
}
|
398 |
+
$field.find('.media-remove-button').removeClass('remove-hide');
|
399 |
+
} );
|
400 |
+
} else {
|
401 |
+
$field.find( 'a.media-remove-button' ).click();
|
402 |
+
}
|
403 |
+
}
|
404 |
+
} );
|
405 |
+
|
406 |
+
$media.data( 'initialized', true );
|
407 |
+
});
|
408 |
+
|
409 |
+
} )( jQuery );
|
base/inc/fields/js/multi-measurement-field.js
CHANGED
@@ -1,57 +1,57 @@
|
|
1 |
-
/* global jQuery */
|
2 |
-
|
3 |
-
(function( $ ) {
|
4 |
-
$( document ).on( 'sowsetupformfield', '.siteorigin-widget-field-type-multi-measurement', function ( e ) {
|
5 |
-
|
6 |
-
var valField = $( this ).find( 'input[type="hidden"][class="siteorigin-widget-input"]' );
|
7 |
-
var separator = valField.data( 'separator' );
|
8 |
-
var autoFillEnabled = valField.data( 'autofill' );
|
9 |
-
var values = valField.val() === '' ? [] : valField.val().split( separator );
|
10 |
-
var $valInputs = $( this ).find( '.sow-multi-measurement-input' );
|
11 |
-
var $inputContainers = $( this ).find( '.sow-multi-measurement-input-container' );
|
12 |
-
|
13 |
-
var updateValue = function ( $element ) {
|
14 |
-
var vals = valField.val() === '' ? [] : valField.val().split( separator );
|
15 |
-
var $unitInput = $element.find( '+ .sow-multi-measurement-select-unit' );
|
16 |
-
var index = $valInputs.index( $element );
|
17 |
-
vals[ index ] = $element.val() + ( $element.val() === '' ? '' : $unitInput.val() );
|
18 |
-
valField.val( vals.join( separator ) );
|
19 |
-
};
|
20 |
-
|
21 |
-
$valInputs.each( function ( index, element ) {
|
22 |
-
if ( values.length > index ) {
|
23 |
-
var valueResult = values[ index ].match( /(\d+\.?\d*)([a-z%]+)*/ );
|
24 |
-
if ( valueResult && valueResult.length ) {
|
25 |
-
var amount = valueResult[ 1 ];
|
26 |
-
var unit = valueResult[ 2 ];
|
27 |
-
$( element ).val( amount );
|
28 |
-
$( element ).find( '+ .sow-multi-measurement-select-unit' ).val( unit );
|
29 |
-
}
|
30 |
-
} else {
|
31 |
-
updateValue( $( element ) );
|
32 |
-
}
|
33 |
-
} );
|
34 |
-
|
35 |
-
$inputContainers.change( function ( event ) {
|
36 |
-
var $valInput = $( event.currentTarget ).find( '> .sow-multi-measurement-input' );
|
37 |
-
var doAutofill = autoFillEnabled;
|
38 |
-
if ( autoFillEnabled ) {
|
39 |
-
$valInputs.each( function ( index, element ) {
|
40 |
-
// Only want to autofill if it has been enabled and no other inputs have values.
|
41 |
-
if ( $( element ).attr( 'id' ) !== $valInput.eq( 0 ).attr( 'id' ) ) {
|
42 |
-
doAutofill = doAutofill && !( $( element ).val() );
|
43 |
-
}
|
44 |
-
} );
|
45 |
-
}
|
46 |
-
if ( doAutofill ) {
|
47 |
-
$valInputs.each( function( index, element ) {
|
48 |
-
$( element ).val( $valInput.val() );
|
49 |
-
updateValue( $( element ) );
|
50 |
-
} );
|
51 |
-
} else {
|
52 |
-
updateValue( $valInput );
|
53 |
-
}
|
54 |
-
} );
|
55 |
-
|
56 |
-
} );
|
57 |
-
})( jQuery );
|
1 |
+
/* global jQuery */
|
2 |
+
|
3 |
+
(function( $ ) {
|
4 |
+
$( document ).on( 'sowsetupformfield', '.siteorigin-widget-field-type-multi-measurement', function ( e ) {
|
5 |
+
|
6 |
+
var valField = $( this ).find( 'input[type="hidden"][class="siteorigin-widget-input"]' );
|
7 |
+
var separator = valField.data( 'separator' );
|
8 |
+
var autoFillEnabled = valField.data( 'autofill' );
|
9 |
+
var values = valField.val() === '' ? [] : valField.val().split( separator );
|
10 |
+
var $valInputs = $( this ).find( '.sow-multi-measurement-input' );
|
11 |
+
var $inputContainers = $( this ).find( '.sow-multi-measurement-input-container' );
|
12 |
+
|
13 |
+
var updateValue = function ( $element ) {
|
14 |
+
var vals = valField.val() === '' ? [] : valField.val().split( separator );
|
15 |
+
var $unitInput = $element.find( '+ .sow-multi-measurement-select-unit' );
|
16 |
+
var index = $valInputs.index( $element );
|
17 |
+
vals[ index ] = $element.val() + ( $element.val() === '' ? '' : $unitInput.val() );
|
18 |
+
valField.val( vals.join( separator ) );
|
19 |
+
};
|
20 |
+
|
21 |
+
$valInputs.each( function ( index, element ) {
|
22 |
+
if ( values.length > index ) {
|
23 |
+
var valueResult = values[ index ].match( /(\d+\.?\d*)([a-z%]+)*/ );
|
24 |
+
if ( valueResult && valueResult.length ) {
|
25 |
+
var amount = valueResult[ 1 ];
|
26 |
+
var unit = valueResult[ 2 ];
|
27 |
+
$( element ).val( amount );
|
28 |
+
$( element ).find( '+ .sow-multi-measurement-select-unit' ).val( unit );
|
29 |
+
}
|
30 |
+
} else {
|
31 |
+
updateValue( $( element ) );
|
32 |
+
}
|
33 |
+
} );
|
34 |
+
|
35 |
+
$inputContainers.change( function ( event ) {
|
36 |
+
var $valInput = $( event.currentTarget ).find( '> .sow-multi-measurement-input' );
|
37 |
+
var doAutofill = autoFillEnabled;
|
38 |
+
if ( autoFillEnabled ) {
|
39 |
+
$valInputs.each( function ( index, element ) {
|
40 |
+
// Only want to autofill if it has been enabled and no other inputs have values.
|
41 |
+
if ( $( element ).attr( 'id' ) !== $valInput.eq( 0 ).attr( 'id' ) ) {
|
42 |
+
doAutofill = doAutofill && !( $( element ).val() );
|
43 |
+
}
|
44 |
+
} );
|
45 |
+
}
|
46 |
+
if ( doAutofill ) {
|
47 |
+
$valInputs.each( function( index, element ) {
|
48 |
+
$( element ).val( $valInput.val() );
|
49 |
+
updateValue( $( element ) );
|
50 |
+
} );
|
51 |
+
} else {
|
52 |
+
updateValue( $valInput );
|
53 |
+
}
|
54 |
+
} );
|
55 |
+
|
56 |
+
} );
|
57 |
+
})( jQuery );
|
base/inc/fields/js/tinymce-field.js
CHANGED
@@ -1,145 +1,145 @@
|
|
1 |
-
/* global tinymce, switchEditors */
|
2 |
-
|
3 |
-
(function ( $ ) {
|
4 |
-
var setup = function( $field ) {
|
5 |
-
|
6 |
-
if ( $field.data( 'initialized' ) ) {
|
7 |
-
return;
|
8 |
-
}
|
9 |
-
|
10 |
-
var wpEditor = wp.oldEditor ? wp.oldEditor : wp.editor;
|
11 |
-
if ( wpEditor && wpEditor.hasOwnProperty( 'autop' ) ) {
|
12 |
-
wp.editor.autop = wpEditor.autop;
|
13 |
-
wp.editor.removep = wpEditor.removep;
|
14 |
-
wp.editor.initialize = wpEditor.initialize
|
15 |
-
}
|
16 |
-
|
17 |
-
var $container = $field.find( '.siteorigin-widget-tinymce-container' );
|
18 |
-
var settings = $container.data( 'editorSettings' );
|
19 |
-
var $wpautopToggleField;
|
20 |
-
if ( settings.wpautopToggleField ) {
|
21 |
-
var $widgetForm = $container.closest( '.siteorigin-widget-form' );
|
22 |
-
$wpautopToggleField = $widgetForm.find( settings.wpautopToggleField );
|
23 |
-
settings.tinymce.wpautop = $wpautopToggleField.is( ':checked' );
|
24 |
-
}
|
25 |
-
var $textarea = $container.find( 'textarea' );
|
26 |
-
var id = $textarea.attr( 'id' );
|
27 |
-
var setupEditor = function ( editor ) {
|
28 |
-
editor.on( 'change',
|
29 |
-
function () {
|
30 |
-
var ed = window.tinymce.get( id );
|
31 |
-
ed.save();
|
32 |
-
$textarea.trigger( 'change' );
|
33 |
-
}
|
34 |
-
);
|
35 |
-
if ( $wpautopToggleField ) {
|
36 |
-
$wpautopToggleField.off( 'change' );
|
37 |
-
$wpautopToggleField.on( 'change', function () {
|
38 |
-
wp.editor.remove( id );
|
39 |
-
settings.tinymce.wpautop = $wpautopToggleField.is( ':checked' );
|
40 |
-
wp.editor.initialize( id, settings );
|
41 |
-
} );
|
42 |
-
}
|
43 |
-
};
|
44 |
-
|
45 |
-
if ( settings.tinymce ) {
|
46 |
-
settings.tinymce = $.extend( {}, settings.tinymce, { selector: '#' + id, setup: setupEditor } );
|
47 |
-
}
|
48 |
-
$( document ).on( 'wp-before-tinymce-init', function ( event, init ) {
|
49 |
-
if ( init.selector === settings.tinymce.selector ) {
|
50 |
-
var mediaButtons = $container.data( 'mediaButtons' );
|
51 |
-
if ( $field.find( '.wp-media-buttons' ).length === 0 ) {
|
52 |
-
$field.find( '.wp-editor-tabs' ).before( mediaButtons.html );
|
53 |
-
}
|
54 |
-
}
|
55 |
-
} );
|
56 |
-
$( document ).on( 'tinymce-editor-setup', function () {
|
57 |
-
var $wpEditorWrap = $field.find( '.wp-editor-wrap' );
|
58 |
-
if ( $wpEditorWrap.length > 0 && ! $wpEditorWrap.hasClass( settings.selectedEditor + '-active' ) ) {
|
59 |
-
setTimeout( function () {
|
60 |
-
window.switchEditors.go( id );
|
61 |
-
}, 10 );
|
62 |
-
}
|
63 |
-
} );
|
64 |
-
|
65 |
-
wpEditor.remove( id );
|
66 |
-
if ( window.tinymce ) {
|
67 |
-
window.tinymce.EditorManager.overrideDefaults( { base_url: settings.baseURL, suffix: settings.suffix } );
|
68 |
-
}
|
69 |
-
// Wait for textarea to be visible before initialization.
|
70 |
-
if ( $textarea.is( ':visible' ) ) {
|
71 |
-
wpEditor.initialize( id, settings );
|
72 |
-
}
|
73 |
-
else {
|
74 |
-
var intervalId = setInterval( function () {
|
75 |
-
if ( $textarea.is( ':visible' ) ) {
|
76 |
-
wpEditor.initialize( id, settings );
|
77 |
-
clearInterval( intervalId );
|
78 |
-
}
|
79 |
-
}, 500);
|
80 |
-
}
|
81 |
-
|
82 |
-
$field.on( 'click', function ( event ) {
|
83 |
-
var $target = $( event.target );
|
84 |
-
if ( ! $target.is( '.wp-switch-editor' ) ) {
|
85 |
-
return;
|
86 |
-
}
|
87 |
-
var mode = $target.hasClass( 'switch-tmce' ) ? 'tmce' : 'html';
|
88 |
-
if ( mode === 'tmce' ) {
|
89 |
-
var editor = window.tinymce.get( id );
|
90 |
-
// Quick bit of sanitization to prevent catastrophic backtracking in TinyMCE HTML parser regex
|
91 |
-
if ( editor !== null ) {
|
92 |
-
var content = $textarea.val();
|
93 |
-
if ( content.search( '<' ) !== -1 && content.search( '>' ) === -1) {
|
94 |
-
content = content.replace( /</g, '' );
|
95 |
-
$textarea.val( content );
|
96 |
-
}
|
97 |
-
editor.setContent(window.switchEditors.wpautop(content));
|
98 |
-
}
|
99 |
-
}
|
100 |
-
settings.selectedEditor = mode;
|
101 |
-
$field.find( '.siteorigin-widget-tinymce-selected-editor' ).val( mode );
|
102 |
-
} );
|
103 |
-
|
104 |
-
$field.data( 'initialized', true );
|
105 |
-
};
|
106 |
-
|
107 |
-
$( document ).on( 'sowsetupformfield', '.siteorigin-widget-field-type-tinymce', function () {
|
108 |
-
var $field = $( this );
|
109 |
-
var $parentRepeaterItem = $field.closest( '.siteorigin-widget-field-repeater-item-form' );
|
110 |
-
|
111 |
-
if ( $parentRepeaterItem.length > 0 ) {
|
112 |
-
if ( $parentRepeaterItem.is( ':visible' ) ) {
|
113 |
-
setup( $field );
|
114 |
-
}
|
115 |
-
else {
|
116 |
-
$parentRepeaterItem.on('slideToggleOpenComplete', function onSlideToggleComplete() {
|
117 |
-
if ( $parentRepeaterItem.is( ':visible' ) ) {
|
118 |
-
setup( $field );
|
119 |
-
$parentRepeaterItem.off( 'slideToggleOpenComplete' );
|
120 |
-
}
|
121 |
-
});
|
122 |
-
}
|
123 |
-
}
|
124 |
-
else {
|
125 |
-
setup( $field );
|
126 |
-
}
|
127 |
-
});
|
128 |
-
|
129 |
-
$( document ).on( 'sortstop', function ( event, ui ) {
|
130 |
-
var $form;
|
131 |
-
if ( ui.item.is( '.siteorigin-widget-field-repeater-item' ) ) {
|
132 |
-
$form = ui.item.find( '> .siteorigin-widget-field-repeater-item-form' );
|
133 |
-
}
|
134 |
-
else {
|
135 |
-
$form = ui.item.find('.siteorigin-widget-form');
|
136 |
-
}
|
137 |
-
|
138 |
-
$form.find( '.siteorigin-widget-field-type-tinymce' ).each( function () {
|
139 |
-
$( this ).data( 'initialized', null );
|
140 |
-
setup( $( this ) );
|
141 |
-
} );
|
142 |
-
|
143 |
-
});
|
144 |
-
|
145 |
-
})( jQuery );
|
1 |
+
/* global tinymce, switchEditors */
|
2 |
+
|
3 |
+
(function ( $ ) {
|
4 |
+
var setup = function( $field ) {
|
5 |
+
|
6 |
+
if ( $field.data( 'initialized' ) ) {
|
7 |
+
return;
|
8 |
+
}
|
9 |
+
|
10 |
+
var wpEditor = wp.oldEditor ? wp.oldEditor : wp.editor;
|
11 |
+
if ( wpEditor && wpEditor.hasOwnProperty( 'autop' ) ) {
|
12 |
+
wp.editor.autop = wpEditor.autop;
|
13 |
+
wp.editor.removep = wpEditor.removep;
|
14 |
+
wp.editor.initialize = wpEditor.initialize
|
15 |
+
}
|
16 |
+
|
17 |
+
var $container = $field.find( '.siteorigin-widget-tinymce-container' );
|
18 |
+
var settings = $container.data( 'editorSettings' );
|
19 |
+
var $wpautopToggleField;
|
20 |
+
if ( settings.wpautopToggleField ) {
|
21 |
+
var $widgetForm = $container.closest( '.siteorigin-widget-form' );
|
22 |
+
$wpautopToggleField = $widgetForm.find( settings.wpautopToggleField );
|
23 |
+
settings.tinymce.wpautop = $wpautopToggleField.is( ':checked' );
|
24 |
+
}
|
25 |
+
var $textarea = $container.find( 'textarea' );
|
26 |
+
var id = $textarea.attr( 'id' );
|
27 |
+
var setupEditor = function ( editor ) {
|
28 |
+
editor.on( 'change',
|
29 |
+
function () {
|
30 |
+
var ed = window.tinymce.get( id );
|
31 |
+
ed.save();
|
32 |
+
$textarea.trigger( 'change' );
|
33 |
+
}
|
34 |
+
);
|
35 |
+
if ( $wpautopToggleField ) {
|
36 |
+
$wpautopToggleField.off( 'change' );
|
37 |
+
$wpautopToggleField.on( 'change', function () {
|
38 |
+
wp.editor.remove( id );
|
39 |
+
settings.tinymce.wpautop = $wpautopToggleField.is( ':checked' );
|
40 |
+
wp.editor.initialize( id, settings );
|
41 |
+
} );
|
42 |
+
}
|
43 |
+
};
|
44 |
+
|
45 |
+
if ( settings.tinymce ) {
|
46 |
+
settings.tinymce = $.extend( {}, settings.tinymce, { selector: '#' + id, setup: setupEditor } );
|
47 |
+
}
|
48 |
+
$( document ).on( 'wp-before-tinymce-init', function ( event, init ) {
|
49 |
+
if ( init.selector === settings.tinymce.selector ) {
|
50 |
+
var mediaButtons = $container.data( 'mediaButtons' );
|
51 |
+
if ( $field.find( '.wp-media-buttons' ).length === 0 ) {
|
52 |
+
$field.find( '.wp-editor-tabs' ).before( mediaButtons.html );
|
53 |
+
}
|
54 |
+
}
|
55 |
+
} );
|
56 |
+
$( document ).on( 'tinymce-editor-setup', function () {
|
57 |
+
var $wpEditorWrap = $field.find( '.wp-editor-wrap' );
|
58 |
+
if ( $wpEditorWrap.length > 0 && ! $wpEditorWrap.hasClass( settings.selectedEditor + '-active' ) ) {
|
59 |
+
setTimeout( function () {
|
60 |
+
window.switchEditors.go( id );
|
61 |
+
}, 10 );
|
62 |
+
}
|
63 |
+
} );
|
64 |
+
|
65 |
+
wpEditor.remove( id );
|
66 |
+
if ( window.tinymce ) {
|
67 |
+
window.tinymce.EditorManager.overrideDefaults( { base_url: settings.baseURL, suffix: settings.suffix } );
|
68 |
+
}
|
69 |
+
// Wait for textarea to be visible before initialization.
|
70 |
+
if ( $textarea.is( ':visible' ) ) {
|
71 |
+
wpEditor.initialize( id, settings );
|
72 |
+
}
|
73 |
+
else {
|
74 |
+
var intervalId = setInterval( function () {
|
75 |
+
if ( $textarea.is( ':visible' ) ) {
|
76 |
+
wpEditor.initialize( id, settings );
|
77 |
+
clearInterval( intervalId );
|
78 |
+
}
|
79 |
+
}, 500);
|
80 |
+
}
|
81 |
+
|
82 |
+
$field.on( 'click', function ( event ) {
|
83 |
+
var $target = $( event.target );
|
84 |
+
if ( ! $target.is( '.wp-switch-editor' ) ) {
|
85 |
+
return;
|
86 |
+
}
|
87 |
+
var mode = $target.hasClass( 'switch-tmce' ) ? 'tmce' : 'html';
|
88 |
+
if ( mode === 'tmce' ) {
|
89 |
+
var editor = window.tinymce.get( id );
|
90 |
+
// Quick bit of sanitization to prevent catastrophic backtracking in TinyMCE HTML parser regex
|
91 |
+
if ( editor !== null ) {
|
92 |
+
var content = $textarea.val();
|
93 |
+
if ( content.search( '<' ) !== -1 && content.search( '>' ) === -1) {
|
94 |
+
content = content.replace( /</g, '' );
|
95 |
+
$textarea.val( content );
|
96 |
+
}
|
97 |
+
editor.setContent(window.switchEditors.wpautop(content));
|
98 |
+
}
|
99 |
+
}
|
100 |
+
settings.selectedEditor = mode;
|
101 |
+
$field.find( '.siteorigin-widget-tinymce-selected-editor' ).val( mode );
|
102 |
+
} );
|
103 |
+
|
104 |
+
$field.data( 'initialized', true );
|
105 |
+
};
|
106 |
+
|
107 |
+
$( document ).on( 'sowsetupformfield', '.siteorigin-widget-field-type-tinymce', function () {
|
108 |
+
var $field = $( this );
|
109 |
+
var $parentRepeaterItem = $field.closest( '.siteorigin-widget-field-repeater-item-form' );
|
110 |
+
|
111 |
+
if ( $parentRepeaterItem.length > 0 ) {
|
112 |
+
if ( $parentRepeaterItem.is( ':visible' ) ) {
|
113 |
+
setup( $field );
|
114 |
+
}
|
115 |
+
else {
|
116 |
+
$parentRepeaterItem.on('slideToggleOpenComplete', function onSlideToggleComplete() {
|
117 |
+
if ( $parentRepeaterItem.is( ':visible' ) ) {
|
118 |
+
setup( $field );
|
119 |
+
$parentRepeaterItem.off( 'slideToggleOpenComplete' );
|
120 |
+
}
|
121 |
+
});
|
122 |
+
}
|
123 |
+
}
|
124 |
+
else {
|
125 |
+
setup( $field );
|
126 |
+
}
|
127 |
+
});
|
128 |
+
|
129 |
+
$( document ).on( 'sortstop', function ( event, ui ) {
|
130 |
+
var $form;
|
131 |
+
if ( ui.item.is( '.siteorigin-widget-field-repeater-item' ) ) {
|
132 |
+
$form = ui.item.find( '> .siteorigin-widget-field-repeater-item-form' );
|
133 |
+
}
|
134 |
+
else {
|
135 |
+
$form = ui.item.find('.siteorigin-widget-form');
|
136 |
+
}
|
137 |
+
|
138 |
+
$form.find( '.siteorigin-widget-field-type-tinymce' ).each( function () {
|
139 |
+
$( this ).data( 'initialized', null );
|
140 |
+
setup( $( this ) );
|
141 |
+
} );
|
142 |
+
|
143 |
+
});
|
144 |
+
|
145 |
+
})( jQuery );
|
base/inc/fields/multi-measurement.class.php
CHANGED
@@ -1,122 +1,122 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget_Field_Multi_Measurement
|
5 |
-
*/
|
6 |
-
class SiteOrigin_Widget_Field_Multi_Measurement extends SiteOrigin_Widget_Field_Text_Input_Base {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Configuration of the measurements to be taken. Should be in the form:
|
10 |
-
* `array(
|
11 |
-
* 'padding_left' => array(
|
12 |
-
* 'label' => __( 'Padding left', 'so-widgets-bundle' ),
|
13 |
-
* 'units' => array( 'px', 'rem', 'em', '%' ),
|
14 |
-
* ),
|
15 |
-
* 'padding_right' => __( 'Padding right', 'so-widgets-bundle' ),
|
16 |
-
* 'padding_bottom' => __( 'Padding bottom', 'so-widgets-bundle' ),
|
17 |
-
* 'padding_top' => __( 'Padding top', 'so-widgets-bundle' ),
|
18 |
-
* )`
|
19 |
-
*
|
20 |
-
* The 'units' property is optional and defaults to the list returned by `siteorigin_widgets_get_measurements_list`.
|
21 |
-
*
|
22 |
-
* @access protected
|
23 |
-
* @var array
|
24 |
-
*/
|
25 |
-
protected $measurements;
|
26 |
-
|
27 |
-
/**
|
28 |
-
* String separator for the measurements. Default is an empty space.
|
29 |
-
*
|
30 |
-
* @access protected
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
protected $separator;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Whether to automatically fill the rest of the inputs when the first value is entered.
|
37 |
-
* Default is false.
|
38 |
-
*
|
39 |
-
* @access protected
|
40 |
-
* @var boolean
|
41 |
-
*/
|
42 |
-
protected $autofill;
|
43 |
-
|
44 |
-
protected function get_default_options() {
|
45 |
-
return array(
|
46 |
-
'separator' => ' ',
|
47 |
-
'autofill' => false,
|
48 |
-
);
|
49 |
-
}
|
50 |
-
|
51 |
-
protected function render_field( $value, $instance ) {
|
52 |
-
?>
|
53 |
-
<div class="sow-multi-measurement-container">
|
54 |
-
<?php
|
55 |
-
foreach ( $this->measurements as $name => $measurement_config ) {
|
56 |
-
|
57 |
-
if ( is_array( $measurement_config ) ) {
|
58 |
-
$label = empty( $measurement_config['label'] ) ? '' : $measurement_config['label'];
|
59 |
-
} else {
|
60 |
-
$label = $measurement_config;
|
61 |
-
}
|
62 |
-
$default_measurements = siteorigin_widgets_get_measurements_list();
|
63 |
-
$units = empty( $measurement_config['units'] ) ?
|
64 |
-
$default_measurements :
|
65 |
-
$measurement_config['units'];
|
66 |
-
if ( empty( $units ) ) {
|
67 |
-
$units = array( 'px' );
|
68 |
-
}
|
69 |
-
$input_id = $this->element_id . '-' . $name;
|
70 |
-
?>
|
71 |
-
<div class="sow-multi-measurement-input-container">
|
72 |
-
<label for="<?php echo esc_attr( $input_id ) ?>"><?php echo esc_html( $label ) ?></label>
|
73 |
-
<input id="<?php echo esc_attr( $input_id ) ?>" type="text" class="sow-multi-measurement-input">
|
74 |
-
<select class="sow-multi-measurement-select-unit">
|
75 |
-
<?php foreach ( (array) $units as $unit ):?>
|
76 |
-
<option value="<?php echo esc_attr( $unit ) ?>"><?php echo esc_html( $unit ) ?></option>
|
77 |
-
<?php endforeach?>
|
78 |
-
</select>
|
79 |
-
<div class="clear"></div>
|
80 |
-
</div>
|
81 |
-
<?php
|
82 |
-
}
|
83 |
-
?>
|
84 |
-
</div>
|
85 |
-
<input type="hidden"
|
86 |
-
class="siteorigin-widget-input"
|
87 |
-
value="<?php echo esc_attr( $value ) ?>"
|
88 |
-
name="<?php echo esc_attr( $this->element_name ) ?>"
|
89 |
-
data-autofill="<?php echo empty( $this->autofill ) ? 'false' : 'true'; ?>"
|
90 |
-
data-separator="<?php echo esc_attr( $this->separator ) ?>"/><?php
|
91 |
-
}
|
92 |
-
|
93 |
-
public function enqueue_scripts() {
|
94 |
-
wp_enqueue_style( 'so-multi-measurement-field', plugin_dir_url( __FILE__ ) . 'css/multi-measurement-field.css', array(),
|
95 |
-
SOW_BUNDLE_VERSION );
|
96 |
-
wp_enqueue_script( 'so-multi-measurement-field',
|
97 |
-
plugin_dir_url( __FILE__ ) . 'js/multi-measurement-field' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'jquery' ),
|
98 |
-
SOW_BUNDLE_VERSION );
|
99 |
-
}
|
100 |
-
|
101 |
-
protected function sanitize_field_input( $value, $instance ) {
|
102 |
-
if ( empty( $value ) ) {
|
103 |
-
return $value;
|
104 |
-
}
|
105 |
-
|
106 |
-
$values = explode( $this->separator, $value );
|
107 |
-
$any_values = false;
|
108 |
-
foreach ( $values as $index => $measurement ) {
|
109 |
-
$any_values = $any_values || ! empty( $measurement );
|
110 |
-
preg_match('/(\d+\.?\d*)([a-z%]+)*/', $measurement, $matches);
|
111 |
-
|
112 |
-
$num_matches = count( $matches );
|
113 |
-
|
114 |
-
$val = $num_matches > 1 ? $matches[1] : '0';
|
115 |
-
$unit = $num_matches > 2 ? $matches[2] : 'px';
|
116 |
-
$measurement = $val . $unit;
|
117 |
-
$values[ $index ] = $measurement;
|
118 |
-
}
|
119 |
-
// If all values are empty, just return an empty string.
|
120 |
-
return $any_values ? implode( $this->separator, $values ) : '';
|
121 |
-
}
|
122 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget_Field_Multi_Measurement
|
5 |
+
*/
|
6 |
+
class SiteOrigin_Widget_Field_Multi_Measurement extends SiteOrigin_Widget_Field_Text_Input_Base {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Configuration of the measurements to be taken. Should be in the form:
|
10 |
+
* `array(
|
11 |
+
* 'padding_left' => array(
|
12 |
+
* 'label' => __( 'Padding left', 'so-widgets-bundle' ),
|
13 |
+
* 'units' => array( 'px', 'rem', 'em', '%' ),
|
14 |
+
* ),
|
15 |
+
* 'padding_right' => __( 'Padding right', 'so-widgets-bundle' ),
|
16 |
+
* 'padding_bottom' => __( 'Padding bottom', 'so-widgets-bundle' ),
|
17 |
+
* 'padding_top' => __( 'Padding top', 'so-widgets-bundle' ),
|
18 |
+
* )`
|
19 |
+
*
|
20 |
+
* The 'units' property is optional and defaults to the list returned by `siteorigin_widgets_get_measurements_list`.
|
21 |
+
*
|
22 |
+
* @access protected
|
23 |
+
* @var array
|
24 |
+
*/
|
25 |
+
protected $measurements;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* String separator for the measurements. Default is an empty space.
|
29 |
+
*
|
30 |
+
* @access protected
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
protected $separator;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Whether to automatically fill the rest of the inputs when the first value is entered.
|
37 |
+
* Default is false.
|
38 |
+
*
|
39 |
+
* @access protected
|
40 |
+
* @var boolean
|
41 |
+
*/
|
42 |
+
protected $autofill;
|
43 |
+
|
44 |
+
protected function get_default_options() {
|
45 |
+
return array(
|
46 |
+
'separator' => ' ',
|
47 |
+
'autofill' => false,
|
48 |
+
);
|
49 |
+
}
|
50 |
+
|
51 |
+
protected function render_field( $value, $instance ) {
|
52 |
+
?>
|
53 |
+
<div class="sow-multi-measurement-container">
|
54 |
+
<?php
|
55 |
+
foreach ( $this->measurements as $name => $measurement_config ) {
|
56 |
+
|
57 |
+
if ( is_array( $measurement_config ) ) {
|
58 |
+
$label = empty( $measurement_config['label'] ) ? '' : $measurement_config['label'];
|
59 |
+
} else {
|
60 |
+
$label = $measurement_config;
|
61 |
+
}
|
62 |
+
$default_measurements = siteorigin_widgets_get_measurements_list();
|
63 |
+
$units = empty( $measurement_config['units'] ) ?
|
64 |
+
$default_measurements :
|
65 |
+
$measurement_config['units'];
|
66 |
+
if ( empty( $units ) ) {
|
67 |
+
$units = array( 'px' );
|
68 |
+
}
|
69 |
+
$input_id = $this->element_id . '-' . $name;
|
70 |
+
?>
|
71 |
+
<div class="sow-multi-measurement-input-container">
|
72 |
+
<label for="<?php echo esc_attr( $input_id ) ?>"><?php echo esc_html( $label ) ?></label>
|
73 |
+
<input id="<?php echo esc_attr( $input_id ) ?>" type="text" class="sow-multi-measurement-input">
|
74 |
+
<select class="sow-multi-measurement-select-unit">
|
75 |
+
<?php foreach ( (array) $units as $unit ):?>
|
76 |
+
<option value="<?php echo esc_attr( $unit ) ?>"><?php echo esc_html( $unit ) ?></option>
|
77 |
+
<?php endforeach?>
|
78 |
+
</select>
|
79 |
+
<div class="clear"></div>
|
80 |
+
</div>
|
81 |
+
<?php
|
82 |
+
}
|
83 |
+
?>
|
84 |
+
</div>
|
85 |
+
<input type="hidden"
|
86 |
+
class="siteorigin-widget-input"
|
87 |
+
value="<?php echo esc_attr( $value ) ?>"
|
88 |
+
name="<?php echo esc_attr( $this->element_name ) ?>"
|
89 |
+
data-autofill="<?php echo empty( $this->autofill ) ? 'false' : 'true'; ?>"
|
90 |
+
data-separator="<?php echo esc_attr( $this->separator ) ?>"/><?php
|
91 |
+
}
|
92 |
+
|
93 |
+
public function enqueue_scripts() {
|
94 |
+
wp_enqueue_style( 'so-multi-measurement-field', plugin_dir_url( __FILE__ ) . 'css/multi-measurement-field.css', array(),
|
95 |
+
SOW_BUNDLE_VERSION );
|
96 |
+
wp_enqueue_script( 'so-multi-measurement-field',
|
97 |
+
plugin_dir_url( __FILE__ ) . 'js/multi-measurement-field' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'jquery' ),
|
98 |
+
SOW_BUNDLE_VERSION );
|
99 |
+
}
|
100 |
+
|
101 |
+
protected function sanitize_field_input( $value, $instance ) {
|
102 |
+
if ( empty( $value ) ) {
|
103 |
+
return $value;
|
104 |
+
}
|
105 |
+
|
106 |
+
$values = explode( $this->separator, $value );
|
107 |
+
$any_values = false;
|
108 |
+
foreach ( $values as $index => $measurement ) {
|
109 |
+
$any_values = $any_values || ! empty( $measurement );
|
110 |
+
preg_match('/(\d+\.?\d*)([a-z%]+)*/', $measurement, $matches);
|
111 |
+
|
112 |
+
$num_matches = count( $matches );
|
113 |
+
|
114 |
+
$val = $num_matches > 1 ? $matches[1] : '0';
|
115 |
+
$unit = $num_matches > 2 ? $matches[2] : 'px';
|
116 |
+
$measurement = $val . $unit;
|
117 |
+
$values[ $index ] = $measurement;
|
118 |
+
}
|
119 |
+
// If all values are empty, just return an empty string.
|
120 |
+
return $any_values ? implode( $this->separator, $values ) : '';
|
121 |
+
}
|
122 |
+
}
|
base/inc/fields/order.class.php
CHANGED
@@ -1,61 +1,61 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget_Field_Order
|
5 |
-
*/
|
6 |
-
class SiteOrigin_Widget_Field_Order extends SiteOrigin_Widget_Field_Base {
|
7 |
-
|
8 |
-
protected $options;
|
9 |
-
|
10 |
-
protected function render_field( $value, $instance ) {
|
11 |
-
|
12 |
-
$value = $this->sanitize_field_input( $value, $instance );
|
13 |
-
|
14 |
-
if( ! empty( $this->options ) && ! empty( $value ) ) {
|
15 |
-
?><div class="siteorigin-widget-order-items"><?php
|
16 |
-
foreach( $value as $key ) {
|
17 |
-
?>
|
18 |
-
<div class="siteorigin-widget-order-item" data-value="<?php echo esc_attr( $key ) ?>">
|
19 |
-
<?php echo esc_html( $this->options[ $key ] ) ?>
|
20 |
-
</div>
|
21 |
-
<?php
|
22 |
-
}
|
23 |
-
?></div><?php
|
24 |
-
}
|
25 |
-
|
26 |
-
?>
|
27 |
-
<input
|
28 |
-
type="hidden"
|
29 |
-
name="<?php echo esc_attr( $this->element_name ) ?>"
|
30 |
-
id="<?php echo esc_attr( $this->element_id ) ?>"
|
31 |
-
class="siteorigin-widget-input"
|
32 |
-
value="<?php echo esc_attr( implode( ',', $value ) ) ?>">
|
33 |
-
<?php
|
34 |
-
|
35 |
-
}
|
36 |
-
|
37 |
-
protected function sanitize_field_input( $value, $instance ) {
|
38 |
-
if( is_string( $value ) ) {
|
39 |
-
$value = explode(',', $value);
|
40 |
-
$value = array_map( 'trim', $value );
|
41 |
-
}
|
42 |
-
|
43 |
-
if ( ! is_array( $value ) ) {
|
44 |
-
$value = array();
|
45 |
-
}
|
46 |
-
|
47 |
-
foreach( $value as $i => $k ) {
|
48 |
-
if( empty( $this->options[$k] ) ) {
|
49 |
-
unset( $value[ $i ] );
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
return $value;
|
54 |
-
}
|
55 |
-
|
56 |
-
public function enqueue_scripts() {
|
57 |
-
wp_enqueue_script( 'so-order-field', plugin_dir_url(__FILE__) . 'js/order-field' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'jquery', 'jquery-ui-sortable' ), SOW_BUNDLE_VERSION );
|
58 |
-
wp_enqueue_style( 'so-order-field', plugin_dir_url(__FILE__) . 'css/order-field.css', array( ), SOW_BUNDLE_VERSION );
|
59 |
-
}
|
60 |
-
|
61 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget_Field_Order
|
5 |
+
*/
|
6 |
+
class SiteOrigin_Widget_Field_Order extends SiteOrigin_Widget_Field_Base {
|
7 |
+
|
8 |
+
protected $options;
|
9 |
+
|
10 |
+
protected function render_field( $value, $instance ) {
|
11 |
+
|
12 |
+
$value = $this->sanitize_field_input( $value, $instance );
|
13 |
+
|
14 |
+
if( ! empty( $this->options ) && ! empty( $value ) ) {
|
15 |
+
?><div class="siteorigin-widget-order-items"><?php
|
16 |
+
foreach( $value as $key ) {
|
17 |
+
?>
|
18 |
+
<div class="siteorigin-widget-order-item" data-value="<?php echo esc_attr( $key ) ?>">
|
19 |
+
<?php echo esc_html( $this->options[ $key ] ) ?>
|
20 |
+
</div>
|
21 |
+
<?php
|
22 |
+
}
|
23 |
+
?></div><?php
|
24 |
+
}
|
25 |
+
|
26 |
+
?>
|
27 |
+
<input
|
28 |
+
type="hidden"
|
29 |
+
name="<?php echo esc_attr( $this->element_name ) ?>"
|
30 |
+
id="<?php echo esc_attr( $this->element_id ) ?>"
|
31 |
+
class="siteorigin-widget-input"
|
32 |
+
value="<?php echo esc_attr( implode( ',', $value ) ) ?>">
|
33 |
+
<?php
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
protected function sanitize_field_input( $value, $instance ) {
|
38 |
+
if( is_string( $value ) ) {
|
39 |
+
$value = explode(',', $value);
|
40 |
+
$value = array_map( 'trim', $value );
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( ! is_array( $value ) ) {
|
44 |
+
$value = array();
|
45 |
+
}
|
46 |
+
|
47 |
+
foreach( $value as $i => $k ) {
|
48 |
+
if( empty( $this->options[$k] ) ) {
|
49 |
+
unset( $value[ $i ] );
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
return $value;
|
54 |
+
}
|
55 |
+
|
56 |
+
public function enqueue_scripts() {
|
57 |
+
wp_enqueue_script( 'so-order-field', plugin_dir_url(__FILE__) . 'js/order-field' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'jquery', 'jquery-ui-sortable' ), SOW_BUNDLE_VERSION );
|
58 |
+
wp_enqueue_style( 'so-order-field', plugin_dir_url(__FILE__) . 'css/order-field.css', array( ), SOW_BUNDLE_VERSION );
|
59 |
+
}
|
60 |
+
|
61 |
+
}
|
base/inc/fields/posts.class.php
CHANGED
@@ -1,203 +1,203 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget_Field_Posts
|
5 |
-
*/
|
6 |
-
class SiteOrigin_Widget_Field_Posts extends SiteOrigin_Widget_Field_Container_Base {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* An array of post types to use in the query for posts when the 'Select Content' button is clicked.
|
10 |
-
*
|
11 |
-
* @access protected
|
12 |
-
* @var array
|
13 |
-
*/
|
14 |
-
protected $post_types;
|
15 |
-
|
16 |
-
public function __construct( $base_name, $element_id, $element_name, $field_options, SiteOrigin_Widget $for_widget, $parent_container = array() ) {
|
17 |
-
parent::__construct( $base_name, $element_id, $element_name, $field_options, $for_widget, $parent_container );
|
18 |
-
|
19 |
-
$types = get_post_types( array( 'public' => true ), 'objects' );
|
20 |
-
$type_options = array();
|
21 |
-
|
22 |
-
if ( empty( $this->post_types ) || in_array( '_all', $this->post_types ) ) {
|
23 |
-
$type_options['_all'] = __( 'All', 'so-widgets-bundle' );
|
24 |
-
}
|
25 |
-
|
26 |
-
foreach ( $types as $id => $type ) {
|
27 |
-
if ( empty( $this->post_types ) || in_array( $id, $this->post_types ) ) {
|
28 |
-
$type_options[ $id ] = $type->labels->name;
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
$this->fields = array(
|
33 |
-
|
34 |
-
'post_type' => array(
|
35 |
-
'type' => 'select',
|
36 |
-
'label' => __( 'Post type', 'so-widgets-bundle' ),
|
37 |
-
'multiple' => true,
|
38 |
-
'options' => $type_options,
|
39 |
-
'default' => 'post'
|
40 |
-
),
|
41 |
-
|
42 |
-
'post__in' => array(
|
43 |
-
'type' => 'autocomplete',
|
44 |
-
'label' => __( 'Post in', 'so-widgets-bundle' ),
|
45 |
-
'source' => 'posts',
|
46 |
-
),
|
47 |
-
|
48 |
-
'tax_query' => array(
|
49 |
-
'type' => 'autocomplete',
|
50 |
-
'label' => __( 'Taxonomies', 'so-widgets-bundle' ),
|
51 |
-
'source' => 'terms',
|
52 |
-
'description' => __( 'Taxonomies are groups such as categories, tags, posts and products.', 'so-widgets-bundle' ),
|
53 |
-
),
|
54 |
-
|
55 |
-
'date_type' => array(
|
56 |
-
'type' => 'radio',
|
57 |
-
'label' => __( 'Date selection type', 'so-widgets-bundle' ),
|
58 |
-
'options' => array(
|
59 |
-
'specific' => __( 'Specific', 'so-widgets-bundle' ),
|
60 |
-
'relative' => __( 'Relative', 'so-widgets-bundle' ),
|
61 |
-
),
|
62 |
-
'description' => __( 'Select a range between specific dates or relative to the current date.', 'so-widgets-bundle' ),
|
63 |
-
'default' => 'specific',
|
64 |
-
'state_emitter' => array(
|
65 |
-
'callback' => 'select',
|
66 |
-
'args' => array( 'date_type' )
|
67 |
-
),
|
68 |
-
),
|
69 |
-
|
70 |
-
'date_query' => array(
|
71 |
-
'type' => 'date-range',
|
72 |
-
'label' => __( 'Dates', 'so-widgets-bundle' ),
|
73 |
-
'date_type' => 'specific',
|
74 |
-
'state_handler' => array(
|
75 |
-
'date_type[specific]' => array('show'),
|
76 |
-
'_else[date_type]' => array('hide'),
|
77 |
-
),
|
78 |
-
),
|
79 |
-
|
80 |
-
'date_query_relative' => array(
|
81 |
-
'type' => 'date-range',
|
82 |
-
'label' => __( 'Dates', 'so-widgets-bundle' ),
|
83 |
-
'date_type' => 'relative',
|
84 |
-
'state_handler' => array(
|
85 |
-
'date_type[relative]' => array('show'),
|
86 |
-
'_else[date_type]' => array('hide'),
|
87 |
-
),
|
88 |
-
),
|
89 |
-
|
90 |
-
'orderby' => array(
|
91 |
-
'type' => 'select',
|
92 |
-
'label' => __( 'Order by', 'so-widgets-bundle' ),
|
93 |
-
'options' => array(
|
94 |
-
'none' => __( 'No order', 'so-widgets-bundle' ),
|
95 |
-
'ID' => __( 'Post ID', 'so-widgets-bundle' ),
|
96 |
-
'author' => __( 'Author', 'so-widgets-bundle' ),
|
97 |
-
'title' => __( 'Title', 'so-widgets-bundle' ),
|
98 |
-
'date' => __( 'Published date', 'so-widgets-bundle' ),
|
99 |
-
'modified' => __( 'Modified date', 'so-widgets-bundle' ),
|
100 |
-
'parent' => __( 'By parent', 'so-widgets-bundle' ),
|
101 |
-
'rand' => __( 'Random order', 'so-widgets-bundle' ),
|
102 |
-
'comment_count' => __( 'Comment count', 'so-widgets-bundle' ),
|
103 |
-
'menu_order' => __( 'Menu order', 'so-widgets-bundle' ),
|
104 |
-
'meta_value' => __( 'By meta value', 'so-widgets-bundle' ),
|
105 |
-
'meta_value_num' => __( 'By numeric meta value', 'so-widgets-bundle' ),
|
106 |
-
'post__in' => __( 'By include order', 'so-widgets-bundle' ),
|
107 |
-
),
|
108 |
-
'default' => 'date',
|
109 |
-
),
|
110 |
-
|
111 |
-
'order' => array(
|
112 |
-
'type' => 'radio',
|
113 |
-
'label' => __( 'Order direction', 'so-widgets-bundle' ),
|
114 |
-
'options' => array(
|
115 |
-
'ASC' => __( 'Ascending', 'so-widgets-bundle' ),
|
116 |
-
'DESC' => __( 'Descending', 'so-widgets-bundle' ),
|
117 |
-
),
|
118 |
-
'default' => 'DESC',
|
119 |
-
),
|
120 |
-
|
121 |
-
'posts_per_page' => array(
|
122 |
-
'type' => 'number',
|
123 |
-
'label' => __( 'Posts per page', 'so-widgets-bundle' ),
|
124 |
-
),
|
125 |
-
|
126 |
-
'sticky' => array(
|
127 |
-
'type' => 'select',
|
128 |
-
'label' => __( 'Sticky posts', 'so-widgets-bundle' ),
|
129 |
-
'options' => array(
|
130 |
-
'' => __( 'Default', 'so-widgets-bundle' ),
|
131 |
-
'ignore' => __( 'Ignore sticky', 'so-widgets-bundle' ),
|
132 |
-
'exclude' => __( 'Exclude sticky', 'so-widgets-bundle' ),
|
133 |
-
'only' => __( 'Only sticky', 'so-widgets-bundle' ),
|
134 |
-
),
|
135 |
-
),
|
136 |
-
|
137 |
-
'additional' => array(
|
138 |
-
'type' => 'text',
|
139 |
-
'label' => __( 'Additional', 'so-widgets-bundle' ),
|
140 |
-
'description' => __( 'Additional query arguments. See <a href="http://codex.wordpress.org/Function_Reference/query_posts" target="_blank" rel="noopener noreferrer">query_posts</a>.', 'so-widgets-bundle' ),
|
141 |
-
),
|
142 |
-
);
|
143 |
-
}
|
144 |
-
|
145 |
-
protected function render_field_label( $value, $instance ) {
|
146 |
-
?><div class="posts-container-label-wrapper<?php if ( $this->state == 'open' ) {
|
147 |
-
echo ' siteorigin-widget-section-visible';
|
148 |
-
} ?>"><?php
|
149 |
-
parent::render_field_label( $value, $instance );
|
150 |
-
?><span class="sow-current-count"><?php echo esc_html( siteorigin_widget_post_selector_count_posts( $value ) )?></span>
|
151 |
-
</div><?php
|
152 |
-
}
|
153 |
-
|
154 |
-
protected function render_field( $value, $instance ) {
|
155 |
-
$value = wp_parse_args( $value );
|
156 |
-
|
157 |
-
if( !empty( $value['post_type'] ) ) {
|
158 |
-
$value['post_type'] = strpos( $value['post_type'], ',' ) !== false ? explode( ',', $value['post_type'] ) : $value['post_type'];
|
159 |
-
}
|
160 |
-
|
161 |
-
if ( $this->collapsible ) {
|
162 |
-
?><div class="siteorigin-widget-section <?php if ( $this->state == 'closed' ) {
|
163 |
-
echo 'siteorigin-widget-section-hide';
|
164 |
-
} ?>"><?php
|
165 |
-
}
|
166 |
-
|
167 |
-
$this->create_and_render_sub_fields( $value, array( 'name' => $this->base_name, 'type' => 'composite' ) );
|
168 |
-
|
169 |
-
if ( $this->collapsible ) {
|
170 |
-
?></div><?php
|
171 |
-
}
|
172 |
-
}
|
173 |
-
|
174 |
-
public function enqueue_scripts() {
|
175 |
-
wp_enqueue_script(
|
176 |
-
'so-posts-selector-field',
|
177 |
-
plugin_dir_url( __FILE__ ) . 'js/posts-field' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
178 |
-
array( 'jquery' ),
|
179 |
-
SOW_BUNDLE_VERSION,
|
180 |
-
true
|
181 |
-
);
|
182 |
-
}
|
183 |
-
|
184 |
-
protected function sanitize_field_input( $value, $instance ) {
|
185 |
-
// Special handling for the 'additional' args field.
|
186 |
-
if ( ! empty( $value['additional'] ) ) {
|
187 |
-
$value['additional'] = urlencode( $value['additional'] );
|
188 |
-
}
|
189 |
-
$value = parent::sanitize_field_input( $value, $instance );
|
190 |
-
$result = '';
|
191 |
-
foreach ( $value as $key => $item ) {
|
192 |
-
if ( ! empty( $item ) ) {
|
193 |
-
if ( is_array( $item ) ) {
|
194 |
-
$item = implode( ',', $item );
|
195 |
-
}
|
196 |
-
$result .= ( empty( $result ) ? '' : '&' ) . $key . '=' . $item;
|
197 |
-
}
|
198 |
-
}
|
199 |
-
|
200 |
-
return $result;
|
201 |
-
}
|
202 |
-
|
203 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget_Field_Posts
|
5 |
+
*/
|
6 |
+
class SiteOrigin_Widget_Field_Posts extends SiteOrigin_Widget_Field_Container_Base {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* An array of post types to use in the query for posts when the 'Select Content' button is clicked.
|
10 |
+
*
|
11 |
+
* @access protected
|
12 |
+
* @var array
|
13 |
+
*/
|
14 |
+
protected $post_types;
|
15 |
+
|
16 |
+
public function __construct( $base_name, $element_id, $element_name, $field_options, SiteOrigin_Widget $for_widget, $parent_container = array() ) {
|
17 |
+
parent::__construct( $base_name, $element_id, $element_name, $field_options, $for_widget, $parent_container );
|
18 |
+
|
19 |
+
$types = get_post_types( array( 'public' => true ), 'objects' );
|
20 |
+
$type_options = array();
|
21 |
+
|
22 |
+
if ( empty( $this->post_types ) || in_array( '_all', $this->post_types ) ) {
|
23 |
+
$type_options['_all'] = __( 'All', 'so-widgets-bundle' );
|
24 |
+
}
|
25 |
+
|
26 |
+
foreach ( $types as $id => $type ) {
|
27 |
+
if ( empty( $this->post_types ) || in_array( $id, $this->post_types ) ) {
|
28 |
+
$type_options[ $id ] = $type->labels->name;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
$this->fields = array(
|
33 |
+
|
34 |
+
'post_type' => array(
|
35 |
+
'type' => 'select',
|
36 |
+
'label' => __( 'Post type', 'so-widgets-bundle' ),
|
37 |
+
'multiple' => true,
|
38 |
+
'options' => $type_options,
|
39 |
+
'default' => 'post'
|
40 |
+
),
|
41 |
+
|
42 |
+
'post__in' => array(
|
43 |
+
'type' => 'autocomplete',
|
44 |
+
'label' => __( 'Post in', 'so-widgets-bundle' ),
|
45 |
+
'source' => 'posts',
|
46 |
+
),
|
47 |
+
|
48 |
+
'tax_query' => array(
|
49 |
+
'type' => 'autocomplete',
|
50 |
+
'label' => __( 'Taxonomies', 'so-widgets-bundle' ),
|
51 |
+
'source' => 'terms',
|
52 |
+
'description' => __( 'Taxonomies are groups such as categories, tags, posts and products.', 'so-widgets-bundle' ),
|
53 |
+
),
|
54 |
+
|
55 |
+
'date_type' => array(
|
56 |
+
'type' => 'radio',
|
57 |
+
'label' => __( 'Date selection type', 'so-widgets-bundle' ),
|
58 |
+
'options' => array(
|
59 |
+
'specific' => __( 'Specific', 'so-widgets-bundle' ),
|
60 |
+
'relative' => __( 'Relative', 'so-widgets-bundle' ),
|
61 |
+
),
|
62 |
+
'description' => __( 'Select a range between specific dates or relative to the current date.', 'so-widgets-bundle' ),
|
63 |
+
'default' => 'specific',
|
64 |
+
'state_emitter' => array(
|
65 |
+
'callback' => 'select',
|
66 |
+
'args' => array( 'date_type' )
|
67 |
+
),
|
68 |
+
),
|
69 |
+
|
70 |
+
'date_query' => array(
|
71 |
+
'type' => 'date-range',
|
72 |
+
'label' => __( 'Dates', 'so-widgets-bundle' ),
|
73 |
+
'date_type' => 'specific',
|
74 |
+
'state_handler' => array(
|
75 |
+
'date_type[specific]' => array('show'),
|
76 |
+
'_else[date_type]' => array('hide'),
|
77 |
+
),
|
78 |
+
),
|
79 |
+
|
80 |
+
'date_query_relative' => array(
|
81 |
+
'type' => 'date-range',
|
82 |
+
'label' => __( 'Dates', 'so-widgets-bundle' ),
|
83 |
+
'date_type' => 'relative',
|
84 |
+
'state_handler' => array(
|
85 |
+
'date_type[relative]' => array('show'),
|
86 |
+
'_else[date_type]' => array('hide'),
|
87 |
+
),
|
88 |
+
),
|
89 |
+
|
90 |
+
'orderby' => array(
|
91 |
+
'type' => 'select',
|
92 |
+
'label' => __( 'Order by', 'so-widgets-bundle' ),
|
93 |
+
'options' => array(
|
94 |
+
'none' => __( 'No order', 'so-widgets-bundle' ),
|
95 |
+
'ID' => __( 'Post ID', 'so-widgets-bundle' ),
|
96 |
+
'author' => __( 'Author', 'so-widgets-bundle' ),
|
97 |
+
'title' => __( 'Title', 'so-widgets-bundle' ),
|
98 |
+
'date' => __( 'Published date', 'so-widgets-bundle' ),
|
99 |
+
'modified' => __( 'Modified date', 'so-widgets-bundle' ),
|
100 |
+
'parent' => __( 'By parent', 'so-widgets-bundle' ),
|
101 |
+
'rand' => __( 'Random order', 'so-widgets-bundle' ),
|
102 |
+
'comment_count' => __( 'Comment count', 'so-widgets-bundle' ),
|
103 |
+
'menu_order' => __( 'Menu order', 'so-widgets-bundle' ),
|
104 |
+
'meta_value' => __( 'By meta value', 'so-widgets-bundle' ),
|
105 |
+
'meta_value_num' => __( 'By numeric meta value', 'so-widgets-bundle' ),
|
106 |
+
'post__in' => __( 'By include order', 'so-widgets-bundle' ),
|
107 |
+
),
|
108 |
+
'default' => 'date',
|
109 |
+
),
|
110 |
+
|
111 |
+
'order' => array(
|
112 |
+
'type' => 'radio',
|
113 |
+
'label' => __( 'Order direction', 'so-widgets-bundle' ),
|
114 |
+
'options' => array(
|
115 |
+
'ASC' => __( 'Ascending', 'so-widgets-bundle' ),
|
116 |
+
'DESC' => __( 'Descending', 'so-widgets-bundle' ),
|
117 |
+
),
|
118 |
+
'default' => 'DESC',
|
119 |
+
),
|
120 |
+
|
121 |
+
'posts_per_page' => array(
|
122 |
+
'type' => 'number',
|
123 |
+
'label' => __( 'Posts per page', 'so-widgets-bundle' ),
|
124 |
+
),
|
125 |
+
|
126 |
+
'sticky' => array(
|
127 |
+
'type' => 'select',
|
128 |
+
'label' => __( 'Sticky posts', 'so-widgets-bundle' ),
|
129 |
+
'options' => array(
|
130 |
+
'' => __( 'Default', 'so-widgets-bundle' ),
|
131 |
+
'ignore' => __( 'Ignore sticky', 'so-widgets-bundle' ),
|
132 |
+
'exclude' => __( 'Exclude sticky', 'so-widgets-bundle' ),
|
133 |
+
'only' => __( 'Only sticky', 'so-widgets-bundle' ),
|
134 |
+
),
|
135 |
+
),
|
136 |
+
|
137 |
+
'additional' => array(
|
138 |
+
'type' => 'text',
|
139 |
+
'label' => __( 'Additional', 'so-widgets-bundle' ),
|
140 |
+
'description' => __( 'Additional query arguments. See <a href="http://codex.wordpress.org/Function_Reference/query_posts" target="_blank" rel="noopener noreferrer">query_posts</a>.', 'so-widgets-bundle' ),
|
141 |
+
),
|
142 |
+
);
|
143 |
+
}
|
144 |
+
|
145 |
+
protected function render_field_label( $value, $instance ) {
|
146 |
+
?><div class="posts-container-label-wrapper<?php if ( $this->state == 'open' ) {
|
147 |
+
echo ' siteorigin-widget-section-visible';
|
148 |
+
} ?>"><?php
|
149 |
+
parent::render_field_label( $value, $instance );
|
150 |
+
?><span class="sow-current-count"><?php echo esc_html( siteorigin_widget_post_selector_count_posts( $value ) )?></span>
|
151 |
+
</div><?php
|
152 |
+
}
|
153 |
+
|
154 |
+
protected function render_field( $value, $instance ) {
|
155 |
+
$value = wp_parse_args( $value );
|
156 |
+
|
157 |
+
if( !empty( $value['post_type'] ) ) {
|
158 |
+
$value['post_type'] = strpos( $value['post_type'], ',' ) !== false ? explode( ',', $value['post_type'] ) : $value['post_type'];
|
159 |
+
}
|
160 |
+
|
161 |
+
if ( $this->collapsible ) {
|
162 |
+
?><div class="siteorigin-widget-section <?php if ( $this->state == 'closed' ) {
|
163 |
+
echo 'siteorigin-widget-section-hide';
|
164 |
+
} ?>"><?php
|
165 |
+
}
|
166 |
+
|
167 |
+
$this->create_and_render_sub_fields( $value, array( 'name' => $this->base_name, 'type' => 'composite' ) );
|
168 |
+
|
169 |
+
if ( $this->collapsible ) {
|
170 |
+
?></div><?php
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
public function enqueue_scripts() {
|
175 |
+
wp_enqueue_script(
|
176 |
+
'so-posts-selector-field',
|
177 |
+
plugin_dir_url( __FILE__ ) . 'js/posts-field' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
178 |
+
array( 'jquery' ),
|
179 |
+
SOW_BUNDLE_VERSION,
|
180 |
+
true
|
181 |
+
);
|
182 |
+
}
|
183 |
+
|
184 |
+
protected function sanitize_field_input( $value, $instance ) {
|
185 |
+
// Special handling for the 'additional' args field.
|
186 |
+
if ( ! empty( $value['additional'] ) ) {
|
187 |
+
$value['additional'] = urlencode( $value['additional'] );
|
188 |
+
}
|
189 |
+
$value = parent::sanitize_field_input( $value, $instance );
|
190 |
+
$result = '';
|
191 |
+
foreach ( $value as $key => $item ) {
|
192 |
+
if ( ! empty( $item ) ) {
|
193 |
+
if ( is_array( $item ) ) {
|
194 |
+
$item = implode( ',', $item );
|
195 |
+
}
|
196 |
+
$result .= ( empty( $result ) ? '' : '&' ) . $key . '=' . $item;
|
197 |
+
}
|
198 |
+
}
|
199 |
+
|
200 |
+
return $result;
|
201 |
+
}
|
202 |
+
|
203 |
+
}
|
base/inc/fields/repeater.class.php
CHANGED
@@ -1,128 +1,128 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget_Field_Repeater
|
5 |
-
*/
|
6 |
-
class SiteOrigin_Widget_Field_Repeater extends SiteOrigin_Widget_Field_Container_Base {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* A default label for each repeated item.
|
10 |
-
*
|
11 |
-
* @access protected
|
12 |
-
* @var string
|
13 |
-
*/
|
14 |
-
protected $item_name;
|
15 |
-
/**
|
16 |
-
* This associative array describes how the repeater may retrieve the item labels from HTML elements as they are
|
17 |
-
* updated. The options are:
|
18 |
-
* - selector string A JQuery selector which is used to find an element from which to retrieve the item label.
|
19 |
-
* - update_event string The JavaScript event on which to bind and update the item label.
|
20 |
-
* - value_method string The JavaScript function which should be used to retrieve the item label from an element.
|
21 |
-
*
|
22 |
-
* @access protected
|
23 |
-
* @var array
|
24 |
-
*/
|
25 |
-
protected $item_label;
|
26 |
-
/**
|
27 |
-
* The maximum number of repeated items to display before adding a scrollbar to the repeater.
|
28 |
-
*
|
29 |
-
* @access protected
|
30 |
-
* @var int
|
31 |
-
*/
|
32 |
-
protected $scroll_count;
|
33 |
-
/**
|
34 |
-
* Whether or not items may be added to or removed from this repeater by user interaction.
|
35 |
-
*
|
36 |
-
* @access protected
|
37 |
-
* @var bool
|
38 |
-
*/
|
39 |
-
protected $readonly;
|
40 |
-
|
41 |
-
protected function render_field( $value, $instance ) {
|
42 |
-
if( !isset( $this->fields ) || empty( $this->fields ) ) return;
|
43 |
-
$container = array( 'name' => $this->base_name, 'type' => 'repeater' );
|
44 |
-
$item_label = isset( $this->item_label ) ? $this->item_label : null;
|
45 |
-
if ( ! empty( $item_label ) ) {
|
46 |
-
// convert underscore naming convention to camelCase for javascript and encode as json string
|
47 |
-
$item_label = wp_parse_args( $item_label, array(
|
48 |
-
'update_event' => 'change',
|
49 |
-
'value_method' => 'val'
|
50 |
-
) );
|
51 |
-
$item_label = siteorigin_widgets_underscores_to_camel_case( $item_label );
|
52 |
-
$item_label = json_encode( $item_label );
|
53 |
-
}
|
54 |
-
if( empty( $this->item_name ) ) $this->item_name = __( 'Item', 'so-widgets-bundle' );
|
55 |
-
?>
|
56 |
-
<div class="siteorigin-widget-field-repeater"
|
57 |
-
data-item-name="<?php echo esc_attr( $this->item_name ) ?>"
|
58 |
-
data-repeater-name="<?php echo esc_attr( $this->base_name ) ?>"
|
59 |
-
data-element-name="<?php echo esc_attr( $this->element_name ) ?>"
|
60 |
-
<?php echo ! empty( $item_label ) ? 'data-item-label="' . esc_attr( $item_label ) . '"' : '' ?>
|
61 |
-
<?php echo ! empty( $this->scroll_count ) ? 'data-scroll-count="' . esc_attr( $this->scroll_count ) . '"' : '' ?>
|
62 |
-
<?php if( ! empty( $this->readonly ) ) echo 'readonly' ?>>
|
63 |
-
<div class="siteorigin-widget-field-repeater-top">
|
64 |
-
<div class="siteorigin-widget-field-repeater-expand"></div>
|
65 |
-
<h3><?php echo esc_html( $this->label ) ?></h3>
|
66 |
-
</div>
|
67 |
-
<div class="siteorigin-widget-field-repeater-items">
|
68 |
-
<?php
|
69 |
-
if( !empty( $value ) ) {
|
70 |
-
foreach( $value as $v ) {
|
71 |
-
?>
|
72 |
-
<div class="siteorigin-widget-field-repeater-item ui-draggable">
|
73 |
-
<div class="siteorigin-widget-field-repeater-item-top">
|
74 |
-
<div class="siteorigin-widget-field-expand"></div>
|
75 |
-
<?php if( empty( $this->readonly ) ) : ?>
|
76 |
-
<div class="siteorigin-widget-field-copy"></div>
|
77 |
-
<div class="siteorigin-widget-field-remove"></div>
|
78 |
-
<?php endif; ?>
|
79 |
-
<h4><?php echo esc_html( $this->item_name ) ?></h4>
|
80 |
-
</div>
|
81 |
-
<div class="siteorigin-widget-field-repeater-item-form">
|
82 |
-
<?php
|
83 |
-
$this->create_and_render_sub_fields( $v, $container );
|
84 |
-
?>
|
85 |
-
</div>
|
86 |
-
</div>
|
87 |
-
<?php
|
88 |
-
}
|
89 |
-
}
|
90 |
-
?>
|
91 |
-
</div>
|
92 |
-
<?php if( empty( $this->readonly ) ) : ?>
|
93 |
-
<div class="siteorigin-widget-field-repeater-add"><?php esc_html_e( 'Add', 'so-widgets-bundle' ) ?></div>
|
94 |
-
<?php endif; ?>
|
95 |
-
<?php
|
96 |
-
ob_start();
|
97 |
-
$this->create_and_render_sub_fields( null, $container, true );
|
98 |
-
$rpt_fields = ob_get_clean();
|
99 |
-
$rpt_fields = preg_replace( '/\s+name\s*=\s*/', ' data-name=', $rpt_fields );
|
100 |
-
?>
|
101 |
-
<div class="siteorigin-widget-field-repeater-item-html" style="display: none;">
|
102 |
-
<?php echo $rpt_fields; ?>
|
103 |
-
</div>
|
104 |
-
</div>
|
105 |
-
<?php
|
106 |
-
}
|
107 |
-
|
108 |
-
protected function render_field_label( $value, $instance ) {
|
109 |
-
// Empty override. This field renders it's own label in the render_field() function.
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Go over the items in the repeater and sanitize each one using the container sanitization function.
|
114 |
-
*
|
115 |
-
* @param mixed $value
|
116 |
-
*
|
117 |
-
* @return array|mixed
|
118 |
-
*/
|
119 |
-
function sanitize_field_input( $value, $instance ){
|
120 |
-
if( empty($value) ) return array();
|
121 |
-
|
122 |
-
foreach( $value as &$el ) {
|
123 |
-
$el = parent::sanitize_field_input( $el, $instance );
|
124 |
-
}
|
125 |
-
|
126 |
-
return $value;
|
127 |
-
}
|
128 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget_Field_Repeater
|
5 |
+
*/
|
6 |
+
class SiteOrigin_Widget_Field_Repeater extends SiteOrigin_Widget_Field_Container_Base {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* A default label for each repeated item.
|
10 |
+
*
|
11 |
+
* @access protected
|
12 |
+
* @var string
|
13 |
+
*/
|
14 |
+
protected $item_name;
|
15 |
+
/**
|
16 |
+
* This associative array describes how the repeater may retrieve the item labels from HTML elements as they are
|
17 |
+
* updated. The options are:
|
18 |
+
* - selector string A JQuery selector which is used to find an element from which to retrieve the item label.
|
19 |
+
* - update_event string The JavaScript event on which to bind and update the item label.
|
20 |
+
* - value_method string The JavaScript function which should be used to retrieve the item label from an element.
|
21 |
+
*
|
22 |
+
* @access protected
|
23 |
+
* @var array
|
24 |
+
*/
|
25 |
+
protected $item_label;
|
26 |
+
/**
|
27 |
+
* The maximum number of repeated items to display before adding a scrollbar to the repeater.
|
28 |
+
*
|
29 |
+
* @access protected
|
30 |
+
* @var int
|
31 |
+
*/
|
32 |
+
protected $scroll_count;
|
33 |
+
/**
|
34 |
+
* Whether or not items may be added to or removed from this repeater by user interaction.
|
35 |
+
*
|
36 |
+
* @access protected
|
37 |
+
* @var bool
|
38 |
+
*/
|
39 |
+
protected $readonly;
|
40 |
+
|
41 |
+
protected function render_field( $value, $instance ) {
|
42 |
+
if( !isset( $this->fields ) || empty( $this->fields ) ) return;
|
43 |
+
$container = array( 'name' => $this->base_name, 'type' => 'repeater' );
|
44 |
+
$item_label = isset( $this->item_label ) ? $this->item_label : null;
|
45 |
+
if ( ! empty( $item_label ) ) {
|
46 |
+
// convert underscore naming convention to camelCase for javascript and encode as json string
|
47 |
+
$item_label = wp_parse_args( $item_label, array(
|
48 |
+
'update_event' => 'change',
|
49 |
+
'value_method' => 'val'
|
50 |
+
) );
|
51 |
+
$item_label = siteorigin_widgets_underscores_to_camel_case( $item_label );
|
52 |
+
$item_label = json_encode( $item_label );
|
53 |
+
}
|
54 |
+
if( empty( $this->item_name ) ) $this->item_name = __( 'Item', 'so-widgets-bundle' );
|
55 |
+
?>
|
56 |
+
<div class="siteorigin-widget-field-repeater"
|
57 |
+
data-item-name="<?php echo esc_attr( $this->item_name ) ?>"
|
58 |
+
data-repeater-name="<?php echo esc_attr( $this->base_name ) ?>"
|
59 |
+
data-element-name="<?php echo esc_attr( $this->element_name ) ?>"
|
60 |
+
<?php echo ! empty( $item_label ) ? 'data-item-label="' . esc_attr( $item_label ) . '"' : '' ?>
|
61 |
+
<?php echo ! empty( $this->scroll_count ) ? 'data-scroll-count="' . esc_attr( $this->scroll_count ) . '"' : '' ?>
|
62 |
+
<?php if( ! empty( $this->readonly ) ) echo 'readonly' ?>>
|
63 |
+
<div class="siteorigin-widget-field-repeater-top">
|
64 |
+
<div class="siteorigin-widget-field-repeater-expand"></div>
|
65 |
+
<h3><?php echo esc_html( $this->label ) ?></h3>
|
66 |
+
</div>
|
67 |
+
<div class="siteorigin-widget-field-repeater-items">
|
68 |
+
<?php
|
69 |
+
if( !empty( $value ) ) {
|
70 |
+
foreach( $value as $v ) {
|
71 |
+
?>
|
72 |
+
<div class="siteorigin-widget-field-repeater-item ui-draggable">
|
73 |
+
<div class="siteorigin-widget-field-repeater-item-top">
|
74 |
+
<div class="siteorigin-widget-field-expand"></div>
|
75 |
+
<?php if( empty( $this->readonly ) ) : ?>
|
76 |
+
<div class="siteorigin-widget-field-copy"></div>
|
77 |
+
<div class="siteorigin-widget-field-remove"></div>
|
78 |
+
<?php endif; ?>
|
79 |
+
<h4><?php echo esc_html( $this->item_name ) ?></h4>
|
80 |
+
</div>
|
81 |
+
<div class="siteorigin-widget-field-repeater-item-form">
|
82 |
+
<?php
|
83 |
+
$this->create_and_render_sub_fields( $v, $container );
|
84 |
+
?>
|
85 |
+
</div>
|
86 |
+
</div>
|
87 |
+
<?php
|
88 |
+
}
|
89 |
+
}
|
90 |
+
?>
|
91 |
+
</div>
|
92 |
+
<?php if( empty( $this->readonly ) ) : ?>
|
93 |
+
<div class="siteorigin-widget-field-repeater-add"><?php esc_html_e( 'Add', 'so-widgets-bundle' ) ?></div>
|
94 |
+
<?php endif; ?>
|
95 |
+
<?php
|
96 |
+
ob_start();
|
97 |
+
$this->create_and_render_sub_fields( null, $container, true );
|
98 |
+
$rpt_fields = ob_get_clean();
|
99 |
+
$rpt_fields = preg_replace( '/\s+name\s*=\s*/', ' data-name=', $rpt_fields );
|
100 |
+
?>
|
101 |
+
<div class="siteorigin-widget-field-repeater-item-html" style="display: none;">
|
102 |
+
<?php echo $rpt_fields; ?>
|
103 |
+
</div>
|
104 |
+
</div>
|
105 |
+
<?php
|
106 |
+
}
|
107 |
+
|
108 |
+
protected function render_field_label( $value, $instance ) {
|
109 |
+
// Empty override. This field renders it's own label in the render_field() function.
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Go over the items in the repeater and sanitize each one using the container sanitization function.
|
114 |
+
*
|
115 |
+
* @param mixed $value
|
116 |
+
*
|
117 |
+
* @return array|mixed
|
118 |
+
*/
|
119 |
+
function sanitize_field_input( $value, $instance ){
|
120 |
+
if( empty($value) ) return array();
|
121 |
+
|
122 |
+
foreach( $value as &$el ) {
|
123 |
+
$el = parent::sanitize_field_input( $el, $instance );
|
124 |
+
}
|
125 |
+
|
126 |
+
return $value;
|
127 |
+
}
|
128 |
+
}
|
base/inc/fields/section.class.php
CHANGED
@@ -1,23 +1,23 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget_Field_Section
|
5 |
-
*/
|
6 |
-
class SiteOrigin_Widget_Field_Section extends SiteOrigin_Widget_Field_Container_Base {
|
7 |
-
|
8 |
-
protected function render_field( $value, $instance ) {
|
9 |
-
?>
|
10 |
-
<div class="siteorigin-widget-section <?php if( $this->state == 'closed' ) echo 'siteorigin-widget-section-hide'; ?>"><?php
|
11 |
-
if ( !isset( $this->fields ) || empty($this->fields ) ) {
|
12 |
-
echo '</div>';
|
13 |
-
return;
|
14 |
-
}
|
15 |
-
$this->create_and_render_sub_fields( $value, array( 'name' => $this->base_name, 'type' => 'section' ) );
|
16 |
-
?>
|
17 |
-
<input type="hidden"
|
18 |
-
name="<?php echo esc_attr( $this->element_name . '[so_field_container_state]' ) ?>" id="<?php echo esc_attr( $this->element_id . '-so_field_container_state' ) ?>"
|
19 |
-
class="siteorigin-widget-input siteorigin-widget-field-container-state" value="<?php echo esc_attr( $this->state ) ?>"/>
|
20 |
-
</div><?php
|
21 |
-
}
|
22 |
-
|
23 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget_Field_Section
|
5 |
+
*/
|
6 |
+
class SiteOrigin_Widget_Field_Section extends SiteOrigin_Widget_Field_Container_Base {
|
7 |
+
|
8 |
+
protected function render_field( $value, $instance ) {
|
9 |
+
?>
|
10 |
+
<div class="siteorigin-widget-section <?php if( $this->state == 'closed' ) echo 'siteorigin-widget-section-hide'; ?>"><?php
|
11 |
+
if ( !isset( $this->fields ) || empty($this->fields ) ) {
|
12 |
+
echo '</div>';
|
13 |
+
return;
|
14 |
+
}
|
15 |
+
$this->create_and_render_sub_fields( $value, array( 'name' => $this->base_name, 'type' => 'section' ) );
|
16 |
+
?>
|
17 |
+
<input type="hidden"
|
18 |
+
name="<?php echo esc_attr( $this->element_name . '[so_field_container_state]' ) ?>" id="<?php echo esc_attr( $this->element_id . '-so_field_container_state' ) ?>"
|
19 |
+
class="siteorigin-widget-input siteorigin-widget-field-container-state" value="<?php echo esc_attr( $this->state ) ?>"/>
|
20 |
+
</div><?php
|
21 |
+
}
|
22 |
+
|
23 |
}
|
base/inc/fields/slider.class.php
CHANGED
@@ -1,50 +1,50 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget_Field_Slider
|
5 |
-
*/
|
6 |
-
class SiteOrigin_Widget_Field_Slider extends SiteOrigin_Widget_Field_Base {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* The minimum value of the allowed range.
|
10 |
-
*
|
11 |
-
* @access protected
|
12 |
-
* @var float
|
13 |
-
*/
|
14 |
-
protected $min;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* The maximum value of the allowed range.
|
18 |
-
*
|
19 |
-
* @access protected
|
20 |
-
* @var float
|
21 |
-
*/
|
22 |
-
protected $max;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* The step size when moving in the range.
|
26 |
-
*
|
27 |
-
* @access protected
|
28 |
-
* @var float
|
29 |
-
*/
|
30 |
-
protected $step;
|
31 |
-
|
32 |
-
protected function render_field( $value, $instance ) {
|
33 |
-
?>
|
34 |
-
<div class="siteorigin-widget-slider-value"><?php echo ! empty( $value ) ? esc_html( $value ) : 0 ?></div>
|
35 |
-
<div class="siteorigin-widget-slider-wrapper">
|
36 |
-
<div class="siteorigin-widget-value-slider"></div>
|
37 |
-
</div>
|
38 |
-
<input type="number" class="siteorigin-widget-input" name="<?php echo esc_attr( $this->element_name ) ?>" id="<?php echo esc_attr( $this->element_id ) ?>"
|
39 |
-
value="<?php echo !empty( $value ) ? esc_attr( $value ) : 0 ?>"
|
40 |
-
min="<?php echo isset( $this->min ) ? floatval( $this->min ) : 0 ?>"
|
41 |
-
max="<?php echo isset( $this->max ) ? floatval( $this->max ) : 100 ?>"
|
42 |
-
step="<?php echo isset( $this->step ) ? floatval( $this->step ) : 1 ?>"/>
|
43 |
-
<?php
|
44 |
-
}
|
45 |
-
|
46 |
-
protected function sanitize_field_input( $value, $instance ) {
|
47 |
-
return (float) $value;
|
48 |
-
}
|
49 |
-
|
50 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget_Field_Slider
|
5 |
+
*/
|
6 |
+
class SiteOrigin_Widget_Field_Slider extends SiteOrigin_Widget_Field_Base {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* The minimum value of the allowed range.
|
10 |
+
*
|
11 |
+
* @access protected
|
12 |
+
* @var float
|
13 |
+
*/
|
14 |
+
protected $min;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* The maximum value of the allowed range.
|
18 |
+
*
|
19 |
+
* @access protected
|
20 |
+
* @var float
|
21 |
+
*/
|
22 |
+
protected $max;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* The step size when moving in the range.
|
26 |
+
*
|
27 |
+
* @access protected
|
28 |
+
* @var float
|
29 |
+
*/
|
30 |
+
protected $step;
|
31 |
+
|
32 |
+
protected function render_field( $value, $instance ) {
|
33 |
+
?>
|
34 |
+
<div class="siteorigin-widget-slider-value"><?php echo ! empty( $value ) ? esc_html( $value ) : 0 ?></div>
|
35 |
+
<div class="siteorigin-widget-slider-wrapper">
|
36 |
+
<div class="siteorigin-widget-value-slider"></div>
|
37 |
+
</div>
|
38 |
+
<input type="number" class="siteorigin-widget-input" name="<?php echo esc_attr( $this->element_name ) ?>" id="<?php echo esc_attr( $this->element_id ) ?>"
|
39 |
+
value="<?php echo !empty( $value ) ? esc_attr( $value ) : 0 ?>"
|
40 |
+
min="<?php echo isset( $this->min ) ? floatval( $this->min ) : 0 ?>"
|
41 |
+
max="<?php echo isset( $this->max ) ? floatval( $this->max ) : 100 ?>"
|
42 |
+
step="<?php echo isset( $this->step ) ? floatval( $this->step ) : 1 ?>"/>
|
43 |
+
<?php
|
44 |
+
}
|
45 |
+
|
46 |
+
protected function sanitize_field_input( $value, $instance ) {
|
47 |
+
return (float) $value;
|
48 |
+
}
|
49 |
+
|
50 |
}
|
base/inc/fields/tinymce.class.php
CHANGED
@@ -1,561 +1,561 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class SiteOrigin_Widget_Field_TinyMCE extends SiteOrigin_Widget_Field_Text_Input_Base {
|
4 |
-
/**
|
5 |
-
* The number of visible rows in the textarea.
|
6 |
-
*
|
7 |
-
* @access protected
|
8 |
-
* @var int
|
9 |
-
*/
|
10 |
-
protected $rows = 10;
|
11 |
-
/**
|
12 |
-
* The editor initial height. Overrides rows if it is set.
|
13 |
-
*
|
14 |
-
* @access protected
|
15 |
-
* @var int
|
16 |
-
*/
|
17 |
-
protected $editor_height;
|
18 |
-
/**
|
19 |
-
* The editor to be displayed initially.
|
20 |
-
*
|
21 |
-
* @access protected
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
protected $default_editor = 'tinymce';
|
25 |
-
/**
|
26 |
-
* The last editor selected by the user.
|
27 |
-
*
|
28 |
-
* @access protected
|
29 |
-
* @var string
|
30 |
-
*/
|
31 |
-
protected $selected_editor;
|
32 |
-
/**
|
33 |
-
* An array of the buttons which will be rendered for the first toolbar of the TinyMCE editor.
|
34 |
-
*
|
35 |
-
* @access protected
|
36 |
-
* @var array
|
37 |
-
*/
|
38 |
-
protected $mce_buttons;
|
39 |
-
/**
|
40 |
-
* An array of the buttons which will be rendered for the second toolbar of the TinyMCE editor.
|
41 |
-
*
|
42 |
-
* @access protected
|
43 |
-
* @var array
|
44 |
-
*/
|
45 |
-
protected $mce_buttons_2;
|
46 |
-
/**
|
47 |
-
* An array of the buttons which will be rendered for the third toolbar of the TinyMCE editor.
|
48 |
-
*
|
49 |
-
* @access protected
|
50 |
-
* @var array
|
51 |
-
*/
|
52 |
-
protected $mce_buttons_3;
|
53 |
-
/**
|
54 |
-
* An array of the buttons which will be rendered for the fourth toolbar of the TinyMCE editor.
|
55 |
-
*
|
56 |
-
* @access protected
|
57 |
-
* @var array
|
58 |
-
*/
|
59 |
-
protected $mce_buttons_4;
|
60 |
-
/**
|
61 |
-
* An array of the buttons which will be rendered for the QuickTags editor.
|
62 |
-
*
|
63 |
-
* @access protected
|
64 |
-
* @var array
|
65 |
-
*/
|
66 |
-
protected $quicktags_buttons;
|
67 |
-
/**
|
68 |
-
* Whether to apply `wpautop` processing. (Adds paragraphs for double linebreaks) Default is true.
|
69 |
-
*
|
70 |
-
* @access protected
|
71 |
-
* @var array
|
72 |
-
*/
|
73 |
-
protected $wpautop;
|
74 |
-
/**
|
75 |
-
* An array of filter callbacks to apply to the set of buttons which will be rendered for the editor.
|
76 |
-
*
|
77 |
-
* @access protected
|
78 |
-
* @var array
|
79 |
-
*/
|
80 |
-
protected $button_filters;
|
81 |
-
/**
|
82 |
-
* An array of the included plugins to enable for the TinyMCE editor.
|
83 |
-
*
|
84 |
-
* @access protected
|
85 |
-
* @var array
|
86 |
-
*/
|
87 |
-
protected $mce_plugins;
|
88 |
-
/**
|
89 |
-
* An array of external plugins for the TinyMCE editor.
|
90 |
-
*
|
91 |
-
* @access protected
|
92 |
-
* @var array
|
93 |
-
*/
|
94 |
-
protected $mce_external_plugins;
|
95 |
-
/**
|
96 |
-
* Updated Editor JS API was introduced in WP 4.8 so need to check for compatibility with older versions.
|
97 |
-
*
|
98 |
-
* @access private
|
99 |
-
* @var bool
|
100 |
-
*/
|
101 |
-
private $wp_version_lt_4_8;
|
102 |
-
|
103 |
-
protected function get_default_options() {
|
104 |
-
return array(
|
105 |
-
'wpautop' => true,
|
106 |
-
'mce_buttons' => array(
|
107 |
-
'formatselect',
|
108 |
-
'bold',
|
109 |
-
'italic',
|
110 |
-
'bullist',
|
111 |
-
'numlist',
|
112 |
-
'blockquote',
|
113 |
-
'alignleft',
|
114 |
-
'aligncenter',
|
115 |
-
'alignright',
|
116 |
-
'link',
|
117 |
-
'unlink',
|
118 |
-
'wp_more',
|
119 |
-
'wp_adv',
|
120 |
-
),
|
121 |
-
'mce_buttons_2' => array(
|
122 |
-
'strikethrough',
|
123 |
-
'hr',
|
124 |
-
'forecolor',
|
125 |
-
'pastetext',
|
126 |
-
'removeformat',
|
127 |
-
'charmap',
|
128 |
-
'outdent',
|
129 |
-
'indent',
|
130 |
-
'undo',
|
131 |
-
'redo',
|
132 |
-
'wp_help',
|
133 |
-
),
|
134 |
-
'quicktags_buttons' => array(
|
135 |
-
'strong',
|
136 |
-
'em',
|
137 |
-
'link',
|
138 |
-
'block',
|
139 |
-
'del',
|
140 |
-
'ins',
|
141 |
-
'img',
|
142 |
-
'ul',
|
143 |
-
'ol',
|
144 |
-
'li',
|
145 |
-
'code',
|
146 |
-
'more',
|
147 |
-
'close',
|
148 |
-
),
|
149 |
-
'mce_plugins' => array(
|
150 |
-
'charmap',
|
151 |
-
'colorpicker',
|
152 |
-
'hr',
|
153 |
-
'lists',
|
154 |
-
'media',
|
155 |
-
'paste',
|
156 |
-
'tabfocus',
|
157 |
-
'textcolor',
|
158 |
-
'fullscreen',
|
159 |
-
'wordpress',
|
160 |
-
'wpautoresize',
|
161 |
-
'wpeditimage',
|
162 |
-
'wpemoji',
|
163 |
-
'wpgallery',
|
164 |
-
'wplink',
|
165 |
-
'wpdialogs',
|
166 |
-
'wptextpattern',
|
167 |
-
'wpview',
|
168 |
-
),
|
169 |
-
'mce_external_plugins' => array(),
|
170 |
-
);
|
171 |
-
}
|
172 |
-
|
173 |
-
protected function initialize() {
|
174 |
-
if ( ! is_admin() ) {
|
175 |
-
return;
|
176 |
-
}
|
177 |
-
|
178 |
-
global $wp_version;
|
179 |
-
$this->wp_version_lt_4_8 = version_compare( $wp_version, '4.8', '<' );
|
180 |
-
|
181 |
-
if ( ! empty( $this->wp_version_lt_4_8 ) ) {
|
182 |
-
add_filter( 'mce_buttons', array( $this, 'mce_buttons_filter' ), 10, 2 );
|
183 |
-
add_filter( 'quicktags_settings', array( $this, 'quicktags_settings' ), 10, 2 );
|
184 |
-
}
|
185 |
-
|
186 |
-
if ( ! empty( $this->button_filters ) ) {
|
187 |
-
foreach ( $this->button_filters as $filter_name => $filter ) {
|
188 |
-
$is_valid_filter = preg_match(
|
189 |
-
'/mce_buttons(?:_[1-4])?|quicktags_settings/', $filter_name
|
190 |
-
) && ! empty( $filter ) && is_callable( $filter );
|
191 |
-
if ( $is_valid_filter ) {
|
192 |
-
add_filter( $filter_name, array( $this, $filter_name ), 10, 2 );
|
193 |
-
}
|
194 |
-
}
|
195 |
-
}
|
196 |
-
|
197 |
-
if( class_exists( 'WC_Shortcodes_TinyMCE_Buttons' ) ) {
|
198 |
-
if ( ! empty( $this->wp_version_lt_4_8 ) ) {
|
199 |
-
$screen = get_current_screen();
|
200 |
-
if( ! is_null( $screen ) && $screen->id != 'widgets' ) {
|
201 |
-
add_filter( 'mce_external_plugins', array( $this, 'add_wpc_shortcodes_plugin' ), 15 );
|
202 |
-
add_filter( 'mce_buttons', array( $this, 'register_wpc_shortcodes_button' ), 15 );
|
203 |
-
}
|
204 |
-
} else {
|
205 |
-
$this->mce_external_plugins = $this->add_wpc_shortcodes_plugin( $this->mce_external_plugins );
|
206 |
-
$this->mce_buttons = $this->register_wpc_shortcodes_button( $this->mce_buttons );
|
207 |
-
}
|
208 |
-
}
|
209 |
-
|
210 |
-
if( class_exists( 'WC_Shortcodes_Admin' ) ) {
|
211 |
-
if ( ! empty( $this->wp_version_lt_4_8 ) ) {
|
212 |
-
|
213 |
-
$screen = get_current_screen();
|
214 |
-
if( ! is_null( $screen ) && $screen->id != 'widgets' ) {
|
215 |
-
add_filter( 'mce_external_plugins', array( $this, 'add_wc_shortcodes_plugin' ), 15 );
|
216 |
-
add_filter( 'mce_buttons', array( $this, 'register_wc_shortcodes_button' ), 15 );
|
217 |
-
}
|
218 |
-
} else {
|
219 |
-
$this->mce_external_plugins = $this->add_wc_shortcodes_plugin( $this->mce_external_plugins );
|
220 |
-
$this->mce_buttons = $this->register_wc_shortcodes_button( $this->mce_buttons );
|
221 |
-
}
|
222 |
-
}
|
223 |
-
}
|
224 |
-
|
225 |
-
function add_wc_shortcodes_plugin( $plugins ) {
|
226 |
-
if( isset( $plugins['woocommerce_shortcodes'] ) ) {
|
227 |
-
return $plugins;
|
228 |
-
}
|
229 |
-
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
230 |
-
$editor_path = 'woocommerce-shortcodes/assets/js/editor' . $suffix . '.js';
|
231 |
-
if( file_exists( WP_PLUGIN_DIR . '/' . $editor_path ) ) {
|
232 |
-
$plugins['woocommerce_shortcodes'] = plugins_url( $editor_path );
|
233 |
-
}
|
234 |
-
return $plugins;
|
235 |
-
}
|
236 |
-
|
237 |
-
function register_wc_shortcodes_button( $buttons ) {
|
238 |
-
if( ! in_array( 'woocommerce_shortcodes', $buttons ) ) {
|
239 |
-
array_push( $buttons, '|', 'woocommerce_shortcodes' );
|
240 |
-
}
|
241 |
-
return $buttons;
|
242 |
-
}
|
243 |
-
|
244 |
-
function add_wpc_shortcodes_plugin( $plugins ) {
|
245 |
-
if( ! isset( $plugins['wpc_shortcodes'] ) ) {
|
246 |
-
$shortcodes_path = 'wc-shortcodes/includes/mce/js/shortcodes-tinymce-4.js';
|
247 |
-
if ( file_exists( WP_PLUGIN_DIR . '/' . $shortcodes_path ) ) {
|
248 |
-
$plugins['wpc_shortcodes'] = plugins_url( $shortcodes_path . '?ver=' . WC_SHORTCODES_VERSION );
|
249 |
-
}
|
250 |
-
}
|
251 |
-
|
252 |
-
if( ! isset( $plugins['wpc_font_awesome'] ) ) {
|
253 |
-
$fontawesome_path = 'wc-shortcodes/includes/mce/js/font-awesome-tinymce-4.js';
|
254 |
-
if ( file_exists( WP_PLUGIN_DIR . '/' . $fontawesome_path ) ) {
|
255 |
-
$plugins['wpc_font_awesome'] = plugins_url( $fontawesome_path . '?ver=' . WC_SHORTCODES_VERSION );
|
256 |
-
}
|
257 |
-
}
|
258 |
-
|
259 |
-
return $plugins;
|
260 |
-
}
|
261 |
-
|
262 |
-
function register_wpc_shortcodes_button( $buttons ) {
|
263 |
-
if( ! in_array( 'wpc_shortcodes_button', $buttons ) ) {
|
264 |
-
array_push( $buttons, 'wpc_shortcodes_button' );
|
265 |
-
}
|
266 |
-
if( ! in_array( 'wpcfontAwesomeGlyphSelect', $buttons ) ) {
|
267 |
-
array_push( $buttons, 'wpcfontAwesomeGlyphSelect' );
|
268 |
-
}
|
269 |
-
|
270 |
-
return $buttons;
|
271 |
-
}
|
272 |
-
|
273 |
-
/**
|
274 |
-
* @param $name
|
275 |
-
* @param $arguments
|
276 |
-
* @return array|mixed
|
277 |
-
*/
|
278 |
-
function __call( $name, $arguments ) {
|
279 |
-
if ( preg_match( '/mce_buttons(?:_[1-4])?|quicktags_settings/', $name ) && !empty( $this->button_filters[$name] ) ) {
|
280 |
-
$filter = $this->button_filters[$name];
|
281 |
-
if ( !empty( $filter[0] ) && is_a( $filter[0], 'SiteOrigin_Widget' ) ) {
|
282 |
-
$widget = $filter[0];
|
283 |
-
$settings = !empty($arguments[0]) ? $arguments[0] : array();
|
284 |
-
$editor_id = !empty($arguments[1]) ? $arguments[1] : '';
|
285 |
-
if ( preg_match( '/widget-' . $widget->id_base . '-.*-' . $this->base_name . '/', $editor_id ) ) {
|
286 |
-
return call_user_func( $filter, $settings, $editor_id );
|
287 |
-
}
|
288 |
-
else {
|
289 |
-
return $settings;
|
290 |
-
}
|
291 |
-
}
|
292 |
-
}
|
293 |
-
}
|
294 |
-
|
295 |
-
public function mce_buttons_filter( $buttons, $editor_id ) {
|
296 |
-
if (($key = array_search('fullscreen', $buttons)) !== false) {
|
297 |
-
unset($buttons[$key]);
|
298 |
-
}
|
299 |
-
return $buttons;
|
300 |
-
}
|
301 |
-
|
302 |
-
public function quicktags_settings( $settings, $editor_id ) {
|
303 |
-
$settings['buttons'] = preg_replace( '/,fullscreen/', '', $settings['buttons'] );
|
304 |
-
$settings['buttons'] = preg_replace( '/,dfw/', '', $settings['buttons'] );
|
305 |
-
return $settings;
|
306 |
-
}
|
307 |
-
|
308 |
-
protected function get_input_classes() {
|
309 |
-
$classes = parent::get_input_classes();
|
310 |
-
$classes[] = 'wp-editor-area';
|
311 |
-
$classes[] = 'wp-exclude-emoji';
|
312 |
-
return $classes;
|
313 |
-
}
|
314 |
-
|
315 |
-
protected function render_before_field( $value, $instance ) {
|
316 |
-
$selected_editor = $this->get_selected_editor( $instance );
|
317 |
-
if( ! empty( $selected_editor ) ) {
|
318 |
-
$this->selected_editor = $selected_editor;
|
319 |
-
}
|
320 |
-
else {
|
321 |
-
$this->selected_editor = $this->default_editor;
|
322 |
-
}
|
323 |
-
parent::render_before_field( $value, $instance );
|
324 |
-
}
|
325 |
-
|
326 |
-
protected function render_field( $value, $instance ) {
|
327 |
-
|
328 |
-
if ( $this->wp_version_lt_4_8 ) {
|
329 |
-
$this->render_field_pre48( $value, $instance );
|
330 |
-
return;
|
331 |
-
}
|
332 |
-
|
333 |
-
$user_can_richedit = user_can_richedit();
|
334 |
-
|
335 |
-
$selected_editor = $user_can_richedit && in_array( $this->selected_editor, array( 'tinymce', 'tmce' ) ) ? 'tmce' : 'html';
|
336 |
-
|
337 |
-
$settings = array(
|
338 |
-
'selectedEditor' => $selected_editor,
|
339 |
-
);
|
340 |
-
|
341 |
-
if ( $user_can_richedit ) {
|
342 |
-
|
343 |
-
$tmce_settings = array(
|
344 |
-
'toolbar1' => apply_filters( 'mce_buttons', $this->mce_buttons, $this->element_id ),
|
345 |
-
'toolbar2' => apply_filters( 'mce_buttons_2', $this->mce_buttons_2, $this->element_id ),
|
346 |
-
'toolbar3' => apply_filters( 'mce_buttons_3',$this->mce_buttons_3, $this->element_id ),
|
347 |
-
'toolbar4' => apply_filters( 'mce_buttons_4',$this->mce_buttons_4, $this->element_id ),
|
348 |
-
'plugins' => array_unique( apply_filters( 'tiny_mce_plugins', $this->mce_plugins ) ),
|
349 |
-
);
|
350 |
-
|
351 |
-
foreach ( $tmce_settings as $name => $setting ) {
|
352 |
-
$tmce_settings[ $name ] = is_array( $setting ) ? implode( ',', $setting ) : '';
|
353 |
-
}
|
354 |
-
|
355 |
-
$tmce_settings['external_plugins'] = array_unique( apply_filters( 'mce_external_plugins', $this->mce_external_plugins ) );
|
356 |
-
|
357 |
-
$suffix = SCRIPT_DEBUG ? '' : '.min';
|
358 |
-
$version = 'ver=' . get_bloginfo( 'version' );
|
359 |
-
// Default stylesheets
|
360 |
-
$mce_css = includes_url( "css/dashicons$suffix.css?$version" ) . ',' .
|
361 |
-
includes_url( "js/tinymce/skins/wordpress/wp-content.css?$version" );
|
362 |
-
|
363 |
-
$editor_styles = get_editor_stylesheets();
|
364 |
-
|
365 |
-
if ( ! empty( $editor_styles ) ) {
|
366 |
-
// Force urlencoding of commas.
|
367 |
-
foreach ( $editor_styles as $key => $url ) {
|
368 |
-
if ( strpos( $url, ',' ) !== false ) {
|
369 |
-
$editor_styles[ $key ] = str_replace( ',', '%2C', $url );
|
370 |
-
}
|
371 |
-
}
|
372 |
-
|
373 |
-
$mce_css .= ',' . implode( ',', $editor_styles );
|
374 |
-
}
|
375 |
-
$mce_css = trim( apply_filters( 'mce_css', $mce_css ), ' ,' );
|
376 |
-
$tmce_settings['content_css'] = $mce_css;
|
377 |
-
|
378 |
-
$settings['tinymce'] = array(
|
379 |
-
'wp_skip_init' => strpos( $this->element_id, '__i__' ) != false ||
|
380 |
-
strpos( $this->element_id, '_id_' ) != false,
|
381 |
-
'wpautop' => ! empty( $this->wpautop ),
|
382 |
-
);
|
383 |
-
|
384 |
-
$tmce_settings = apply_filters( 'tiny_mce_before_init', $tmce_settings, $this->element_id );
|
385 |
-
|
386 |
-
foreach ( $tmce_settings as $name => $setting ) {
|
387 |
-
unset( $jdec );
|
388 |
-
if ( ! empty( $tmce_settings[ $name ] ) ) {
|
389 |
-
// Attempt to decode setting as JSON. For back compat with filters used by WP editor.
|
390 |
-
if ( is_string( $setting ) ) {
|
391 |
-
$jdec = json_decode( $setting, true );
|
392 |
-
}
|
393 |
-
$settings['tinymce'][ $name ] = empty( $jdec ) ? $setting : $jdec;
|
394 |
-
}
|
395 |
-
}
|
396 |
-
|
397 |
-
$media_buttons = $this->render_media_buttons( $this->element_id );
|
398 |
-
}
|
399 |
-
|
400 |
-
$qt_settings = apply_filters(
|
401 |
-
'quicktags_settings',
|
402 |
-
array( 'buttons' => $this->quicktags_buttons ),
|
403 |
-
$this->element_id
|
404 |
-
);
|
405 |
-
|
406 |
-
$qt_settings['buttons'] = ! empty( $qt_settings['buttons'] ) ? $qt_settings['buttons'] : array();
|
407 |
-
$qt_settings['buttons'] = is_array( $qt_settings['buttons'] ) ? implode( ',', $qt_settings['buttons'] ) : '';
|
408 |
-
|
409 |
-
$settings['quicktags'] = array(
|
410 |
-
'buttons' => $qt_settings['buttons'],
|
411 |
-
);
|
412 |
-
|
413 |
-
$value = apply_filters( 'the_editor_content', $value, $this->selected_editor );
|
414 |
-
|
415 |
-
if ( false !== stripos( $value, 'textarea' ) ) {
|
416 |
-
$value = preg_replace( '%</textarea%i', '</textarea', $value );
|
417 |
-
}
|
418 |
-
|
419 |
-
$media_buttons = $this->render_media_buttons( $this->element_id );
|
420 |
-
|
421 |
-
$settings['baseURL'] = includes_url( 'js/tinymce' );
|
422 |
-
$settings['suffix'] = SCRIPT_DEBUG ? '' : '.min';
|
423 |
-
|
424 |
-
?><div class="siteorigin-widget-tinymce-container"
|
425 |
-
<?php if ( ! empty( $media_buttons ) ) : ?>
|
426 |
-
data-media-buttons="<?php echo esc_attr( json_encode( array( 'html' => $media_buttons ) ) ) ?>"
|
427 |
-
<?php endif; ?>
|
428 |
-
data-editor-settings="<?php echo esc_attr( json_encode( $settings ) ) ?>">
|
429 |
-
<textarea id="<?php echo esc_attr( $this->element_id ) ?>"
|
430 |
-
name="<?php echo esc_attr( $this->element_name ) ?>"
|
431 |
-
<?php if ( isset( $this->editor_height ) ) : ?>
|
432 |
-
style="height: <?php echo intval( $this->editor_height ) ?>px"
|
433 |
-
<?php else : ?>
|
434 |
-
rows="<?php echo esc_attr( $this->rows ) ?>"
|
435 |
-
<?php endif; ?>
|
436 |
-
<?php $this->render_data_attributes( $this->get_input_data_attributes() ) ?>
|
437 |
-
<?php $this->render_CSS_classes( $this->get_input_classes() ) ?>
|
438 |
-
<?php if ( ! empty( $this->placeholder ) ) echo 'placeholder="' . esc_attr( $this->placeholder ) . '"' ?>
|
439 |
-
<?php if( ! empty( $this->readonly ) ) echo 'readonly' ?>><?php echo htmlentities( $value, ENT_QUOTES, 'UTF-8' ) ?></textarea>
|
440 |
-
</div>
|
441 |
-
<input type="hidden"
|
442 |
-
name="<?php echo esc_attr( $this->for_widget->so_get_field_name( $this->base_name . '_selected_editor', $this->parent_container) ) ?>"
|
443 |
-
class="siteorigin-widget-input siteorigin-widget-tinymce-selected-editor"
|
444 |
-
value="<?php echo esc_attr( $this->selected_editor ) ?>"/>
|
445 |
-
<?php
|
446 |
-
|
447 |
-
}
|
448 |
-
|
449 |
-
private function render_field_pre48( $value, $instance ) {
|
450 |
-
|
451 |
-
$settings = array(
|
452 |
-
'textarea_name' => esc_attr( $this->element_name ),
|
453 |
-
'default_editor' => $this->selected_editor,
|
454 |
-
'textarea_rows' => $this->rows,
|
455 |
-
'editor_class' => 'siteorigin-widget-input',
|
456 |
-
'tinymce' => array(
|
457 |
-
'wp_skip_init' => strpos( $this->element_id, '__i__' ) != false || strpos( $this->element_id, '_id_' ) != false
|
458 |
-
)
|
459 |
-
);
|
460 |
-
if( isset( $this->editor_height ) ) $settings['editor_height'] = $this->editor_height;
|
461 |
-
preg_match( '/widget-(.+?)\[/', $this->element_name, $id_base_matches );
|
462 |
-
$widget_id_base = empty($id_base_matches) || count($id_base_matches) < 2 ? '' : $id_base_matches[1];
|
463 |
-
?>
|
464 |
-
<div class="siteorigin-widget-tinymce-container"
|
465 |
-
data-mce-settings="<?php echo esc_attr( json_encode( $settings['tinymce'] ) ) ?>"
|
466 |
-
data-qt-settings="<?php echo esc_attr( json_encode( array() ) ) ?>"
|
467 |
-
data-widget-id-base="<?php echo esc_attr( $widget_id_base ) ?>"
|
468 |
-
>
|
469 |
-
<?php
|
470 |
-
wp_editor( $value, esc_attr( $this->element_id ), $settings )
|
471 |
-
?>
|
472 |
-
</div>
|
473 |
-
<input type="hidden"
|
474 |
-
name="<?php echo esc_attr( $this->for_widget->so_get_field_name( $this->base_name . '_selected_editor', $this->parent_container) ) ?>"
|
475 |
-
class="siteorigin-widget-input siteorigin-widget-tinymce-selected-editor"
|
476 |
-
value="<?php echo esc_attr( $this->selected_editor ) ?>"/>
|
477 |
-
<?php
|
478 |
-
|
479 |
-
if( $this->selected_editor == 'html' ) {
|
480 |
-
remove_filter( 'the_editor_content', 'wp_htmledit_pre' );
|
481 |
-
}
|
482 |
-
if( $this->selected_editor == 'tinymce' ) {
|
483 |
-
remove_filter( 'the_editor_content', 'wp_richedit_pre' );
|
484 |
-
}
|
485 |
-
}
|
486 |
-
|
487 |
-
public function enqueue_scripts() {
|
488 |
-
|
489 |
-
if ( $this->wp_version_lt_4_8 ) {
|
490 |
-
$src = plugin_dir_url( __FILE__ ) . 'js/tinymce-field-pre48' . SOW_BUNDLE_JS_SUFFIX . '.js';
|
491 |
-
$deps = array( 'jquery', 'editor', 'quicktags' );
|
492 |
-
} else {
|
493 |
-
wp_enqueue_editor();
|
494 |
-
$src = plugin_dir_url( __FILE__ ) . 'js/tinymce-field' . SOW_BUNDLE_JS_SUFFIX . '.js';
|
495 |
-
$deps = array( 'jquery' );
|
496 |
-
}
|
497 |
-
|
498 |
-
wp_enqueue_script( 'so-tinymce-field', $src, $deps, SOW_BUNDLE_VERSION );
|
499 |
-
wp_enqueue_style(
|
500 |
-
'so-tinymce-field', plugin_dir_url( __FILE__ ) . 'css/tinymce-field.css', array(), SOW_BUNDLE_VERSION
|
501 |
-
);
|
502 |
-
}
|
503 |
-
|
504 |
-
protected function sanitize_field_input( $value, $instance ) {
|
505 |
-
$selected_editor = $this->get_selected_editor( $instance );
|
506 |
-
if ( in_array( $selected_editor, array( 'tinymce', 'tmce' ) ) && ! empty( $this->wpautop ) ) {
|
507 |
-
$value = wpautop( $value );
|
508 |
-
}
|
509 |
-
if( current_user_can( 'unfiltered_html' ) ) {
|
510 |
-
$sanitized_value = $value;
|
511 |
-
} else {
|
512 |
-
$sanitized_value = wp_kses_post( $value );
|
513 |
-
}
|
514 |
-
$sanitized_value = balanceTags( $sanitized_value , true );
|
515 |
-
return $sanitized_value;
|
516 |
-
}
|
517 |
-
|
518 |
-
public function sanitize_instance( $instance ) {
|
519 |
-
$selected_editor_name = $this->get_selected_editor_field_name( $this->base_name );
|
520 |
-
if( ! empty( $instance[ $selected_editor_name ] ) ) {
|
521 |
-
$selected_editor = $instance[ $selected_editor_name ];
|
522 |
-
$instance[ $selected_editor_name ] = in_array( $selected_editor, array( 'tinymce', 'tmce', 'quicktags', 'html' ) ) ? $selected_editor : $this->default_editor;
|
523 |
-
}
|
524 |
-
return $instance;
|
525 |
-
}
|
526 |
-
|
527 |
-
public function get_selected_editor( $instance ) {
|
528 |
-
$selected_editor = null;
|
529 |
-
$selected_editor_name = $this->get_selected_editor_field_name( $this->base_name );
|
530 |
-
if( ! empty( $instance[ $selected_editor_name ] ) ) {
|
531 |
-
$selected_editor = $instance[ $selected_editor_name ];
|
532 |
-
}
|
533 |
-
|
534 |
-
return $selected_editor;
|
535 |
-
}
|
536 |
-
|
537 |
-
public function get_selected_editor_field_name( $base_name ) {
|
538 |
-
$v_name = $base_name;
|
539 |
-
if( strpos($v_name, '][') !== false ) {
|
540 |
-
// Remove this splitter
|
541 |
-
$v_name = substr( $v_name, strrpos($v_name, '][') + 2 );
|
542 |
-
}
|
543 |
-
return $v_name . '_selected_editor';
|
544 |
-
}
|
545 |
-
|
546 |
-
private function render_media_buttons( $editor_id ) {
|
547 |
-
|
548 |
-
ob_start();
|
549 |
-
if ( ! function_exists( 'media_buttons' ) ) {
|
550 |
-
include( ABSPATH . 'wp-admin/includes/media.php' );
|
551 |
-
}
|
552 |
-
|
553 |
-
echo '<div id="wp-' . esc_attr( $editor_id ) . '-media-buttons" class="wp-media-buttons">';
|
554 |
-
|
555 |
-
do_action( 'media_buttons', $editor_id );
|
556 |
-
|
557 |
-
echo "</div>\n";
|
558 |
-
|
559 |
-
return ob_get_clean();
|
560 |
-
}
|
561 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class SiteOrigin_Widget_Field_TinyMCE extends SiteOrigin_Widget_Field_Text_Input_Base {
|
4 |
+
/**
|
5 |
+
* The number of visible rows in the textarea.
|
6 |
+
*
|
7 |
+
* @access protected
|
8 |
+
* @var int
|
9 |
+
*/
|
10 |
+
protected $rows = 10;
|
11 |
+
/**
|
12 |
+
* The editor initial height. Overrides rows if it is set.
|
13 |
+
*
|
14 |
+
* @access protected
|
15 |
+
* @var int
|
16 |
+
*/
|
17 |
+
protected $editor_height;
|
18 |
+
/**
|
19 |
+
* The editor to be displayed initially.
|
20 |
+
*
|
21 |
+
* @access protected
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
protected $default_editor = 'tinymce';
|
25 |
+
/**
|
26 |
+
* The last editor selected by the user.
|
27 |
+
*
|
28 |
+
* @access protected
|
29 |
+
* @var string
|
30 |
+
*/
|
31 |
+
protected $selected_editor;
|
32 |
+
/**
|
33 |
+
* An array of the buttons which will be rendered for the first toolbar of the TinyMCE editor.
|
34 |
+
*
|
35 |
+
* @access protected
|
36 |
+
* @var array
|
37 |
+
*/
|
38 |
+
protected $mce_buttons;
|
39 |
+
/**
|
40 |
+
* An array of the buttons which will be rendered for the second toolbar of the TinyMCE editor.
|
41 |
+
*
|
42 |
+
* @access protected
|
43 |
+
* @var array
|
44 |
+
*/
|
45 |
+
protected $mce_buttons_2;
|
46 |
+
/**
|
47 |
+
* An array of the buttons which will be rendered for the third toolbar of the TinyMCE editor.
|
48 |
+
*
|
49 |
+
* @access protected
|
50 |
+
* @var array
|
51 |
+
*/
|
52 |
+
protected $mce_buttons_3;
|
53 |
+
/**
|
54 |
+
* An array of the buttons which will be rendered for the fourth toolbar of the TinyMCE editor.
|
55 |
+
*
|
56 |
+
* @access protected
|
57 |
+
* @var array
|
58 |
+
*/
|
59 |
+
protected $mce_buttons_4;
|
60 |
+
/**
|
61 |
+
* An array of the buttons which will be rendered for the QuickTags editor.
|
62 |
+
*
|
63 |
+
* @access protected
|
64 |
+
* @var array
|
65 |
+
*/
|
66 |
+
protected $quicktags_buttons;
|
67 |
+
/**
|
68 |
+
* Whether to apply `wpautop` processing. (Adds paragraphs for double linebreaks) Default is true.
|
69 |
+
*
|
70 |
+
* @access protected
|
71 |
+
* @var array
|
72 |
+
*/
|
73 |
+
protected $wpautop;
|
74 |
+
/**
|
75 |
+
* An array of filter callbacks to apply to the set of buttons which will be rendered for the editor.
|
76 |
+
*
|
77 |
+
* @access protected
|
78 |
+
* @var array
|
79 |
+
*/
|
80 |
+
protected $button_filters;
|
81 |
+
/**
|
82 |
+
* An array of the included plugins to enable for the TinyMCE editor.
|
83 |
+
*
|
84 |
+
* @access protected
|
85 |
+
* @var array
|
86 |
+
*/
|
87 |
+
protected $mce_plugins;
|
88 |
+
/**
|
89 |
+
* An array of external plugins for the TinyMCE editor.
|
90 |
+
*
|
91 |
+
* @access protected
|
92 |
+
* @var array
|
93 |
+
*/
|
94 |
+
protected $mce_external_plugins;
|
95 |
+
/**
|
96 |
+
* Updated Editor JS API was introduced in WP 4.8 so need to check for compatibility with older versions.
|
97 |
+
*
|
98 |
+
* @access private
|
99 |
+
* @var bool
|
100 |
+
*/
|
101 |
+
private $wp_version_lt_4_8;
|
102 |
+
|
103 |
+
protected function get_default_options() {
|
104 |
+
return array(
|
105 |
+
'wpautop' => true,
|
106 |
+
'mce_buttons' => array(
|
107 |
+
'formatselect',
|
108 |
+
'bold',
|
109 |
+
'italic',
|
110 |
+
'bullist',
|
111 |
+
'numlist',
|
112 |
+
'blockquote',
|
113 |
+
'alignleft',
|
114 |
+
'aligncenter',
|
115 |
+
'alignright',
|
116 |
+
'link',
|
117 |
+
'unlink',
|
118 |
+
'wp_more',
|
119 |
+
'wp_adv',
|
120 |
+
),
|
121 |
+
'mce_buttons_2' => array(
|
122 |
+
'strikethrough',
|
123 |
+
'hr',
|
124 |
+
'forecolor',
|
125 |
+
'pastetext',
|
126 |
+
'removeformat',
|
127 |
+
'charmap',
|
128 |
+
'outdent',
|
129 |
+
'indent',
|
130 |
+
'undo',
|
131 |
+
'redo',
|
132 |
+
'wp_help',
|
133 |
+
),
|
134 |
+
'quicktags_buttons' => array(
|
135 |
+
'strong',
|
136 |
+
'em',
|
137 |
+
'link',
|
138 |
+
'block',
|
139 |
+
'del',
|
140 |
+
'ins',
|
141 |
+
'img',
|
142 |
+
'ul',
|
143 |
+
'ol',
|
144 |
+
'li',
|
145 |
+
'code',
|
146 |
+
'more',
|
147 |
+
'close',
|
148 |
+
),
|
149 |
+
'mce_plugins' => array(
|
150 |
+
'charmap',
|
151 |
+
'colorpicker',
|
152 |
+
'hr',
|
153 |
+
'lists',
|
154 |
+
'media',
|
155 |
+
'paste',
|
156 |
+
'tabfocus',
|
157 |
+
'textcolor',
|
158 |
+
'fullscreen',
|
159 |
+
'wordpress',
|
160 |
+
'wpautoresize',
|
161 |
+
'wpeditimage',
|
162 |
+
'wpemoji',
|
163 |
+
'wpgallery',
|
164 |
+
'wplink',
|
165 |
+
'wpdialogs',
|
166 |
+
'wptextpattern',
|
167 |
+
'wpview',
|
168 |
+
),
|
169 |
+
'mce_external_plugins' => array(),
|
170 |
+
);
|
171 |
+
}
|
172 |
+
|
173 |
+
protected function initialize() {
|
174 |
+
if ( ! is_admin() ) {
|
175 |
+
return;
|
176 |
+
}
|
177 |
+
|
178 |
+
global $wp_version;
|
179 |
+
$this->wp_version_lt_4_8 = version_compare( $wp_version, '4.8', '<' );
|
180 |
+
|
181 |
+
if ( ! empty( $this->wp_version_lt_4_8 ) ) {
|
182 |
+
add_filter( 'mce_buttons', array( $this, 'mce_buttons_filter' ), 10, 2 );
|
183 |
+
add_filter( 'quicktags_settings', array( $this, 'quicktags_settings' ), 10, 2 );
|
184 |
+
}
|
185 |
+
|
186 |
+
if ( ! empty( $this->button_filters ) ) {
|
187 |
+
foreach ( $this->button_filters as $filter_name => $filter ) {
|
188 |
+
$is_valid_filter = preg_match(
|
189 |
+
'/mce_buttons(?:_[1-4])?|quicktags_settings/', $filter_name
|
190 |
+
) && ! empty( $filter ) && is_callable( $filter );
|
191 |
+
if ( $is_valid_filter ) {
|
192 |
+
add_filter( $filter_name, array( $this, $filter_name ), 10, 2 );
|
193 |
+
}
|
194 |
+
}
|
195 |
+
}
|
196 |
+
|
197 |
+
if( class_exists( 'WC_Shortcodes_TinyMCE_Buttons' ) ) {
|
198 |
+
if ( ! empty( $this->wp_version_lt_4_8 ) ) {
|
199 |
+
$screen = get_current_screen();
|
200 |
+
if( ! is_null( $screen ) && $screen->id != 'widgets' ) {
|
201 |
+
add_filter( 'mce_external_plugins', array( $this, 'add_wpc_shortcodes_plugin' ), 15 );
|
202 |
+
add_filter( 'mce_buttons', array( $this, 'register_wpc_shortcodes_button' ), 15 );
|
203 |
+
}
|
204 |
+
} else {
|
205 |
+
$this->mce_external_plugins = $this->add_wpc_shortcodes_plugin( $this->mce_external_plugins );
|
206 |
+
$this->mce_buttons = $this->register_wpc_shortcodes_button( $this->mce_buttons );
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
if( class_exists( 'WC_Shortcodes_Admin' ) ) {
|
211 |
+
if ( ! empty( $this->wp_version_lt_4_8 ) ) {
|
212 |
+
|
213 |
+
$screen = get_current_screen();
|
214 |
+
if( ! is_null( $screen ) && $screen->id != 'widgets' ) {
|
215 |
+
add_filter( 'mce_external_plugins', array( $this, 'add_wc_shortcodes_plugin' ), 15 );
|
216 |
+
add_filter( 'mce_buttons', array( $this, 'register_wc_shortcodes_button' ), 15 );
|
217 |
+
}
|
218 |
+
} else {
|
219 |
+
$this->mce_external_plugins = $this->add_wc_shortcodes_plugin( $this->mce_external_plugins );
|
220 |
+
$this->mce_buttons = $this->register_wc_shortcodes_button( $this->mce_buttons );
|
221 |
+
}
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
function add_wc_shortcodes_plugin( $plugins ) {
|
226 |
+
if( isset( $plugins['woocommerce_shortcodes'] ) ) {
|
227 |
+
return $plugins;
|
228 |
+
}
|
229 |
+
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
230 |
+
$editor_path = 'woocommerce-shortcodes/assets/js/editor' . $suffix . '.js';
|
231 |
+
if( file_exists( WP_PLUGIN_DIR . '/' . $editor_path ) ) {
|
232 |
+
$plugins['woocommerce_shortcodes'] = plugins_url( $editor_path );
|
233 |
+
}
|
234 |
+
return $plugins;
|
235 |
+
}
|
236 |
+
|
237 |
+
function register_wc_shortcodes_button( $buttons ) {
|
238 |
+
if( ! in_array( 'woocommerce_shortcodes', $buttons ) ) {
|
239 |
+
array_push( $buttons, '|', 'woocommerce_shortcodes' );
|
240 |
+
}
|
241 |
+
return $buttons;
|
242 |
+
}
|
243 |
+
|
244 |
+
function add_wpc_shortcodes_plugin( $plugins ) {
|
245 |
+
if( ! isset( $plugins['wpc_shortcodes'] ) ) {
|
246 |
+
$shortcodes_path = 'wc-shortcodes/includes/mce/js/shortcodes-tinymce-4.js';
|
247 |
+
if ( file_exists( WP_PLUGIN_DIR . '/' . $shortcodes_path ) ) {
|
248 |
+
$plugins['wpc_shortcodes'] = plugins_url( $shortcodes_path . '?ver=' . WC_SHORTCODES_VERSION );
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
if( ! isset( $plugins['wpc_font_awesome'] ) ) {
|
253 |
+
$fontawesome_path = 'wc-shortcodes/includes/mce/js/font-awesome-tinymce-4.js';
|
254 |
+
if ( file_exists( WP_PLUGIN_DIR . '/' . $fontawesome_path ) ) {
|
255 |
+
$plugins['wpc_font_awesome'] = plugins_url( $fontawesome_path . '?ver=' . WC_SHORTCODES_VERSION );
|
256 |
+
}
|
257 |
+
}
|
258 |
+
|
259 |
+
return $plugins;
|
260 |
+
}
|
261 |
+
|
262 |
+
function register_wpc_shortcodes_button( $buttons ) {
|
263 |
+
if( ! in_array( 'wpc_shortcodes_button', $buttons ) ) {
|
264 |
+
array_push( $buttons, 'wpc_shortcodes_button' );
|
265 |
+
}
|
266 |
+
if( ! in_array( 'wpcfontAwesomeGlyphSelect', $buttons ) ) {
|
267 |
+
array_push( $buttons, 'wpcfontAwesomeGlyphSelect' );
|
268 |
+
}
|
269 |
+
|
270 |
+
return $buttons;
|
271 |
+
}
|
272 |
+
|
273 |
+
/**
|
274 |
+
* @param $name
|
275 |
+
* @param $arguments
|
276 |
+
* @return array|mixed
|
277 |
+
*/
|
278 |
+
function __call( $name, $arguments ) {
|
279 |
+
if ( preg_match( '/mce_buttons(?:_[1-4])?|quicktags_settings/', $name ) && !empty( $this->button_filters[$name] ) ) {
|
280 |
+
$filter = $this->button_filters[$name];
|
281 |
+
if ( !empty( $filter[0] ) && is_a( $filter[0], 'SiteOrigin_Widget' ) ) {
|
282 |
+
$widget = $filter[0];
|
283 |
+
$settings = !empty($arguments[0]) ? $arguments[0] : array();
|
284 |
+
$editor_id = !empty($arguments[1]) ? $arguments[1] : '';
|
285 |
+
if ( preg_match( '/widget-' . $widget->id_base . '-.*-' . $this->base_name . '/', $editor_id ) ) {
|
286 |
+
return call_user_func( $filter, $settings, $editor_id );
|
287 |
+
}
|
288 |
+
else {
|
289 |
+
return $settings;
|
290 |
+
}
|
291 |
+
}
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
+
public function mce_buttons_filter( $buttons, $editor_id ) {
|
296 |
+
if (($key = array_search('fullscreen', $buttons)) !== false) {
|
297 |
+
unset($buttons[$key]);
|
298 |
+
}
|
299 |
+
return $buttons;
|
300 |
+
}
|
301 |
+
|
302 |
+
public function quicktags_settings( $settings, $editor_id ) {
|
303 |
+
$settings['buttons'] = preg_replace( '/,fullscreen/', '', $settings['buttons'] );
|
304 |
+
$settings['buttons'] = preg_replace( '/,dfw/', '', $settings['buttons'] );
|
305 |
+
return $settings;
|
306 |
+
}
|
307 |
+
|
308 |
+
protected function get_input_classes() {
|
309 |
+
$classes = parent::get_input_classes();
|
310 |
+
$classes[] = 'wp-editor-area';
|
311 |
+
$classes[] = 'wp-exclude-emoji';
|
312 |
+
return $classes;
|
313 |
+
}
|
314 |
+
|
315 |
+
protected function render_before_field( $value, $instance ) {
|
316 |
+
$selected_editor = $this->get_selected_editor( $instance );
|
317 |
+
if( ! empty( $selected_editor ) ) {
|
318 |
+
$this->selected_editor = $selected_editor;
|
319 |
+
}
|
320 |
+
else {
|
321 |
+
$this->selected_editor = $this->default_editor;
|
322 |
+
}
|
323 |
+
parent::render_before_field( $value, $instance );
|
324 |
+
}
|
325 |
+
|
326 |
+
protected function render_field( $value, $instance ) {
|
327 |
+
|
328 |
+
if ( $this->wp_version_lt_4_8 ) {
|
329 |
+
$this->render_field_pre48( $value, $instance );
|
330 |
+
return;
|
331 |
+
}
|
332 |
+
|
333 |
+
$user_can_richedit = user_can_richedit();
|
334 |
+
|
335 |
+
$selected_editor = $user_can_richedit && in_array( $this->selected_editor, array( 'tinymce', 'tmce' ) ) ? 'tmce' : 'html';
|
336 |
+
|
337 |
+
$settings = array(
|
338 |
+
'selectedEditor' => $selected_editor,
|
339 |
+
);
|
340 |
+
|
341 |
+
if ( $user_can_richedit ) {
|
342 |
+
|
343 |
+
$tmce_settings = array(
|
344 |
+
'toolbar1' => apply_filters( 'mce_buttons', $this->mce_buttons, $this->element_id ),
|
345 |
+
'toolbar2' => apply_filters( 'mce_buttons_2', $this->mce_buttons_2, $this->element_id ),
|
346 |
+
'toolbar3' => apply_filters( 'mce_buttons_3',$this->mce_buttons_3, $this->element_id ),
|
347 |
+
'toolbar4' => apply_filters( 'mce_buttons_4',$this->mce_buttons_4, $this->element_id ),
|
348 |
+
'plugins' => array_unique( apply_filters( 'tiny_mce_plugins', $this->mce_plugins ) ),
|
349 |
+
);
|
350 |
+
|
351 |
+
foreach ( $tmce_settings as $name => $setting ) {
|
352 |
+
$tmce_settings[ $name ] = is_array( $setting ) ? implode( ',', $setting ) : '';
|
353 |
+
}
|
354 |
+
|
355 |
+
$tmce_settings['external_plugins'] = array_unique( apply_filters( 'mce_external_plugins', $this->mce_external_plugins ) );
|
356 |
+
|
357 |
+
$suffix = SCRIPT_DEBUG ? '' : '.min';
|
358 |
+
$version = 'ver=' . get_bloginfo( 'version' );
|
359 |
+
// Default stylesheets
|
360 |
+
$mce_css = includes_url( "css/dashicons$suffix.css?$version" ) . ',' .
|
361 |
+
includes_url( "js/tinymce/skins/wordpress/wp-content.css?$version" );
|
362 |
+
|
363 |
+
$editor_styles = get_editor_stylesheets();
|
364 |
+
|
365 |
+
if ( ! empty( $editor_styles ) ) {
|
366 |
+
// Force urlencoding of commas.
|
367 |
+
foreach ( $editor_styles as $key => $url ) {
|
368 |
+
if ( strpos( $url, ',' ) !== false ) {
|
369 |
+
$editor_styles[ $key ] = str_replace( ',', '%2C', $url );
|
370 |
+
}
|
371 |
+
}
|
372 |
+
|
373 |
+
$mce_css .= ',' . implode( ',', $editor_styles );
|
374 |
+
}
|
375 |
+
$mce_css = trim( apply_filters( 'mce_css', $mce_css ), ' ,' );
|
376 |
+
$tmce_settings['content_css'] = $mce_css;
|
377 |
+
|
378 |
+
$settings['tinymce'] = array(
|
379 |
+
'wp_skip_init' => strpos( $this->element_id, '__i__' ) != false ||
|
380 |
+
strpos( $this->element_id, '_id_' ) != false,
|
381 |
+
'wpautop' => ! empty( $this->wpautop ),
|
382 |
+
);
|
383 |
+
|
384 |
+
$tmce_settings = apply_filters( 'tiny_mce_before_init', $tmce_settings, $this->element_id );
|
385 |
+
|
386 |
+
foreach ( $tmce_settings as $name => $setting ) {
|
387 |
+
unset( $jdec );
|
388 |
+
if ( ! empty( $tmce_settings[ $name ] ) ) {
|
389 |
+
// Attempt to decode setting as JSON. For back compat with filters used by WP editor.
|
390 |
+
if ( is_string( $setting ) ) {
|
391 |
+
$jdec = json_decode( $setting, true );
|
392 |
+
}
|
393 |
+
$settings['tinymce'][ $name ] = empty( $jdec ) ? $setting : $jdec;
|
394 |
+
}
|
395 |
+
}
|
396 |
+
|
397 |
+
$media_buttons = $this->render_media_buttons( $this->element_id );
|
398 |
+
}
|
399 |
+
|
400 |
+
$qt_settings = apply_filters(
|
401 |
+
'quicktags_settings',
|
402 |
+
array( 'buttons' => $this->quicktags_buttons ),
|
403 |
+
$this->element_id
|
404 |
+
);
|
405 |
+
|
406 |
+
$qt_settings['buttons'] = ! empty( $qt_settings['buttons'] ) ? $qt_settings['buttons'] : array();
|
407 |
+
$qt_settings['buttons'] = is_array( $qt_settings['buttons'] ) ? implode( ',', $qt_settings['buttons'] ) : '';
|
408 |
+
|
409 |
+
$settings['quicktags'] = array(
|
410 |
+
'buttons' => $qt_settings['buttons'],
|
411 |
+
);
|
412 |
+
|
413 |
+
$value = apply_filters( 'the_editor_content', $value, $this->selected_editor );
|
414 |
+
|
415 |
+
if ( false !== stripos( $value, 'textarea' ) ) {
|
416 |
+
$value = preg_replace( '%</textarea%i', '</textarea', $value );
|
417 |
+
}
|
418 |
+
|
419 |
+
$media_buttons = $this->render_media_buttons( $this->element_id );
|
420 |
+
|
421 |
+
$settings['baseURL'] = includes_url( 'js/tinymce' );
|
422 |
+
$settings['suffix'] = SCRIPT_DEBUG ? '' : '.min';
|
423 |
+
|
424 |
+
?><div class="siteorigin-widget-tinymce-container"
|
425 |
+
<?php if ( ! empty( $media_buttons ) ) : ?>
|
426 |
+
data-media-buttons="<?php echo esc_attr( json_encode( array( 'html' => $media_buttons ) ) ) ?>"
|
427 |
+
<?php endif; ?>
|
428 |
+
data-editor-settings="<?php echo esc_attr( json_encode( $settings ) ) ?>">
|
429 |
+
<textarea id="<?php echo esc_attr( $this->element_id ) ?>"
|
430 |
+
name="<?php echo esc_attr( $this->element_name ) ?>"
|
431 |
+
<?php if ( isset( $this->editor_height ) ) : ?>
|
432 |
+
style="height: <?php echo intval( $this->editor_height ) ?>px"
|
433 |
+
<?php else : ?>
|
434 |
+
rows="<?php echo esc_attr( $this->rows ) ?>"
|
435 |
+
<?php endif; ?>
|
436 |
+
<?php $this->render_data_attributes( $this->get_input_data_attributes() ) ?>
|
437 |
+
<?php $this->render_CSS_classes( $this->get_input_classes() ) ?>
|
438 |
+
<?php if ( ! empty( $this->placeholder ) ) echo 'placeholder="' . esc_attr( $this->placeholder ) . '"' ?>
|
439 |
+
<?php if( ! empty( $this->readonly ) ) echo 'readonly' ?>><?php echo htmlentities( $value, ENT_QUOTES, 'UTF-8' ) ?></textarea>
|
440 |
+
</div>
|
441 |
+
<input type="hidden"
|
442 |
+
name="<?php echo esc_attr( $this->for_widget->so_get_field_name( $this->base_name . '_selected_editor', $this->parent_container) ) ?>"
|
443 |
+
class="siteorigin-widget-input siteorigin-widget-tinymce-selected-editor"
|
444 |
+
value="<?php echo esc_attr( $this->selected_editor ) ?>"/>
|
445 |
+
<?php
|
446 |
+
|
447 |
+
}
|
448 |
+
|
449 |
+
private function render_field_pre48( $value, $instance ) {
|
450 |
+
|
451 |
+
$settings = array(
|
452 |
+
'textarea_name' => esc_attr( $this->element_name ),
|
453 |
+
'default_editor' => $this->selected_editor,
|
454 |
+
'textarea_rows' => $this->rows,
|
455 |
+
'editor_class' => 'siteorigin-widget-input',
|
456 |
+
'tinymce' => array(
|
457 |
+
'wp_skip_init' => strpos( $this->element_id, '__i__' ) != false || strpos( $this->element_id, '_id_' ) != false
|
458 |
+
)
|
459 |
+
);
|
460 |
+
if( isset( $this->editor_height ) ) $settings['editor_height'] = $this->editor_height;
|
461 |
+
preg_match( '/widget-(.+?)\[/', $this->element_name, $id_base_matches );
|
462 |
+
$widget_id_base = empty($id_base_matches) || count($id_base_matches) < 2 ? '' : $id_base_matches[1];
|
463 |
+
?>
|
464 |
+
<div class="siteorigin-widget-tinymce-container"
|
465 |
+
data-mce-settings="<?php echo esc_attr( json_encode( $settings['tinymce'] ) ) ?>"
|
466 |
+
data-qt-settings="<?php echo esc_attr( json_encode( array() ) ) ?>"
|
467 |
+
data-widget-id-base="<?php echo esc_attr( $widget_id_base ) ?>"
|
468 |
+
>
|
469 |
+
<?php
|
470 |
+
wp_editor( $value, esc_attr( $this->element_id ), $settings )
|
471 |
+
?>
|
472 |
+
</div>
|
473 |
+
<input type="hidden"
|
474 |
+
name="<?php echo esc_attr( $this->for_widget->so_get_field_name( $this->base_name . '_selected_editor', $this->parent_container) ) ?>"
|
475 |
+
class="siteorigin-widget-input siteorigin-widget-tinymce-selected-editor"
|
476 |
+
value="<?php echo esc_attr( $this->selected_editor ) ?>"/>
|
477 |
+
<?php
|
478 |
+
|
479 |
+
if( $this->selected_editor == 'html' ) {
|
480 |
+
remove_filter( 'the_editor_content', 'wp_htmledit_pre' );
|
481 |
+
}
|
482 |
+
if( $this->selected_editor == 'tinymce' ) {
|
483 |
+
remove_filter( 'the_editor_content', 'wp_richedit_pre' );
|
484 |
+
}
|
485 |
+
}
|
486 |
+
|
487 |
+
public function enqueue_scripts() {
|
488 |
+
|
489 |
+
if ( $this->wp_version_lt_4_8 ) {
|
490 |
+
$src = plugin_dir_url( __FILE__ ) . 'js/tinymce-field-pre48' . SOW_BUNDLE_JS_SUFFIX . '.js';
|
491 |
+
$deps = array( 'jquery', 'editor', 'quicktags' );
|
492 |
+
} else {
|
493 |
+
wp_enqueue_editor();
|
494 |
+
$src = plugin_dir_url( __FILE__ ) . 'js/tinymce-field' . SOW_BUNDLE_JS_SUFFIX . '.js';
|
495 |
+
$deps = array( 'jquery' );
|
496 |
+
}
|
497 |
+
|
498 |
+
wp_enqueue_script( 'so-tinymce-field', $src, $deps, SOW_BUNDLE_VERSION );
|
499 |
+
wp_enqueue_style(
|
500 |
+
'so-tinymce-field', plugin_dir_url( __FILE__ ) . 'css/tinymce-field.css', array(), SOW_BUNDLE_VERSION
|
501 |
+
);
|
502 |
+
}
|
503 |
+
|
504 |
+
protected function sanitize_field_input( $value, $instance ) {
|
505 |
+
$selected_editor = $this->get_selected_editor( $instance );
|
506 |
+
if ( in_array( $selected_editor, array( 'tinymce', 'tmce' ) ) && ! empty( $this->wpautop ) ) {
|
507 |
+
$value = wpautop( $value );
|
508 |
+
}
|
509 |
+
if( current_user_can( 'unfiltered_html' ) ) {
|
510 |
+
$sanitized_value = $value;
|
511 |
+
} else {
|
512 |
+
$sanitized_value = wp_kses_post( $value );
|
513 |
+
}
|
514 |
+
$sanitized_value = balanceTags( $sanitized_value , true );
|
515 |
+
return $sanitized_value;
|
516 |
+
}
|
517 |
+
|
518 |
+
public function sanitize_instance( $instance ) {
|
519 |
+
$selected_editor_name = $this->get_selected_editor_field_name( $this->base_name );
|
520 |
+
if( ! empty( $instance[ $selected_editor_name ] ) ) {
|
521 |
+
$selected_editor = $instance[ $selected_editor_name ];
|
522 |
+
$instance[ $selected_editor_name ] = in_array( $selected_editor, array( 'tinymce', 'tmce', 'quicktags', 'html' ) ) ? $selected_editor : $this->default_editor;
|
523 |
+
}
|
524 |
+
return $instance;
|
525 |
+
}
|
526 |
+
|
527 |
+
public function get_selected_editor( $instance ) {
|
528 |
+
$selected_editor = null;
|
529 |
+
$selected_editor_name = $this->get_selected_editor_field_name( $this->base_name );
|
530 |
+
if( ! empty( $instance[ $selected_editor_name ] ) ) {
|
531 |
+
$selected_editor = $instance[ $selected_editor_name ];
|
532 |
+
}
|
533 |
+
|
534 |
+
return $selected_editor;
|
535 |
+
}
|
536 |
+
|
537 |
+
public function get_selected_editor_field_name( $base_name ) {
|
538 |
+
$v_name = $base_name;
|
539 |
+
if( strpos($v_name, '][') !== false ) {
|
540 |
+
// Remove this splitter
|
541 |
+
$v_name = substr( $v_name, strrpos($v_name, '][') + 2 );
|
542 |
+
}
|
543 |
+
return $v_name . '_selected_editor';
|
544 |
+
}
|
545 |
+
|
546 |
+
private function render_media_buttons( $editor_id ) {
|
547 |
+
|
548 |
+
ob_start();
|
549 |
+
if ( ! function_exists( 'media_buttons' ) ) {
|
550 |
+
include( ABSPATH . 'wp-admin/includes/media.php' );
|
551 |
+
}
|
552 |
+
|
553 |
+
echo '<div id="wp-' . esc_attr( $editor_id ) . '-media-buttons" class="wp-media-buttons">';
|
554 |
+
|
555 |
+
do_action( 'media_buttons', $editor_id );
|
556 |
+
|
557 |
+
echo "</div>\n";
|
558 |
+
|
559 |
+
return ob_get_clean();
|
560 |
+
}
|
561 |
+
}
|
base/inc/fields/widget.class.php
CHANGED
@@ -1,71 +1,71 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget_Field_Widget
|
5 |
-
*/
|
6 |
-
class SiteOrigin_Widget_Field_Widget extends SiteOrigin_Widget_Field_Container_Base {
|
7 |
-
/**
|
8 |
-
* The class name of the widget to be included.
|
9 |
-
*
|
10 |
-
* @access protected
|
11 |
-
* @var string
|
12 |
-
*/
|
13 |
-
protected $class;
|
14 |
-
/**
|
15 |
-
* A filter for the widget's form fields. In some cases we may want to filter some fields out of a sub-widget form.
|
16 |
-
*
|
17 |
-
* @access protected
|
18 |
-
* @var callable
|
19 |
-
*/
|
20 |
-
protected $form_filter;
|
21 |
-
|
22 |
-
public function __construct( $base_name, $element_id, $element_name, $field_options, SiteOrigin_Widget $for_widget, $parent_container = array() ) {
|
23 |
-
parent::__construct( $base_name, $element_id, $element_name, $field_options, $for_widget, $parent_container );
|
24 |
-
|
25 |
-
if( isset( $this->class ) ) {
|
26 |
-
if( class_exists( $this->class ) ) {
|
27 |
-
/* @var $sub_widget SiteOrigin_Widget */
|
28 |
-
$sub_widget = new $this->class;
|
29 |
-
if( is_a( $sub_widget, 'SiteOrigin_Widget' ) ) {
|
30 |
-
if ( ! empty( $this->form_filter ) && is_callable( $this->form_filter ) ) {
|
31 |
-
$this->fields = call_user_func( $this->form_filter, $sub_widget->form_options( $this->for_widget ) );
|
32 |
-
} else {
|
33 |
-
$this->fields = $sub_widget->form_options( $this->for_widget );
|
34 |
-
}
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
protected function render_field( $value, $instance ) {
|
41 |
-
|
42 |
-
echo '<div class="siteorigin-widget-widget">';
|
43 |
-
if ( $this->collapsible ) {
|
44 |
-
?><div class="siteorigin-widget-section <?php if( $this->state == 'closed' ) echo 'siteorigin-widget-section-hide'; ?>"><?php
|
45 |
-
}
|
46 |
-
|
47 |
-
if( ! class_exists( $this->class ) ) {
|
48 |
-
printf( __( '%s does not exist', 'so-widgets-bundle' ), $this->class );
|
49 |
-
if ( $this->collapsible ) {
|
50 |
-
echo '</div>';
|
51 |
-
}
|
52 |
-
return;
|
53 |
-
}
|
54 |
-
|
55 |
-
/* @var $sub_widget SiteOrigin_Widget */
|
56 |
-
$sub_widget = new $this->class;
|
57 |
-
if( ! is_a( $sub_widget, 'SiteOrigin_Widget' ) ) {
|
58 |
-
printf( __( '%s is not a SiteOrigin Widget', 'so-widgets-bundle' ), $this->class );
|
59 |
-
if ( $this->collapsible ) {
|
60 |
-
echo '</div>';
|
61 |
-
}
|
62 |
-
return;
|
63 |
-
}
|
64 |
-
$this->create_and_render_sub_fields( $value, array( 'name' => $this->base_name, 'type' => 'widget' ) );
|
65 |
-
if ( $this->collapsible ) {
|
66 |
-
?></div><?php
|
67 |
-
}
|
68 |
-
echo '</div>';
|
69 |
-
}
|
70 |
-
|
71 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget_Field_Widget
|
5 |
+
*/
|
6 |
+
class SiteOrigin_Widget_Field_Widget extends SiteOrigin_Widget_Field_Container_Base {
|
7 |
+
/**
|
8 |
+
* The class name of the widget to be included.
|
9 |
+
*
|
10 |
+
* @access protected
|
11 |
+
* @var string
|
12 |
+
*/
|
13 |
+
protected $class;
|
14 |
+
/**
|
15 |
+
* A filter for the widget's form fields. In some cases we may want to filter some fields out of a sub-widget form.
|
16 |
+
*
|
17 |
+
* @access protected
|
18 |
+
* @var callable
|
19 |
+
*/
|
20 |
+
protected $form_filter;
|
21 |
+
|
22 |
+
public function __construct( $base_name, $element_id, $element_name, $field_options, SiteOrigin_Widget $for_widget, $parent_container = array() ) {
|
23 |
+
parent::__construct( $base_name, $element_id, $element_name, $field_options, $for_widget, $parent_container );
|
24 |
+
|
25 |
+
if( isset( $this->class ) ) {
|
26 |
+
if( class_exists( $this->class ) ) {
|
27 |
+
/* @var $sub_widget SiteOrigin_Widget */
|
28 |
+
$sub_widget = new $this->class;
|
29 |
+
if( is_a( $sub_widget, 'SiteOrigin_Widget' ) ) {
|
30 |
+
if ( ! empty( $this->form_filter ) && is_callable( $this->form_filter ) ) {
|
31 |
+
$this->fields = call_user_func( $this->form_filter, $sub_widget->form_options( $this->for_widget ) );
|
32 |
+
} else {
|
33 |
+
$this->fields = $sub_widget->form_options( $this->for_widget );
|
34 |
+
}
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
protected function render_field( $value, $instance ) {
|
41 |
+
|
42 |
+
echo '<div class="siteorigin-widget-widget">';
|
43 |
+
if ( $this->collapsible ) {
|
44 |
+
?><div class="siteorigin-widget-section <?php if( $this->state == 'closed' ) echo 'siteorigin-widget-section-hide'; ?>"><?php
|
45 |
+
}
|
46 |
+
|
47 |
+
if( ! class_exists( $this->class ) ) {
|
48 |
+
printf( __( '%s does not exist', 'so-widgets-bundle' ), $this->class );
|
49 |
+
if ( $this->collapsible ) {
|
50 |
+
echo '</div>';
|
51 |
+
}
|
52 |
+
return;
|
53 |
+
}
|
54 |
+
|
55 |
+
/* @var $sub_widget SiteOrigin_Widget */
|
56 |
+
$sub_widget = new $this->class;
|
57 |
+
if( ! is_a( $sub_widget, 'SiteOrigin_Widget' ) ) {
|
58 |
+
printf( __( '%s is not a SiteOrigin Widget', 'so-widgets-bundle' ), $this->class );
|
59 |
+
if ( $this->collapsible ) {
|
60 |
+
echo '</div>';
|
61 |
+
}
|
62 |
+
return;
|
63 |
+
}
|
64 |
+
$this->create_and_render_sub_fields( $value, array( 'name' => $this->base_name, 'type' => 'widget' ) );
|
65 |
+
if ( $this->collapsible ) {
|
66 |
+
?></div><?php
|
67 |
+
}
|
68 |
+
echo '</div>';
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
base/inc/fonts.php
CHANGED
@@ -1,4846 +1,4846 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
return array(
|
4 |
-
'ABeeZee' =>
|
5 |
-
array(
|
6 |
-
0 => 'regular',
|
7 |
-
1 => 'italic',
|
8 |
-
),
|
9 |
-
'Abel' =>
|
10 |
-
array(
|
11 |
-
0 => 'regular',
|
12 |
-
),
|
13 |
-
'Abhaya Libre' =>
|
14 |
-
array(
|
15 |
-
0 => 'regular',
|
16 |
-
1 => '500',
|
17 |
-
2 => '600',
|
18 |
-
3 => '700',
|
19 |
-
4 => '800',
|
20 |
-
),
|
21 |
-
'Abril Fatface' =>
|
22 |
-
array(
|
23 |
-
0 => 'regular',
|
24 |
-
),
|
25 |
-
'Aclonica' =>
|
26 |
-
array(
|
27 |
-
0 => 'regular',
|
28 |
-
),
|
29 |
-
'Acme' =>
|
30 |
-
array(
|
31 |
-
0 => 'regular',
|
32 |
-
),
|
33 |
-
'Actor' =>
|
34 |
-
array(
|
35 |
-
0 => 'regular',
|
36 |
-
),
|
37 |
-
'Adamina' =>
|
38 |
-
array(
|
39 |
-
0 => 'regular',
|
40 |
-
),
|
41 |
-
'Advent Pro' =>
|
42 |
-
array(
|
43 |
-
0 => '100',
|
44 |
-
1 => '200',
|
45 |
-
2 => '300',
|
46 |
-
3 => 'regular',
|
47 |
-
4 => '500',
|
48 |
-
5 => '600',
|
49 |
-
6 => '700',
|
50 |
-
),
|
51 |
-
'Aguafina Script' =>
|
52 |
-
array(
|
53 |
-
0 => 'regular',
|
54 |
-
),
|
55 |
-
'Akronim' =>
|
56 |
-
array(
|
57 |
-
0 => 'regular',
|
58 |
-
),
|
59 |
-
'Aladin' =>
|
60 |
-
array(
|
61 |
-
0 => 'regular',
|
62 |
-
),
|
63 |
-
'Aldrich' =>
|
64 |
-
array(
|
65 |
-
0 => 'regular',
|
66 |
-
),
|
67 |
-
'Alef' =>
|
68 |
-
array(
|
69 |
-
0 => 'regular',
|
70 |
-
1 => '700',
|
71 |
-
),
|
72 |
-
'Alegreya' =>
|
73 |
-
array(
|
74 |
-
0 => 'regular',
|
75 |
-
1 => 'italic',
|
76 |
-
2 => '500',
|
77 |
-
3 => '500italic',
|
78 |
-
4 => '700',
|
79 |
-
5 => '700italic',
|
80 |
-
6 => '800',
|
81 |
-
7 => '800italic',
|
82 |
-
8 => '900',
|
83 |
-
9 => '900italic',
|
84 |
-
),
|
85 |
-
'Alegreya SC' =>
|
86 |
-
array(
|
87 |
-
0 => 'regular',
|
88 |
-
1 => 'italic',
|
89 |
-
2 => '500',
|
90 |
-
3 => '500italic',
|
91 |
-
4 => '700',
|
92 |
-
5 => '700italic',
|
93 |
-
6 => '800',
|
94 |
-
7 => '800italic',
|
95 |
-
8 => '900',
|
96 |
-
9 => '900italic',
|
97 |
-
),
|
98 |
-
'Alegreya Sans' =>
|
99 |
-
array(
|
100 |
-
0 => '100',
|
101 |
-
1 => '100italic',
|
102 |
-
2 => '300',
|
103 |
-
3 => '300italic',
|
104 |
-
4 => 'regular',
|
105 |
-
5 => 'italic',
|
106 |
-
6 => '500',
|
107 |
-
7 => '500italic',
|
108 |
-
8 => '700',
|
109 |
-
9 => '700italic',
|
110 |
-
10 => '800',
|
111 |
-
11 => '800italic',
|
112 |
-
12 => '900',
|
113 |
-
13 => '900italic',
|
114 |
-
),
|
115 |
-
'Alegreya Sans SC' =>
|
116 |
-
array(
|
117 |
-
0 => '100',
|
118 |
-
1 => '100italic',
|
119 |
-
2 => '300',
|
120 |
-
3 => '300italic',
|
121 |
-
4 => 'regular',
|
122 |
-
5 => 'italic',
|
123 |
-
6 => '500',
|
124 |
-
7 => '500italic',
|
125 |
-
8 => '700',
|
126 |
-
9 => '700italic',
|
127 |
-
10 => '800',
|
128 |
-
11 => '800italic',
|
129 |
-
12 => '900',
|
130 |
-
13 => '900italic',
|
131 |
-
),
|
132 |
-
'Alex Brush' =>
|
133 |
-
array(
|
134 |
-
0 => 'regular',
|
135 |
-
),
|
136 |
-
'Alfa Slab One' =>
|
137 |
-
array(
|
138 |
-
0 => 'regular',
|
139 |
-
),
|
140 |
-
'Alice' =>
|
141 |
-
array(
|
142 |
-
0 => 'regular',
|
143 |
-
),
|
144 |
-
'Alike' =>
|
145 |
-
array(
|
146 |
-
0 => 'regular',
|
147 |
-
),
|
148 |
-
'Alike Angular' =>
|
149 |
-
array(
|
150 |
-
0 => 'regular',
|
151 |
-
),
|
152 |
-
'Allan' =>
|
153 |
-
array(
|
154 |
-
0 => 'regular',
|
155 |
-
1 => '700',
|
156 |
-
),
|
157 |
-
'Allerta' =>
|
158 |
-
array(
|
159 |
-
0 => 'regular',
|
160 |
-
),
|
161 |
-
'Allerta Stencil' =>
|
162 |
-
array(
|
163 |
-
0 => 'regular',
|
164 |
-
),
|
165 |
-
'Allura' =>
|
166 |
-
array(
|
167 |
-
0 => 'regular',
|
168 |
-
),
|
169 |
-
'Almendra' =>
|
170 |
-
array(
|
171 |
-
0 => 'regular',
|
172 |
-
1 => 'italic',
|
173 |
-
2 => '700',
|
174 |
-
3 => '700italic',
|
175 |
-
),
|
176 |
-
'Almendra Display' =>
|
177 |
-
array(
|
178 |
-
0 => 'regular',
|
179 |
-
),
|
180 |
-
'Almendra SC' =>
|
181 |
-
array(
|
182 |
-
0 => 'regular',
|
183 |
-
),
|
184 |
-
'Amarante' =>
|
185 |
-
array(
|
186 |
-
0 => 'regular',
|
187 |
-
),
|
188 |
-
'Amaranth' =>
|
189 |
-
array(
|
190 |
-
0 => 'regular',
|
191 |
-
1 => 'italic',
|
192 |
-
2 => '700',
|
193 |
-
3 => '700italic',
|
194 |
-
),
|
195 |
-
'Amatic SC' =>
|
196 |
-
array(
|
197 |
-
0 => 'regular',
|
198 |
-
1 => '700',
|
199 |
-
),
|
200 |
-
'Amethysta' =>
|
201 |
-
array(
|
202 |
-
0 => 'regular',
|
203 |
-
),
|
204 |
-
'Amiko' =>
|
205 |
-
array(
|
206 |
-
0 => 'regular',
|
207 |
-
1 => '600',
|
208 |
-
2 => '700',
|
209 |
-
),
|
210 |
-
'Amiri' =>
|
211 |
-
array(
|
212 |
-
0 => 'regular',
|
213 |
-
1 => 'italic',
|
214 |
-
2 => '700',
|
215 |
-
3 => '700italic',
|
216 |
-
),
|
217 |
-
'Amita' =>
|
218 |
-
array(
|
219 |
-
0 => 'regular',
|
220 |
-
1 => '700',
|
221 |
-
),
|
222 |
-
'Anaheim' =>
|
223 |
-
array(
|
224 |
-
0 => 'regular',
|
225 |
-
),
|
226 |
-
'Andada' =>
|
227 |
-
array(
|
228 |
-
0 => 'regular',
|
229 |
-
),
|
230 |
-
'Andika' =>
|
231 |
-
array(
|
232 |
-
0 => 'regular',
|
233 |
-
),
|
234 |
-
'Angkor' =>
|
235 |
-
array(
|
236 |
-
0 => 'regular',
|
237 |
-
),
|
238 |
-
'Annie Use Your Telescope' =>
|
239 |
-
array(
|
240 |
-
0 => 'regular',
|
241 |
-
),
|
242 |
-
'Anonymous Pro' =>
|
243 |
-
array(
|
244 |
-
0 => 'regular',
|
245 |
-
1 => 'italic',
|
246 |
-
2 => '700',
|
247 |
-
3 => '700italic',
|
248 |
-
),
|
249 |
-
'Antic' =>
|
250 |
-
array(
|
251 |
-
0 => 'regular',
|
252 |
-
),
|
253 |
-
'Antic Didone' =>
|
254 |
-
array(
|
255 |
-
0 => 'regular',
|
256 |
-
),
|
257 |
-
'Antic Slab' =>
|
258 |
-
array(
|
259 |
-
0 => 'regular',
|
260 |
-
),
|
261 |
-
'Anton' =>
|
262 |
-
array(
|
263 |
-
0 => 'regular',
|
264 |
-
),
|
265 |
-
'Arapey' =>
|
266 |
-
array(
|
267 |
-
0 => 'regular',
|
268 |
-
1 => 'italic',
|
269 |
-
),
|
270 |
-
'Arbutus' =>
|
271 |
-
array(
|
272 |
-
0 => 'regular',
|
273 |
-
),
|
274 |
-
'Arbutus Slab' =>
|
275 |
-
array(
|
276 |
-
0 => 'regular',
|
277 |
-
),
|
278 |
-
'Architects Daughter' =>
|
279 |
-
array(
|
280 |
-
0 => 'regular',
|
281 |
-
),
|
282 |
-
'Archivo' =>
|
283 |
-
array(
|
284 |
-
0 => 'regular',
|
285 |
-
1 => 'italic',
|
286 |
-
2 => '500',
|
287 |
-
3 => '500italic',
|
288 |
-
4 => '600',
|
289 |
-
5 => '600italic',
|
290 |
-
6 => '700',
|
291 |
-
7 => '700italic',
|
292 |
-
),
|
293 |
-
'Archivo Black' =>
|
294 |
-
array(
|
295 |
-
0 => 'regular',
|
296 |
-
),
|
297 |
-
'Archivo Narrow' =>
|
298 |
-
array(
|
299 |
-
0 => 'regular',
|
300 |
-
1 => 'italic',
|
301 |
-
2 => '500',
|
302 |
-
3 => '500italic',
|
303 |
-
4 => '600',
|
304 |
-
5 => '600italic',
|
305 |
-
6 => '700',
|
306 |
-
7 => '700italic',
|
307 |
-
),
|
308 |
-
'Aref Ruqaa' =>
|
309 |
-
array(
|
310 |
-
0 => 'regular',
|
311 |
-
1 => '700',
|
312 |
-
),
|
313 |
-
'Arima Madurai' =>
|
314 |
-
array(
|
315 |
-
0 => '100',
|
316 |
-
1 => '200',
|
317 |
-
2 => '300',
|
318 |
-
3 => 'regular',
|
319 |
-
4 => '500',
|
320 |
-
5 => '700',
|
321 |
-
6 => '800',
|
322 |
-
7 => '900',
|
323 |
-
),
|
324 |
-
'Arimo' =>
|
325 |
-
array(
|
326 |
-
0 => 'regular',
|
327 |
-
1 => 'italic',
|
328 |
-
2 => '700',
|
329 |
-
3 => '700italic',
|
330 |
-
),
|
331 |
-
'Arizonia' =>
|
332 |
-
array(
|
333 |
-
0 => 'regular',
|
334 |
-
),
|
335 |
-
'Armata' =>
|
336 |
-
array(
|
337 |
-
0 => 'regular',
|
338 |
-
),
|
339 |
-
'Arsenal' =>
|
340 |
-
array(
|
341 |
-
0 => 'regular',
|
342 |
-
1 => 'italic',
|
343 |
-
2 => '700',
|
344 |
-
3 => '700italic',
|
345 |
-
),
|
346 |
-
'Artifika' =>
|
347 |
-
array(
|
348 |
-
0 => 'regular',
|
349 |
-
),
|
350 |
-
'Arvo' =>
|
351 |
-
array(
|
352 |
-
0 => 'regular',
|
353 |
-
1 => 'italic',
|
354 |
-
2 => '700',
|
355 |
-
3 => '700italic',
|
356 |
-
),
|
357 |
-
'Arya' =>
|
358 |
-
array(
|
359 |
-
0 => 'regular',
|
360 |
-
1 => '700',
|
361 |
-
),
|
362 |
-
'Asap' =>
|
363 |
-
array(
|
364 |
-
0 => 'regular',
|
365 |
-
1 => 'italic',
|
366 |
-
2 => '500',
|
367 |
-
3 => '500italic',
|
368 |
-
4 => '600',
|
369 |
-
5 => '600italic',
|
370 |
-
6 => '700',
|
371 |
-
7 => '700italic',
|
372 |
-
),
|
373 |
-
'Asap Condensed' =>
|
374 |
-
array(
|
375 |
-
0 => 'regular',
|
376 |
-
1 => 'italic',
|
377 |
-
2 => '500',
|
378 |
-
3 => '500italic',
|
379 |
-
4 => '600',
|
380 |
-
5 => '600italic',
|
381 |
-
6 => '700',
|
382 |
-
7 => '700italic',
|
383 |
-
),
|
384 |
-
'Asar' =>
|
385 |
-
array(
|
386 |
-
0 => 'regular',
|
387 |
-
),
|
388 |
-
'Asset' =>
|
389 |
-
array(
|
390 |
-
0 => 'regular',
|
391 |
-
),
|
392 |
-
'Assistant' =>
|
393 |
-
array(
|
394 |
-
0 => '200',
|
395 |
-
1 => '300',
|
396 |
-
2 => 'regular',
|
397 |
-
3 => '600',
|
398 |
-
4 => '700',
|
399 |
-
5 => '800',
|
400 |
-
),
|
401 |
-
'Astloch' =>
|
402 |
-
array(
|
403 |
-
0 => 'regular',
|
404 |
-
1 => '700',
|
405 |
-
),
|
406 |
-
'Asul' =>
|
407 |
-
array(
|
408 |
-
0 => 'regular',
|
409 |
-
1 => '700',
|
410 |
-
),
|
411 |
-
'Athiti' =>
|
412 |
-
array(
|
413 |
-
0 => '200',
|
414 |
-
1 => '300',
|
415 |
-
2 => 'regular',
|
416 |
-
3 => '500',
|
417 |
-
4 => '600',
|
418 |
-
5 => '700',
|
419 |
-
),
|
420 |
-
'Atma' =>
|
421 |
-
array(
|
422 |
-
0 => '300',
|
423 |
-
1 => 'regular',
|
424 |
-
2 => '500',
|
425 |
-
3 => '600',
|
426 |
-
4 => '700',
|
427 |
-
),
|
428 |
-
'Atomic Age' =>
|
429 |
-
array(
|
430 |
-
0 => 'regular',
|
431 |
-
),
|
432 |
-
'Aubrey' =>
|
433 |
-
array(
|
434 |
-
0 => 'regular',
|
435 |
-
),
|
436 |
-
'Audiowide' =>
|
437 |
-
array(
|
438 |
-
0 => 'regular',
|
439 |
-
),
|
440 |
-
'Autour One' =>
|
441 |
-
array(
|
442 |
-
0 => 'regular',
|
443 |
-
),
|
444 |
-
'Average' =>
|
445 |
-
array(
|
446 |
-
0 => 'regular',
|
447 |
-
),
|
448 |
-
'Average Sans' =>
|
449 |
-
array(
|
450 |
-
0 => 'regular',
|
451 |
-
),
|
452 |
-
'Averia Gruesa Libre' =>
|
453 |
-
array(
|
454 |
-
0 => 'regular',
|
455 |
-
),
|
456 |
-
'Averia Libre' =>
|
457 |
-
array(
|
458 |
-
0 => '300',
|
459 |
-
1 => '300italic',
|
460 |
-
2 => 'regular',
|
461 |
-
3 => 'italic',
|
462 |
-
4 => '700',
|
463 |
-
5 => '700italic',
|
464 |
-
),
|
465 |
-
'Averia Sans Libre' =>
|
466 |
-
array(
|
467 |
-
0 => '300',
|
468 |
-
1 => '300italic',
|
469 |
-
2 => 'regular',
|
470 |
-
3 => 'italic',
|
471 |
-
4 => '700',
|
472 |
-
5 => '700italic',
|
473 |
-
),
|
474 |
-
'Averia Serif Libre' =>
|
475 |
-
array(
|
476 |
-
0 => '300',
|
477 |
-
1 => '300italic',
|
478 |
-
2 => 'regular',
|
479 |
-
3 => 'italic',
|
480 |
-
4 => '700',
|
481 |
-
5 => '700italic',
|
482 |
-
),
|
483 |
-
'Bad Script' =>
|
484 |
-
array(
|
485 |
-
0 => 'regular',
|
486 |
-
),
|
487 |
-
'Bahiana' =>
|
488 |
-
array(
|
489 |
-
0 => 'regular',
|
490 |
-
),
|
491 |
-
'Baloo' =>
|
492 |
-
array(
|
493 |
-
0 => 'regular',
|
494 |
-
),
|
495 |
-
'Baloo Bhai' =>
|
496 |
-
array(
|
497 |
-
0 => 'regular',
|
498 |
-
),
|
499 |
-
'Baloo Bhaijaan' =>
|
500 |
-
array(
|
501 |
-
0 => 'regular',
|
502 |
-
),
|
503 |
-
'Baloo Bhaina' =>
|
504 |
-
array(
|
505 |
-
0 => 'regular',
|
506 |
-
),
|
507 |
-
'Baloo Chettan' =>
|
508 |
-
array(
|
509 |
-
0 => 'regular',
|
510 |
-
),
|
511 |
-
'Baloo Da' =>
|
512 |
-
array(
|
513 |
-
0 => 'regular',
|
514 |
-
),
|
515 |
-
'Baloo Paaji' =>
|
516 |
-
array(
|
517 |
-
0 => 'regular',
|
518 |
-
),
|
519 |
-
'Baloo Tamma' =>
|
520 |
-
array(
|
521 |
-
0 => 'regular',
|
522 |
-
),
|
523 |
-
'Baloo Tammudu' =>
|
524 |
-
array(
|
525 |
-
0 => 'regular',
|
526 |
-
),
|
527 |
-
'Baloo Thambi' =>
|
528 |
-
array(
|
529 |
-
0 => 'regular',
|
530 |
-
),
|
531 |
-
'Balthazar' =>
|
532 |
-
array(
|
533 |
-
0 => 'regular',
|
534 |
-
),
|
535 |
-
'Bangers' =>
|
536 |
-
array(
|
537 |
-
0 => 'regular',
|
538 |
-
),
|
539 |
-
'Barlow' =>
|
540 |
-
array(
|
541 |
-
0 => '100',
|
542 |
-
1 => '100italic',
|
543 |
-
2 => '200',
|
544 |
-
3 => '200italic',
|
545 |
-
4 => '300',
|
546 |
-
5 => '300italic',
|
547 |
-
6 => 'regular',
|
548 |
-
7 => 'italic',
|
549 |
-
8 => '500',
|
550 |
-
9 => '500italic',
|
551 |
-
10 => '600',
|
552 |
-
11 => '600italic',
|
553 |
-
12 => '700',
|
554 |
-
13 => '700italic',
|
555 |
-
14 => '800',
|
556 |
-
15 => '800italic',
|
557 |
-
16 => '900',
|
558 |
-
17 => '900italic',
|
559 |
-
),
|
560 |
-
'Barlow Condensed' =>
|
561 |
-
array(
|
562 |
-
0 => '100',
|
563 |
-
1 => '100italic',
|
564 |
-
2 => '200',
|
565 |
-
3 => '200italic',
|
566 |
-
4 => '300',
|
567 |
-
5 => '300italic',
|
568 |
-
6 => 'regular',
|
569 |
-
7 => 'italic',
|
570 |
-
8 => '500',
|
571 |
-
9 => '500italic',
|
572 |
-
10 => '600',
|
573 |
-
11 => '600italic',
|
574 |
-
12 => '700',
|
575 |
-
13 => '700italic',
|
576 |
-
14 => '800',
|
577 |
-
15 => '800italic',
|
578 |
-
16 => '900',
|
579 |
-
17 => '900italic',
|
580 |
-
),
|
581 |
-
'Barlow Semi Condensed' =>
|
582 |
-
array(
|
583 |
-
0 => '100',
|
584 |
-
1 => '100italic',
|
585 |
-
2 => '200',
|
586 |
-
3 => '200italic',
|
587 |
-
4 => '300',
|
588 |
-
5 => '300italic',
|
589 |
-
6 => 'regular',
|
590 |
-
7 => 'italic',
|
591 |
-
8 => '500',
|
592 |
-
9 => '500italic',
|
593 |
-
10 => '600',
|
594 |
-
11 => '600italic',
|
595 |
-
12 => '700',
|
596 |
-
13 => '700italic',
|
597 |
-
14 => '800',
|
598 |
-
15 => '800italic',
|
599 |
-
16 => '900',
|
600 |
-
17 => '900italic',
|
601 |
-
),
|
602 |
-
'Barrio' =>
|
603 |
-
array(
|
604 |
-
0 => 'regular',
|
605 |
-
),
|
606 |
-
'Basic' =>
|
607 |
-
array(
|
608 |
-
0 => 'regular',
|
609 |
-
),
|
610 |
-
'Battambang' =>
|
611 |
-
array(
|
612 |
-
0 => 'regular',
|
613 |
-
1 => '700',
|
614 |
-
),
|
615 |
-
'Baumans' =>
|
616 |
-
array(
|
617 |
-
0 => 'regular',
|
618 |
-
),
|
619 |
-
'Bayon' =>
|
620 |
-
array(
|
621 |
-
0 => 'regular',
|
622 |
-
),
|
623 |
-
'Belgrano' =>
|
624 |
-
array(
|
625 |
-
0 => 'regular',
|
626 |
-
),
|
627 |
-
'Bellefair' =>
|
628 |
-
array(
|
629 |
-
0 => 'regular',
|
630 |
-
),
|
631 |
-
'Belleza' =>
|
632 |
-
array(
|
633 |
-
0 => 'regular',
|
634 |
-
),
|
635 |
-
'BenchNine' =>
|
636 |
-
array(
|
637 |
-
0 => '300',
|
638 |
-
1 => 'regular',
|
639 |
-
2 => '700',
|
640 |
-
),
|
641 |
-
'Bentham' =>
|
642 |
-
array(
|
643 |
-
0 => 'regular',
|
644 |
-
),
|
645 |
-
'Berkshire Swash' =>
|
646 |
-
array(
|
647 |
-
0 => 'regular',
|
648 |
-
),
|
649 |
-
'Bevan' =>
|
650 |
-
array(
|
651 |
-
0 => 'regular',
|
652 |
-
),
|
653 |
-
'Bigelow Rules' =>
|
654 |
-
array(
|
655 |
-
0 => 'regular',
|
656 |
-
),
|
657 |
-
'Bigshot One' =>
|
658 |
-
array(
|
659 |
-
0 => 'regular',
|
660 |
-
),
|
661 |
-
'Bilbo' =>
|
662 |
-
array(
|
663 |
-
0 => 'regular',
|
664 |
-
),
|
665 |
-
'Bilbo Swash Caps' =>
|
666 |
-
array(
|
667 |
-
0 => 'regular',
|
668 |
-
),
|
669 |
-
'BioRhyme' =>
|
670 |
-
array(
|
671 |
-
0 => '200',
|
672 |
-
1 => '300',
|
673 |
-
2 => 'regular',
|
674 |
-
3 => '700',
|
675 |
-
4 => '800',
|
676 |
-
),
|
677 |
-
'BioRhyme Expanded' =>
|
678 |
-
array(
|
679 |
-
0 => '200',
|
680 |
-
1 => '300',
|
681 |
-
2 => 'regular',
|
682 |
-
3 => '700',
|
683 |
-
4 => '800',
|
684 |
-
),
|
685 |
-
'Biryani' =>
|
686 |
-
array(
|
687 |
-
0 => '200',
|
688 |
-
1 => '300',
|
689 |
-
2 => 'regular',
|
690 |
-
3 => '600',
|
691 |
-
4 => '700',
|
692 |
-
5 => '800',
|
693 |
-
6 => '900',
|
694 |
-
),
|
695 |
-
'Bitter' =>
|
696 |
-
array(
|
697 |
-
0 => 'regular',
|
698 |
-
1 => 'italic',
|
699 |
-
2 => '700',
|
700 |
-
),
|
701 |
-
'Black Ops One' =>
|
702 |
-
array(
|
703 |
-
0 => 'regular',
|
704 |
-
),
|
705 |
-
'Bokor' =>
|
706 |
-
array(
|
707 |
-
0 => 'regular',
|
708 |
-
),
|
709 |
-
'Bonbon' =>
|
710 |
-
array(
|
711 |
-
0 => 'regular',
|
712 |
-
),
|
713 |
-
'Boogaloo' =>
|
714 |
-
array(
|
715 |
-
0 => 'regular',
|
716 |
-
),
|
717 |
-
'Bowlby One' =>
|
718 |
-
array(
|
719 |
-
0 => 'regular',
|
720 |
-
),
|
721 |
-
'Bowlby One SC' =>
|
722 |
-
array(
|
723 |
-
0 => 'regular',
|
724 |
-
),
|
725 |
-
'Brawler' =>
|
726 |
-
array(
|
727 |
-
0 => 'regular',
|
728 |
-
),
|
729 |
-
'Bree Serif' =>
|
730 |
-
array(
|
731 |
-
0 => 'regular',
|
732 |
-
),
|
733 |
-
'Bubblegum Sans' =>
|
734 |
-
array(
|
735 |
-
0 => 'regular',
|
736 |
-
),
|
737 |
-
'Bubbler One' =>
|
738 |
-
array(
|
739 |
-
0 => 'regular',
|
740 |
-
),
|
741 |
-
'Buda' =>
|
742 |
-
array(
|
743 |
-
0 => '300',
|
744 |
-
),
|
745 |
-
'Buenard' =>
|
746 |
-
array(
|
747 |
-
0 => 'regular',
|
748 |
-
1 => '700',
|
749 |
-
),
|
750 |
-
'Bungee' =>
|
751 |
-
array(
|
752 |
-
0 => 'regular',
|
753 |
-
),
|
754 |
-
'Bungee Hairline' =>
|
755 |
-
array(
|
756 |
-
0 => 'regular',
|
757 |
-
),
|
758 |
-
'Bungee Inline' =>
|
759 |
-
array(
|
760 |
-
0 => 'regular',
|
761 |
-
),
|
762 |
-
'Bungee Outline' =>
|
763 |
-
array(
|
764 |
-
0 => 'regular',
|
765 |
-
),
|
766 |
-
'Bungee Shade' =>
|
767 |
-
array(
|
768 |
-
0 => 'regular',
|
769 |
-
),
|
770 |
-
'Butcherman' =>
|
771 |
-
array(
|
772 |
-
0 => 'regular',
|
773 |
-
),
|
774 |
-
'Butterfly Kids' =>
|
775 |
-
array(
|
776 |
-
0 => 'regular',
|
777 |
-
),
|
778 |
-
'Cabin' =>
|
779 |
-
array(
|
780 |
-
0 => 'regular',
|
781 |
-
1 => 'italic',
|
782 |
-
2 => '500',
|
783 |
-
3 => '500italic',
|
784 |
-
4 => '600',
|
785 |
-
5 => '600italic',
|
786 |
-
6 => '700',
|
787 |
-
7 => '700italic',
|
788 |
-
),
|
789 |
-
'Cabin Condensed' =>
|
790 |
-
array(
|
791 |
-
0 => 'regular',
|
792 |
-
1 => '500',
|
793 |
-
2 => '600',
|
794 |
-
3 => '700',
|
795 |
-
),
|
796 |
-
'Cabin Sketch' =>
|
797 |
-
array(
|
798 |
-
0 => 'regular',
|
799 |
-
1 => '700',
|
800 |
-
),
|
801 |
-
'Caesar Dressing' =>
|
802 |
-
array(
|
803 |
-
0 => 'regular',
|
804 |
-
),
|
805 |
-
'Cagliostro' =>
|
806 |
-
array(
|
807 |
-
0 => 'regular',
|
808 |
-
),
|
809 |
-
'Cairo' =>
|
810 |
-
array(
|
811 |
-
0 => '200',
|
812 |
-
1 => '300',
|
813 |
-
2 => 'regular',
|
814 |
-
3 => '600',
|
815 |
-
4 => '700',
|
816 |
-
5 => '900',
|
817 |
-
),
|
818 |
-
'Calligraffitti' =>
|
819 |
-
array(
|
820 |
-
0 => 'regular',
|
821 |
-
),
|
822 |
-
'Cambay' =>
|
823 |
-
array(
|
824 |
-
0 => 'regular',
|
825 |
-
1 => 'italic',
|
826 |
-
2 => '700',
|
827 |
-
3 => '700italic',
|
828 |
-
),
|
829 |
-
'Cambo' =>
|
830 |
-
array(
|
831 |
-
0 => 'regular',
|
832 |
-
),
|
833 |
-
'Candal' =>
|
834 |
-
array(
|
835 |
-
0 => 'regular',
|
836 |
-
),
|
837 |
-
'Cantarell' =>
|
838 |
-
array(
|
839 |
-
0 => 'regular',
|
840 |
-
1 => 'italic',
|
841 |
-
2 => '700',
|
842 |
-
3 => '700italic',
|
843 |
-
),
|
844 |
-
'Cantata One' =>
|
845 |
-
array(
|
846 |
-
0 => 'regular',
|
847 |
-
),
|
848 |
-
'Cantora One' =>
|
849 |
-
array(
|
850 |
-
0 => 'regular',
|
851 |
-
),
|
852 |
-
'Capriola' =>
|
853 |
-
array(
|
854 |
-
0 => 'regular',
|
855 |
-
),
|
856 |
-
'Cardo' =>
|
857 |
-
array(
|
858 |
-
0 => 'regular',
|
859 |
-
1 => 'italic',
|
860 |
-
2 => '700',
|
861 |
-
),
|
862 |
-
'Carme' =>
|
863 |
-
array(
|
864 |
-
0 => 'regular',
|
865 |
-
),
|
866 |
-
'Carrois Gothic' =>
|
867 |
-
array(
|
868 |
-
0 => 'regular',
|
869 |
-
),
|
870 |
-
'Carrois Gothic SC' =>
|
871 |
-
array(
|
872 |
-
0 => 'regular',
|
873 |
-
),
|
874 |
-
'Carter One' =>
|
875 |
-
array(
|
876 |
-
0 => 'regular',
|
877 |
-
),
|
878 |
-
'Catamaran' =>
|
879 |
-
array(
|
880 |
-
0 => '100',
|
881 |
-
1 => '200',
|
882 |
-
2 => '300',
|
883 |
-
3 => 'regular',
|
884 |
-
4 => '500',
|
885 |
-
5 => '600',
|
886 |
-
6 => '700',
|
887 |
-
7 => '800',
|
888 |
-
8 => '900',
|
889 |
-
),
|
890 |
-
'Caudex' =>
|
891 |
-
array(
|
892 |
-
0 => 'regular',
|
893 |
-
1 => 'italic',
|
894 |
-
2 => '700',
|
895 |
-
3 => '700italic',
|
896 |
-
),
|
897 |
-
'Caveat' =>
|
898 |
-
array(
|
899 |
-
0 => 'regular',
|
900 |
-
1 => '700',
|
901 |
-
),
|
902 |
-
'Caveat Brush' =>
|
903 |
-
array(
|
904 |
-
0 => 'regular',
|
905 |
-
),
|
906 |
-
'Cedarville Cursive' =>
|
907 |
-
array(
|
908 |
-
0 => 'regular',
|
909 |
-
),
|
910 |
-
'Ceviche One' =>
|
911 |
-
array(
|
912 |
-
0 => 'regular',
|
913 |
-
),
|
914 |
-
'Changa' =>
|
915 |
-
array(
|
916 |
-
0 => '200',
|
917 |
-
1 => '300',
|
918 |
-
2 => 'regular',
|
919 |
-
3 => '500',
|
920 |
-
4 => '600',
|
921 |
-
5 => '700',
|
922 |
-
6 => '800',
|
923 |
-
),
|
924 |
-
'Changa One' =>
|
925 |
-
array(
|
926 |
-
0 => 'regular',
|
927 |
-
1 => 'italic',
|
928 |
-
),
|
929 |
-
'Chango' =>
|
930 |
-
array(
|
931 |
-
0 => 'regular',
|
932 |
-
),
|
933 |
-
'Chathura' =>
|
934 |
-
array(
|
935 |
-
0 => '100',
|
936 |
-
1 => '300',
|
937 |
-
2 => 'regular',
|
938 |
-
3 => '700',
|
939 |
-
4 => '800',
|
940 |
-
),
|
941 |
-
'Chau Philomene One' =>
|
942 |
-
array(
|
943 |
-
0 => 'regular',
|
944 |
-
1 => 'italic',
|
945 |
-
),
|
946 |
-
'Chela One' =>
|
947 |
-
array(
|
948 |
-
0 => 'regular',
|
949 |
-
),
|
950 |
-
'Chelsea Market' =>
|
951 |
-
array(
|
952 |
-
0 => 'regular',
|
953 |
-
),
|
954 |
-
'Chenla' =>
|
955 |
-
array(
|
956 |
-
0 => 'regular',
|
957 |
-
),
|
958 |
-
'Cherry Cream Soda' =>
|
959 |
-
array(
|
960 |
-
0 => 'regular',
|
961 |
-
),
|
962 |
-
'Cherry Swash' =>
|
963 |
-
array(
|
964 |
-
0 => 'regular',
|
965 |
-
1 => '700',
|
966 |
-
),
|
967 |
-
'Chewy' =>
|
968 |
-
array(
|
969 |
-
0 => 'regular',
|
970 |
-
),
|
971 |
-
'Chicle' =>
|
972 |
-
array(
|
973 |
-
0 => 'regular',
|
974 |
-
),
|
975 |
-
'Chivo' =>
|
976 |
-
array(
|
977 |
-
0 => '300',
|
978 |
-
1 => '300italic',
|
979 |
-
2 => 'regular',
|
980 |
-
3 => 'italic',
|
981 |
-
4 => '700',
|
982 |
-
5 => '700italic',
|
983 |
-
6 => '900',
|
984 |
-
7 => '900italic',
|
985 |
-
),
|
986 |
-
'Chonburi' =>
|
987 |
-
array(
|
988 |
-
0 => 'regular',
|
989 |
-
),
|
990 |
-
'Cinzel' =>
|
991 |
-
array(
|
992 |
-
0 => 'regular',
|
993 |
-
1 => '700',
|
994 |
-
2 => '900',
|
995 |
-
),
|
996 |
-
'Cinzel Decorative' =>
|
997 |
-
array(
|
998 |
-
0 => 'regular',
|
999 |
-
1 => '700',
|
1000 |
-
2 => '900',
|
1001 |
-
),
|
1002 |
-
'Clicker Script' =>
|
1003 |
-
array(
|
1004 |
-
0 => 'regular',
|
1005 |
-
),
|
1006 |
-
'Coda' =>
|
1007 |
-
array(
|
1008 |
-
0 => 'regular',
|
1009 |
-
1 => '800',
|
1010 |
-
),
|
1011 |
-
'Coda Caption' =>
|
1012 |
-
array(
|
1013 |
-
0 => '800',
|
1014 |
-
),
|
1015 |
-
'Codystar' =>
|
1016 |
-
array(
|
1017 |
-
0 => '300',
|
1018 |
-
1 => 'regular',
|
1019 |
-
),
|
1020 |
-
'Coiny' =>
|
1021 |
-
array(
|
1022 |
-
0 => 'regular',
|
1023 |
-
),
|
1024 |
-
'Combo' =>
|
1025 |
-
array(
|
1026 |
-
0 => 'regular',
|
1027 |
-
),
|
1028 |
-
'Comfortaa' =>
|
1029 |
-
array(
|
1030 |
-
0 => '300',
|
1031 |
-
1 => 'regular',
|
1032 |
-
2 => '700',
|
1033 |
-
),
|
1034 |
-
'Coming Soon' =>
|
1035 |
-
array(
|
1036 |
-
0 => 'regular',
|
1037 |
-
),
|
1038 |
-
'Concert One' =>
|
1039 |
-
array(
|
1040 |
-
0 => 'regular',
|
1041 |
-
),
|
1042 |
-
'Condiment' =>
|
1043 |
-
array(
|
1044 |
-
0 => 'regular',
|
1045 |
-
),
|
1046 |
-
'Content' =>
|
1047 |
-
array(
|
1048 |
-
0 => 'regular',
|
1049 |
-
1 => '700',
|
1050 |
-
),
|
1051 |
-
'Contrail One' =>
|
1052 |
-
array(
|
1053 |
-
0 => 'regular',
|
1054 |
-
),
|
1055 |
-
'Convergence' =>
|
1056 |
-
array(
|
1057 |
-
0 => 'regular',
|
1058 |
-
),
|
1059 |
-
'Cookie' =>
|
1060 |
-
array(
|
1061 |
-
0 => 'regular',
|
1062 |
-
),
|
1063 |
-
'Copse' =>
|
1064 |
-
array(
|
1065 |
-
0 => 'regular',
|
1066 |
-
),
|
1067 |
-
'Corben' =>
|
1068 |
-
array(
|
1069 |
-
0 => 'regular',
|
1070 |
-
1 => '700',
|
1071 |
-
),
|
1072 |
-
'Cormorant' =>
|
1073 |
-
array(
|
1074 |
-
0 => '300',
|
1075 |
-
1 => '300italic',
|
1076 |
-
2 => 'regular',
|
1077 |
-
3 => 'italic',
|
1078 |
-
4 => '500',
|
1079 |
-
5 => '500italic',
|
1080 |
-
6 => '600',
|
1081 |
-
7 => '600italic',
|
1082 |
-
8 => '700',
|
1083 |
-
9 => '700italic',
|
1084 |
-
),
|
1085 |
-
'Cormorant Garamond' =>
|
1086 |
-
array(
|
1087 |
-
0 => '300',
|
1088 |
-
1 => '300italic',
|
1089 |
-
2 => 'regular',
|
1090 |
-
3 => 'italic',
|
1091 |
-
4 => '500',
|
1092 |
-
5 => '500italic',
|
1093 |
-
6 => '600',
|
1094 |
-
7 => '600italic',
|
1095 |
-
8 => '700',
|
1096 |
-
9 => '700italic',
|
1097 |
-
),
|
1098 |
-
'Cormorant Infant' =>
|
1099 |
-
array(
|
1100 |
-
0 => '300',
|
1101 |
-
1 => '300italic',
|
1102 |
-
2 => 'regular',
|
1103 |
-
3 => 'italic',
|
1104 |
-
4 => '500',
|
1105 |
-
5 => '500italic',
|
1106 |
-
6 => '600',
|
1107 |
-
7 => '600italic',
|
1108 |
-
8 => '700',
|
1109 |
-
9 => '700italic',
|
1110 |
-
),
|
1111 |
-
'Cormorant SC' =>
|
1112 |
-
array(
|
1113 |
-
0 => '300',
|
1114 |
-
1 => 'regular',
|
1115 |
-
2 => '500',
|
1116 |
-
3 => '600',
|
1117 |
-
4 => '700',
|
1118 |
-
),
|
1119 |
-
'Cormorant Unicase' =>
|
1120 |
-
array(
|
1121 |
-
0 => '300',
|
1122 |
-
1 => 'regular',
|
1123 |
-
2 => '500',
|
1124 |
-
3 => '600',
|
1125 |
-
4 => '700',
|
1126 |
-
),
|
1127 |
-
'Cormorant Upright' =>
|
1128 |
-
array(
|
1129 |
-
0 => '300',
|
1130 |
-
1 => 'regular',
|
1131 |
-
2 => '500',
|
1132 |
-
3 => '600',
|
1133 |
-
4 => '700',
|
1134 |
-
),
|
1135 |
-
'Courgette' =>
|
1136 |
-
array(
|
1137 |
-
0 => 'regular',
|
1138 |
-
),
|
1139 |
-
'Cousine' =>
|
1140 |
-
array(
|
1141 |
-
0 => 'regular',
|
1142 |
-
1 => 'italic',
|
1143 |
-
2 => '700',
|
1144 |
-
3 => '700italic',
|
1145 |
-
),
|
1146 |
-
'Coustard' =>
|
1147 |
-
array(
|
1148 |
-
0 => 'regular',
|
1149 |
-
1 => '900',
|
1150 |
-
),
|
1151 |
-
'Covered By Your Grace' =>
|
1152 |
-
array(
|
1153 |
-
0 => 'regular',
|
1154 |
-
),
|
1155 |
-
'Crafty Girls' =>
|
1156 |
-
array(
|
1157 |
-
0 => 'regular',
|
1158 |
-
),
|
1159 |
-
'Creepster' =>
|
1160 |
-
array(
|
1161 |
-
0 => 'regular',
|
1162 |
-
),
|
1163 |
-
'Crete Round' =>
|
1164 |
-
array(
|
1165 |
-
0 => 'regular',
|
1166 |
-
1 => 'italic',
|
1167 |
-
),
|
1168 |
-
'Crimson Text' =>
|
1169 |
-
array(
|
1170 |
-
0 => 'regular',
|
1171 |
-
1 => 'italic',
|
1172 |
-
2 => '600',
|
1173 |
-
3 => '600italic',
|
1174 |
-
4 => '700',
|
1175 |
-
5 => '700italic',
|
1176 |
-
),
|
1177 |
-
'Croissant One' =>
|
1178 |
-
array(
|
1179 |
-
0 => 'regular',
|
1180 |
-
),
|
1181 |
-
'Crushed' =>
|
1182 |
-
array(
|
1183 |
-
0 => 'regular',
|
1184 |
-
),
|
1185 |
-
'Cuprum' =>
|
1186 |
-
array(
|
1187 |
-
0 => 'regular',
|
1188 |
-
1 => 'italic',
|
1189 |
-
2 => '700',
|
1190 |
-
3 => '700italic',
|
1191 |
-
),
|
1192 |
-
'Cutive' =>
|
1193 |
-
array(
|
1194 |
-
0 => 'regular',
|
1195 |
-
),
|
1196 |
-
'Cutive Mono' =>
|
1197 |
-
array(
|
1198 |
-
0 => 'regular',
|
1199 |
-
),
|
1200 |
-
'Damion' =>
|
1201 |
-
array(
|
1202 |
-
0 => 'regular',
|
1203 |
-
),
|
1204 |
-
'Dancing Script' =>
|
1205 |
-
array(
|
1206 |
-
0 => 'regular',
|
1207 |
-
1 => '700',
|
1208 |
-
),
|
1209 |
-
'Dangrek' =>
|
1210 |
-
array(
|
1211 |
-
0 => 'regular',
|
1212 |
-
),
|
1213 |
-
'David Libre' =>
|
1214 |
-
array(
|
1215 |
-
0 => 'regular',
|
1216 |
-
1 => '500',
|
1217 |
-
2 => '700',
|
1218 |
-
),
|
1219 |
-
'Dawning of a New Day' =>
|
1220 |
-
array(
|
1221 |
-
0 => 'regular',
|
1222 |
-
),
|
1223 |
-
'Days One' =>
|
1224 |
-
array(
|
1225 |
-
0 => 'regular',
|
1226 |
-
),
|
1227 |
-
'Dekko' =>
|
1228 |
-
array(
|
1229 |
-
0 => 'regular',
|
1230 |
-
),
|
1231 |
-
'Delius' =>
|
1232 |
-
array(
|
1233 |
-
0 => 'regular',
|
1234 |
-
),
|
1235 |
-
'Delius Swash Caps' =>
|
1236 |
-
array(
|
1237 |
-
0 => 'regular',
|
1238 |
-
),
|
1239 |
-
'Delius Unicase' =>
|
1240 |
-
array(
|
1241 |
-
0 => 'regular',
|
1242 |
-
1 => '700',
|
1243 |
-
),
|
1244 |
-
'Della Respira' =>
|
1245 |
-
array(
|
1246 |
-
0 => 'regular',
|
1247 |
-
),
|
1248 |
-
'Denk One' =>
|
1249 |
-
array(
|
1250 |
-
0 => 'regular',
|
1251 |
-
),
|
1252 |
-
'Devonshire' =>
|
1253 |
-
array(
|
1254 |
-
0 => 'regular',
|
1255 |
-
),
|
1256 |
-
'Dhurjati' =>
|
1257 |
-
array(
|
1258 |
-
0 => 'regular',
|
1259 |
-
),
|
1260 |
-
'Didact Gothic' =>
|
1261 |
-
array(
|
1262 |
-
0 => 'regular',
|
1263 |
-
),
|
1264 |
-
'Diplomata' =>
|
1265 |
-
array(
|
1266 |
-
0 => 'regular',
|
1267 |
-
),
|
1268 |
-
'Diplomata SC' =>
|
1269 |
-
array(
|
1270 |
-
0 => 'regular',
|
1271 |
-
),
|
1272 |
-
'Domine' =>
|
1273 |
-
array(
|
1274 |
-
0 => 'regular',
|
1275 |
-
1 => '700',
|
1276 |
-
),
|
1277 |
-
'Donegal One' =>
|
1278 |
-
array(
|
1279 |
-
0 => 'regular',
|
1280 |
-
),
|
1281 |
-
'Doppio One' =>
|
1282 |
-
array(
|
1283 |
-
0 => 'regular',
|
1284 |
-
),
|
1285 |
-
'Dorsa' =>
|
1286 |
-
array(
|
1287 |
-
0 => 'regular',
|
1288 |
-
),
|
1289 |
-
'Dosis' =>
|
1290 |
-
array(
|
1291 |
-
0 => '200',
|
1292 |
-
1 => '300',
|
1293 |
-
2 => 'regular',
|
1294 |
-
3 => '500',
|
1295 |
-
4 => '600',
|
1296 |
-
5 => '700',
|
1297 |
-
6 => '800',
|
1298 |
-
),
|
1299 |
-
'Dr Sugiyama' =>
|
1300 |
-
array(
|
1301 |
-
0 => 'regular',
|
1302 |
-
),
|
1303 |
-
'Duru Sans' =>
|
1304 |
-
array(
|
1305 |
-
0 => 'regular',
|
1306 |
-
),
|
1307 |
-
'Dynalight' =>
|
1308 |
-
array(
|
1309 |
-
0 => 'regular',
|
1310 |
-
),
|
1311 |
-
'EB Garamond' =>
|
1312 |
-
array(
|
1313 |
-
0 => 'regular',
|
1314 |
-
1 => 'italic',
|
1315 |
-
2 => '500',
|
1316 |
-
3 => '500italic',
|
1317 |
-
4 => '600',
|
1318 |
-
5 => '600italic',
|
1319 |
-
6 => '700',
|
1320 |
-
7 => '700italic',
|
1321 |
-
8 => '800',
|
1322 |
-
9 => '800italic',
|
1323 |
-
),
|
1324 |
-
'Eagle Lake' =>
|
1325 |
-
array(
|
1326 |
-
0 => 'regular',
|
1327 |
-
),
|
1328 |
-
'Eater' =>
|
1329 |
-
array(
|
1330 |
-
0 => 'regular',
|
1331 |
-
),
|
1332 |
-
'Economica' =>
|
1333 |
-
array(
|
1334 |
-
0 => 'regular',
|
1335 |
-
1 => 'italic',
|
1336 |
-
2 => '700',
|
1337 |
-
3 => '700italic',
|
1338 |
-
),
|
1339 |
-
'Eczar' =>
|
1340 |
-
array(
|
1341 |
-
0 => 'regular',
|
1342 |
-
1 => '500',
|
1343 |
-
2 => '600',
|
1344 |
-
3 => '700',
|
1345 |
-
4 => '800',
|
1346 |
-
),
|
1347 |
-
'El Messiri' =>
|
1348 |
-
array(
|
1349 |
-
0 => 'regular',
|
1350 |
-
1 => '500',
|
1351 |
-
2 => '600',
|
1352 |
-
3 => '700',
|
1353 |
-
),
|
1354 |
-
'Electrolize' =>
|
1355 |
-
array(
|
1356 |
-
0 => 'regular',
|
1357 |
-
),
|
1358 |
-
'Elsie' =>
|
1359 |
-
array(
|
1360 |
-
0 => 'regular',
|
1361 |
-
1 => '900',
|
1362 |
-
),
|
1363 |
-
'Elsie Swash Caps' =>
|
1364 |
-
array(
|
1365 |
-
0 => 'regular',
|
1366 |
-
1 => '900',
|
1367 |
-
),
|
1368 |
-
'Emblema One' =>
|
1369 |
-
array(
|
1370 |
-
0 => 'regular',
|
1371 |
-
),
|
1372 |
-
'Emilys Candy' =>
|
1373 |
-
array(
|
1374 |
-
0 => 'regular',
|
1375 |
-
),
|
1376 |
-
'Encode Sans' =>
|
1377 |
-
array(
|
1378 |
-
0 => '100',
|
1379 |
-
1 => '200',
|
1380 |
-
2 => '300',
|
1381 |
-
3 => 'regular',
|
1382 |
-
4 => '500',
|
1383 |
-
5 => '600',
|
1384 |
-
6 => '700',
|
1385 |
-
7 => '800',
|
1386 |
-
8 => '900',
|
1387 |
-
),
|
1388 |
-
'Encode Sans Condensed' =>
|
1389 |
-
array(
|
1390 |
-
0 => '100',
|
1391 |
-
1 => '200',
|
1392 |
-
2 => '300',
|
1393 |
-
3 => 'regular',
|
1394 |
-
4 => '500',
|
1395 |
-
5 => '600',
|
1396 |
-
6 => '700',
|
1397 |
-
7 => '800',
|
1398 |
-
8 => '900',
|
1399 |
-
),
|
1400 |
-
'Encode Sans Expanded' =>
|
1401 |
-
array(
|
1402 |
-
0 => '100',
|
1403 |
-
1 => '200',
|
1404 |
-
2 => '300',
|
1405 |
-
3 => 'regular',
|
1406 |
-
4 => '500',
|
1407 |
-
5 => '600',
|
1408 |
-
6 => '700',
|
1409 |
-
7 => '800',
|
1410 |
-
8 => '900',
|
1411 |
-
),
|
1412 |
-
'Encode Sans Semi Condensed' =>
|
1413 |
-
array(
|
1414 |
-
0 => '100',
|
1415 |
-
1 => '200',
|
1416 |
-
2 => '300',
|
1417 |
-
3 => 'regular',
|
1418 |
-
4 => '500',
|
1419 |
-
5 => '600',
|
1420 |
-
6 => '700',
|
1421 |
-
7 => '800',
|
1422 |
-
8 => '900',
|
1423 |
-
),
|
1424 |
-
'Encode Sans Semi Expanded' =>
|
1425 |
-
array(
|
1426 |
-
0 => '100',
|
1427 |
-
1 => '200',
|
1428 |
-
2 => '300',
|
1429 |
-
3 => 'regular',
|
1430 |
-
4 => '500',
|
1431 |
-
5 => '600',
|
1432 |
-
6 => '700',
|
1433 |
-
7 => '800',
|
1434 |
-
8 => '900',
|
1435 |
-
),
|
1436 |
-
'Engagement' =>
|
1437 |
-
array(
|
1438 |
-
0 => 'regular',
|
1439 |
-
),
|
1440 |
-
'Englebert' =>
|
1441 |
-
array(
|
1442 |
-
0 => 'regular',
|
1443 |
-
),
|
1444 |
-
'Enriqueta' =>
|
1445 |
-
array(
|
1446 |
-
0 => 'regular',
|
1447 |
-
1 => '700',
|
1448 |
-
),
|
1449 |
-
'Erica One' =>
|
1450 |
-
array(
|
1451 |
-
0 => 'regular',
|
1452 |
-
),
|
1453 |
-
'Esteban' =>
|
1454 |
-
array(
|
1455 |
-
0 => 'regular',
|
1456 |
-
),
|
1457 |
-
'Euphoria Script' =>
|
1458 |
-
array(
|
1459 |
-
0 => 'regular',
|
1460 |
-
),
|
1461 |
-
'Ewert' =>
|
1462 |
-
array(
|
1463 |
-
0 => 'regular',
|
1464 |
-
),
|
1465 |
-
'Exo' =>
|
1466 |
-
array(
|
1467 |
-
0 => '100',
|
1468 |
-
1 => '100italic',
|
1469 |
-
2 => '200',
|
1470 |
-
3 => '200italic',
|
1471 |
-
4 => '300',
|
1472 |
-
5 => '300italic',
|
1473 |
-
6 => 'regular',
|
1474 |
-
7 => 'italic',
|
1475 |
-
8 => '500',
|
1476 |
-
9 => '500italic',
|
1477 |
-
10 => '600',
|
1478 |
-
11 => '600italic',
|
1479 |
-
12 => '700',
|
1480 |
-
13 => '700italic',
|
1481 |
-
14 => '800',
|
1482 |
-
15 => '800italic',
|
1483 |
-
16 => '900',
|
1484 |
-
17 => '900italic',
|
1485 |
-
),
|
1486 |
-
'Exo 2' =>
|
1487 |
-
array(
|
1488 |
-
0 => '100',
|
1489 |
-
1 => '100italic',
|
1490 |
-
2 => '200',
|
1491 |
-
3 => '200italic',
|
1492 |
-
4 => '300',
|
1493 |
-
5 => '300italic',
|
1494 |
-
6 => 'regular',
|
1495 |
-
7 => 'italic',
|
1496 |
-
8 => '500',
|
1497 |
-
9 => '500italic',
|
1498 |
-
10 => '600',
|
1499 |
-
11 => '600italic',
|
1500 |
-
12 => '700',
|
1501 |
-
13 => '700italic',
|
1502 |
-
14 => '800',
|
1503 |
-
15 => '800italic',
|
1504 |
-
16 => '900',
|
1505 |
-
17 => '900italic',
|
1506 |
-
),
|
1507 |
-
'Expletus Sans' =>
|
1508 |
-
array(
|
1509 |
-
0 => 'regular',
|
1510 |
-
1 => 'italic',
|
1511 |
-
2 => '500',
|
1512 |
-
3 => '500italic',
|
1513 |
-
4 => '600',
|
1514 |
-
5 => '600italic',
|
1515 |
-
6 => '700',
|
1516 |
-
7 => '700italic',
|
1517 |
-
),
|
1518 |
-
'Fanwood Text' =>
|
1519 |
-
array(
|
1520 |
-
0 => 'regular',
|
1521 |
-
1 => 'italic',
|
1522 |
-
),
|
1523 |
-
'Farsan' =>
|
1524 |
-
array(
|
1525 |
-
0 => 'regular',
|
1526 |
-
),
|
1527 |
-
'Fascinate' =>
|
1528 |
-
array(
|
1529 |
-
0 => 'regular',
|
1530 |
-
),
|
1531 |
-
'Fascinate Inline' =>
|
1532 |
-
array(
|
1533 |
-
0 => 'regular',
|
1534 |
-
),
|
1535 |
-
'Faster One' =>
|
1536 |
-
array(
|
1537 |
-
0 => 'regular',
|
1538 |
-
),
|
1539 |
-
'Fasthand' =>
|
1540 |
-
array(
|
1541 |
-
0 => 'regular',
|
1542 |
-
),
|
1543 |
-
'Fauna One' =>
|
1544 |
-
array(
|
1545 |
-
0 => 'regular',
|
1546 |
-
),
|
1547 |
-
'Faustina' =>
|
1548 |
-
array(
|
1549 |
-
0 => 'regular',
|
1550 |
-
1 => 'italic',
|
1551 |
-
2 => '500',
|
1552 |
-
3 => '500italic',
|
1553 |
-
4 => '600',
|
1554 |
-
5 => '600italic',
|
1555 |
-
6 => '700',
|
1556 |
-
7 => '700italic',
|
1557 |
-
),
|
1558 |
-
'Federant' =>
|
1559 |
-
array(
|
1560 |
-
0 => 'regular',
|
1561 |
-
),
|
1562 |
-
'Federo' =>
|
1563 |
-
array(
|
1564 |
-
0 => 'regular',
|
1565 |
-
),
|
1566 |
-
'Felipa' =>
|
1567 |
-
array(
|
1568 |
-
0 => 'regular',
|
1569 |
-
),
|
1570 |
-
'Fenix' =>
|
1571 |
-
array(
|
1572 |
-
0 => 'regular',
|
1573 |
-
),
|
1574 |
-
'Finger Paint' =>
|
1575 |
-
array(
|
1576 |
-
0 => 'regular',
|
1577 |
-
),
|
1578 |
-
'Fira Mono' =>
|
1579 |
-
array(
|
1580 |
-
0 => 'regular',
|
1581 |
-
1 => '500',
|
1582 |
-
2 => '700',
|
1583 |
-
),
|
1584 |
-
'Fira Sans' =>
|
1585 |
-
array(
|
1586 |
-
0 => '100',
|
1587 |
-
1 => '100italic',
|
1588 |
-
2 => '200',
|
1589 |
-
3 => '200italic',
|
1590 |
-
4 => '300',
|
1591 |
-
5 => '300italic',
|
1592 |
-
6 => 'regular',
|
1593 |
-
7 => 'italic',
|
1594 |
-
8 => '500',
|
1595 |
-
9 => '500italic',
|
1596 |
-
10 => '600',
|
1597 |
-
11 => '600italic',
|
1598 |
-
12 => '700',
|
1599 |
-
13 => '700italic',
|
1600 |
-
14 => '800',
|
1601 |
-
15 => '800italic',
|
1602 |
-
16 => '900',
|
1603 |
-
17 => '900italic',
|
1604 |
-
),
|
1605 |
-
'Fira Sans Condensed' =>
|
1606 |
-
array(
|
1607 |
-
0 => '100',
|
1608 |
-
1 => '100italic',
|
1609 |
-
2 => '200',
|
1610 |
-
3 => '200italic',
|
1611 |
-
4 => '300',
|
1612 |
-
5 => '300italic',
|
1613 |
-
6 => 'regular',
|
1614 |
-
7 => 'italic',
|
1615 |
-
8 => '500',
|
1616 |
-
9 => '500italic',
|
1617 |
-
10 => '600',
|
1618 |
-
11 => '600italic',
|
1619 |
-
12 => '700',
|
1620 |
-
13 => '700italic',
|
1621 |
-
14 => '800',
|
1622 |
-
15 => '800italic',
|
1623 |
-
16 => '900',
|
1624 |
-
17 => '900italic',
|
1625 |
-
),
|
1626 |
-
'Fira Sans Extra Condensed' =>
|
1627 |
-
array(
|
1628 |
-
0 => '100',
|
1629 |
-
1 => '100italic',
|
1630 |
-
2 => '200',
|
1631 |
-
3 => '200italic',
|
1632 |
-
4 => '300',
|
1633 |
-
5 => '300italic',
|
1634 |
-
6 => 'regular',
|
1635 |
-
7 => 'italic',
|
1636 |
-
8 => '500',
|
1637 |
-
9 => '500italic',
|
1638 |
-
10 => '600',
|
1639 |
-
11 => '600italic',
|
1640 |
-
12 => '700',
|
1641 |
-
13 => '700italic',
|
1642 |
-
14 => '800',
|
1643 |
-
15 => '800italic',
|
1644 |
-
16 => '900',
|
1645 |
-
17 => '900italic',
|
1646 |
-
),
|
1647 |
-
'Fjalla One' =>
|
1648 |
-
array(
|
1649 |
-
0 => 'regular',
|
1650 |
-
),
|
1651 |
-
'Fjord One' =>
|
1652 |
-
array(
|
1653 |
-
0 => 'regular',
|
1654 |
-
),
|
1655 |
-
'Flamenco' =>
|
1656 |
-
array(
|
1657 |
-
0 => '300',
|
1658 |
-
1 => 'regular',
|
1659 |
-
),
|
1660 |
-
'Flavors' =>
|
1661 |
-
array(
|
1662 |
-
0 => 'regular',
|
1663 |
-
),
|
1664 |
-
'Fondamento' =>
|
1665 |
-
array(
|
1666 |
-
0 => 'regular',
|
1667 |
-
1 => 'italic',
|
1668 |
-
),
|
1669 |
-
'Fontdiner Swanky' =>
|
1670 |
-
array(
|
1671 |
-
0 => 'regular',
|
1672 |
-
),
|
1673 |
-
'Forum' =>
|
1674 |
-
array(
|
1675 |
-
0 => 'regular',
|
1676 |
-
),
|
1677 |
-
'Francois One' =>
|
1678 |
-
array(
|
1679 |
-
0 => 'regular',
|
1680 |
-
),
|
1681 |
-
'Frank Ruhl Libre' =>
|
1682 |
-
array(
|
1683 |
-
0 => '300',
|
1684 |
-
1 => 'regular',
|
1685 |
-
2 => '500',
|
1686 |
-
3 => '700',
|
1687 |
-
4 => '900',
|
1688 |
-
),
|
1689 |
-
'Freckle Face' =>
|
1690 |
-
array(
|
1691 |
-
0 => 'regular',
|
1692 |
-
),
|
1693 |
-
'Fredericka the Great' =>
|
1694 |
-
array(
|
1695 |
-
0 => 'regular',
|
1696 |
-
),
|
1697 |
-
'Fredoka One' =>
|
1698 |
-
array(
|
1699 |
-
0 => 'regular',
|
1700 |
-
),
|
1701 |
-
'Freehand' =>
|
1702 |
-
array(
|
1703 |
-
0 => 'regular',
|
1704 |
-
),
|
1705 |
-
'Fresca' =>
|
1706 |
-
array(
|
1707 |
-
0 => 'regular',
|
1708 |
-
),
|
1709 |
-
'Frijole' =>
|
1710 |
-
array(
|
1711 |
-
0 => 'regular',
|
1712 |
-
),
|
1713 |
-
'Fruktur' =>
|
1714 |
-
array(
|
1715 |
-
0 => 'regular',
|
1716 |
-
),
|
1717 |
-
'Fugaz One' =>
|
1718 |
-
array(
|
1719 |
-
0 => 'regular',
|
1720 |
-
),
|
1721 |
-
'GFS Didot' =>
|
1722 |
-
array(
|
1723 |
-
0 => 'regular',
|
1724 |
-
),
|
1725 |
-
'GFS Neohellenic' =>
|
1726 |
-
array(
|
1727 |
-
0 => 'regular',
|
1728 |
-
1 => 'italic',
|
1729 |
-
2 => '700',
|
1730 |
-
3 => '700italic',
|
1731 |
-
),
|
1732 |
-
'Gabriela' =>
|
1733 |
-
array(
|
1734 |
-
0 => 'regular',
|
1735 |
-
),
|
1736 |
-
'Gafata' =>
|
1737 |
-
array(
|
1738 |
-
0 => 'regular',
|
1739 |
-
),
|
1740 |
-
'Galada' =>
|
1741 |
-
array(
|
1742 |
-
0 => 'regular',
|
1743 |
-
),
|
1744 |
-
'Galdeano' =>
|
1745 |
-
array(
|
1746 |
-
0 => 'regular',
|
1747 |
-
),
|
1748 |
-
'Galindo' =>
|
1749 |
-
array(
|
1750 |
-
0 => 'regular',
|
1751 |
-
),
|
1752 |
-
'Gentium Basic' =>
|
1753 |
-
array(
|
1754 |
-
0 => 'regular',
|
1755 |
-
1 => 'italic',
|
1756 |
-
2 => '700',
|
1757 |
-
3 => '700italic',
|
1758 |
-
),
|
1759 |
-
'Gentium Book Basic' =>
|
1760 |
-
array(
|
1761 |
-
0 => 'regular',
|
1762 |
-
1 => 'italic',
|
1763 |
-
2 => '700',
|
1764 |
-
3 => '700italic',
|
1765 |
-
),
|
1766 |
-
'Geo' =>
|
1767 |
-
array(
|
1768 |
-
0 => 'regular',
|
1769 |
-
1 => 'italic',
|
1770 |
-
),
|
1771 |
-
'Geostar' =>
|
1772 |
-
array(
|
1773 |
-
0 => 'regular',
|
1774 |
-
),
|
1775 |
-
'Geostar Fill' =>
|
1776 |
-
array(
|
1777 |
-
0 => 'regular',
|
1778 |
-
),
|
1779 |
-
'Germania One' =>
|
1780 |
-
array(
|
1781 |
-
0 => 'regular',
|
1782 |
-
),
|
1783 |
-
'Gidugu' =>
|
1784 |
-
array(
|
1785 |
-
0 => 'regular',
|
1786 |
-
),
|
1787 |
-
'Gilda Display' =>
|
1788 |
-
array(
|
1789 |
-
0 => 'regular',
|
1790 |
-
),
|
1791 |
-
'Give You Glory' =>
|
1792 |
-
array(
|
1793 |
-
0 => 'regular',
|
1794 |
-
),
|
1795 |
-
'Glass Antiqua' =>
|
1796 |
-
array(
|
1797 |
-
0 => 'regular',
|
1798 |
-
),
|
1799 |
-
'Glegoo' =>
|
1800 |
-
array(
|
1801 |
-
0 => 'regular',
|
1802 |
-
1 => '700',
|
1803 |
-
),
|
1804 |
-
'Gloria Hallelujah' =>
|
1805 |
-
array(
|
1806 |
-
0 => 'regular',
|
1807 |
-
),
|
1808 |
-
'Goblin One' =>
|
1809 |
-
array(
|
1810 |
-
0 => 'regular',
|
1811 |
-
),
|
1812 |
-
'Gochi Hand' =>
|
1813 |
-
array(
|
1814 |
-
0 => 'regular',
|
1815 |
-
),
|
1816 |
-
'Gorditas' =>
|
1817 |
-
array(
|
1818 |
-
0 => 'regular',
|
1819 |
-
1 => '700',
|
1820 |
-
),
|
1821 |
-
'Goudy Bookletter 1911' =>
|
1822 |
-
array(
|
1823 |
-
0 => 'regular',
|
1824 |
-
),
|
1825 |
-
'Graduate' =>
|
1826 |
-
array(
|
1827 |
-
0 => 'regular',
|
1828 |
-
),
|
1829 |
-
'Grand Hotel' =>
|
1830 |
-
array(
|
1831 |
-
0 => 'regular',
|
1832 |
-
),
|
1833 |
-
'Gravitas One' =>
|
1834 |
-
array(
|
1835 |
-
0 => 'regular',
|
1836 |
-
),
|
1837 |
-
'Great Vibes' =>
|
1838 |
-
array(
|
1839 |
-
0 => 'regular',
|
1840 |
-
),
|
1841 |
-
'Griffy' =>
|
1842 |
-
array(
|
1843 |
-
0 => 'regular',
|
1844 |
-
),
|
1845 |
-
'Gruppo' =>
|
1846 |
-
array(
|
1847 |
-
0 => 'regular',
|
1848 |
-
),
|
1849 |
-
'Gudea' =>
|
1850 |
-
array(
|
1851 |
-
0 => 'regular',
|
1852 |
-
1 => 'italic',
|
1853 |
-
2 => '700',
|
1854 |
-
),
|
1855 |
-
'Gurajada' =>
|
1856 |
-
array(
|
1857 |
-
0 => 'regular',
|
1858 |
-
),
|
1859 |
-
'Habibi' =>
|
1860 |
-
array(
|
1861 |
-
0 => 'regular',
|
1862 |
-
),
|
1863 |
-
'Halant' =>
|
1864 |
-
array(
|
1865 |
-
0 => '300',
|
1866 |
-
1 => 'regular',
|
1867 |
-
2 => '500',
|
1868 |
-
3 => '600',
|
1869 |
-
4 => '700',
|
1870 |
-
),
|
1871 |
-
'Hammersmith One' =>
|
1872 |
-
array(
|
1873 |
-
0 => 'regular',
|
1874 |
-
),
|
1875 |
-
'Hanalei' =>
|
1876 |
-
array(
|
1877 |
-
0 => 'regular',
|
1878 |
-
),
|
1879 |
-
'Hanalei Fill' =>
|
1880 |
-
array(
|
1881 |
-
0 => 'regular',
|
1882 |
-
),
|
1883 |
-
'Handlee' =>
|
1884 |
-
array(
|
1885 |
-
0 => 'regular',
|
1886 |
-
),
|
1887 |
-
'Hanuman' =>
|
1888 |
-
array(
|
1889 |
-
0 => 'regular',
|
1890 |
-
1 => '700',
|
1891 |
-
),
|
1892 |
-
'Happy Monkey' =>
|
1893 |
-
array(
|
1894 |
-
0 => 'regular',
|
1895 |
-
),
|
1896 |
-
'Harmattan' =>
|
1897 |
-
array(
|
1898 |
-
0 => 'regular',
|
1899 |
-
),
|
1900 |
-
'Headland One' =>
|
1901 |
-
array(
|
1902 |
-
0 => 'regular',
|
1903 |
-
),
|
1904 |
-
'Heebo' =>
|
1905 |
-
array(
|
1906 |
-
0 => '100',
|
1907 |
-
1 => '300',
|
1908 |
-
2 => 'regular',
|
1909 |
-
3 => '500',
|
1910 |
-
4 => '700',
|
1911 |
-
5 => '800',
|
1912 |
-
6 => '900',
|
1913 |
-
),
|
1914 |
-
'Henny Penny' =>
|
1915 |
-
array(
|
1916 |
-
0 => 'regular',
|
1917 |
-
),
|
1918 |
-
'Herr Von Muellerhoff' =>
|
1919 |
-
array(
|
1920 |
-
0 => 'regular',
|
1921 |
-
),
|
1922 |
-
'Hind' =>
|
1923 |
-
array(
|
1924 |
-
0 => '300',
|
1925 |
-
1 => 'regular',
|
1926 |
-
2 => '500',
|
1927 |
-
3 => '600',
|
1928 |
-
4 => '700',
|
1929 |
-
),
|
1930 |
-
'Hind Guntur' =>
|
1931 |
-
array(
|
1932 |
-
0 => '300',
|
1933 |
-
1 => 'regular',
|
1934 |
-
2 => '500',
|
1935 |
-
3 => '600',
|
1936 |
-
4 => '700',
|
1937 |
-
),
|
1938 |
-
'Hind Madurai' =>
|
1939 |
-
array(
|
1940 |
-
0 => '300',
|
1941 |
-
1 => 'regular',
|
1942 |
-
2 => '500',
|
1943 |
-
3 => '600',
|
1944 |
-
4 => '700',
|
1945 |
-
),
|
1946 |
-
'Hind Siliguri' =>
|
1947 |
-
array(
|
1948 |
-
0 => '300',
|
1949 |
-
1 => 'regular',
|
1950 |
-
2 => '500',
|
1951 |
-
3 => '600',
|
1952 |
-
4 => '700',
|
1953 |
-
),
|
1954 |
-
'Hind Vadodara' =>
|
1955 |
-
array(
|
1956 |
-
0 => '300',
|
1957 |
-
1 => 'regular',
|
1958 |
-
2 => '500',
|
1959 |
-
3 => '600',
|
1960 |
-
4 => '700',
|
1961 |
-
),
|
1962 |
-
'Holtwood One SC' =>
|
1963 |
-
array(
|
1964 |
-
0 => 'regular',
|
1965 |
-
),
|
1966 |
-
'Homemade Apple' =>
|
1967 |
-
array(
|
1968 |
-
0 => 'regular',
|
1969 |
-
),
|
1970 |
-
'Homenaje' =>
|
1971 |
-
array(
|
1972 |
-
0 => 'regular',
|
1973 |
-
),
|
1974 |
-
'IBM Plex Mono' =>
|
1975 |
-
array(
|
1976 |
-
0 => '100',
|
1977 |
-
1 => '100italic',
|
1978 |
-
2 => '200',
|
1979 |
-
3 => '200italic',
|
1980 |
-
4 => '300',
|
1981 |
-
5 => '300italic',
|
1982 |
-
6 => 'regular',
|
1983 |
-
7 => 'italic',
|
1984 |
-
8 => '500',
|
1985 |
-
9 => '500italic',
|
1986 |
-
10 => '600',
|
1987 |
-
11 => '600italic',
|
1988 |
-
12 => '700',
|
1989 |
-
13 => '700italic',
|
1990 |
-
),
|
1991 |
-
'IBM Plex Sans' =>
|
1992 |
-
array(
|
1993 |
-
0 => '100',
|
1994 |
-
1 => '100italic',
|
1995 |
-
2 => '200',
|
1996 |
-
3 => '200italic',
|
1997 |
-
4 => '300',
|
1998 |
-
5 => '300italic',
|
1999 |
-
6 => 'regular',
|
2000 |
-
7 => 'italic',
|
2001 |
-
8 => '500',
|
2002 |
-
9 => '500italic',
|
2003 |
-
10 => '600',
|
2004 |
-
11 => '600italic',
|
2005 |
-
12 => '700',
|
2006 |
-
13 => '700italic',
|
2007 |
-
),
|
2008 |
-
'IBM Plex Sans Condensed' =>
|
2009 |
-
array(
|
2010 |
-
0 => '100',
|
2011 |
-
1 => '100italic',
|
2012 |
-
2 => '200',
|
2013 |
-
3 => '200italic',
|
2014 |
-
4 => '300',
|
2015 |
-
5 => '300italic',
|
2016 |
-
6 => 'regular',
|
2017 |
-
7 => 'italic',
|
2018 |
-
8 => '500',
|
2019 |
-
9 => '500italic',
|
2020 |
-
10 => '600',
|
2021 |
-
11 => '600italic',
|
2022 |
-
12 => '700',
|
2023 |
-
13 => '700italic',
|
2024 |
-
),
|
2025 |
-
'IBM Plex Serif' =>
|
2026 |
-
array(
|
2027 |
-
0 => '100',
|
2028 |
-
1 => '100italic',
|
2029 |
-
2 => '200',
|
2030 |
-
3 => '200italic',
|
2031 |
-
4 => '300',
|
2032 |
-
5 => '300italic',
|
2033 |
-
6 => 'regular',
|
2034 |
-
7 => 'italic',
|
2035 |
-
8 => '500',
|
2036 |
-
9 => '500italic',
|
2037 |
-
10 => '600',
|
2038 |
-
11 => '600italic',
|
2039 |
-
12 => '700italic',
|
2040 |
-
),
|
2041 |
-
'IM Fell DW Pica' =>
|
2042 |
-
array(
|
2043 |
-
0 => 'regular',
|
2044 |
-
1 => 'italic',
|
2045 |
-
),
|
2046 |
-
'IM Fell DW Pica SC' =>
|
2047 |
-
array(
|
2048 |
-
0 => 'regular',
|
2049 |
-
),
|
2050 |
-
'IM Fell Double Pica' =>
|
2051 |
-
array(
|
2052 |
-
0 => 'regular',
|
2053 |
-
1 => 'italic',
|
2054 |
-
),
|
2055 |
-
'IM Fell Double Pica SC' =>
|
2056 |
-
array(
|
2057 |
-
0 => 'regular',
|
2058 |
-
),
|
2059 |
-
'IM Fell English' =>
|
2060 |
-
array(
|
2061 |
-
0 => 'regular',
|
2062 |
-
1 => 'italic',
|
2063 |
-
),
|
2064 |
-
'IM Fell English SC' =>
|
2065 |
-
array(
|
2066 |
-
0 => 'regular',
|
2067 |
-
),
|
2068 |
-
'IM Fell French Canon' =>
|
2069 |
-
array(
|
2070 |
-
0 => 'regular',
|
2071 |
-
1 => 'italic',
|
2072 |
-
),
|
2073 |
-
'IM Fell French Canon SC' =>
|
2074 |
-
array(
|
2075 |
-
0 => 'regular',
|
2076 |
-
),
|
2077 |
-
'IM Fell Great Primer' =>
|
2078 |
-
array(
|
2079 |
-
0 => 'regular',
|
2080 |
-
1 => 'italic',
|
2081 |
-
),
|
2082 |
-
'IM Fell Great Primer SC' =>
|
2083 |
-
array(
|
2084 |
-
0 => 'regular',
|
2085 |
-
),
|
2086 |
-
'Iceberg' =>
|
2087 |
-
array(
|
2088 |
-
0 => 'regular',
|
2089 |
-
),
|
2090 |
-
'Iceland' =>
|
2091 |
-
array(
|
2092 |
-
0 => 'regular',
|
2093 |
-
),
|
2094 |
-
'Imprima' =>
|
2095 |
-
array(
|
2096 |
-
0 => 'regular',
|
2097 |
-
),
|
2098 |
-
'Inconsolata' =>
|
2099 |
-
array(
|
2100 |
-
0 => 'regular',
|
2101 |
-
1 => '700',
|
2102 |
-
),
|
2103 |
-
'Inder' =>
|
2104 |
-
array(
|
2105 |
-
0 => 'regular',
|
2106 |
-
),
|
2107 |
-
'Indie Flower' =>
|
2108 |
-
array(
|
2109 |
-
0 => 'regular',
|
2110 |
-
),
|
2111 |
-
'Inika' =>
|
2112 |
-
array(
|
2113 |
-
0 => 'regular',
|
2114 |
-
1 => '700',
|
2115 |
-
),
|
2116 |
-
'Inknut Antiqua' =>
|
2117 |
-
array(
|
2118 |
-
0 => '300',
|
2119 |
-
1 => 'regular',
|
2120 |
-
2 => '500',
|
2121 |
-
3 => '600',
|
2122 |
-
4 => '700',
|
2123 |
-
5 => '800',
|
2124 |
-
6 => '900',
|
2125 |
-
),
|
2126 |
-
'Irish Grover' =>
|
2127 |
-
array(
|
2128 |
-
0 => 'regular',
|
2129 |
-
),
|
2130 |
-
'Istok Web' =>
|
2131 |
-
array(
|
2132 |
-
0 => 'regular',
|
2133 |
-
1 => 'italic',
|
2134 |
-
2 => '700',
|
2135 |
-
3 => '700italic',
|
2136 |
-
),
|
2137 |
-
'Italiana' =>
|
2138 |
-
array(
|
2139 |
-
0 => 'regular',
|
2140 |
-
),
|
2141 |
-
'Italianno' =>
|
2142 |
-
array(
|
2143 |
-
0 => 'regular',
|
2144 |
-
),
|
2145 |
-
'Itim' =>
|
2146 |
-
array(
|
2147 |
-
0 => 'regular',
|
2148 |
-
),
|
2149 |
-
'Jacques Francois' =>
|
2150 |
-
array(
|
2151 |
-
0 => 'regular',
|
2152 |
-
),
|
2153 |
-
'Jacques Francois Shadow' =>
|
2154 |
-
array(
|
2155 |
-
0 => 'regular',
|
2156 |
-
),
|
2157 |
-
'Jaldi' =>
|
2158 |
-
array(
|
2159 |
-
0 => 'regular',
|
2160 |
-
1 => '700',
|
2161 |
-
),
|
2162 |
-
'Jim Nightshade' =>
|
2163 |
-
array(
|
2164 |
-
0 => 'regular',
|
2165 |
-
),
|
2166 |
-
'Jockey One' =>
|
2167 |
-
array(
|
2168 |
-
0 => 'regular',
|
2169 |
-
),
|
2170 |
-
'Jolly Lodger' =>
|
2171 |
-
array(
|
2172 |
-
0 => 'regular',
|
2173 |
-
),
|
2174 |
-
'Jomhuria' =>
|
2175 |
-
array(
|
2176 |
-
0 => 'regular',
|
2177 |
-
),
|
2178 |
-
'Josefin Sans' =>
|
2179 |
-
array(
|
2180 |
-
0 => '100',
|
2181 |
-
1 => '100italic',
|
2182 |
-
2 => '300',
|
2183 |
-
3 => '300italic',
|
2184 |
-
4 => 'regular',
|
2185 |
-
5 => 'italic',
|
2186 |
-
6 => '600',
|
2187 |
-
7 => '600italic',
|
2188 |
-
8 => '700',
|
2189 |
-
9 => '700italic',
|
2190 |
-
),
|
2191 |
-
'Josefin Slab' =>
|
2192 |
-
array(
|
2193 |
-
0 => '100',
|
2194 |
-
1 => '100italic',
|
2195 |
-
2 => '300',
|
2196 |
-
3 => '300italic',
|
2197 |
-
4 => 'regular',
|
2198 |
-
5 => 'italic',
|
2199 |
-
6 => '600',
|
2200 |
-
7 => '600italic',
|
2201 |
-
8 => '700',
|
2202 |
-
9 => '700italic',
|
2203 |
-
),
|
2204 |
-
'Joti One' =>
|
2205 |
-
array(
|
2206 |
-
0 => 'regular',
|
2207 |
-
),
|
2208 |
-
'Judson' =>
|
2209 |
-
array(
|
2210 |
-
0 => 'regular',
|
2211 |
-
1 => 'italic',
|
2212 |
-
2 => '700',
|
2213 |
-
),
|
2214 |
-
'Julee' =>
|
2215 |
-
array(
|
2216 |
-
0 => 'regular',
|
2217 |
-
),
|
2218 |
-
'Julius Sans One' =>
|
2219 |
-
array(
|
2220 |
-
0 => 'regular',
|
2221 |
-
),
|
2222 |
-
'Junge' =>
|
2223 |
-
array(
|
2224 |
-
0 => 'regular',
|
2225 |
-
),
|
2226 |
-
'Jura' =>
|
2227 |
-
array(
|
2228 |
-
0 => '300',
|
2229 |
-
1 => 'regular',
|
2230 |
-
2 => '500',
|
2231 |
-
3 => '600',
|
2232 |
-
4 => '700',
|
2233 |
-
),
|
2234 |
-
'Just Another Hand' =>
|
2235 |
-
array(
|
2236 |
-
0 => 'regular',
|
2237 |
-
),
|
2238 |
-
'Just Me Again Down Here' =>
|
2239 |
-
array(
|
2240 |
-
0 => 'regular',
|
2241 |
-
),
|
2242 |
-
'Kadwa' =>
|
2243 |
-
array(
|
2244 |
-
0 => 'regular',
|
2245 |
-
1 => '700',
|
2246 |
-
),
|
2247 |
-
'Kalam' =>
|
2248 |
-
array(
|
2249 |
-
0 => '300',
|
2250 |
-
1 => 'regular',
|
2251 |
-
2 => '700',
|
2252 |
-
),
|
2253 |
-
'Kameron' =>
|
2254 |
-
array(
|
2255 |
-
0 => 'regular',
|
2256 |
-
1 => '700',
|
2257 |
-
),
|
2258 |
-
'Kanit' =>
|
2259 |
-
array(
|
2260 |
-
0 => '100',
|
2261 |
-
1 => '100italic',
|
2262 |
-
2 => '200',
|
2263 |
-
3 => '200italic',
|
2264 |
-
4 => '300',
|
2265 |
-
5 => '300italic',
|
2266 |
-
6 => 'regular',
|
2267 |
-
7 => 'italic',
|
2268 |
-
8 => '500',
|
2269 |
-
9 => '500italic',
|
2270 |
-
10 => '600',
|
2271 |
-
11 => '600italic',
|
2272 |
-
12 => '700',
|
2273 |
-
13 => '700italic',
|
2274 |
-
14 => '800',
|
2275 |
-
15 => '800italic',
|
2276 |
-
16 => '900',
|
2277 |
-
17 => '900italic',
|
2278 |
-
),
|
2279 |
-
'Kantumruy' =>
|
2280 |
-
array(
|
2281 |
-
0 => '300',
|
2282 |
-
1 => 'regular',
|
2283 |
-
2 => '700',
|
2284 |
-
),
|
2285 |
-
'Karla' =>
|
2286 |
-
array(
|
2287 |
-
0 => 'regular',
|
2288 |
-
1 => 'italic',
|
2289 |
-
2 => '700',
|
2290 |
-
3 => '700italic',
|
2291 |
-
),
|
2292 |
-
'Karma' =>
|
2293 |
-
array(
|
2294 |
-
0 => '300',
|
2295 |
-
1 => 'regular',
|
2296 |
-
2 => '500',
|
2297 |
-
3 => '600',
|
2298 |
-
4 => '700',
|
2299 |
-
),
|
2300 |
-
'Katibeh' =>
|
2301 |
-
array(
|
2302 |
-
0 => 'regular',
|
2303 |
-
),
|
2304 |
-
'Kaushan Script' =>
|
2305 |
-
array(
|
2306 |
-
0 => 'regular',
|
2307 |
-
),
|
2308 |
-
'Kavivanar' =>
|
2309 |
-
array(
|
2310 |
-
0 => 'regular',
|
2311 |
-
),
|
2312 |
-
'Kavoon' =>
|
2313 |
-
array(
|
2314 |
-
0 => 'regular',
|
2315 |
-
),
|
2316 |
-
'Kdam Thmor' =>
|
2317 |
-
array(
|
2318 |
-
0 => 'regular',
|
2319 |
-
),
|
2320 |
-
'Keania One' =>
|
2321 |
-
array(
|
2322 |
-
0 => 'regular',
|
2323 |
-
),
|
2324 |
-
'Kelly Slab' =>
|
2325 |
-
array(
|
2326 |
-
0 => 'regular',
|
2327 |
-
),
|
2328 |
-
'Kenia' =>
|
2329 |
-
array(
|
2330 |
-
0 => 'regular',
|
2331 |
-
),
|
2332 |
-
'Khand' =>
|
2333 |
-
array(
|
2334 |
-
0 => '300',
|
2335 |
-
1 => 'regular',
|
2336 |
-
2 => '500',
|
2337 |
-
3 => '600',
|
2338 |
-
4 => '700',
|
2339 |
-
),
|
2340 |
-
'Khmer' =>
|
2341 |
-
array(
|
2342 |
-
0 => 'regular',
|
2343 |
-
),
|
2344 |
-
'Khula' =>
|
2345 |
-
array(
|
2346 |
-
0 => '300',
|
2347 |
-
1 => 'regular',
|
2348 |
-
2 => '600',
|
2349 |
-
3 => '700',
|
2350 |
-
4 => '800',
|
2351 |
-
),
|
2352 |
-
'Kite One' =>
|
2353 |
-
array(
|
2354 |
-
0 => 'regular',
|
2355 |
-
),
|
2356 |
-
'Knewave' =>
|
2357 |
-
array(
|
2358 |
-
0 => 'regular',
|
2359 |
-
),
|
2360 |
-
'Kotta One' =>
|
2361 |
-
array(
|
2362 |
-
0 => 'regular',
|
2363 |
-
),
|
2364 |
-
'Koulen' =>
|
2365 |
-
array(
|
2366 |
-
0 => 'regular',
|
2367 |
-
),
|
2368 |
-
'Kranky' =>
|
2369 |
-
array(
|
2370 |
-
0 => 'regular',
|
2371 |
-
),
|
2372 |
-
'Kreon' =>
|
2373 |
-
array(
|
2374 |
-
0 => '300',
|
2375 |
-
1 => 'regular',
|
2376 |
-
2 => '700',
|
2377 |
-
),
|
2378 |
-
'Kristi' =>
|
2379 |
-
array(
|
2380 |
-
0 => 'regular',
|
2381 |
-
),
|
2382 |
-
'Krona One' =>
|
2383 |
-
array(
|
2384 |
-
0 => 'regular',
|
2385 |
-
),
|
2386 |
-
'Kumar One' =>
|
2387 |
-
array(
|
2388 |
-
0 => 'regular',
|
2389 |
-
),
|
2390 |
-
'Kumar One Outline' =>
|
2391 |
-
array(
|
2392 |
-
0 => 'regular',
|
2393 |
-
),
|
2394 |
-
'Kurale' =>
|
2395 |
-
array(
|
2396 |
-
0 => 'regular',
|
2397 |
-
),
|
2398 |
-
'La Belle Aurore' =>
|
2399 |
-
array(
|
2400 |
-
0 => 'regular',
|
2401 |
-
),
|
2402 |
-
'Laila' =>
|
2403 |
-
array(
|
2404 |
-
0 => '300',
|
2405 |
-
1 => 'regular',
|
2406 |
-
2 => '500',
|
2407 |
-
3 => '600',
|
2408 |
-
4 => '700',
|
2409 |
-
),
|
2410 |
-
'Lakki Reddy' =>
|
2411 |
-
array(
|
2412 |
-
0 => 'regular',
|
2413 |
-
),
|
2414 |
-
'Lalezar' =>
|
2415 |
-
array(
|
2416 |
-
0 => 'regular',
|
2417 |
-
),
|
2418 |
-
'Lancelot' =>
|
2419 |
-
array(
|
2420 |
-
0 => 'regular',
|
2421 |
-
),
|
2422 |
-
'Lateef' =>
|
2423 |
-
array(
|
2424 |
-
0 => 'regular',
|
2425 |
-
),
|
2426 |
-
'Lato' =>
|
2427 |
-
array(
|
2428 |
-
0 => '100',
|
2429 |
-
1 => '100italic',
|
2430 |
-
2 => '300',
|
2431 |
-
3 => '300italic',
|
2432 |
-
4 => 'regular',
|
2433 |
-
5 => 'italic',
|
2434 |
-
6 => '700',
|
2435 |
-
7 => '700italic',
|
2436 |
-
8 => '900',
|
2437 |
-
9 => '900italic',
|
2438 |
-
),
|
2439 |
-
'League Script' =>
|
2440 |
-
array(
|
2441 |
-
0 => 'regular',
|
2442 |
-
),
|
2443 |
-
'Leckerli One' =>
|
2444 |
-
array(
|
2445 |
-
0 => 'regular',
|
2446 |
-
),
|
2447 |
-
'Ledger' =>
|
2448 |
-
array(
|
2449 |
-
0 => 'regular',
|
2450 |
-
),
|
2451 |
-
'Lekton' =>
|
2452 |
-
array(
|
2453 |
-
0 => 'regular',
|
2454 |
-
1 => 'italic',
|
2455 |
-
2 => '700',
|
2456 |
-
),
|
2457 |
-
'Lemon' =>
|
2458 |
-
array(
|
2459 |
-
0 => 'regular',
|
2460 |
-
),
|
2461 |
-
'Lemonada' =>
|
2462 |
-
array(
|
2463 |
-
0 => '300',
|
2464 |
-
1 => 'regular',
|
2465 |
-
2 => '600',
|
2466 |
-
3 => '700',
|
2467 |
-
),
|
2468 |
-
'Libre Barcode 128' =>
|
2469 |
-
array(
|
2470 |
-
0 => 'regular',
|
2471 |
-
),
|
2472 |
-
'Libre Barcode 128 Text' =>
|
2473 |
-
array(
|
2474 |
-
0 => 'regular',
|
2475 |
-
),
|
2476 |
-
'Libre Barcode 39' =>
|
2477 |
-
array(
|
2478 |
-
0 => 'regular',
|
2479 |
-
),
|
2480 |
-
'Libre Barcode 39 Extended' =>
|
2481 |
-
array(
|
2482 |
-
0 => 'regular',
|
2483 |
-
),
|
2484 |
-
'Libre Barcode 39 Extended Text' =>
|
2485 |
-
array(
|
2486 |
-
0 => 'regular',
|
2487 |
-
),
|
2488 |
-
'Libre Barcode 39 Text' =>
|
2489 |
-
array(
|
2490 |
-
0 => 'regular',
|
2491 |
-
),
|
2492 |
-
'Libre Baskerville' =>
|
2493 |
-
array(
|
2494 |
-
0 => 'regular',
|
2495 |
-
1 => 'italic',
|
2496 |
-
2 => '700',
|
2497 |
-
),
|
2498 |
-
'Libre Franklin' =>
|
2499 |
-
array(
|
2500 |
-
0 => '100',
|
2501 |
-
1 => '100italic',
|
2502 |
-
2 => '200',
|
2503 |
-
3 => '200italic',
|
2504 |
-
4 => '300',
|
2505 |
-
5 => '300italic',
|
2506 |
-
6 => 'regular',
|
2507 |
-
7 => 'italic',
|
2508 |
-
8 => '500',
|
2509 |
-
9 => '500italic',
|
2510 |
-
10 => '600',
|
2511 |
-
11 => '600italic',
|
2512 |
-
12 => '700',
|
2513 |
-
13 => '700italic',
|
2514 |
-
14 => '800',
|
2515 |
-
15 => '800italic',
|
2516 |
-
16 => '900',
|
2517 |
-
17 => '900italic',
|
2518 |
-
),
|
2519 |
-
'Life Savers' =>
|
2520 |
-
array(
|
2521 |
-
0 => 'regular',
|
2522 |
-
1 => '700',
|
2523 |
-
),
|
2524 |
-
'Lilita One' =>
|
2525 |
-
array(
|
2526 |
-
0 => 'regular',
|
2527 |
-
),
|
2528 |
-
'Lily Script One' =>
|
2529 |
-
array(
|
2530 |
-
0 => 'regular',
|
2531 |
-
),
|
2532 |
-
'Limelight' =>
|
2533 |
-
array(
|
2534 |
-
0 => 'regular',
|
2535 |
-
),
|
2536 |
-
'Linden Hill' =>
|
2537 |
-
array(
|
2538 |
-
0 => 'regular',
|
2539 |
-
1 => 'italic',
|
2540 |
-
),
|
2541 |
-
'Lobster' =>
|
2542 |
-
array(
|
2543 |
-
0 => 'regular',
|
2544 |
-
),
|
2545 |
-
'Lobster Two' =>
|
2546 |
-
array(
|
2547 |
-
0 => 'regular',
|
2548 |
-
1 => 'italic',
|
2549 |
-
2 => '700',
|
2550 |
-
3 => '700italic',
|
2551 |
-
),
|
2552 |
-
'Londrina Outline' =>
|
2553 |
-
array(
|
2554 |
-
0 => 'regular',
|
2555 |
-
),
|
2556 |
-
'Londrina Shadow' =>
|
2557 |
-
array(
|
2558 |
-
0 => 'regular',
|
2559 |
-
),
|
2560 |
-
'Londrina Sketch' =>
|
2561 |
-
array(
|
2562 |
-
0 => 'regular',
|
2563 |
-
),
|
2564 |
-
'Londrina Solid' =>
|
2565 |
-
array(
|
2566 |
-
0 => '100',
|
2567 |
-
1 => '300',
|
2568 |
-
2 => 'regular',
|
2569 |
-
3 => '900',
|
2570 |
-
),
|
2571 |
-
'Lora' =>
|
2572 |
-
array(
|
2573 |
-
0 => 'regular',
|
2574 |
-
1 => 'italic',
|
2575 |
-
2 => '700',
|
2576 |
-
3 => '700italic',
|
2577 |
-
),
|
2578 |
-
'Love Ya Like A Sister' =>
|
2579 |
-
array(
|
2580 |
-
0 => 'regular',
|
2581 |
-
),
|
2582 |
-
'Loved by the King' =>
|
2583 |
-
array(
|
2584 |
-
0 => 'regular',
|
2585 |
-
),
|
2586 |
-
'Lovers Quarrel' =>
|
2587 |
-
array(
|
2588 |
-
0 => 'regular',
|
2589 |
-
),
|
2590 |
-
'Luckiest Guy' =>
|
2591 |
-
array(
|
2592 |
-
0 => 'regular',
|
2593 |
-
),
|
2594 |
-
'Lusitana' =>
|
2595 |
-
array(
|
2596 |
-
0 => 'regular',
|
2597 |
-
1 => '700',
|
2598 |
-
),
|
2599 |
-
'Lustria' =>
|
2600 |
-
array(
|
2601 |
-
0 => 'regular',
|
2602 |
-
),
|
2603 |
-
'Macondo' =>
|
2604 |
-
array(
|
2605 |
-
0 => 'regular',
|
2606 |
-
),
|
2607 |
-
'Macondo Swash Caps' =>
|
2608 |
-
array(
|
2609 |
-
0 => 'regular',
|
2610 |
-
),
|
2611 |
-
'Mada' =>
|
2612 |
-
array(
|
2613 |
-
0 => '200',
|
2614 |
-
1 => '300',
|
2615 |
-
2 => 'regular',
|
2616 |
-
3 => '500',
|
2617 |
-
4 => '600',
|
2618 |
-
5 => '700',
|
2619 |
-
6 => '900',
|
2620 |
-
),
|
2621 |
-
'Magra' =>
|
2622 |
-
array(
|
2623 |
-
0 => 'regular',
|
2624 |
-
1 => '700',
|
2625 |
-
),
|
2626 |
-
'Maiden Orange' =>
|
2627 |
-
array(
|
2628 |
-
0 => 'regular',
|
2629 |
-
),
|
2630 |
-
'Maitree' =>
|
2631 |
-
array(
|
2632 |
-
0 => '200',
|
2633 |
-
1 => '300',
|
2634 |
-
2 => 'regular',
|
2635 |
-
3 => '500',
|
2636 |
-
4 => '600',
|
2637 |
-
5 => '700',
|
2638 |
-
),
|
2639 |
-
'Mako' =>
|
2640 |
-
array(
|
2641 |
-
0 => 'regular',
|
2642 |
-
),
|
2643 |
-
'Mallanna' =>
|
2644 |
-
array(
|
2645 |
-
0 => 'regular',
|
2646 |
-
),
|
2647 |
-
'Mandali' =>
|
2648 |
-
array(
|
2649 |
-
0 => 'regular',
|
2650 |
-
),
|
2651 |
-
'Manuale' =>
|
2652 |
-
array(
|
2653 |
-
0 => 'regular',
|
2654 |
-
1 => 'italic',
|
2655 |
-
2 => '500',
|
2656 |
-
3 => '500italic',
|
2657 |
-
4 => '600',
|
2658 |
-
5 => '600italic',
|
2659 |
-
6 => '700',
|
2660 |
-
7 => '700italic',
|
2661 |
-
),
|
2662 |
-
'Marcellus' =>
|
2663 |
-
array(
|
2664 |
-
0 => 'regular',
|
2665 |
-
),
|
2666 |
-
'Marcellus SC' =>
|
2667 |
-
array(
|
2668 |
-
0 => 'regular',
|
2669 |
-
),
|
2670 |
-
'Marck Script' =>
|
2671 |
-
array(
|
2672 |
-
0 => 'regular',
|
2673 |
-
),
|
2674 |
-
'Margarine' =>
|
2675 |
-
array(
|
2676 |
-
0 => 'regular',
|
2677 |
-
),
|
2678 |
-
'Marko One' =>
|
2679 |
-
array(
|
2680 |
-
0 => 'regular',
|
2681 |
-
),
|
2682 |
-
'Marmelad' =>
|
2683 |
-
array(
|
2684 |
-
0 => 'regular',
|
2685 |
-
),
|
2686 |
-
'Martel' =>
|
2687 |
-
array(
|
2688 |
-
0 => '200',
|
2689 |
-
1 => '300',
|
2690 |
-
2 => 'regular',
|
2691 |
-
3 => '600',
|
2692 |
-
4 => '700',
|
2693 |
-
5 => '800',
|
2694 |
-
6 => '900',
|
2695 |
-
),
|
2696 |
-
'Martel Sans' =>
|
2697 |
-
array(
|
2698 |
-
0 => '200',
|
2699 |
-
1 => '300',
|
2700 |
-
2 => 'regular',
|
2701 |
-
3 => '600',
|
2702 |
-
4 => '700',
|
2703 |
-
5 => '800',
|
2704 |
-
6 => '900',
|
2705 |
-
),
|
2706 |
-
'Marvel' =>
|
2707 |
-
array(
|
2708 |
-
0 => 'regular',
|
2709 |
-
1 => 'italic',
|
2710 |
-
2 => '700',
|
2711 |
-
3 => '700italic',
|
2712 |
-
),
|
2713 |
-
'Mate' =>
|
2714 |
-
array(
|
2715 |
-
0 => 'regular',
|
2716 |
-
1 => 'italic',
|
2717 |
-
),
|
2718 |
-
'Mate SC' =>
|
2719 |
-
array(
|
2720 |
-
0 => 'regular',
|
2721 |
-
),
|
2722 |
-
'Maven Pro' =>
|
2723 |
-
array(
|
2724 |
-
0 => 'regular',
|
2725 |
-
1 => '500',
|
2726 |
-
2 => '700',
|
2727 |
-
3 => '900',
|
2728 |
-
),
|
2729 |
-
'McLaren' =>
|
2730 |
-
array(
|
2731 |
-
0 => 'regular',
|
2732 |
-
),
|
2733 |
-
'Meddon' =>
|
2734 |
-
array(
|
2735 |
-
0 => 'regular',
|
2736 |
-
),
|
2737 |
-
'MedievalSharp' =>
|
2738 |
-
array(
|
2739 |
-
0 => 'regular',
|
2740 |
-
),
|
2741 |
-
'Medula One' =>
|
2742 |
-
array(
|
2743 |
-
0 => 'regular',
|
2744 |
-
),
|
2745 |
-
'Meera Inimai' =>
|
2746 |
-
array(
|
2747 |
-
0 => 'regular',
|
2748 |
-
),
|
2749 |
-
'Megrim' =>
|
2750 |
-
array(
|
2751 |
-
0 => 'regular',
|
2752 |
-
),
|
2753 |
-
'Meie Script' =>
|
2754 |
-
array(
|
2755 |
-
0 => 'regular',
|
2756 |
-
),
|
2757 |
-
'Merienda' =>
|
2758 |
-
array(
|
2759 |
-
0 => 'regular',
|
2760 |
-
1 => '700',
|
2761 |
-
),
|
2762 |
-
'Merienda One' =>
|
2763 |
-
array(
|
2764 |
-
0 => 'regular',
|
2765 |
-
),
|
2766 |
-
'Merriweather' =>
|
2767 |
-
array(
|
2768 |
-
0 => '300',
|
2769 |
-
1 => '300italic',
|
2770 |
-
2 => 'regular',
|
2771 |
-
3 => 'italic',
|
2772 |
-
4 => '700',
|
2773 |
-
5 => '700italic',
|
2774 |
-
6 => '900',
|
2775 |
-
7 => '900italic',
|
2776 |
-
),
|
2777 |
-
'Merriweather Sans' =>
|
2778 |
-
array(
|
2779 |
-
0 => '300',
|
2780 |
-
1 => '300italic',
|
2781 |
-
2 => 'regular',
|
2782 |
-
3 => 'italic',
|
2783 |
-
4 => '700',
|
2784 |
-
5 => '700italic',
|
2785 |
-
6 => '800',
|
2786 |
-
7 => '800italic',
|
2787 |
-
),
|
2788 |
-
'Metal' =>
|
2789 |
-
array(
|
2790 |
-
0 => 'regular',
|
2791 |
-
),
|
2792 |
-
'Metal Mania' =>
|
2793 |
-
array(
|
2794 |
-
0 => 'regular',
|
2795 |
-
),
|
2796 |
-
'Metamorphous' =>
|
2797 |
-
array(
|
2798 |
-
0 => 'regular',
|
2799 |
-
),
|
2800 |
-
'Metrophobic' =>
|
2801 |
-
array(
|
2802 |
-
0 => 'regular',
|
2803 |
-
),
|
2804 |
-
'Michroma' =>
|
2805 |
-
array(
|
2806 |
-
0 => 'regular',
|
2807 |
-
),
|
2808 |
-
'Milonga' =>
|
2809 |
-
array(
|
2810 |
-
0 => 'regular',
|
2811 |
-
),
|
2812 |
-
'Miltonian' =>
|
2813 |
-
array(
|
2814 |
-
0 => 'regular',
|
2815 |
-
),
|
2816 |
-
'Miltonian Tattoo' =>
|
2817 |
-
array(
|
2818 |
-
0 => 'regular',
|
2819 |
-
),
|
2820 |
-
'Mina' =>
|
2821 |
-
array(
|
2822 |
-
0 => 'regular',
|
2823 |
-
1 => '700',
|
2824 |
-
),
|
2825 |
-
'Miniver' =>
|
2826 |
-
array(
|
2827 |
-
0 => 'regular',
|
2828 |
-
),
|
2829 |
-
'Miriam Libre' =>
|
2830 |
-
array(
|
2831 |
-
0 => 'regular',
|
2832 |
-
1 => '700',
|
2833 |
-
),
|
2834 |
-
'Mirza' =>
|
2835 |
-
array(
|
2836 |
-
0 => 'regular',
|
2837 |
-
1 => '500',
|
2838 |
-
2 => '600',
|
2839 |
-
3 => '700',
|
2840 |
-
),
|
2841 |
-
'Miss Fajardose' =>
|
2842 |
-
array(
|
2843 |
-
0 => 'regular',
|
2844 |
-
),
|
2845 |
-
'Mitr' =>
|
2846 |
-
array(
|
2847 |
-
0 => '200',
|
2848 |
-
1 => '300',
|
2849 |
-
2 => 'regular',
|
2850 |
-
3 => '500',
|
2851 |
-
4 => '600',
|
2852 |
-
5 => '700',
|
2853 |
-
),
|
2854 |
-
'Modak' =>
|
2855 |
-
array(
|
2856 |
-
0 => 'regular',
|
2857 |
-
),
|
2858 |
-
'Modern Antiqua' =>
|
2859 |
-
array(
|
2860 |
-
0 => 'regular',
|
2861 |
-
),
|
2862 |
-
'Mogra' =>
|
2863 |
-
array(
|
2864 |
-
0 => 'regular',
|
2865 |
-
),
|
2866 |
-
'Molengo' =>
|
2867 |
-
array(
|
2868 |
-
0 => 'regular',
|
2869 |
-
),
|
2870 |
-
'Molle' =>
|
2871 |
-
array(
|
2872 |
-
0 => 'italic',
|
2873 |
-
),
|
2874 |
-
'Monda' =>
|
2875 |
-
array(
|
2876 |
-
0 => 'regular',
|
2877 |
-
1 => '700',
|
2878 |
-
),
|
2879 |
-
'Monofett' =>
|
2880 |
-
array(
|
2881 |
-
0 => 'regular',
|
2882 |
-
),
|
2883 |
-
'Monoton' =>
|
2884 |
-
array(
|
2885 |
-
0 => 'regular',
|
2886 |
-
),
|
2887 |
-
'Monsieur La Doulaise' =>
|
2888 |
-
array(
|
2889 |
-
0 => 'regular',
|
2890 |
-
),
|
2891 |
-
'Montaga' =>
|
2892 |
-
array(
|
2893 |
-
0 => 'regular',
|
2894 |
-
),
|
2895 |
-
'Montez' =>
|
2896 |
-
array(
|
2897 |
-
0 => 'regular',
|
2898 |
-
),
|
2899 |
-
'Montserrat' =>
|
2900 |
-
array(
|
2901 |
-
0 => '100',
|
2902 |
-
1 => '100italic',
|
2903 |
-
2 => '200',
|
2904 |
-
3 => '200italic',
|
2905 |
-
4 => '300',
|
2906 |
-
5 => '300italic',
|
2907 |
-
6 => 'regular',
|
2908 |
-
7 => 'italic',
|
2909 |
-
8 => '500',
|
2910 |
-
9 => '500italic',
|
2911 |
-
10 => '600',
|
2912 |
-
11 => '600italic',
|
2913 |
-
12 => '700',
|
2914 |
-
13 => '700italic',
|
2915 |
-
14 => '800',
|
2916 |
-
15 => '800italic',
|
2917 |
-
16 => '900',
|
2918 |
-
17 => '900italic',
|
2919 |
-
),
|
2920 |
-
'Montserrat Alternates' =>
|
2921 |
-
array(
|
2922 |
-
0 => '100',
|
2923 |
-
1 => '100italic',
|
2924 |
-
2 => '200',
|
2925 |
-
3 => '200italic',
|
2926 |
-
4 => '300',
|
2927 |
-
5 => '300italic',
|
2928 |
-
6 => 'regular',
|
2929 |
-
7 => 'italic',
|
2930 |
-
8 => '500',
|
2931 |
-
9 => '500italic',
|
2932 |
-
10 => '600',
|
2933 |
-
11 => '600italic',
|
2934 |
-
12 => '700',
|
2935 |
-
13 => '700italic',
|
2936 |
-
14 => '800',
|
2937 |
-
15 => '800italic',
|
2938 |
-
16 => '900',
|
2939 |
-
17 => '900italic',
|
2940 |
-
),
|
2941 |
-
'Montserrat Subrayada' =>
|
2942 |
-
array(
|
2943 |
-
0 => 'regular',
|
2944 |
-
1 => '700',
|
2945 |
-
),
|
2946 |
-
'Moul' =>
|
2947 |
-
array(
|
2948 |
-
0 => 'regular',
|
2949 |
-
),
|
2950 |
-
'Moulpali' =>
|
2951 |
-
array(
|
2952 |
-
0 => 'regular',
|
2953 |
-
),
|
2954 |
-
'Mountains of Christmas' =>
|
2955 |
-
array(
|
2956 |
-
0 => 'regular',
|
2957 |
-
1 => '700',
|
2958 |
-
),
|
2959 |
-
'Mouse Memoirs' =>
|
2960 |
-
array(
|
2961 |
-
0 => 'regular',
|
2962 |
-
),
|
2963 |
-
'Mr Bedfort' =>
|
2964 |
-
array(
|
2965 |
-
0 => 'regular',
|
2966 |
-
),
|
2967 |
-
'Mr Dafoe' =>
|
2968 |
-
array(
|
2969 |
-
0 => 'regular',
|
2970 |
-
),
|
2971 |
-
'Mr De Haviland' =>
|
2972 |
-
array(
|
2973 |
-
0 => 'regular',
|
2974 |
-
),
|
2975 |
-
'Mrs Saint Delafield' =>
|
2976 |
-
array(
|
2977 |
-
0 => 'regular',
|
2978 |
-
),
|
2979 |
-
'Mrs Sheppards' =>
|
2980 |
-
array(
|
2981 |
-
0 => 'regular',
|
2982 |
-
),
|
2983 |
-
'Mukta' =>
|
2984 |
-
array(
|
2985 |
-
0 => '200',
|
2986 |
-
1 => '300',
|
2987 |
-
2 => 'regular',
|
2988 |
-
3 => '500',
|
2989 |
-
4 => '600',
|
2990 |
-
5 => '700',
|
2991 |
-
6 => '800',
|
2992 |
-
),
|
2993 |
-
'Mukta Mahee' =>
|
2994 |
-
array(
|
2995 |
-
0 => '200',
|
2996 |
-
1 => '300',
|
2997 |
-
2 => 'regular',
|
2998 |
-
3 => '500',
|
2999 |
-
4 => '600',
|
3000 |
-
5 => '700',
|
3001 |
-
6 => '800',
|
3002 |
-
),
|
3003 |
-
'Mukta Malar' =>
|
3004 |
-
array(
|
3005 |
-
0 => '200',
|
3006 |
-
1 => '300',
|
3007 |
-
2 => 'regular',
|
3008 |
-
3 => '500',
|
3009 |
-
4 => '600',
|
3010 |
-
5 => '700',
|
3011 |
-
6 => '800',
|
3012 |
-
),
|
3013 |
-
'Mukta Vaani' =>
|
3014 |
-
array(
|
3015 |
-
0 => '200',
|
3016 |
-
1 => '300',
|
3017 |
-
2 => 'regular',
|
3018 |
-
3 => '500',
|
3019 |
-
4 => '600',
|
3020 |
-
5 => '700',
|
3021 |
-
6 => '800',
|
3022 |
-
),
|
3023 |
-
'Muli' =>
|
3024 |
-
array(
|
3025 |
-
0 => '200',
|
3026 |
-
1 => '200italic',
|
3027 |
-
2 => '300',
|
3028 |
-
3 => '300italic',
|
3029 |
-
4 => 'regular',
|
3030 |
-
5 => 'italic',
|
3031 |
-
6 => '600',
|
3032 |
-
7 => '600italic',
|
3033 |
-
8 => '700',
|
3034 |
-
9 => '700italic',
|
3035 |
-
10 => '800',
|
3036 |
-
11 => '800italic',
|
3037 |
-
12 => '900',
|
3038 |
-
13 => '900italic',
|
3039 |
-
),
|
3040 |
-
'Mystery Quest' =>
|
3041 |
-
array(
|
3042 |
-
0 => 'regular',
|
3043 |
-
),
|
3044 |
-
'NTR' =>
|
3045 |
-
array(
|
3046 |
-
0 => 'regular',
|
3047 |
-
),
|
3048 |
-
'Nanum Brush Script' =>
|
3049 |
-
array(
|
3050 |
-
0 => 'regular',
|
3051 |
-
),
|
3052 |
-
'Nanum Gothic' =>
|
3053 |
-
array(
|
3054 |
-
0 => 'regular',
|
3055 |
-
1 => '700',
|
3056 |
-
2 => '800',
|
3057 |
-
),
|
3058 |
-
'Nanum Gothic Coding' =>
|
3059 |
-
array(
|
3060 |
-
0 => 'regular',
|
3061 |
-
1 => '700',
|
3062 |
-
),
|
3063 |
-
'Nanum Myeongjo' =>
|
3064 |
-
array(
|
3065 |
-
0 => 'regular',
|
3066 |
-
1 => '700',
|
3067 |
-
2 => '800',
|
3068 |
-
),
|
3069 |
-
'Nanum Pen Script' =>
|
3070 |
-
array(
|
3071 |
-
0 => 'regular',
|
3072 |
-
),
|
3073 |
-
'Neucha' =>
|
3074 |
-
array(
|
3075 |
-
0 => 'regular',
|
3076 |
-
),
|
3077 |
-
'Neuton' =>
|
3078 |
-
array(
|
3079 |
-
0 => '200',
|
3080 |
-
1 => '300',
|
3081 |
-
2 => 'regular',
|
3082 |
-
3 => 'italic',
|
3083 |
-
4 => '700',
|
3084 |
-
5 => '800',
|
3085 |
-
),
|
3086 |
-
'New Rocker' =>
|
3087 |
-
array(
|
3088 |
-
0 => 'regular',
|
3089 |
-
),
|
3090 |
-
'News Cycle' =>
|
3091 |
-
array(
|
3092 |
-
0 => 'regular',
|
3093 |
-
1 => '700',
|
3094 |
-
),
|
3095 |
-
'Niconne' =>
|
3096 |
-
array(
|
3097 |
-
0 => 'regular',
|
3098 |
-
),
|
3099 |
-
'Nixie One' =>
|
3100 |
-
array(
|
3101 |
-
0 => 'regular',
|
3102 |
-
),
|
3103 |
-
'Nobile' =>
|
3104 |
-
array(
|
3105 |
-
0 => 'regular',
|
3106 |
-
1 => 'italic',
|
3107 |
-
2 => '500',
|
3108 |
-
3 => '500italic',
|
3109 |
-
4 => '700',
|
3110 |
-
5 => '700italic',
|
3111 |
-
),
|
3112 |
-
'Nokora' =>
|
3113 |
-
array(
|
3114 |
-
0 => 'regular',
|
3115 |
-
1 => '700',
|
3116 |
-
),
|
3117 |
-
'Norican' =>
|
3118 |
-
array(
|
3119 |
-
0 => 'regular',
|
3120 |
-
),
|
3121 |
-
'Nosifer' =>
|
3122 |
-
array(
|
3123 |
-
0 => 'regular',
|
3124 |
-
),
|
3125 |
-
'Nothing You Could Do' =>
|
3126 |
-
array(
|
3127 |
-
0 => 'regular',
|
3128 |
-
),
|
3129 |
-
'Noticia Text' =>
|
3130 |
-
array(
|
3131 |
-
0 => 'regular',
|
3132 |
-
1 => 'italic',
|
3133 |
-
2 => '700',
|
3134 |
-
3 => '700italic',
|
3135 |
-
),
|
3136 |
-
'Noto Sans' =>
|
3137 |
-
array(
|
3138 |
-
0 => 'regular',
|
3139 |
-
1 => 'italic',
|
3140 |
-
2 => '700',
|
3141 |
-
3 => '700italic',
|
3142 |
-
),
|
3143 |
-
'Noto Serif' =>
|
3144 |
-
array(
|
3145 |
-
0 => 'regular',
|
3146 |
-
1 => 'italic',
|
3147 |
-
2 => '700',
|
3148 |
-
3 => '700italic',
|
3149 |
-
),
|
3150 |
-
'Nova Cut' =>
|
3151 |
-
array(
|
3152 |
-
0 => 'regular',
|
3153 |
-
),
|
3154 |
-
'Nova Flat' =>
|
3155 |
-
array(
|
3156 |
-
0 => 'regular',
|
3157 |
-
),
|
3158 |
-
'Nova Mono' =>
|
3159 |
-
array(
|
3160 |
-
0 => 'regular',
|
3161 |
-
),
|
3162 |
-
'Nova Oval' =>
|
3163 |
-
array(
|
3164 |
-
0 => 'regular',
|
3165 |
-
),
|
3166 |
-
'Nova Round' =>
|
3167 |
-
array(
|
3168 |
-
0 => 'regular',
|
3169 |
-
),
|
3170 |
-
'Nova Script' =>
|
3171 |
-
array(
|
3172 |
-
0 => 'regular',
|
3173 |
-
),
|
3174 |
-
'Nova Slim' =>
|
3175 |
-
array(
|
3176 |
-
0 => 'regular',
|
3177 |
-
),
|
3178 |
-
'Nova Square' =>
|
3179 |
-
array(
|
3180 |
-
0 => 'regular',
|
3181 |
-
),
|
3182 |
-
'Numans' =>
|
3183 |
-
array(
|
3184 |
-
0 => 'regular',
|
3185 |
-
),
|
3186 |
-
'Nunito' =>
|
3187 |
-
array(
|
3188 |
-
0 => '200',
|
3189 |
-
1 => '200italic',
|
3190 |
-
2 => '300',
|
3191 |
-
3 => '300italic',
|
3192 |
-
4 => 'regular',
|
3193 |
-
5 => 'italic',
|
3194 |
-
6 => '600',
|
3195 |
-
7 => '600italic',
|
3196 |
-
8 => '700',
|
3197 |
-
9 => '700italic',
|
3198 |
-
10 => '800',
|
3199 |
-
11 => '800italic',
|
3200 |
-
12 => '900',
|
3201 |
-
13 => '900italic',
|
3202 |
-
),
|
3203 |
-
'Nunito Sans' =>
|
3204 |
-
array(
|
3205 |
-
0 => '200',
|
3206 |
-
1 => '200italic',
|
3207 |
-
2 => '300',
|
3208 |
-
3 => '300italic',
|
3209 |
-
4 => 'regular',
|
3210 |
-
5 => 'italic',
|
3211 |
-
6 => '600',
|
3212 |
-
7 => '600italic',
|
3213 |
-
8 => '700',
|
3214 |
-
9 => '700italic',
|
3215 |
-
10 => '800',
|
3216 |
-
11 => '800italic',
|
3217 |
-
12 => '900',
|
3218 |
-
13 => '900italic',
|
3219 |
-
),
|
3220 |
-
'Odor Mean Chey' =>
|
3221 |
-
array(
|
3222 |
-
0 => 'regular',
|
3223 |
-
),
|
3224 |
-
'Offside' =>
|
3225 |
-
array(
|
3226 |
-
0 => 'regular',
|
3227 |
-
),
|
3228 |
-
'Old Standard TT' =>
|
3229 |
-
array(
|
3230 |
-
0 => 'regular',
|
3231 |
-
1 => 'italic',
|
3232 |
-
2 => '700',
|
3233 |
-
),
|
3234 |
-
'Oldenburg' =>
|
3235 |
-
array(
|
3236 |
-
0 => 'regular',
|
3237 |
-
),
|
3238 |
-
'Oleo Script' =>
|
3239 |
-
array(
|
3240 |
-
0 => 'regular',
|
3241 |
-
1 => '700',
|
3242 |
-
),
|
3243 |
-
'Oleo Script Swash Caps' =>
|
3244 |
-
array(
|
3245 |
-
0 => 'regular',
|
3246 |
-
1 => '700',
|
3247 |
-
),
|
3248 |
-
'Open Sans' =>
|
3249 |
-
array(
|
3250 |
-
0 => '300',
|
3251 |
-
1 => '300italic',
|
3252 |
-
2 => 'regular',
|
3253 |
-
3 => 'italic',
|
3254 |
-
4 => '600',
|
3255 |
-
5 => '600italic',
|
3256 |
-
6 => '700',
|
3257 |
-
7 => '700italic',
|
3258 |
-
8 => '800',
|
3259 |
-
9 => '800italic',
|
3260 |
-
),
|
3261 |
-
'Open Sans Condensed' =>
|
3262 |
-
array(
|
3263 |
-
0 => '300',
|
3264 |
-
1 => '300italic',
|
3265 |
-
2 => '700',
|
3266 |
-
),
|
3267 |
-
'Oranienbaum' =>
|
3268 |
-
array(
|
3269 |
-
0 => 'regular',
|
3270 |
-
),
|
3271 |
-
'Orbitron' =>
|
3272 |
-
array(
|
3273 |
-
0 => 'regular',
|
3274 |
-
1 => '500',
|
3275 |
-
2 => '700',
|
3276 |
-
3 => '900',
|
3277 |
-
),
|
3278 |
-
'Oregano' =>
|
3279 |
-
array(
|
3280 |
-
0 => 'regular',
|
3281 |
-
1 => 'italic',
|
3282 |
-
),
|
3283 |
-
'Orienta' =>
|
3284 |
-
array(
|
3285 |
-
0 => 'regular',
|
3286 |
-
),
|
3287 |
-
'Original Surfer' =>
|
3288 |
-
array(
|
3289 |
-
0 => 'regular',
|
3290 |
-
),
|
3291 |
-
'Oswald' =>
|
3292 |
-
array(
|
3293 |
-
0 => '200',
|
3294 |
-
1 => '300',
|
3295 |
-
2 => 'regular',
|
3296 |
-
3 => '500',
|
3297 |
-
4 => '600',
|
3298 |
-
5 => '700',
|
3299 |
-
),
|
3300 |
-
'Over the Rainbow' =>
|
3301 |
-
array(
|
3302 |
-
0 => 'regular',
|
3303 |
-
),
|
3304 |
-
'Overlock' =>
|
3305 |
-
array(
|
3306 |
-
0 => 'regular',
|
3307 |
-
1 => 'italic',
|
3308 |
-
2 => '700',
|
3309 |
-
3 => '700italic',
|
3310 |
-
4 => '900',
|
3311 |
-
5 => '900italic',
|
3312 |
-
),
|
3313 |
-
'Overlock SC' =>
|
3314 |
-
array(
|
3315 |
-
0 => 'regular',
|
3316 |
-
),
|
3317 |
-
'Overpass' =>
|
3318 |
-
array(
|
3319 |
-
0 => '100',
|
3320 |
-
1 => '100italic',
|
3321 |
-
2 => '200',
|
3322 |
-
3 => '200italic',
|
3323 |
-
4 => '300',
|
3324 |
-
5 => '300italic',
|
3325 |
-
6 => 'regular',
|
3326 |
-
7 => 'italic',
|
3327 |
-
8 => '600',
|
3328 |
-
9 => '600italic',
|
3329 |
-
10 => '700',
|
3330 |
-
11 => '700italic',
|
3331 |
-
12 => '800',
|
3332 |
-
13 => '800italic',
|
3333 |
-
14 => '900',
|
3334 |
-
15 => '900italic',
|
3335 |
-
),
|
3336 |
-
'Overpass Mono' =>
|
3337 |
-
array(
|
3338 |
-
0 => '300',
|
3339 |
-
1 => 'regular',
|
3340 |
-
2 => '600',
|
3341 |
-
3 => '700',
|
3342 |
-
),
|
3343 |
-
'Ovo' =>
|
3344 |
-
array(
|
3345 |
-
0 => 'regular',
|
3346 |
-
),
|
3347 |
-
'Oxygen' =>
|
3348 |
-
array(
|
3349 |
-
0 => '300',
|
3350 |
-
1 => 'regular',
|
3351 |
-
2 => '700',
|
3352 |
-
),
|
3353 |
-
'Oxygen Mono' =>
|
3354 |
-
array(
|
3355 |
-
0 => 'regular',
|
3356 |
-
),
|
3357 |
-
'PT Mono' =>
|
3358 |
-
array(
|
3359 |
-
0 => 'regular',
|
3360 |
-
),
|
3361 |
-
'PT Sans' =>
|
3362 |
-
array(
|
3363 |
-
0 => 'regular',
|
3364 |
-
1 => 'italic',
|
3365 |
-
2 => '700',
|
3366 |
-
3 => '700italic',
|
3367 |
-
),
|
3368 |
-
'PT Sans Caption' =>
|
3369 |
-
array(
|
3370 |
-
0 => 'regular',
|
3371 |
-
1 => '700',
|
3372 |
-
),
|
3373 |
-
'PT Sans Narrow' =>
|
3374 |
-
array(
|
3375 |
-
0 => 'regular',
|
3376 |
-
1 => '700',
|
3377 |
-
),
|
3378 |
-
'PT Serif' =>
|
3379 |
-
array(
|
3380 |
-
0 => 'regular',
|
3381 |
-
1 => 'italic',
|
3382 |
-
2 => '700',
|
3383 |
-
3 => '700italic',
|
3384 |
-
),
|
3385 |
-
'PT Serif Caption' =>
|
3386 |
-
array(
|
3387 |
-
0 => 'regular',
|
3388 |
-
1 => 'italic',
|
3389 |
-
),
|
3390 |
-
'Pacifico' =>
|
3391 |
-
array(
|
3392 |
-
0 => 'regular',
|
3393 |
-
),
|
3394 |
-
'Padauk' =>
|
3395 |
-
array(
|
3396 |
-
0 => 'regular',
|
3397 |
-
1 => '700',
|
3398 |
-
),
|
3399 |
-
'Palanquin' =>
|
3400 |
-
array(
|
3401 |
-
0 => '100',
|
3402 |
-
1 => '200',
|
3403 |
-
2 => '300',
|
3404 |
-
3 => 'regular',
|
3405 |
-
4 => '500',
|
3406 |
-
5 => '600',
|
3407 |
-
6 => '700',
|
3408 |
-
),
|
3409 |
-
'Palanquin Dark' =>
|
3410 |
-
array(
|
3411 |
-
0 => 'regular',
|
3412 |
-
1 => '500',
|
3413 |
-
2 => '600',
|
3414 |
-
3 => '700',
|
3415 |
-
),
|
3416 |
-
'Pangolin' =>
|
3417 |
-
array(
|
3418 |
-
0 => 'regular',
|
3419 |
-
),
|
3420 |
-
'Paprika' =>
|
3421 |
-
array(
|
3422 |
-
0 => 'regular',
|
3423 |
-
),
|
3424 |
-
'Parisienne' =>
|
3425 |
-
array(
|
3426 |
-
0 => 'regular',
|
3427 |
-
),
|
3428 |
-
'Passero One' =>
|
3429 |
-
array(
|
3430 |
-
0 => 'regular',
|
3431 |
-
),
|
3432 |
-
'Passion One' =>
|
3433 |
-
array(
|
3434 |
-
0 => 'regular',
|
3435 |
-
1 => '700',
|
3436 |
-
2 => '900',
|
3437 |
-
),
|
3438 |
-
'Pathway Gothic One' =>
|
3439 |
-
array(
|
3440 |
-
0 => 'regular',
|
3441 |
-
),
|
3442 |
-
'Patrick Hand' =>
|
3443 |
-
array(
|
3444 |
-
0 => 'regular',
|
3445 |
-
),
|
3446 |
-
'Patrick Hand SC' =>
|
3447 |
-
array(
|
3448 |
-
0 => 'regular',
|
3449 |
-
),
|
3450 |
-
'Pattaya' =>
|
3451 |
-
array(
|
3452 |
-
0 => 'regular',
|
3453 |
-
),
|
3454 |
-
'Patua One' =>
|
3455 |
-
array(
|
3456 |
-
0 => 'regular',
|
3457 |
-
),
|
3458 |
-
'Pavanam' =>
|
3459 |
-
array(
|
3460 |
-
0 => 'regular',
|
3461 |
-
),
|
3462 |
-
'Paytone One' =>
|
3463 |
-
array(
|
3464 |
-
0 => 'regular',
|
3465 |
-
),
|
3466 |
-
'Peddana' =>
|
3467 |
-
array(
|
3468 |
-
0 => 'regular',
|
3469 |
-
),
|
3470 |
-
'Peralta' =>
|
3471 |
-
array(
|
3472 |
-
0 => 'regular',
|
3473 |
-
),
|
3474 |
-
'Permanent Marker' =>
|
3475 |
-
array(
|
3476 |
-
0 => 'regular',
|
3477 |
-
),
|
3478 |
-
'Petit Formal Script' =>
|
3479 |
-
array(
|
3480 |
-
0 => 'regular',
|
3481 |
-
),
|
3482 |
-
'Petrona' =>
|
3483 |
-
array(
|
3484 |
-
0 => 'regular',
|
3485 |
-
),
|
3486 |
-
'Philosopher' =>
|
3487 |
-
array(
|
3488 |
-
0 => 'regular',
|
3489 |
-
1 => 'italic',
|
3490 |
-
2 => '700',
|
3491 |
-
3 => '700italic',
|
3492 |
-
),
|
3493 |
-
'Piedra' =>
|
3494 |
-
array(
|
3495 |
-
0 => 'regular',
|
3496 |
-
),
|
3497 |
-
'Pinyon Script' =>
|
3498 |
-
array(
|
3499 |
-
0 => 'regular',
|
3500 |
-
),
|
3501 |
-
'Pirata One' =>
|
3502 |
-
array(
|
3503 |
-
0 => 'regular',
|
3504 |
-
),
|
3505 |
-
'Plaster' =>
|
3506 |
-
array(
|
3507 |
-
0 => 'regular',
|
3508 |
-
),
|
3509 |
-
'Play' =>
|
3510 |
-
array(
|
3511 |
-
0 => 'regular',
|
3512 |
-
1 => '700',
|
3513 |
-
),
|
3514 |
-
'Playball' =>
|
3515 |
-
array(
|
3516 |
-
0 => 'regular',
|
3517 |
-
),
|
3518 |
-
'Playfair Display' =>
|
3519 |
-
array(
|
3520 |
-
0 => 'regular',
|
3521 |
-
1 => 'italic',
|
3522 |
-
2 => '700',
|
3523 |
-
3 => '700italic',
|
3524 |
-
4 => '900',
|
3525 |
-
5 => '900italic',
|
3526 |
-
),
|
3527 |
-
'Playfair Display SC' =>
|
3528 |
-
array(
|
3529 |
-
0 => 'regular',
|
3530 |
-
1 => 'italic',
|
3531 |
-
2 => '700',
|
3532 |
-
3 => '700italic',
|
3533 |
-
4 => '900',
|
3534 |
-
5 => '900italic',
|
3535 |
-
),
|
3536 |
-
'Podkova' =>
|
3537 |
-
array(
|
3538 |
-
0 => 'regular',
|
3539 |
-
1 => '500',
|
3540 |
-
2 => '600',
|
3541 |
-
3 => '700',
|
3542 |
-
4 => '800',
|
3543 |
-
),
|
3544 |
-
'Poiret One' =>
|
3545 |
-
array(
|
3546 |
-
0 => 'regular',
|
3547 |
-
),
|
3548 |
-
'Poller One' =>
|
3549 |
-
array(
|
3550 |
-
0 => 'regular',
|
3551 |
-
),
|
3552 |
-
'Poly' =>
|
3553 |
-
array(
|
3554 |
-
0 => 'regular',
|
3555 |
-
1 => 'italic',
|
3556 |
-
),
|
3557 |
-
'Pompiere' =>
|
3558 |
-
array(
|
3559 |
-
0 => 'regular',
|
3560 |
-
),
|
3561 |
-
'Pontano Sans' =>
|
3562 |
-
array(
|
3563 |
-
0 => 'regular',
|
3564 |
-
),
|
3565 |
-
'Poppins' =>
|
3566 |
-
array(
|
3567 |
-
0 => '100',
|
3568 |
-
1 => '100italic',
|
3569 |
-
2 => '200',
|
3570 |
-
3 => '200italic',
|
3571 |
-
4 => '300',
|
3572 |
-
5 => '300italic',
|
3573 |
-
6 => 'regular',
|
3574 |
-
7 => 'italic',
|
3575 |
-
8 => '500',
|
3576 |
-
9 => '500italic',
|
3577 |
-
10 => '600',
|
3578 |
-
11 => '600italic',
|
3579 |
-
12 => '700',
|
3580 |
-
13 => '700italic',
|
3581 |
-
14 => '800',
|
3582 |
-
15 => '800italic',
|
3583 |
-
16 => '900',
|
3584 |
-
17 => '900italic',
|
3585 |
-
),
|
3586 |
-
'Port Lligat Sans' =>
|
3587 |
-
array(
|
3588 |
-
0 => 'regular',
|
3589 |
-
),
|
3590 |
-
'Port Lligat Slab' =>
|
3591 |
-
array(
|
3592 |
-
0 => 'regular',
|
3593 |
-
),
|
3594 |
-
'Pragati Narrow' =>
|
3595 |
-
array(
|
3596 |
-
0 => 'regular',
|
3597 |
-
1 => '700',
|
3598 |
-
),
|
3599 |
-
'Prata' =>
|
3600 |
-
array(
|
3601 |
-
0 => 'regular',
|
3602 |
-
),
|
3603 |
-
'Preahvihear' =>
|
3604 |
-
array(
|
3605 |
-
0 => 'regular',
|
3606 |
-
),
|
3607 |
-
'Press Start 2P' =>
|
3608 |
-
array(
|
3609 |
-
0 => 'regular',
|
3610 |
-
),
|
3611 |
-
'Pridi' =>
|
3612 |
-
array(
|
3613 |
-
0 => '200',
|
3614 |
-
1 => '300',
|
3615 |
-
2 => 'regular',
|
3616 |
-
3 => '500',
|
3617 |
-
4 => '600',
|
3618 |
-
5 => '700',
|
3619 |
-
),
|
3620 |
-
'Princess Sofia' =>
|
3621 |
-
array(
|
3622 |
-
0 => 'regular',
|
3623 |
-
),
|
3624 |
-
'Prociono' =>
|
3625 |
-
array(
|
3626 |
-
0 => 'regular',
|
3627 |
-
),
|
3628 |
-
'Prompt' =>
|
3629 |
-
array(
|
3630 |
-
0 => '100',
|
3631 |
-
1 => '100italic',
|
3632 |
-
2 => '200',
|
3633 |
-
3 => '200italic',
|
3634 |
-
4 => '300',
|
3635 |
-
5 => '300italic',
|
3636 |
-
6 => 'regular',
|
3637 |
-
7 => 'italic',
|
3638 |
-
8 => '500',
|
3639 |
-
9 => '500italic',
|
3640 |
-
10 => '600',
|
3641 |
-
11 => '600italic',
|
3642 |
-
12 => '700',
|
3643 |
-
13 => '700italic',
|
3644 |
-
14 => '800',
|
3645 |
-
15 => '800italic',
|
3646 |
-
16 => '900',
|
3647 |
-
17 => '900italic',
|
3648 |
-
),
|
3649 |
-
'Prosto One' =>
|
3650 |
-
array(
|
3651 |
-
0 => 'regular',
|
3652 |
-
),
|
3653 |
-
'Proza Libre' =>
|
3654 |
-
array(
|
3655 |
-
0 => 'regular',
|
3656 |
-
1 => 'italic',
|
3657 |
-
2 => '500',
|
3658 |
-
3 => '500italic',
|
3659 |
-
4 => '600',
|
3660 |
-
5 => '600italic',
|
3661 |
-
6 => '700',
|
3662 |
-
7 => '700italic',
|
3663 |
-
8 => '800',
|
3664 |
-
9 => '800italic',
|
3665 |
-
),
|
3666 |
-
'Puritan' =>
|
3667 |
-
array(
|
3668 |
-
0 => 'regular',
|
3669 |
-
1 => 'italic',
|
3670 |
-
2 => '700',
|
3671 |
-
3 => '700italic',
|
3672 |
-
),
|
3673 |
-
'Purple Purse' =>
|
3674 |
-
array(
|
3675 |
-
0 => 'regular',
|
3676 |
-
),
|
3677 |
-
'Quando' =>
|
3678 |
-
array(
|
3679 |
-
0 => 'regular',
|
3680 |
-
),
|
3681 |
-
'Quantico' =>
|
3682 |
-
array(
|
3683 |
-
0 => 'regular',
|
3684 |
-
1 => 'italic',
|
3685 |
-
2 => '700',
|
3686 |
-
3 => '700italic',
|
3687 |
-
),
|
3688 |
-
'Quattrocento' =>
|
3689 |
-
array(
|
3690 |
-
0 => 'regular',
|
3691 |
-
1 => '700',
|
3692 |
-
),
|
3693 |
-
'Quattrocento Sans' =>
|
3694 |
-
array(
|
3695 |
-
0 => 'regular',
|
3696 |
-
1 => 'italic',
|
3697 |
-
2 => '700',
|
3698 |
-
3 => '700italic',
|
3699 |
-
),
|
3700 |
-
'Questrial' =>
|
3701 |
-
array(
|
3702 |
-
0 => 'regular',
|
3703 |
-
),
|
3704 |
-
'Quicksand' =>
|
3705 |
-
array(
|
3706 |
-
0 => '300',
|
3707 |
-
1 => 'regular',
|
3708 |
-
2 => '500',
|
3709 |
-
3 => '700',
|
3710 |
-
),
|
3711 |
-
'Quintessential' =>
|
3712 |
-
array(
|
3713 |
-
0 => 'regular',
|
3714 |
-
),
|
3715 |
-
'Qwigley' =>
|
3716 |
-
array(
|
3717 |
-
0 => 'regular',
|
3718 |
-
),
|
3719 |
-
'Racing Sans One' =>
|
3720 |
-
array(
|
3721 |
-
0 => 'regular',
|
3722 |
-
),
|
3723 |
-
'Radley' =>
|
3724 |
-
array(
|
3725 |
-
0 => 'regular',
|
3726 |
-
1 => 'italic',
|
3727 |
-
),
|
3728 |
-
'Rajdhani' =>
|
3729 |
-
array(
|
3730 |
-
0 => '300',
|
3731 |
-
1 => 'regular',
|
3732 |
-
2 => '500',
|
3733 |
-
3 => '600',
|
3734 |
-
4 => '700',
|
3735 |
-
),
|
3736 |
-
'Rakkas' =>
|
3737 |
-
array(
|
3738 |
-
0 => 'regular',
|
3739 |
-
),
|
3740 |
-
'Raleway' =>
|
3741 |
-
array(
|
3742 |
-
0 => '100',
|
3743 |
-
1 => '100italic',
|
3744 |
-
2 => '200',
|
3745 |
-
3 => '200italic',
|
3746 |
-
4 => '300',
|
3747 |
-
5 => '300italic',
|
3748 |
-
6 => 'regular',
|
3749 |
-
7 => 'italic',
|
3750 |
-
8 => '500',
|
3751 |
-
9 => '500italic',
|
3752 |
-
10 => '600',
|
3753 |
-
11 => '600italic',
|
3754 |
-
12 => '700',
|
3755 |
-
13 => '700italic',
|
3756 |
-
14 => '800',
|
3757 |
-
15 => '800italic',
|
3758 |
-
16 => '900',
|
3759 |
-
17 => '900italic',
|
3760 |
-
),
|
3761 |
-
'Raleway Dots' =>
|
3762 |
-
array(
|
3763 |
-
0 => 'regular',
|
3764 |
-
),
|
3765 |
-
'Ramabhadra' =>
|
3766 |
-
array(
|
3767 |
-
0 => 'regular',
|
3768 |
-
),
|
3769 |
-
'Ramaraja' =>
|
3770 |
-
array(
|
3771 |
-
0 => 'regular',
|
3772 |
-
),
|
3773 |
-
'Rambla' =>
|
3774 |
-
array(
|
3775 |
-
0 => 'regular',
|
3776 |
-
1 => 'italic',
|
3777 |
-
2 => '700',
|
3778 |
-
3 => '700italic',
|
3779 |
-
),
|
3780 |
-
'Rammetto One' =>
|
3781 |
-
array(
|
3782 |
-
0 => 'regular',
|
3783 |
-
),
|
3784 |
-
'Ranchers' =>
|
3785 |
-
array(
|
3786 |
-
0 => 'regular',
|
3787 |
-
),
|
3788 |
-
'Rancho' =>
|
3789 |
-
array(
|
3790 |
-
0 => 'regular',
|
3791 |
-
),
|
3792 |
-
'Ranga' =>
|
3793 |
-
array(
|
3794 |
-
0 => 'regular',
|
3795 |
-
1 => '700',
|
3796 |
-
),
|
3797 |
-
'Rasa' =>
|
3798 |
-
array(
|
3799 |
-
0 => '300',
|
3800 |
-
1 => 'regular',
|
3801 |
-
2 => '500',
|
3802 |
-
3 => '600',
|
3803 |
-
4 => '700',
|
3804 |
-
),
|
3805 |
-
'Rationale' =>
|
3806 |
-
array(
|
3807 |
-
0 => 'regular',
|
3808 |
-
),
|
3809 |
-
'Ravi Prakash' =>
|
3810 |
-
array(
|
3811 |
-
0 => 'regular',
|
3812 |
-
),
|
3813 |
-
'Redressed' =>
|
3814 |
-
array(
|
3815 |
-
0 => 'regular',
|
3816 |
-
),
|
3817 |
-
'Reem Kufi' =>
|
3818 |
-
array(
|
3819 |
-
0 => 'regular',
|
3820 |
-
),
|
3821 |
-
'Reenie Beanie' =>
|
3822 |
-
array(
|
3823 |
-
0 => 'regular',
|
3824 |
-
),
|
3825 |
-
'Revalia' =>
|
3826 |
-
array(
|
3827 |
-
0 => 'regular',
|
3828 |
-
),
|
3829 |
-
'Rhodium Libre' =>
|
3830 |
-
array(
|
3831 |
-
0 => 'regular',
|
3832 |
-
),
|
3833 |
-
'Ribeye' =>
|
3834 |
-
array(
|
3835 |
-
0 => 'regular',
|
3836 |
-
),
|
3837 |
-
'Ribeye Marrow' =>
|
3838 |
-
array(
|
3839 |
-
0 => 'regular',
|
3840 |
-
),
|
3841 |
-
'Righteous' =>
|
3842 |
-
array(
|
3843 |
-
0 => 'regular',
|
3844 |
-
),
|
3845 |
-
'Risque' =>
|
3846 |
-
array(
|
3847 |
-
0 => 'regular',
|
3848 |
-
),
|
3849 |
-
'Roboto' =>
|
3850 |
-
array(
|
3851 |
-
0 => '100',
|
3852 |
-
1 => '100italic',
|
3853 |
-
2 => '300',
|
3854 |
-
3 => '300italic',
|
3855 |
-
4 => 'regular',
|
3856 |
-
5 => 'italic',
|
3857 |
-
6 => '500',
|
3858 |
-
7 => '500italic',
|
3859 |
-
8 => '700',
|
3860 |
-
9 => '700italic',
|
3861 |
-
10 => '900',
|
3862 |
-
11 => '900italic',
|
3863 |
-
),
|
3864 |
-
'Roboto Condensed' =>
|
3865 |
-
array(
|
3866 |
-
0 => '300',
|
3867 |
-
1 => '300italic',
|
3868 |
-
2 => 'regular',
|
3869 |
-
3 => 'italic',
|
3870 |
-
4 => '700',
|
3871 |
-
5 => '700italic',
|
3872 |
-
),
|
3873 |
-
'Roboto Mono' =>
|
3874 |
-
array(
|
3875 |
-
0 => '100',
|
3876 |
-
1 => '100italic',
|
3877 |
-
2 => '300',
|
3878 |
-
3 => '300italic',
|
3879 |
-
4 => 'regular',
|
3880 |
-
5 => 'italic',
|
3881 |
-
6 => '500',
|
3882 |
-
7 => '500italic',
|
3883 |
-
8 => '700',
|
3884 |
-
9 => '700italic',
|
3885 |
-
),
|
3886 |
-
'Roboto Slab' =>
|
3887 |
-
array(
|
3888 |
-
0 => '100',
|
3889 |
-
1 => '300',
|
3890 |
-
2 => 'regular',
|
3891 |
-
3 => '700',
|
3892 |
-
),
|
3893 |
-
'Rochester' =>
|
3894 |
-
array(
|
3895 |
-
0 => 'regular',
|
3896 |
-
),
|
3897 |
-
'Rock Salt' =>
|
3898 |
-
array(
|
3899 |
-
0 => 'regular',
|
3900 |
-
),
|
3901 |
-
'Rokkitt' =>
|
3902 |
-
array(
|
3903 |
-
0 => '100',
|
3904 |
-
1 => '200',
|
3905 |
-
2 => '300',
|
3906 |
-
3 => 'regular',
|
3907 |
-
4 => '500',
|
3908 |
-
5 => '600',
|
3909 |
-
6 => '700',
|
3910 |
-
7 => '800',
|
3911 |
-
8 => '900',
|
3912 |
-
),
|
3913 |
-
'Romanesco' =>
|
3914 |
-
array(
|
3915 |
-
0 => 'regular',
|
3916 |
-
),
|
3917 |
-
'Ropa Sans' =>
|
3918 |
-
array(
|
3919 |
-
0 => 'regular',
|
3920 |
-
1 => 'italic',
|
3921 |
-
),
|
3922 |
-
'Rosario' =>
|
3923 |
-
array(
|
3924 |
-
0 => 'regular',
|
3925 |
-
1 => 'italic',
|
3926 |
-
2 => '700',
|
3927 |
-
3 => '700italic',
|
3928 |
-
),
|
3929 |
-
'Rosarivo' =>
|
3930 |
-
array(
|
3931 |
-
0 => 'regular',
|
3932 |
-
1 => 'italic',
|
3933 |
-
),
|
3934 |
-
'Rouge Script' =>
|
3935 |
-
array(
|
3936 |
-
0 => 'regular',
|
3937 |
-
),
|
3938 |
-
'Rozha One' =>
|
3939 |
-
array(
|
3940 |
-
0 => 'regular',
|
3941 |
-
),
|
3942 |
-
'Rubik' =>
|
3943 |
-
array(
|
3944 |
-
0 => '300',
|
3945 |
-
1 => '300italic',
|
3946 |
-
2 => 'regular',
|
3947 |
-
3 => 'italic',
|
3948 |
-
4 => '500',
|
3949 |
-
5 => '500italic',
|
3950 |
-
6 => '700',
|
3951 |
-
7 => '700italic',
|
3952 |
-
8 => '900',
|
3953 |
-
9 => '900italic',
|
3954 |
-
),
|
3955 |
-
'Rubik Mono One' =>
|
3956 |
-
array(
|
3957 |
-
0 => 'regular',
|
3958 |
-
),
|
3959 |
-
'Ruda' =>
|
3960 |
-
array(
|
3961 |
-
0 => 'regular',
|
3962 |
-
1 => '700',
|
3963 |
-
2 => '900',
|
3964 |
-
),
|
3965 |
-
'Rufina' =>
|
3966 |
-
array(
|
3967 |
-
0 => 'regular',
|
3968 |
-
1 => '700',
|
3969 |
-
),
|
3970 |
-
'Ruge Boogie' =>
|
3971 |
-
array(
|
3972 |
-
0 => 'regular',
|
3973 |
-
),
|
3974 |
-
'Ruluko' =>
|
3975 |
-
array(
|
3976 |
-
0 => 'regular',
|
3977 |
-
),
|
3978 |
-
'Rum Raisin' =>
|
3979 |
-
array(
|
3980 |
-
0 => 'regular',
|
3981 |
-
),
|
3982 |
-
'Ruslan Display' =>
|
3983 |
-
array(
|
3984 |
-
0 => 'regular',
|
3985 |
-
),
|
3986 |
-
'Russo One' =>
|
3987 |
-
array(
|
3988 |
-
0 => 'regular',
|
3989 |
-
),
|
3990 |
-
'Ruthie' =>
|
3991 |
-
array(
|
3992 |
-
0 => 'regular',
|
3993 |
-
),
|
3994 |
-
'Rye' =>
|
3995 |
-
array(
|
3996 |
-
0 => 'regular',
|
3997 |
-
),
|
3998 |
-
'Sacramento' =>
|
3999 |
-
array(
|
4000 |
-
0 => 'regular',
|
4001 |
-
),
|
4002 |
-
'Sahitya' =>
|
4003 |
-
array(
|
4004 |
-
0 => 'regular',
|
4005 |
-
1 => '700',
|
4006 |
-
),
|
4007 |
-
'Sail' =>
|
4008 |
-
array(
|
4009 |
-
0 => 'regular',
|
4010 |
-
),
|
4011 |
-
'Saira' =>
|
4012 |
-
array(
|
4013 |
-
0 => '100',
|
4014 |
-
1 => '200',
|
4015 |
-
2 => '300',
|
4016 |
-
3 => 'regular',
|
4017 |
-
4 => '500',
|
4018 |
-
5 => '600',
|
4019 |
-
6 => '700',
|
4020 |
-
7 => '800',
|
4021 |
-
8 => '900',
|
4022 |
-
),
|
4023 |
-
'Saira Condensed' =>
|
4024 |
-
array(
|
4025 |
-
0 => '100',
|
4026 |
-
1 => '200',
|
4027 |
-
2 => '300',
|
4028 |
-
3 => 'regular',
|
4029 |
-
4 => '500',
|
4030 |
-
5 => '600',
|
4031 |
-
6 => '700',
|
4032 |
-
7 => '800',
|
4033 |
-
8 => '900',
|
4034 |
-
),
|
4035 |
-
'Saira Extra Condensed' =>
|
4036 |
-
array(
|
4037 |
-
0 => '100',
|
4038 |
-
1 => '200',
|
4039 |
-
2 => '300',
|
4040 |
-
3 => 'regular',
|
4041 |
-
4 => '500',
|
4042 |
-
5 => '600',
|
4043 |
-
6 => '700',
|
4044 |
-
7 => '800',
|
4045 |
-
8 => '900',
|
4046 |
-
),
|
4047 |
-
'Saira Semi Condensed' =>
|
4048 |
-
array(
|
4049 |
-
0 => '100',
|
4050 |
-
1 => '200',
|
4051 |
-
2 => '300',
|
4052 |
-
3 => 'regular',
|
4053 |
-
4 => '500',
|
4054 |
-
5 => '600',
|
4055 |
-
6 => '700',
|
4056 |
-
7 => '800',
|
4057 |
-
8 => '900',
|
4058 |
-
),
|
4059 |
-
'Salsa' =>
|
4060 |
-
array(
|
4061 |
-
0 => 'regular',
|
4062 |
-
),
|
4063 |
-
'Sanchez' =>
|
4064 |
-
array(
|
4065 |
-
0 => 'regular',
|
4066 |
-
1 => 'italic',
|
4067 |
-
),
|
4068 |
-
'Sancreek' =>
|
4069 |
-
array(
|
4070 |
-
0 => 'regular',
|
4071 |
-
),
|
4072 |
-
'Sansita' =>
|
4073 |
-
array(
|
4074 |
-
0 => 'regular',
|
4075 |
-
1 => 'italic',
|
4076 |
-
2 => '700',
|
4077 |
-
3 => '700italic',
|
4078 |
-
4 => '800',
|
4079 |
-
5 => '800italic',
|
4080 |
-
6 => '900',
|
4081 |
-
7 => '900italic',
|
4082 |
-
),
|
4083 |
-
'Sarala' =>
|
4084 |
-
array(
|
4085 |
-
0 => 'regular',
|
4086 |
-
1 => '700',
|
4087 |
-
),
|
4088 |
-
'Sarina' =>
|
4089 |
-
array(
|
4090 |
-
0 => 'regular',
|
4091 |
-
),
|
4092 |
-
'Sarpanch' =>
|
4093 |
-
array(
|
4094 |
-
0 => 'regular',
|
4095 |
-
1 => '500',
|
4096 |
-
2 => '600',
|
4097 |
-
3 => '700',
|
4098 |
-
4 => '800',
|
4099 |
-
5 => '900',
|
4100 |
-
),
|
4101 |
-
'Satisfy' =>
|
4102 |
-
array(
|
4103 |
-
0 => 'regular',
|
4104 |
-
),
|
4105 |
-
'Scada' =>
|
4106 |
-
array(
|
4107 |
-
0 => 'regular',
|
4108 |
-
1 => 'italic',
|
4109 |
-
2 => '700',
|
4110 |
-
3 => '700italic',
|
4111 |
-
),
|
4112 |
-
'Scheherazade' =>
|
4113 |
-
array(
|
4114 |
-
0 => 'regular',
|
4115 |
-
1 => '700',
|
4116 |
-
),
|
4117 |
-
'Schoolbell' =>
|
4118 |
-
array(
|
4119 |
-
0 => 'regular',
|
4120 |
-
),
|
4121 |
-
'Scope One' =>
|
4122 |
-
array(
|
4123 |
-
0 => 'regular',
|
4124 |
-
),
|
4125 |
-
'Seaweed Script' =>
|
4126 |
-
array(
|
4127 |
-
0 => 'regular',
|
4128 |
-
),
|
4129 |
-
'Secular One' =>
|
4130 |
-
array(
|
4131 |
-
0 => 'regular',
|
4132 |
-
),
|
4133 |
-
'Sedgwick Ave' =>
|
4134 |
-
array(
|
4135 |
-
0 => 'regular',
|
4136 |
-
),
|
4137 |
-
'Sedgwick Ave Display' =>
|
4138 |
-
array(
|
4139 |
-
0 => 'regular',
|
4140 |
-
),
|
4141 |
-
'Sevillana' =>
|
4142 |
-
array(
|
4143 |
-
0 => 'regular',
|
4144 |
-
),
|
4145 |
-
'Seymour One' =>
|
4146 |
-
array(
|
4147 |
-
0 => 'regular',
|
4148 |
-
),
|
4149 |
-
'Shadows Into Light' =>
|
4150 |
-
array(
|
4151 |
-
0 => 'regular',
|
4152 |
-
),
|
4153 |
-
'Shadows Into Light Two' =>
|
4154 |
-
array(
|
4155 |
-
0 => 'regular',
|
4156 |
-
),
|
4157 |
-
'Shanti' =>
|
4158 |
-
array(
|
4159 |
-
0 => 'regular',
|
4160 |
-
),
|
4161 |
-
'Share' =>
|
4162 |
-
array(
|
4163 |
-
0 => 'regular',
|
4164 |
-
1 => 'italic',
|
4165 |
-
2 => '700',
|
4166 |
-
3 => '700italic',
|
4167 |
-
),
|
4168 |
-
'Share Tech' =>
|
4169 |
-
array(
|
4170 |
-
0 => 'regular',
|
4171 |
-
),
|
4172 |
-
'Share Tech Mono' =>
|
4173 |
-
array(
|
4174 |
-
0 => 'regular',
|
4175 |
-
),
|
4176 |
-
'Shojumaru' =>
|
4177 |
-
array(
|
4178 |
-
0 => 'regular',
|
4179 |
-
),
|
4180 |
-
'Short Stack' =>
|
4181 |
-
array(
|
4182 |
-
0 => 'regular',
|
4183 |
-
),
|
4184 |
-
'Shrikhand' =>
|
4185 |
-
array(
|
4186 |
-
0 => 'regular',
|
4187 |
-
),
|
4188 |
-
'Siemreap' =>
|
4189 |
-
array(
|
4190 |
-
0 => 'regular',
|
4191 |
-
),
|
4192 |
-
'Sigmar One' =>
|
4193 |
-
array(
|
4194 |
-
0 => 'regular',
|
4195 |
-
),
|
4196 |
-
'Signika' =>
|
4197 |
-
array(
|
4198 |
-
0 => '300',
|
4199 |
-
1 => 'regular',
|
4200 |
-
2 => '600',
|
4201 |
-
3 => '700',
|
4202 |
-
),
|
4203 |
-
'Signika Negative' =>
|
4204 |
-
array(
|
4205 |
-
0 => '300',
|
4206 |
-
1 => 'regular',
|
4207 |
-
2 => '600',
|
4208 |
-
3 => '700',
|
4209 |
-
),
|
4210 |
-
'Simonetta' =>
|
4211 |
-
array(
|
4212 |
-
0 => 'regular',
|
4213 |
-
1 => 'italic',
|
4214 |
-
2 => '900',
|
4215 |
-
3 => '900italic',
|
4216 |
-
),
|
4217 |
-
'Sintony' =>
|
4218 |
-
array(
|
4219 |
-
0 => 'regular',
|
4220 |
-
1 => '700',
|
4221 |
-
),
|
4222 |
-
'Sirin Stencil' =>
|
4223 |
-
array(
|
4224 |
-
0 => 'regular',
|
4225 |
-
),
|
4226 |
-
'Six Caps' =>
|
4227 |
-
array(
|
4228 |
-
0 => 'regular',
|
4229 |
-
),
|
4230 |
-
'Skranji' =>
|
4231 |
-
array(
|
4232 |
-
0 => 'regular',
|
4233 |
-
1 => '700',
|
4234 |
-
),
|
4235 |
-
'Slabo 13px' =>
|
4236 |
-
array(
|
4237 |
-
0 => 'regular',
|
4238 |
-
),
|
4239 |
-
'Slabo 27px' =>
|
4240 |
-
array(
|
4241 |
-
0 => 'regular',
|
4242 |
-
),
|
4243 |
-
'Slackey' =>
|
4244 |
-
array(
|
4245 |
-
0 => 'regular',
|
4246 |
-
),
|
4247 |
-
'Smokum' =>
|
4248 |
-
array(
|
4249 |
-
0 => 'regular',
|
4250 |
-
),
|
4251 |
-
'Smythe' =>
|
4252 |
-
array(
|
4253 |
-
0 => 'regular',
|
4254 |
-
),
|
4255 |
-
'Sniglet' =>
|
4256 |
-
array(
|
4257 |
-
0 => 'regular',
|
4258 |
-
1 => '800',
|
4259 |
-
),
|
4260 |
-
'Snippet' =>
|
4261 |
-
array(
|
4262 |
-
0 => 'regular',
|
4263 |
-
),
|
4264 |
-
'Snowburst One' =>
|
4265 |
-
array(
|
4266 |
-
0 => 'regular',
|
4267 |
-
),
|
4268 |
-
'Sofadi One' =>
|
4269 |
-
array(
|
4270 |
-
0 => 'regular',
|
4271 |
-
),
|
4272 |
-
'Sofia' =>
|
4273 |
-
array(
|
4274 |
-
0 => 'regular',
|
4275 |
-
),
|
4276 |
-
'Sonsie One' =>
|
4277 |
-
array(
|
4278 |
-
0 => 'regular',
|
4279 |
-
),
|
4280 |
-
'Sorts Mill Goudy' =>
|
4281 |
-
array(
|
4282 |
-
0 => 'regular',
|
4283 |
-
1 => 'italic',
|
4284 |
-
),
|
4285 |
-
'Source Code Pro' =>
|
4286 |
-
array(
|
4287 |
-
0 => '200',
|
4288 |
-
1 => '300',
|
4289 |
-
2 => 'regular',
|
4290 |
-
3 => '500',
|
4291 |
-
4 => '600',
|
4292 |
-
5 => '700',
|
4293 |
-
6 => '900',
|
4294 |
-
),
|
4295 |
-
'Source Sans Pro' =>
|
4296 |
-
array(
|
4297 |
-
0 => '200',
|
4298 |
-
1 => '200italic',
|
4299 |
-
2 => '300',
|
4300 |
-
3 => '300italic',
|
4301 |
-
4 => 'regular',
|
4302 |
-
5 => 'italic',
|
4303 |
-
6 => '600',
|
4304 |
-
7 => '600italic',
|
4305 |
-
8 => '700',
|
4306 |
-
9 => '700italic',
|
4307 |
-
10 => '900',
|
4308 |
-
11 => '900italic',
|
4309 |
-
),
|
4310 |
-
'Source Serif Pro' =>
|
4311 |
-
array(
|
4312 |
-
0 => 'regular',
|
4313 |
-
1 => '600',
|
4314 |
-
2 => '700',
|
4315 |
-
),
|
4316 |
-
'Space Mono' =>
|
4317 |
-
array(
|
4318 |
-
0 => 'regular',
|
4319 |
-
1 => 'italic',
|
4320 |
-
2 => '700',
|
4321 |
-
3 => '700italic',
|
4322 |
-
),
|
4323 |
-
'Special Elite' =>
|
4324 |
-
array(
|
4325 |
-
0 => 'regular',
|
4326 |
-
),
|
4327 |
-
'Spectral' =>
|
4328 |
-
array(
|
4329 |
-
0 => '200',
|
4330 |
-
1 => '200italic',
|
4331 |
-
2 => '300',
|
4332 |
-
3 => '300italic',
|
4333 |
-
4 => 'regular',
|
4334 |
-
5 => 'italic',
|
4335 |
-
6 => '500',
|
4336 |
-
7 => '500italic',
|
4337 |
-
8 => '600',
|
4338 |
-
9 => '600italic',
|
4339 |
-
10 => '700',
|
4340 |
-
11 => '700italic',
|
4341 |
-
12 => '800',
|
4342 |
-
13 => '800italic',
|
4343 |
-
),
|
4344 |
-
'Spectral SC' =>
|
4345 |
-
array(
|
4346 |
-
0 => '200',
|
4347 |
-
1 => '200italic',
|
4348 |
-
2 => '300',
|
4349 |
-
3 => '300italic',
|
4350 |
-
4 => 'regular',
|
4351 |
-
5 => 'italic',
|
4352 |
-
6 => '500',
|
4353 |
-
7 => '500italic',
|
4354 |
-
8 => '600',
|
4355 |
-
9 => '600italic',
|
4356 |
-
10 => '700',
|
4357 |
-
11 => '700italic',
|
4358 |
-
12 => '800',
|
4359 |
-
13 => '800italic',
|
4360 |
-
),
|
4361 |
-
'Spicy Rice' =>
|
4362 |
-
array(
|
4363 |
-
0 => 'regular',
|
4364 |
-
),
|
4365 |
-
'Spinnaker' =>
|
4366 |
-
array(
|
4367 |
-
0 => 'regular',
|
4368 |
-
),
|
4369 |
-
'Spirax' =>
|
4370 |
-
array(
|
4371 |
-
0 => 'regular',
|
4372 |
-
),
|
4373 |
-
'Squada One' =>
|
4374 |
-
array(
|
4375 |
-
0 => 'regular',
|
4376 |
-
),
|
4377 |
-
'Sree Krushnadevaraya' =>
|
4378 |
-
array(
|
4379 |
-
0 => 'regular',
|
4380 |
-
),
|
4381 |
-
'Sriracha' =>
|
4382 |
-
array(
|
4383 |
-
0 => 'regular',
|
4384 |
-
),
|
4385 |
-
'Stalemate' =>
|
4386 |
-
array(
|
4387 |
-
0 => 'regular',
|
4388 |
-
),
|
4389 |
-
'Stalinist One' =>
|
4390 |
-
array(
|
4391 |
-
0 => 'regular',
|
4392 |
-
),
|
4393 |
-
'Stardos Stencil' =>
|
4394 |
-
array(
|
4395 |
-
0 => 'regular',
|
4396 |
-
1 => '700',
|
4397 |
-
),
|
4398 |
-
'Stint Ultra Condensed' =>
|
4399 |
-
array(
|
4400 |
-
0 => 'regular',
|
4401 |
-
),
|
4402 |
-
'Stint Ultra Expanded' =>
|
4403 |
-
array(
|
4404 |
-
0 => 'regular',
|
4405 |
-
),
|
4406 |
-
'Stoke' =>
|
4407 |
-
array(
|
4408 |
-
0 => '300',
|
4409 |
-
1 => 'regular',
|
4410 |
-
),
|
4411 |
-
'Strait' =>
|
4412 |
-
array(
|
4413 |
-
0 => 'regular',
|
4414 |
-
),
|
4415 |
-
'Sue Ellen Francisco' =>
|
4416 |
-
array(
|
4417 |
-
0 => 'regular',
|
4418 |
-
),
|
4419 |
-
'Suez One' =>
|
4420 |
-
array(
|
4421 |
-
0 => 'regular',
|
4422 |
-
),
|
4423 |
-
'Sumana' =>
|
4424 |
-
array(
|
4425 |
-
0 => 'regular',
|
4426 |
-
1 => '700',
|
4427 |
-
),
|
4428 |
-
'Sunshiney' =>
|
4429 |
-
array(
|
4430 |
-
0 => 'regular',
|
4431 |
-
),
|
4432 |
-
'Supermercado One' =>
|
4433 |
-
array(
|
4434 |
-
0 => 'regular',
|
4435 |
-
),
|
4436 |
-
'Sura' =>
|
4437 |
-
array(
|
4438 |
-
0 => 'regular',
|
4439 |
-
1 => '700',
|
4440 |
-
),
|
4441 |
-
'Suranna' =>
|
4442 |
-
array(
|
4443 |
-
0 => 'regular',
|
4444 |
-
),
|
4445 |
-
'Suravaram' =>
|
4446 |
-
array(
|
4447 |
-
0 => 'regular',
|
4448 |
-
),
|
4449 |
-
'Suwannaphum' =>
|
4450 |
-
array(
|
4451 |
-
0 => 'regular',
|
4452 |
-
),
|
4453 |
-
'Swanky and Moo Moo' =>
|
4454 |
-
array(
|
4455 |
-
0 => 'regular',
|
4456 |
-
),
|
4457 |
-
'Syncopate' =>
|
4458 |
-
array(
|
4459 |
-
0 => 'regular',
|
4460 |
-
1 => '700',
|
4461 |
-
),
|
4462 |
-
'Tangerine' =>
|
4463 |
-
array(
|
4464 |
-
0 => 'regular',
|
4465 |
-
1 => '700',
|
4466 |
-
),
|
4467 |
-
'Taprom' =>
|
4468 |
-
array(
|
4469 |
-
0 => 'regular',
|
4470 |
-
),
|
4471 |
-
'Tauri' =>
|
4472 |
-
array(
|
4473 |
-
0 => 'regular',
|
4474 |
-
),
|
4475 |
-
'Taviraj' =>
|
4476 |
-
array(
|
4477 |
-
0 => '100',
|
4478 |
-
1 => '100italic',
|
4479 |
-
2 => '200',
|
4480 |
-
3 => '200italic',
|
4481 |
-
4 => '300',
|
4482 |
-
5 => '300italic',
|
4483 |
-
6 => 'regular',
|
4484 |
-
7 => 'italic',
|
4485 |
-
8 => '500',
|
4486 |
-
9 => '500italic',
|
4487 |
-
10 => '600',
|
4488 |
-
11 => '600italic',
|
4489 |
-
12 => '700',
|
4490 |
-
13 => '700italic',
|
4491 |
-
14 => '800',
|
4492 |
-
15 => '800italic',
|
4493 |
-
16 => '900',
|
4494 |
-
17 => '900italic',
|
4495 |
-
),
|
4496 |
-
'Teko' =>
|
4497 |
-
array(
|
4498 |
-
0 => '300',
|
4499 |
-
1 => 'regular',
|
4500 |
-
2 => '500',
|
4501 |
-
3 => '600',
|
4502 |
-
4 => '700',
|
4503 |
-
),
|
4504 |
-
'Telex' =>
|
4505 |
-
array(
|
4506 |
-
0 => 'regular',
|
4507 |
-
),
|
4508 |
-
'Tenali Ramakrishna' =>
|
4509 |
-
array(
|
4510 |
-
0 => 'regular',
|
4511 |
-
),
|
4512 |
-
'Tenor Sans' =>
|
4513 |
-
array(
|
4514 |
-
0 => 'regular',
|
4515 |
-
),
|
4516 |
-
'Text Me One' =>
|
4517 |
-
array(
|
4518 |
-
0 => 'regular',
|
4519 |
-
),
|
4520 |
-
'The Girl Next Door' =>
|
4521 |
-
array(
|
4522 |
-
0 => 'regular',
|
4523 |
-
),
|
4524 |
-
'Tienne' =>
|
4525 |
-
array(
|
4526 |
-
0 => 'regular',
|
4527 |
-
1 => '700',
|
4528 |
-
2 => '900',
|
4529 |
-
),
|
4530 |
-
'Tillana' =>
|
4531 |
-
array(
|
4532 |
-
0 => 'regular',
|
4533 |
-
1 => '500',
|
4534 |
-
2 => '600',
|
4535 |
-
3 => '700',
|
4536 |
-
4 => '800',
|
4537 |
-
),
|
4538 |
-
'Timmana' =>
|
4539 |
-
array(
|
4540 |
-
0 => 'regular',
|
4541 |
-
),
|
4542 |
-
'Tinos' =>
|
4543 |
-
array(
|
4544 |
-
0 => 'regular',
|
4545 |
-
1 => 'italic',
|
4546 |
-
2 => '700',
|
4547 |
-
3 => '700italic',
|
4548 |
-
),
|
4549 |
-
'Titan One' =>
|
4550 |
-
array(
|
4551 |
-
0 => 'regular',
|
4552 |
-
),
|
4553 |
-
'Titillium Web' =>
|
4554 |
-
array(
|
4555 |
-
0 => '200',
|
4556 |
-
1 => '200italic',
|
4557 |
-
2 => '300',
|
4558 |
-
3 => '300italic',
|
4559 |
-
4 => 'regular',
|
4560 |
-
5 => 'italic',
|
4561 |
-
6 => '600',
|
4562 |
-
7 => '600italic',
|
4563 |
-
8 => '700',
|
4564 |
-
9 => '700italic',
|
4565 |
-
10 => '900',
|
4566 |
-
),
|
4567 |
-
'Trade Winds' =>
|
4568 |
-
array(
|
4569 |
-
0 => 'regular',
|
4570 |
-
),
|
4571 |
-
'Trirong' =>
|
4572 |
-
array(
|
4573 |
-
0 => '100',
|
4574 |
-
1 => '100italic',
|
4575 |
-
2 => '200',
|
4576 |
-
3 => '200italic',
|
4577 |
-
4 => '300',
|
4578 |
-
5 => '300italic',
|
4579 |
-
6 => 'regular',
|
4580 |
-
7 => 'italic',
|
4581 |
-
8 => '500',
|
4582 |
-
9 => '500italic',
|
4583 |
-
10 => '600',
|
4584 |
-
11 => '600italic',
|
4585 |
-
12 => '700',
|
4586 |
-
13 => '700italic',
|
4587 |
-
14 => '800',
|
4588 |
-
15 => '800italic',
|
4589 |
-
16 => '900',
|
4590 |
-
17 => '900italic',
|
4591 |
-
),
|
4592 |
-
'Trocchi' =>
|
4593 |
-
array(
|
4594 |
-
0 => 'regular',
|
4595 |
-
),
|
4596 |
-
'Trochut' =>
|
4597 |
-
array(
|
4598 |
-
0 => 'regular',
|
4599 |
-
1 => 'italic',
|
4600 |
-
2 => '700',
|
4601 |
-
),
|
4602 |
-
'Trykker' =>
|
4603 |
-
array(
|
4604 |
-
0 => 'regular',
|
4605 |
-
),
|
4606 |
-
'Tulpen One' =>
|
4607 |
-
array(
|
4608 |
-
0 => 'regular',
|
4609 |
-
),
|
4610 |
-
'Ubuntu' =>
|
4611 |
-
array(
|
4612 |
-
0 => '300',
|
4613 |
-
1 => '300italic',
|
4614 |
-
2 => 'regular',
|
4615 |
-
3 => 'italic',
|
4616 |
-
4 => '500',
|
4617 |
-
5 => '500italic',
|
4618 |
-
6 => '700',
|
4619 |
-
7 => '700italic',
|
4620 |
-
),
|
4621 |
-
'Ubuntu Condensed' =>
|
4622 |
-
array(
|
4623 |
-
0 => 'regular',
|
4624 |
-
),
|
4625 |
-
'Ubuntu Mono' =>
|
4626 |
-
array(
|
4627 |
-
0 => 'regular',
|
4628 |
-
1 => 'italic',
|
4629 |
-
2 => '700',
|
4630 |
-
3 => '700italic',
|
4631 |
-
),
|
4632 |
-
'Ultra' =>
|
4633 |
-
array(
|
4634 |
-
0 => 'regular',
|
4635 |
-
),
|
4636 |
-
'Uncial Antiqua' =>
|
4637 |
-
array(
|
4638 |
-
0 => 'regular',
|
4639 |
-
),
|
4640 |
-
'Underdog' =>
|
4641 |
-
array(
|
4642 |
-
0 => 'regular',
|
4643 |
-
),
|
4644 |
-
'Unica One' =>
|
4645 |
-
array(
|
4646 |
-
0 => 'regular',
|
4647 |
-
),
|
4648 |
-
'UnifrakturCook' =>
|
4649 |
-
array(
|
4650 |
-
0 => '700',
|
4651 |
-
),
|
4652 |
-
'UnifrakturMaguntia' =>
|
4653 |
-
array(
|
4654 |
-
0 => 'regular',
|
4655 |
-
),
|
4656 |
-
'Unkempt' =>
|
4657 |
-
array(
|
4658 |
-
0 => 'regular',
|
4659 |
-
1 => '700',
|
4660 |
-
),
|
4661 |
-
'Unlock' =>
|
4662 |
-
array(
|
4663 |
-
0 => 'regular',
|
4664 |
-
),
|
4665 |
-
'Unna' =>
|
4666 |
-
array(
|
4667 |
-
0 => 'regular',
|
4668 |
-
1 => 'italic',
|
4669 |
-
2 => '700',
|
4670 |
-
3 => '700italic',
|
4671 |
-
),
|
4672 |
-
'VT323' =>
|
4673 |
-
array(
|
4674 |
-
0 => 'regular',
|
4675 |
-
),
|
4676 |
-
'Vampiro One' =>
|
4677 |
-
array(
|
4678 |
-
0 => 'regular',
|
4679 |
-
),
|
4680 |
-
'Varela' =>
|
4681 |
-
array(
|
4682 |
-
0 => 'regular',
|
4683 |
-
),
|
4684 |
-
'Varela Round' =>
|
4685 |
-
array(
|
4686 |
-
0 => 'regular',
|
4687 |
-
),
|
4688 |
-
'Vast Shadow' =>
|
4689 |
-
array(
|
4690 |
-
0 => 'regular',
|
4691 |
-
),
|
4692 |
-
'Vesper Libre' =>
|
4693 |
-
array(
|
4694 |
-
0 => 'regular',
|
4695 |
-
1 => '500',
|
4696 |
-
2 => '700',
|
4697 |
-
3 => '900',
|
4698 |
-
),
|
4699 |
-
'Vibur' =>
|
4700 |
-
array(
|
4701 |
-
0 => 'regular',
|
4702 |
-
),
|
4703 |
-
'Vidaloka' =>
|
4704 |
-
array(
|
4705 |
-
0 => 'regular',
|
4706 |
-
),
|
4707 |
-
'Viga' =>
|
4708 |
-
array(
|
4709 |
-
0 => 'regular',
|
4710 |
-
),
|
4711 |
-
'Voces' =>
|
4712 |
-
array(
|
4713 |
-
0 => 'regular',
|
4714 |
-
),
|
4715 |
-
'Volkhov' =>
|
4716 |
-
array(
|
4717 |
-
0 => 'regular',
|
4718 |
-
1 => 'italic',
|
4719 |
-
2 => '700',
|
4720 |
-
3 => '700italic',
|
4721 |
-
),
|
4722 |
-
'Vollkorn' =>
|
4723 |
-
array(
|
4724 |
-
0 => 'regular',
|
4725 |
-
1 => 'italic',
|
4726 |
-
2 => '600',
|
4727 |
-
3 => '600italic',
|
4728 |
-
4 => '700',
|
4729 |
-
5 => '700italic',
|
4730 |
-
6 => '900',
|
4731 |
-
7 => '900italic',
|
4732 |
-
),
|
4733 |
-
'Vollkorn SC' =>
|
4734 |
-
array(
|
4735 |
-
0 => 'regular',
|
4736 |
-
1 => '600',
|
4737 |
-
2 => '700',
|
4738 |
-
3 => '900',
|
4739 |
-
),
|
4740 |
-
'Voltaire' =>
|
4741 |
-
array(
|
4742 |
-
0 => 'regular',
|
4743 |
-
),
|
4744 |
-
'Waiting for the Sunrise' =>
|
4745 |
-
array(
|
4746 |
-
0 => 'regular',
|
4747 |
-
),
|
4748 |
-
'Wallpoet' =>
|
4749 |
-
array(
|
4750 |
-
0 => 'regular',
|
4751 |
-
),
|
4752 |
-
'Walter Turncoat' =>
|
4753 |
-
array(
|
4754 |
-
0 => 'regular',
|
4755 |
-
),
|
4756 |
-
'Warnes' =>
|
4757 |
-
array(
|
4758 |
-
0 => 'regular',
|
4759 |
-
),
|
4760 |
-
'Wellfleet' =>
|
4761 |
-
array(
|
4762 |
-
0 => 'regular',
|
4763 |
-
),
|
4764 |
-
'Wendy One' =>
|
4765 |
-
array(
|
4766 |
-
0 => 'regular',
|
4767 |
-
),
|
4768 |
-
'Wire One' =>
|
4769 |
-
array(
|
4770 |
-
0 => 'regular',
|
4771 |
-
),
|
4772 |
-
'Work Sans' =>
|
4773 |
-
array(
|
4774 |
-
0 => '100',
|
4775 |
-
1 => '200',
|
4776 |
-
2 => '300',
|
4777 |
-
3 => 'regular',
|
4778 |
-
4 => '500',
|
4779 |
-
5 => '600',
|
4780 |
-
6 => '700',
|
4781 |
-
7 => '800',
|
4782 |
-
8 => '900',
|
4783 |
-
),
|
4784 |
-
'Yanone Kaffeesatz' =>
|
4785 |
-
array(
|
4786 |
-
0 => '200',
|
4787 |
-
1 => '300',
|
4788 |
-
2 => 'regular',
|
4789 |
-
3 => '700',
|
4790 |
-
),
|
4791 |
-
'Yantramanav' =>
|
4792 |
-
array(
|
4793 |
-
0 => '100',
|
4794 |
-
1 => '300',
|
4795 |
-
2 => 'regular',
|
4796 |
-
3 => '500',
|
4797 |
-
4 => '700',
|
4798 |
-
5 => '900',
|
4799 |
-
),
|
4800 |
-
'Yatra One' =>
|
4801 |
-
array(
|
4802 |
-
0 => 'regular',
|
4803 |
-
),
|
4804 |
-
'Yellowtail' =>
|
4805 |
-
array(
|
4806 |
-
0 => 'regular',
|
4807 |
-
),
|
4808 |
-
'Yeseva One' =>
|
4809 |
-
array(
|
4810 |
-
0 => 'regular',
|
4811 |
-
),
|
4812 |
-
'Yesteryear' =>
|
4813 |
-
array(
|
4814 |
-
0 => 'regular',
|
4815 |
-
),
|
4816 |
-
'Yrsa' =>
|
4817 |
-
array(
|
4818 |
-
0 => '300',
|
4819 |
-
1 => 'regular',
|
4820 |
-
2 => '500',
|
4821 |
-
3 => '600',
|
4822 |
-
4 => '700',
|
4823 |
-
),
|
4824 |
-
'Zeyada' =>
|
4825 |
-
array(
|
4826 |
-
0 => 'regular',
|
4827 |
-
),
|
4828 |
-
'Zilla Slab' =>
|
4829 |
-
array(
|
4830 |
-
0 => '300',
|
4831 |
-
1 => '300italic',
|
4832 |
-
2 => 'regular',
|
4833 |
-
3 => 'italic',
|
4834 |
-
4 => '500',
|
4835 |
-
5 => '500italic',
|
4836 |
-
6 => '600',
|
4837 |
-
7 => '600italic',
|
4838 |
-
8 => '700',
|
4839 |
-
9 => '700italic',
|
4840 |
-
),
|
4841 |
-
'Zilla Slab Highlight' =>
|
4842 |
-
array(
|
4843 |
-
0 => 'regular',
|
4844 |
-
1 => '700',
|
4845 |
-
),
|
4846 |
-
);
|
1 |
+
<?php
|
2 |
+
|
3 |
+
return array(
|
4 |
+
'ABeeZee' =>
|
5 |
+
array(
|
6 |
+
0 => 'regular',
|
7 |
+
1 => 'italic',
|
8 |
+
),
|
9 |
+
'Abel' =>
|
10 |
+
array(
|
11 |
+
0 => 'regular',
|
12 |
+
),
|
13 |
+
'Abhaya Libre' =>
|
14 |
+
array(
|
15 |
+
0 => 'regular',
|
16 |
+
1 => '500',
|
17 |
+
2 => '600',
|
18 |
+
3 => '700',
|
19 |
+
4 => '800',
|
20 |
+
),
|
21 |
+
'Abril Fatface' =>
|
22 |
+
array(
|
23 |
+
0 => 'regular',
|
24 |
+
),
|
25 |
+
'Aclonica' =>
|
26 |
+
array(
|
27 |
+
0 => 'regular',
|
28 |
+
),
|
29 |
+
'Acme' =>
|
30 |
+
array(
|
31 |
+
0 => 'regular',
|
32 |
+
),
|
33 |
+
'Actor' =>
|
34 |
+
array(
|
35 |
+
0 => 'regular',
|
36 |
+
),
|
37 |
+
'Adamina' =>
|
38 |
+
array(
|
39 |
+
0 => 'regular',
|
40 |
+
),
|
41 |
+
'Advent Pro' =>
|
42 |
+
array(
|
43 |
+
0 => '100',
|
44 |
+
1 => '200',
|
45 |
+
2 => '300',
|
46 |
+
3 => 'regular',
|
47 |
+
4 => '500',
|
48 |
+
5 => '600',
|
49 |
+
6 => '700',
|
50 |
+
),
|
51 |
+
'Aguafina Script' =>
|
52 |
+
array(
|
53 |
+
0 => 'regular',
|
54 |
+
),
|
55 |
+
'Akronim' =>
|
56 |
+
array(
|
57 |
+
0 => 'regular',
|
58 |
+
),
|
59 |
+
'Aladin' =>
|
60 |
+
array(
|
61 |
+
0 => 'regular',
|
62 |
+
),
|
63 |
+
'Aldrich' =>
|
64 |
+
array(
|
65 |
+
0 => 'regular',
|
66 |
+
),
|
67 |
+
'Alef' =>
|
68 |
+
array(
|
69 |
+
0 => 'regular',
|
70 |
+
1 => '700',
|
71 |
+
),
|
72 |
+
'Alegreya' =>
|
73 |
+
array(
|
74 |
+
0 => 'regular',
|
75 |
+
1 => 'italic',
|
76 |
+
2 => '500',
|
77 |
+
3 => '500italic',
|
78 |
+
4 => '700',
|
79 |
+
5 => '700italic',
|
80 |
+
6 => '800',
|
81 |
+
7 => '800italic',
|
82 |
+
8 => '900',
|
83 |
+
9 => '900italic',
|
84 |
+
),
|
85 |
+
'Alegreya SC' =>
|
86 |
+
array(
|
87 |
+
0 => 'regular',
|
88 |
+
1 => 'italic',
|
89 |
+
2 => '500',
|
90 |
+
3 => '500italic',
|
91 |
+
4 => '700',
|
92 |
+
5 => '700italic',
|
93 |
+
6 => '800',
|
94 |
+
7 => '800italic',
|
95 |
+
8 => '900',
|
96 |
+
9 => '900italic',
|
97 |
+
),
|
98 |
+
'Alegreya Sans' =>
|
99 |
+
array(
|
100 |
+
0 => '100',
|
101 |
+
1 => '100italic',
|
102 |
+
2 => '300',
|
103 |
+
3 => '300italic',
|
104 |
+
4 => 'regular',
|
105 |
+
5 => 'italic',
|
106 |
+
6 => '500',
|
107 |
+
7 => '500italic',
|
108 |
+
8 => '700',
|
109 |
+
9 => '700italic',
|
110 |
+
10 => '800',
|
111 |
+
11 => '800italic',
|
112 |
+
12 => '900',
|
113 |
+
13 => '900italic',
|
114 |
+
),
|
115 |
+
'Alegreya Sans SC' =>
|
116 |
+
array(
|
117 |
+
0 => '100',
|
118 |
+
1 => '100italic',
|
119 |
+
2 => '300',
|
120 |
+
3 => '300italic',
|
121 |
+
4 => 'regular',
|
122 |
+
5 => 'italic',
|
123 |
+
6 => '500',
|
124 |
+
7 => '500italic',
|
125 |
+
8 => '700',
|
126 |
+
9 => '700italic',
|
127 |
+
10 => '800',
|
128 |
+
11 => '800italic',
|
129 |
+
12 => '900',
|
130 |
+
13 => '900italic',
|
131 |
+
),
|
132 |
+
'Alex Brush' =>
|
133 |
+
array(
|
134 |
+
0 => 'regular',
|
135 |
+
),
|
136 |
+
'Alfa Slab One' =>
|
137 |
+
array(
|
138 |
+
0 => 'regular',
|
139 |
+
),
|
140 |
+
'Alice' =>
|
141 |
+
array(
|
142 |
+
0 => 'regular',
|
143 |
+
),
|
144 |
+
'Alike' =>
|
145 |
+
array(
|
146 |
+
0 => 'regular',
|
147 |
+
),
|
148 |
+
'Alike Angular' =>
|
149 |
+
array(
|
150 |
+
0 => 'regular',
|
151 |
+
),
|
152 |
+
'Allan' =>
|
153 |
+
array(
|
154 |
+
0 => 'regular',
|
155 |
+
1 => '700',
|
156 |
+
),
|
157 |
+
'Allerta' =>
|
158 |
+
array(
|
159 |
+
0 => 'regular',
|
160 |
+
),
|
161 |
+
'Allerta Stencil' =>
|
162 |
+
array(
|
163 |
+
0 => 'regular',
|
164 |
+
),
|
165 |
+
'Allura' =>
|
166 |
+
array(
|
167 |
+
0 => 'regular',
|
168 |
+
),
|
169 |
+
'Almendra' =>
|
170 |
+
array(
|
171 |
+
0 => 'regular',
|
172 |
+
1 => 'italic',
|
173 |
+
2 => '700',
|
174 |
+
3 => '700italic',
|
175 |
+
),
|
176 |
+
'Almendra Display' =>
|
177 |
+
array(
|
178 |
+
0 => 'regular',
|
179 |
+
),
|
180 |
+
'Almendra SC' =>
|
181 |
+
array(
|
182 |
+
0 => 'regular',
|
183 |
+
),
|
184 |
+
'Amarante' =>
|
185 |
+
array(
|
186 |
+
0 => 'regular',
|
187 |
+
),
|
188 |
+
'Amaranth' =>
|
189 |
+
array(
|
190 |
+
0 => 'regular',
|
191 |
+
1 => 'italic',
|
192 |
+
2 => '700',
|
193 |
+
3 => '700italic',
|
194 |
+
),
|
195 |
+
'Amatic SC' =>
|
196 |
+
array(
|
197 |
+
0 => 'regular',
|
198 |
+
1 => '700',
|
199 |
+
),
|
200 |
+
'Amethysta' =>
|
201 |
+
array(
|
202 |
+
0 => 'regular',
|
203 |
+
),
|
204 |
+
'Amiko' =>
|
205 |
+
array(
|
206 |
+
0 => 'regular',
|
207 |
+
1 => '600',
|
208 |
+
2 => '700',
|
209 |
+
),
|
210 |
+
'Amiri' =>
|
211 |
+
array(
|
212 |
+
0 => 'regular',
|
213 |
+
1 => 'italic',
|
214 |
+
2 => '700',
|
215 |
+
3 => '700italic',
|
216 |
+
),
|
217 |
+
'Amita' =>
|
218 |
+
array(
|
219 |
+
0 => 'regular',
|
220 |
+
1 => '700',
|
221 |
+
),
|
222 |
+
'Anaheim' =>
|
223 |
+
array(
|
224 |
+
0 => 'regular',
|
225 |
+
),
|
226 |
+
'Andada' =>
|
227 |
+
array(
|
228 |
+
0 => 'regular',
|
229 |
+
),
|
230 |
+
'Andika' =>
|
231 |
+
array(
|
232 |
+
0 => 'regular',
|
233 |
+
),
|
234 |
+
'Angkor' =>
|
235 |
+
array(
|
236 |
+
0 => 'regular',
|
237 |
+
),
|
238 |
+
'Annie Use Your Telescope' =>
|
239 |
+
array(
|
240 |
+
0 => 'regular',
|
241 |
+
),
|
242 |
+
'Anonymous Pro' =>
|
243 |
+
array(
|
244 |
+
0 => 'regular',
|
245 |
+
1 => 'italic',
|
246 |
+
2 => '700',
|
247 |
+
3 => '700italic',
|
248 |
+
),
|
249 |
+
'Antic' =>
|
250 |
+
array(
|
251 |
+
0 => 'regular',
|
252 |
+
),
|
253 |
+
'Antic Didone' =>
|
254 |
+
array(
|
255 |
+
0 => 'regular',
|
256 |
+
),
|
257 |
+
'Antic Slab' =>
|
258 |
+
array(
|
259 |
+
0 => 'regular',
|
260 |
+
),
|
261 |
+
'Anton' =>
|
262 |
+
array(
|
263 |
+
0 => 'regular',
|
264 |
+
),
|
265 |
+
'Arapey' =>
|
266 |
+
array(
|
267 |
+
0 => 'regular',
|
268 |
+
1 => 'italic',
|
269 |
+
),
|
270 |
+
'Arbutus' =>
|
271 |
+
array(
|
272 |
+
0 => 'regular',
|
273 |
+
),
|
274 |
+
'Arbutus Slab' =>
|
275 |
+
array(
|
276 |
+
0 => 'regular',
|
277 |
+
),
|
278 |
+
'Architects Daughter' =>
|
279 |
+
array(
|
280 |
+
0 => 'regular',
|
281 |
+
),
|
282 |
+
'Archivo' =>
|
283 |
+
array(
|
284 |
+
0 => 'regular',
|
285 |
+
1 => 'italic',
|
286 |
+
2 => '500',
|
287 |
+
3 => '500italic',
|
288 |
+
4 => '600',
|
289 |
+
5 => '600italic',
|
290 |
+
6 => '700',
|
291 |
+
7 => '700italic',
|
292 |
+
),
|
293 |
+
'Archivo Black' =>
|
294 |
+
array(
|
295 |
+
0 => 'regular',
|
296 |
+
),
|
297 |
+
'Archivo Narrow' =>
|
298 |
+
array(
|
299 |
+
0 => 'regular',
|
300 |
+
1 => 'italic',
|
301 |
+
2 => '500',
|
302 |
+
3 => '500italic',
|
303 |
+
4 => '600',
|
304 |
+
5 => '600italic',
|
305 |
+
6 => '700',
|
306 |
+
7 => '700italic',
|
307 |
+
),
|
308 |
+
'Aref Ruqaa' =>
|
309 |
+
array(
|
310 |
+
0 => 'regular',
|
311 |
+
1 => '700',
|
312 |
+
),
|
313 |
+
'Arima Madurai' =>
|
314 |
+
array(
|
315 |
+
0 => '100',
|
316 |
+
1 => '200',
|
317 |
+
2 => '300',
|
318 |
+
3 => 'regular',
|
319 |
+
4 => '500',
|
320 |
+
5 => '700',
|
321 |
+
6 => '800',
|
322 |
+
7 => '900',
|
323 |
+
),
|
324 |
+
'Arimo' =>
|
325 |
+
array(
|
326 |
+
0 => 'regular',
|
327 |
+
1 => 'italic',
|
328 |
+
2 => '700',
|
329 |
+
3 => '700italic',
|
330 |
+
),
|
331 |
+
'Arizonia' =>
|
332 |
+
array(
|
333 |
+
0 => 'regular',
|
334 |
+
),
|
335 |
+
'Armata' =>
|
336 |
+
array(
|
337 |
+
0 => 'regular',
|
338 |
+
),
|
339 |
+
'Arsenal' =>
|
340 |
+
array(
|
341 |
+
0 => 'regular',
|
342 |
+
1 => 'italic',
|
343 |
+
2 => '700',
|
344 |
+
3 => '700italic',
|
345 |
+
),
|
346 |
+
'Artifika' =>
|
347 |
+
array(
|
348 |
+
0 => 'regular',
|
349 |
+
),
|
350 |
+
'Arvo' =>
|
351 |
+
array(
|
352 |
+
0 => 'regular',
|
353 |
+
1 => 'italic',
|
354 |
+
2 => '700',
|
355 |
+
3 => '700italic',
|
356 |
+
),
|
357 |
+
'Arya' =>
|
358 |
+
array(
|
359 |
+
0 => 'regular',
|
360 |
+
1 => '700',
|
361 |
+
),
|
362 |
+
'Asap' =>
|
363 |
+
array(
|
364 |
+
0 => 'regular',
|
365 |
+
1 => 'italic',
|
366 |
+
2 => '500',
|
367 |
+
3 => '500italic',
|
368 |
+
4 => '600',
|
369 |
+
5 => '600italic',
|
370 |
+
6 => '700',
|
371 |
+
7 => '700italic',
|
372 |
+
),
|
373 |
+
'Asap Condensed' =>
|
374 |
+
array(
|
375 |
+
0 => 'regular',
|
376 |
+
1 => 'italic',
|
377 |
+
2 => '500',
|
378 |
+
3 => '500italic',
|
379 |
+
4 => '600',
|
380 |
+
5 => '600italic',
|
381 |
+
6 => '700',
|
382 |
+
7 => '700italic',
|
383 |
+
),
|
384 |
+
'Asar' =>
|
385 |
+
array(
|
386 |
+
0 => 'regular',
|
387 |
+
),
|
388 |
+
'Asset' =>
|
389 |
+
array(
|
390 |
+
0 => 'regular',
|
391 |
+
),
|
392 |
+
'Assistant' =>
|
393 |
+
array(
|
394 |
+
0 => '200',
|
395 |
+
1 => '300',
|
396 |
+
2 => 'regular',
|
397 |
+
3 => '600',
|
398 |
+
4 => '700',
|
399 |
+
5 => '800',
|
400 |
+
),
|
401 |
+
'Astloch' =>
|
402 |
+
array(
|
403 |
+
0 => 'regular',
|
404 |
+
1 => '700',
|
405 |
+
),
|
406 |
+
'Asul' =>
|
407 |
+
array(
|
408 |
+
0 => 'regular',
|
409 |
+
1 => '700',
|
410 |
+
),
|
411 |
+
'Athiti' =>
|
412 |
+
array(
|
413 |
+
0 => '200',
|
414 |
+
1 => '300',
|
415 |
+
2 => 'regular',
|
416 |
+
3 => '500',
|
417 |
+
4 => '600',
|
418 |
+
5 => '700',
|
419 |
+
),
|
420 |
+
'Atma' =>
|
421 |
+
array(
|
422 |
+
0 => '300',
|
423 |
+
1 => 'regular',
|
424 |
+
2 => '500',
|
425 |
+
3 => '600',
|
426 |
+
4 => '700',
|
427 |
+
),
|
428 |
+
'Atomic Age' =>
|
429 |
+
array(
|
430 |
+
0 => 'regular',
|
431 |
+
),
|
432 |
+
'Aubrey' =>
|
433 |
+
array(
|
434 |
+
0 => 'regular',
|
435 |
+
),
|
436 |
+
'Audiowide' =>
|
437 |
+
array(
|
438 |
+
0 => 'regular',
|
439 |
+
),
|
440 |
+
'Autour One' =>
|
441 |
+
array(
|
442 |
+
0 => 'regular',
|
443 |
+
),
|
444 |
+
'Average' =>
|
445 |
+
array(
|
446 |
+
0 => 'regular',
|
447 |
+
),
|
448 |
+
'Average Sans' =>
|
449 |
+
array(
|
450 |
+
0 => 'regular',
|
451 |
+
),
|
452 |
+
'Averia Gruesa Libre' =>
|
453 |
+
array(
|
454 |
+
0 => 'regular',
|
455 |
+
),
|
456 |
+
'Averia Libre' =>
|
457 |
+
array(
|
458 |
+
0 => '300',
|
459 |
+
1 => '300italic',
|
460 |
+
2 => 'regular',
|
461 |
+
3 => 'italic',
|
462 |
+
4 => '700',
|
463 |
+
5 => '700italic',
|
464 |
+
),
|
465 |
+
'Averia Sans Libre' =>
|
466 |
+
array(
|
467 |
+
0 => '300',
|
468 |
+
1 => '300italic',
|
469 |
+
2 => 'regular',
|
470 |
+
3 => 'italic',
|
471 |
+
4 => '700',
|
472 |
+
5 => '700italic',
|
473 |
+
),
|
474 |
+
'Averia Serif Libre' =>
|
475 |
+
array(
|
476 |
+
0 => '300',
|
477 |
+
1 => '300italic',
|
478 |
+
2 => 'regular',
|
479 |
+
3 => 'italic',
|
480 |
+
4 => '700',
|
481 |
+
5 => '700italic',
|
482 |
+
),
|
483 |
+
'Bad Script' =>
|
484 |
+
array(
|
485 |
+
0 => 'regular',
|
486 |
+
),
|
487 |
+
'Bahiana' =>
|
488 |
+
array(
|
489 |
+
0 => 'regular',
|
490 |
+
),
|
491 |
+
'Baloo' =>
|
492 |
+
array(
|
493 |
+
0 => 'regular',
|
494 |
+
),
|
495 |
+
'Baloo Bhai' =>
|
496 |
+
array(
|
497 |
+
0 => 'regular',
|
498 |
+
),
|
499 |
+
'Baloo Bhaijaan' =>
|
500 |
+
array(
|
501 |
+
0 => 'regular',
|
502 |
+
),
|
503 |
+
'Baloo Bhaina' =>
|
504 |
+
array(
|
505 |
+
0 => 'regular',
|
506 |
+
),
|
507 |
+
'Baloo Chettan' =>
|
508 |
+
array(
|
509 |
+
0 => 'regular',
|
510 |
+
),
|
511 |
+
'Baloo Da' =>
|
512 |
+
array(
|
513 |
+
0 => 'regular',
|
514 |
+
),
|
515 |
+
'Baloo Paaji' =>
|
516 |
+
array(
|
517 |
+
0 => 'regular',
|
518 |
+
),
|
519 |
+
'Baloo Tamma' =>
|
520 |
+
array(
|
521 |
+
0 => 'regular',
|
522 |
+
),
|
523 |
+
'Baloo Tammudu' =>
|
524 |
+
array(
|
525 |
+
0 => 'regular',
|
526 |
+
),
|
527 |
+
'Baloo Thambi' =>
|
528 |
+
array(
|
529 |
+
0 => 'regular',
|
530 |
+
),
|
531 |
+
'Balthazar' =>
|
532 |
+
array(
|
533 |
+
0 => 'regular',
|
534 |
+
),
|
535 |
+
'Bangers' =>
|
536 |
+
array(
|
537 |
+
0 => 'regular',
|
538 |
+
),
|
539 |
+
'Barlow' =>
|
540 |
+
array(
|
541 |
+
0 => '100',
|
542 |
+
1 => '100italic',
|
543 |
+
2 => '200',
|
544 |
+
3 => '200italic',
|
545 |
+
4 => '300',
|
546 |
+
5 => '300italic',
|
547 |
+
6 => 'regular',
|
548 |
+
7 => 'italic',
|
549 |
+
8 => '500',
|
550 |
+
9 => '500italic',
|
551 |
+
10 => '600',
|
552 |
+
11 => '600italic',
|
553 |
+
12 => '700',
|
554 |
+
13 => '700italic',
|
555 |
+
14 => '800',
|
556 |
+
15 => '800italic',
|
557 |
+
16 => '900',
|
558 |
+
17 => '900italic',
|
559 |
+
),
|
560 |
+
'Barlow Condensed' =>
|
561 |
+
array(
|
562 |
+
0 => '100',
|
563 |
+
1 => '100italic',
|
564 |
+
2 => '200',
|
565 |
+
3 => '200italic',
|
566 |
+
4 => '300',
|
567 |
+
5 => '300italic',
|
568 |
+
6 => 'regular',
|
569 |
+
7 => 'italic',
|
570 |
+
8 => '500',
|
571 |
+
9 => '500italic',
|
572 |
+
10 => '600',
|
573 |
+
11 => '600italic',
|
574 |
+
12 => '700',
|
575 |
+
13 => '700italic',
|
576 |
+
14 => '800',
|
577 |
+
15 => '800italic',
|
578 |
+
16 => '900',
|
579 |
+
17 => '900italic',
|
580 |
+
),
|
581 |
+
'Barlow Semi Condensed' =>
|
582 |
+
array(
|
583 |
+
0 => '100',
|
584 |
+
1 => '100italic',
|
585 |
+
2 => '200',
|
586 |
+
3 => '200italic',
|
587 |
+
4 => '300',
|
588 |
+
5 => '300italic',
|
589 |
+
6 => 'regular',
|
590 |
+
7 => 'italic',
|
591 |
+
8 => '500',
|
592 |
+
9 => '500italic',
|
593 |
+
10 => '600',
|
594 |
+
11 => '600italic',
|
595 |
+
12 => '700',
|
596 |
+
13 => '700italic',
|
597 |
+
14 => '800',
|
598 |
+
15 => '800italic',
|
599 |
+
16 => '900',
|
600 |
+
17 => '900italic',
|
601 |
+
),
|
602 |
+
'Barrio' =>
|
603 |
+
array(
|
604 |
+
0 => 'regular',
|
605 |
+
),
|
606 |
+
'Basic' =>
|
607 |
+
array(
|
608 |
+
0 => 'regular',
|
609 |
+
),
|
610 |
+
'Battambang' =>
|
611 |
+
array(
|
612 |
+
0 => 'regular',
|
613 |
+
1 => '700',
|
614 |
+
),
|
615 |
+
'Baumans' =>
|
616 |
+
array(
|
617 |
+
0 => 'regular',
|
618 |
+
),
|
619 |
+
'Bayon' =>
|
620 |
+
array(
|
621 |
+
0 => 'regular',
|
622 |
+
),
|
623 |
+
'Belgrano' =>
|
624 |
+
array(
|
625 |
+
0 => 'regular',
|
626 |
+
),
|
627 |
+
'Bellefair' =>
|
628 |
+
array(
|
629 |
+
0 => 'regular',
|
630 |
+
),
|
631 |
+
'Belleza' =>
|
632 |
+
array(
|
633 |
+
0 => 'regular',
|
634 |
+
),
|
635 |
+
'BenchNine' =>
|
636 |
+
array(
|
637 |
+
0 => '300',
|
638 |
+
1 => 'regular',
|
639 |
+
2 => '700',
|
640 |
+
),
|
641 |
+
'Bentham' =>
|
642 |
+
array(
|
643 |
+
0 => 'regular',
|
644 |
+
),
|
645 |
+
'Berkshire Swash' =>
|
646 |
+
array(
|
647 |
+
0 => 'regular',
|
648 |
+
),
|
649 |
+
'Bevan' =>
|
650 |
+
array(
|
651 |
+
0 => 'regular',
|
652 |
+
),
|
653 |
+
'Bigelow Rules' =>
|
654 |
+
array(
|
655 |
+
0 => 'regular',
|
656 |
+
),
|
657 |
+
'Bigshot One' =>
|
658 |
+
array(
|
659 |
+
0 => 'regular',
|
660 |
+
),
|
661 |
+
'Bilbo' =>
|
662 |
+
array(
|
663 |
+
0 => 'regular',
|
664 |
+
),
|
665 |
+
'Bilbo Swash Caps' =>
|
666 |
+
array(
|
667 |
+
0 => 'regular',
|
668 |
+
),
|
669 |
+
'BioRhyme' =>
|
670 |
+
array(
|
671 |
+
0 => '200',
|
672 |
+
1 => '300',
|
673 |
+
2 => 'regular',
|
674 |
+
3 => '700',
|
675 |
+
4 => '800',
|
676 |
+
),
|
677 |
+
'BioRhyme Expanded' =>
|
678 |
+
array(
|
679 |
+
0 => '200',
|
680 |
+
1 => '300',
|
681 |
+
2 => 'regular',
|
682 |
+
3 => '700',
|
683 |
+
4 => '800',
|
684 |
+
),
|
685 |
+
'Biryani' =>
|
686 |
+
array(
|
687 |
+
0 => '200',
|
688 |
+
1 => '300',
|
689 |
+
2 => 'regular',
|
690 |
+
3 => '600',
|
691 |
+
4 => '700',
|
692 |
+
5 => '800',
|
693 |
+
6 => '900',
|
694 |
+
),
|
695 |
+
'Bitter' =>
|
696 |
+
array(
|
697 |
+
0 => 'regular',
|
698 |
+
1 => 'italic',
|
699 |
+
2 => '700',
|
700 |
+
),
|
701 |
+
'Black Ops One' =>
|
702 |
+
array(
|
703 |
+
0 => 'regular',
|
704 |
+
),
|
705 |
+
'Bokor' =>
|
706 |
+
array(
|
707 |
+
0 => 'regular',
|
708 |
+
),
|
709 |
+
'Bonbon' =>
|
710 |
+
array(
|
711 |
+
0 => 'regular',
|
712 |
+
),
|
713 |
+
'Boogaloo' =>
|
714 |
+
array(
|
715 |
+
0 => 'regular',
|
716 |
+
),
|
717 |
+
'Bowlby One' =>
|
718 |
+
array(
|
719 |
+
0 => 'regular',
|
720 |
+
),
|
721 |
+
'Bowlby One SC' =>
|
722 |
+
array(
|
723 |
+
0 => 'regular',
|
724 |
+
),
|
725 |
+
'Brawler' =>
|
726 |
+
array(
|
727 |
+
0 => 'regular',
|
728 |
+
),
|
729 |
+
'Bree Serif' =>
|
730 |
+
array(
|
731 |
+
0 => 'regular',
|
732 |
+
),
|
733 |
+
'Bubblegum Sans' =>
|
734 |
+
array(
|
735 |
+
0 => 'regular',
|
736 |
+
),
|
737 |
+
'Bubbler One' =>
|
738 |
+
array(
|
739 |
+
0 => 'regular',
|
740 |
+
),
|
741 |
+
'Buda' =>
|
742 |
+
array(
|
743 |
+
0 => '300',
|
744 |
+
),
|
745 |
+
'Buenard' =>
|
746 |
+
array(
|
747 |
+
0 => 'regular',
|
748 |
+
1 => '700',
|
749 |
+
),
|
750 |
+
'Bungee' =>
|
751 |
+
array(
|
752 |
+
0 => 'regular',
|
753 |
+
),
|
754 |
+
'Bungee Hairline' =>
|
755 |
+
array(
|
756 |
+
0 => 'regular',
|
757 |
+
),
|
758 |
+
'Bungee Inline' =>
|
759 |
+
array(
|
760 |
+
0 => 'regular',
|
761 |
+
),
|
762 |
+
'Bungee Outline' =>
|
763 |
+
array(
|
764 |
+
0 => 'regular',
|
765 |
+
),
|
766 |
+
'Bungee Shade' =>
|
767 |
+
array(
|
768 |
+
0 => 'regular',
|
769 |
+
),
|
770 |
+
'Butcherman' =>
|
771 |
+
array(
|
772 |
+
0 => 'regular',
|
773 |
+
),
|
774 |
+
'Butterfly Kids' =>
|
775 |
+
array(
|
776 |
+
0 => 'regular',
|
777 |
+
),
|
778 |
+
'Cabin' =>
|
779 |
+
array(
|
780 |
+
0 => 'regular',
|
781 |
+
1 => 'italic',
|
782 |
+
2 => '500',
|
783 |
+
3 => '500italic',
|
784 |
+
4 => '600',
|
785 |
+
5 => '600italic',
|
786 |
+
6 => '700',
|
787 |
+
7 => '700italic',
|
788 |
+
),
|
789 |
+
'Cabin Condensed' =>
|
790 |
+
array(
|
791 |
+
0 => 'regular',
|
792 |
+
1 => '500',
|
793 |
+
2 => '600',
|
794 |
+
3 => '700',
|
795 |
+
),
|
796 |
+
'Cabin Sketch' =>
|
797 |
+
array(
|
798 |
+
0 => 'regular',
|
799 |
+
1 => '700',
|
800 |
+
),
|
801 |
+
'Caesar Dressing' =>
|
802 |
+
array(
|
803 |
+
0 => 'regular',
|
804 |
+
),
|
805 |
+
'Cagliostro' =>
|
806 |
+
array(
|
807 |
+
0 => 'regular',
|
808 |
+
),
|
809 |
+
'Cairo' =>
|
810 |
+
array(
|
811 |
+
0 => '200',
|
812 |
+
1 => '300',
|
813 |
+
2 => 'regular',
|
814 |
+
3 => '600',
|
815 |
+
4 => '700',
|
816 |
+
5 => '900',
|
817 |
+
),
|
818 |
+
'Calligraffitti' =>
|
819 |
+
array(
|
820 |
+
0 => 'regular',
|
821 |
+
),
|
822 |
+
'Cambay' =>
|
823 |
+
array(
|
824 |
+
0 => 'regular',
|
825 |
+
1 => 'italic',
|
826 |
+
2 => '700',
|
827 |
+
3 => '700italic',
|
828 |
+
),
|
829 |
+
'Cambo' =>
|
830 |
+
array(
|
831 |
+
0 => 'regular',
|
832 |
+
),
|
833 |
+
'Candal' =>
|
834 |
+
array(
|
835 |
+
0 => 'regular',
|
836 |
+
),
|
837 |
+
'Cantarell' =>
|
838 |
+
array(
|
839 |
+
0 => 'regular',
|
840 |
+
1 => 'italic',
|
841 |
+
2 => '700',
|
842 |
+
3 => '700italic',
|
843 |
+
),
|
844 |
+
'Cantata One' =>
|
845 |
+
array(
|
846 |
+
0 => 'regular',
|
847 |
+
),
|
848 |
+
'Cantora One' =>
|
849 |
+
array(
|
850 |
+
0 => 'regular',
|
851 |
+
),
|
852 |
+
'Capriola' =>
|
853 |
+
array(
|
854 |
+
0 => 'regular',
|
855 |
+
),
|
856 |
+
'Cardo' =>
|
857 |
+
array(
|
858 |
+
0 => 'regular',
|
859 |
+
1 => 'italic',
|
860 |
+
2 => '700',
|
861 |
+
),
|
862 |
+
'Carme' =>
|
863 |
+
array(
|
864 |
+
0 => 'regular',
|
865 |
+
),
|
866 |
+
'Carrois Gothic' =>
|
867 |
+
array(
|
868 |
+
0 => 'regular',
|
869 |
+
),
|
870 |
+
'Carrois Gothic SC' =>
|
871 |
+
array(
|
872 |
+
0 => 'regular',
|
873 |
+
),
|
874 |
+
'Carter One' =>
|
875 |
+
array(
|
876 |
+
0 => 'regular',
|
877 |
+
),
|
878 |
+
'Catamaran' =>
|
879 |
+
array(
|
880 |
+
0 => '100',
|
881 |
+
1 => '200',
|
882 |
+
2 => '300',
|
883 |
+
3 => 'regular',
|
884 |
+
4 => '500',
|
885 |
+
5 => '600',
|
886 |
+
6 => '700',
|
887 |
+
7 => '800',
|
888 |
+
8 => '900',
|
889 |
+
),
|
890 |
+
'Caudex' =>
|
891 |
+
array(
|
892 |
+
0 => 'regular',
|
893 |
+
1 => 'italic',
|
894 |
+
2 => '700',
|
895 |
+
3 => '700italic',
|
896 |
+
),
|
897 |
+
'Caveat' =>
|
898 |
+
array(
|
899 |
+
0 => 'regular',
|
900 |
+
1 => '700',
|
901 |
+
),
|
902 |
+
'Caveat Brush' =>
|
903 |
+
array(
|
904 |
+
0 => 'regular',
|
905 |
+
),
|
906 |
+
'Cedarville Cursive' =>
|
907 |
+
array(
|
908 |
+
0 => 'regular',
|
909 |
+
),
|
910 |
+
'Ceviche One' =>
|
911 |
+
array(
|
912 |
+
0 => 'regular',
|
913 |
+
),
|
914 |
+
'Changa' =>
|
915 |
+
array(
|
916 |
+
0 => '200',
|
917 |
+
1 => '300',
|
918 |
+
2 => 'regular',
|
919 |
+
3 => '500',
|
920 |
+
4 => '600',
|
921 |
+
5 => '700',
|
922 |
+
6 => '800',
|
923 |
+
),
|
924 |
+
'Changa One' =>
|
925 |
+
array(
|
926 |
+
0 => 'regular',
|
927 |
+
1 => 'italic',
|
928 |
+
),
|
929 |
+
'Chango' =>
|
930 |
+
array(
|
931 |
+
0 => 'regular',
|
932 |
+
),
|
933 |
+
'Chathura' =>
|
934 |
+
array(
|
935 |
+
0 => '100',
|
936 |
+
1 => '300',
|
937 |
+
2 => 'regular',
|
938 |
+
3 => '700',
|
939 |
+
4 => '800',
|
940 |
+
),
|
941 |
+
'Chau Philomene One' =>
|
942 |
+
array(
|
943 |
+
0 => 'regular',
|
944 |
+
1 => 'italic',
|
945 |
+
),
|
946 |
+
'Chela One' =>
|
947 |
+
array(
|
948 |
+
0 => 'regular',
|
949 |
+
),
|
950 |
+
'Chelsea Market' =>
|
951 |
+
array(
|
952 |
+
0 => 'regular',
|
953 |
+
),
|
954 |
+
'Chenla' =>
|
955 |
+
array(
|
956 |
+
0 => 'regular',
|
957 |
+
),
|
958 |
+
'Cherry Cream Soda' =>
|
959 |
+
array(
|
960 |
+
0 => 'regular',
|
961 |
+
),
|
962 |
+
'Cherry Swash' =>
|
963 |
+
array(
|
964 |
+
0 => 'regular',
|
965 |
+
1 => '700',
|
966 |
+
),
|
967 |
+
'Chewy' =>
|
968 |
+
array(
|
969 |
+
0 => 'regular',
|
970 |
+
),
|
971 |
+
'Chicle' =>
|
972 |
+
array(
|
973 |
+
0 => 'regular',
|
974 |
+
),
|
975 |
+
'Chivo' =>
|
976 |
+
array(
|
977 |
+
0 => '300',
|
978 |
+
1 => '300italic',
|
979 |
+
2 => 'regular',
|
980 |
+
3 => 'italic',
|
981 |
+
4 => '700',
|
982 |
+
5 => '700italic',
|
983 |
+
6 => '900',
|
984 |
+
7 => '900italic',
|
985 |
+
),
|
986 |
+
'Chonburi' =>
|
987 |
+
array(
|
988 |
+
0 => 'regular',
|
989 |
+
),
|
990 |
+
'Cinzel' =>
|
991 |
+
array(
|
992 |
+
0 => 'regular',
|
993 |
+
1 => '700',
|
994 |
+
2 => '900',
|
995 |
+
),
|
996 |
+
'Cinzel Decorative' =>
|
997 |
+
array(
|
998 |
+
0 => 'regular',
|
999 |
+
1 => '700',
|
1000 |
+
2 => '900',
|
1001 |
+
),
|
1002 |
+
'Clicker Script' =>
|
1003 |
+
array(
|
1004 |
+
0 => 'regular',
|
1005 |
+
),
|
1006 |
+
'Coda' =>
|
1007 |
+
array(
|
1008 |
+
0 => 'regular',
|
1009 |
+
1 => '800',
|
1010 |
+
),
|
1011 |
+
'Coda Caption' =>
|
1012 |
+
array(
|
1013 |
+
0 => '800',
|
1014 |
+
),
|
1015 |
+
'Codystar' =>
|
1016 |
+
array(
|
1017 |
+
0 => '300',
|
1018 |
+
1 => 'regular',
|
1019 |
+
),
|
1020 |
+
'Coiny' =>
|
1021 |
+
array(
|
1022 |
+
0 => 'regular',
|
1023 |
+
),
|
1024 |
+
'Combo' =>
|
1025 |
+
array(
|
1026 |
+
0 => 'regular',
|
1027 |
+
),
|
1028 |
+
'Comfortaa' =>
|
1029 |
+
array(
|
1030 |
+
0 => '300',
|
1031 |
+
1 => 'regular',
|
1032 |
+
2 => '700',
|
1033 |
+
),
|
1034 |
+
'Coming Soon' =>
|
1035 |
+
array(
|
1036 |
+
0 => 'regular',
|
1037 |
+
),
|
1038 |
+
'Concert One' =>
|
1039 |
+
array(
|
1040 |
+
0 => 'regular',
|
1041 |
+
),
|
1042 |
+
'Condiment' =>
|
1043 |
+
array(
|
1044 |
+
0 => 'regular',
|
1045 |
+
),
|
1046 |
+
'Content' =>
|
1047 |
+
array(
|
1048 |
+
0 => 'regular',
|
1049 |
+
1 => '700',
|
1050 |
+
),
|
1051 |
+
'Contrail One' =>
|
1052 |
+
array(
|
1053 |
+
0 => 'regular',
|
1054 |
+
),
|
1055 |
+
'Convergence' =>
|
1056 |
+
array(
|
1057 |
+
0 => 'regular',
|
1058 |
+
),
|
1059 |
+
'Cookie' =>
|
1060 |
+
array(
|
1061 |
+
0 => 'regular',
|
1062 |
+
),
|
1063 |
+
'Copse' =>
|
1064 |
+
array(
|
1065 |
+
0 => 'regular',
|
1066 |
+
),
|
1067 |
+
'Corben' =>
|
1068 |
+
array(
|
1069 |
+
0 => 'regular',
|
1070 |
+
1 => '700',
|
1071 |
+
),
|
1072 |
+
'Cormorant' =>
|
1073 |
+
array(
|
1074 |
+
0 => '300',
|
1075 |
+
1 => '300italic',
|
1076 |
+
2 => 'regular',
|
1077 |
+
3 => 'italic',
|
1078 |
+
4 => '500',
|
1079 |
+
5 => '500italic',
|
1080 |
+
6 => '600',
|
1081 |
+
7 => '600italic',
|
1082 |
+
8 => '700',
|
1083 |
+
9 => '700italic',
|
1084 |
+
),
|
1085 |
+
'Cormorant Garamond' =>
|
1086 |
+
array(
|
1087 |
+
0 => '300',
|
1088 |
+
1 => '300italic',
|
1089 |
+
2 => 'regular',
|
1090 |
+
3 => 'italic',
|
1091 |
+
4 => '500',
|
1092 |
+
5 => '500italic',
|
1093 |
+
6 => '600',
|
1094 |
+
7 => '600italic',
|
1095 |
+
8 => '700',
|
1096 |
+
9 => '700italic',
|
1097 |
+
),
|
1098 |
+
'Cormorant Infant' =>
|
1099 |
+
array(
|
1100 |
+
0 => '300',
|
1101 |
+
1 => '300italic',
|
1102 |
+
2 => 'regular',
|
1103 |
+
3 => 'italic',
|
1104 |
+
4 => '500',
|
1105 |
+
5 => '500italic',
|
1106 |
+
6 => '600',
|
1107 |
+
7 => '600italic',
|
1108 |
+
8 => '700',
|
1109 |
+
9 => '700italic',
|
1110 |
+
),
|
1111 |
+
'Cormorant SC' =>
|
1112 |
+
array(
|
1113 |
+
0 => '300',
|
1114 |
+
1 => 'regular',
|
1115 |
+
2 => '500',
|
1116 |
+
3 => '600',
|
1117 |
+
4 => '700',
|
1118 |
+
),
|
1119 |
+
'Cormorant Unicase' =>
|
1120 |
+
array(
|
1121 |
+
0 => '300',
|
1122 |
+
1 => 'regular',
|
1123 |
+
2 => '500',
|
1124 |
+
3 => '600',
|
1125 |
+
4 => '700',
|
1126 |
+
),
|
1127 |
+
'Cormorant Upright' =>
|
1128 |
+
array(
|
1129 |
+
0 => '300',
|
1130 |
+
1 => 'regular',
|
1131 |
+
2 => '500',
|
1132 |
+
3 => '600',
|
1133 |
+
4 => '700',
|
1134 |
+
),
|
1135 |
+
'Courgette' =>
|
1136 |
+
array(
|
1137 |
+
0 => 'regular',
|
1138 |
+
),
|
1139 |
+
'Cousine' =>
|
1140 |
+
array(
|
1141 |
+
0 => 'regular',
|
1142 |
+
1 => 'italic',
|
1143 |
+
2 => '700',
|
1144 |
+
3 => '700italic',
|
1145 |
+
),
|
1146 |
+
'Coustard' =>
|
1147 |
+
array(
|
1148 |
+
0 => 'regular',
|
1149 |
+
1 => '900',
|
1150 |
+
),
|
1151 |
+
'Covered By Your Grace' =>
|
1152 |
+
array(
|
1153 |
+
0 => 'regular',
|
1154 |
+
),
|
1155 |
+
'Crafty Girls' =>
|
1156 |
+
array(
|
1157 |
+
0 => 'regular',
|
1158 |
+
),
|
1159 |
+
'Creepster' =>
|
1160 |
+
array(
|
1161 |
+
0 => 'regular',
|
1162 |
+
),
|
1163 |
+
'Crete Round' =>
|
1164 |
+
array(
|
1165 |
+
0 => 'regular',
|
1166 |
+
1 => 'italic',
|
1167 |
+
),
|
1168 |
+
'Crimson Text' =>
|
1169 |
+
array(
|
1170 |
+
0 => 'regular',
|
1171 |
+
1 => 'italic',
|
1172 |
+
2 => '600',
|
1173 |
+
3 => '600italic',
|
1174 |
+
4 => '700',
|
1175 |
+
5 => '700italic',
|
1176 |
+
),
|
1177 |
+
'Croissant One' =>
|
1178 |
+
array(
|
1179 |
+
0 => 'regular',
|
1180 |
+
),
|
1181 |
+
'Crushed' =>
|
1182 |
+
array(
|
1183 |
+
0 => 'regular',
|
1184 |
+
),
|
1185 |
+
'Cuprum' =>
|
1186 |
+
array(
|
1187 |
+
0 => 'regular',
|
1188 |
+
1 => 'italic',
|
1189 |
+
2 => '700',
|
1190 |
+
3 => '700italic',
|
1191 |
+
),
|
1192 |
+
'Cutive' =>
|
1193 |
+
array(
|
1194 |
+
0 => 'regular',
|
1195 |
+
),
|
1196 |
+
'Cutive Mono' =>
|
1197 |
+
array(
|
1198 |
+
0 => 'regular',
|
1199 |
+
),
|
1200 |
+
'Damion' =>
|
1201 |
+
array(
|
1202 |
+
0 => 'regular',
|
1203 |
+
),
|
1204 |
+
'Dancing Script' =>
|
1205 |
+
array(
|
1206 |
+
0 => 'regular',
|
1207 |
+
1 => '700',
|
1208 |
+
),
|
1209 |
+
'Dangrek' =>
|
1210 |
+
array(
|
1211 |
+
0 => 'regular',
|
1212 |
+
),
|
1213 |
+
'David Libre' =>
|
1214 |
+
array(
|
1215 |
+
0 => 'regular',
|
1216 |
+
1 => '500',
|
1217 |
+
2 => '700',
|
1218 |
+
),
|
1219 |
+
'Dawning of a New Day' =>
|
1220 |
+
array(
|
1221 |
+
0 => 'regular',
|
1222 |
+
),
|
1223 |
+
'Days One' =>
|
1224 |
+
array(
|
1225 |
+
0 => 'regular',
|
1226 |
+
),
|
1227 |
+
'Dekko' =>
|
1228 |
+
array(
|
1229 |
+
0 => 'regular',
|
1230 |
+
),
|
1231 |
+
'Delius' =>
|
1232 |
+
array(
|
1233 |
+
0 => 'regular',
|
1234 |
+
),
|
1235 |
+
'Delius Swash Caps' =>
|
1236 |
+
array(
|
1237 |
+
0 => 'regular',
|
1238 |
+
),
|
1239 |
+
'Delius Unicase' =>
|
1240 |
+
array(
|
1241 |
+
0 => 'regular',
|
1242 |
+
1 => '700',
|
1243 |
+
),
|
1244 |
+
'Della Respira' =>
|
1245 |
+
array(
|
1246 |
+
0 => 'regular',
|
1247 |
+
),
|
1248 |
+
'Denk One' =>
|
1249 |
+
array(
|
1250 |
+
0 => 'regular',
|
1251 |
+
),
|
1252 |
+
'Devonshire' =>
|
1253 |
+
array(
|
1254 |
+
0 => 'regular',
|
1255 |
+
),
|
1256 |
+
'Dhurjati' =>
|
1257 |
+
array(
|
1258 |
+
0 => 'regular',
|
1259 |
+
),
|
1260 |
+
'Didact Gothic' =>
|
1261 |
+
array(
|
1262 |
+
0 => 'regular',
|
1263 |
+
),
|
1264 |
+
'Diplomata' =>
|
1265 |
+
array(
|
1266 |
+
0 => 'regular',
|
1267 |
+
),
|
1268 |
+
'Diplomata SC' =>
|
1269 |
+
array(
|
1270 |
+
0 => 'regular',
|
1271 |
+
),
|
1272 |
+
'Domine' =>
|
1273 |
+
array(
|
1274 |
+
0 => 'regular',
|
1275 |
+
1 => '700',
|
1276 |
+
),
|
1277 |
+
'Donegal One' =>
|
1278 |
+
array(
|
1279 |
+
0 => 'regular',
|
1280 |
+
),
|
1281 |
+
'Doppio One' =>
|
1282 |
+
array(
|
1283 |
+
0 => 'regular',
|
1284 |
+
),
|
1285 |
+
'Dorsa' =>
|
1286 |
+
array(
|
1287 |
+
0 => 'regular',
|
1288 |
+
),
|
1289 |
+
'Dosis' =>
|
1290 |
+
array(
|
1291 |
+
0 => '200',
|
1292 |
+
1 => '300',
|
1293 |
+
2 => 'regular',
|
1294 |
+
3 => '500',
|
1295 |
+
4 => '600',
|
1296 |
+
5 => '700',
|
1297 |
+
6 => '800',
|
1298 |
+
),
|
1299 |
+
'Dr Sugiyama' =>
|
1300 |
+
array(
|
1301 |
+
0 => 'regular',
|
1302 |
+
),
|
1303 |
+
'Duru Sans' =>
|
1304 |
+
array(
|
1305 |
+
0 => 'regular',
|
1306 |
+
),
|
1307 |
+
'Dynalight' =>
|
1308 |
+
array(
|
1309 |
+
0 => 'regular',
|
1310 |
+
),
|
1311 |
+
'EB Garamond' =>
|
1312 |
+
array(
|
1313 |
+
0 => 'regular',
|
1314 |
+
1 => 'italic',
|
1315 |
+
2 => '500',
|
1316 |
+
3 => '500italic',
|
1317 |
+
4 => '600',
|
1318 |
+
5 => '600italic',
|
1319 |
+
6 => '700',
|
1320 |
+
7 => '700italic',
|
1321 |
+
8 => '800',
|
1322 |
+
9 => '800italic',
|
1323 |
+
),
|
1324 |
+
'Eagle Lake' =>
|
1325 |
+
array(
|
1326 |
+
0 => 'regular',
|
1327 |
+
),
|
1328 |
+
'Eater' =>
|
1329 |
+
array(
|
1330 |
+
0 => 'regular',
|
1331 |
+
),
|
1332 |
+
'Economica' =>
|
1333 |
+
array(
|
1334 |
+
0 => 'regular',
|
1335 |
+
1 => 'italic',
|
1336 |
+
2 => '700',
|
1337 |
+
3 => '700italic',
|
1338 |
+
),
|
1339 |
+
'Eczar' =>
|
1340 |
+
array(
|
1341 |
+
0 => 'regular',
|
1342 |
+
1 => '500',
|
1343 |
+
2 => '600',
|
1344 |
+
3 => '700',
|
1345 |
+
4 => '800',
|
1346 |
+
),
|
1347 |
+
'El Messiri' =>
|
1348 |
+
array(
|
1349 |
+
0 => 'regular',
|
1350 |
+
1 => '500',
|
1351 |
+
2 => '600',
|
1352 |
+
3 => '700',
|
1353 |
+
),
|
1354 |
+
'Electrolize' =>
|
1355 |
+
array(
|
1356 |
+
0 => 'regular',
|
1357 |
+
),
|
1358 |
+
'Elsie' =>
|
1359 |
+
array(
|
1360 |
+
0 => 'regular',
|
1361 |
+
1 => '900',
|
1362 |
+
),
|
1363 |
+
'Elsie Swash Caps' =>
|
1364 |
+
array(
|
1365 |
+
0 => 'regular',
|
1366 |
+
1 => '900',
|
1367 |
+
),
|
1368 |
+
'Emblema One' =>
|
1369 |
+
array(
|
1370 |
+
0 => 'regular',
|
1371 |
+
),
|
1372 |
+
'Emilys Candy' =>
|
1373 |
+
array(
|
1374 |
+
0 => 'regular',
|
1375 |
+
),
|
1376 |
+
'Encode Sans' =>
|
1377 |
+
array(
|
1378 |
+
0 => '100',
|
1379 |
+
1 => '200',
|
1380 |
+
2 => '300',
|
1381 |
+
3 => 'regular',
|
1382 |
+
4 => '500',
|
1383 |
+
5 => '600',
|
1384 |
+
6 => '700',
|
1385 |
+
7 => '800',
|
1386 |
+
8 => '900',
|
1387 |
+
),
|
1388 |
+
'Encode Sans Condensed' =>
|
1389 |
+
array(
|
1390 |
+
0 => '100',
|
1391 |
+
1 => '200',
|
1392 |
+
2 => '300',
|
1393 |
+
3 => 'regular',
|
1394 |
+
4 => '500',
|
1395 |
+
5 => '600',
|
1396 |
+
6 => '700',
|
1397 |
+
7 => '800',
|
1398 |
+
8 => '900',
|
1399 |
+
),
|
1400 |
+
'Encode Sans Expanded' =>
|
1401 |
+
array(
|
1402 |
+
0 => '100',
|
1403 |
+
1 => '200',
|
1404 |
+
2 => '300',
|
1405 |
+
3 => 'regular',
|
1406 |
+
4 => '500',
|
1407 |
+
5 => '600',
|
1408 |
+
6 => '700',
|
1409 |
+
7 => '800',
|
1410 |
+
8 => '900',
|
1411 |
+
),
|
1412 |
+
'Encode Sans Semi Condensed' =>
|
1413 |
+
array(
|
1414 |
+
0 => '100',
|
1415 |
+
1 => '200',
|
1416 |
+
2 => '300',
|
1417 |
+
3 => 'regular',
|
1418 |
+
4 => '500',
|
1419 |
+
5 => '600',
|
1420 |
+
6 => '700',
|
1421 |
+
7 => '800',
|
1422 |
+
8 => '900',
|
1423 |
+
),
|
1424 |
+
'Encode Sans Semi Expanded' =>
|
1425 |
+
array(
|
1426 |
+
0 => '100',
|
1427 |
+
1 => '200',
|
1428 |
+
2 => '300',
|
1429 |
+
3 => 'regular',
|
1430 |
+
4 => '500',
|
1431 |
+
5 => '600',
|
1432 |
+
6 => '700',
|
1433 |
+
7 => '800',
|
1434 |
+
8 => '900',
|
1435 |
+
),
|
1436 |
+
'Engagement' =>
|
1437 |
+
array(
|
1438 |
+
0 => 'regular',
|
1439 |
+
),
|
1440 |
+
'Englebert' =>
|
1441 |
+
array(
|
1442 |
+
0 => 'regular',
|
1443 |
+
),
|
1444 |
+
'Enriqueta' =>
|
1445 |
+
array(
|
1446 |
+
0 => 'regular',
|
1447 |
+
1 => '700',
|
1448 |
+
),
|
1449 |
+
'Erica One' =>
|
1450 |
+
array(
|
1451 |
+
0 => 'regular',
|
1452 |
+
),
|
1453 |
+
'Esteban' =>
|
1454 |
+
array(
|
1455 |
+
0 => 'regular',
|
1456 |
+
),
|
1457 |
+
'Euphoria Script' =>
|
1458 |
+
array(
|
1459 |
+
0 => 'regular',
|
1460 |
+
),
|
1461 |
+
'Ewert' =>
|
1462 |
+
array(
|
1463 |
+
0 => 'regular',
|
1464 |
+
),
|
1465 |
+
'Exo' =>
|
1466 |
+
array(
|
1467 |
+
0 => '100',
|
1468 |
+
1 => '100italic',
|
1469 |
+
2 => '200',
|
1470 |
+
3 => '200italic',
|
1471 |
+
4 => '300',
|
1472 |
+
5 => '300italic',
|
1473 |
+
6 => 'regular',
|
1474 |
+
7 => 'italic',
|
1475 |
+
8 => '500',
|
1476 |
+
9 => '500italic',
|
1477 |
+
10 => '600',
|
1478 |
+
11 => '600italic',
|
1479 |
+
12 => '700',
|
1480 |
+
13 => '700italic',
|
1481 |
+
14 => '800',
|
1482 |
+
15 => '800italic',
|
1483 |
+
16 => '900',
|
1484 |
+
17 => '900italic',
|
1485 |
+
),
|
1486 |
+
'Exo 2' =>
|
1487 |
+
array(
|
1488 |
+
0 => '100',
|
1489 |
+
1 => '100italic',
|
1490 |
+
2 => '200',
|
1491 |
+
3 => '200italic',
|
1492 |
+
4 => '300',
|
1493 |
+
5 => '300italic',
|
1494 |
+
6 => 'regular',
|
1495 |
+
7 => 'italic',
|
1496 |
+
8 => '500',
|
1497 |
+
9 => '500italic',
|
1498 |
+
10 => '600',
|
1499 |
+
11 => '600italic',
|
1500 |
+
12 => '700',
|
1501 |
+
13 => '700italic',
|
1502 |
+
14 => '800',
|
1503 |
+
15 => '800italic',
|
1504 |
+
16 => '900',
|
1505 |
+
17 => '900italic',
|
1506 |
+
),
|
1507 |
+
'Expletus Sans' =>
|
1508 |
+
array(
|
1509 |
+
0 => 'regular',
|
1510 |
+
1 => 'italic',
|
1511 |
+
2 => '500',
|
1512 |
+
3 => '500italic',
|
1513 |
+
4 => '600',
|
1514 |
+
5 => '600italic',
|
1515 |
+
6 => '700',
|
1516 |
+
7 => '700italic',
|
1517 |
+
),
|
1518 |
+
'Fanwood Text' =>
|
1519 |
+
array(
|
1520 |
+
0 => 'regular',
|
1521 |
+
1 => 'italic',
|
1522 |
+
),
|
1523 |
+
'Farsan' =>
|
1524 |
+
array(
|
1525 |
+
0 => 'regular',
|
1526 |
+
),
|
1527 |
+
'Fascinate' =>
|
1528 |
+
array(
|
1529 |
+
0 => 'regular',
|
1530 |
+
),
|
1531 |
+
'Fascinate Inline' =>
|
1532 |
+
array(
|
1533 |
+
0 => 'regular',
|
1534 |
+
),
|
1535 |
+
'Faster One' =>
|
1536 |
+
array(
|
1537 |
+
0 => 'regular',
|
1538 |
+
),
|
1539 |
+
'Fasthand' =>
|
1540 |
+
array(
|
1541 |
+
0 => 'regular',
|
1542 |
+
),
|
1543 |
+
'Fauna One' =>
|
1544 |
+
array(
|
1545 |
+
0 => 'regular',
|
1546 |
+
),
|
1547 |
+
'Faustina' =>
|
1548 |
+
array(
|
1549 |
+
0 => 'regular',
|
1550 |
+
1 => 'italic',
|
1551 |
+
2 => '500',
|
1552 |
+
3 => '500italic',
|
1553 |
+
4 => '600',
|
1554 |
+
5 => '600italic',
|
1555 |
+
6 => '700',
|
1556 |
+
7 => '700italic',
|
1557 |
+
),
|
1558 |
+
'Federant' =>
|
1559 |
+
array(
|
1560 |
+
0 => 'regular',
|
1561 |
+
),
|
1562 |
+
'Federo' =>
|
1563 |
+
array(
|
1564 |
+
0 => 'regular',
|
1565 |
+
),
|
1566 |
+
'Felipa' =>
|
1567 |
+
array(
|
1568 |
+
0 => 'regular',
|
1569 |
+
),
|
1570 |
+
'Fenix' =>
|
1571 |
+
array(
|
1572 |
+
0 => 'regular',
|
1573 |
+
),
|
1574 |
+
'Finger Paint' =>
|
1575 |
+
array(
|
1576 |
+
0 => 'regular',
|
1577 |
+
),
|
1578 |
+
'Fira Mono' =>
|
1579 |
+
array(
|
1580 |
+
0 => 'regular',
|
1581 |
+
1 => '500',
|
1582 |
+
2 => '700',
|
1583 |
+
),
|
1584 |
+
'Fira Sans' =>
|
1585 |
+
array(
|
1586 |
+
0 => '100',
|
1587 |
+
1 => '100italic',
|
1588 |
+
2 => '200',
|
1589 |
+
3 => '200italic',
|
1590 |
+
4 => '300',
|
1591 |
+
5 => '300italic',
|
1592 |
+
6 => 'regular',
|
1593 |
+
7 => 'italic',
|
1594 |
+
8 => '500',
|
1595 |
+
9 => '500italic',
|
1596 |
+
10 => '600',
|
1597 |
+
11 => '600italic',
|
1598 |
+
12 => '700',
|
1599 |
+
13 => '700italic',
|
1600 |
+
14 => '800',
|
1601 |
+
15 => '800italic',
|
1602 |
+
16 => '900',
|
1603 |
+
17 => '900italic',
|
1604 |
+
),
|
1605 |
+
'Fira Sans Condensed' =>
|
1606 |
+
array(
|
1607 |
+
0 => '100',
|
1608 |
+
1 => '100italic',
|
1609 |
+
2 => '200',
|
1610 |
+
3 => '200italic',
|
1611 |
+
4 => '300',
|
1612 |
+
5 => '300italic',
|
1613 |
+
6 => 'regular',
|
1614 |
+
7 => 'italic',
|
1615 |
+
8 => '500',
|
1616 |
+
9 => '500italic',
|
1617 |
+
10 => '600',
|
1618 |
+
11 => '600italic',
|
1619 |
+
12 => '700',
|
1620 |
+
13 => '700italic',
|
1621 |
+
14 => '800',
|
1622 |
+
15 => '800italic',
|
1623 |
+
16 => '900',
|
1624 |
+
17 => '900italic',
|
1625 |
+
),
|
1626 |
+
'Fira Sans Extra Condensed' =>
|
1627 |
+
array(
|
1628 |
+
0 => '100',
|
1629 |
+
1 => '100italic',
|
1630 |
+
2 => '200',
|
1631 |
+
3 => '200italic',
|
1632 |
+
4 => '300',
|
1633 |
+
5 => '300italic',
|
1634 |
+
6 => 'regular',
|
1635 |
+
7 => 'italic',
|
1636 |
+
8 => '500',
|
1637 |
+
9 => '500italic',
|
1638 |
+
10 => '600',
|
1639 |
+
11 => '600italic',
|
1640 |
+
12 => '700',
|
1641 |
+
13 => '700italic',
|
1642 |
+
14 => '800',
|
1643 |
+
15 => '800italic',
|
1644 |
+
16 => '900',
|
1645 |
+
17 => '900italic',
|
1646 |
+
),
|
1647 |
+
'Fjalla One' =>
|
1648 |
+
array(
|
1649 |
+
0 => 'regular',
|
1650 |
+
),
|
1651 |
+
'Fjord One' =>
|
1652 |
+
array(
|
1653 |
+
0 => 'regular',
|
1654 |
+
),
|
1655 |
+
'Flamenco' =>
|
1656 |
+
array(
|
1657 |
+
0 => '300',
|
1658 |
+
1 => 'regular',
|
1659 |
+
),
|
1660 |
+
'Flavors' =>
|
1661 |
+
array(
|
1662 |
+
0 => 'regular',
|
1663 |
+
),
|
1664 |
+
'Fondamento' =>
|
1665 |
+
array(
|
1666 |
+
0 => 'regular',
|
1667 |
+
1 => 'italic',
|
1668 |
+
),
|
1669 |
+
'Fontdiner Swanky' =>
|
1670 |
+
array(
|
1671 |
+
0 => 'regular',
|
1672 |
+
),
|
1673 |
+
'Forum' =>
|
1674 |
+
array(
|
1675 |
+
0 => 'regular',
|
1676 |
+
),
|
1677 |
+
'Francois One' =>
|
1678 |
+
array(
|
1679 |
+
0 => 'regular',
|
1680 |
+
),
|
1681 |
+
'Frank Ruhl Libre' =>
|
1682 |
+
array(
|
1683 |
+
0 => '300',
|
1684 |
+
1 => 'regular',
|
1685 |
+
2 => '500',
|
1686 |
+
3 => '700',
|
1687 |
+
4 => '900',
|
1688 |
+
),
|
1689 |
+
'Freckle Face' =>
|
1690 |
+
array(
|
1691 |
+
0 => 'regular',
|
1692 |
+
),
|
1693 |
+
'Fredericka the Great' =>
|
1694 |
+
array(
|
1695 |
+
0 => 'regular',
|
1696 |
+
),
|
1697 |
+
'Fredoka One' =>
|
1698 |
+
array(
|
1699 |
+
0 => 'regular',
|
1700 |
+
),
|
1701 |
+
'Freehand' =>
|
1702 |
+
array(
|
1703 |
+
0 => 'regular',
|
1704 |
+
),
|
1705 |
+
'Fresca' =>
|
1706 |
+
array(
|
1707 |
+
0 => 'regular',
|
1708 |
+
),
|
1709 |
+
'Frijole' =>
|
1710 |
+
array(
|
1711 |
+
0 => 'regular',
|
1712 |
+
),
|
1713 |
+
'Fruktur' =>
|
1714 |
+
array(
|
1715 |
+
0 => 'regular',
|
1716 |
+
),
|
1717 |
+
'Fugaz One' =>
|
1718 |
+
array(
|
1719 |
+
0 => 'regular',
|
1720 |
+
),
|
1721 |
+
'GFS Didot' =>
|
1722 |
+
array(
|
1723 |
+
0 => 'regular',
|
1724 |
+
),
|
1725 |
+
'GFS Neohellenic' =>
|
1726 |
+
array(
|
1727 |
+
0 => 'regular',
|
1728 |
+
1 => 'italic',
|
1729 |
+
2 => '700',
|
1730 |
+
3 => '700italic',
|
1731 |
+
),
|
1732 |
+
'Gabriela' =>
|
1733 |
+
array(
|
1734 |
+
0 => 'regular',
|
1735 |
+
),
|
1736 |
+
'Gafata' =>
|
1737 |
+
array(
|
1738 |
+
0 => 'regular',
|
1739 |
+
),
|
1740 |
+
'Galada' =>
|
1741 |
+
array(
|
1742 |
+
0 => 'regular',
|
1743 |
+
),
|
1744 |
+
'Galdeano' =>
|
1745 |
+
array(
|
1746 |
+
0 => 'regular',
|
1747 |
+
),
|
1748 |
+
'Galindo' =>
|
1749 |
+
array(
|
1750 |
+
0 => 'regular',
|
1751 |
+
),
|
1752 |
+
'Gentium Basic' =>
|
1753 |
+
array(
|
1754 |
+
0 => 'regular',
|
1755 |
+
1 => 'italic',
|
1756 |
+
2 => '700',
|
1757 |
+
3 => '700italic',
|
1758 |
+
),
|
1759 |
+
'Gentium Book Basic' =>
|
1760 |
+
array(
|
1761 |
+
0 => 'regular',
|
1762 |
+
1 => 'italic',
|
1763 |
+
2 => '700',
|
1764 |
+
3 => '700italic',
|
1765 |
+
),
|
1766 |
+
'Geo' =>
|
1767 |
+
array(
|
1768 |
+
0 => 'regular',
|
1769 |
+
1 => 'italic',
|
1770 |
+
),
|
1771 |
+
'Geostar' =>
|
1772 |
+
array(
|
1773 |
+
0 => 'regular',
|
1774 |
+
),
|
1775 |
+
'Geostar Fill' =>
|
1776 |
+
array(
|
1777 |
+
0 => 'regular',
|
1778 |
+
),
|
1779 |
+
'Germania One' =>
|
1780 |
+
array(
|
1781 |
+
0 => 'regular',
|
1782 |
+
),
|
1783 |
+
'Gidugu' =>
|
1784 |
+
array(
|
1785 |
+
0 => 'regular',
|
1786 |
+
),
|
1787 |
+
'Gilda Display' =>
|
1788 |
+
array(
|
1789 |
+
0 => 'regular',
|
1790 |
+
),
|
1791 |
+
'Give You Glory' =>
|
1792 |
+
array(
|
1793 |
+
0 => 'regular',
|
1794 |
+
),
|
1795 |
+
'Glass Antiqua' =>
|
1796 |
+
array(
|
1797 |
+
0 => 'regular',
|
1798 |
+
),
|
1799 |
+
'Glegoo' =>
|
1800 |
+
array(
|
1801 |
+
0 => 'regular',
|
1802 |
+
1 => '700',
|
1803 |
+
),
|
1804 |
+
'Gloria Hallelujah' =>
|
1805 |
+
array(
|
1806 |
+
0 => 'regular',
|
1807 |
+
),
|
1808 |
+
'Goblin One' =>
|
1809 |
+
array(
|
1810 |
+
0 => 'regular',
|
1811 |
+
),
|
1812 |
+
'Gochi Hand' =>
|
1813 |
+
array(
|
1814 |
+
0 => 'regular',
|
1815 |
+
),
|
1816 |
+
'Gorditas' =>
|
1817 |
+
array(
|
1818 |
+
0 => 'regular',
|
1819 |
+
1 => '700',
|
1820 |
+
),
|
1821 |
+
'Goudy Bookletter 1911' =>
|
1822 |
+
array(
|
1823 |
+
0 => 'regular',
|
1824 |
+
),
|
1825 |
+
'Graduate' =>
|
1826 |
+
array(
|
1827 |
+
0 => 'regular',
|
1828 |
+
),
|
1829 |
+
'Grand Hotel' =>
|
1830 |
+
array(
|
1831 |
+
0 => 'regular',
|
1832 |
+
),
|
1833 |
+
'Gravitas One' =>
|
1834 |
+
array(
|
1835 |
+
0 => 'regular',
|
1836 |
+
),
|
1837 |
+
'Great Vibes' =>
|
1838 |
+
array(
|
1839 |
+
0 => 'regular',
|
1840 |
+
),
|
1841 |
+
'Griffy' =>
|
1842 |
+
array(
|
1843 |
+
0 => 'regular',
|
1844 |
+
),
|
1845 |
+
'Gruppo' =>
|
1846 |
+
array(
|
1847 |
+
0 => 'regular',
|
1848 |
+
),
|
1849 |
+
'Gudea' =>
|
1850 |
+
array(
|
1851 |
+
0 => 'regular',
|
1852 |
+
1 => 'italic',
|
1853 |
+
2 => '700',
|
1854 |
+
),
|
1855 |
+
'Gurajada' =>
|
1856 |
+
array(
|
1857 |
+
0 => 'regular',
|
1858 |
+
),
|
1859 |
+
'Habibi' =>
|
1860 |
+
array(
|
1861 |
+
0 => 'regular',
|
1862 |
+
),
|
1863 |
+
'Halant' =>
|
1864 |
+
array(
|
1865 |
+
0 => '300',
|
1866 |
+
1 => 'regular',
|
1867 |
+
2 => '500',
|
1868 |
+
3 => '600',
|
1869 |
+
4 => '700',
|
1870 |
+
),
|
1871 |
+
'Hammersmith One' =>
|
1872 |
+
array(
|
1873 |
+
0 => 'regular',
|
1874 |
+
),
|
1875 |
+
'Hanalei' =>
|
1876 |
+
array(
|
1877 |
+
0 => 'regular',
|
1878 |
+
),
|
1879 |
+
'Hanalei Fill' =>
|
1880 |
+
array(
|
1881 |
+
0 => 'regular',
|
1882 |
+
),
|
1883 |
+
'Handlee' =>
|
1884 |
+
array(
|
1885 |
+
0 => 'regular',
|
1886 |
+
),
|
1887 |
+
'Hanuman' =>
|
1888 |
+
array(
|
1889 |
+
0 => 'regular',
|
1890 |
+
1 => '700',
|
1891 |
+
),
|
1892 |
+
'Happy Monkey' =>
|
1893 |
+
array(
|
1894 |
+
0 => 'regular',
|
1895 |
+
),
|
1896 |
+
'Harmattan' =>
|
1897 |
+
array(
|
1898 |
+
0 => 'regular',
|
1899 |
+
),
|
1900 |
+
'Headland One' =>
|
1901 |
+
array(
|
1902 |
+
0 => 'regular',
|
1903 |
+
),
|
1904 |
+
'Heebo' =>
|
1905 |
+
array(
|
1906 |
+
0 => '100',
|
1907 |
+
1 => '300',
|
1908 |
+
2 => 'regular',
|
1909 |
+
3 => '500',
|
1910 |
+
4 => '700',
|
1911 |
+
5 => '800',
|
1912 |
+
6 => '900',
|
1913 |
+
),
|
1914 |
+
'Henny Penny' =>
|
1915 |
+
array(
|
1916 |
+
0 => 'regular',
|
1917 |
+
),
|
1918 |
+
'Herr Von Muellerhoff' =>
|
1919 |
+
array(
|
1920 |
+
0 => 'regular',
|
1921 |
+
),
|
1922 |
+
'Hind' =>
|
1923 |
+
array(
|
1924 |
+
0 => '300',
|
1925 |
+
1 => 'regular',
|
1926 |
+
2 => '500',
|
1927 |
+
3 => '600',
|
1928 |
+
4 => '700',
|
1929 |
+
),
|
1930 |
+
'Hind Guntur' =>
|
1931 |
+
array(
|
1932 |
+
0 => '300',
|
1933 |
+
1 => 'regular',
|
1934 |
+
2 => '500',
|
1935 |
+
3 => '600',
|
1936 |
+
4 => '700',
|
1937 |
+
),
|
1938 |
+
'Hind Madurai' =>
|
1939 |
+
array(
|
1940 |
+
0 => '300',
|
1941 |
+
1 => 'regular',
|
1942 |
+
2 => '500',
|
1943 |
+
3 => '600',
|
1944 |
+
4 => '700',
|
1945 |
+
),
|
1946 |
+
'Hind Siliguri' =>
|
1947 |
+
array(
|
1948 |
+
0 => '300',
|
1949 |
+
1 => 'regular',
|
1950 |
+
2 => '500',
|
1951 |
+
3 => '600',
|
1952 |
+
4 => '700',
|
1953 |
+
),
|
1954 |
+
'Hind Vadodara' =>
|
1955 |
+
array(
|
1956 |
+
0 => '300',
|
1957 |
+
1 => 'regular',
|
1958 |
+
2 => '500',
|
1959 |
+
3 => '600',
|
1960 |
+
4 => '700',
|
1961 |
+
),
|
1962 |
+
'Holtwood One SC' =>
|
1963 |
+
array(
|
1964 |
+
0 => 'regular',
|
1965 |
+
),
|
1966 |
+
'Homemade Apple' =>
|
1967 |
+
array(
|
1968 |
+
0 => 'regular',
|
1969 |
+
),
|
1970 |
+
'Homenaje' =>
|
1971 |
+
array(
|
1972 |
+
0 => 'regular',
|
1973 |
+
),
|
1974 |
+
'IBM Plex Mono' =>
|
1975 |
+
array(
|
1976 |
+
0 => '100',
|
1977 |
+
1 => '100italic',
|
1978 |
+
2 => '200',
|
1979 |
+
3 => '200italic',
|
1980 |
+
4 => '300',
|
1981 |
+
5 => '300italic',
|
1982 |
+
6 => 'regular',
|
1983 |
+
7 => 'italic',
|
1984 |
+
8 => '500',
|
1985 |
+
9 => '500italic',
|
1986 |
+
10 => '600',
|
1987 |
+
11 => '600italic',
|
1988 |
+
12 => '700',
|
1989 |
+
13 => '700italic',
|
1990 |
+
),
|
1991 |
+
'IBM Plex Sans' =>
|
1992 |
+
array(
|
1993 |
+
0 => '100',
|
1994 |
+
1 => '100italic',
|
1995 |
+
2 => '200',
|
1996 |
+
3 => '200italic',
|
1997 |
+
4 => '300',
|
1998 |
+
5 => '300italic',
|
1999 |
+
6 => 'regular',
|
2000 |
+
7 => 'italic',
|
2001 |
+
8 => '500',
|
2002 |
+
9 => '500italic',
|
2003 |
+
10 => '600',
|
2004 |
+
11 => '600italic',
|
2005 |
+
12 => '700',
|
2006 |
+
13 => '700italic',
|
2007 |
+
),
|
2008 |
+
'IBM Plex Sans Condensed' =>
|
2009 |
+
array(
|
2010 |
+
0 => '100',
|
2011 |
+
1 => '100italic',
|
2012 |
+
2 => '200',
|
2013 |
+
3 => '200italic',
|
2014 |
+
4 => '300',
|
2015 |
+
5 => '300italic',
|
2016 |
+
6 => 'regular',
|
2017 |
+
7 => 'italic',
|
2018 |
+
8 => '500',
|
2019 |
+
9 => '500italic',
|
2020 |
+
10 => '600',
|
2021 |
+
11 => '600italic',
|
2022 |
+
12 => '700',
|
2023 |
+
13 => '700italic',
|
2024 |
+
),
|
2025 |
+
'IBM Plex Serif' =>
|
2026 |
+
array(
|
2027 |
+
0 => '100',
|
2028 |
+
1 => '100italic',
|
2029 |
+
2 => '200',
|
2030 |
+
3 => '200italic',
|
2031 |
+
4 => '300',
|
2032 |
+
5 => '300italic',
|
2033 |
+
6 => 'regular',
|
2034 |
+
7 => 'italic',
|
2035 |
+
8 => '500',
|
2036 |
+
9 => '500italic',
|
2037 |
+
10 => '600',
|
2038 |
+
11 => '600italic',
|
2039 |
+
12 => '700italic',
|
2040 |
+
),
|
2041 |
+
'IM Fell DW Pica' =>
|
2042 |
+
array(
|
2043 |
+
0 => 'regular',
|
2044 |
+
1 => 'italic',
|
2045 |
+
),
|
2046 |
+
'IM Fell DW Pica SC' =>
|
2047 |
+
array(
|
2048 |
+
0 => 'regular',
|
2049 |
+
),
|
2050 |
+
'IM Fell Double Pica' =>
|
2051 |
+
array(
|
2052 |
+
0 => 'regular',
|
2053 |
+
1 => 'italic',
|
2054 |
+
),
|
2055 |
+
'IM Fell Double Pica SC' =>
|
2056 |
+
array(
|
2057 |
+
0 => 'regular',
|
2058 |
+
),
|
2059 |
+
'IM Fell English' =>
|
2060 |
+
array(
|
2061 |
+
0 => 'regular',
|
2062 |
+
1 => 'italic',
|
2063 |
+
),
|
2064 |
+
'IM Fell English SC' =>
|
2065 |
+
array(
|
2066 |
+
0 => 'regular',
|
2067 |
+
),
|
2068 |
+
'IM Fell French Canon' =>
|
2069 |
+
array(
|
2070 |
+
0 => 'regular',
|
2071 |
+
1 => 'italic',
|
2072 |
+
),
|
2073 |
+
'IM Fell French Canon SC' =>
|
2074 |
+
array(
|
2075 |
+
0 => 'regular',
|
2076 |
+
),
|
2077 |
+
'IM Fell Great Primer' =>
|
2078 |
+
array(
|
2079 |
+
0 => 'regular',
|
2080 |
+
1 => 'italic',
|
2081 |
+
),
|
2082 |
+
'IM Fell Great Primer SC' =>
|
2083 |
+
array(
|
2084 |
+
0 => 'regular',
|
2085 |
+
),
|
2086 |
+
'Iceberg' =>
|
2087 |
+
array(
|
2088 |
+
0 => 'regular',
|
2089 |
+
),
|
2090 |
+
'Iceland' =>
|
2091 |
+
array(
|
2092 |
+
0 => 'regular',
|
2093 |
+
),
|
2094 |
+
'Imprima' =>
|
2095 |
+
array(
|
2096 |
+
0 => 'regular',
|
2097 |
+
),
|
2098 |
+
'Inconsolata' =>
|
2099 |
+
array(
|
2100 |
+
0 => 'regular',
|
2101 |
+
1 => '700',
|
2102 |
+
),
|
2103 |
+
'Inder' =>
|
2104 |
+
array(
|
2105 |
+
0 => 'regular',
|
2106 |
+
),
|
2107 |
+
'Indie Flower' =>
|
2108 |
+
array(
|
2109 |
+
0 => 'regular',
|
2110 |
+
),
|
2111 |
+
'Inika' =>
|
2112 |
+
array(
|
2113 |
+
0 => 'regular',
|
2114 |
+
1 => '700',
|
2115 |
+
),
|
2116 |
+
'Inknut Antiqua' =>
|
2117 |
+
array(
|
2118 |
+
0 => '300',
|
2119 |
+
1 => 'regular',
|
2120 |
+
2 => '500',
|
2121 |
+
3 => '600',
|
2122 |
+
4 => '700',
|
2123 |
+
5 => '800',
|
2124 |
+
6 => '900',
|
2125 |
+
),
|
2126 |
+
'Irish Grover' =>
|
2127 |
+
array(
|
2128 |
+
0 => 'regular',
|
2129 |
+
),
|
2130 |
+
'Istok Web' =>
|
2131 |
+
array(
|
2132 |
+
0 => 'regular',
|
2133 |
+
1 => 'italic',
|
2134 |
+
2 => '700',
|
2135 |
+
3 => '700italic',
|
2136 |
+
),
|
2137 |
+
'Italiana' =>
|
2138 |
+
array(
|
2139 |
+
0 => 'regular',
|
2140 |
+
),
|
2141 |
+
'Italianno' =>
|
2142 |
+
array(
|
2143 |
+
0 => 'regular',
|
2144 |
+
),
|
2145 |
+
'Itim' =>
|
2146 |
+
array(
|
2147 |
+
0 => 'regular',
|
2148 |
+
),
|
2149 |
+
'Jacques Francois' =>
|
2150 |
+
array(
|
2151 |
+
0 => 'regular',
|
2152 |
+
),
|
2153 |
+
'Jacques Francois Shadow' =>
|
2154 |
+
array(
|
2155 |
+
0 => 'regular',
|
2156 |
+
),
|
2157 |
+
'Jaldi' =>
|
2158 |
+
array(
|
2159 |
+
0 => 'regular',
|
2160 |
+
1 => '700',
|
2161 |
+
),
|
2162 |
+
'Jim Nightshade' =>
|
2163 |
+
array(
|
2164 |
+
0 => 'regular',
|
2165 |
+
),
|
2166 |
+
'Jockey One' =>
|
2167 |
+
array(
|
2168 |
+
0 => 'regular',
|
2169 |
+
),
|
2170 |
+
'Jolly Lodger' =>
|
2171 |
+
array(
|
2172 |
+
0 => 'regular',
|
2173 |
+
),
|
2174 |
+
'Jomhuria' =>
|
2175 |
+
array(
|
2176 |
+
0 => 'regular',
|
2177 |
+
),
|
2178 |
+
'Josefin Sans' =>
|
2179 |
+
array(
|
2180 |
+
0 => '100',
|
2181 |
+
1 => '100italic',
|
2182 |
+
2 => '300',
|
2183 |
+
3 => '300italic',
|
2184 |
+
4 => 'regular',
|
2185 |
+
5 => 'italic',
|
2186 |
+
6 => '600',
|
2187 |
+
7 => '600italic',
|
2188 |
+
8 => '700',
|
2189 |
+
9 => '700italic',
|
2190 |
+
),
|
2191 |
+
'Josefin Slab' =>
|
2192 |
+
array(
|
2193 |
+
0 => '100',
|
2194 |
+
1 => '100italic',
|
2195 |
+
2 => '300',
|
2196 |
+
3 => '300italic',
|
2197 |
+
4 => 'regular',
|
2198 |
+
5 => 'italic',
|
2199 |
+
6 => '600',
|
2200 |
+
7 => '600italic',
|
2201 |
+
8 => '700',
|
2202 |
+
9 => '700italic',
|
2203 |
+
),
|
2204 |
+
'Joti One' =>
|
2205 |
+
array(
|
2206 |
+
0 => 'regular',
|
2207 |
+
),
|
2208 |
+
'Judson' =>
|
2209 |
+
array(
|
2210 |
+
0 => 'regular',
|
2211 |
+
1 => 'italic',
|
2212 |
+
2 => '700',
|
2213 |
+
),
|
2214 |
+
'Julee' =>
|
2215 |
+
array(
|
2216 |
+
0 => 'regular',
|
2217 |
+
),
|
2218 |
+
'Julius Sans One' =>
|
2219 |
+
array(
|
2220 |
+
0 => 'regular',
|
2221 |
+
),
|
2222 |
+
'Junge' =>
|
2223 |
+
array(
|
2224 |
+
0 => 'regular',
|
2225 |
+
),
|
2226 |
+
'Jura' =>
|
2227 |
+
array(
|
2228 |
+
0 => '300',
|
2229 |
+
1 => 'regular',
|
2230 |
+
2 => '500',
|
2231 |
+
3 => '600',
|
2232 |
+
4 => '700',
|
2233 |
+
),
|
2234 |
+
'Just Another Hand' =>
|
2235 |
+
array(
|
2236 |
+
0 => 'regular',
|
2237 |
+
),
|
2238 |
+
'Just Me Again Down Here' =>
|
2239 |
+
array(
|
2240 |
+
0 => 'regular',
|
2241 |
+
),
|
2242 |
+
'Kadwa' =>
|
2243 |
+
array(
|
2244 |
+
0 => 'regular',
|
2245 |
+
1 => '700',
|
2246 |
+
),
|
2247 |
+
'Kalam' =>
|
2248 |
+
array(
|
2249 |
+
0 => '300',
|
2250 |
+
1 => 'regular',
|
2251 |
+
2 => '700',
|
2252 |
+
),
|
2253 |
+
'Kameron' =>
|
2254 |
+
array(
|
2255 |
+
0 => 'regular',
|
2256 |
+
1 => '700',
|
2257 |
+
),
|
2258 |
+
'Kanit' =>
|
2259 |
+
array(
|
2260 |
+
0 => '100',
|
2261 |
+
1 => '100italic',
|
2262 |
+
2 => '200',
|
2263 |
+
3 => '200italic',
|
2264 |
+
4 => '300',
|
2265 |
+
5 => '300italic',
|
2266 |
+
6 => 'regular',
|
2267 |
+
7 => 'italic',
|
2268 |
+
8 => '500',
|
2269 |
+
9 => '500italic',
|
2270 |
+
10 => '600',
|
2271 |
+
11 => '600italic',
|
2272 |
+
12 => '700',
|
2273 |
+
13 => '700italic',
|
2274 |
+
14 => '800',
|
2275 |
+
15 => '800italic',
|
2276 |
+
16 => '900',
|
2277 |
+
17 => '900italic',
|
2278 |
+
),
|
2279 |
+
'Kantumruy' =>
|
2280 |
+
array(
|
2281 |
+
0 => '300',
|
2282 |
+
1 => 'regular',
|
2283 |
+
2 => '700',
|
2284 |
+
),
|
2285 |
+
'Karla' =>
|
2286 |
+
array(
|
2287 |
+
0 => 'regular',
|
2288 |
+
1 => 'italic',
|
2289 |
+
2 => '700',
|
2290 |
+
3 => '700italic',
|
2291 |
+
),
|
2292 |
+
'Karma' =>
|
2293 |
+
array(
|
2294 |
+
0 => '300',
|
2295 |
+
1 => 'regular',
|
2296 |
+
2 => '500',
|
2297 |
+
3 => '600',
|
2298 |
+
4 => '700',
|
2299 |
+
),
|
2300 |
+
'Katibeh' =>
|
2301 |
+
array(
|
2302 |
+
0 => 'regular',
|
2303 |
+
),
|
2304 |
+
'Kaushan Script' =>
|
2305 |
+
array(
|
2306 |
+
0 => 'regular',
|
2307 |
+
),
|
2308 |
+
'Kavivanar' =>
|
2309 |
+
array(
|
2310 |
+
0 => 'regular',
|
2311 |
+
),
|
2312 |
+
'Kavoon' =>
|
2313 |
+
array(
|
2314 |
+
0 => 'regular',
|
2315 |
+
),
|
2316 |
+
'Kdam Thmor' =>
|
2317 |
+
array(
|
2318 |
+
0 => 'regular',
|
2319 |
+
),
|
2320 |
+
'Keania One' =>
|
2321 |
+
array(
|
2322 |
+
0 => 'regular',
|
2323 |
+
),
|
2324 |
+
'Kelly Slab' =>
|
2325 |
+
array(
|
2326 |
+
0 => 'regular',
|
2327 |
+
),
|
2328 |
+
'Kenia' =>
|
2329 |
+
array(
|
2330 |
+
0 => 'regular',
|
2331 |
+
),
|
2332 |
+
'Khand' =>
|
2333 |
+
array(
|
2334 |
+
0 => '300',
|
2335 |
+
1 => 'regular',
|
2336 |
+
2 => '500',
|
2337 |
+
3 => '600',
|
2338 |
+
4 => '700',
|
2339 |
+
),
|
2340 |
+
'Khmer' =>
|
2341 |
+
array(
|
2342 |
+
0 => 'regular',
|
2343 |
+
),
|
2344 |
+
'Khula' =>
|
2345 |
+
array(
|
2346 |
+
0 => '300',
|
2347 |
+
1 => 'regular',
|
2348 |
+
2 => '600',
|
2349 |
+
3 => '700',
|
2350 |
+
4 => '800',
|
2351 |
+
),
|
2352 |
+
'Kite One' =>
|
2353 |
+
array(
|
2354 |
+
0 => 'regular',
|
2355 |
+
),
|
2356 |
+
'Knewave' =>
|
2357 |
+
array(
|
2358 |
+
0 => 'regular',
|
2359 |
+
),
|
2360 |
+
'Kotta One' =>
|
2361 |
+
array(
|
2362 |
+
0 => 'regular',
|
2363 |
+
),
|
2364 |
+
'Koulen' =>
|
2365 |
+
array(
|
2366 |
+
0 => 'regular',
|
2367 |
+
),
|
2368 |
+
'Kranky' =>
|
2369 |
+
array(
|
2370 |
+
0 => 'regular',
|
2371 |
+
),
|
2372 |
+
'Kreon' =>
|
2373 |
+
array(
|
2374 |
+
0 => '300',
|
2375 |
+
1 => 'regular',
|
2376 |
+
2 => '700',
|
2377 |
+
),
|
2378 |
+
'Kristi' =>
|
2379 |
+
array(
|
2380 |
+
0 => 'regular',
|
2381 |
+
),
|
2382 |
+
'Krona One' =>
|
2383 |
+
array(
|
2384 |
+
0 => 'regular',
|
2385 |
+
),
|
2386 |
+
'Kumar One' =>
|
2387 |
+
array(
|
2388 |
+
0 => 'regular',
|
2389 |
+
),
|
2390 |
+
'Kumar One Outline' =>
|
2391 |
+
array(
|
2392 |
+
0 => 'regular',
|
2393 |
+
),
|
2394 |
+
'Kurale' =>
|
2395 |
+
array(
|
2396 |
+
0 => 'regular',
|
2397 |
+
),
|
2398 |
+
'La Belle Aurore' =>
|
2399 |
+
array(
|
2400 |
+
0 => 'regular',
|
2401 |
+
),
|
2402 |
+
'Laila' =>
|
2403 |
+
array(
|
2404 |
+
0 => '300',
|
2405 |
+
1 => 'regular',
|
2406 |
+
2 => '500',
|
2407 |
+
3 => '600',
|
2408 |
+
4 => '700',
|
2409 |
+
),
|
2410 |
+
'Lakki Reddy' =>
|
2411 |
+
array(
|
2412 |
+
0 => 'regular',
|
2413 |
+
),
|
2414 |
+
'Lalezar' =>
|
2415 |
+
array(
|
2416 |
+
0 => 'regular',
|
2417 |
+
),
|
2418 |
+
'Lancelot' =>
|
2419 |
+
array(
|
2420 |
+
0 => 'regular',
|
2421 |
+
),
|
2422 |
+
'Lateef' =>
|
2423 |
+
array(
|
2424 |
+
0 => 'regular',
|
2425 |
+
),
|
2426 |
+
'Lato' =>
|
2427 |
+
array(
|
2428 |
+
0 => '100',
|
2429 |
+
1 => '100italic',
|
2430 |
+
2 => '300',
|
2431 |
+
3 => '300italic',
|
2432 |
+
4 => 'regular',
|
2433 |
+
5 => 'italic',
|
2434 |
+
6 => '700',
|
2435 |
+
7 => '700italic',
|
2436 |
+
8 => '900',
|
2437 |
+
9 => '900italic',
|
2438 |
+
),
|
2439 |
+
'League Script' =>
|
2440 |
+
array(
|
2441 |
+
0 => 'regular',
|
2442 |
+
),
|
2443 |
+
'Leckerli One' =>
|
2444 |
+
array(
|
2445 |
+
0 => 'regular',
|
2446 |
+
),
|
2447 |
+
'Ledger' =>
|
2448 |
+
array(
|
2449 |
+
0 => 'regular',
|
2450 |
+
),
|
2451 |
+
'Lekton' =>
|
2452 |
+
array(
|
2453 |
+
0 => 'regular',
|
2454 |
+
1 => 'italic',
|
2455 |
+
2 => '700',
|
2456 |
+
),
|
2457 |
+
'Lemon' =>
|
2458 |
+
array(
|
2459 |
+
0 => 'regular',
|
2460 |
+
),
|
2461 |
+
'Lemonada' =>
|
2462 |
+
array(
|
2463 |
+
0 => '300',
|
2464 |
+
1 => 'regular',
|
2465 |
+
2 => '600',
|
2466 |
+
3 => '700',
|
2467 |
+
),
|
2468 |
+
'Libre Barcode 128' =>
|
2469 |
+
array(
|
2470 |
+
0 => 'regular',
|
2471 |
+
),
|
2472 |
+
'Libre Barcode 128 Text' =>
|
2473 |
+
array(
|
2474 |
+
0 => 'regular',
|
2475 |
+
),
|
2476 |
+
'Libre Barcode 39' =>
|
2477 |
+
array(
|
2478 |
+
0 => 'regular',
|
2479 |
+
),
|
2480 |
+
'Libre Barcode 39 Extended' =>
|
2481 |
+
array(
|
2482 |
+
0 => 'regular',
|
2483 |
+
),
|
2484 |
+
'Libre Barcode 39 Extended Text' =>
|
2485 |
+
array(
|
2486 |
+
0 => 'regular',
|
2487 |
+
),
|
2488 |
+
'Libre Barcode 39 Text' =>
|
2489 |
+
array(
|
2490 |
+
0 => 'regular',
|
2491 |
+
),
|
2492 |
+
'Libre Baskerville' =>
|
2493 |
+
array(
|
2494 |
+
0 => 'regular',
|
2495 |
+
1 => 'italic',
|
2496 |
+
2 => '700',
|
2497 |
+
),
|
2498 |
+
'Libre Franklin' =>
|
2499 |
+
array(
|
2500 |
+
0 => '100',
|
2501 |
+
1 => '100italic',
|
2502 |
+
2 => '200',
|
2503 |
+
3 => '200italic',
|
2504 |
+
4 => '300',
|
2505 |
+
5 => '300italic',
|
2506 |
+
6 => 'regular',
|
2507 |
+
7 => 'italic',
|
2508 |
+
8 => '500',
|
2509 |
+
9 => '500italic',
|
2510 |
+
10 => '600',
|
2511 |
+
11 => '600italic',
|
2512 |
+
12 => '700',
|
2513 |
+
13 => '700italic',
|
2514 |
+
14 => '800',
|
2515 |
+
15 => '800italic',
|
2516 |
+
16 => '900',
|
2517 |
+
17 => '900italic',
|
2518 |
+
),
|
2519 |
+
'Life Savers' =>
|
2520 |
+
array(
|
2521 |
+
0 => 'regular',
|
2522 |
+
1 => '700',
|
2523 |
+
),
|
2524 |
+
'Lilita One' =>
|
2525 |
+
array(
|
2526 |
+
0 => 'regular',
|
2527 |
+
),
|
2528 |
+
'Lily Script One' =>
|
2529 |
+
array(
|
2530 |
+
0 => 'regular',
|
2531 |
+
),
|
2532 |
+
'Limelight' =>
|
2533 |
+
array(
|
2534 |
+
0 => 'regular',
|
2535 |
+
),
|
2536 |
+
'Linden Hill' =>
|
2537 |
+
array(
|
2538 |
+
0 => 'regular',
|
2539 |
+
1 => 'italic',
|
2540 |
+
),
|
2541 |
+
'Lobster' =>
|
2542 |
+
array(
|
2543 |
+
0 => 'regular',
|
2544 |
+
),
|
2545 |
+
'Lobster Two' =>
|
2546 |
+
array(
|
2547 |
+
0 => 'regular',
|
2548 |
+
1 => 'italic',
|
2549 |
+
2 => '700',
|
2550 |
+
3 => '700italic',
|
2551 |
+
),
|
2552 |
+
'Londrina Outline' =>
|
2553 |
+
array(
|
2554 |
+
0 => 'regular',
|
2555 |
+
),
|
2556 |
+
'Londrina Shadow' =>
|
2557 |
+
array(
|
2558 |
+
0 => 'regular',
|
2559 |
+
),
|
2560 |
+
'Londrina Sketch' =>
|
2561 |
+
array(
|
2562 |
+
0 => 'regular',
|
2563 |
+
),
|
2564 |
+
'Londrina Solid' =>
|
2565 |
+
array(
|
2566 |
+
0 => '100',
|
2567 |
+
1 => '300',
|
2568 |
+
2 => 'regular',
|
2569 |
+
3 => '900',
|
2570 |
+
),
|
2571 |
+
'Lora' =>
|
2572 |
+
array(
|
2573 |
+
0 => 'regular',
|
2574 |
+
1 => 'italic',
|
2575 |
+
2 => '700',
|
2576 |
+
3 => '700italic',
|
2577 |
+
),
|
2578 |
+
'Love Ya Like A Sister' =>
|
2579 |
+
array(
|
2580 |
+
0 => 'regular',
|
2581 |
+
),
|
2582 |
+
'Loved by the King' =>
|
2583 |
+
array(
|
2584 |
+
0 => 'regular',
|
2585 |
+
),
|
2586 |
+
'Lovers Quarrel' =>
|
2587 |
+
array(
|
2588 |
+
0 => 'regular',
|
2589 |
+
),
|
2590 |
+
'Luckiest Guy' =>
|
2591 |
+
array(
|
2592 |
+
0 => 'regular',
|
2593 |
+
),
|
2594 |
+
'Lusitana' =>
|
2595 |
+
array(
|
2596 |
+
0 => 'regular',
|
2597 |
+
1 => '700',
|
2598 |
+
),
|
2599 |
+
'Lustria' =>
|
2600 |
+
array(
|
2601 |
+
0 => 'regular',
|
2602 |
+
),
|
2603 |
+
'Macondo' =>
|
2604 |
+
array(
|
2605 |
+
0 => 'regular',
|
2606 |
+
),
|
2607 |
+
'Macondo Swash Caps' =>
|
2608 |
+
array(
|
2609 |
+
0 => 'regular',
|
2610 |
+
),
|
2611 |
+
'Mada' =>
|
2612 |
+
array(
|
2613 |
+
0 => '200',
|
2614 |
+
1 => '300',
|
2615 |
+
2 => 'regular',
|
2616 |
+
3 => '500',
|
2617 |
+
4 => '600',
|
2618 |
+
5 => '700',
|
2619 |
+
6 => '900',
|
2620 |
+
),
|
2621 |
+
'Magra' =>
|
2622 |
+
array(
|
2623 |
+
0 => 'regular',
|
2624 |
+
1 => '700',
|
2625 |
+
),
|
2626 |
+
'Maiden Orange' =>
|
2627 |
+
array(
|
2628 |
+
0 => 'regular',
|
2629 |
+
),
|
2630 |
+
'Maitree' =>
|
2631 |
+
array(
|
2632 |
+
0 => '200',
|
2633 |
+
1 => '300',
|
2634 |
+
2 => 'regular',
|
2635 |
+
3 => '500',
|
2636 |
+
4 => '600',
|
2637 |
+
5 => '700',
|
2638 |
+
),
|
2639 |
+
'Mako' =>
|
2640 |
+
array(
|
2641 |
+
0 => 'regular',
|
2642 |
+
),
|
2643 |
+
'Mallanna' =>
|
2644 |
+
array(
|
2645 |
+
0 => 'regular',
|
2646 |
+
),
|
2647 |
+
'Mandali' =>
|
2648 |
+
array(
|
2649 |
+
0 => 'regular',
|
2650 |
+
),
|
2651 |
+
'Manuale' =>
|
2652 |
+
array(
|
2653 |
+
0 => 'regular',
|
2654 |
+
1 => 'italic',
|
2655 |
+
2 => '500',
|
2656 |
+
3 => '500italic',
|
2657 |
+
4 => '600',
|
2658 |
+
5 => '600italic',
|
2659 |
+
6 => '700',
|
2660 |
+
7 => '700italic',
|
2661 |
+
),
|
2662 |
+
'Marcellus' =>
|
2663 |
+
array(
|
2664 |
+
0 => 'regular',
|
2665 |
+
),
|
2666 |
+
'Marcellus SC' =>
|
2667 |
+
array(
|
2668 |
+
0 => 'regular',
|
2669 |
+
),
|
2670 |
+
'Marck Script' =>
|
2671 |
+
array(
|
2672 |
+
0 => 'regular',
|
2673 |
+
),
|
2674 |
+
'Margarine' =>
|
2675 |
+
array(
|
2676 |
+
0 => 'regular',
|
2677 |
+
),
|
2678 |
+
'Marko One' =>
|
2679 |
+
array(
|
2680 |
+
0 => 'regular',
|
2681 |
+
),
|
2682 |
+
'Marmelad' =>
|
2683 |
+
array(
|
2684 |
+
0 => 'regular',
|
2685 |
+
),
|
2686 |
+
'Martel' =>
|
2687 |
+
array(
|
2688 |
+
0 => '200',
|
2689 |
+
1 => '300',
|
2690 |
+
2 => 'regular',
|
2691 |
+
3 => '600',
|
2692 |
+
4 => '700',
|
2693 |
+
5 => '800',
|
2694 |
+
6 => '900',
|
2695 |
+
),
|
2696 |
+
'Martel Sans' =>
|
2697 |
+
array(
|
2698 |
+
0 => '200',
|
2699 |
+
1 => '300',
|
2700 |
+
2 => 'regular',
|
2701 |
+
3 => '600',
|
2702 |
+
4 => '700',
|
2703 |
+
5 => '800',
|
2704 |
+
6 => '900',
|
2705 |
+
),
|
2706 |
+
'Marvel' =>
|
2707 |
+
array(
|
2708 |
+
0 => 'regular',
|
2709 |
+
1 => 'italic',
|
2710 |
+
2 => '700',
|
2711 |
+
3 => '700italic',
|
2712 |
+
),
|
2713 |
+
'Mate' =>
|
2714 |
+
array(
|
2715 |
+
0 => 'regular',
|
2716 |
+
1 => 'italic',
|
2717 |
+
),
|
2718 |
+
'Mate SC' =>
|
2719 |
+
array(
|
2720 |
+
0 => 'regular',
|
2721 |
+
),
|
2722 |
+
'Maven Pro' =>
|
2723 |
+
array(
|
2724 |
+
0 => 'regular',
|
2725 |
+
1 => '500',
|
2726 |
+
2 => '700',
|
2727 |
+
3 => '900',
|
2728 |
+
),
|
2729 |
+
'McLaren' =>
|
2730 |
+
array(
|
2731 |
+
0 => 'regular',
|
2732 |
+
),
|
2733 |
+
'Meddon' =>
|
2734 |
+
array(
|
2735 |
+
0 => 'regular',
|
2736 |
+
),
|
2737 |
+
'MedievalSharp' =>
|
2738 |
+
array(
|
2739 |
+
0 => 'regular',
|
2740 |
+
),
|
2741 |
+
'Medula One' =>
|
2742 |
+
array(
|
2743 |
+
0 => 'regular',
|
2744 |
+
),
|
2745 |
+
'Meera Inimai' =>
|
2746 |
+
array(
|
2747 |
+
0 => 'regular',
|
2748 |
+
),
|
2749 |
+
'Megrim' =>
|
2750 |
+
array(
|
2751 |
+
0 => 'regular',
|
2752 |
+
),
|
2753 |
+
'Meie Script' =>
|
2754 |
+
array(
|
2755 |
+
0 => 'regular',
|
2756 |
+
),
|
2757 |
+
'Merienda' =>
|
2758 |
+
array(
|
2759 |
+
0 => 'regular',
|
2760 |
+
1 => '700',
|
2761 |
+
),
|
2762 |
+
'Merienda One' =>
|
2763 |
+
array(
|
2764 |
+
0 => 'regular',
|
2765 |
+
),
|
2766 |
+
'Merriweather' =>
|
2767 |
+
array(
|
2768 |
+
0 => '300',
|
2769 |
+
1 => '300italic',
|
2770 |
+
2 => 'regular',
|
2771 |
+
3 => 'italic',
|
2772 |
+
4 => '700',
|
2773 |
+
5 => '700italic',
|
2774 |
+
6 => '900',
|
2775 |
+
7 => '900italic',
|
2776 |
+
),
|
2777 |
+
'Merriweather Sans' =>
|
2778 |
+
array(
|
2779 |
+
0 => '300',
|
2780 |
+
1 => '300italic',
|
2781 |
+
2 => 'regular',
|
2782 |
+
3 => 'italic',
|
2783 |
+
4 => '700',
|
2784 |
+
5 => '700italic',
|
2785 |
+
6 => '800',
|
2786 |
+
7 => '800italic',
|
2787 |
+
),
|
2788 |
+
'Metal' =>
|
2789 |
+
array(
|
2790 |
+
0 => 'regular',
|
2791 |
+
),
|
2792 |
+
'Metal Mania' =>
|
2793 |
+
array(
|
2794 |
+
0 => 'regular',
|
2795 |
+
),
|
2796 |
+
'Metamorphous' =>
|
2797 |
+
array(
|
2798 |
+
0 => 'regular',
|
2799 |
+
),
|
2800 |
+
'Metrophobic' =>
|
2801 |
+
array(
|
2802 |
+
0 => 'regular',
|
2803 |
+
),
|
2804 |
+
'Michroma' =>
|
2805 |
+
array(
|
2806 |
+
0 => 'regular',
|
2807 |
+
),
|
2808 |
+
'Milonga' =>
|
2809 |
+
array(
|
2810 |
+
0 => 'regular',
|
2811 |
+
),
|
2812 |
+
'Miltonian' =>
|
2813 |
+
array(
|
2814 |
+
0 => 'regular',
|
2815 |
+
),
|
2816 |
+
'Miltonian Tattoo' =>
|
2817 |
+
array(
|
2818 |
+
0 => 'regular',
|
2819 |
+
),
|
2820 |
+
'Mina' =>
|
2821 |
+
array(
|
2822 |
+
0 => 'regular',
|
2823 |
+
1 => '700',
|
2824 |
+
),
|
2825 |
+
'Miniver' =>
|
2826 |
+
array(
|
2827 |
+
0 => 'regular',
|
2828 |
+
),
|
2829 |
+
'Miriam Libre' =>
|
2830 |
+
array(
|
2831 |
+
0 => 'regular',
|
2832 |
+
1 => '700',
|
2833 |
+
),
|
2834 |
+
'Mirza' =>
|
2835 |
+
array(
|
2836 |
+
0 => 'regular',
|
2837 |
+
1 => '500',
|
2838 |
+
2 => '600',
|
2839 |
+
3 => '700',
|
2840 |
+
),
|
2841 |
+
'Miss Fajardose' =>
|
2842 |
+
array(
|
2843 |
+
0 => 'regular',
|
2844 |
+
),
|
2845 |
+
'Mitr' =>
|
2846 |
+
array(
|
2847 |
+
0 => '200',
|
2848 |
+
1 => '300',
|
2849 |
+
2 => 'regular',
|
2850 |
+
3 => '500',
|
2851 |
+
4 => '600',
|
2852 |
+
5 => '700',
|
2853 |
+
),
|
2854 |
+
'Modak' =>
|
2855 |
+
array(
|
2856 |
+
0 => 'regular',
|
2857 |
+
),
|
2858 |
+
'Modern Antiqua' =>
|
2859 |
+
array(
|
2860 |
+
0 => 'regular',
|
2861 |
+
),
|
2862 |
+
'Mogra' =>
|
2863 |
+
array(
|
2864 |
+
0 => 'regular',
|
2865 |
+
),
|
2866 |
+
'Molengo' =>
|
2867 |
+
array(
|
2868 |
+
0 => 'regular',
|
2869 |
+
),
|
2870 |
+
'Molle' =>
|
2871 |
+
array(
|
2872 |
+
0 => 'italic',
|
2873 |
+
),
|
2874 |
+
'Monda' =>
|
2875 |
+
array(
|
2876 |
+
0 => 'regular',
|
2877 |
+
1 => '700',
|
2878 |
+
),
|
2879 |
+
'Monofett' =>
|
2880 |
+
array(
|
2881 |
+
0 => 'regular',
|
2882 |
+
),
|
2883 |
+
'Monoton' =>
|
2884 |
+
array(
|
2885 |
+
0 => 'regular',
|
2886 |
+
),
|
2887 |
+
'Monsieur La Doulaise' =>
|
2888 |
+
array(
|
2889 |
+
0 => 'regular',
|
2890 |
+
),
|
2891 |
+
'Montaga' =>
|
2892 |
+
array(
|
2893 |
+
0 => 'regular',
|
2894 |
+
),
|
2895 |
+
'Montez' =>
|
2896 |
+
array(
|
2897 |
+
0 => 'regular',
|
2898 |
+
),
|
2899 |
+
'Montserrat' =>
|
2900 |
+
array(
|
2901 |
+
0 => '100',
|
2902 |
+
1 => '100italic',
|
2903 |
+
2 => '200',
|
2904 |
+
3 => '200italic',
|
2905 |
+
4 => '300',
|
2906 |
+
5 => '300italic',
|
2907 |
+
6 => 'regular',
|
2908 |
+
7 => 'italic',
|
2909 |
+
8 => '500',
|
2910 |
+
9 => '500italic',
|
2911 |
+
10 => '600',
|
2912 |
+
11 => '600italic',
|
2913 |
+
12 => '700',
|
2914 |
+
13 => '700italic',
|
2915 |
+
14 => '800',
|
2916 |
+
15 => '800italic',
|
2917 |
+
16 => '900',
|
2918 |
+
17 => '900italic',
|
2919 |
+
),
|
2920 |
+
'Montserrat Alternates' =>
|
2921 |
+
array(
|
2922 |
+
0 => '100',
|
2923 |
+
1 => '100italic',
|
2924 |
+
2 => '200',
|
2925 |
+
3 => '200italic',
|
2926 |
+
4 => '300',
|
2927 |
+
5 => '300italic',
|
2928 |
+
6 => 'regular',
|
2929 |
+
7 => 'italic',
|
2930 |
+
8 => '500',
|
2931 |
+
9 => '500italic',
|
2932 |
+
10 => '600',
|
2933 |
+
11 => '600italic',
|
2934 |
+
12 => '700',
|
2935 |
+
13 => '700italic',
|
2936 |
+
14 => '800',
|
2937 |
+
15 => '800italic',
|
2938 |
+
16 => '900',
|
2939 |
+
17 => '900italic',
|
2940 |
+
),
|
2941 |
+
'Montserrat Subrayada' =>
|
2942 |
+
array(
|
2943 |
+
0 => 'regular',
|
2944 |
+
1 => '700',
|
2945 |
+
),
|
2946 |
+
'Moul' =>
|
2947 |
+
array(
|
2948 |
+
0 => 'regular',
|
2949 |
+
),
|
2950 |
+
'Moulpali' =>
|
2951 |
+
array(
|
2952 |
+
0 => 'regular',
|
2953 |
+
),
|
2954 |
+
'Mountains of Christmas' =>
|
2955 |
+
array(
|
2956 |
+
0 => 'regular',
|
2957 |
+
1 => '700',
|
2958 |
+
),
|
2959 |
+
'Mouse Memoirs' =>
|
2960 |
+
array(
|
2961 |
+
0 => 'regular',
|
2962 |
+
),
|
2963 |
+
'Mr Bedfort' =>
|
2964 |
+
array(
|
2965 |
+
0 => 'regular',
|
2966 |
+
),
|
2967 |
+
'Mr Dafoe' =>
|
2968 |
+
array(
|
2969 |
+
0 => 'regular',
|
2970 |
+
),
|
2971 |
+
'Mr De Haviland' =>
|
2972 |
+
array(
|
2973 |
+
0 => 'regular',
|
2974 |
+
),
|
2975 |
+
'Mrs Saint Delafield' =>
|
2976 |
+
array(
|
2977 |
+
0 => 'regular',
|
2978 |
+
),
|
2979 |
+
'Mrs Sheppards' =>
|
2980 |
+
array(
|
2981 |
+
0 => 'regular',
|
2982 |
+
),
|
2983 |
+
'Mukta' =>
|
2984 |
+
array(
|
2985 |
+
0 => '200',
|
2986 |
+
1 => '300',
|
2987 |
+
2 => 'regular',
|
2988 |
+
3 => '500',
|
2989 |
+
4 => '600',
|
2990 |
+
5 => '700',
|
2991 |
+
6 => '800',
|
2992 |
+
),
|
2993 |
+
'Mukta Mahee' =>
|
2994 |
+
array(
|
2995 |
+
0 => '200',
|
2996 |
+
1 => '300',
|
2997 |
+
2 => 'regular',
|
2998 |
+
3 => '500',
|
2999 |
+
4 => '600',
|
3000 |
+
5 => '700',
|
3001 |
+
6 => '800',
|
3002 |
+
),
|
3003 |
+
'Mukta Malar' =>
|
3004 |
+
array(
|
3005 |
+
0 => '200',
|
3006 |
+
1 => '300',
|
3007 |
+
2 => 'regular',
|
3008 |
+
3 => '500',
|
3009 |
+
4 => '600',
|
3010 |
+
5 => '700',
|
3011 |
+
6 => '800',
|
3012 |
+
),
|
3013 |
+
'Mukta Vaani' =>
|
3014 |
+
array(
|
3015 |
+
0 => '200',
|
3016 |
+
1 => '300',
|
3017 |
+
2 => 'regular',
|
3018 |
+
3 => '500',
|
3019 |
+
4 => '600',
|
3020 |
+
5 => '700',
|
3021 |
+
6 => '800',
|
3022 |
+
),
|
3023 |
+
'Muli' =>
|
3024 |
+
array(
|
3025 |
+
0 => '200',
|
3026 |
+
1 => '200italic',
|
3027 |
+
2 => '300',
|
3028 |
+
3 => '300italic',
|
3029 |
+
4 => 'regular',
|
3030 |
+
5 => 'italic',
|
3031 |
+
6 => '600',
|
3032 |
+
7 => '600italic',
|
3033 |
+
8 => '700',
|
3034 |
+
9 => '700italic',
|
3035 |
+
10 => '800',
|
3036 |
+
11 => '800italic',
|
3037 |
+
12 => '900',
|
3038 |
+
13 => '900italic',
|
3039 |
+
),
|
3040 |
+
'Mystery Quest' =>
|
3041 |
+
array(
|
3042 |
+
0 => 'regular',
|
3043 |
+
),
|
3044 |
+
'NTR' =>
|
3045 |
+
array(
|
3046 |
+
0 => 'regular',
|
3047 |
+
),
|
3048 |
+
'Nanum Brush Script' =>
|
3049 |
+
array(
|
3050 |
+
0 => 'regular',
|
3051 |
+
),
|
3052 |
+
'Nanum Gothic' =>
|
3053 |
+
array(
|
3054 |
+
0 => 'regular',
|
3055 |
+
1 => '700',
|
3056 |
+
2 => '800',
|
3057 |
+
),
|
3058 |
+
'Nanum Gothic Coding' =>
|
3059 |
+
array(
|
3060 |
+
0 => 'regular',
|
3061 |
+
1 => '700',
|
3062 |
+
),
|
3063 |
+
'Nanum Myeongjo' =>
|
3064 |
+
array(
|
3065 |
+
0 => 'regular',
|
3066 |
+
1 => '700',
|
3067 |
+
2 => '800',
|
3068 |
+
),
|
3069 |
+
'Nanum Pen Script' =>
|
3070 |
+
array(
|
3071 |
+
0 => 'regular',
|
3072 |
+
),
|
3073 |
+
'Neucha' =>
|
3074 |
+
array(
|
3075 |
+
0 => 'regular',
|
3076 |
+
),
|
3077 |
+
'Neuton' =>
|
3078 |
+
array(
|
3079 |
+
0 => '200',
|
3080 |
+
1 => '300',
|
3081 |
+
2 => 'regular',
|
3082 |
+
3 => 'italic',
|
3083 |
+
4 => '700',
|
3084 |
+
5 => '800',
|
3085 |
+
),
|
3086 |
+
'New Rocker' =>
|
3087 |
+
array(
|
3088 |
+
0 => 'regular',
|
3089 |
+
),
|
3090 |
+
'News Cycle' =>
|
3091 |
+
array(
|
3092 |
+
0 => 'regular',
|
3093 |
+
1 => '700',
|
3094 |
+
),
|
3095 |
+
'Niconne' =>
|
3096 |
+
array(
|
3097 |
+
0 => 'regular',
|
3098 |
+
),
|
3099 |
+
'Nixie One' =>
|
3100 |
+
array(
|
3101 |
+
0 => 'regular',
|
3102 |
+
),
|
3103 |
+
'Nobile' =>
|
3104 |
+
array(
|
3105 |
+
0 => 'regular',
|
3106 |
+
1 => 'italic',
|
3107 |
+
2 => '500',
|
3108 |
+
3 => '500italic',
|
3109 |
+
4 => '700',
|
3110 |
+
5 => '700italic',
|
3111 |
+
),
|
3112 |
+
'Nokora' =>
|
3113 |
+
array(
|
3114 |
+
0 => 'regular',
|
3115 |
+
1 => '700',
|
3116 |
+
),
|
3117 |
+
'Norican' =>
|
3118 |
+
array(
|
3119 |
+
0 => 'regular',
|
3120 |
+
),
|
3121 |
+
'Nosifer' =>
|
3122 |
+
array(
|
3123 |
+
0 => 'regular',
|
3124 |
+
),
|
3125 |
+
'Nothing You Could Do' =>
|
3126 |
+
array(
|
3127 |
+
0 => 'regular',
|
3128 |
+
),
|
3129 |
+
'Noticia Text' =>
|
3130 |
+
array(
|
3131 |
+
0 => 'regular',
|
3132 |
+
1 => 'italic',
|
3133 |
+
2 => '700',
|
3134 |
+
3 => '700italic',
|
3135 |
+
),
|
3136 |
+
'Noto Sans' =>
|
3137 |
+
array(
|
3138 |
+
0 => 'regular',
|
3139 |
+
1 => 'italic',
|
3140 |
+
2 => '700',
|
3141 |
+
3 => '700italic',
|
3142 |
+
),
|
3143 |
+
'Noto Serif' =>
|
3144 |
+
array(
|
3145 |
+
0 => 'regular',
|
3146 |
+
1 => 'italic',
|
3147 |
+
2 => '700',
|
3148 |
+
3 => '700italic',
|
3149 |
+
),
|
3150 |
+
'Nova Cut' =>
|
3151 |
+
array(
|
3152 |
+
0 => 'regular',
|
3153 |
+
),
|
3154 |
+
'Nova Flat' =>
|
3155 |
+
array(
|
3156 |
+
0 => 'regular',
|
3157 |
+
),
|
3158 |
+
'Nova Mono' =>
|
3159 |
+
array(
|
3160 |
+
0 => 'regular',
|
3161 |
+
),
|
3162 |
+
'Nova Oval' =>
|
3163 |
+
array(
|
3164 |
+
0 => 'regular',
|
3165 |
+
),
|
3166 |
+
'Nova Round' =>
|
3167 |
+
array(
|
3168 |
+
0 => 'regular',
|
3169 |
+
),
|
3170 |
+
'Nova Script' =>
|
3171 |
+
array(
|
3172 |
+
0 => 'regular',
|
3173 |
+
),
|
3174 |
+
'Nova Slim' =>
|
3175 |
+
array(
|
3176 |
+
0 => 'regular',
|
3177 |
+
),
|
3178 |
+
'Nova Square' =>
|
3179 |
+
array(
|
3180 |
+
0 => 'regular',
|
3181 |
+
),
|
3182 |
+
'Numans' =>
|
3183 |
+
array(
|
3184 |
+
0 => 'regular',
|
3185 |
+
),
|
3186 |
+
'Nunito' =>
|
3187 |
+
array(
|
3188 |
+
0 => '200',
|
3189 |
+
1 => '200italic',
|
3190 |
+
2 => '300',
|
3191 |
+
3 => '300italic',
|
3192 |
+
4 => 'regular',
|
3193 |
+
5 => 'italic',
|
3194 |
+
6 => '600',
|
3195 |
+
7 => '600italic',
|
3196 |
+
8 => '700',
|
3197 |
+
9 => '700italic',
|
3198 |
+
10 => '800',
|
3199 |
+
11 => '800italic',
|
3200 |
+
12 => '900',
|
3201 |
+
13 => '900italic',
|
3202 |
+
),
|
3203 |
+
'Nunito Sans' =>
|
3204 |
+
array(
|
3205 |
+
0 => '200',
|
3206 |
+
1 => '200italic',
|
3207 |
+
2 => '300',
|
3208 |
+
3 => '300italic',
|
3209 |
+
4 => 'regular',
|
3210 |
+
5 => 'italic',
|
3211 |
+
6 => '600',
|
3212 |
+
7 => '600italic',
|
3213 |
+
8 => '700',
|
3214 |
+
9 => '700italic',
|
3215 |
+
10 => '800',
|
3216 |
+
11 => '800italic',
|
3217 |
+
12 => '900',
|
3218 |
+
13 => '900italic',
|
3219 |
+
),
|
3220 |
+
'Odor Mean Chey' =>
|
3221 |
+
array(
|
3222 |
+
0 => 'regular',
|
3223 |
+
),
|
3224 |
+
'Offside' =>
|
3225 |
+
array(
|
3226 |
+
0 => 'regular',
|
3227 |
+
),
|
3228 |
+
'Old Standard TT' =>
|
3229 |
+
array(
|
3230 |
+
0 => 'regular',
|
3231 |
+
1 => 'italic',
|
3232 |
+
2 => '700',
|
3233 |
+
),
|
3234 |
+
'Oldenburg' =>
|
3235 |
+
array(
|
3236 |
+
0 => 'regular',
|
3237 |
+
),
|
3238 |
+
'Oleo Script' =>
|
3239 |
+
array(
|
3240 |
+
0 => 'regular',
|
3241 |
+
1 => '700',
|
3242 |
+
),
|
3243 |
+
'Oleo Script Swash Caps' =>
|
3244 |
+
array(
|
3245 |
+
0 => 'regular',
|
3246 |
+
1 => '700',
|
3247 |
+
),
|
3248 |
+
'Open Sans' =>
|
3249 |
+
array(
|
3250 |
+
0 => '300',
|
3251 |
+
1 => '300italic',
|
3252 |
+
2 => 'regular',
|
3253 |
+
3 => 'italic',
|
3254 |
+
4 => '600',
|
3255 |
+
5 => '600italic',
|
3256 |
+
6 => '700',
|
3257 |
+
7 => '700italic',
|
3258 |
+
8 => '800',
|
3259 |
+
9 => '800italic',
|
3260 |
+
),
|
3261 |
+
'Open Sans Condensed' =>
|
3262 |
+
array(
|
3263 |
+
0 => '300',
|
3264 |
+
1 => '300italic',
|
3265 |
+
2 => '700',
|
3266 |
+
),
|
3267 |
+
'Oranienbaum' =>
|
3268 |
+
array(
|
3269 |
+
0 => 'regular',
|
3270 |
+
),
|
3271 |
+
'Orbitron' =>
|
3272 |
+
array(
|
3273 |
+
0 => 'regular',
|
3274 |
+
1 => '500',
|
3275 |
+
2 => '700',
|
3276 |
+
3 => '900',
|
3277 |
+
),
|
3278 |
+
'Oregano' =>
|
3279 |
+
array(
|
3280 |
+
0 => 'regular',
|
3281 |
+
1 => 'italic',
|
3282 |
+
),
|
3283 |
+
'Orienta' =>
|
3284 |
+
array(
|
3285 |
+
0 => 'regular',
|
3286 |
+
),
|
3287 |
+
'Original Surfer' =>
|
3288 |
+
array(
|
3289 |
+
0 => 'regular',
|
3290 |
+
),
|
3291 |
+
'Oswald' =>
|
3292 |
+
array(
|
3293 |
+
0 => '200',
|
3294 |
+
1 => '300',
|
3295 |
+
2 => 'regular',
|
3296 |
+
3 => '500',
|
3297 |
+
4 => '600',
|
3298 |
+
5 => '700',
|
3299 |
+
),
|
3300 |
+
'Over the Rainbow' =>
|
3301 |
+
array(
|
3302 |
+
0 => 'regular',
|
3303 |
+
),
|
3304 |
+
'Overlock' =>
|
3305 |
+
array(
|
3306 |
+
0 => 'regular',
|
3307 |
+
1 => 'italic',
|
3308 |
+
2 => '700',
|
3309 |
+
3 => '700italic',
|
3310 |
+
4 => '900',
|
3311 |
+
5 => '900italic',
|
3312 |
+
),
|
3313 |
+
'Overlock SC' =>
|
3314 |
+
array(
|
3315 |
+
0 => 'regular',
|
3316 |
+
),
|
3317 |
+
'Overpass' =>
|
3318 |
+
array(
|
3319 |
+
0 => '100',
|
3320 |
+
1 => '100italic',
|
3321 |
+
2 => '200',
|
3322 |
+
3 => '200italic',
|
3323 |
+
4 => '300',
|
3324 |
+
5 => '300italic',
|
3325 |
+
6 => 'regular',
|
3326 |
+
7 => 'italic',
|
3327 |
+
8 => '600',
|
3328 |
+
9 => '600italic',
|
3329 |
+
10 => '700',
|
3330 |
+
11 => '700italic',
|
3331 |
+
12 => '800',
|
3332 |
+
13 => '800italic',
|
3333 |
+
14 => '900',
|
3334 |
+
15 => '900italic',
|
3335 |
+
),
|
3336 |
+
'Overpass Mono' =>
|
3337 |
+
array(
|
3338 |
+
0 => '300',
|
3339 |
+
1 => 'regular',
|
3340 |
+
2 => '600',
|
3341 |
+
3 => '700',
|
3342 |
+
),
|
3343 |
+
'Ovo' =>
|
3344 |
+
array(
|
3345 |
+
0 => 'regular',
|
3346 |
+
),
|
3347 |
+
'Oxygen' =>
|
3348 |
+
array(
|
3349 |
+
0 => '300',
|
3350 |
+
1 => 'regular',
|
3351 |
+
2 => '700',
|
3352 |
+
),
|
3353 |
+
'Oxygen Mono' =>
|
3354 |
+
array(
|
3355 |
+
0 => 'regular',
|
3356 |
+
),
|
3357 |
+
'PT Mono' =>
|
3358 |
+
array(
|
3359 |
+
0 => 'regular',
|
3360 |
+
),
|
3361 |
+
'PT Sans' =>
|
3362 |
+
array(
|
3363 |
+
0 => 'regular',
|
3364 |
+
1 => 'italic',
|
3365 |
+
2 => '700',
|
3366 |
+
3 => '700italic',
|
3367 |
+
),
|
3368 |
+
'PT Sans Caption' =>
|
3369 |
+
array(
|
3370 |
+
0 => 'regular',
|
3371 |
+
1 => '700',
|
3372 |
+
),
|
3373 |
+
'PT Sans Narrow' =>
|
3374 |
+
array(
|
3375 |
+
0 => 'regular',
|
3376 |
+
1 => '700',
|
3377 |
+
),
|
3378 |
+
'PT Serif' =>
|
3379 |
+
array(
|
3380 |
+
0 => 'regular',
|
3381 |
+
1 => 'italic',
|
3382 |
+
2 => '700',
|
3383 |
+
3 => '700italic',
|
3384 |
+
),
|
3385 |
+
'PT Serif Caption' =>
|
3386 |
+
array(
|
3387 |
+
0 => 'regular',
|
3388 |
+
1 => 'italic',
|
3389 |
+
),
|
3390 |
+
'Pacifico' =>
|
3391 |
+
array(
|
3392 |
+
0 => 'regular',
|
3393 |
+
),
|
3394 |
+
'Padauk' =>
|
3395 |
+
array(
|
3396 |
+
0 => 'regular',
|
3397 |
+
1 => '700',
|
3398 |
+
),
|
3399 |
+
'Palanquin' =>
|
3400 |
+
array(
|
3401 |
+
0 => '100',
|
3402 |
+
1 => '200',
|
3403 |
+
2 => '300',
|
3404 |
+
3 => 'regular',
|
3405 |
+
4 => '500',
|
3406 |
+
5 => '600',
|
3407 |
+
6 => '700',
|
3408 |
+
),
|
3409 |
+
'Palanquin Dark' =>
|
3410 |
+
array(
|
3411 |
+
0 => 'regular',
|
3412 |
+
1 => '500',
|
3413 |
+
2 => '600',
|
3414 |
+
3 => '700',
|
3415 |
+
),
|
3416 |
+
'Pangolin' =>
|
3417 |
+
array(
|
3418 |
+
0 => 'regular',
|
3419 |
+
),
|
3420 |
+
'Paprika' =>
|
3421 |
+
array(
|
3422 |
+
0 => 'regular',
|
3423 |
+
),
|
3424 |
+
'Parisienne' =>
|
3425 |
+
array(
|
3426 |
+
0 => 'regular',
|
3427 |
+
),
|
3428 |
+
'Passero One' =>
|
3429 |
+
array(
|
3430 |
+
0 => 'regular',
|
3431 |
+
),
|
3432 |
+
'Passion One' =>
|
3433 |
+
array(
|
3434 |
+
0 => 'regular',
|
3435 |
+
1 => '700',
|
3436 |
+
2 => '900',
|
3437 |
+
),
|
3438 |
+
'Pathway Gothic One' =>
|
3439 |
+
array(
|
3440 |
+
0 => 'regular',
|
3441 |
+
),
|
3442 |
+
'Patrick Hand' =>
|
3443 |
+
array(
|
3444 |
+
0 => 'regular',
|
3445 |
+
),
|
3446 |
+
'Patrick Hand SC' =>
|
3447 |
+
array(
|
3448 |
+
0 => 'regular',
|
3449 |
+
),
|
3450 |
+
'Pattaya' =>
|
3451 |
+
array(
|
3452 |
+
0 => 'regular',
|
3453 |
+
),
|
3454 |
+
'Patua One' =>
|
3455 |
+
array(
|
3456 |
+
0 => 'regular',
|
3457 |
+
),
|
3458 |
+
'Pavanam' =>
|
3459 |
+
array(
|
3460 |
+
0 => 'regular',
|
3461 |
+
),
|
3462 |
+
'Paytone One' =>
|
3463 |
+
array(
|
3464 |
+
0 => 'regular',
|
3465 |
+
),
|
3466 |
+
'Peddana' =>
|
3467 |
+
array(
|
3468 |
+
0 => 'regular',
|
3469 |
+
),
|
3470 |
+
'Peralta' =>
|
3471 |
+
array(
|
3472 |
+
0 => 'regular',
|
3473 |
+
),
|
3474 |
+
'Permanent Marker' =>
|
3475 |
+
array(
|
3476 |
+
0 => 'regular',
|
3477 |
+
),
|
3478 |
+
'Petit Formal Script' =>
|
3479 |
+
array(
|
3480 |
+
0 => 'regular',
|
3481 |
+
),
|
3482 |
+
'Petrona' =>
|
3483 |
+
array(
|
3484 |
+
0 => 'regular',
|
3485 |
+
),
|
3486 |
+
'Philosopher' =>
|
3487 |
+
array(
|
3488 |
+
0 => 'regular',
|
3489 |
+
1 => 'italic',
|
3490 |
+
2 => '700',
|
3491 |
+
3 => '700italic',
|
3492 |
+
),
|
3493 |
+
'Piedra' =>
|
3494 |
+
array(
|
3495 |
+
0 => 'regular',
|
3496 |
+
),
|
3497 |
+
'Pinyon Script' =>
|
3498 |
+
array(
|
3499 |
+
0 => 'regular',
|
3500 |
+
),
|
3501 |
+
'Pirata One' =>
|
3502 |
+
array(
|
3503 |
+
0 => 'regular',
|
3504 |
+
),
|
3505 |
+
'Plaster' =>
|
3506 |
+
array(
|
3507 |
+
0 => 'regular',
|
3508 |
+
),
|
3509 |
+
'Play' =>
|
3510 |
+
array(
|
3511 |
+
0 => 'regular',
|
3512 |
+
1 => '700',
|
3513 |
+
),
|
3514 |
+
'Playball' =>
|
3515 |
+
array(
|
3516 |
+
0 => 'regular',
|
3517 |
+
),
|
3518 |
+
'Playfair Display' =>
|
3519 |
+
array(
|
3520 |
+
0 => 'regular',
|
3521 |
+
1 => 'italic',
|
3522 |
+
2 => '700',
|
3523 |
+
3 => '700italic',
|
3524 |
+
4 => '900',
|
3525 |
+
5 => '900italic',
|
3526 |
+
),
|
3527 |
+
'Playfair Display SC' =>
|
3528 |
+
array(
|
3529 |
+
0 => 'regular',
|
3530 |
+
1 => 'italic',
|
3531 |
+
2 => '700',
|
3532 |
+
3 => '700italic',
|
3533 |
+
4 => '900',
|
3534 |
+
5 => '900italic',
|
3535 |
+
),
|
3536 |
+
'Podkova' =>
|
3537 |
+
array(
|
3538 |
+
0 => 'regular',
|
3539 |
+
1 => '500',
|
3540 |
+
2 => '600',
|
3541 |
+
3 => '700',
|
3542 |
+
4 => '800',
|
3543 |
+
),
|
3544 |
+
'Poiret One' =>
|
3545 |
+
array(
|
3546 |
+
0 => 'regular',
|
3547 |
+
),
|
3548 |
+
'Poller One' =>
|
3549 |
+
array(
|
3550 |
+
0 => 'regular',
|
3551 |
+
),
|
3552 |
+
'Poly' =>
|
3553 |
+
array(
|
3554 |
+
0 => 'regular',
|
3555 |
+
1 => 'italic',
|
3556 |
+
),
|
3557 |
+
'Pompiere' =>
|
3558 |
+
array(
|
3559 |
+
0 => 'regular',
|
3560 |
+
),
|
3561 |
+
'Pontano Sans' =>
|
3562 |
+
array(
|
3563 |
+
0 => 'regular',
|
3564 |
+
),
|
3565 |
+
'Poppins' =>
|
3566 |
+
array(
|
3567 |
+
0 => '100',
|
3568 |
+
1 => '100italic',
|
3569 |
+
2 => '200',
|
3570 |
+
3 => '200italic',
|
3571 |
+
4 => '300',
|
3572 |
+
5 => '300italic',
|
3573 |
+
6 => 'regular',
|
3574 |
+
7 => 'italic',
|
3575 |
+
8 => '500',
|
3576 |
+
9 => '500italic',
|
3577 |
+
10 => '600',
|
3578 |
+
11 => '600italic',
|
3579 |
+
12 => '700',
|
3580 |
+
13 => '700italic',
|
3581 |
+
14 => '800',
|
3582 |
+
15 => '800italic',
|
3583 |
+
16 => '900',
|
3584 |
+
17 => '900italic',
|
3585 |
+
),
|
3586 |
+
'Port Lligat Sans' =>
|
3587 |
+
array(
|
3588 |
+
0 => 'regular',
|
3589 |
+
),
|
3590 |
+
'Port Lligat Slab' =>
|
3591 |
+
array(
|
3592 |
+
0 => 'regular',
|
3593 |
+
),
|
3594 |
+
'Pragati Narrow' =>
|
3595 |
+
array(
|
3596 |
+
0 => 'regular',
|
3597 |
+
1 => '700',
|
3598 |
+
),
|
3599 |
+
'Prata' =>
|
3600 |
+
array(
|
3601 |
+
0 => 'regular',
|
3602 |
+
),
|
3603 |
+
'Preahvihear' =>
|
3604 |
+
array(
|
3605 |
+
0 => 'regular',
|
3606 |
+
),
|
3607 |
+
'Press Start 2P' =>
|
3608 |
+
array(
|
3609 |
+
0 => 'regular',
|
3610 |
+
),
|
3611 |
+
'Pridi' =>
|
3612 |
+
array(
|
3613 |
+
0 => '200',
|
3614 |
+
1 => '300',
|
3615 |
+
2 => 'regular',
|
3616 |
+
3 => '500',
|
3617 |
+
4 => '600',
|
3618 |
+
5 => '700',
|
3619 |
+
),
|
3620 |
+
'Princess Sofia' =>
|
3621 |
+
array(
|
3622 |
+
0 => 'regular',
|
3623 |
+
),
|
3624 |
+
'Prociono' =>
|
3625 |
+
array(
|
3626 |
+
0 => 'regular',
|
3627 |
+
),
|
3628 |
+
'Prompt' =>
|
3629 |
+
array(
|
3630 |
+
0 => '100',
|
3631 |
+
1 => '100italic',
|
3632 |
+
2 => '200',
|
3633 |
+
3 => '200italic',
|
3634 |
+
4 => '300',
|
3635 |
+
5 => '300italic',
|
3636 |
+
6 => 'regular',
|
3637 |
+
7 => 'italic',
|
3638 |
+
8 => '500',
|
3639 |
+
9 => '500italic',
|
3640 |
+
10 => '600',
|
3641 |
+
11 => '600italic',
|
3642 |
+
12 => '700',
|
3643 |
+
13 => '700italic',
|
3644 |
+
14 => '800',
|
3645 |
+
15 => '800italic',
|
3646 |
+
16 => '900',
|
3647 |
+
17 => '900italic',
|
3648 |
+
),
|
3649 |
+
'Prosto One' =>
|
3650 |
+
array(
|
3651 |
+
0 => 'regular',
|
3652 |
+
),
|
3653 |
+
'Proza Libre' =>
|
3654 |
+
array(
|
3655 |
+
0 => 'regular',
|
3656 |
+
1 => 'italic',
|
3657 |
+
2 => '500',
|
3658 |
+
3 => '500italic',
|
3659 |
+
4 => '600',
|
3660 |
+
5 => '600italic',
|
3661 |
+
6 => '700',
|
3662 |
+
7 => '700italic',
|
3663 |
+
8 => '800',
|
3664 |
+
9 => '800italic',
|
3665 |
+
),
|
3666 |
+
'Puritan' =>
|
3667 |
+
array(
|
3668 |
+
0 => 'regular',
|
3669 |
+
1 => 'italic',
|
3670 |
+
2 => '700',
|
3671 |
+
3 => '700italic',
|
3672 |
+
),
|
3673 |
+
'Purple Purse' =>
|
3674 |
+
array(
|
3675 |
+
0 => 'regular',
|
3676 |
+
),
|
3677 |
+
'Quando' =>
|
3678 |
+
array(
|
3679 |
+
0 => 'regular',
|
3680 |
+
),
|
3681 |
+
'Quantico' =>
|
3682 |
+
array(
|
3683 |
+
0 => 'regular',
|
3684 |
+
1 => 'italic',
|
3685 |
+
2 => '700',
|
3686 |
+
3 => '700italic',
|
3687 |
+
),
|
3688 |
+
'Quattrocento' =>
|
3689 |
+
array(
|
3690 |
+
0 => 'regular',
|
3691 |
+
1 => '700',
|
3692 |
+
),
|
3693 |
+
'Quattrocento Sans' =>
|
3694 |
+
array(
|
3695 |
+
0 => 'regular',
|
3696 |
+
1 => 'italic',
|
3697 |
+
2 => '700',
|
3698 |
+
3 => '700italic',
|
3699 |
+
),
|
3700 |
+
'Questrial' =>
|
3701 |
+
array(
|
3702 |
+
0 => 'regular',
|
3703 |
+
),
|
3704 |
+
'Quicksand' =>
|
3705 |
+
array(
|
3706 |
+
0 => '300',
|
3707 |
+
1 => 'regular',
|
3708 |
+
2 => '500',
|
3709 |
+
3 => '700',
|
3710 |
+
),
|
3711 |
+
'Quintessential' =>
|
3712 |
+
array(
|
3713 |
+
0 => 'regular',
|
3714 |
+
),
|
3715 |
+
'Qwigley' =>
|
3716 |
+
array(
|
3717 |
+
0 => 'regular',
|
3718 |
+
),
|
3719 |
+
'Racing Sans One' =>
|
3720 |
+
array(
|
3721 |
+
0 => 'regular',
|
3722 |
+
),
|
3723 |
+
'Radley' =>
|
3724 |
+
array(
|
3725 |
+
0 => 'regular',
|
3726 |
+
1 => 'italic',
|
3727 |
+
),
|
3728 |
+
'Rajdhani' =>
|
3729 |
+
array(
|
3730 |
+
0 => '300',
|
3731 |
+
1 => 'regular',
|
3732 |
+
2 => '500',
|
3733 |
+
3 => '600',
|
3734 |
+
4 => '700',
|
3735 |
+
),
|
3736 |
+
'Rakkas' =>
|
3737 |
+
array(
|
3738 |
+
0 => 'regular',
|
3739 |
+
),
|
3740 |
+
'Raleway' =>
|
3741 |
+
array(
|
3742 |
+
0 => '100',
|
3743 |
+
1 => '100italic',
|
3744 |
+
2 => '200',
|
3745 |
+
3 => '200italic',
|
3746 |
+
4 => '300',
|
3747 |
+
5 => '300italic',
|
3748 |
+
6 => 'regular',
|
3749 |
+
7 => 'italic',
|
3750 |
+
8 => '500',
|
3751 |
+
9 => '500italic',
|
3752 |
+
10 => '600',
|
3753 |
+
11 => '600italic',
|
3754 |
+
12 => '700',
|
3755 |
+
13 => '700italic',
|
3756 |
+
14 => '800',
|
3757 |
+
15 => '800italic',
|
3758 |
+
16 => '900',
|
3759 |
+
17 => '900italic',
|
3760 |
+
),
|
3761 |
+
'Raleway Dots' =>
|
3762 |
+
array(
|
3763 |
+
0 => 'regular',
|
3764 |
+
),
|
3765 |
+
'Ramabhadra' =>
|
3766 |
+
array(
|
3767 |
+
0 => 'regular',
|
3768 |
+
),
|
3769 |
+
'Ramaraja' =>
|
3770 |
+
array(
|
3771 |
+
0 => 'regular',
|
3772 |
+
),
|
3773 |
+
'Rambla' =>
|
3774 |
+
array(
|
3775 |
+
0 => 'regular',
|
3776 |
+
1 => 'italic',
|
3777 |
+
2 => '700',
|
3778 |
+
3 => '700italic',
|
3779 |
+
),
|
3780 |
+
'Rammetto One' =>
|
3781 |
+
array(
|
3782 |
+
0 => 'regular',
|
3783 |
+
),
|
3784 |
+
'Ranchers' =>
|
3785 |
+
array(
|
3786 |
+
0 => 'regular',
|
3787 |
+
),
|
3788 |
+
'Rancho' =>
|
3789 |
+
array(
|
3790 |
+
0 => 'regular',
|
3791 |
+
),
|
3792 |
+
'Ranga' =>
|
3793 |
+
array(
|
3794 |
+
0 => 'regular',
|
3795 |
+
1 => '700',
|
3796 |
+
),
|
3797 |
+
'Rasa' =>
|
3798 |
+
array(
|
3799 |
+
0 => '300',
|
3800 |
+
1 => 'regular',
|
3801 |
+
2 => '500',
|
3802 |
+
3 => '600',
|
3803 |
+
4 => '700',
|
3804 |
+
),
|
3805 |
+
'Rationale' =>
|
3806 |
+
array(
|
3807 |
+
0 => 'regular',
|
3808 |
+
),
|
3809 |
+
'Ravi Prakash' =>
|
3810 |
+
array(
|
3811 |
+
0 => 'regular',
|
3812 |
+
),
|
3813 |
+
'Redressed' =>
|
3814 |
+
array(
|
3815 |
+
0 => 'regular',
|
3816 |
+
),
|
3817 |
+
'Reem Kufi' =>
|
3818 |
+
array(
|
3819 |
+
0 => 'regular',
|
3820 |
+
),
|
3821 |
+
'Reenie Beanie' =>
|
3822 |
+
array(
|
3823 |
+
0 => 'regular',
|
3824 |
+
),
|
3825 |
+
'Revalia' =>
|
3826 |
+
array(
|
3827 |
+
0 => 'regular',
|
3828 |
+
),
|
3829 |
+
'Rhodium Libre' =>
|
3830 |
+
array(
|
3831 |
+
0 => 'regular',
|
3832 |
+
),
|
3833 |
+
'Ribeye' =>
|
3834 |
+
array(
|
3835 |
+
0 => 'regular',
|
3836 |
+
),
|
3837 |
+
'Ribeye Marrow' =>
|
3838 |
+
array(
|
3839 |
+
0 => 'regular',
|
3840 |
+
),
|
3841 |
+
'Righteous' =>
|
3842 |
+
array(
|
3843 |
+
0 => 'regular',
|
3844 |
+
),
|
3845 |
+
'Risque' =>
|
3846 |
+
array(
|
3847 |
+
0 => 'regular',
|
3848 |
+
),
|
3849 |
+
'Roboto' =>
|
3850 |
+
array(
|
3851 |
+
0 => '100',
|
3852 |
+
1 => '100italic',
|
3853 |
+
2 => '300',
|
3854 |
+
3 => '300italic',
|
3855 |
+
4 => 'regular',
|
3856 |
+
5 => 'italic',
|
3857 |
+
6 => '500',
|
3858 |
+
7 => '500italic',
|
3859 |
+
8 => '700',
|
3860 |
+
9 => '700italic',
|
3861 |
+
10 => '900',
|
3862 |
+
11 => '900italic',
|
3863 |
+
),
|
3864 |
+
'Roboto Condensed' =>
|
3865 |
+
array(
|
3866 |
+
0 => '300',
|
3867 |
+
1 => '300italic',
|
3868 |
+
2 => 'regular',
|
3869 |
+
3 => 'italic',
|
3870 |
+
4 => '700',
|
3871 |
+
5 => '700italic',
|
3872 |
+
),
|
3873 |
+
'Roboto Mono' =>
|
3874 |
+
array(
|
3875 |
+
0 => '100',
|
3876 |
+
1 => '100italic',
|
3877 |
+
2 => '300',
|
3878 |
+
3 => '300italic',
|
3879 |
+
4 => 'regular',
|
3880 |
+
5 => 'italic',
|
3881 |
+
6 => '500',
|
3882 |
+
7 => '500italic',
|
3883 |
+
8 => '700',
|
3884 |
+
9 => '700italic',
|
3885 |
+
),
|
3886 |
+
'Roboto Slab' =>
|
3887 |
+
array(
|
3888 |
+
0 => '100',
|
3889 |
+
1 => '300',
|
3890 |
+
2 => 'regular',
|
3891 |
+
3 => '700',
|
3892 |
+
),
|
3893 |
+
'Rochester' =>
|
3894 |
+
array(
|
3895 |
+
0 => 'regular',
|
3896 |
+
),
|
3897 |
+
'Rock Salt' =>
|
3898 |
+
array(
|
3899 |
+
0 => 'regular',
|
3900 |
+
),
|
3901 |
+
'Rokkitt' =>
|
3902 |
+
array(
|
3903 |
+
0 => '100',
|
3904 |
+
1 => '200',
|
3905 |
+
2 => '300',
|
3906 |
+
3 => 'regular',
|
3907 |
+
4 => '500',
|
3908 |
+
5 => '600',
|
3909 |
+
6 => '700',
|
3910 |
+
7 => '800',
|
3911 |
+
8 => '900',
|
3912 |
+
),
|
3913 |
+
'Romanesco' =>
|
3914 |
+
array(
|
3915 |
+
0 => 'regular',
|
3916 |
+
),
|
3917 |
+
'Ropa Sans' =>
|
3918 |
+
array(
|
3919 |
+
0 => 'regular',
|
3920 |
+
1 => 'italic',
|
3921 |
+
),
|
3922 |
+
'Rosario' =>
|
3923 |
+
array(
|
3924 |
+
0 => 'regular',
|
3925 |
+
1 => 'italic',
|
3926 |
+
2 => '700',
|
3927 |
+
3 => '700italic',
|
3928 |
+
),
|
3929 |
+
'Rosarivo' =>
|
3930 |
+
array(
|
3931 |
+
0 => 'regular',
|
3932 |
+
1 => 'italic',
|
3933 |
+
),
|
3934 |
+
'Rouge Script' =>
|
3935 |
+
array(
|
3936 |
+
0 => 'regular',
|
3937 |
+
),
|
3938 |
+
'Rozha One' =>
|
3939 |
+
array(
|
3940 |
+
0 => 'regular',
|
3941 |
+
),
|
3942 |
+
'Rubik' =>
|
3943 |
+
array(
|
3944 |
+
0 => '300',
|
3945 |
+
1 => '300italic',
|
3946 |
+
2 => 'regular',
|
3947 |
+
3 => 'italic',
|
3948 |
+
4 => '500',
|
3949 |
+
5 => '500italic',
|
3950 |
+
6 => '700',
|
3951 |
+
7 => '700italic',
|
3952 |
+
8 => '900',
|
3953 |
+
9 => '900italic',
|
3954 |
+
),
|
3955 |
+
'Rubik Mono One' =>
|
3956 |
+
array(
|
3957 |
+
0 => 'regular',
|
3958 |
+
),
|
3959 |
+
'Ruda' =>
|
3960 |
+
array(
|
3961 |
+
0 => 'regular',
|
3962 |
+
1 => '700',
|
3963 |
+
2 => '900',
|
3964 |
+
),
|
3965 |
+
'Rufina' =>
|
3966 |
+
array(
|
3967 |
+
0 => 'regular',
|
3968 |
+
1 => '700',
|
3969 |
+
),
|
3970 |
+
'Ruge Boogie' =>
|
3971 |
+
array(
|
3972 |
+
0 => 'regular',
|
3973 |
+
),
|
3974 |
+
'Ruluko' =>
|
3975 |
+
array(
|
3976 |
+
0 => 'regular',
|
3977 |
+
),
|
3978 |
+
'Rum Raisin' =>
|
3979 |
+
array(
|
3980 |
+
0 => 'regular',
|
3981 |
+
),
|
3982 |
+
'Ruslan Display' =>
|
3983 |
+
array(
|
3984 |
+
0 => 'regular',
|
3985 |
+
),
|
3986 |
+
'Russo One' =>
|
3987 |
+
array(
|
3988 |
+
0 => 'regular',
|
3989 |
+
),
|
3990 |
+
'Ruthie' =>
|
3991 |
+
array(
|
3992 |
+
0 => 'regular',
|
3993 |
+
),
|
3994 |
+
'Rye' =>
|
3995 |
+
array(
|
3996 |
+
0 => 'regular',
|
3997 |
+
),
|
3998 |
+
'Sacramento' =>
|
3999 |
+
array(
|
4000 |
+
0 => 'regular',
|
4001 |
+
),
|
4002 |
+
'Sahitya' =>
|
4003 |
+
array(
|
4004 |
+
0 => 'regular',
|
4005 |
+
1 => '700',
|
4006 |
+
),
|
4007 |
+
'Sail' =>
|
4008 |
+
array(
|
4009 |
+
0 => 'regular',
|
4010 |
+
),
|
4011 |
+
'Saira' =>
|
4012 |
+
array(
|
4013 |
+
0 => '100',
|
4014 |
+
1 => '200',
|
4015 |
+
2 => '300',
|
4016 |
+
3 => 'regular',
|
4017 |
+
4 => '500',
|
4018 |
+
5 => '600',
|
4019 |
+
6 => '700',
|
4020 |
+
7 => '800',
|
4021 |
+
8 => '900',
|
4022 |
+
),
|
4023 |
+
'Saira Condensed' =>
|
4024 |
+
array(
|
4025 |
+
0 => '100',
|
4026 |
+
1 => '200',
|
4027 |
+
2 => '300',
|
4028 |
+
3 => 'regular',
|
4029 |
+
4 => '500',
|
4030 |
+
5 => '600',
|
4031 |
+
6 => '700',
|
4032 |
+
7 => '800',
|
4033 |
+
8 => '900',
|
4034 |
+
),
|
4035 |
+
'Saira Extra Condensed' =>
|
4036 |
+
array(
|
4037 |
+
0 => '100',
|
4038 |
+
1 => '200',
|
4039 |
+
2 => '300',
|
4040 |
+
3 => 'regular',
|
4041 |
+
4 => '500',
|
4042 |
+
5 => '600',
|
4043 |
+
6 => '700',
|
4044 |
+
7 => '800',
|
4045 |
+
8 => '900',
|
4046 |
+
),
|
4047 |
+
'Saira Semi Condensed' =>
|
4048 |
+
array(
|
4049 |
+
0 => '100',
|
4050 |
+
1 => '200',
|
4051 |
+
2 => '300',
|
4052 |
+
3 => 'regular',
|
4053 |
+
4 => '500',
|
4054 |
+
5 => '600',
|
4055 |
+
6 => '700',
|
4056 |
+
7 => '800',
|
4057 |
+
8 => '900',
|
4058 |
+
),
|
4059 |
+
'Salsa' =>
|
4060 |
+
array(
|
4061 |
+
0 => 'regular',
|
4062 |
+
),
|
4063 |
+
'Sanchez' =>
|
4064 |
+
array(
|
4065 |
+
0 => 'regular',
|
4066 |
+
1 => 'italic',
|
4067 |
+
),
|
4068 |
+
'Sancreek' =>
|
4069 |
+
array(
|
4070 |
+
0 => 'regular',
|
4071 |
+
),
|
4072 |
+
'Sansita' =>
|
4073 |
+
array(
|
4074 |
+
0 => 'regular',
|
4075 |
+
1 => 'italic',
|
4076 |
+
2 => '700',
|
4077 |
+
3 => '700italic',
|
4078 |
+
4 => '800',
|
4079 |
+
5 => '800italic',
|
4080 |
+
6 => '900',
|
4081 |
+
7 => '900italic',
|
4082 |
+
),
|
4083 |
+
'Sarala' =>
|
4084 |
+
array(
|
4085 |
+
0 => 'regular',
|
4086 |
+
1 => '700',
|
4087 |
+
),
|
4088 |
+
'Sarina' =>
|
4089 |
+
array(
|
4090 |
+
0 => 'regular',
|
4091 |
+
),
|
4092 |
+
'Sarpanch' =>
|
4093 |
+
array(
|
4094 |
+
0 => 'regular',
|
4095 |
+
1 => '500',
|
4096 |
+
2 => '600',
|
4097 |
+
3 => '700',
|
4098 |
+
4 => '800',
|
4099 |
+
5 => '900',
|
4100 |
+
),
|
4101 |
+
'Satisfy' =>
|
4102 |
+
array(
|
4103 |
+
0 => 'regular',
|
4104 |
+
),
|
4105 |
+
'Scada' =>
|
4106 |
+
array(
|
4107 |
+
0 => 'regular',
|
4108 |
+
1 => 'italic',
|
4109 |
+
2 => '700',
|
4110 |
+
3 => '700italic',
|
4111 |
+
),
|
4112 |
+
'Scheherazade' =>
|
4113 |
+
array(
|
4114 |
+
0 => 'regular',
|
4115 |
+
1 => '700',
|
4116 |
+
),
|
4117 |
+
'Schoolbell' =>
|
4118 |
+
array(
|
4119 |
+
0 => 'regular',
|
4120 |
+
),
|
4121 |
+
'Scope One' =>
|
4122 |
+
array(
|
4123 |
+
0 => 'regular',
|
4124 |
+
),
|
4125 |
+
'Seaweed Script' =>
|
4126 |
+
array(
|
4127 |
+
0 => 'regular',
|
4128 |
+
),
|
4129 |
+
'Secular One' =>
|
4130 |
+
array(
|
4131 |
+
0 => 'regular',
|
4132 |
+
),
|
4133 |
+
'Sedgwick Ave' =>
|
4134 |
+
array(
|
4135 |
+
0 => 'regular',
|
4136 |
+
),
|
4137 |
+
'Sedgwick Ave Display' =>
|
4138 |
+
array(
|
4139 |
+
0 => 'regular',
|
4140 |
+
),
|
4141 |
+
'Sevillana' =>
|
4142 |
+
array(
|
4143 |
+
0 => 'regular',
|
4144 |
+
),
|
4145 |
+
'Seymour One' =>
|
4146 |
+
array(
|
4147 |
+
0 => 'regular',
|
4148 |
+
),
|
4149 |
+
'Shadows Into Light' =>
|
4150 |
+
array(
|
4151 |
+
0 => 'regular',
|
4152 |
+
),
|
4153 |
+
'Shadows Into Light Two' =>
|
4154 |
+
array(
|
4155 |
+
0 => 'regular',
|
4156 |
+
),
|
4157 |
+
'Shanti' =>
|
4158 |
+
array(
|
4159 |
+
0 => 'regular',
|
4160 |
+
),
|
4161 |
+
'Share' =>
|
4162 |
+
array(
|
4163 |
+
0 => 'regular',
|
4164 |
+
1 => 'italic',
|
4165 |
+
2 => '700',
|
4166 |
+
3 => '700italic',
|
4167 |
+
),
|
4168 |
+
'Share Tech' =>
|
4169 |
+
array(
|
4170 |
+
0 => 'regular',
|
4171 |
+
),
|
4172 |
+
'Share Tech Mono' =>
|
4173 |
+
array(
|
4174 |
+
0 => 'regular',
|
4175 |
+
),
|
4176 |
+
'Shojumaru' =>
|
4177 |
+
array(
|
4178 |
+
0 => 'regular',
|
4179 |
+
),
|
4180 |
+
'Short Stack' =>
|
4181 |
+
array(
|
4182 |
+
0 => 'regular',
|
4183 |
+
),
|
4184 |
+
'Shrikhand' =>
|
4185 |
+
array(
|
4186 |
+
0 => 'regular',
|
4187 |
+
),
|
4188 |
+
'Siemreap' =>
|
4189 |
+
array(
|
4190 |
+
0 => 'regular',
|
4191 |
+
),
|
4192 |
+
'Sigmar One' =>
|
4193 |
+
array(
|
4194 |
+
0 => 'regular',
|
4195 |
+
),
|
4196 |
+
'Signika' =>
|
4197 |
+
array(
|
4198 |
+
0 => '300',
|
4199 |
+
1 => 'regular',
|
4200 |
+
2 => '600',
|
4201 |
+
3 => '700',
|
4202 |
+
),
|
4203 |
+
'Signika Negative' =>
|
4204 |
+
array(
|
4205 |
+
0 => '300',
|
4206 |
+
1 => 'regular',
|
4207 |
+
2 => '600',
|
4208 |
+
3 => '700',
|
4209 |
+
),
|
4210 |
+
'Simonetta' =>
|
4211 |
+
array(
|
4212 |
+
0 => 'regular',
|
4213 |
+
1 => 'italic',
|
4214 |
+
2 => '900',
|
4215 |
+
3 => '900italic',
|
4216 |
+
),
|
4217 |
+
'Sintony' =>
|
4218 |
+
array(
|
4219 |
+
0 => 'regular',
|
4220 |
+
1 => '700',
|
4221 |
+
),
|
4222 |
+
'Sirin Stencil' =>
|
4223 |
+
array(
|
4224 |
+
0 => 'regular',
|
4225 |
+
),
|
4226 |
+
'Six Caps' =>
|
4227 |
+
array(
|
4228 |
+
0 => 'regular',
|
4229 |
+
),
|
4230 |
+
'Skranji' =>
|
4231 |
+
array(
|
4232 |
+
0 => 'regular',
|
4233 |
+
1 => '700',
|
4234 |
+
),
|
4235 |
+
'Slabo 13px' =>
|
4236 |
+
array(
|
4237 |
+
0 => 'regular',
|
4238 |
+
),
|
4239 |
+
'Slabo 27px' =>
|
4240 |
+
array(
|
4241 |
+
0 => 'regular',
|
4242 |
+
),
|
4243 |
+
'Slackey' =>
|
4244 |
+
array(
|
4245 |
+
0 => 'regular',
|
4246 |
+
),
|
4247 |
+
'Smokum' =>
|
4248 |
+
array(
|
4249 |
+
0 => 'regular',
|
4250 |
+
),
|
4251 |
+
'Smythe' =>
|
4252 |
+
array(
|
4253 |
+
0 => 'regular',
|
4254 |
+
),
|
4255 |
+
'Sniglet' =>
|
4256 |
+
array(
|
4257 |
+
0 => 'regular',
|
4258 |
+
1 => '800',
|
4259 |
+
),
|
4260 |
+
'Snippet' =>
|
4261 |
+
array(
|
4262 |
+
0 => 'regular',
|
4263 |
+
),
|
4264 |
+
'Snowburst One' =>
|
4265 |
+
array(
|
4266 |
+
0 => 'regular',
|
4267 |
+
),
|
4268 |
+
'Sofadi One' =>
|
4269 |
+
array(
|
4270 |
+
0 => 'regular',
|
4271 |
+
),
|
4272 |
+
'Sofia' =>
|
4273 |
+
array(
|
4274 |
+
0 => 'regular',
|
4275 |
+
),
|
4276 |
+
'Sonsie One' =>
|
4277 |
+
array(
|
4278 |
+
0 => 'regular',
|
4279 |
+
),
|
4280 |
+
'Sorts Mill Goudy' =>
|
4281 |
+
array(
|
4282 |
+
0 => 'regular',
|
4283 |
+
1 => 'italic',
|
4284 |
+
),
|
4285 |
+
'Source Code Pro' =>
|
4286 |
+
array(
|
4287 |
+
0 => '200',
|
4288 |
+
1 => '300',
|
4289 |
+
2 => 'regular',
|
4290 |
+
3 => '500',
|
4291 |
+
4 => '600',
|
4292 |
+
5 => '700',
|
4293 |
+
6 => '900',
|
4294 |
+
),
|
4295 |
+
'Source Sans Pro' =>
|
4296 |
+
array(
|
4297 |
+
0 => '200',
|
4298 |
+
1 => '200italic',
|
4299 |
+
2 => '300',
|
4300 |
+
3 => '300italic',
|
4301 |
+
4 => 'regular',
|
4302 |
+
5 => 'italic',
|
4303 |
+
6 => '600',
|
4304 |
+
7 => '600italic',
|
4305 |
+
8 => '700',
|
4306 |
+
9 => '700italic',
|
4307 |
+
10 => '900',
|
4308 |
+
11 => '900italic',
|
4309 |
+
),
|
4310 |
+
'Source Serif Pro' =>
|
4311 |
+
array(
|
4312 |
+
0 => 'regular',
|
4313 |
+
1 => '600',
|
4314 |
+
2 => '700',
|
4315 |
+
),
|
4316 |
+
'Space Mono' =>
|
4317 |
+
array(
|
4318 |
+
0 => 'regular',
|
4319 |
+
1 => 'italic',
|
4320 |
+
2 => '700',
|
4321 |
+
3 => '700italic',
|
4322 |
+
),
|
4323 |
+
'Special Elite' =>
|
4324 |
+
array(
|
4325 |
+
0 => 'regular',
|
4326 |
+
),
|
4327 |
+
'Spectral' =>
|
4328 |
+
array(
|
4329 |
+
0 => '200',
|
4330 |
+
1 => '200italic',
|
4331 |
+
2 => '300',
|
4332 |
+
3 => '300italic',
|
4333 |
+
4 => 'regular',
|
4334 |
+
5 => 'italic',
|
4335 |
+
6 => '500',
|
4336 |
+
7 => '500italic',
|
4337 |
+
8 => '600',
|
4338 |
+
9 => '600italic',
|
4339 |
+
10 => '700',
|
4340 |
+
11 => '700italic',
|
4341 |
+
12 => '800',
|
4342 |
+
13 => '800italic',
|
4343 |
+
),
|
4344 |
+
'Spectral SC' =>
|
4345 |
+
array(
|
4346 |
+
0 => '200',
|
4347 |
+
1 => '200italic',
|
4348 |
+
2 => '300',
|
4349 |
+
3 => '300italic',
|
4350 |
+
4 => 'regular',
|
4351 |
+
5 => 'italic',
|
4352 |
+
6 => '500',
|
4353 |
+
7 => '500italic',
|
4354 |
+
8 => '600',
|
4355 |
+
9 => '600italic',
|
4356 |
+
10 => '700',
|
4357 |
+
11 => '700italic',
|
4358 |
+
12 => '800',
|
4359 |
+
13 => '800italic',
|
4360 |
+
),
|
4361 |
+
'Spicy Rice' =>
|
4362 |
+
array(
|
4363 |
+
0 => 'regular',
|
4364 |
+
),
|
4365 |
+
'Spinnaker' =>
|
4366 |
+
array(
|
4367 |
+
0 => 'regular',
|
4368 |
+
),
|
4369 |
+
'Spirax' =>
|
4370 |
+
array(
|
4371 |
+
0 => 'regular',
|
4372 |
+
),
|
4373 |
+
'Squada One' =>
|
4374 |
+
array(
|
4375 |
+
0 => 'regular',
|
4376 |
+
),
|
4377 |
+
'Sree Krushnadevaraya' =>
|
4378 |
+
array(
|
4379 |
+
0 => 'regular',
|
4380 |
+
),
|
4381 |
+
'Sriracha' =>
|
4382 |
+
array(
|
4383 |
+
0 => 'regular',
|
4384 |
+
),
|
4385 |
+
'Stalemate' =>
|
4386 |
+
array(
|
4387 |
+
0 => 'regular',
|
4388 |
+
),
|
4389 |
+
'Stalinist One' =>
|
4390 |
+
array(
|
4391 |
+
0 => 'regular',
|
4392 |
+
),
|
4393 |
+
'Stardos Stencil' =>
|
4394 |
+
array(
|
4395 |
+
0 => 'regular',
|
4396 |
+
1 => '700',
|
4397 |
+
),
|
4398 |
+
'Stint Ultra Condensed' =>
|
4399 |
+
array(
|
4400 |
+
0 => 'regular',
|
4401 |
+
),
|
4402 |
+
'Stint Ultra Expanded' =>
|
4403 |
+
array(
|
4404 |
+
0 => 'regular',
|
4405 |
+
),
|
4406 |
+
'Stoke' =>
|
4407 |
+
array(
|
4408 |
+
0 => '300',
|
4409 |
+
1 => 'regular',
|
4410 |
+
),
|
4411 |
+
'Strait' =>
|
4412 |
+
array(
|
4413 |
+
0 => 'regular',
|
4414 |
+
),
|
4415 |
+
'Sue Ellen Francisco' =>
|
4416 |
+
array(
|
4417 |
+
0 => 'regular',
|
4418 |
+
),
|
4419 |
+
'Suez One' =>
|
4420 |
+
array(
|
4421 |
+
0 => 'regular',
|
4422 |
+
),
|
4423 |
+
'Sumana' =>
|
4424 |
+
array(
|
4425 |
+
0 => 'regular',
|
4426 |
+
1 => '700',
|
4427 |
+
),
|
4428 |
+
'Sunshiney' =>
|
4429 |
+
array(
|
4430 |
+
0 => 'regular',
|
4431 |
+
),
|
4432 |
+
'Supermercado One' =>
|
4433 |
+
array(
|
4434 |
+
0 => 'regular',
|
4435 |
+
),
|
4436 |
+
'Sura' =>
|
4437 |
+
array(
|
4438 |
+
0 => 'regular',
|
4439 |
+
1 => '700',
|
4440 |
+
),
|
4441 |
+
'Suranna' =>
|
4442 |
+
array(
|
4443 |
+
0 => 'regular',
|
4444 |
+
),
|
4445 |
+
'Suravaram' =>
|
4446 |
+
array(
|
4447 |
+
0 => 'regular',
|
4448 |
+
),
|
4449 |
+
'Suwannaphum' =>
|
4450 |
+
array(
|
4451 |
+
0 => 'regular',
|
4452 |
+
),
|
4453 |
+
'Swanky and Moo Moo' =>
|
4454 |
+
array(
|
4455 |
+
0 => 'regular',
|
4456 |
+
),
|
4457 |
+
'Syncopate' =>
|
4458 |
+
array(
|
4459 |
+
0 => 'regular',
|
4460 |
+
1 => '700',
|
4461 |
+
),
|
4462 |
+
'Tangerine' =>
|
4463 |
+
array(
|
4464 |
+
0 => 'regular',
|
4465 |
+
1 => '700',
|
4466 |
+
),
|
4467 |
+
'Taprom' =>
|
4468 |
+
array(
|
4469 |
+
0 => 'regular',
|
4470 |
+
),
|
4471 |
+
'Tauri' =>
|
4472 |
+
array(
|
4473 |
+
0 => 'regular',
|
4474 |
+
),
|
4475 |
+
'Taviraj' =>
|
4476 |
+
array(
|
4477 |
+
0 => '100',
|
4478 |
+
1 => '100italic',
|
4479 |
+
2 => '200',
|
4480 |
+
3 => '200italic',
|
4481 |
+
4 => '300',
|
4482 |
+
5 => '300italic',
|
4483 |
+
6 => 'regular',
|
4484 |
+
7 => 'italic',
|
4485 |
+
8 => '500',
|
4486 |
+
9 => '500italic',
|
4487 |
+
10 => '600',
|
4488 |
+
11 => '600italic',
|
4489 |
+
12 => '700',
|
4490 |
+
13 => '700italic',
|
4491 |
+
14 => '800',
|
4492 |
+
15 => '800italic',
|
4493 |
+
16 => '900',
|
4494 |
+
17 => '900italic',
|
4495 |
+
),
|
4496 |
+
'Teko' =>
|
4497 |
+
array(
|
4498 |
+
0 => '300',
|
4499 |
+
1 => 'regular',
|
4500 |
+
2 => '500',
|
4501 |
+
3 => '600',
|
4502 |
+
4 => '700',
|
4503 |
+
),
|
4504 |
+
'Telex' =>
|
4505 |
+
array(
|
4506 |
+
0 => 'regular',
|
4507 |
+
),
|
4508 |
+
'Tenali Ramakrishna' =>
|
4509 |
+
array(
|
4510 |
+
0 => 'regular',
|
4511 |
+
),
|
4512 |
+
'Tenor Sans' =>
|
4513 |
+
array(
|
4514 |
+
0 => 'regular',
|
4515 |
+
),
|
4516 |
+
'Text Me One' =>
|
4517 |
+
array(
|
4518 |
+
0 => 'regular',
|
4519 |
+
),
|
4520 |
+
'The Girl Next Door' =>
|
4521 |
+
array(
|
4522 |
+
0 => 'regular',
|
4523 |
+
),
|
4524 |
+
'Tienne' =>
|
4525 |
+
array(
|
4526 |
+
0 => 'regular',
|
4527 |
+
1 => '700',
|
4528 |
+
2 => '900',
|
4529 |
+
),
|
4530 |
+
'Tillana' =>
|
4531 |
+
array(
|
4532 |
+
0 => 'regular',
|
4533 |
+
1 => '500',
|
4534 |
+
2 => '600',
|
4535 |
+
3 => '700',
|
4536 |
+
4 => '800',
|
4537 |
+
),
|
4538 |
+
'Timmana' =>
|
4539 |
+
array(
|
4540 |
+
0 => 'regular',
|
4541 |
+
),
|
4542 |
+
'Tinos' =>
|
4543 |
+
array(
|
4544 |
+
0 => 'regular',
|
4545 |
+
1 => 'italic',
|
4546 |
+
2 => '700',
|
4547 |
+
3 => '700italic',
|
4548 |
+
),
|
4549 |
+
'Titan One' =>
|
4550 |
+
array(
|
4551 |
+
0 => 'regular',
|
4552 |
+
),
|
4553 |
+
'Titillium Web' =>
|
4554 |
+
array(
|
4555 |
+
0 => '200',
|
4556 |
+
1 => '200italic',
|
4557 |
+
2 => '300',
|
4558 |
+
3 => '300italic',
|
4559 |
+
4 => 'regular',
|
4560 |
+
5 => 'italic',
|
4561 |
+
6 => '600',
|
4562 |
+
7 => '600italic',
|
4563 |
+
8 => '700',
|
4564 |
+
9 => '700italic',
|
4565 |
+
10 => '900',
|
4566 |
+
),
|
4567 |
+
'Trade Winds' =>
|
4568 |
+
array(
|
4569 |
+
0 => 'regular',
|
4570 |
+
),
|
4571 |
+
'Trirong' =>
|
4572 |
+
array(
|
4573 |
+
0 => '100',
|
4574 |
+
1 => '100italic',
|
4575 |
+
2 => '200',
|
4576 |
+
3 => '200italic',
|
4577 |
+
4 => '300',
|
4578 |
+
5 => '300italic',
|
4579 |
+
6 => 'regular',
|
4580 |
+
7 => 'italic',
|
4581 |
+
8 => '500',
|
4582 |
+
9 => '500italic',
|
4583 |
+
10 => '600',
|
4584 |
+
11 => '600italic',
|
4585 |
+
12 => '700',
|
4586 |
+
13 => '700italic',
|
4587 |
+
14 => '800',
|
4588 |
+
15 => '800italic',
|
4589 |
+
16 => '900',
|
4590 |
+
17 => '900italic',
|
4591 |
+
),
|
4592 |
+
'Trocchi' =>
|
4593 |
+
array(
|
4594 |
+
0 => 'regular',
|
4595 |
+
),
|
4596 |
+
'Trochut' =>
|
4597 |
+
array(
|
4598 |
+
0 => 'regular',
|
4599 |
+
1 => 'italic',
|
4600 |
+
2 => '700',
|
4601 |
+
),
|
4602 |
+
'Trykker' =>
|
4603 |
+
array(
|
4604 |
+
0 => 'regular',
|
4605 |
+
),
|
4606 |
+
'Tulpen One' =>
|
4607 |
+
array(
|
4608 |
+
0 => 'regular',
|
4609 |
+
),
|
4610 |
+
'Ubuntu' =>
|
4611 |
+
array(
|
4612 |
+
0 => '300',
|
4613 |
+
1 => '300italic',
|
4614 |
+
2 => 'regular',
|
4615 |
+
3 => 'italic',
|
4616 |
+
4 => '500',
|
4617 |
+
5 => '500italic',
|
4618 |
+
6 => '700',
|
4619 |
+
7 => '700italic',
|
4620 |
+
),
|
4621 |
+
'Ubuntu Condensed' =>
|
4622 |
+
array(
|
4623 |
+
0 => 'regular',
|
4624 |
+
),
|
4625 |
+
'Ubuntu Mono' =>
|
4626 |
+
array(
|
4627 |
+
0 => 'regular',
|
4628 |
+
1 => 'italic',
|
4629 |
+
2 => '700',
|
4630 |
+
3 => '700italic',
|
4631 |
+
),
|
4632 |
+
'Ultra' =>
|
4633 |
+
array(
|
4634 |
+
0 => 'regular',
|
4635 |
+
),
|
4636 |
+
'Uncial Antiqua' =>
|
4637 |
+
array(
|
4638 |
+
0 => 'regular',
|
4639 |
+
),
|
4640 |
+
'Underdog' =>
|
4641 |
+
array(
|
4642 |
+
0 => 'regular',
|
4643 |
+
),
|
4644 |
+
'Unica One' =>
|
4645 |
+
array(
|
4646 |
+
0 => 'regular',
|
4647 |
+
),
|
4648 |
+
'UnifrakturCook' =>
|
4649 |
+
array(
|
4650 |
+
0 => '700',
|
4651 |
+
),
|
4652 |
+
'UnifrakturMaguntia' =>
|
4653 |
+
array(
|
4654 |
+
0 => 'regular',
|
4655 |
+
),
|
4656 |
+
'Unkempt' =>
|
4657 |
+
array(
|
4658 |
+
0 => 'regular',
|
4659 |
+
1 => '700',
|
4660 |
+
),
|
4661 |
+
'Unlock' =>
|
4662 |
+
array(
|
4663 |
+
0 => 'regular',
|
4664 |
+
),
|
4665 |
+
'Unna' =>
|
4666 |
+
array(
|
4667 |
+
0 => 'regular',
|
4668 |
+
1 => 'italic',
|
4669 |
+
2 => '700',
|
4670 |
+
3 => '700italic',
|
4671 |
+
),
|
4672 |
+
'VT323' =>
|
4673 |
+
array(
|
4674 |
+
0 => 'regular',
|
4675 |
+
),
|
4676 |
+
'Vampiro One' =>
|
4677 |
+
array(
|
4678 |
+
0 => 'regular',
|
4679 |
+
),
|
4680 |
+
'Varela' =>
|
4681 |
+
array(
|
4682 |
+
0 => 'regular',
|
4683 |
+
),
|
4684 |
+
'Varela Round' =>
|
4685 |
+
array(
|
4686 |
+
0 => 'regular',
|
4687 |
+
),
|
4688 |
+
'Vast Shadow' =>
|
4689 |
+
array(
|
4690 |
+
0 => 'regular',
|
4691 |
+
),
|
4692 |
+
'Vesper Libre' =>
|
4693 |
+
array(
|
4694 |
+
0 => 'regular',
|
4695 |
+
1 => '500',
|
4696 |
+
2 => '700',
|
4697 |
+
3 => '900',
|
4698 |
+
),
|
4699 |
+
'Vibur' =>
|
4700 |
+
array(
|
4701 |
+
0 => 'regular',
|
4702 |
+
),
|
4703 |
+
'Vidaloka' =>
|
4704 |
+
array(
|
4705 |
+
0 => 'regular',
|
4706 |
+
),
|
4707 |
+
'Viga' =>
|
4708 |
+
array(
|
4709 |
+
0 => 'regular',
|
4710 |
+
),
|
4711 |
+
'Voces' =>
|
4712 |
+
array(
|
4713 |
+
0 => 'regular',
|
4714 |
+
),
|
4715 |
+
'Volkhov' =>
|
4716 |
+
array(
|
4717 |
+
0 => 'regular',
|
4718 |
+
1 => 'italic',
|
4719 |
+
2 => '700',
|
4720 |
+
3 => '700italic',
|
4721 |
+
),
|
4722 |
+
'Vollkorn' =>
|
4723 |
+
array(
|
4724 |
+
0 => 'regular',
|
4725 |
+
1 => 'italic',
|
4726 |
+
2 => '600',
|
4727 |
+
3 => '600italic',
|
4728 |
+
4 => '700',
|
4729 |
+
5 => '700italic',
|
4730 |
+
6 => '900',
|
4731 |
+
7 => '900italic',
|
4732 |
+
),
|
4733 |
+
'Vollkorn SC' =>
|
4734 |
+
array(
|
4735 |
+
0 => 'regular',
|
4736 |
+
1 => '600',
|
4737 |
+
2 => '700',
|
4738 |
+
3 => '900',
|
4739 |
+
),
|
4740 |
+
'Voltaire' =>
|
4741 |
+
array(
|
4742 |
+
0 => 'regular',
|
4743 |
+
),
|
4744 |
+
'Waiting for the Sunrise' =>
|
4745 |
+
array(
|
4746 |
+
0 => 'regular',
|
4747 |
+
),
|
4748 |
+
'Wallpoet' =>
|
4749 |
+
array(
|
4750 |
+
0 => 'regular',
|
4751 |
+
),
|
4752 |
+
'Walter Turncoat' =>
|
4753 |
+
array(
|
4754 |
+
0 => 'regular',
|
4755 |
+
),
|
4756 |
+
'Warnes' =>
|
4757 |
+
array(
|
4758 |
+
0 => 'regular',
|
4759 |
+
),
|
4760 |
+
'Wellfleet' =>
|
4761 |
+
array(
|
4762 |
+
0 => 'regular',
|
4763 |
+
),
|
4764 |
+
'Wendy One' =>
|
4765 |
+
array(
|
4766 |
+
0 => 'regular',
|
4767 |
+
),
|
4768 |
+
'Wire One' =>
|
4769 |
+
array(
|
4770 |
+
0 => 'regular',
|
4771 |
+
),
|
4772 |
+
'Work Sans' =>
|
4773 |
+
array(
|
4774 |
+
0 => '100',
|
4775 |
+
1 => '200',
|
4776 |
+
2 => '300',
|
4777 |
+
3 => 'regular',
|
4778 |
+
4 => '500',
|
4779 |
+
5 => '600',
|
4780 |
+
6 => '700',
|
4781 |
+
7 => '800',
|
4782 |
+
8 => '900',
|
4783 |
+
),
|
4784 |
+
'Yanone Kaffeesatz' =>
|
4785 |
+
array(
|
4786 |
+
0 => '200',
|
4787 |
+
1 => '300',
|
4788 |
+
2 => 'regular',
|
4789 |
+
3 => '700',
|
4790 |
+
),
|
4791 |
+
'Yantramanav' =>
|
4792 |
+
array(
|
4793 |
+
0 => '100',
|
4794 |
+
1 => '300',
|
4795 |
+
2 => 'regular',
|
4796 |
+
3 => '500',
|
4797 |
+
4 => '700',
|
4798 |
+
5 => '900',
|
4799 |
+
),
|
4800 |
+
'Yatra One' =>
|
4801 |
+
array(
|
4802 |
+
0 => 'regular',
|
4803 |
+
),
|
4804 |
+
'Yellowtail' =>
|
4805 |
+
array(
|
4806 |
+
0 => 'regular',
|
4807 |
+
),
|
4808 |
+
'Yeseva One' =>
|
4809 |
+
array(
|
4810 |
+
0 => 'regular',
|
4811 |
+
),
|
4812 |
+
'Yesteryear' =>
|
4813 |
+
array(
|
4814 |
+
0 => 'regular',
|
4815 |
+
),
|
4816 |
+
'Yrsa' =>
|
4817 |
+
array(
|
4818 |
+
0 => '300',
|
4819 |
+
1 => 'regular',
|
4820 |
+
2 => '500',
|
4821 |
+
3 => '600',
|
4822 |
+
4 => '700',
|
4823 |
+
),
|
4824 |
+
'Zeyada' =>
|
4825 |
+
array(
|
4826 |
+
0 => 'regular',
|
4827 |
+
),
|
4828 |
+
'Zilla Slab' =>
|
4829 |
+
array(
|
4830 |
+
0 => '300',
|
4831 |
+
1 => '300italic',
|
4832 |
+
2 => 'regular',
|
4833 |
+
3 => 'italic',
|
4834 |
+
4 => '500',
|
4835 |
+
5 => '500italic',
|
4836 |
+
6 => '600',
|
4837 |
+
7 => '600italic',
|
4838 |
+
8 => '700',
|
4839 |
+
9 => '700italic',
|
4840 |
+
),
|
4841 |
+
'Zilla Slab Highlight' =>
|
4842 |
+
array(
|
4843 |
+
0 => 'regular',
|
4844 |
+
1 => '700',
|
4845 |
+
),
|
4846 |
+
);
|
base/inc/less-functions.php
CHANGED
@@ -1,41 +1,41 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class siteorigin_lessc
|
5 |
-
*
|
6 |
-
* An extension to the SiteOrigin_LessC class that adds a few custom functions
|
7 |
-
*/
|
8 |
-
class SiteOrigin_Widgets_Less_Functions {
|
9 |
-
|
10 |
-
private $widget;
|
11 |
-
private $widget_instance;
|
12 |
-
|
13 |
-
function __construct($widget, $widget_instance){
|
14 |
-
$this->widget = $widget;
|
15 |
-
$this->widget_instance = $widget_instance;
|
16 |
-
}
|
17 |
-
|
18 |
-
/**
|
19 |
-
* @param SiteOrigin_LessC $c
|
20 |
-
*
|
21 |
-
* Register less functions in a SiteOrigin_LessC object
|
22 |
-
*/
|
23 |
-
function registerFunctions(&$c){
|
24 |
-
if( method_exists( $c, 'registerFunction' ) ) {
|
25 |
-
$c->registerFunction( 'length', array($this, 'length') );
|
26 |
-
}
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Very basic length function that checks the length of a list. Might need some more checks for other types.
|
31 |
-
*
|
32 |
-
* @param $arg
|
33 |
-
*
|
34 |
-
* @return int
|
35 |
-
*/
|
36 |
-
function length($arg){
|
37 |
-
if(empty($arg[0]) || empty($arg[2]) || $arg[0] != 'list') return 1;
|
38 |
-
return count($arg[2]);
|
39 |
-
}
|
40 |
-
|
41 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class siteorigin_lessc
|
5 |
+
*
|
6 |
+
* An extension to the SiteOrigin_LessC class that adds a few custom functions
|
7 |
+
*/
|
8 |
+
class SiteOrigin_Widgets_Less_Functions {
|
9 |
+
|
10 |
+
private $widget;
|
11 |
+
private $widget_instance;
|
12 |
+
|
13 |
+
function __construct($widget, $widget_instance){
|
14 |
+
$this->widget = $widget;
|
15 |
+
$this->widget_instance = $widget_instance;
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @param SiteOrigin_LessC $c
|
20 |
+
*
|
21 |
+
* Register less functions in a SiteOrigin_LessC object
|
22 |
+
*/
|
23 |
+
function registerFunctions(&$c){
|
24 |
+
if( method_exists( $c, 'registerFunction' ) ) {
|
25 |
+
$c->registerFunction( 'length', array($this, 'length') );
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Very basic length function that checks the length of a list. Might need some more checks for other types.
|
31 |
+
*
|
32 |
+
* @param $arg
|
33 |
+
*
|
34 |
+
* @return int
|
35 |
+
*/
|
36 |
+
function length($arg){
|
37 |
+
if(empty($arg[0]) || empty($arg[2]) || $arg[0] != 'list') return 1;
|
38 |
+
return count($arg[2]);
|
39 |
+
}
|
40 |
+
|
41 |
+
}
|
base/inc/lessc.inc.php
CHANGED
@@ -1,283 +1,283 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* This file provides the part of lessphp API (https://github.com/leafo/lessphp)
|
4 |
-
* to be a drop-in replacement for following products:
|
5 |
-
* - Drupal 7, by the less module v3.0+ (https://drupal.org/project/less)
|
6 |
-
* - Symfony 2
|
7 |
-
*
|
8 |
-
* @SiteOrigin: We originally used leafo/lessphp (https://github.com/leafo/lessphp), until we found it wasn't
|
9 |
-
* maintained and missed some newer LESS features. We then migrated to a more recent and maintained repo
|
10 |
-
* (https://github.com/oyejorge/less.php) simply replacing leafo's lessc.inc.php with the one from oyejorge. This
|
11 |
-
* worked well until users started running PHP 7 compatibility checkers which found some issues, so now we have our own
|
12 |
-
* fork here: https://github.com/siteorigin/less.php We have fixed the PHP 7 compatibility issues and will only make
|
13 |
-
* more changes if there are severe issues.
|
14 |
-
*/
|
15 |
-
|
16 |
-
// Register autoloader for non-composer installations
|
17 |
-
if ( !class_exists( 'Less_Parser' ) ) {
|
18 |
-
require_once dirname( __FILE__ ) . '/lib/Less/Autoloader.php';
|
19 |
-
Less_Autoloader::register();
|
20 |
-
}
|
21 |
-
|
22 |
-
class SiteOrigin_LessC {
|
23 |
-
|
24 |
-
static public $VERSION = Less_Version::less_version;
|
25 |
-
|
26 |
-
public $importDir = '';
|
27 |
-
protected $allParsedFiles = array();
|
28 |
-
protected $libFunctions = array();
|
29 |
-
protected $registeredVars = array();
|
30 |
-
private $formatterName;
|
31 |
-
private $options = array();
|
32 |
-
|
33 |
-
public function __construct( $lessc=null, $sourceName=null ) {}
|
34 |
-
|
35 |
-
public function setImportDir( $dirs ) {
|
36 |
-
$this->importDir = (array)$dirs;
|
37 |
-
}
|
38 |
-
|
39 |
-
public function addImportDir( $dir ) {
|
40 |
-
$this->importDir = (array)$this->importDir;
|
41 |
-
$this->importDir[] = $dir;
|
42 |
-
}
|
43 |
-
|
44 |
-
public function setFormatter( $name ) {
|
45 |
-
$this->formatterName = $name;
|
46 |
-
}
|
47 |
-
|
48 |
-
public function setPreserveComments( $preserve ) {}
|
49 |
-
|
50 |
-
public function registerFunction( $name, $func ) {
|
51 |
-
$this->libFunctions[$name] = $func;
|
52 |
-
}
|
53 |
-
|
54 |
-
public function unregisterFunction( $name ) {
|
55 |
-
unset( $this->libFunctions[$name] );
|
56 |
-
}
|
57 |
-
|
58 |
-
public function setVariables( $variables ){
|
59 |
-
foreach ( $variables as $name => $value ) {
|
60 |
-
$this->setVariable( $name, $value );
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
public function setVariable( $name, $value ) {
|
65 |
-
$this->registeredVars[$name] = $value;
|
66 |
-
}
|
67 |
-
|
68 |
-
public function unsetVariable( $name ) {
|
69 |
-
unset( $this->registeredVars[$name] );
|
70 |
-
}
|
71 |
-
|
72 |
-
public function setOptions( $options ) {
|
73 |
-
foreach ( $options as $name => $value ) {
|
74 |
-
$this->setOption( $name, $value);
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
public function setOption( $name, $value ) {
|
79 |
-
$this->options[$name] = $value;
|
80 |
-
}
|
81 |
-
|
82 |
-
public function parse( $buffer, $presets = array() ) {
|
83 |
-
|
84 |
-
$this->setVariables( $presets );
|
85 |
-
|
86 |
-
$parser = new Less_Parser( $this->getOptions() );
|
87 |
-
$parser->setImportDirs( $this->getImportDirs() );
|
88 |
-
foreach ( $this->libFunctions as $name => $func ) {
|
89 |
-
$parser->registerFunction( $name, $func );
|
90 |
-
}
|
91 |
-
$parser->parse($buffer);
|
92 |
-
if ( count( $this->registeredVars ) ) {
|
93 |
-
$parser->ModifyVars( $this->registeredVars );
|
94 |
-
}
|
95 |
-
|
96 |
-
return $parser->getCss();
|
97 |
-
}
|
98 |
-
|
99 |
-
protected function getOptions() {
|
100 |
-
$options = array( 'relativeUrls'=>false );
|
101 |
-
switch( $this->formatterName ) {
|
102 |
-
case 'compressed':
|
103 |
-
$options['compress'] = true;
|
104 |
-
break;
|
105 |
-
}
|
106 |
-
if (is_array($this->options))
|
107 |
-
{
|
108 |
-
$options = array_merge($options, $this->options);
|
109 |
-
}
|
110 |
-
return $options;
|
111 |
-
}
|
112 |
-
|
113 |
-
protected function getImportDirs() {
|
114 |
-
$dirs_ = (array)$this->importDir;
|
115 |
-
$dirs = array();
|
116 |
-
foreach ( $dirs_ as $dir ) {
|
117 |
-
$dirs[$dir] = '';
|
118 |
-
}
|
119 |
-
return $dirs;
|
120 |
-
}
|
121 |
-
|
122 |
-
public function compile( $string, $name = null ) {
|
123 |
-
|
124 |
-
$oldImport = $this->importDir;
|
125 |
-
$this->importDir = (array)$this->importDir;
|
126 |
-
|
127 |
-
$this->allParsedFiles = array();
|
128 |
-
|
129 |
-
$parser = new Less_Parser( $this->getOptions() );
|
130 |
-
$parser->SetImportDirs( $this->getImportDirs() );
|
131 |
-
if ( count( $this->registeredVars ) ) {
|
132 |
-
$parser->ModifyVars( $this->registeredVars );
|
133 |
-
}
|
134 |
-
foreach ( $this->libFunctions as $name => $func ) {
|
135 |
-
$parser->registerFunction( $name, $func );
|
136 |
-
}
|
137 |
-
$parser->parse( $string );
|
138 |
-
$out = $parser->getCss();
|
139 |
-
|
140 |
-
$parsed = Less_Parser::AllParsedFiles();
|
141 |
-
foreach ( $parsed as $file ) {
|
142 |
-
$this->addParsedFile( $file );
|
143 |
-
}
|
144 |
-
|
145 |
-
$this->importDir = $oldImport;
|
146 |
-
|
147 |
-
return $out;
|
148 |
-
}
|
149 |
-
|
150 |
-
public function compileFile( $fname, $outFname = null ) {
|
151 |
-
if ( !is_readable( $fname ) ) {
|
152 |
-
throw new Exception( 'load error: failed to find '.$fname );
|
153 |
-
}
|
154 |
-
|
155 |
-
$pi = pathinfo( $fname );
|
156 |
-
|
157 |
-
$oldImport = $this->importDir;
|
158 |
-
|
159 |
-
$this->importDir = (array)$this->importDir;
|
160 |
-
$this->importDir[] = Less_Parser::AbsPath( $pi['dirname'] ).'/';
|
161 |
-
|
162 |
-
$this->allParsedFiles = array();
|
163 |
-
$this->addParsedFile( $fname );
|
164 |
-
|
165 |
-
$parser = new Less_Parser( $this->getOptions() );
|
166 |
-
$parser->SetImportDirs( $this->getImportDirs() );
|
167 |
-
if ( count( $this->registeredVars ) ) {
|
168 |
-
$parser->ModifyVars( $this->registeredVars );
|
169 |
-
}
|
170 |
-
foreach ( $this->libFunctions as $name => $func ) {
|
171 |
-
$parser->registerFunction( $name, $func );
|
172 |
-
}
|
173 |
-
$parser->parseFile( $fname );
|
174 |
-
$out = $parser->getCss();
|
175 |
-
|
176 |
-
$parsed = Less_Parser::AllParsedFiles();
|
177 |
-
foreach ( $parsed as $file ) {
|
178 |
-
$this->addParsedFile( $file );
|
179 |
-
}
|
180 |
-
|
181 |
-
$this->importDir = $oldImport;
|
182 |
-
|
183 |
-
if ( $outFname !== null ) {
|
184 |
-
return file_put_contents( $outFname, $out );
|
185 |
-
}
|
186 |
-
|
187 |
-
return $out;
|
188 |
-
}
|
189 |
-
|
190 |
-
public function checkedCompile( $in, $out ) {
|
191 |
-
if ( !is_file( $out ) || filemtime( $in ) > filemtime( $out ) ) {
|
192 |
-
$this->compileFile($in, $out);
|
193 |
-
return true;
|
194 |
-
}
|
195 |
-
return false;
|
196 |
-
}
|
197 |
-
|
198 |
-
|
199 |
-
/**
|
200 |
-
* Execute lessphp on a .less file or a lessphp cache structure
|
201 |
-
*
|
202 |
-
* The lessphp cache structure contains information about a specific
|
203 |
-
* less file having been parsed. It can be used as a hint for future
|
204 |
-
* calls to determine whether or not a rebuild is required.
|
205 |
-
*
|
206 |
-
* The cache structure contains two important keys that may be used
|
207 |
-
* externally:
|
208 |
-
*
|
209 |
-
* compiled: The final compiled CSS
|
210 |
-
* updated: The time (in seconds) the CSS was last compiled
|
211 |
-
*
|
212 |
-
* The cache structure is a plain-ol' PHP associative array and can
|
213 |
-
* be serialized and unserialized without a hitch.
|
214 |
-
*
|
215 |
-
* @param mixed $in Input
|
216 |
-
* @param bool $force Force rebuild?
|
217 |
-
* @return array lessphp cache structure
|
218 |
-
*/
|
219 |
-
public function cachedCompile( $in, $force = false ) {
|
220 |
-
// assume no root
|
221 |
-
$root = null;
|
222 |
-
|
223 |
-
if ( is_string( $in ) ) {
|
224 |
-
$root = $in;
|
225 |
-
} elseif ( is_array( $in ) and isset( $in['root'] ) ) {
|
226 |
-
if ( $force or ! isset( $in['files'] ) ) {
|
227 |
-
// If we are forcing a recompile or if for some reason the
|
228 |
-
// structure does not contain any file information we should
|
229 |
-
// specify the root to trigger a rebuild.
|
230 |
-
$root = $in['root'];
|
231 |
-
} elseif ( isset( $in['files'] ) and is_array( $in['files'] ) ) {
|
232 |
-
foreach ( $in['files'] as $fname => $ftime ) {
|
233 |
-
if ( !file_exists( $fname ) or filemtime( $fname ) > $ftime ) {
|
234 |
-
// One of the files we knew about previously has changed
|
235 |
-
// so we should look at our incoming root again.
|
236 |
-
$root = $in['root'];
|
237 |
-
break;
|
238 |
-
}
|
239 |
-
}
|
240 |
-
}
|
241 |
-
} else {
|
242 |
-
// TODO: Throw an exception? We got neither a string nor something
|
243 |
-
// that looks like a compatible lessphp cache structure.
|
244 |
-
return null;
|
245 |
-
}
|
246 |
-
|
247 |
-
if ( $root !== null ) {
|
248 |
-
// If we have a root value which means we should rebuild.
|
249 |
-
$out = array();
|
250 |
-
$out['root'] = $root;
|
251 |
-
$out['compiled'] = $this->compileFile($root);
|
252 |
-
$out['files'] = $this->allParsedFiles();
|
253 |
-
$out['updated'] = time();
|
254 |
-
return $out;
|
255 |
-
} else {
|
256 |
-
// No changes, pass back the structure
|
257 |
-
// we were given initially.
|
258 |
-
return $in;
|
259 |
-
}
|
260 |
-
}
|
261 |
-
|
262 |
-
public function ccompile( $in, $out, $less = null ) {
|
263 |
-
if ( $less === null ) {
|
264 |
-
$less = new self;
|
265 |
-
}
|
266 |
-
return $less->checkedCompile( $in, $out );
|
267 |
-
}
|
268 |
-
|
269 |
-
public static function cexecute( $in, $force = false, $less = null ) {
|
270 |
-
if ( $less === null ) {
|
271 |
-
$less = new self;
|
272 |
-
}
|
273 |
-
return $less->cachedCompile($in, $force);
|
274 |
-
}
|
275 |
-
|
276 |
-
public function allParsedFiles() {
|
277 |
-
return $this->allParsedFiles;
|
278 |
-
}
|
279 |
-
|
280 |
-
protected function addParsedFile( $file ) {
|
281 |
-
$this->allParsedFiles[Less_Parser::AbsPath( $file )] = filemtime( $file );
|
282 |
-
}
|
283 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This file provides the part of lessphp API (https://github.com/leafo/lessphp)
|
4 |
+
* to be a drop-in replacement for following products:
|
5 |
+
* - Drupal 7, by the less module v3.0+ (https://drupal.org/project/less)
|
6 |
+
* - Symfony 2
|
7 |
+
*
|
8 |
+
* @SiteOrigin: We originally used leafo/lessphp (https://github.com/leafo/lessphp), until we found it wasn't
|
9 |
+
* maintained and missed some newer LESS features. We then migrated to a more recent and maintained repo
|
10 |
+
* (https://github.com/oyejorge/less.php) simply replacing leafo's lessc.inc.php with the one from oyejorge. This
|
11 |
+
* worked well until users started running PHP 7 compatibility checkers which found some issues, so now we have our own
|
12 |
+
* fork here: https://github.com/siteorigin/less.php We have fixed the PHP 7 compatibility issues and will only make
|
13 |
+
* more changes if there are severe issues.
|
14 |
+
*/
|
15 |
+
|
16 |
+
// Register autoloader for non-composer installations
|
17 |
+
if ( !class_exists( 'Less_Parser' ) ) {
|
18 |
+
require_once dirname( __FILE__ ) . '/lib/Less/Autoloader.php';
|
19 |
+
Less_Autoloader::register();
|
20 |
+
}
|
21 |
+
|
22 |
+
class SiteOrigin_LessC {
|
23 |
+
|
24 |
+
static public $VERSION = Less_Version::less_version;
|
25 |
+
|
26 |
+
public $importDir = '';
|
27 |
+
protected $allParsedFiles = array();
|
28 |
+
protected $libFunctions = array();
|
29 |
+
protected $registeredVars = array();
|
30 |
+
private $formatterName;
|
31 |
+
private $options = array();
|
32 |
+
|
33 |
+
public function __construct( $lessc=null, $sourceName=null ) {}
|
34 |
+
|
35 |
+
public function setImportDir( $dirs ) {
|
36 |
+
$this->importDir = (array)$dirs;
|
37 |
+
}
|
38 |
+
|
39 |
+
public function addImportDir( $dir ) {
|
40 |
+
$this->importDir = (array)$this->importDir;
|
41 |
+
$this->importDir[] = $dir;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function setFormatter( $name ) {
|
45 |
+
$this->formatterName = $name;
|
46 |
+
}
|
47 |
+
|
48 |
+
public function setPreserveComments( $preserve ) {}
|
49 |
+
|
50 |
+
public function registerFunction( $name, $func ) {
|
51 |
+
$this->libFunctions[$name] = $func;
|
52 |
+
}
|
53 |
+
|
54 |
+
public function unregisterFunction( $name ) {
|
55 |
+
unset( $this->libFunctions[$name] );
|
56 |
+
}
|
57 |
+
|
58 |
+
public function setVariables( $variables ){
|
59 |
+
foreach ( $variables as $name => $value ) {
|
60 |
+
$this->setVariable( $name, $value );
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
public function setVariable( $name, $value ) {
|
65 |
+
$this->registeredVars[$name] = $value;
|
66 |
+
}
|
67 |
+
|
68 |
+
public function unsetVariable( $name ) {
|
69 |
+
unset( $this->registeredVars[$name] );
|
70 |
+
}
|
71 |
+
|
72 |
+
public function setOptions( $options ) {
|
73 |
+
foreach ( $options as $name => $value ) {
|
74 |
+
$this->setOption( $name, $value);
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
public function setOption( $name, $value ) {
|
79 |
+
$this->options[$name] = $value;
|
80 |
+
}
|
81 |
+
|
82 |
+
public function parse( $buffer, $presets = array() ) {
|
83 |
+
|
84 |
+
$this->setVariables( $presets );
|
85 |
+
|
86 |
+
$parser = new Less_Parser( $this->getOptions() );
|
87 |
+
$parser->setImportDirs( $this->getImportDirs() );
|
88 |
+
foreach ( $this->libFunctions as $name => $func ) {
|
89 |
+
$parser->registerFunction( $name, $func );
|
90 |
+
}
|
91 |
+
$parser->parse($buffer);
|
92 |
+
if ( count( $this->registeredVars ) ) {
|
93 |
+
$parser->ModifyVars( $this->registeredVars );
|
94 |
+
}
|
95 |
+
|
96 |
+
return $parser->getCss();
|
97 |
+
}
|
98 |
+
|
99 |
+
protected function getOptions() {
|
100 |
+
$options = array( 'relativeUrls'=>false );
|
101 |
+
switch( $this->formatterName ) {
|
102 |
+
case 'compressed':
|
103 |
+
$options['compress'] = true;
|
104 |
+
break;
|
105 |
+
}
|
106 |
+
if (is_array($this->options))
|
107 |
+
{
|
108 |
+
$options = array_merge($options, $this->options);
|
109 |
+
}
|
110 |
+
return $options;
|
111 |
+
}
|
112 |
+
|
113 |
+
protected function getImportDirs() {
|
114 |
+
$dirs_ = (array)$this->importDir;
|
115 |
+
$dirs = array();
|
116 |
+
foreach ( $dirs_ as $dir ) {
|
117 |
+
$dirs[$dir] = '';
|
118 |
+
}
|
119 |
+
return $dirs;
|
120 |
+
}
|
121 |
+
|
122 |
+
public function compile( $string, $name = null ) {
|
123 |
+
|
124 |
+
$oldImport = $this->importDir;
|
125 |
+
$this->importDir = (array)$this->importDir;
|
126 |
+
|
127 |
+
$this->allParsedFiles = array();
|
128 |
+
|
129 |
+
$parser = new Less_Parser( $this->getOptions() );
|
130 |
+
$parser->SetImportDirs( $this->getImportDirs() );
|
131 |
+
if ( count( $this->registeredVars ) ) {
|
132 |
+
$parser->ModifyVars( $this->registeredVars );
|
133 |
+
}
|
134 |
+
foreach ( $this->libFunctions as $name => $func ) {
|
135 |
+
$parser->registerFunction( $name, $func );
|
136 |
+
}
|
137 |
+
$parser->parse( $string );
|
138 |
+
$out = $parser->getCss();
|
139 |
+
|
140 |
+
$parsed = Less_Parser::AllParsedFiles();
|
141 |
+
foreach ( $parsed as $file ) {
|
142 |
+
$this->addParsedFile( $file );
|
143 |
+
}
|
144 |
+
|
145 |
+
$this->importDir = $oldImport;
|
146 |
+
|
147 |
+
return $out;
|
148 |
+
}
|
149 |
+
|
150 |
+
public function compileFile( $fname, $outFname = null ) {
|
151 |
+
if ( !is_readable( $fname ) ) {
|
152 |
+
throw new Exception( 'load error: failed to find '.$fname );
|
153 |
+
}
|
154 |
+
|
155 |
+
$pi = pathinfo( $fname );
|
156 |
+
|
157 |
+
$oldImport = $this->importDir;
|
158 |
+
|
159 |
+
$this->importDir = (array)$this->importDir;
|
160 |
+
$this->importDir[] = Less_Parser::AbsPath( $pi['dirname'] ).'/';
|
161 |
+
|
162 |
+
$this->allParsedFiles = array();
|
163 |
+
$this->addParsedFile( $fname );
|
164 |
+
|
165 |
+
$parser = new Less_Parser( $this->getOptions() );
|
166 |
+
$parser->SetImportDirs( $this->getImportDirs() );
|
167 |
+
if ( count( $this->registeredVars ) ) {
|
168 |
+
$parser->ModifyVars( $this->registeredVars );
|
169 |
+
}
|
170 |
+
foreach ( $this->libFunctions as $name => $func ) {
|
171 |
+
$parser->registerFunction( $name, $func );
|
172 |
+
}
|
173 |
+
$parser->parseFile( $fname );
|
174 |
+
$out = $parser->getCss();
|
175 |
+
|
176 |
+
$parsed = Less_Parser::AllParsedFiles();
|
177 |
+
foreach ( $parsed as $file ) {
|
178 |
+
$this->addParsedFile( $file );
|
179 |
+
}
|
180 |
+
|
181 |
+
$this->importDir = $oldImport;
|
182 |
+
|
183 |
+
if ( $outFname !== null ) {
|
184 |
+
return file_put_contents( $outFname, $out );
|
185 |
+
}
|
186 |
+
|
187 |
+
return $out;
|
188 |
+
}
|
189 |
+
|
190 |
+
public function checkedCompile( $in, $out ) {
|
191 |
+
if ( !is_file( $out ) || filemtime( $in ) > filemtime( $out ) ) {
|
192 |
+
$this->compileFile($in, $out);
|
193 |
+
return true;
|
194 |
+
}
|
195 |
+
return false;
|
196 |
+
}
|
197 |
+
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Execute lessphp on a .less file or a lessphp cache structure
|
201 |
+
*
|
202 |
+
* The lessphp cache structure contains information about a specific
|
203 |
+
* less file having been parsed. It can be used as a hint for future
|
204 |
+
* calls to determine whether or not a rebuild is required.
|
205 |
+
*
|
206 |
+
* The cache structure contains two important keys that may be used
|
207 |
+
* externally:
|
208 |
+
*
|
209 |
+
* compiled: The final compiled CSS
|
210 |
+
* updated: The time (in seconds) the CSS was last compiled
|
211 |
+
*
|
212 |
+
* The cache structure is a plain-ol' PHP associative array and can
|
213 |
+
* be serialized and unserialized without a hitch.
|
214 |
+
*
|
215 |
+
* @param mixed $in Input
|
216 |
+
* @param bool $force Force rebuild?
|
217 |
+
* @return array lessphp cache structure
|
218 |
+
*/
|
219 |
+
public function cachedCompile( $in, $force = false ) {
|
220 |
+
// assume no root
|
221 |
+
$root = null;
|
222 |
+
|
223 |
+
if ( is_string( $in ) ) {
|
224 |
+
$root = $in;
|
225 |
+
} elseif ( is_array( $in ) and isset( $in['root'] ) ) {
|
226 |
+
if ( $force or ! isset( $in['files'] ) ) {
|
227 |
+
// If we are forcing a recompile or if for some reason the
|
228 |
+
// structure does not contain any file information we should
|
229 |
+
// specify the root to trigger a rebuild.
|
230 |
+
$root = $in['root'];
|
231 |
+
} elseif ( isset( $in['files'] ) and is_array( $in['files'] ) ) {
|
232 |
+
foreach ( $in['files'] as $fname => $ftime ) {
|
233 |
+
if ( !file_exists( $fname ) or filemtime( $fname ) > $ftime ) {
|
234 |
+
// One of the files we knew about previously has changed
|
235 |
+
// so we should look at our incoming root again.
|
236 |
+
$root = $in['root'];
|
237 |
+
break;
|
238 |
+
}
|
239 |
+
}
|
240 |
+
}
|
241 |
+
} else {
|
242 |
+
// TODO: Throw an exception? We got neither a string nor something
|
243 |
+
// that looks like a compatible lessphp cache structure.
|
244 |
+
return null;
|
245 |
+
}
|
246 |
+
|
247 |
+
if ( $root !== null ) {
|
248 |
+
// If we have a root value which means we should rebuild.
|
249 |
+
$out = array();
|
250 |
+
$out['root'] = $root;
|
251 |
+
$out['compiled'] = $this->compileFile($root);
|
252 |
+
$out['files'] = $this->allParsedFiles();
|
253 |
+
$out['updated'] = time();
|
254 |
+
return $out;
|
255 |
+
} else {
|
256 |
+
// No changes, pass back the structure
|
257 |
+
// we were given initially.
|
258 |
+
return $in;
|
259 |
+
}
|
260 |
+
}
|
261 |
+
|
262 |
+
public function ccompile( $in, $out, $less = null ) {
|
263 |
+
if ( $less === null ) {
|
264 |
+
$less = new self;
|
265 |
+
}
|
266 |
+
return $less->checkedCompile( $in, $out );
|
267 |
+
}
|
268 |
+
|
269 |
+
public static function cexecute( $in, $force = false, $less = null ) {
|
270 |
+
if ( $less === null ) {
|
271 |
+
$less = new self;
|
272 |
+
}
|
273 |
+
return $less->cachedCompile($in, $force);
|
274 |
+
}
|
275 |
+
|
276 |
+
public function allParsedFiles() {
|
277 |
+
return $this->allParsedFiles;
|
278 |
+
}
|
279 |
+
|
280 |
+
protected function addParsedFile( $file ) {
|
281 |
+
$this->allParsedFiles[Less_Parser::AbsPath( $file )] = filemtime( $file );
|
282 |
+
}
|
283 |
+
}
|
base/inc/lib/Less/Exception/Chunk.php
CHANGED
@@ -1,198 +1,198 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Chunk Exception
|
5 |
-
*
|
6 |
-
* @package Less
|
7 |
-
* @subpackage exception
|
8 |
-
*/
|
9 |
-
class Less_Exception_Chunk extends Less_Exception_Parser{
|
10 |
-
|
11 |
-
|
12 |
-
protected $parserCurrentIndex = 0;
|
13 |
-
|
14 |
-
protected $emitFrom = 0;
|
15 |
-
|
16 |
-
protected $input_len;
|
17 |
-
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Constructor
|
21 |
-
*
|
22 |
-
* @param string $input
|
23 |
-
* @param Exception $previous Previous exception
|
24 |
-
* @param integer $index The current parser index
|
25 |
-
* @param Less_FileInfo|string $currentFile The file
|
26 |
-
* @param integer $code The exception code
|
27 |
-
*/
|
28 |
-
public function __construct($input, Exception $previous = null, $index = null, $currentFile = null, $code = 0){
|
29 |
-
|
30 |
-
$this->message = 'ParseError: Unexpected input'; //default message
|
31 |
-
|
32 |
-
$this->index = $index;
|
33 |
-
|
34 |
-
$this->currentFile = $currentFile;
|
35 |
-
|
36 |
-
$this->input = $input;
|
37 |
-
$this->input_len = strlen($input);
|
38 |
-
|
39 |
-
$this->Chunks();
|
40 |
-
$this->genMessage();
|
41 |
-
}
|
42 |
-
|
43 |
-
|
44 |
-
/**
|
45 |
-
* See less.js chunks()
|
46 |
-
* We don't actually need the chunks
|
47 |
-
*
|
48 |
-
*/
|
49 |
-
protected function Chunks(){
|
50 |
-
$level = 0;
|
51 |
-
$parenLevel = 0;
|
52 |
-
$lastMultiCommentEndBrace = null;
|
53 |
-
$lastOpening = null;
|
54 |
-
$lastMultiComment = null;
|
55 |
-
$lastParen = null;
|
56 |
-
|
57 |
-
for( $this->parserCurrentIndex = 0; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++ ){
|
58 |
-
$cc = $this->CharCode($this->parserCurrentIndex);
|
59 |
-
if ((($cc >= 97) && ($cc <= 122)) || ($cc < 34)) {
|
60 |
-
// a-z or whitespace
|
61 |
-
continue;
|
62 |
-
}
|
63 |
-
|
64 |
-
switch ($cc) {
|
65 |
-
|
66 |
-
// (
|
67 |
-
case 40:
|
68 |
-
$parenLevel++;
|
69 |
-
$lastParen = $this->parserCurrentIndex;
|
70 |
-
break;
|
71 |
-
// )
|
72 |
-
case 41:
|
73 |
-
$parenLevel--;
|
74 |
-
if( $parenLevel < 0 ){
|
75 |
-
return $this->fail("missing opening `(`");
|
76 |
-
}
|
77 |
-
break;
|
78 |
-
// ;
|
79 |
-
case 59:
|
80 |
-
//if (!$parenLevel) { $this->emitChunk(); }
|
81 |
-
break;
|
82 |
-
// {
|
83 |
-
case 123:
|
84 |
-
$level++;
|
85 |
-
$lastOpening = $this->parserCurrentIndex;
|
86 |
-
break;
|
87 |
-
// }
|
88 |
-
case 125:
|
89 |
-
$level--;
|
90 |
-
if( $level < 0 ){
|
91 |
-
return $this->fail("missing opening `{`");
|
92 |
-
|
93 |
-
}
|
94 |
-
//if (!$level && !$parenLevel) { $this->emitChunk(); }
|
95 |
-
break;
|
96 |
-
// \
|
97 |
-
case 92:
|
98 |
-
if ($this->parserCurrentIndex < $this->input_len - 1) { $this->parserCurrentIndex++; break; }
|
99 |
-
return $this->fail("unescaped `\\`");
|
100 |
-
|
101 |
-
// ", ' and `
|
102 |
-
case 34:
|
103 |
-
case 39:
|
104 |
-
case 96:
|
105 |
-
$matched = 0;
|
106 |
-
$currentChunkStartIndex = $this->parserCurrentIndex;
|
107 |
-
for ($this->parserCurrentIndex = $this->parserCurrentIndex + 1; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++) {
|
108 |
-
$cc2 = $this->CharCode($this->parserCurrentIndex);
|
109 |
-
if ($cc2 > 96) { continue; }
|
110 |
-
if ($cc2 == $cc) { $matched = 1; break; }
|
111 |
-
if ($cc2 == 92) { // \
|
112 |
-
if ($this->parserCurrentIndex == $this->input_len - 1) {
|
113 |
-
return $this->fail("unescaped `\\`");
|
114 |
-
}
|
115 |
-
$this->parserCurrentIndex++;
|
116 |
-
}
|
117 |
-
}
|
118 |
-
if ($matched) { break; }
|
119 |
-
return $this->fail("unmatched `" . chr($cc) . "`", $currentChunkStartIndex);
|
120 |
-
|
121 |
-
// /, check for comment
|
122 |
-
case 47:
|
123 |
-
if ($parenLevel || ($this->parserCurrentIndex == $this->input_len - 1)) { break; }
|
124 |
-
$cc2 = $this->CharCode($this->parserCurrentIndex+1);
|
125 |
-
if ($cc2 == 47) {
|
126 |
-
// //, find lnfeed
|
127 |
-
for ($this->parserCurrentIndex = $this->parserCurrentIndex + 2; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++) {
|
128 |
-
$cc2 = $this->CharCode($this->parserCurrentIndex);
|
129 |
-
if (($cc2 <= 13) && (($cc2 == 10) || ($cc2 == 13))) { break; }
|
130 |
-
}
|
131 |
-
} else if ($cc2 == 42) {
|
132 |
-
// /*, find */
|
133 |
-
$lastMultiComment = $currentChunkStartIndex = $this->parserCurrentIndex;
|
134 |
-
for ($this->parserCurrentIndex = $this->parserCurrentIndex + 2; $this->parserCurrentIndex < $this->input_len - 1; $this->parserCurrentIndex++) {
|
135 |
-
$cc2 = $this->CharCode($this->parserCurrentIndex);
|
136 |
-
if ($cc2 == 125) { $lastMultiCommentEndBrace = $this->parserCurrentIndex; }
|
137 |
-
if ($cc2 != 42) { continue; }
|
138 |
-
if ($this->CharCode($this->parserCurrentIndex+1) == 47) { break; }
|
139 |
-
}
|
140 |
-
if ($this->parserCurrentIndex == $this->input_len - 1) {
|
141 |
-
return $this->fail("missing closing `*/`", $currentChunkStartIndex);
|
142 |
-
}
|
143 |
-
}
|
144 |
-
break;
|
145 |
-
// *, check for unmatched */
|
146 |
-
case 42:
|
147 |
-
if (($this->parserCurrentIndex < $this->input_len - 1) && ($this->CharCode($this->parserCurrentIndex+1) == 47)) {
|
148 |
-
return $this->fail("unmatched `/*`");
|
149 |
-
}
|
150 |
-
break;
|
151 |
-
}
|
152 |
-
}
|
153 |
-
|
154 |
-
if( $level !== 0 ){
|
155 |
-
if( ($lastMultiComment > $lastOpening) && ($lastMultiCommentEndBrace > $lastMultiComment) ){
|
156 |
-
return $this->fail("missing closing `}` or `*/`", $lastOpening);
|
157 |
-
} else {
|
158 |
-
return $this->fail("missing closing `}`", $lastOpening);
|
159 |
-
}
|
160 |
-
} else if ( $parenLevel !== 0 ){
|
161 |
-
return $this->fail("missing closing `)`", $lastParen);
|
162 |
-
}
|
163 |
-
|
164 |
-
|
165 |
-
//chunk didn't fail
|
166 |
-
|
167 |
-
|
168 |
-
//$this->emitChunk(true);
|
169 |
-
}
|
170 |
-
|
171 |
-
public function CharCode($pos){
|
172 |
-
return ord($this->input[$pos]);
|
173 |
-
}
|
174 |
-
|
175 |
-
|
176 |
-
public function fail( $msg, $index = null ){
|
177 |
-
|
178 |
-
if( !$index ){
|
179 |
-
$this->index = $this->parserCurrentIndex;
|
180 |
-
}else{
|
181 |
-
$this->index = $index;
|
182 |
-
}
|
183 |
-
$this->message = 'ParseError: '.$msg;
|
184 |
-
}
|
185 |
-
|
186 |
-
|
187 |
-
/*
|
188 |
-
function emitChunk( $force = false ){
|
189 |
-
$len = $this->parserCurrentIndex - $this->emitFrom;
|
190 |
-
if ((($len < 512) && !$force) || !$len) {
|
191 |
-
return;
|
192 |
-
}
|
193 |
-
$chunks[] = substr($this->input, $this->emitFrom, $this->parserCurrentIndex + 1 - $this->emitFrom );
|
194 |
-
$this->emitFrom = $this->parserCurrentIndex + 1;
|
195 |
-
}
|
196 |
-
*/
|
197 |
-
|
198 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Chunk Exception
|
5 |
+
*
|
6 |
+
* @package Less
|
7 |
+
* @subpackage exception
|
8 |
+
*/
|
9 |
+
class Less_Exception_Chunk extends Less_Exception_Parser{
|
10 |
+
|
11 |
+
|
12 |
+
protected $parserCurrentIndex = 0;
|
13 |
+
|
14 |
+
protected $emitFrom = 0;
|
15 |
+
|
16 |
+
protected $input_len;
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructor
|
21 |
+
*
|
22 |
+
* @param string $input
|
23 |
+
* @param Exception $previous Previous exception
|
24 |
+
* @param integer $index The current parser index
|
25 |
+
* @param Less_FileInfo|string $currentFile The file
|
26 |
+
* @param integer $code The exception code
|
27 |
+
*/
|
28 |
+
public function __construct($input, Exception $previous = null, $index = null, $currentFile = null, $code = 0){
|
29 |
+
|
30 |
+
$this->message = 'ParseError: Unexpected input'; //default message
|
31 |
+
|
32 |
+
$this->index = $index;
|
33 |
+
|
34 |
+
$this->currentFile = $currentFile;
|
35 |
+
|
36 |
+
$this->input = $input;
|
37 |
+
$this->input_len = strlen($input);
|
38 |
+
|
39 |
+
$this->Chunks();
|
40 |
+
$this->genMessage();
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
/**
|
45 |
+
* See less.js chunks()
|
46 |
+
* We don't actually need the chunks
|
47 |
+
*
|
48 |
+
*/
|
49 |
+
protected function Chunks(){
|
50 |
+
$level = 0;
|
51 |
+
$parenLevel = 0;
|
52 |
+
$lastMultiCommentEndBrace = null;
|
53 |
+
$lastOpening = null;
|
54 |
+
$lastMultiComment = null;
|
55 |
+
$lastParen = null;
|
56 |
+
|
57 |
+
for( $this->parserCurrentIndex = 0; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++ ){
|
58 |
+
$cc = $this->CharCode($this->parserCurrentIndex);
|
59 |
+
if ((($cc >= 97) && ($cc <= 122)) || ($cc < 34)) {
|
60 |
+
// a-z or whitespace
|
61 |
+
continue;
|
62 |
+
}
|
63 |
+
|
64 |
+
switch ($cc) {
|
65 |
+
|
66 |
+
// (
|
67 |
+
case 40:
|
68 |
+
$parenLevel++;
|
69 |
+
$lastParen = $this->parserCurrentIndex;
|
70 |
+
break;
|
71 |
+
// )
|
72 |
+
case 41:
|
73 |
+
$parenLevel--;
|
74 |
+
if( $parenLevel < 0 ){
|
75 |
+
return $this->fail("missing opening `(`");
|
76 |
+
}
|
77 |
+
break;
|
78 |
+
// ;
|
79 |
+
case 59:
|
80 |
+
//if (!$parenLevel) { $this->emitChunk(); }
|
81 |
+
break;
|
82 |
+
// {
|
83 |
+
case 123:
|
84 |
+
$level++;
|
85 |
+
$lastOpening = $this->parserCurrentIndex;
|
86 |
+
break;
|
87 |
+
// }
|
88 |
+
case 125:
|
89 |
+
$level--;
|
90 |
+
if( $level < 0 ){
|
91 |
+
return $this->fail("missing opening `{`");
|
92 |
+
|
93 |
+
}
|
94 |
+
//if (!$level && !$parenLevel) { $this->emitChunk(); }
|
95 |
+
break;
|
96 |
+
// \
|
97 |
+
case 92:
|
98 |
+
if ($this->parserCurrentIndex < $this->input_len - 1) { $this->parserCurrentIndex++; break; }
|
99 |
+
return $this->fail("unescaped `\\`");
|
100 |
+
|
101 |
+
// ", ' and `
|
102 |
+
case 34:
|
103 |
+
case 39:
|
104 |
+
case 96:
|
105 |
+
$matched = 0;
|
106 |
+
$currentChunkStartIndex = $this->parserCurrentIndex;
|
107 |
+
for ($this->parserCurrentIndex = $this->parserCurrentIndex + 1; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++) {
|
108 |
+
$cc2 = $this->CharCode($this->parserCurrentIndex);
|
109 |
+
if ($cc2 > 96) { continue; }
|
110 |
+
if ($cc2 == $cc) { $matched = 1; break; }
|
111 |
+
if ($cc2 == 92) { // \
|
112 |
+
if ($this->parserCurrentIndex == $this->input_len - 1) {
|
113 |
+
return $this->fail("unescaped `\\`");
|
114 |
+
}
|
115 |
+
$this->parserCurrentIndex++;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
if ($matched) { break; }
|
119 |
+
return $this->fail("unmatched `" . chr($cc) . "`", $currentChunkStartIndex);
|
120 |
+
|
121 |
+
// /, check for comment
|
122 |
+
case 47:
|
123 |
+
if ($parenLevel || ($this->parserCurrentIndex == $this->input_len - 1)) { break; }
|
124 |
+
$cc2 = $this->CharCode($this->parserCurrentIndex+1);
|
125 |
+
if ($cc2 == 47) {
|
126 |
+
// //, find lnfeed
|
127 |
+
for ($this->parserCurrentIndex = $this->parserCurrentIndex + 2; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++) {
|
128 |
+
$cc2 = $this->CharCode($this->parserCurrentIndex);
|
129 |
+
if (($cc2 <= 13) && (($cc2 == 10) || ($cc2 == 13))) { break; }
|
130 |
+
}
|
131 |
+
} else if ($cc2 == 42) {
|
132 |
+
// /*, find */
|
133 |
+
$lastMultiComment = $currentChunkStartIndex = $this->parserCurrentIndex;
|
134 |
+
for ($this->parserCurrentIndex = $this->parserCurrentIndex + 2; $this->parserCurrentIndex < $this->input_len - 1; $this->parserCurrentIndex++) {
|
135 |
+
$cc2 = $this->CharCode($this->parserCurrentIndex);
|
136 |
+
if ($cc2 == 125) { $lastMultiCommentEndBrace = $this->parserCurrentIndex; }
|
137 |
+
if ($cc2 != 42) { continue; }
|
138 |
+
if ($this->CharCode($this->parserCurrentIndex+1) == 47) { break; }
|
139 |
+
}
|
140 |
+
if ($this->parserCurrentIndex == $this->input_len - 1) {
|
141 |
+
return $this->fail("missing closing `*/`", $currentChunkStartIndex);
|
142 |
+
}
|
143 |
+
}
|
144 |
+
break;
|
145 |
+
// *, check for unmatched */
|
146 |
+
case 42:
|
147 |
+
if (($this->parserCurrentIndex < $this->input_len - 1) && ($this->CharCode($this->parserCurrentIndex+1) == 47)) {
|
148 |
+
return $this->fail("unmatched `/*`");
|
149 |
+
}
|
150 |
+
break;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
if( $level !== 0 ){
|
155 |
+
if( ($lastMultiComment > $lastOpening) && ($lastMultiCommentEndBrace > $lastMultiComment) ){
|
156 |
+
return $this->fail("missing closing `}` or `*/`", $lastOpening);
|
157 |
+
} else {
|
158 |
+
return $this->fail("missing closing `}`", $lastOpening);
|
159 |
+
}
|
160 |
+
} else if ( $parenLevel !== 0 ){
|
161 |
+
return $this->fail("missing closing `)`", $lastParen);
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
//chunk didn't fail
|
166 |
+
|
167 |
+
|
168 |
+
//$this->emitChunk(true);
|
169 |
+
}
|
170 |
+
|
171 |
+
public function CharCode($pos){
|
172 |
+
return ord($this->input[$pos]);
|
173 |
+
}
|
174 |
+
|
175 |
+
|
176 |
+
public function fail( $msg, $index = null ){
|
177 |
+
|
178 |
+
if( !$index ){
|
179 |
+
$this->index = $this->parserCurrentIndex;
|
180 |
+
}else{
|
181 |
+
$this->index = $index;
|
182 |
+
}
|
183 |
+
$this->message = 'ParseError: '.$msg;
|
184 |
+
}
|
185 |
+
|
186 |
+
|
187 |
+
/*
|
188 |
+
function emitChunk( $force = false ){
|
189 |
+
$len = $this->parserCurrentIndex - $this->emitFrom;
|
190 |
+
if ((($len < 512) && !$force) || !$len) {
|
191 |
+
return;
|
192 |
+
}
|
193 |
+
$chunks[] = substr($this->input, $this->emitFrom, $this->parserCurrentIndex + 1 - $this->emitFrom );
|
194 |
+
$this->emitFrom = $this->parserCurrentIndex + 1;
|
195 |
+
}
|
196 |
+
*/
|
197 |
+
|
198 |
+
}
|
base/inc/meta-box-manager.php
CHANGED
@@ -1,177 +1,177 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class SiteOrigin_Widget_Meta_Box_Manager extends SiteOrigin_Widget {
|
4 |
-
|
5 |
-
const POST_META_KEY = 'siteorigin-widgets-post-meta';
|
6 |
-
|
7 |
-
/**
|
8 |
-
* @var array Fields which have been added for each widget.
|
9 |
-
*/
|
10 |
-
private $widget_form_fields;
|
11 |
-
|
12 |
-
/**
|
13 |
-
* @var array Post types for which fields have been added.
|
14 |
-
*/
|
15 |
-
private $post_types;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Get the single instance.
|
19 |
-
*
|
20 |
-
* @return SiteOrigin_Widget_Meta_Box_Manager
|
21 |
-
*/
|
22 |
-
static function single(){
|
23 |
-
static $single = false;
|
24 |
-
if( empty($single) ) $single = new SiteOrigin_Widget_Meta_Box_Manager();
|
25 |
-
|
26 |
-
return $single;
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Private
|
31 |
-
*/
|
32 |
-
public function __construct() {
|
33 |
-
parent::__construct(
|
34 |
-
'sow-meta-box-manager',
|
35 |
-
__('SiteOrigin Meta Box Manager', 'so-widgets-bundle'),
|
36 |
-
array(
|
37 |
-
'has_preview' => false,
|
38 |
-
'help' => false
|
39 |
-
),
|
40 |
-
array(),
|
41 |
-
array()
|
42 |
-
);
|
43 |
-
}
|
44 |
-
|
45 |
-
function initialize() {
|
46 |
-
// Initialize number for field name attributes.
|
47 |
-
$this->number = 1;
|
48 |
-
$this->post_types = array();
|
49 |
-
$this->widget_form_fields = array();
|
50 |
-
|
51 |
-
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
|
52 |
-
add_action( 'save_post', array( $this, 'save_widget_post_meta' ), 10, 3 );
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* This handles the 'add_meta_boxes' action. It merges widget fields into the form_options array before adding the
|
57 |
-
* meta box
|
58 |
-
*
|
59 |
-
* @param $post_type
|
60 |
-
*/
|
61 |
-
public function add_meta_boxes( $post_type ) {
|
62 |
-
|
63 |
-
$this->form_options = array();
|
64 |
-
foreach ( $this->widget_form_fields as $widget_id => $post_type_form_fields ) {
|
65 |
-
foreach( $post_type_form_fields as $form_fields ) {
|
66 |
-
if ( in_array( 'all', $form_fields['post_types'] ) || in_array( $post_type, $form_fields['post_types'] ) ) {
|
67 |
-
foreach ( $form_fields['fields'] as $field_name => $field ) {
|
68 |
-
$this->form_options[$widget_id . '_' . $field_name] = $field;
|
69 |
-
}
|
70 |
-
}
|
71 |
-
}
|
72 |
-
}
|
73 |
-
|
74 |
-
if ( ! empty( $this->form_options ) ) {
|
75 |
-
add_meta_box(
|
76 |
-
'siteorigin-widgets-meta-box',
|
77 |
-
__( 'Widgets Bundle Post Meta Data', 'so-widgets-bundle' ),
|
78 |
-
array( $this, 'render_widgets_meta_box' ),
|
79 |
-
$post_type,
|
80 |
-
'advanced',
|
81 |
-
'default',
|
82 |
-
array(
|
83 |
-
'__back_compat_meta_box' => true,
|
84 |
-
'__block_editor_compatible_meta_box' => false,
|
85 |
-
)
|
86 |
-
);
|
87 |
-
|
88 |
-
}
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* This is the callback used by add_meta_box to render the widgets meta box form and enqueue any necessary scripts.
|
93 |
-
*
|
94 |
-
* @param $post
|
95 |
-
*/
|
96 |
-
public function render_widgets_meta_box( $post ) {
|
97 |
-
wp_enqueue_script(
|
98 |
-
'sow-meta-box-manager-js',
|
99 |
-
plugin_dir_url(SOW_BUNDLE_BASE_FILE).'base/js/meta-box-manager' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
100 |
-
array( 'jquery' ),
|
101 |
-
SOW_BUNDLE_VERSION,
|
102 |
-
true
|
103 |
-
);
|
104 |
-
$widget_post_meta = get_post_meta( $post->ID, self::POST_META_KEY, true );
|
105 |
-
if ( empty( $widget_post_meta ) ) {
|
106 |
-
$widget_post_meta = array();
|
107 |
-
}
|
108 |
-
$this->form( $widget_post_meta );
|
109 |
-
?><input type="hidden" id="widget_post_meta" name="widget_post_meta"> <?php
|
110 |
-
wp_nonce_field( 'widget_post_meta_save', '_widget_post_meta_nonce' );
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* This method should be called by any widgets that want to be able to store post meta data. It may be called
|
115 |
-
* multiple times by a widget and the additional fields for a widget will be appended and rendered.
|
116 |
-
*
|
117 |
-
* @param string $widget_id Base id of the widget adding the fields.
|
118 |
-
* @param array $fields The fields to add.
|
119 |
-
* @param string|array $post_types A post type string, 'all' or an array of post types
|
120 |
-
*/
|
121 |
-
public function append_to_form( $widget_id, $fields, $post_types = 'all' ) {
|
122 |
-
if( empty( $fields ) || empty( $post_types ) ) return;
|
123 |
-
|
124 |
-
if( $post_types == 'all' ) {
|
125 |
-
$post_types = array( 'all' );
|
126 |
-
}
|
127 |
-
|
128 |
-
foreach( $post_types as $post_type ) {
|
129 |
-
if( !in_array( $post_type, $this->post_types ) ) {
|
130 |
-
$this->post_types[] = $post_type;
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
if( ! isset( $this->widget_form_fields[$widget_id] ) ) {
|
135 |
-
$this->widget_form_fields[$widget_id] = array();
|
136 |
-
}
|
137 |
-
|
138 |
-
$this->widget_form_fields[$widget_id][] = array(
|
139 |
-
'post_types' => $post_types,
|
140 |
-
'fields' => $fields
|
141 |
-
);
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* This handles the 'save_post' action. It checks for a nonce, checks user permissions, and filters the input data
|
146 |
-
* and decodes it from the JSON format before storing it in the post's meta data.
|
147 |
-
*
|
148 |
-
* @param $post_id
|
149 |
-
*/
|
150 |
-
public function save_widget_post_meta( $post_id ) {
|
151 |
-
if ( empty( $_POST['_widget_post_meta_nonce'] ) || !wp_verify_nonce( $_POST['_widget_post_meta_nonce'], 'widget_post_meta_save' ) ) return;
|
152 |
-
if ( !current_user_can( 'edit_post', $post_id ) ) return;
|
153 |
-
|
154 |
-
$widget_post_meta = isset( $_POST['widget_post_meta'] ) ? stripslashes_deep( $_POST['widget_post_meta'] ) : '';
|
155 |
-
$widget_post_meta = json_decode( $widget_post_meta, true);
|
156 |
-
|
157 |
-
update_post_meta( $post_id, self::POST_META_KEY, $widget_post_meta );
|
158 |
-
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* This function is used to retrieve a widget's post meta data.
|
163 |
-
*
|
164 |
-
* @param $post_id string The id of the post for which the meta data is stored.
|
165 |
-
* @param $widget_id string The id of the widget for which the meta data is stored.
|
166 |
-
* @param $meta_key string The key of the meta data value which is to be retrieved.
|
167 |
-
*
|
168 |
-
* @return mixed An empty string if the meta data is not found, else the meta data in whatever format it was stored.
|
169 |
-
*/
|
170 |
-
public function get_widget_post_meta( $post_id, $widget_id, $meta_key ) {
|
171 |
-
$widget_post_meta = get_post_meta( $post_id, self::POST_META_KEY, true );
|
172 |
-
if( empty( $widget_post_meta ) ) return '';
|
173 |
-
$widget_post_meta_field = $widget_id . '_' . $meta_key;
|
174 |
-
if( ! isset( $widget_post_meta[$widget_post_meta_field] ) ) return '';
|
175 |
-
return $widget_post_meta[$widget_post_meta_field];
|
176 |
-
}
|
177 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class SiteOrigin_Widget_Meta_Box_Manager extends SiteOrigin_Widget {
|
4 |
+
|
5 |
+
const POST_META_KEY = 'siteorigin-widgets-post-meta';
|
6 |
+
|
7 |
+
/**
|
8 |
+
* @var array Fields which have been added for each widget.
|
9 |
+
*/
|
10 |
+
private $widget_form_fields;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @var array Post types for which fields have been added.
|
14 |
+
*/
|
15 |
+
private $post_types;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Get the single instance.
|
19 |
+
*
|
20 |
+
* @return SiteOrigin_Widget_Meta_Box_Manager
|
21 |
+
*/
|
22 |
+
static function single(){
|
23 |
+
static $single = false;
|
24 |
+
if( empty($single) ) $single = new SiteOrigin_Widget_Meta_Box_Manager();
|
25 |
+
|
26 |
+
return $single;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Private
|
31 |
+
*/
|
32 |
+
public function __construct() {
|
33 |
+
parent::__construct(
|
34 |
+
'sow-meta-box-manager',
|
35 |
+
__('SiteOrigin Meta Box Manager', 'so-widgets-bundle'),
|
36 |
+
array(
|
37 |
+
'has_preview' => false,
|
38 |
+
'help' => false
|
39 |
+
),
|
40 |
+
array(),
|
41 |
+
array()
|
42 |
+
);
|
43 |
+
}
|
44 |
+
|
45 |
+
function initialize() {
|
46 |
+
// Initialize number for field name attributes.
|
47 |
+
$this->number = 1;
|
48 |
+
$this->post_types = array();
|
49 |
+
$this->widget_form_fields = array();
|
50 |
+
|
51 |
+
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
|
52 |
+
add_action( 'save_post', array( $this, 'save_widget_post_meta' ), 10, 3 );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* This handles the 'add_meta_boxes' action. It merges widget fields into the form_options array before adding the
|
57 |
+
* meta box
|
58 |
+
*
|
59 |
+
* @param $post_type
|
60 |
+
*/
|
61 |
+
public function add_meta_boxes( $post_type ) {
|
62 |
+
|
63 |
+
$this->form_options = array();
|
64 |
+
foreach ( $this->widget_form_fields as $widget_id => $post_type_form_fields ) {
|
65 |
+
foreach( $post_type_form_fields as $form_fields ) {
|
66 |
+
if ( in_array( 'all', $form_fields['post_types'] ) || in_array( $post_type, $form_fields['post_types'] ) ) {
|
67 |
+
foreach ( $form_fields['fields'] as $field_name => $field ) {
|
68 |
+
$this->form_options[$widget_id . '_' . $field_name] = $field;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
if ( ! empty( $this->form_options ) ) {
|
75 |
+
add_meta_box(
|
76 |
+
'siteorigin-widgets-meta-box',
|
77 |
+
__( 'Widgets Bundle Post Meta Data', 'so-widgets-bundle' ),
|
78 |
+
array( $this, 'render_widgets_meta_box' ),
|
79 |
+
$post_type,
|
80 |
+
'advanced',
|
81 |
+
'default',
|
82 |
+
array(
|
83 |
+
'__back_compat_meta_box' => true,
|
84 |
+
'__block_editor_compatible_meta_box' => false,
|
85 |
+
)
|
86 |
+
);
|
87 |
+
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* This is the callback used by add_meta_box to render the widgets meta box form and enqueue any necessary scripts.
|
93 |
+
*
|
94 |
+
* @param $post
|
95 |
+
*/
|
96 |
+
public function render_widgets_meta_box( $post ) {
|
97 |
+
wp_enqueue_script(
|
98 |
+
'sow-meta-box-manager-js',
|
99 |
+
plugin_dir_url(SOW_BUNDLE_BASE_FILE).'base/js/meta-box-manager' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
100 |
+
array( 'jquery' ),
|
101 |
+
SOW_BUNDLE_VERSION,
|
102 |
+
true
|
103 |
+
);
|
104 |
+
$widget_post_meta = get_post_meta( $post->ID, self::POST_META_KEY, true );
|
105 |
+
if ( empty( $widget_post_meta ) ) {
|
106 |
+
$widget_post_meta = array();
|
107 |
+
}
|
108 |
+
$this->form( $widget_post_meta );
|
109 |
+
?><input type="hidden" id="widget_post_meta" name="widget_post_meta"> <?php
|
110 |
+
wp_nonce_field( 'widget_post_meta_save', '_widget_post_meta_nonce' );
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* This method should be called by any widgets that want to be able to store post meta data. It may be called
|
115 |
+
* multiple times by a widget and the additional fields for a widget will be appended and rendered.
|
116 |
+
*
|
117 |
+
* @param string $widget_id Base id of the widget adding the fields.
|
118 |
+
* @param array $fields The fields to add.
|
119 |
+
* @param string|array $post_types A post type string, 'all' or an array of post types
|
120 |
+
*/
|
121 |
+
public function append_to_form( $widget_id, $fields, $post_types = 'all' ) {
|
122 |
+
if( empty( $fields ) || empty( $post_types ) ) return;
|
123 |
+
|
124 |
+
if( $post_types == 'all' ) {
|
125 |
+
$post_types = array( 'all' );
|
126 |
+
}
|
127 |
+
|
128 |
+
foreach( $post_types as $post_type ) {
|
129 |
+
if( !in_array( $post_type, $this->post_types ) ) {
|
130 |
+
$this->post_types[] = $post_type;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
if( ! isset( $this->widget_form_fields[$widget_id] ) ) {
|
135 |
+
$this->widget_form_fields[$widget_id] = array();
|
136 |
+
}
|
137 |
+
|
138 |
+
$this->widget_form_fields[$widget_id][] = array(
|
139 |
+
'post_types' => $post_types,
|
140 |
+
'fields' => $fields
|
141 |
+
);
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* This handles the 'save_post' action. It checks for a nonce, checks user permissions, and filters the input data
|
146 |
+
* and decodes it from the JSON format before storing it in the post's meta data.
|
147 |
+
*
|
148 |
+
* @param $post_id
|
149 |
+
*/
|
150 |
+
public function save_widget_post_meta( $post_id ) {
|
151 |
+
if ( empty( $_POST['_widget_post_meta_nonce'] ) || !wp_verify_nonce( $_POST['_widget_post_meta_nonce'], 'widget_post_meta_save' ) ) return;
|
152 |
+
if ( !current_user_can( 'edit_post', $post_id ) ) return;
|
153 |
+
|
154 |
+
$widget_post_meta = isset( $_POST['widget_post_meta'] ) ? stripslashes_deep( $_POST['widget_post_meta'] ) : '';
|
155 |
+
$widget_post_meta = json_decode( $widget_post_meta, true);
|
156 |
+
|
157 |
+
update_post_meta( $post_id, self::POST_META_KEY, $widget_post_meta );
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* This function is used to retrieve a widget's post meta data.
|
163 |
+
*
|
164 |
+
* @param $post_id string The id of the post for which the meta data is stored.
|
165 |
+
* @param $widget_id string The id of the widget for which the meta data is stored.
|
166 |
+
* @param $meta_key string The key of the meta data value which is to be retrieved.
|
167 |
+
*
|
168 |
+
* @return mixed An empty string if the meta data is not found, else the meta data in whatever format it was stored.
|
169 |
+
*/
|
170 |
+
public function get_widget_post_meta( $post_id, $widget_id, $meta_key ) {
|
171 |
+
$widget_post_meta = get_post_meta( $post_id, self::POST_META_KEY, true );
|
172 |
+
if( empty( $widget_post_meta ) ) return '';
|
173 |
+
$widget_post_meta_field = $widget_id . '_' . $meta_key;
|
174 |
+
if( ! isset( $widget_post_meta[$widget_post_meta_field] ) ) return '';
|
175 |
+
return $widget_post_meta[$widget_post_meta_field];
|
176 |
+
}
|
177 |
+
}
|
base/inc/post-selector.php
CHANGED
@@ -1,134 +1,134 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Filter a query created from the post selector field into an array that will work properly with get_posts
|
5 |
-
*
|
6 |
-
* @param $query
|
7 |
-
*
|
8 |
-
* @return mixed
|
9 |
-
*/
|
10 |
-
function siteorigin_widget_post_selector_process_query( $query ){
|
11 |
-
$query = wp_parse_args($query,
|
12 |
-
array(
|
13 |
-
'post_status' => 'publish',
|
14 |
-
'posts_per_page' => 10,
|
15 |
-
)
|
16 |
-
);
|
17 |
-
|
18 |
-
if( !empty( $query['post_type'] ) ) {
|
19 |
-
if($query['post_type'] == '_all') $query['post_type'] = siteorigin_widget_post_selector_all_post_types();
|
20 |
-
$query['post_type'] = strpos( $query['post_type'], ',' ) !== false ? explode( ',', $query['post_type'] ) : $query['post_type'];
|
21 |
-
}
|
22 |
-
if( !empty( $query['post_type'] ) && $query['post_type'] == 'attachment' && $query['post_status'] == 'publish' ) {
|
23 |
-
$query['post_status'] = 'inherit';
|
24 |
-
}
|
25 |
-
|
26 |
-
|
27 |
-
if(!empty($query['post__in'])) {
|
28 |
-
$query['post__in'] = explode(',', $query['post__in']);
|
29 |
-
$query['post__in'] = array_map('intval', $query['post__in']);
|
30 |
-
}
|
31 |
-
|
32 |
-
if(!empty($query['tax_query'])) {
|
33 |
-
$tax_queries = explode(',', $query['tax_query']);
|
34 |
-
|
35 |
-
$query['tax_query'] = array();
|
36 |
-
$query['tax_query']['relation'] = 'OR';
|
37 |
-
foreach($tax_queries as $tq) {
|
38 |
-
list($tax, $term) = explode(':', $tq);
|
39 |
-
|
40 |
-
if( empty($tax) || empty($term) ) continue;
|
41 |
-
$query['tax_query'][] = array(
|
42 |
-
'taxonomy' => $tax,
|
43 |
-
'field' => 'slug',
|
44 |
-
'terms' => $term
|
45 |
-
);
|
46 |
-
}
|
47 |
-
}
|
48 |
-
|
49 |
-
if ( isset( $query['date_type'] ) && $query['date_type'] == 'relative' ) {
|
50 |
-
|
51 |
-
$date_query_rel = json_decode(
|
52 |
-
stripslashes( $query['date_query_relative'] ),
|
53 |
-
true
|
54 |
-
);
|
55 |
-
$value_after = new DateTime(
|
56 |
-
$date_query_rel['from']['value'] . ' ' . $date_query_rel['from']['unit'] . ' ago'
|
57 |
-
);
|
58 |
-
$value['after'] = $value_after->format( 'Y-m-d' );
|
59 |
-
$value_before = new DateTime(
|
60 |
-
$date_query_rel['to']['value'] . ' ' . $date_query_rel['to']['unit'] . ' ago'
|
61 |
-
);
|
62 |
-
$value['before'] = $value_before->format( 'Y-m-d' );
|
63 |
-
$query['date_query'] = $value;
|
64 |
-
unset( $query['date_type'] );
|
65 |
-
unset( $query['date_query_relative'] );
|
66 |
-
} else if ( ! empty( $query['date_query'] ) ) {
|
67 |
-
$query['date_query'] = json_decode( stripslashes( $query['date_query'] ), true );
|
68 |
-
}
|
69 |
-
|
70 |
-
if ( ! empty( $query['date_query'] ) ) {
|
71 |
-
$query['date_query']['inclusive'] = true;
|
72 |
-
}
|
73 |
-
|
74 |
-
if ( ! empty( $query['sticky'] ) ) {
|
75 |
-
switch($query['sticky']){
|
76 |
-
case 'ignore' :
|
77 |
-
$query['ignore_sticky_posts'] = 1;
|
78 |
-
break;
|
79 |
-
case 'only' :
|
80 |
-
$post_in = empty( $query['post__in'] ) ? array() : $query['post__in'];
|
81 |
-
$query['post__in'] = array_merge( $post_in, get_option( 'sticky_posts' ) );
|
82 |
-
break;
|
83 |
-
case 'exclude' :
|
84 |
-
$query['post__not_in'] = get_option( 'sticky_posts' );
|
85 |
-
break;
|
86 |
-
}
|
87 |
-
unset( $query['sticky'] );
|
88 |
-
}
|
89 |
-
|
90 |
-
// Exclude the current post (if applicable) to avoid any issues associated with showing the same post again
|
91 |
-
if( is_singular() && get_the_id() != false ){
|
92 |
-
$query['post__not_in'][] = get_the_id();
|
93 |
-
}
|
94 |
-
|
95 |
-
if ( ! empty( $query['additional'] ) ) {
|
96 |
-
$query = wp_parse_args( $query['additional'], $query );
|
97 |
-
unset( $query['additional'] );
|
98 |
-
|
99 |
-
// If post_not_in is set, we need to convert it to an array to avoid issues with the query.
|
100 |
-
if( !empty( $query['post__not_in'] ) && !is_array( $query['post__not_in'] ) ){
|
101 |
-
$query['post__not_in'] = explode( ',', $query['post__not_in'] );
|
102 |
-
$query['post__not_in'] = array_map( 'intval', $query['post__not_in'] );
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
return apply_filters( 'siteorigin_widgets_posts_selector_query', $query );
|
107 |
-
}
|
108 |
-
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Just return a comma separated list of all available post types.
|
112 |
-
*
|
113 |
-
* @return string
|
114 |
-
*/
|
115 |
-
function siteorigin_widget_post_selector_all_post_types(){
|
116 |
-
$post_types = array();
|
117 |
-
foreach( get_post_types( array( 'public' => true ), 'objects' ) as $id => $type ) {
|
118 |
-
$post_types[] = $id;
|
119 |
-
}
|
120 |
-
|
121 |
-
return implode(',', $post_types);
|
122 |
-
}
|
123 |
-
|
124 |
-
/**
|
125 |
-
* Tells us how many posts this query has
|
126 |
-
*
|
127 |
-
* @param $query
|
128 |
-
* @return int
|
129 |
-
*/
|
130 |
-
function siteorigin_widget_post_selector_count_posts( $query ) {
|
131 |
-
$query = siteorigin_widget_post_selector_process_query( $query );
|
132 |
-
$posts = new WP_Query($query);
|
133 |
-
return $posts->found_posts;
|
134 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Filter a query created from the post selector field into an array that will work properly with get_posts
|
5 |
+
*
|
6 |
+
* @param $query
|
7 |
+
*
|
8 |
+
* @return mixed
|
9 |
+
*/
|
10 |
+
function siteorigin_widget_post_selector_process_query( $query ){
|
11 |
+
$query = wp_parse_args($query,
|
12 |
+
array(
|
13 |
+
'post_status' => 'publish',
|
14 |
+
'posts_per_page' => 10,
|
15 |
+
)
|
16 |
+
);
|
17 |
+
|
18 |
+
if( !empty( $query['post_type'] ) ) {
|
19 |
+
if($query['post_type'] == '_all') $query['post_type'] = siteorigin_widget_post_selector_all_post_types();
|
20 |
+
$query['post_type'] = strpos( $query['post_type'], ',' ) !== false ? explode( ',', $query['post_type'] ) : $query['post_type'];
|
21 |
+
}
|
22 |
+
if( !empty( $query['post_type'] ) && $query['post_type'] == 'attachment' && $query['post_status'] == 'publish' ) {
|
23 |
+
$query['post_status'] = 'inherit';
|
24 |
+
}
|
25 |
+
|
26 |
+
|
27 |
+
if(!empty($query['post__in'])) {
|
28 |
+
$query['post__in'] = explode(',', $query['post__in']);
|
29 |
+
$query['post__in'] = array_map('intval', $query['post__in']);
|
30 |
+
}
|
31 |
+
|
32 |
+
if(!empty($query['tax_query'])) {
|
33 |
+
$tax_queries = explode(',', $query['tax_query']);
|
34 |
+
|
35 |
+
$query['tax_query'] = array();
|
36 |
+
$query['tax_query']['relation'] = 'OR';
|
37 |
+
foreach($tax_queries as $tq) {
|
38 |
+
list($tax, $term) = explode(':', $tq);
|
39 |
+
|
40 |
+
if( empty($tax) || empty($term) ) continue;
|
41 |
+
$query['tax_query'][] = array(
|
42 |
+
'taxonomy' => $tax,
|
43 |
+
'field' => 'slug',
|
44 |
+
'terms' => $term
|
45 |
+
);
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
if ( isset( $query['date_type'] ) && $query['date_type'] == 'relative' ) {
|
50 |
+
|
51 |
+
$date_query_rel = json_decode(
|
52 |
+
stripslashes( $query['date_query_relative'] ),
|
53 |
+
true
|
54 |
+
);
|
55 |
+
$value_after = new DateTime(
|
56 |
+
$date_query_rel['from']['value'] . ' ' . $date_query_rel['from']['unit'] . ' ago'
|
57 |
+
);
|
58 |
+
$value['after'] = $value_after->format( 'Y-m-d' );
|
59 |
+
$value_before = new DateTime(
|
60 |
+
$date_query_rel['to']['value'] . ' ' . $date_query_rel['to']['unit'] . ' ago'
|
61 |
+
);
|
62 |
+
$value['before'] = $value_before->format( 'Y-m-d' );
|
63 |
+
$query['date_query'] = $value;
|
64 |
+
unset( $query['date_type'] );
|
65 |
+
unset( $query['date_query_relative'] );
|
66 |
+
} else if ( ! empty( $query['date_query'] ) ) {
|
67 |
+
$query['date_query'] = json_decode( stripslashes( $query['date_query'] ), true );
|
68 |
+
}
|
69 |
+
|
70 |
+
if ( ! empty( $query['date_query'] ) ) {
|
71 |
+
$query['date_query']['inclusive'] = true;
|
72 |
+
}
|
73 |
+
|
74 |
+
if ( ! empty( $query['sticky'] ) ) {
|
75 |
+
switch($query['sticky']){
|
76 |
+
case 'ignore' :
|
77 |
+
$query['ignore_sticky_posts'] = 1;
|
78 |
+
break;
|
79 |
+
case 'only' :
|
80 |
+
$post_in = empty( $query['post__in'] ) ? array() : $query['post__in'];
|
81 |
+
$query['post__in'] = array_merge( $post_in, get_option( 'sticky_posts' ) );
|
82 |
+
break;
|
83 |
+
case 'exclude' :
|
84 |
+
$query['post__not_in'] = get_option( 'sticky_posts' );
|
85 |
+
break;
|
86 |
+
}
|
87 |
+
unset( $query['sticky'] );
|
88 |
+
}
|
89 |
+
|
90 |
+
// Exclude the current post (if applicable) to avoid any issues associated with showing the same post again
|
91 |
+
if( is_singular() && get_the_id() != false ){
|
92 |
+
$query['post__not_in'][] = get_the_id();
|
93 |
+
}
|
94 |
+
|
95 |
+
if ( ! empty( $query['additional'] ) ) {
|
96 |
+
$query = wp_parse_args( $query['additional'], $query );
|
97 |
+
unset( $query['additional'] );
|
98 |
+
|
99 |
+
// If post_not_in is set, we need to convert it to an array to avoid issues with the query.
|
100 |
+
if( !empty( $query['post__not_in'] ) && !is_array( $query['post__not_in'] ) ){
|
101 |
+
$query['post__not_in'] = explode( ',', $query['post__not_in'] );
|
102 |
+
$query['post__not_in'] = array_map( 'intval', $query['post__not_in'] );
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
return apply_filters( 'siteorigin_widgets_posts_selector_query', $query );
|
107 |
+
}
|
108 |
+
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Just return a comma separated list of all available post types.
|
112 |
+
*
|
113 |
+
* @return string
|
114 |
+
*/
|
115 |
+
function siteorigin_widget_post_selector_all_post_types(){
|
116 |
+
$post_types = array();
|
117 |
+
foreach( get_post_types( array( 'public' => true ), 'objects' ) as $id => $type ) {
|
118 |
+
$post_types[] = $id;
|
119 |
+
}
|
120 |
+
|
121 |
+
return implode(',', $post_types);
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Tells us how many posts this query has
|
126 |
+
*
|
127 |
+
* @param $query
|
128 |
+
* @return int
|
129 |
+
*/
|
130 |
+
function siteorigin_widget_post_selector_count_posts( $query ) {
|
131 |
+
$query = siteorigin_widget_post_selector_process_query( $query );
|
132 |
+
$posts = new WP_Query($query);
|
133 |
+
return $posts->found_posts;
|
134 |
+
}
|
base/inc/routes/siteorigin-widgets-resource.class.php
CHANGED
@@ -1,172 +1,172 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Resource for SiteOrigin widgets.
|
4 |
-
*/
|
5 |
-
|
6 |
-
class SiteOrigin_Widgets_Resource extends WP_REST_Controller {
|
7 |
-
|
8 |
-
public function register_routes() {
|
9 |
-
$version = '1';
|
10 |
-
$namespace = 'sowb/v' . $version;
|
11 |
-
$resource = 'widgets';
|
12 |
-
|
13 |
-
$subresource = 'forms';
|
14 |
-
register_rest_route( $namespace, '/' . $resource . '/' . $subresource, array(
|
15 |
-
'methods' => WP_REST_Server::CREATABLE,
|
16 |
-
'callback' => array( $this, 'get_widget_form'),
|
17 |
-
'args' => array(
|
18 |
-
'widgetClass' => array(
|
19 |
-
'validate_callback' => array( $this, 'validate_widget_class'),
|
20 |
-
),
|
21 |
-
'widgetData' => array(
|
22 |
-
'validate_callback' => array( $this, 'validate_widget_data'),
|
23 |
-
),
|
24 |
-
),
|
25 |
-
'permission_callback' => array( $this, 'permissions_check' ),
|
26 |
-
) );
|
27 |
-
|
28 |
-
$subresource = 'previews';
|
29 |
-
register_rest_route( $namespace, '/' . $resource . '/' . $subresource, array(
|
30 |
-
'methods' => WP_REST_Server::CREATABLE,
|
31 |
-
'callback' => array( $this, 'get_widget_preview'),
|
32 |
-
'args' => array(
|
33 |
-
'widgetClass' => array(
|
34 |
-
'validate_callback' => array( $this, 'validate_widget_class'),
|
35 |
-
),
|
36 |
-
'widgetData' => array(
|
37 |
-
'validate_callback' => array( $this, 'validate_widget_data'),
|
38 |
-
),
|
39 |
-
),
|
40 |
-
'permission_callback' => array( $this, 'permissions_check' ),
|
41 |
-
) );
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
*
|
46 |
-
* @param WP_REST_Request $request Request.
|
47 |
-
* @return true|WP_Error True if the request has read access, WP_Error object otherwise.
|
48 |
-
*/
|
49 |
-
public function permissions_check( $request ) {
|
50 |
-
|
51 |
-
if ( ! current_user_can( 'edit_posts' ) ) {
|
52 |
-
$status_code = rest_authorization_required_code();
|
53 |
-
return new WP_Error(
|
54 |
-
$status_code,
|
55 |
-
__( 'Insufficient permissions.', 'so-widgets-bundle' ),
|
56 |
-
array(
|
57 |
-
'status' => $status_code,
|
58 |
-
)
|
59 |
-
);
|
60 |
-
}
|
61 |
-
|
62 |
-
return true;
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Validate passed in widgetClass arg only contains alphanumeric and underscores.
|
67 |
-
*
|
68 |
-
* @param $param
|
69 |
-
* @param $request
|
70 |
-
* @param $key
|
71 |
-
*
|
72 |
-
* @return bool
|
73 |
-
*/
|
74 |
-
function validate_widget_class( $param, $request, $key ) {
|
75 |
-
return preg_match( '/\w+/', $param ) == 1;
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Get the collection of widgets.
|
80 |
-
*
|
81 |
-
* @param WP_REST_Request $request
|
82 |
-
*
|
83 |
-
* @return WP_Error|WP_REST_Response
|
84 |
-
*/
|
85 |
-
public function get_widget_form( $request ) {
|
86 |
-
$widget_class = $request['widgetClass'];
|
87 |
-
$widget_data = empty( $request['widgetData'] ) ? array() : $request['widgetData'];
|
88 |
-
|
89 |
-
/* @var $widget SiteOrigin_Widget */
|
90 |
-
$widget = SiteOrigin_Widgets_Widget_Manager::get_widget_instance( $widget_class );
|
91 |
-
|
92 |
-
if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
|
93 |
-
$widget_data = $widget->update( $widget_data, $widget_data );
|
94 |
-
ob_start();
|
95 |
-
$widget->form( $widget_data );
|
96 |
-
$widget_form = ob_get_clean();
|
97 |
-
} else {
|
98 |
-
$widget_form = new WP_Error(
|
99 |
-
400,
|
100 |
-
'Invalid or missing widget class: ' . $widget_class,
|
101 |
-
array(
|
102 |
-
'status' => 400,
|
103 |
-
)
|
104 |
-
);
|
105 |
-
}
|
106 |
-
|
107 |
-
return rest_ensure_response( $widget_form );
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* For now widget data is validated in the below `get_widget_preview` function.
|
112 |
-
* Leaving this here for possible later implementation.
|
113 |
-
*
|
114 |
-
* @param $param
|
115 |
-
* @param $request
|
116 |
-
* @param $key
|
117 |
-
*
|
118 |
-
* @return bool
|
119 |
-
*/
|
120 |
-
function validate_widget_data( $param, $request, $key ) {
|
121 |
-
return true;
|
122 |
-
}
|
123 |
-
|
124 |
-
/**
|
125 |
-
* Get the collection of widgets.
|
126 |
-
*
|
127 |
-
* @param WP_REST_Request $request
|
128 |
-
*
|
129 |
-
* @return WP_Error|WP_REST_Response
|
130 |
-
*/
|
131 |
-
public function get_widget_preview( $request ) {
|
132 |
-
$widget_class = $request['widgetClass'];
|
133 |
-
$widget_data = $request['widgetData'];
|
134 |
-
|
135 |
-
$widget = SiteOrigin_Widgets_Widget_Manager::get_widget_instance( $widget_class );
|
136 |
-
// This ensures styles are added inline.
|
137 |
-
add_filter( 'siteorigin_widgets_is_preview', '__return_true' );
|
138 |
-
|
139 |
-
$valid_widget_class = ! empty( $widget ) &&
|
140 |
-
is_object( $widget ) &&
|
141 |
-
is_subclass_of( $widget, 'SiteOrigin_Widget' );
|
142 |
-
|
143 |
-
if ( $valid_widget_class && ! empty( $widget_data ) ) {
|
144 |
-
ob_start();
|
145 |
-
/* @var $widget SiteOrigin_Widget */
|
146 |
-
$instance = $widget->update( $widget_data, $widget_data );
|
147 |
-
$widget->widget( array(), $instance );
|
148 |
-
$rendered_widget = ob_get_clean();
|
149 |
-
} else {
|
150 |
-
if ( empty( $valid_widget_class ) ) {
|
151 |
-
$rendered_widget = new WP_Error(
|
152 |
-
400,
|
153 |
-
'Invalid or missing widget class: ' . $widget_class,
|
154 |
-
array(
|
155 |
-
'status' => 400,
|
156 |
-
)
|
157 |
-
);
|
158 |
-
} else if ( empty( $widget_data ) ) {
|
159 |
-
$rendered_widget = new WP_Error(
|
160 |
-
400,
|
161 |
-
'Unable to render preview. Invalid or missing widget data.',
|
162 |
-
array(
|
163 |
-
'status' => 400,
|
164 |
-
)
|
165 |
-
);
|
166 |
-
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
-
return rest_ensure_response( $rendered_widget );
|
171 |
-
}
|
172 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Resource for SiteOrigin widgets.
|
4 |
+
*/
|
5 |
+
|
6 |
+
class SiteOrigin_Widgets_Resource extends WP_REST_Controller {
|
7 |
+
|
8 |
+
public function register_routes() {
|
9 |
+
$version = '1';
|
10 |
+
$namespace = 'sowb/v' . $version;
|
11 |
+
$resource = 'widgets';
|
12 |
+
|
13 |
+
$subresource = 'forms';
|
14 |
+
register_rest_route( $namespace, '/' . $resource . '/' . $subresource, array(
|
15 |
+
'methods' => WP_REST_Server::CREATABLE,
|
16 |
+
'callback' => array( $this, 'get_widget_form'),
|
17 |
+
'args' => array(
|
18 |
+
'widgetClass' => array(
|
19 |
+
'validate_callback' => array( $this, 'validate_widget_class'),
|
20 |
+
),
|
21 |
+
'widgetData' => array(
|
22 |
+
'validate_callback' => array( $this, 'validate_widget_data'),
|
23 |
+
),
|
24 |
+
),
|
25 |
+
'permission_callback' => array( $this, 'permissions_check' ),
|
26 |
+
) );
|
27 |
+
|
28 |
+
$subresource = 'previews';
|
29 |
+
register_rest_route( $namespace, '/' . $resource . '/' . $subresource, array(
|
30 |
+
'methods' => WP_REST_Server::CREATABLE,
|
31 |
+
'callback' => array( $this, 'get_widget_preview'),
|
32 |
+
'args' => array(
|
33 |
+
'widgetClass' => array(
|
34 |
+
'validate_callback' => array( $this, 'validate_widget_class'),
|
35 |
+
),
|
36 |
+
'widgetData' => array(
|
37 |
+
'validate_callback' => array( $this, 'validate_widget_data'),
|
38 |
+
),
|
39 |
+
),
|
40 |
+
'permission_callback' => array( $this, 'permissions_check' ),
|
41 |
+
) );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
*
|
46 |
+
* @param WP_REST_Request $request Request.
|
47 |
+
* @return true|WP_Error True if the request has read access, WP_Error object otherwise.
|
48 |
+
*/
|
49 |
+
public function permissions_check( $request ) {
|
50 |
+
|
51 |
+
if ( ! current_user_can( 'edit_posts' ) ) {
|
52 |
+
$status_code = rest_authorization_required_code();
|
53 |
+
return new WP_Error(
|
54 |
+
$status_code,
|
55 |
+
__( 'Insufficient permissions.', 'so-widgets-bundle' ),
|
56 |
+
array(
|
57 |
+
'status' => $status_code,
|
58 |
+
)
|
59 |
+
);
|
60 |
+
}
|
61 |
+
|
62 |
+
return true;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Validate passed in widgetClass arg only contains alphanumeric and underscores.
|
67 |
+
*
|
68 |
+
* @param $param
|
69 |
+
* @param $request
|
70 |
+
* @param $key
|
71 |
+
*
|
72 |
+
* @return bool
|
73 |
+
*/
|
74 |
+
function validate_widget_class( $param, $request, $key ) {
|
75 |
+
return preg_match( '/\w+/', $param ) == 1;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get the collection of widgets.
|
80 |
+
*
|
81 |
+
* @param WP_REST_Request $request
|
82 |
+
*
|
83 |
+
* @return WP_Error|WP_REST_Response
|
84 |
+
*/
|
85 |
+
public function get_widget_form( $request ) {
|
86 |
+
$widget_class = $request['widgetClass'];
|
87 |
+
$widget_data = empty( $request['widgetData'] ) ? array() : $request['widgetData'];
|
88 |
+
|
89 |
+
/* @var $widget SiteOrigin_Widget */
|
90 |
+
$widget = SiteOrigin_Widgets_Widget_Manager::get_widget_instance( $widget_class );
|
91 |
+
|
92 |
+
if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
|
93 |
+
$widget_data = $widget->update( $widget_data, $widget_data );
|
94 |
+
ob_start();
|
95 |
+
$widget->form( $widget_data );
|
96 |
+
$widget_form = ob_get_clean();
|
97 |
+
} else {
|
98 |
+
$widget_form = new WP_Error(
|
99 |
+
400,
|
100 |
+
'Invalid or missing widget class: ' . $widget_class,
|
101 |
+
array(
|
102 |
+
'status' => 400,
|
103 |
+
)
|
104 |
+
);
|
105 |
+
}
|
106 |
+
|
107 |
+
return rest_ensure_response( $widget_form );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* For now widget data is validated in the below `get_widget_preview` function.
|
112 |
+
* Leaving this here for possible later implementation.
|
113 |
+
*
|
114 |
+
* @param $param
|
115 |
+
* @param $request
|
116 |
+
* @param $key
|
117 |
+
*
|
118 |
+
* @return bool
|
119 |
+
*/
|
120 |
+
function validate_widget_data( $param, $request, $key ) {
|
121 |
+
return true;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Get the collection of widgets.
|
126 |
+
*
|
127 |
+
* @param WP_REST_Request $request
|
128 |
+
*
|
129 |
+
* @return WP_Error|WP_REST_Response
|
130 |
+
*/
|
131 |
+
public function get_widget_preview( $request ) {
|
132 |
+
$widget_class = $request['widgetClass'];
|
133 |
+
$widget_data = $request['widgetData'];
|
134 |
+
|
135 |
+
$widget = SiteOrigin_Widgets_Widget_Manager::get_widget_instance( $widget_class );
|
136 |
+
// This ensures styles are added inline.
|
137 |
+
add_filter( 'siteorigin_widgets_is_preview', '__return_true' );
|
138 |
+
|
139 |
+
$valid_widget_class = ! empty( $widget ) &&
|
140 |
+
is_object( $widget ) &&
|
141 |
+
is_subclass_of( $widget, 'SiteOrigin_Widget' );
|
142 |
+
|
143 |
+
if ( $valid_widget_class && ! empty( $widget_data ) ) {
|
144 |
+
ob_start();
|
145 |
+
/* @var $widget SiteOrigin_Widget */
|
146 |
+
$instance = $widget->update( $widget_data, $widget_data );
|
147 |
+
$widget->widget( array(), $instance );
|
148 |
+
$rendered_widget = ob_get_clean();
|
149 |
+
} else {
|
150 |
+
if ( empty( $valid_widget_class ) ) {
|
151 |
+
$rendered_widget = new WP_Error(
|
152 |
+
400,
|
153 |
+
'Invalid or missing widget class: ' . $widget_class,
|
154 |
+
array(
|
155 |
+
'status' => 400,
|
156 |
+
)
|
157 |
+
);
|
158 |
+
} else if ( empty( $widget_data ) ) {
|
159 |
+
$rendered_widget = new WP_Error(
|
160 |
+
400,
|
161 |
+
'Unable to render preview. Invalid or missing widget data.',
|
162 |
+
array(
|
163 |
+
'status' => 400,
|
164 |
+
)
|
165 |
+
);
|
166 |
+
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
return rest_ensure_response( $rendered_widget );
|
171 |
+
}
|
172 |
+
}
|
base/inc/routes/sowb-rest-routes.php
CHANGED
@@ -1,50 +1,50 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Handles registering Widgets Bundle custom REST endpoints.
|
5 |
-
*
|
6 |
-
* Class SiteOrigin_Widgets_Rest_Routes
|
7 |
-
*/
|
8 |
-
|
9 |
-
class SiteOrigin_Widgets_Rest_Routes {
|
10 |
-
|
11 |
-
function __construct() {
|
12 |
-
|
13 |
-
global $wp_version;
|
14 |
-
if ( version_compare( $wp_version, '4.7', '>=' ) && class_exists( 'WP_REST_Controller' ) ) {
|
15 |
-
include plugin_dir_path(__FILE__).'siteorigin-widgets-resource.class.php';
|
16 |
-
add_action( 'rest_api_init', array( $this, 'register_rest_routes') );
|
17 |
-
}
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Singleton
|
22 |
-
*
|
23 |
-
* @return SiteOrigin_Widgets_Rest_Routes
|
24 |
-
*/
|
25 |
-
static function single() {
|
26 |
-
static $single;
|
27 |
-
|
28 |
-
if( empty($single) ) {
|
29 |
-
$single = new self();
|
30 |
-
}
|
31 |
-
|
32 |
-
return $single;
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Register all our REST resources.
|
37 |
-
*/
|
38 |
-
function register_rest_routes() {
|
39 |
-
$resources = array(
|
40 |
-
new SiteOrigin_Widgets_Resource(),
|
41 |
-
);
|
42 |
-
|
43 |
-
foreach ( $resources as $resource ) {
|
44 |
-
/* @var WP_REST_Controller $resource */
|
45 |
-
$resource->register_routes();
|
46 |
-
}
|
47 |
-
}
|
48 |
-
|
49 |
-
}
|
50 |
-
SiteOrigin_Widgets_Rest_Routes::single();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Handles registering Widgets Bundle custom REST endpoints.
|
5 |
+
*
|
6 |
+
* Class SiteOrigin_Widgets_Rest_Routes
|
7 |
+
*/
|
8 |
+
|
9 |
+
class SiteOrigin_Widgets_Rest_Routes {
|
10 |
+
|
11 |
+
function __construct() {
|
12 |
+
|
13 |
+
global $wp_version;
|
14 |
+
if ( version_compare( $wp_version, '4.7', '>=' ) && class_exists( 'WP_REST_Controller' ) ) {
|
15 |
+
include plugin_dir_path(__FILE__).'siteorigin-widgets-resource.class.php';
|
16 |
+
add_action( 'rest_api_init', array( $this, 'register_rest_routes') );
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Singleton
|
22 |
+
*
|
23 |
+
* @return SiteOrigin_Widgets_Rest_Routes
|
24 |
+
*/
|
25 |
+
static function single() {
|
26 |
+
static $single;
|
27 |
+
|
28 |
+
if( empty($single) ) {
|
29 |
+
$single = new self();
|
30 |
+
}
|
31 |
+
|
32 |
+
return $single;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Register all our REST resources.
|
37 |
+
*/
|
38 |
+
function register_rest_routes() {
|
39 |
+
$resources = array(
|
40 |
+
new SiteOrigin_Widgets_Resource(),
|
41 |
+
);
|
42 |
+
|
43 |
+
foreach ( $resources as $resource ) {
|
44 |
+
/* @var WP_REST_Controller $resource */
|
45 |
+
$resource->register_routes();
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
}
|
50 |
+
SiteOrigin_Widgets_Rest_Routes::single();
|
base/inc/video.php
CHANGED
@@ -1,99 +1,99 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This class handles video related functionality.
|
5 |
-
*
|
6 |
-
* Class SiteOrigin_Video
|
7 |
-
*/
|
8 |
-
|
9 |
-
class SiteOrigin_Video {
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Check whether it's possible to oEmbed by testing if a provider URL can be obtained.
|
13 |
-
*
|
14 |
-
* @param string $url The URL of the video to be embedded.
|
15 |
-
*
|
16 |
-
* @return bool Whether it's possible to embed this video.
|
17 |
-
*/
|
18 |
-
function can_oembed( $url ) {
|
19 |
-
$wp_oembed = new WP_oEmbed();
|
20 |
-
$provider = $wp_oembed->get_provider( $url, array( 'discover' => false ) );
|
21 |
-
|
22 |
-
return ! empty( $provider );
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Gets a video source embed
|
27 |
-
*
|
28 |
-
* @param string $src The URL of the video.
|
29 |
-
* @param bool $autoplay Whether to start playing the video automatically once loaded. ( YouTube only )
|
30 |
-
* @param bool $related_videos Whether to show related videos after the video has finished playing. ( YouTube only )
|
31 |
-
*
|
32 |
-
* @return false|mixed|null|string|string[]
|
33 |
-
*/
|
34 |
-
function get_video_oembed( $src, $autoplay = false, $related_videos = true ) {
|
35 |
-
if ( empty( $src ) ) {
|
36 |
-
return '';
|
37 |
-
}
|
38 |
-
|
39 |
-
global $content_width;
|
40 |
-
|
41 |
-
$video_width = ! empty( $content_width ) ? $content_width : 640;
|
42 |
-
|
43 |
-
$hash = md5( serialize( array(
|
44 |
-
'src' => $src,
|
45 |
-
'width' => $video_width,
|
46 |
-
'autoplay' => $autoplay,
|
47 |
-
) ) );
|
48 |
-
|
49 |
-
// Convert embed format to standard format to be compatible with wp_oembed_get
|
50 |
-
$src = preg_replace('/https?:\/\/www.youtube.com\/embed\/([^\/]+)/', 'https://www.youtube.com/watch?v=$1', $src);
|
51 |
-
|
52 |
-
$html = get_transient( 'sow-vid-embed[' . $hash . ']' );
|
53 |
-
if ( empty( $html ) ) {
|
54 |
-
$html = wp_oembed_get( $src, array( 'width' => $video_width ) );
|
55 |
-
|
56 |
-
if ( $autoplay ) {
|
57 |
-
$html = preg_replace_callback( '/src=["\'](http[^"\']*)["\']/', array(
|
58 |
-
$this,
|
59 |
-
'autoplay_callback'
|
60 |
-
), $html );
|
61 |
-
}
|
62 |
-
|
63 |
-
if ( empty( $related_videos ) ) {
|
64 |
-
$html = preg_replace_callback( '/src=["\'](http[^"\']*)["\']/', array(
|
65 |
-
$this,
|
66 |
-
'remove_related_videos'
|
67 |
-
), $html );
|
68 |
-
}
|
69 |
-
|
70 |
-
if ( ! empty( $html ) ) {
|
71 |
-
set_transient( 'sow-vid-embed[' . $hash . ']', $html, 30 * 86400 );
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
return $html;
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* The preg_replace callback that adds autoplay.
|
80 |
-
*
|
81 |
-
* @param $match
|
82 |
-
*
|
83 |
-
* @return mixed
|
84 |
-
*/
|
85 |
-
function autoplay_callback( $match ) {
|
86 |
-
return str_replace( $match[1], add_query_arg( 'autoplay', 1, $match[1] ), $match[0] );
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* The preg_replace callback that adds the rel param for YouTube videos.
|
91 |
-
*
|
92 |
-
* @param $match
|
93 |
-
*
|
94 |
-
* @return mixed
|
95 |
-
*/
|
96 |
-
function remove_related_videos( $match ) {
|
97 |
-
return str_replace( $match[1], add_query_arg( 'rel', 0, $match[1] ), $match[0] );
|
98 |
-
}
|
99 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This class handles video related functionality.
|
5 |
+
*
|
6 |
+
* Class SiteOrigin_Video
|
7 |
+
*/
|
8 |
+
|
9 |
+
class SiteOrigin_Video {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Check whether it's possible to oEmbed by testing if a provider URL can be obtained.
|
13 |
+
*
|
14 |
+
* @param string $url The URL of the video to be embedded.
|
15 |
+
*
|
16 |
+
* @return bool Whether it's possible to embed this video.
|
17 |
+
*/
|
18 |
+
function can_oembed( $url ) {
|
19 |
+
$wp_oembed = new WP_oEmbed();
|
20 |
+
$provider = $wp_oembed->get_provider( $url, array( 'discover' => false ) );
|
21 |
+
|
22 |
+
return ! empty( $provider );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Gets a video source embed
|
27 |
+
*
|
28 |
+
* @param string $src The URL of the video.
|
29 |
+
* @param bool $autoplay Whether to start playing the video automatically once loaded. ( YouTube only )
|
30 |
+
* @param bool $related_videos Whether to show related videos after the video has finished playing. ( YouTube only )
|
31 |
+
*
|
32 |
+
* @return false|mixed|null|string|string[]
|
33 |
+
*/
|
34 |
+
function get_video_oembed( $src, $autoplay = false, $related_videos = true ) {
|
35 |
+
if ( empty( $src ) ) {
|
36 |
+
return '';
|
37 |
+
}
|
38 |
+
|
39 |
+
global $content_width;
|
40 |
+
|
41 |
+
$video_width = ! empty( $content_width ) ? $content_width : 640;
|
42 |
+
|
43 |
+
$hash = md5( serialize( array(
|
44 |
+
'src' => $src,
|
45 |
+
'width' => $video_width,
|
46 |
+
'autoplay' => $autoplay,
|
47 |
+
) ) );
|
48 |
+
|
49 |
+
// Convert embed format to standard format to be compatible with wp_oembed_get
|
50 |
+
$src = preg_replace('/https?:\/\/www.youtube.com\/embed\/([^\/]+)/', 'https://www.youtube.com/watch?v=$1', $src);
|
51 |
+
|
52 |
+
$html = get_transient( 'sow-vid-embed[' . $hash . ']' );
|
53 |
+
if ( empty( $html ) ) {
|
54 |
+
$html = wp_oembed_get( $src, array( 'width' => $video_width ) );
|
55 |
+
|
56 |
+
if ( $autoplay ) {
|
57 |
+
$html = preg_replace_callback( '/src=["\'](http[^"\']*)["\']/', array(
|
58 |
+
$this,
|
59 |
+
'autoplay_callback'
|
60 |
+
), $html );
|
61 |
+
}
|
62 |
+
|
63 |
+
if ( empty( $related_videos ) ) {
|
64 |
+
$html = preg_replace_callback( '/src=["\'](http[^"\']*)["\']/', array(
|
65 |
+
$this,
|
66 |
+
'remove_related_videos'
|
67 |
+
), $html );
|
68 |
+
}
|
69 |
+
|
70 |
+
if ( ! empty( $html ) ) {
|
71 |
+
set_transient( 'sow-vid-embed[' . $hash . ']', $html, 30 * 86400 );
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
return $html;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* The preg_replace callback that adds autoplay.
|
80 |
+
*
|
81 |
+
* @param $match
|
82 |
+
*
|
83 |
+
* @return mixed
|
84 |
+
*/
|
85 |
+
function autoplay_callback( $match ) {
|
86 |
+
return str_replace( $match[1], add_query_arg( 'autoplay', 1, $match[1] ), $match[0] );
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* The preg_replace callback that adds the rel param for YouTube videos.
|
91 |
+
*
|
92 |
+
* @param $match
|
93 |
+
*
|
94 |
+
* @return mixed
|
95 |
+
*/
|
96 |
+
function remove_related_videos( $match ) {
|
97 |
+
return str_replace( $match[1], add_query_arg( 'rel', 0, $match[1] ), $match[0] );
|
98 |
+
}
|
99 |
+
}
|
base/inc/widget-manager.class.php
CHANGED
@@ -1,198 +1,198 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Handles registering Widgets Bundle widgets.
|
5 |
-
*
|
6 |
-
* Class SiteOrigin_Widgets_Widget_Manager
|
7 |
-
*/
|
8 |
-
class SiteOrigin_Widgets_Widget_Manager {
|
9 |
-
/**
|
10 |
-
* Regsitered widgets
|
11 |
-
*
|
12 |
-
* @var
|
13 |
-
*/
|
14 |
-
private $registered;
|
15 |
-
|
16 |
-
function __construct(){
|
17 |
-
$this->registered = array();
|
18 |
-
add_action( 'widgets_init', array( $this, 'widgets_init' ) );
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Get the single instance.
|
23 |
-
*
|
24 |
-
* @return SiteOrigin_Widgets_Widget_Manager
|
25 |
-
*/
|
26 |
-
static function single() {
|
27 |
-
static $single;
|
28 |
-
|
29 |
-
if( empty($single) ) {
|
30 |
-
$single = new self();
|
31 |
-
}
|
32 |
-
|
33 |
-
return $single;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* @param $id
|
38 |
-
* @param $path
|
39 |
-
* @param bool|false $class
|
40 |
-
* @return mixed
|
41 |
-
*/
|
42 |
-
public function register( $id, $path, $class = false ){
|
43 |
-
$path = wp_normalize_path( $path );
|
44 |
-
if ( empty( $class ) ) {
|
45 |
-
$class = 'SiteOrigin_Widget_' . str_replace( ' ', '', ucwords( str_replace('-', ' ', $id) ) ) . '_Widget';
|
46 |
-
}
|
47 |
-
|
48 |
-
$this->registered[ $id ] = new stdClass();
|
49 |
-
$this->registered[ $id ]->path = $path;
|
50 |
-
$this->registered[ $id ]->class = $class;
|
51 |
-
$this->registered[ $id ]->registered = false;
|
52 |
-
|
53 |
-
return $this->registered[ $id ];
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Initialize all the widgets.
|
58 |
-
*/
|
59 |
-
public function widgets_init(){
|
60 |
-
foreach( $this->registered as $id => & $info ) {
|
61 |
-
if( $info->registered ) continue;
|
62 |
-
register_widget( $info->class );
|
63 |
-
$info->registered = true;
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Get the path of the widget
|
69 |
-
*
|
70 |
-
* @param $id
|
71 |
-
*
|
72 |
-
* @return bool
|
73 |
-
*/
|
74 |
-
public function get_plugin_path( $id ) {
|
75 |
-
if( empty( $this->registered[ $id ] ) ) {
|
76 |
-
// This call might be using the incorrect ID convention.
|
77 |
-
if( substr($id, 0, 4) == 'sow-' ) $id = substr($id, 4);
|
78 |
-
else $id = 'sow-' . $id;
|
79 |
-
}
|
80 |
-
|
81 |
-
return !empty($this->registered[$id]) ? $this->registered[$id]->path : false;
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* @param $id
|
86 |
-
*
|
87 |
-
* @return string
|
88 |
-
*
|
89 |
-
* @todo examine this when using a widget in a theme folder.
|
90 |
-
*/
|
91 |
-
function get_plugin_dir_path( $id ){
|
92 |
-
return plugin_dir_path( $this->get_plugin_path( $id ) );
|
93 |
-
}
|
94 |
-
|
95 |
-
function get_plugin_dir_url( $id ){
|
96 |
-
return plugin_dir_url( $this->get_plugin_path( $id ) );
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Get a widget ID from a file path
|
101 |
-
*
|
102 |
-
* @param string $path The file path.
|
103 |
-
*
|
104 |
-
* @return string The ID.
|
105 |
-
*/
|
106 |
-
function get_id_from_path( $path ){
|
107 |
-
foreach( $this->registered as $id => $r ) {
|
108 |
-
if( $r->path == $path ) return $id;
|
109 |
-
}
|
110 |
-
return false;
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Get the class name of a widget from the
|
115 |
-
*
|
116 |
-
* @param $path
|
117 |
-
* @return mixed
|
118 |
-
*/
|
119 |
-
function get_class_from_path( $path ) {
|
120 |
-
foreach( $this->registered as $id => $r ) {
|
121 |
-
if( $r->path == $path ) return $r->class;
|
122 |
-
}
|
123 |
-
return false;
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Get the list of registered widgets.
|
128 |
-
*
|
129 |
-
* @return array
|
130 |
-
*/
|
131 |
-
function get_registered_widgets() {
|
132 |
-
return $this->registered;
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Get the registered widget instance by it's class name or the hash generated when it was registered.
|
137 |
-
*
|
138 |
-
* @param $class_or_hash
|
139 |
-
*
|
140 |
-
* @return array
|
141 |
-
*
|
142 |
-
*/
|
143 |
-
static function get_widget_instance( $class_or_hash ) {
|
144 |
-
global $wp_widget_factory;
|
145 |
-
if ( isset( $wp_widget_factory->widgets[ $class_or_hash ] ) ) {
|
146 |
-
return $wp_widget_factory->widgets[ $class_or_hash ];
|
147 |
-
} else {
|
148 |
-
foreach ( $wp_widget_factory->widgets as $widget_instance ) {
|
149 |
-
if ( $widget_instance instanceof $class_or_hash ) {
|
150 |
-
return $widget_instance;
|
151 |
-
}
|
152 |
-
}
|
153 |
-
}
|
154 |
-
return null;
|
155 |
-
}
|
156 |
-
}
|
157 |
-
SiteOrigin_Widgets_Widget_Manager::single();
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Register a widget
|
161 |
-
*
|
162 |
-
* @param string $id The ID of the widget
|
163 |
-
* @param string $path The path of the widget
|
164 |
-
* @param bool|string $class The name of the class
|
165 |
-
*/
|
166 |
-
function siteorigin_widget_register( $id, $path, $class = false ){
|
167 |
-
SiteOrigin_Widgets_Widget_Manager::single()->register( $id, $path, $class );
|
168 |
-
}
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Get the base file of a widget plugin
|
172 |
-
*
|
173 |
-
* @param $name
|
174 |
-
* @return bool
|
175 |
-
*/
|
176 |
-
function siteorigin_widget_get_plugin_path($id){
|
177 |
-
return SiteOrigin_Widgets_Widget_Manager::single()->get_plugin_path( $id );
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Get the base path folder of a widget plugin.
|
182 |
-
*
|
183 |
-
* @param $id
|
184 |
-
* @return string
|
185 |
-
*/
|
186 |
-
function siteorigin_widget_get_plugin_dir_path($id){
|
187 |
-
return SiteOrigin_Widgets_Widget_Manager::single()->get_plugin_dir_path( $id );
|
188 |
-
}
|
189 |
-
|
190 |
-
/**
|
191 |
-
* Get the base path URL of a widget plugin.
|
192 |
-
*
|
193 |
-
* @param $id
|
194 |
-
* @return string
|
195 |
-
*/
|
196 |
-
function siteorigin_widget_get_plugin_dir_url($id){
|
197 |
-
return SiteOrigin_Widgets_Widget_Manager::single()->get_plugin_dir_url( $id );
|
198 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Handles registering Widgets Bundle widgets.
|
5 |
+
*
|
6 |
+
* Class SiteOrigin_Widgets_Widget_Manager
|
7 |
+
*/
|
8 |
+
class SiteOrigin_Widgets_Widget_Manager {
|
9 |
+
/**
|
10 |
+
* Regsitered widgets
|
11 |
+
*
|
12 |
+
* @var
|
13 |
+
*/
|
14 |
+
private $registered;
|
15 |
+
|
16 |
+
function __construct(){
|
17 |
+
$this->registered = array();
|
18 |
+
add_action( 'widgets_init', array( $this, 'widgets_init' ) );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Get the single instance.
|
23 |
+
*
|
24 |
+
* @return SiteOrigin_Widgets_Widget_Manager
|
25 |
+
*/
|
26 |
+
static function single() {
|
27 |
+
static $single;
|
28 |
+
|
29 |
+
if( empty($single) ) {
|
30 |
+
$single = new self();
|
31 |
+
}
|
32 |
+
|
33 |
+
return $single;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @param $id
|
38 |
+
* @param $path
|
39 |
+
* @param bool|false $class
|
40 |
+
* @return mixed
|
41 |
+
*/
|
42 |
+
public function register( $id, $path, $class = false ){
|
43 |
+
$path = wp_normalize_path( $path );
|
44 |
+
if ( empty( $class ) ) {
|
45 |
+
$class = 'SiteOrigin_Widget_' . str_replace( ' ', '', ucwords( str_replace('-', ' ', $id) ) ) . '_Widget';
|
46 |
+
}
|
47 |
+
|
48 |
+
$this->registered[ $id ] = new stdClass();
|
49 |
+
$this->registered[ $id ]->path = $path;
|
50 |
+
$this->registered[ $id ]->class = $class;
|
51 |
+
$this->registered[ $id ]->registered = false;
|
52 |
+
|
53 |
+
return $this->registered[ $id ];
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Initialize all the widgets.
|
58 |
+
*/
|
59 |
+
public function widgets_init(){
|
60 |
+
foreach( $this->registered as $id => & $info ) {
|
61 |
+
if( $info->registered ) continue;
|
62 |
+
register_widget( $info->class );
|
63 |
+
$info->registered = true;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Get the path of the widget
|
69 |
+
*
|
70 |
+
* @param $id
|
71 |
+
*
|
72 |
+
* @return bool
|
73 |
+
*/
|
74 |
+
public function get_plugin_path( $id ) {
|
75 |
+
if( empty( $this->registered[ $id ] ) ) {
|
76 |
+
// This call might be using the incorrect ID convention.
|
77 |
+
if( substr($id, 0, 4) == 'sow-' ) $id = substr($id, 4);
|
78 |
+
else $id = 'sow-' . $id;
|
79 |
+
}
|
80 |
+
|
81 |
+
return !empty($this->registered[$id]) ? $this->registered[$id]->path : false;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* @param $id
|
86 |
+
*
|
87 |
+
* @return string
|
88 |
+
*
|
89 |
+
* @todo examine this when using a widget in a theme folder.
|
90 |
+
*/
|
91 |
+
function get_plugin_dir_path( $id ){
|
92 |
+
return plugin_dir_path( $this->get_plugin_path( $id ) );
|
93 |
+
}
|
94 |
+
|
95 |
+
function get_plugin_dir_url( $id ){
|
96 |
+
return plugin_dir_url( $this->get_plugin_path( $id ) );
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Get a widget ID from a file path
|
101 |
+
*
|
102 |
+
* @param string $path The file path.
|
103 |
+
*
|
104 |
+
* @return string The ID.
|
105 |
+
*/
|
106 |
+
function get_id_from_path( $path ){
|
107 |
+
foreach( $this->registered as $id => $r ) {
|
108 |
+
if( $r->path == $path ) return $id;
|
109 |
+
}
|
110 |
+
return false;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Get the class name of a widget from the
|
115 |
+
*
|
116 |
+
* @param $path
|
117 |
+
* @return mixed
|
118 |
+
*/
|
119 |
+
function get_class_from_path( $path ) {
|
120 |
+
foreach( $this->registered as $id => $r ) {
|
121 |
+
if( $r->path == $path ) return $r->class;
|
122 |
+
}
|
123 |
+
return false;
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Get the list of registered widgets.
|
128 |
+
*
|
129 |
+
* @return array
|
130 |
+
*/
|
131 |
+
function get_registered_widgets() {
|
132 |
+
return $this->registered;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Get the registered widget instance by it's class name or the hash generated when it was registered.
|
137 |
+
*
|
138 |
+
* @param $class_or_hash
|
139 |
+
*
|
140 |
+
* @return array
|
141 |
+
*
|
142 |
+
*/
|
143 |
+
static function get_widget_instance( $class_or_hash ) {
|
144 |
+
global $wp_widget_factory;
|
145 |
+
if ( isset( $wp_widget_factory->widgets[ $class_or_hash ] ) ) {
|
146 |
+
return $wp_widget_factory->widgets[ $class_or_hash ];
|
147 |
+
} else {
|
148 |
+
foreach ( $wp_widget_factory->widgets as $widget_instance ) {
|
149 |
+
if ( $widget_instance instanceof $class_or_hash ) {
|
150 |
+
return $widget_instance;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
}
|
154 |
+
return null;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
SiteOrigin_Widgets_Widget_Manager::single();
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Register a widget
|
161 |
+
*
|
162 |
+
* @param string $id The ID of the widget
|
163 |
+
* @param string $path The path of the widget
|
164 |
+
* @param bool|string $class The name of the class
|
165 |
+
*/
|
166 |
+
function siteorigin_widget_register( $id, $path, $class = false ){
|
167 |
+
SiteOrigin_Widgets_Widget_Manager::single()->register( $id, $path, $class );
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Get the base file of a widget plugin
|
172 |
+
*
|
173 |
+
* @param $name
|
174 |
+
* @return bool
|
175 |
+
*/
|
176 |
+
function siteorigin_widget_get_plugin_path($id){
|
177 |
+
return SiteOrigin_Widgets_Widget_Manager::single()->get_plugin_path( $id );
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Get the base path folder of a widget plugin.
|
182 |
+
*
|
183 |
+
* @param $id
|
184 |
+
* @return string
|
185 |
+
*/
|
186 |
+
function siteorigin_widget_get_plugin_dir_path($id){
|
187 |
+
return SiteOrigin_Widgets_Widget_Manager::single()->get_plugin_dir_path( $id );
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Get the base path URL of a widget plugin.
|
192 |
+
*
|
193 |
+
* @param $id
|
194 |
+
* @return string
|
195 |
+
*/
|
196 |
+
function siteorigin_widget_get_plugin_dir_url($id){
|
197 |
+
return SiteOrigin_Widgets_Widget_Manager::single()->get_plugin_dir_url( $id );
|
198 |
+
}
|
base/inc/widgets/base-slider.class.php
CHANGED
@@ -1,379 +1,370 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
abstract class SiteOrigin_Widget_Base_Slider extends SiteOrigin_Widget {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Register all the frontend scripts and styles for the base slider.
|
7 |
-
*/
|
8 |
-
function initialize() {
|
9 |
-
|
10 |
-
$frontend_scripts = array();
|
11 |
-
$frontend_scripts[] = array(
|
12 |
-
'sow-slider-slider-cycle2',
|
13 |
-
plugin_dir_url( SOW_BUNDLE_BASE_FILE ) . 'js/jquery.cycle' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
14 |
-
array( 'jquery' ),
|
15 |
-
SOW_BUNDLE_VERSION
|
16 |
-
);
|
17 |
-
if( function_exists('wp_is_mobile') && wp_is_mobile() ) {
|
18 |
-
$frontend_scripts[] = array(
|
19 |
-
'sow-slider-slider-cycle2-swipe',
|
20 |
-
plugin_dir_url( SOW_BUNDLE_BASE_FILE ) . 'js/jquery.cycle.swipe' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
21 |
-
array( 'jquery' ),
|
22 |
-
SOW_BUNDLE_VERSION
|
23 |
-
);
|
24 |
-
}
|
25 |
-
$frontend_scripts[] = array(
|
26 |
-
'sow-slider-slider',
|
27 |
-
plugin_dir_url( SOW_BUNDLE_BASE_FILE ) . 'js/slider/jquery.slider' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
28 |
-
array( 'jquery' ),
|
29 |
-
SOW_BUNDLE_VERSION
|
30 |
-
);
|
31 |
-
|
32 |
-
$this->register_frontend_scripts( $frontend_scripts );
|
33 |
-
$this->register_frontend_styles(
|
34 |
-
array(
|
35 |
-
array(
|
36 |
-
'sow-slider-slider',
|
37 |
-
plugin_dir_url( SOW_BUNDLE_BASE_FILE ) . 'css/slider/slider.css',
|
38 |
-
array(),
|
39 |
-
SOW_BUNDLE_VERSION
|
40 |
-
)
|
41 |
-
)
|
42 |
-
);
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* The control array required for the slider
|
47 |
-
*
|
48 |
-
* @return array
|
49 |
-
*/
|
50 |
-
function control_form_fields(){
|
51 |
-
return array(
|
52 |
-
'speed' => array(
|
53 |
-
'type' => 'number',
|
54 |
-
'label' => __('Animation speed', 'so-widgets-bundle'),
|
55 |
-
'description' => __('Animation speed in milliseconds.', 'so-widgets-bundle'),
|
56 |
-
'default' => 800,
|
57 |
-
),
|
58 |
-
|
59 |
-
'timeout' => array(
|
60 |
-
'type' => 'number',
|
61 |
-
'label' => __('Timeout', 'so-widgets-bundle'),
|
62 |
-
'description' => __('How long each frame is displayed for in milliseconds.', 'so-widgets-bundle'),
|
63 |
-
'default' => 8000,
|
64 |
-
),
|
65 |
-
|
66 |
-
'nav_color_hex' => array(
|
67 |
-
'type' => 'color',
|
68 |
-
'label' => __('Navigation color', 'so-widgets-bundle'),
|
69 |
-
'default' => '#FFFFFF',
|
70 |
-
),
|
71 |
-
|
72 |
-
'nav_style' => array(
|
73 |
-
'type' => 'select',
|
74 |
-
'label' => __('Navigation style', 'so-widgets-bundle'),
|
75 |
-
'default' => 'thin',
|
76 |
-
'options' => array(
|
77 |
-
'ultra-thin' => __('Ultra thin', 'so-widgets-bundle'),
|
78 |
-
'thin' => __('Thin', 'so-widgets-bundle'),
|
79 |
-
'medium' => __('Medium', 'so-widgets-bundle'),
|
80 |
-
'thick' => __('Thick', 'so-widgets-bundle'),
|
81 |
-
'ultra-thin-rounded' => __('Rounded ultra thin', 'so-widgets-bundle'),
|
82 |
-
'thin-rounded' => __('Rounded thin', 'so-widgets-bundle'),
|
83 |
-
'medium-rounded' => __('Rounded medium', 'so-widgets-bundle'),
|
84 |
-
'thick-rounded' => __('Rounded thick', 'so-widgets-bundle'),
|
85 |
-
)
|
86 |
-
),
|
87 |
-
|
88 |
-
'nav_size' => array(
|
89 |
-
'type' => 'number',
|
90 |
-
'label' => __('Navigation size', 'so-widgets-bundle'),
|
91 |
-
'default' => '25',
|
92 |
-
),
|
93 |
-
|
94 |
-
'nav_always_show_mobile' => array(
|
95 |
-
'type' => 'checkbox',
|
96 |
-
'label' => __( 'Always show navigation on mobile', 'so-widgets-bundle' ),
|
97 |
-
),
|
98 |
-
|
99 |
-
'swipe' => array(
|
100 |
-
'type' => 'checkbox',
|
101 |
-
'label' => __( 'Swipe control', 'so-widgets-bundle' ),
|
102 |
-
'description' => __( 'Allow users to swipe through frames on mobile devices.', 'so-widgets-bundle' ),
|
103 |
-
'default' => true,
|
104 |
-
),
|
105 |
-
|
106 |
-
'background_video_mobile' => array(
|
107 |
-
'type' => 'checkbox',
|
108 |
-
'label' => __( 'Show slide background videos on mobile', 'so-widgets-bundle' ),
|
109 |
-
'description' => __( 'Allow slide background videos to appear on mobile devices that support autoplay.', 'so-widgets-bundle' ),
|
110 |
-
)
|
111 |
-
);
|
112 |
-
}
|
113 |
-
|
114 |
-
function video_form_fields(){
|
115 |
-
return array(
|
116 |
-
'file' => array(
|
117 |
-
'type' => 'media',
|
118 |
-
'library' => 'video',
|
119 |
-
'label' => __('Video file', 'so-widgets-bundle'),
|
120 |
-
),
|
121 |
-
|
122 |
-
'url' => array(
|
123 |
-
'type' => 'text',
|
124 |
-
'sanitize' => 'url',
|
125 |
-
'label' => __('Video URL', 'so-widgets-bundle'),
|
126 |
-
'optional' => 'true',
|
127 |
-
'description' => __('An external URL of the video. Overrides video file.', 'so-widgets-bundle')
|
128 |
-
),
|
129 |
-
|
130 |
-
'autoplay' => array(
|
131 |
-
'type' => 'checkbox',
|
132 |
-
'label' => __( 'Autoplay', 'so-widgets-bundle' ),
|
133 |
-
'default' => false,
|
134 |
-
'description' => __( 'Currently only for YouTube videos.', 'so-widgets-bundle' ),
|
135 |
-
),
|
136 |
-
|
137 |
-
'format' => array(
|
138 |
-
'type' => 'select',
|
139 |
-
'label' => __('Video format', 'so-widgets-bundle'),
|
140 |
-
'options' => array(
|
141 |
-
'video/mp4' => 'MP4',
|
142 |
-
'video/webm' => 'WebM',
|
143 |
-
'video/ogg' => 'Ogg',
|
144 |
-
),
|
145 |
-
),
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
$this->render_template_part('
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
<
|
205 |
-
<?php
|
206 |
-
<
|
207 |
-
|
208 |
-
</
|
209 |
-
|
210 |
-
<div class="sow-slide-nav sow-slide-nav-
|
211 |
-
<a href="#" data-goto="
|
212 |
-
<em class="sow-sld-icon-<?php echo sanitize_html_class( $controls['nav_style'] ) ?>-
|
213 |
-
</a>
|
214 |
-
</div>
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
'
|
249 |
-
'image' =>
|
250 |
-
'
|
251 |
-
'
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
'
|
256 |
-
'
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
)
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
}
|
268 |
-
|
269 |
-
if( $background['
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
}
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
$wrapper_attributes
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
);
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
*
|
333 |
-
*
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
}
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
$video_element .= '<source src="' . sow_esc_url( $video_file ) . '" type="' . esc_attr( $video['format'] ) . '">';
|
372 |
-
}
|
373 |
-
if ( strpos( $video_element, 'source' ) !== false ) {
|
374 |
-
$video_element .= '</video>';
|
375 |
-
echo $video_element;
|
376 |
-
}
|
377 |
-
}
|
378 |
-
|
379 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
abstract class SiteOrigin_Widget_Base_Slider extends SiteOrigin_Widget {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Register all the frontend scripts and styles for the base slider.
|
7 |
+
*/
|
8 |
+
function initialize() {
|
9 |
+
|
10 |
+
$frontend_scripts = array();
|
11 |
+
$frontend_scripts[] = array(
|
12 |
+
'sow-slider-slider-cycle2',
|
13 |
+
plugin_dir_url( SOW_BUNDLE_BASE_FILE ) . 'js/jquery.cycle' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
14 |
+
array( 'jquery' ),
|
15 |
+
SOW_BUNDLE_VERSION
|
16 |
+
);
|
17 |
+
if( function_exists('wp_is_mobile') && wp_is_mobile() ) {
|
18 |
+
$frontend_scripts[] = array(
|
19 |
+
'sow-slider-slider-cycle2-swipe',
|
20 |
+
plugin_dir_url( SOW_BUNDLE_BASE_FILE ) . 'js/jquery.cycle.swipe' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
21 |
+
array( 'jquery' ),
|
22 |
+
SOW_BUNDLE_VERSION
|
23 |
+
);
|
24 |
+
}
|
25 |
+
$frontend_scripts[] = array(
|
26 |
+
'sow-slider-slider',
|
27 |
+
plugin_dir_url( SOW_BUNDLE_BASE_FILE ) . 'js/slider/jquery.slider' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
28 |
+
array( 'jquery' ),
|
29 |
+
SOW_BUNDLE_VERSION
|
30 |
+
);
|
31 |
+
|
32 |
+
$this->register_frontend_scripts( $frontend_scripts );
|
33 |
+
$this->register_frontend_styles(
|
34 |
+
array(
|
35 |
+
array(
|
36 |
+
'sow-slider-slider',
|
37 |
+
plugin_dir_url( SOW_BUNDLE_BASE_FILE ) . 'css/slider/slider.css',
|
38 |
+
array(),
|
39 |
+
SOW_BUNDLE_VERSION
|
40 |
+
)
|
41 |
+
)
|
42 |
+
);
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* The control array required for the slider
|
47 |
+
*
|
48 |
+
* @return array
|
49 |
+
*/
|
50 |
+
function control_form_fields(){
|
51 |
+
return array(
|
52 |
+
'speed' => array(
|
53 |
+
'type' => 'number',
|
54 |
+
'label' => __('Animation speed', 'so-widgets-bundle'),
|
55 |
+
'description' => __('Animation speed in milliseconds.', 'so-widgets-bundle'),
|
56 |
+
'default' => 800,
|
57 |
+
),
|
58 |
+
|
59 |
+
'timeout' => array(
|
60 |
+
'type' => 'number',
|
61 |
+
'label' => __('Timeout', 'so-widgets-bundle'),
|
62 |
+
'description' => __('How long each frame is displayed for in milliseconds.', 'so-widgets-bundle'),
|
63 |
+
'default' => 8000,
|
64 |
+
),
|
65 |
+
|
66 |
+
'nav_color_hex' => array(
|
67 |
+
'type' => 'color',
|
68 |
+
'label' => __('Navigation color', 'so-widgets-bundle'),
|
69 |
+
'default' => '#FFFFFF',
|
70 |
+
),
|
71 |
+
|
72 |
+
'nav_style' => array(
|
73 |
+
'type' => 'select',
|
74 |
+
'label' => __('Navigation style', 'so-widgets-bundle'),
|
75 |
+
'default' => 'thin',
|
76 |
+
'options' => array(
|
77 |
+
'ultra-thin' => __('Ultra thin', 'so-widgets-bundle'),
|
78 |
+
'thin' => __('Thin', 'so-widgets-bundle'),
|
79 |
+
'medium' => __('Medium', 'so-widgets-bundle'),
|
80 |
+
'thick' => __('Thick', 'so-widgets-bundle'),
|
81 |
+
'ultra-thin-rounded' => __('Rounded ultra thin', 'so-widgets-bundle'),
|
82 |
+
'thin-rounded' => __('Rounded thin', 'so-widgets-bundle'),
|
83 |
+
'medium-rounded' => __('Rounded medium', 'so-widgets-bundle'),
|
84 |
+
'thick-rounded' => __('Rounded thick', 'so-widgets-bundle'),
|
85 |
+
)
|
86 |
+
),
|
87 |
+
|
88 |
+
'nav_size' => array(
|
89 |
+
'type' => 'number',
|
90 |
+
'label' => __('Navigation size', 'so-widgets-bundle'),
|
91 |
+
'default' => '25',
|
92 |
+
),
|
93 |
+
|
94 |
+
'nav_always_show_mobile' => array(
|
95 |
+
'type' => 'checkbox',
|
96 |
+
'label' => __( 'Always show navigation on mobile', 'so-widgets-bundle' ),
|
97 |
+
),
|
98 |
+
|
99 |
+
'swipe' => array(
|
100 |
+
'type' => 'checkbox',
|
101 |
+
'label' => __( 'Swipe control', 'so-widgets-bundle' ),
|
102 |
+
'description' => __( 'Allow users to swipe through frames on mobile devices.', 'so-widgets-bundle' ),
|
103 |
+
'default' => true,
|
104 |
+
),
|
105 |
+
|
106 |
+
'background_video_mobile' => array(
|
107 |
+
'type' => 'checkbox',
|
108 |
+
'label' => __( 'Show slide background videos on mobile', 'so-widgets-bundle' ),
|
109 |
+
'description' => __( 'Allow slide background videos to appear on mobile devices that support autoplay.', 'so-widgets-bundle' ),
|
110 |
+
)
|
111 |
+
);
|
112 |
+
}
|
113 |
+
|
114 |
+
function video_form_fields(){
|
115 |
+
return array(
|
116 |
+
'file' => array(
|
117 |
+
'type' => 'media',
|
118 |
+
'library' => 'video',
|
119 |
+
'label' => __('Video file', 'so-widgets-bundle'),
|
120 |
+
),
|
121 |
+
|
122 |
+
'url' => array(
|
123 |
+
'type' => 'text',
|
124 |
+
'sanitize' => 'url',
|
125 |
+
'label' => __('Video URL', 'so-widgets-bundle'),
|
126 |
+
'optional' => 'true',
|
127 |
+
'description' => __('An external URL of the video. Overrides video file.', 'so-widgets-bundle')
|
128 |
+
),
|
129 |
+
|
130 |
+
'autoplay' => array(
|
131 |
+
'type' => 'checkbox',
|
132 |
+
'label' => __( 'Autoplay', 'so-widgets-bundle' ),
|
133 |
+
'default' => false,
|
134 |
+
'description' => __( 'Currently only for YouTube videos.', 'so-widgets-bundle' ),
|
135 |
+
),
|
136 |
+
|
137 |
+
'format' => array(
|
138 |
+
'type' => 'select',
|
139 |
+
'label' => __('Video format', 'so-widgets-bundle'),
|
140 |
+
'options' => array(
|
141 |
+
'video/mp4' => 'MP4',
|
142 |
+
'video/webm' => 'WebM',
|
143 |
+
'video/ogg' => 'Ogg',
|
144 |
+
),
|
145 |
+
),
|
146 |
+
);
|
147 |
+
}
|
148 |
+
|
149 |
+
function get_settings_form() {
|
150 |
+
return array(
|
151 |
+
'responsive_breakpoint' => array(
|
152 |
+
'type' => 'measurement',
|
153 |
+
'label' => __( 'Responsive Breakpoint', 'so-widgets-bundle' ),
|
154 |
+
'default' => '780px',
|
155 |
+
'description' => __( "This setting controls when the Slider will switch to the responsive mode. This breakpoint will only be used if always show navigation on mobile is enabled. The default value is 780px.", 'so-widgets-bundle' )
|
156 |
+
)
|
157 |
+
);
|
158 |
+
}
|
159 |
+
|
160 |
+
function slider_settings( $controls ){
|
161 |
+
return array(
|
162 |
+
'pagination' => true,
|
163 |
+
'speed' => empty( $controls['speed'] ) ? 1 : $controls['speed'],
|
164 |
+
'timeout' => $controls['timeout'],
|
165 |
+
'swipe' => $controls['swipe'],
|
166 |
+
'nav_always_show_mobile' => ! empty( $controls['nav_always_show_mobile'] ) ? true : '',
|
167 |
+
'breakpoint' => ! empty( $controls['breakpoint'] ) ? $controls['breakpoint'] : '780px',
|
168 |
+
);
|
169 |
+
}
|
170 |
+
|
171 |
+
function render_template( $controls, $frames ){
|
172 |
+
$this->render_template_part('before_slider', $controls, $frames);
|
173 |
+
$this->render_template_part('before_slides', $controls, $frames);
|
174 |
+
|
175 |
+
foreach( $frames as $i => $frame ) {
|
176 |
+
$this->render_frame( $i, $frame, $controls );
|
177 |
+
}
|
178 |
+
|
179 |
+
$this->render_template_part('after_slides', $controls, $frames);
|
180 |
+
$this->render_template_part('navigation', $controls, $frames);
|
181 |
+
$this->render_template_part('after_slider', $controls, $frames);
|
182 |
+
}
|
183 |
+
|
184 |
+
function render_template_part( $part, $controls, $frames ) {
|
185 |
+
switch( $part ) {
|
186 |
+
case 'before_slider':
|
187 |
+
?><div class="sow-slider-base <?php if( wp_is_mobile() ) echo 'sow-slider-is-mobile' ?>" style="display: none"><?php
|
188 |
+
break;
|
189 |
+
case 'before_slides':
|
190 |
+
$settings = $this->slider_settings( $controls );
|
191 |
+
?><ul class="sow-slider-images" data-settings="<?php echo esc_attr( json_encode($settings) ) ?>"><?php
|
192 |
+
break;
|
193 |
+
case 'after_slides':
|
194 |
+
?></ul><?php
|
195 |
+
break;
|
196 |
+
case 'navigation':
|
197 |
+
?>
|
198 |
+
<ol class="sow-slider-pagination">
|
199 |
+
<?php foreach($frames as $i => $frame) : ?>
|
200 |
+
<li><a href="#" data-goto="<?php echo $i ?>" aria-label="<?php printf( __( 'display slide %s', 'so-widgets-bundle' ), $i+1 ) ?>"><?php echo $i+1 ?></a></li>
|
201 |
+
<?php endforeach; ?>
|
202 |
+
</ol>
|
203 |
+
|
204 |
+
<div class="sow-slide-nav sow-slide-nav-next">
|
205 |
+
<a href="#" data-goto="next" aria-label="<?php _e( 'next slide', 'so-widgets-bundle' ) ?>" data-action="next">
|
206 |
+
<em class="sow-sld-icon-<?php echo sanitize_html_class( $controls['nav_style'] ) ?>-right"></em>
|
207 |
+
</a>
|
208 |
+
</div>
|
209 |
+
|
210 |
+
<div class="sow-slide-nav sow-slide-nav-prev">
|
211 |
+
<a href="#" data-goto="previous" aria-label="<?php _e( 'previous slide', 'so-widgets-bundle' ) ?>" data-action="prev">
|
212 |
+
<em class="sow-sld-icon-<?php echo sanitize_html_class( $controls['nav_style'] ) ?>-left"></em>
|
213 |
+
</a>
|
214 |
+
</div>
|
215 |
+
<?php
|
216 |
+
break;
|
217 |
+
case 'after_slider':
|
218 |
+
?></div><?php
|
219 |
+
break;
|
220 |
+
}
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Get the frame background information from the frame. This can be overwritten by child classes.
|
225 |
+
*
|
226 |
+
* @param $frame
|
227 |
+
*
|
228 |
+
* @return array
|
229 |
+
*/
|
230 |
+
function get_frame_background( $i, $frame ) {
|
231 |
+
return array( );
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* This is mainly for rendering the frame wrapper
|
236 |
+
*
|
237 |
+
* @param $i
|
238 |
+
* @param $frame
|
239 |
+
*/
|
240 |
+
function render_frame( $i, $frame, $controls ){
|
241 |
+
$background = wp_parse_args( $this->get_frame_background( $i, $frame ), array(
|
242 |
+
'color' => false,
|
243 |
+
'image' => false,
|
244 |
+
'image-width' => 0,
|
245 |
+
'image-height' => 0,
|
246 |
+
'opacity' => 1,
|
247 |
+
'url' => false,
|
248 |
+
'new_window' => false,
|
249 |
+
'image-sizing' => 'cover', // options for image sizing are cover and contain
|
250 |
+
'videos' => false,
|
251 |
+
'videos-sizing' => 'background', // options for video sizing are background or full
|
252 |
+
) );
|
253 |
+
|
254 |
+
$wrapper_attributes = array(
|
255 |
+
'class' => array( 'sow-slider-image' ),
|
256 |
+
'style' => array(),
|
257 |
+
);
|
258 |
+
|
259 |
+
if( !empty($background['color']) ) {
|
260 |
+
$wrapper_attributes['style'][] = 'background-color: ' . esc_attr($background['color']);
|
261 |
+
}
|
262 |
+
|
263 |
+
if( $background['opacity'] >= 1 ) {
|
264 |
+
if( !empty($background['image']) ) {
|
265 |
+
$wrapper_attributes['style'][] = 'background-image: url(' . esc_url($background['image']) . ')';
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
if( ! empty( $background['url'] ) ) {
|
270 |
+
$wrapper_attributes['style'][] = 'cursor: pointer;';
|
271 |
+
}
|
272 |
+
|
273 |
+
if( !empty($background['image']) && !empty($background['image-sizing']) ) {
|
274 |
+
$wrapper_attributes['class'][] = ' ' . 'sow-slider-image-' . $background['image-sizing'];
|
275 |
+
}
|
276 |
+
if( !empty( $background['url'] ) ) {
|
277 |
+
$wrapper_attributes['data-url'] = json_encode( array(
|
278 |
+
'url' => sow_esc_url($background['url']),
|
279 |
+
'new_window' => !empty( $background['new_window'] )
|
280 |
+
) );
|
281 |
+
}
|
282 |
+
$wrapper_attributes = apply_filters( 'siteorigin_widgets_slider_wrapper_attributes', $wrapper_attributes, $frame, $background );
|
283 |
+
|
284 |
+
$wrapper_attributes['class'] = implode( ' ', $wrapper_attributes['class'] );
|
285 |
+
$wrapper_attributes['style'] = implode( ';', $wrapper_attributes['style'] );
|
286 |
+
|
287 |
+
?>
|
288 |
+
<li <?php foreach( $wrapper_attributes as $attr => $val ) echo $attr . '="' . esc_attr( $val ) . '" '; ?>>
|
289 |
+
<?php
|
290 |
+
$this->render_frame_contents( $i, $frame );
|
291 |
+
if( !empty( $background['videos'] ) ) {
|
292 |
+
|
293 |
+
$classes = array( 'sow-' . $background['video-sizing'] . '-element' );
|
294 |
+
if ( ! empty( $controls['background_video_mobile'] ) ) {
|
295 |
+
$classes[] = 'sow-mobile-video_enabled';
|
296 |
+
}
|
297 |
+
|
298 |
+
$this->video_code( $background['videos'], $classes );
|
299 |
+
}
|
300 |
+
|
301 |
+
if( $background['opacity'] < 1 && !empty($background['image']) ) {
|
302 |
+
$overlay_attributes = array(
|
303 |
+
'class' => array( 'sow-slider-image-overlay', 'sow-slider-image-' . $background['image-sizing'] ),
|
304 |
+
'style' => array(
|
305 |
+
'background-image: url(' . $background['image'] . ')',
|
306 |
+
'opacity: ' . floatval( $background['opacity'] ),
|
307 |
+
)
|
308 |
+
);
|
309 |
+
$overlay_attributes = apply_filters( 'siteorigin_widgets_slider_overlay_attributes', $overlay_attributes, $frame, $background );
|
310 |
+
|
311 |
+
$overlay_attributes['class'] = implode( ' ', $overlay_attributes['class'] );
|
312 |
+
$overlay_attributes['style'] = implode( ';', $overlay_attributes['style'] );
|
313 |
+
|
314 |
+
?><div <?php foreach( $overlay_attributes as $attr => $val ) echo $attr . '="' . esc_attr( $val ) . '" '; ?> ></div><?php
|
315 |
+
}
|
316 |
+
|
317 |
+
?>
|
318 |
+
</li>
|
319 |
+
<?php
|
320 |
+
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Render the actual content of the frame.
|
325 |
+
*
|
326 |
+
* @param $i
|
327 |
+
* @param $frame
|
328 |
+
*/
|
329 |
+
abstract function render_frame_contents( $i, $frame );
|
330 |
+
|
331 |
+
/**
|
332 |
+
* Render the background videos
|
333 |
+
*
|
334 |
+
* @param $videos
|
335 |
+
* @param array $classes
|
336 |
+
*/
|
337 |
+
function video_code( $videos, $classes = array() ){
|
338 |
+
if( empty( $videos ) ) return;
|
339 |
+
$video_element = '<video class="' . esc_attr( implode( ' ', $classes ) ) . '" autoplay loop muted playsinline>';
|
340 |
+
|
341 |
+
$so_video = new SiteOrigin_Video();
|
342 |
+
foreach( $videos as $video ) {
|
343 |
+
if( empty( $video['file'] ) && empty ( $video['url'] ) ) continue;
|
344 |
+
// If video is an external file, try and display it using oEmbed
|
345 |
+
if( !empty( $video['url'] ) ) {
|
346 |
+
|
347 |
+
$can_oembed = $so_video->can_oembed( $video['url'] );
|
348 |
+
|
349 |
+
// Check if we can oEmbed the video or not
|
350 |
+
if( ! $can_oembed ) {
|
351 |
+
$video_file = sow_esc_url( $video['url'] );
|
352 |
+
} else {
|
353 |
+
echo $so_video->get_video_oembed( $video['url'], ! empty( $video['autoplay'] ) );
|
354 |
+
continue;
|
355 |
+
}
|
356 |
+
}
|
357 |
+
|
358 |
+
// If $video_file isn't set video is a local file
|
359 |
+
if( !isset( $video_file ) ) {
|
360 |
+
$video_file = wp_get_attachment_url( $video['file'] );
|
361 |
+
}
|
362 |
+
$video_element .= '<source src="' . sow_esc_url( $video_file ) . '" type="' . esc_attr( $video['format'] ) . '">';
|
363 |
+
}
|
364 |
+
if ( strpos( $video_element, 'source' ) !== false ) {
|
365 |
+
$video_element .= '</video>';
|
366 |
+
echo $video_element;
|
367 |
+
}
|
368 |
+
}
|
369 |
+
|
370 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
base/js/admin.js
CHANGED
@@ -1,1453 +1,1453 @@
|
|
1 |
-
/* globals wp, jQuery, _, soWidgets, confirm, tinymce, sowbForms */
|
2 |
-
|
3 |
-
var sowbForms = window.sowbForms || {};
|
4 |
-
|
5 |
-
(function ($) {
|
6 |
-
|
7 |
-
$.fn.sowSetupForm = function () {
|
8 |
-
|
9 |
-
return $(this).each(function (i, el) {
|
10 |
-
var $el = $(el),
|
11 |
-
$mainForm,
|
12 |
-
formId,
|
13 |
-
formInitializing = true;
|
14 |
-
|
15 |
-
var $body = $( 'body' );
|
16 |
-
// Skip this if the widget has any fields with an __i__
|
17 |
-
var $inputs = $el.find('input[name]');
|
18 |
-
if ($inputs.length && $inputs.attr('name').indexOf('__i__') !== -1) {
|
19 |
-
return this;
|
20 |
-
}
|
21 |
-
|
22 |
-
// Skip this if we've already set up the form
|
23 |
-
if ( $el.is('.siteorigin-widget-form-main') ) {
|
24 |
-
if ($el.data('sow-form-setup') === true) {
|
25 |
-
return true;
|
26 |
-
}
|
27 |
-
// If we're in the main widgets interface and the form isn't visible and it isn't contained in a
|
28 |
-
// panels dialog (when using the Layout Builder widget), don't worry about setting it up.
|
29 |
-
if ($body.hasClass('widgets-php') && !$el.is(':visible') && $el.closest('.panel-dialog').length === 0) {
|
30 |
-
return true;
|
31 |
-
}
|
32 |
-
|
33 |
-
// Listen for a state change event if this is the main form wrapper
|
34 |
-
$el.on('sowstatechange', function (e, incomingGroup, incomingState) {
|
35 |
-
|
36 |
-
// Find all wrappers that have state handlers on them
|
37 |
-
$el.find('[data-state-handler]').each(function () {
|
38 |
-
var $$ = $(this);
|
39 |
-
// Create a copy of the current state handlers. Add in initial handlers if the form is initializing.
|
40 |
-
var handler = $.extend({}, $$.data('state-handler'), formInitializing ? $$.data('state-handler-initial') : {});
|
41 |
-
if (Object.keys(handler).length === 0) {
|
42 |
-
return true;
|
43 |
-
}
|
44 |
-
|
45 |
-
// We need to figure out what the incoming state is
|
46 |
-
var handlerStateParts, handlerState, thisHandler, $$f, runHandler, handlerStateNames;
|
47 |
-
|
48 |
-
// Indicates if the handler has run
|
49 |
-
var handlerRun = {};
|
50 |
-
|
51 |
-
var repeaterIndex = sowbForms.getContainerFieldId( $$, 'repeater', '.siteorigin-widget-field-repeater-item' );
|
52 |
-
if (repeaterIndex !== false) {
|
53 |
-
var repeaterHandler = {};
|
54 |
-
for ( var rptrState in handler) {
|
55 |
-
repeaterHandler[rptrState.replace('{$repeater}', repeaterIndex)] = handler[rptrState];
|
56 |
-
}
|
57 |
-
handler = repeaterHandler;
|
58 |
-
}
|
59 |
-
|
60 |
-
var widgetFieldId = sowbForms.getContainerFieldId( $$, 'widget', '.siteorigin-widget-widget' );
|
61 |
-
if ( widgetFieldId !== false ) {
|
62 |
-
var widgetFieldHandler = {};
|
63 |
-
for ( var wdgFldState in handler) {
|
64 |
-
var stMatches = wdgFldState.match( /_else\[(.*)\]|(.*)\[(.*)\]/ );
|
65 |
-
var st = '';
|
66 |
-
if ( stMatches && stMatches.length && stMatches[1] === undefined ) {
|
67 |
-
st = stMatches[ 2 ] + '_' + widgetFieldId + '[' + stMatches[ 3 ] + ']';
|
68 |
-
} else {
|
69 |
-
st = '_else[' + stMatches[ 1 ] + '_' + widgetFieldId + ']';
|
70 |
-
}
|
71 |
-
|
72 |
-
widgetFieldHandler[st] = handler[wdgFldState];
|
73 |
-
}
|
74 |
-
handler = widgetFieldHandler;
|
75 |
-
}
|
76 |
-
|
77 |
-
// Go through all the handlers
|
78 |
-
for (var state in handler) {
|
79 |
-
runHandler = false;
|
80 |
-
|
81 |
-
// Parse the handler state parts
|
82 |
-
handlerStateParts = state.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?$/);
|
83 |
-
if (handlerStateParts === null) {
|
84 |
-
// Skip this if there's a problem with the state parts
|
85 |
-
continue;
|
86 |
-
}
|
87 |
-
|
88 |
-
handlerState = {
|
89 |
-
'group': 'default',
|
90 |
-
'name': '',
|
91 |
-
'multi': false
|
92 |
-
};
|
93 |
-
|
94 |
-
// Assign the handlerState attributes based on the parsed state
|
95 |
-
if (handlerStateParts[2] !== undefined) {
|
96 |
-
handlerState.group = handlerStateParts[1];
|
97 |
-
handlerState.name = handlerStateParts[3];
|
98 |
-
}
|
99 |
-
else {
|
100 |
-
handlerState.name = handlerStateParts[0];
|
101 |
-
}
|
102 |
-
handlerState.multi = (handlerStateParts[4] !== undefined);
|
103 |
-
|
104 |
-
if (handlerState.group === '_else') {
|
105 |
-
// This is the special case of an group else handler
|
106 |
-
// Always run if no handlers from the current group have been run yet
|
107 |
-
handlerState.group = handlerState.name;
|
108 |
-
handlerState.name = '';
|
109 |
-
|
110 |
-
// We will run this handler because none have run for it yet
|
111 |
-
runHandler = ( handlerState.group === incomingGroup && typeof handlerRun[handlerState.group] === 'undefined' );
|
112 |
-
}
|
113 |
-
else {
|
114 |
-
// Evaluate if we're in the current state
|
115 |
-
handlerStateNames = handlerState.name.split(',').map(function (a) {
|
116 |
-
return a.trim()
|
117 |
-
});
|
118 |
-
for (var i = 0; i < handlerStateNames.length; i++) {
|
119 |
-
runHandler = (handlerState.group === incomingGroup && handlerStateNames[i] === incomingState);
|
120 |
-
if (runHandler) break;
|
121 |
-
}
|
122 |
-
}
|
123 |
-
|
124 |
-
// Run the handler if previous checks have determined we should
|
125 |
-
if (runHandler) {
|
126 |
-
thisHandler = handler[state];
|
127 |
-
|
128 |
-
// Now we can handle the the handler
|
129 |
-
if (!handlerState.multi) {
|
130 |
-
thisHandler = [thisHandler];
|
131 |
-
}
|
132 |
-
|
133 |
-
for (var i = 0; i < thisHandler.length; i++) {
|
134 |
-
// Choose the item we'll be acting on here
|
135 |
-
if (typeof thisHandler[i][1] !== 'undefined' && Boolean(thisHandler[i][1])) {
|
136 |
-
// thisHandler[i][1] is the sub selector
|
137 |
-
$$f = $$.find(thisHandler[i][1]);
|
138 |
-
}
|
139 |
-
else {
|
140 |
-
$$f = $$;
|
141 |
-
}
|
142 |
-
|
143 |
-
// Call the function on the wrapper we've selected
|
144 |
-
$$f[thisHandler[i][0]].apply($$f, typeof thisHandler[i][2] !== 'undefined' ? thisHandler[i][2] : []);
|
145 |
-
|
146 |
-
if ( $$f.is( '.siteorigin-widget-field:visible' ) ) {
|
147 |
-
if ( $$f.is( '.siteorigin-widget-field-type-section' ) ) {
|
148 |
-
var $fields = $$f.find( '> .siteorigin-widget-section > .siteorigin-widget-field' );
|
149 |
-
$fields.trigger( 'sowsetupformfield' );
|
150 |
-
} else {
|
151 |
-
$$f.trigger( 'sowsetupformfield' );
|
152 |
-
}
|
153 |
-
}
|
154 |
-
|
155 |
-
}
|
156 |
-
|
157 |
-
// Store that we've run a handler
|
158 |
-
handlerRun[handlerState.group] = true;
|
159 |
-
}
|
160 |
-
}
|
161 |
-
|
162 |
-
});
|
163 |
-
});
|
164 |
-
|
165 |
-
// Lets set up the preview
|
166 |
-
$el.sowSetupPreview();
|
167 |
-
$mainForm = $el;
|
168 |
-
|
169 |
-
var $teaser = $el.find('.siteorigin-widget-teaser');
|
170 |
-
$teaser.find('.dashicons-dismiss').click(function () {
|
171 |
-
var $$ = $(this);
|
172 |
-
$.get($$.data('dismiss-url'));
|
173 |
-
|
174 |
-
$teaser.slideUp('normal', function () {
|
175 |
-
$teaser.remove();
|
176 |
-
});
|
177 |
-
});
|
178 |
-
|
179 |
-
|
180 |
-
if ( ! $el.data( 'backupDisabled' ) ) {
|
181 |
-
var _sow_form_id = $el.find( '> .siteorigin-widgets-form-id' ).val();
|
182 |
-
var $timestampField = $el.find( '> .siteorigin-widgets-form-timestamp' );
|
183 |
-
var _sow_form_timestamp = parseInt( $timestampField.val() || 0 );
|
184 |
-
var data = JSON.parse( sessionStorage.getItem( _sow_form_id ) );
|
185 |
-
if ( data ) {
|
186 |
-
if ( data['_sow_form_timestamp'] > _sow_form_timestamp ) {
|
187 |
-
sowbForms.displayNotice(
|
188 |
-
$el,
|
189 |
-
soWidgets.backup.newerVersion,
|
190 |
-
soWidgets.backup.replaceWarning,
|
191 |
-
[
|
192 |
-
{
|
193 |
-
label: soWidgets.backup.restore,
|
194 |
-
callback: function ( $notice ) {
|
195 |
-
sowbForms.setWidgetFormValues( $mainForm, data );
|
196 |
-
$notice.slideUp( 'fast', function () {
|
197 |
-
$notice.remove();
|
198 |
-
} );
|
199 |
-
},
|
200 |
-
},
|
201 |
-
{
|
202 |
-
label: soWidgets.backup.dismiss,
|
203 |
-
callback: function ( $notice ) {
|
204 |
-
$notice.slideUp( 'fast', function () {
|
205 |
-
sessionStorage.removeItem( _sow_form_id );
|
206 |
-
$notice.remove();
|
207 |
-
} );
|
208 |
-
},
|
209 |
-
},
|
210 |
-
]
|
211 |
-
);
|
212 |
-
} else {
|
213 |
-
sessionStorage.removeItem( _sow_form_id );
|
214 |
-
}
|
215 |
-
}
|
216 |
-
$el.change( function () {
|
217 |
-
$timestampField.val( new Date().getTime() );
|
218 |
-
var data = sowbForms.getWidgetFormValues( $el );
|
219 |
-
sessionStorage.setItem( _sow_form_id, JSON.stringify( data ) );
|
220 |
-
} );
|
221 |
-
}
|
222 |
-
}
|
223 |
-
else {
|
224 |
-
$mainForm = $el.closest('.siteorigin-widget-form-main');
|
225 |
-
}
|
226 |
-
formId = $mainForm.find('> .siteorigin-widgets-form-id').val();
|
227 |
-
|
228 |
-
// Find any field or sub widget fields.
|
229 |
-
var $fields = $el.find('> .siteorigin-widget-field');
|
230 |
-
|
231 |
-
// Process any sub sections
|
232 |
-
$fields.find('> .siteorigin-widget-section').sowSetupForm();
|
233 |
-
|
234 |
-
var $subwidgetFields = $fields.find('> .siteorigin-widget-widget');
|
235 |
-
$subwidgetFields.find('> .siteorigin-widget-section').sowSetupForm();
|
236 |
-
|
237 |
-
// Process any sub widgets whose fields aren't contained in a section
|
238 |
-
$subwidgetFields.filter(':not(:has(> .siteorigin-widget-section))').sowSetupForm();
|
239 |
-
|
240 |
-
// Store the field names
|
241 |
-
$fields.find('.siteorigin-widget-input').each(function (i, input) {
|
242 |
-
if ($(input).data('original-name') === null) {
|
243 |
-
$(input).data('original-name', $(input).attr('name'));
|
244 |
-
}
|
245 |
-
});
|
246 |
-
|
247 |
-
// Setup all the repeaters
|
248 |
-
$fields.find('> .siteorigin-widget-field-repeater').sowSetupRepeater();
|
249 |
-
|
250 |
-
// For any repeater items currently in existence
|
251 |
-
$el.find('.siteorigin-widget-field-repeater-item').sowSetupRepeaterItems();
|
252 |
-
|
253 |
-
// Set up any color fields
|
254 |
-
$fields.find('> .siteorigin-widget-input-color').each(function () {
|
255 |
-
var colorField = $(this);
|
256 |
-
var colorFieldOptions = {
|
257 |
-
change: function (event, ui) {
|
258 |
-
setTimeout(function () {
|
259 |
-
$(event.target).trigger('change');
|
260 |
-
}, 100);
|
261 |
-
}
|
262 |
-
};
|
263 |
-
if (colorField.data('defaultColor')) {
|
264 |
-
colorFieldOptions.defaultColor = colorField.data('defaultColor');
|
265 |
-
}
|
266 |
-
colorField.wpColorPicker(colorFieldOptions);
|
267 |
-
});
|
268 |
-
|
269 |
-
///////////////////////////////////////
|
270 |
-
// Handle the sections
|
271 |
-
var expandContainer = function () {
|
272 |
-
$(this).toggleClass('siteorigin-widget-section-visible');
|
273 |
-
$(this).parent().find('> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section')
|
274 |
-
.slideToggle('fast', function () {
|
275 |
-
$(window).resize();
|
276 |
-
$(this).find('> .siteorigin-widget-field-container-state').val($(this).is(':visible') ? 'open' : 'closed');
|
277 |
-
|
278 |
-
if ( $( this ).is( ':visible' ) ) {
|
279 |
-
var $fields = $( this ).find( '> .siteorigin-widget-field' );
|
280 |
-
$fields.trigger( 'sowsetupformfield' );
|
281 |
-
}
|
282 |
-
} );
|
283 |
-
};
|
284 |
-
$fields.filter('.siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section').find('> label').click(expandContainer);
|
285 |
-
$fields.filter('.siteorigin-widget-field-type-posts').find('.posts-container-label-wrapper').click(expandContainer);
|
286 |
-
|
287 |
-
///////////////////////////////////////
|
288 |
-
// Handle the slider fields
|
289 |
-
|
290 |
-
$fields.filter('.siteorigin-widget-field-type-slider').each(function () {
|
291 |
-
var $$ = $(this);
|
292 |
-
var $input = $$.find('input[type="number"]');
|
293 |
-
var $c = $$.find('.siteorigin-widget-value-slider');
|
294 |
-
|
295 |
-
$c.slider({
|
296 |
-
max: parseFloat($input.attr('max')),
|
297 |
-
min: parseFloat($input.attr('min')),
|
298 |
-
step: parseFloat($input.attr('step')),
|
299 |
-
value: parseFloat($input.val()),
|
300 |
-
slide: function (event, ui) {
|
301 |
-
$input.val( parseFloat( ui.value ) );
|
302 |
-
$input.trigger( 'change' );
|
303 |
-
$$.find('.siteorigin-widget-slider-value').html(ui.value);
|
304 |
-
},
|
305 |
-
});
|
306 |
-
$input.change(function(event, data) {
|
307 |
-
if ( ! ( data && data.silent ) ) {
|
308 |
-
$c.slider( 'value', parseFloat( $input.val() ) );
|
309 |
-
}
|
310 |
-
});
|
311 |
-
});
|
312 |
-
|
313 |
-
///////////////////////////////////////
|
314 |
-
// Setup the URL fields
|
315 |
-
|
316 |
-
$fields.filter('.siteorigin-widget-field-type-link').each(function () {
|
317 |
-
var $$ = $(this);
|
318 |
-
|
319 |
-
// Function that refreshes the list of
|
320 |
-
var request = null;
|
321 |
-
var refreshList = function () {
|
322 |
-
if (request !== null) {
|
323 |
-
request.abort();
|
324 |
-
}
|
325 |
-
|
326 |
-
var $contentSearchInput = $$.find('.content-text-search');
|
327 |
-
var query = $contentSearchInput.val();
|
328 |
-
var postTypes = $contentSearchInput.data('postTypes');
|
329 |
-
|
330 |
-
var $ul = $$.find('ul.posts').empty().addClass('loading');
|
331 |
-
$.get(
|
332 |
-
soWidgets.ajaxurl,
|
333 |
-
{action: 'so_widgets_search_posts', query: query, postTypes: postTypes},
|
334 |
-
function (data) {
|
335 |
-
for (var i = 0; i < data.length; i++) {
|
336 |
-
if (data[i].label === '') {
|
337 |
-
data[i].label = ' ';
|
338 |
-
}
|
339 |
-
|
340 |
-
// Add all the post items
|
341 |
-
$ul.append(
|
342 |
-
$('<li>')
|
343 |
-
.addClass('post')
|
344 |
-
.html(data[i].label + '<span>(' + data[i].type + ')</span>')
|
345 |
-
.data(data[i])
|
346 |
-
);
|
347 |
-
}
|
348 |
-
$ul.removeClass('loading');
|
349 |
-
}
|
350 |
-
);
|
351 |
-
};
|
352 |
-
|
353 |
-
// Toggle display of the existing content
|
354 |
-
$$.find('.select-content-button, .button-close').click(function (e) {
|
355 |
-
e.preventDefault();
|
356 |
-
|
357 |
-
$(this).blur();
|
358 |
-
var $s = $$.find('.existing-content-selector');
|
359 |
-
$s.toggle();
|
360 |
-
|
361 |
-
if ($s.is(':visible') && $s.find('ul.posts li').length === 0) {
|
362 |
-
refreshList();
|
363 |
-
}
|
364 |
-
|
365 |
-
});
|
366 |
-
|
367 |
-
// Clicking on one of the url items
|
368 |
-
$$.on('click', '.posts li', function (e) {
|
369 |
-
e.preventDefault();
|
370 |
-
var $li = $(this);
|
371 |
-
$$.find('input.siteorigin-widget-input').val('post: ' + $li.data('value'));
|
372 |
-
$$.change();
|
373 |
-
$$.find('.existing-content-selector').toggle();
|
374 |
-
});
|
375 |
-
|
376 |
-
var interval = null;
|
377 |
-
$$.find('.content-text-search').keyup(function () {
|
378 |
-
if (interval !== null) {
|
379 |
-
clearTimeout(interval);
|
380 |
-
}
|
381 |
-
|
382 |
-
interval = setTimeout(function () {
|
383 |
-
refreshList();
|
384 |
-
}, 500);
|
385 |
-
});
|
386 |
-
});
|
387 |
-
|
388 |
-
///////////////////////////////////////
|
389 |
-
// Setup the Builder fields
|
390 |
-
if (typeof jQuery.fn.soPanelsSetupBuilderWidget !== 'undefined') {
|
391 |
-
$fields.filter('.siteorigin-widget-field-type-builder').each(function () {
|
392 |
-
$( this ).find( '> .siteorigin-page-builder-field' ).each( function () {
|
393 |
-
var $$ = $( this );
|
394 |
-
$$.soPanelsSetupBuilderWidget( { builderType: $$.data( 'type' ) } );
|
395 |
-
} );
|
396 |
-
});
|
397 |
-
}
|
398 |
-
|
399 |
-
///////////////////////////////////////
|
400 |
-
// Now lets handle the state emitters
|
401 |
-
|
402 |
-
var stateEmitterChangeHandler = function () {
|
403 |
-
var $$ = $(this);
|
404 |
-
|
405 |
-
// These emitters can either be an array or a
|
406 |
-
var emitters = $$.closest('[data-state-emitter]').data('state-emitter');
|
407 |
-
|
408 |
-
if (typeof emitters !== 'undefined') {
|
409 |
-
var handleStateEmitter = function (emitter, currentStates) {
|
410 |
-
if (typeof sowEmitters[emitter.callback] === 'undefined' || emitter.callback.substr(0, 1) === '_') {
|
411 |
-
// Skip if the function doesn't exist, or it starts with an underscore (internal functions).
|
412 |
-
return currentStates;
|
413 |
-
}
|
414 |
-
|
415 |
-
// Skip if this is an unselected radio input.
|
416 |
-
if ( $$.is( '[type="radio"]' ) && !$$.is( ':checked' ) ) {
|
417 |
-
return currentStates;
|
418 |
-
}
|
419 |
-
|
420 |
-
// Check if this is inside a repeater
|
421 |
-
var repeaterIndex = sowbForms.getContainerFieldId( $$, 'repeater', '.siteorigin-widget-field-repeater-item' );
|
422 |
-
if (repeaterIndex !== false) {
|
423 |
-
emitter.args = emitter.args.map(function (a) {
|
424 |
-
return a.replace('{$repeater}', repeaterIndex);
|
425 |
-
});
|
426 |
-
}
|
427 |
-
|
428 |
-
var widgetFieldId = sowbForms.getContainerFieldId( $$, 'widget', '.siteorigin-widget-widget' );
|
429 |
-
if ( widgetFieldId !== false && ! emitter.hasOwnProperty( 'widgetFieldId' ) ) {
|
430 |
-
emitter.widgetFieldId = widgetFieldId;
|
431 |
-
emitter.args = emitter.args.map(function (arg) {
|
432 |
-
if ( emitter.callback === 'conditional' ) {
|
433 |
-
arg = arg.replace( /(.*)(\[.*)/, '$1_' + widgetFieldId + '$2' );
|
434 |
-
} else {
|
435 |
-
arg = arg + '_' + widgetFieldId;
|
436 |
-
}
|
437 |
-
return arg;
|
438 |
-
});
|
439 |
-
}
|
440 |
-
|
441 |
-
var val = $$.is('[type="checkbox"]') ? $$.is(':checked') : $$.val();
|
442 |
-
// Return an array that has the new states added to the array
|
443 |
-
return $.extend(currentStates, sowEmitters[emitter.callback](val, emitter.args));
|
444 |
-
};
|
445 |
-
|
446 |
-
// Run the states through the state emitters
|
447 |
-
var states = {'default': ''};
|
448 |
-
|
449 |
-
// Go through the array of emitters
|
450 |
-
if (typeof emitters.length === 'undefined') {
|
451 |
-
emitters = [emitters];
|
452 |
-
}
|
453 |
-
|
454 |
-
for (var i = 0; i < emitters.length; i++) {
|
455 |
-
states = handleStateEmitter(emitters[i], states);
|
456 |
-
}
|
457 |
-
|
458 |
-
// Check which states have changed and trigger appropriate sowstatechange
|
459 |
-
var formStates = $mainForm.data('states');
|
460 |
-
if (typeof formStates === 'undefined') {
|
461 |
-
formStates = {'default': ''};
|
462 |
-
}
|
463 |
-
for (var k in states) {
|
464 |
-
if ( typeof formStates[k] === 'undefined' || states[k] !== formStates[k] ) {
|
465 |
-
// If the state is different from the original formStates, then trigger a state change
|
466 |
-
formStates[k] = states[k];
|
467 |
-
$mainForm.trigger('sowstatechange', [k, states[k]]);
|
468 |
-
}
|
469 |
-
}
|
470 |
-
|
471 |
-
// Store the form states back in the form
|
472 |
-
$mainForm.data('states', formStates);
|
473 |
-
}
|
474 |
-
};
|
475 |
-
|
476 |
-
$fields.filter('[data-state-emitter]').each(function () {
|
477 |
-
|
478 |
-
var $input = $( this ).find( '.siteorigin-widget-input' );
|
479 |
-
|
480 |
-
// Listen for any change events on an emitter field
|
481 |
-
$input.on('keyup change', stateEmitterChangeHandler);
|
482 |
-
|
483 |
-
// Trigger initial state emitter changes
|
484 |
-
$input.each(function () {
|
485 |
-
var $$ = $(this);
|
486 |
-
if ($$.is(':radio')) {
|
487 |
-
// Only checked radio inputs must have change events
|
488 |
-
if ($$.is(':checked')) {
|
489 |
-
stateEmitterChangeHandler.call($$[0]);
|
490 |
-
}
|
491 |
-
}
|
492 |
-
else {
|
493 |
-
stateEmitterChangeHandler.call($$[0]);
|
494 |
-
}
|
495 |
-
});
|
496 |
-
|
497 |
-
});
|
498 |
-
|
499 |
-
// Give plugins a chance to influence the form
|
500 |
-
$el.trigger('sowsetupform', $fields).data('sow-form-setup', true);
|
501 |
-
|
502 |
-
$fields.trigger('sowsetupformfield');
|
503 |
-
|
504 |
-
$el.find('.siteorigin-widget-field-repeater-item').trigger('updateFieldPositions');
|
505 |
-
|
506 |
-
if ( $body.hasClass( 'wp-customizer' ) || $body.hasClass( 'widgets-php' ) ) {
|
507 |
-
// Reinitialize widget fields when they're dragged and dropped.
|
508 |
-
$el.closest( '.ui-sortable' ).on( 'sortstop', function (event, ui) {
|
509 |
-
var $fields = ui.item.find( '.siteorigin-widget-form' ).find( '> .siteorigin-widget-field' );
|
510 |
-
$fields.trigger( 'sowsetupformfield' );
|
511 |
-
} );
|
512 |
-
}
|
513 |
-
|
514 |
-
/////////////////////////////
|
515 |
-
// The end of the form setup.
|
516 |
-
/////////////////////////////
|
517 |
-
|
518 |
-
formInitializing = false;
|
519 |
-
});
|
520 |
-
};
|
521 |
-
|
522 |
-
$.fn.sowSetupPreview = function () {
|
523 |
-
var $el = $(this);
|
524 |
-
var previewButton = $el.siblings('.siteorigin-widget-preview');
|
525 |
-
|
526 |
-
previewButton.find('> a').click(function (e) {
|
527 |
-
e.preventDefault();
|
528 |
-
|
529 |
-
var data = sowbForms.getWidgetFormValues($el);
|
530 |
-
|
531 |
-
// Create a new modal window
|
532 |
-
var modal = $($('#so-widgets-bundle-tpl-preview-dialog').html().trim()).appendTo('body');
|
533 |
-
modal.find('input[name="data"]').val(JSON.stringify(data));
|
534 |
-
modal.find('input[name="class"]').val($el.data('class'));
|
535 |
-
modal.find('iframe').on('load', function () {
|
536 |
-
$(this).css('visibility', 'visible');
|
537 |
-
});
|
538 |
-
modal.find('form').submit();
|
539 |
-
|
540 |
-
modal.find('.close').click(function () {
|
541 |
-
modal.remove();
|
542 |
-
});
|
543 |
-
});
|
544 |
-
};
|
545 |
-
|
546 |
-
$.fn.sowSetupRepeater = function () {
|
547 |
-
|
548 |
-
return $(this).each(function (i, el) {
|
549 |
-
var $el = $(el);
|
550 |
-
var $items = $el.find('.siteorigin-widget-field-repeater-items');
|
551 |
-
var name = $el.data('repeater-name');
|
552 |
-
|
553 |
-
$items.bind('updateFieldPositions', function () {
|
554 |
-
var $$ = $(this);
|
555 |
-
var $rptrItems = $$.find('> .siteorigin-widget-field-repeater-item');
|
556 |
-
|
557 |
-
// Set the position for the repeater items
|
558 |
-
$rptrItems.each(function (i, el) {
|
559 |
-
$(el).find('.siteorigin-widget-input').each(function (j, input) {
|
560 |
-
var pos = $(input).data('repeater-positions');
|
561 |
-
if (typeof pos === 'undefined') {
|
562 |
-
pos = {};
|
563 |
-
}
|
564 |
-
|
565 |
-
pos[name] = i;
|
566 |
-
$(input).data('repeater-positions', pos);
|
567 |
-
});
|
568 |
-
});
|
569 |
-
|
570 |
-
// Update the field names for all the input items
|
571 |
-
$$.find('.siteorigin-widget-input').each( function ( i, input ) {
|
572 |
-
var $in = $( input );
|
573 |
-
var pos = $in.data( 'repeater-positions' );
|
574 |
-
|
575 |
-
if ( typeof pos !== 'undefined' ) {
|
576 |
-
var newName = $in.attr( 'data-original-name' );
|
577 |
-
|
578 |
-
if ( !newName ) {
|
579 |
-
$in.attr( 'data-original-name', $in.attr( 'name' ) );
|
580 |
-
newName = $in.attr( 'name' );
|
581 |
-
}
|
582 |
-
if ( !newName ) {
|
583 |
-
return;
|
584 |
-
}
|
585 |
-
|
586 |
-
if ( pos ) {
|
587 |
-
for ( var k in pos ) {
|
588 |
-
newName = newName.replace( '#' + k + '#', pos[ k ] );
|
589 |
-
}
|
590 |
-
}
|
591 |
-
$in.attr( 'name', newName );
|
592 |
-
}
|
593 |
-
} );
|
594 |
-
|
595 |
-
if ( !$$.data( 'initialSetup' ) ) {
|
596 |
-
// Setup default checked values, now that we've updated input names.
|
597 |
-
// Without this radio inputs in repeaters will be rendered as if they all belong to the same group.
|
598 |
-
$$.find('.siteorigin-widget-input').each(function (i, input) {
|
599 |
-
var $in = $(input);
|
600 |
-
$in.prop('checked', $in.prop('defaultChecked'));
|
601 |
-
});
|
602 |
-
$$.data('initialSetup', true);
|
603 |
-
}
|
604 |
-
|
605 |
-
//Setup scrolling.
|
606 |
-
var scrollCount = $el.data('scroll-count') ? parseInt($el.data('scroll-count')) : 0;
|
607 |
-
if (scrollCount > 0 && $rptrItems.length > scrollCount) {
|
608 |
-
var itemHeight = $rptrItems.first().outerHeight();
|
609 |
-
$$.css('max-height', itemHeight * scrollCount).css('overflow', 'auto');
|
610 |
-
}
|
611 |
-
else {
|
612 |
-
//TODO: Check whether there was a value before overriding and set it back to that.
|
613 |
-
$$.css('max-height', '').css('overflow', '');
|
614 |
-
}
|
615 |
-
});
|
616 |
-
|
617 |
-
$items.sortable({
|
618 |
-
handle: '.siteorigin-widget-field-repeater-item-top',
|
619 |
-
items: '> .siteorigin-widget-field-repeater-item',
|
620 |
-
update: function () {
|
621 |
-
// Clear `name` attributes for radio inputs. They'll be reassigned on update.
|
622 |
-
// This prevents some radio inputs values being cleared during the update process.
|
623 |
-
$items.find( 'input[type="radio"].siteorigin-widget-input' ).attr( 'name', '' );
|
624 |
-
$items.trigger('updateFieldPositions');
|
625 |
-
$el.trigger( 'change' );
|
626 |
-
},
|
627 |
-
sortstop: function (event, ui) {
|
628 |
-
if ( ui.item.is( '.siteorigin-widget-field-repeater-item' ) ) {
|
629 |
-
ui.item.find( '> .siteorigin-widget-field-repeater-item-form' ).each( function () {
|
630 |
-
var $fields = $( this ).find( '> .siteorigin-widget-field' );
|
631 |
-
$fields.trigger( 'sowsetupformfield' );
|
632 |
-
} );
|
633 |
-
}
|
634 |
-
else {
|
635 |
-
var $fields = ui.item.find( '.siteorigin-widget-form' ).find( '> .siteorigin-widget-field' );
|
636 |
-
$fields.trigger( 'sowsetupformfield' );
|
637 |
-
}
|
638 |
-
$el.trigger( 'change' );
|
639 |
-
}
|
640 |
-
});
|
641 |
-
$items.trigger('updateFieldPositions');
|
642 |
-
|
643 |
-
$el.find('> .siteorigin-widget-field-repeater-add').disableSelection().click(function (e) {
|
644 |
-
e.preventDefault();
|
645 |
-
$el.closest('.siteorigin-widget-field-repeater')
|
646 |
-
.sowAddRepeaterItem()
|
647 |
-
.find('> .siteorigin-widget-field-repeater-items').slideDown('fast', function () {
|
648 |
-
$(window).resize();
|
649 |
-
});
|
650 |
-
});
|
651 |
-
|
652 |
-
$el.find('> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand').click(function (e) {
|
653 |
-
e.preventDefault();
|
654 |
-
$el.closest('.siteorigin-widget-field-repeater').find('> .siteorigin-widget-field-repeateritems-').slideToggle('fast', function () {
|
655 |
-
$(window).resize();
|
656 |
-
});
|
657 |
-
});
|
658 |
-
});
|
659 |
-
};
|
660 |
-
|
661 |
-
$.fn.sowAddRepeaterItem = function () {
|
662 |
-
return $(this).each(function (i, el) {
|
663 |
-
|
664 |
-
var $el = $(el);
|
665 |
-
var $nextIndex = $el.find('> .siteorigin-widget-field-repeater-items').children().length + 1;
|
666 |
-
|
667 |
-
// Create an object with the repeater html so we can make some changes to it.
|
668 |
-
var repeaterObject = $('<div>' + $el.find('> .siteorigin-widget-field-repeater-item-html').html() + '</div>');
|
669 |
-
repeaterObject.find('.siteorigin-widget-input[data-name]').each(function () {
|
670 |
-
var $$ = $(this);
|
671 |
-
// Skip out items that are themselves inside repeater HTML wrappers
|
672 |
-
if ($$.closest('.siteorigin-widget-field-repeater-item-html').length === 0) {
|
673 |
-
$$.attr('name', $(this).data('name'));
|
674 |
-
}
|
675 |
-
});
|
676 |
-
|
677 |
-
// Replace repeater item id placeholders with the index of the repeater item.
|
678 |
-
var repeaterHtml = '';
|
679 |
-
repeaterObject.find( '> .siteorigin-widget-field' )
|
680 |
-
.each( function ( index, element ) {
|
681 |
-
var html = element.outerHTML;
|
682 |
-
// Skip child repeaters, so they can setup their own id's when necessary.
|
683 |
-
if ( ! $( element ).is( '.siteorigin-widget-field-type-repeater' ) ) {
|
684 |
-
html = html.replace( /_id_/g, $nextIndex );
|
685 |
-
}
|
686 |
-
repeaterHtml += html;
|
687 |
-
} );
|
688 |
-
|
689 |
-
var readonly = typeof $el.attr('readonly') !== 'undefined';
|
690 |
-
var item = $('<div class="siteorigin-widget-field-repeater-item ui-draggable" />')
|
691 |
-
.append(
|
692 |
-
$('<div class="siteorigin-widget-field-repeater-item-top" />')
|
693 |
-
.append(
|
694 |
-
$('<div class="siteorigin-widget-field-expand" />')
|
695 |
-
)
|
696 |
-
.append(
|
697 |
-
readonly ? '' : $('<div class="siteorigin-widget-field-copy" />')
|
698 |
-
)
|
699 |
-
.append(
|
700 |
-
readonly ? '' : $('<div class="siteorigin-widget-field-remove" />')
|
701 |
-
)
|
702 |
-
.append($('<h4 />').html($el.data('item-name')))
|
703 |
-
)
|
704 |
-
.append(
|
705 |
-
$('<div class="siteorigin-widget-field-repeater-item-form" />')
|
706 |
-
.html(repeaterHtml)
|
707 |
-
);
|
708 |
-
|
709 |
-
// Add the item and refresh
|
710 |
-
$el.find('> .siteorigin-widget-field-repeater-items').append(item).sortable("refresh").trigger('updateFieldPositions');
|
711 |
-
item.sowSetupRepeaterItems();
|
712 |
-
item.hide().slideDown('fast', function () {
|
713 |
-
$(window).resize();
|
714 |
-
});
|
715 |
-
$el.trigger( 'change' );
|
716 |
-
});
|
717 |
-
};
|
718 |
-
|
719 |
-
$.fn.sowRemoveRepeaterItem = function () {
|
720 |
-
return $(this).each(function (i, el) {
|
721 |
-
var $itemsContainer = $(this).closest('.siteorigin-widget-field-repeater-items');
|
722 |
-
$(this).remove();
|
723 |
-
$itemsContainer.sortable("refresh").trigger('updateFieldPositions');
|
724 |
-
$( el ).trigger( 'change' );
|
725 |
-
});
|
726 |
-
};
|
727 |
-
|
728 |
-
$.fn.sowSetupRepeaterItems = function () {
|
729 |
-
return $(this).each(function (i, el) {
|
730 |
-
var $el = $(el);
|
731 |
-
|
732 |
-
if (typeof $el.data('sowrepeater-actions-setup') === 'undefined') {
|
733 |
-
var $parentRepeater = $el.closest('.siteorigin-widget-field-repeater');
|
734 |
-
var itemTop = $el.find('> .siteorigin-widget-field-repeater-item-top');
|
735 |
-
var itemLabel = $parentRepeater.data('item-label');
|
736 |
-
if (itemLabel && itemLabel.selector) {
|
737 |
-
var updateLabel = function () {
|
738 |
-
var functionName = ( itemLabel.hasOwnProperty('valueMethod') && itemLabel.valueMethod ) ? itemLabel.valueMethod : 'val';
|
739 |
-
var txt = $el.find(itemLabel.selector)[functionName]();
|
740 |
-
if (txt) {
|
741 |
-
if (txt.length > 80) {
|
742 |
-
txt = txt.substr(0, 79) + '...';
|
743 |
-
}
|
744 |
-
itemTop.find('h4').text(txt);
|
745 |
-
}
|
746 |
-
};
|
747 |
-
updateLabel();
|
748 |
-
var eventName = ( itemLabel.hasOwnProperty('updateEvent') && itemLabel.updateEvent ) ? itemLabel.updateEvent : 'change';
|
749 |
-
$el.bind(eventName, updateLabel);
|
750 |
-
}
|
751 |
-
|
752 |
-
itemTop.click(function (e) {
|
753 |
-
if (e.target.className === "siteorigin-widget-field-remove" || e.target.className === "siteorigin-widget-field-copy") {
|
754 |
-
return;
|
755 |
-
}
|
756 |
-
e.preventDefault();
|
757 |
-
$(this).closest('.siteorigin-widget-field-repeater-item').find('.siteorigin-widget-field-repeater-item-form').eq(0).slideToggle('fast', function () {
|
758 |
-
$(window).resize();
|
759 |
-
if ($(this).is(':visible')) {
|
760 |
-
$(this).trigger('slideToggleOpenComplete');
|
761 |
-
|
762 |
-
$( this ).find( '.siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field,> .siteorigin-widget-field' )
|
763 |
-
.each( function (index, element) {
|
764 |
-
var $field = $( element );
|
765 |
-
if ( $field.is( ':visible' ) ) {
|
766 |
-
$field.trigger( 'sowsetupformfield' );
|
767 |
-
}
|
768 |
-
|
769 |
-
} );
|
770 |
-
}
|
771 |
-
else {
|
772 |
-
$(this).trigger('slideToggleCloseComplete');
|
773 |
-
}
|
774 |
-
});
|
775 |
-
});
|
776 |
-
|
777 |
-
itemTop.find('.siteorigin-widget-field-remove').click(function (e, params) {
|
778 |
-
e.preventDefault();
|
779 |
-
var $s = $( this ).closest( '.siteorigin-widget-field-repeater-items' );
|
780 |
-
var $item = $( this ).closest( '.siteorigin-widget-field-repeater-item' );
|
781 |
-
var removeItem = function () {
|
782 |
-
$item.remove();
|
783 |
-
$s.sortable( "refresh" ).trigger( 'updateFieldPositions' );
|
784 |
-
$( window ).resize();
|
785 |
-
};
|
786 |
-
if ( params && params.silent ) {
|
787 |
-
removeItem();
|
788 |
-
} else if ( confirm( soWidgets.sure ) ) {
|
789 |
-
$item.slideUp('fast', removeItem );
|
790 |
-
}
|
791 |
-
$el.trigger( 'change' );
|
792 |
-
});
|
793 |
-
itemTop.find('.siteorigin-widget-field-copy').click(function (e) {
|
794 |
-
e.preventDefault();
|
795 |
-
var $form = $(this).closest('.siteorigin-widget-form-main');
|
796 |
-
var $item = $(this).closest('.siteorigin-widget-field-repeater-item');
|
797 |
-
var $copyItem = $item.clone();
|
798 |
-
var $items = $item.closest('.siteorigin-widget-field-repeater-items');
|
799 |
-
//var $nextIndex = $item.index()+1;
|
800 |
-
var $nextIndex = $items.children().length;
|
801 |
-
var newIds = {};
|
802 |
-
|
803 |
-
$copyItem.find('*[name]').each(function () {
|
804 |
-
var $inputElement = $(this);
|
805 |
-
var id = $inputElement.attr('id');
|
806 |
-
var nm = $inputElement.attr('name');
|
807 |
-
// TinyMCE field :/
|
808 |
-
if ($inputElement.is('textarea') && $inputElement.parent().is('.wp-editor-container') && typeof tinymce != 'undefined') {
|
809 |
-
$inputElement.parent().empty().append($inputElement);
|
810 |
-
$inputElement.css('display', '');
|
811 |
-
var curEd = tinymce.get(id);
|
812 |
-
if (curEd) {
|
813 |
-
$inputElement.val(curEd.getContent());
|
814 |
-
}
|
815 |
-
}
|
816 |
-
// Color field :/
|
817 |
-
else if ($inputElement.is('.wp-color-picker')) {
|
818 |
-
var $wpPickerContainer = $inputElement.closest('.wp-picker-container');
|
819 |
-
var $soWidgetField = $inputElement.closest('.siteorigin-widget-field');
|
820 |
-
$wpPickerContainer.remove();
|
821 |
-
$soWidgetField.append($inputElement.remove());
|
822 |
-
}
|
823 |
-
else {
|
824 |
-
var $originalInput = id ? $item.find( '#' + id ) : $item.find('[name="' + nm + '"]');
|
825 |
-
if ($originalInput.length && $originalInput.val() != null) {
|
826 |
-
$inputElement.val($originalInput.val());
|
827 |
-
}
|
828 |
-
}
|
829 |
-
if (id) {
|
830 |
-
var idRegExp;
|
831 |
-
var idBase;
|
832 |
-
var newId;
|
833 |
-
|
834 |
-
// Radio inputs are slightly different because there are multiple `input` elements for
|
835 |
-
// a single field, i.e. multiple `inputs` for selecting a single value.
|
836 |
-
if ($inputElement.is('[type="radio"]')) {
|
837 |
-
// Radio inputs have their position appended to the id.
|
838 |
-
idBase = id.replace(/-\d+-\d+$/, '');
|
839 |
-
var radioIdBase = id.replace(/-\d+$/, '');
|
840 |
-
if (!newIds[idBase]) {
|
841 |
-
var radioNames = {};
|
842 |
-
newIds[idBase] = $form
|
843 |
-
// find all inputs containing idBase in their id attribute
|
844 |
-
.find('.siteorigin-widget-input[id^=' + idBase + ']')
|
845 |
-
// exclude inputs from templates
|
846 |
-
.not('[id*=_id_]')
|
847 |
-
// reduce to one element per radio input group.
|
848 |
-
.filter(function (index, element) {
|
849 |
-
var eltName = $(element).attr('name');
|
850 |
-
if (radioNames[eltName]) {
|
851 |
-
return false;
|
852 |
-
} else {
|
853 |
-
radioNames[eltName] = true;
|
854 |
-
return true;
|
855 |
-
}
|
856 |
-
}).length + 1;
|
857 |
-
}
|
858 |
-
var newRadioIdBase = idBase + '-' + newIds[idBase];
|
859 |
-
newId = newRadioIdBase + id.match(/-\d+$/)[0];
|
860 |
-
$copyItem.find('label[for=' + radioIdBase + ']').attr('for', newRadioIdBase);
|
861 |
-
} else {
|
862 |
-
idRegExp = new RegExp('-\\d+$');
|
863 |
-
idBase = id.replace(idRegExp, '');
|
864 |
-
if (!newIds[idBase]) {
|
865 |
-
newIds[idBase] = $form.find('.siteorigin-widget-input[id^=' + idBase + ']').not('[id*=_id_]').length + 1;
|
866 |
-
}
|
867 |
-
newId = idBase + '-' + newIds[idBase]++;
|
868 |
-
}
|
869 |
-
|
870 |
-
$inputElement.attr('id', newId);
|
871 |
-
if ( $inputElement.is( '.wp-editor-area' ) ) {
|
872 |
-
var tmceContainer = $inputElement.closest( '.siteorigin-widget-tinymce-container' );
|
873 |
-
var mediaButtons = tmceContainer.data( 'media-buttons' );
|
874 |
-
if ( mediaButtons && mediaButtons.html ) {
|
875 |
-
var idRegExp = new RegExp( id, 'g');
|
876 |
-
mediaButtons.html = mediaButtons.html.replace( idRegExp, newId );
|
877 |
-
tmceContainer.data( 'media-buttons', mediaButtons );
|
878 |
-
}
|
879 |
-
}
|
880 |
-
$copyItem.find('label[for=' + id + ']').attr('for', newId);
|
881 |
-
$copyItem.find('[id*=' + id + ']').each(function () {
|
882 |
-
var oldIdAttr = $(this).attr('id');
|
883 |
-
var newIdAttr = oldIdAttr.replace(id, newId);
|
884 |
-
$(this).attr('id', newIdAttr);
|
885 |
-
});
|
886 |
-
if (typeof tinymce !== 'undefined' && tinymce.get(newId)) {
|
887 |
-
tinymce.get(newId).remove();
|
888 |
-
}
|
889 |
-
}
|
890 |
-
var nestLevel = $item.parents('.siteorigin-widget-field-repeater').length;
|
891 |
-
var $body = $('body');
|
892 |
-
if (($body.hasClass('wp-customizer') || $body.hasClass('widgets-php')) && $el.closest('.panel-dialog').length === 0) {
|
893 |
-
nestLevel += 1;
|
894 |
-
}
|
895 |
-
var newName = nm.replace(new RegExp('((?:.*?\\[\\d+\\]){' + (nestLevel - 1).toString() + '})?(.*?\\[)\\d+(\\])'), '$1$2' + $nextIndex.toString() + '$3');
|
896 |
-
$inputElement.attr('name', newName);
|
897 |
-
$inputElement.data('original-name', newName);
|
898 |
-
});
|
899 |
-
|
900 |
-
//$item.after($copyItem);
|
901 |
-
//$items.sortable( "refresh").trigger('updateFieldPositions');
|
902 |
-
$items.append($copyItem).sortable("refresh").trigger('updateFieldPositions');
|
903 |
-
$copyItem.sowSetupRepeaterItems();
|
904 |
-
$copyItem.hide().slideDown('fast', function () {
|
905 |
-
$(window).resize();
|
906 |
-
});
|
907 |
-
$el.trigger( 'change' );
|
908 |
-
});
|
909 |
-
|
910 |
-
$el.find('> .siteorigin-widget-field-repeater-item-form').sowSetupForm();
|
911 |
-
|
912 |
-
$el.data('sowrepeater-actions-setup', true);
|
913 |
-
}
|
914 |
-
});
|
915 |
-
};
|
916 |
-
|
917 |
-
// Widgets Bundle utility functions
|
918 |
-
/**
|
919 |
-
* Get the unique index of a repeated item. Could be in a repeater or if multiple widget fields with the same
|
920 |
-
* widget class.
|
921 |
-
*
|
922 |
-
* @param $el
|
923 |
-
* @param containerType
|
924 |
-
* @param containerClass
|
925 |
-
* @return {*}
|
926 |
-
*/
|
927 |
-
sowbForms.getContainerFieldId = function ( $el, containerType, containerClass ) {
|
928 |
-
var fieldIdPropName = containerType + 'FieldId';
|
929 |
-
if ( ! this.hasOwnProperty( fieldIdPropName ) ) {
|
930 |
-
this[ fieldIdPropName ] = 1;
|
931 |
-
}
|
932 |
-
|
933 |
-
var $field = $el.closest( containerClass );
|
934 |
-
if ( $field.length ) {
|
935 |
-
var fieldId = $field.data( 'field-id' );
|
936 |
-
if ( fieldId === undefined ) {
|
937 |
-
fieldId = this[ fieldIdPropName ]++;
|
938 |
-
}
|
939 |
-
$field.data( 'field-id', fieldId );
|
940 |
-
|
941 |
-
return fieldId;
|
942 |
-
}
|
943 |
-
else {
|
944 |
-
return false;
|
945 |
-
}
|
946 |
-
};
|
947 |
-
|
948 |
-
/**
|
949 |
-
* Retrieve a variable for a field with the given identifier, elementName.
|
950 |
-
*
|
951 |
-
* @return {*}
|
952 |
-
* @param widgetClass The class name of the widget for which to retrieve a variable.
|
953 |
-
* @param elementName The name of the field for which to retrieve a variable.
|
954 |
-
* @param key The name of the variable to retrieve.
|
955 |
-
*/
|
956 |
-
sowbForms.getWidgetFieldVariable = function (widgetClass, elementName, key) {
|
957 |
-
var widgetVars = window.sow_field_javascript_variables[widgetClass];
|
958 |
-
// Get rid of any index placeholders
|
959 |
-
elementName = elementName.replace(/\[#.*?#\]/g, '');
|
960 |
-
var variablePath = /[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(elementName)[1];
|
961 |
-
var variablePathParts = variablePath.split('][');
|
962 |
-
var elementVars = variablePathParts.length ? widgetVars : null;
|
963 |
-
while (variablePathParts.length) {
|
964 |
-
elementVars = elementVars[variablePathParts.shift()];
|
965 |
-
}
|
966 |
-
return elementVars[key];
|
967 |
-
};
|
968 |
-
|
969 |
-
sowbForms.fetchWidgetVariable = function (key, widget, callback) {
|
970 |
-
window.sowVars = window.sowVars || {};
|
971 |
-
|
972 |
-
if (typeof window.sowVars[widget] === 'undefined') {
|
973 |
-
$.post(
|
974 |
-
soWidgets.ajaxurl,
|
975 |
-
{'action': 'sow_get_javascript_variables', 'widget': widget, 'key': key},
|
976 |
-
function (result) {
|
977 |
-
window.sowVars[widget] = result;
|
978 |
-
callback(window.sowVars[widget][key]);
|
979 |
-
}
|
980 |
-
);
|
981 |
-
}
|
982 |
-
else {
|
983 |
-
callback(window.sowVars[widget][key]);
|
984 |
-
}
|
985 |
-
};
|
986 |
-
|
987 |
-
sowbForms.getWidgetIdBase = function ( formContainer ) {
|
988 |
-
return formContainer.data( 'id-base' );
|
989 |
-
};
|
990 |
-
|
991 |
-
sowbForms.getWidgetFormValues = function ( formContainer ) {
|
992 |
-
|
993 |
-
if ( _.isUndefined( formContainer ) ) {
|
994 |
-
return null;
|
995 |
-
}
|
996 |
-
|
997 |
-
var data = {};
|
998 |
-
|
999 |
-
formContainer.find('*[name]').each(function () {
|
1000 |
-
var $$ = $(this);
|
1001 |
-
|
1002 |
-
try {
|
1003 |
-
var name = /[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec( $$.attr( 'name' ) );
|
1004 |
-
|
1005 |
-
if ( _.isEmpty( name ) ) {
|
1006 |
-
return true;
|
1007 |
-
}
|
1008 |
-
|
1009 |
-
// Create an array with the parts of the name
|
1010 |
-
name = name[1];
|
1011 |
-
var parts = name.split( '][' );
|
1012 |
-
|
1013 |
-
// Make sure we either have numbers or strings
|
1014 |
-
parts = parts.map( function ( e ) {
|
1015 |
-
if ( ! isNaN( parseFloat( e ) ) && isFinite( e ) ) {
|
1016 |
-
return parseInt( e );
|
1017 |
-
}
|
1018 |
-
else {
|
1019 |
-
return e;
|
1020 |
-
}
|
1021 |
-
} );
|
1022 |
-
|
1023 |
-
var sub = data;
|
1024 |
-
var fieldValue = null;
|
1025 |
-
|
1026 |
-
var fieldType = _.isString( $$.attr( 'type' ) ) ? $$.attr( 'type' ).toLowerCase() : null;
|
1027 |
-
|
1028 |
-
if ( fieldType === 'checkbox' ) {
|
1029 |
-
if ( $$.is( ':checked' ) ) {
|
1030 |
-
fieldValue = $$.val() !== '' ? $$.val() : true;
|
1031 |
-
} else {
|
1032 |
-
fieldValue = false;
|
1033 |
-
}
|
1034 |
-
} else if ( fieldType === 'radio' ) {
|
1035 |
-
if ( $$.is( ':checked' ) ) {
|
1036 |
-
fieldValue = $$.val();
|
1037 |
-
} else {
|
1038 |
-
return;
|
1039 |
-
}
|
1040 |
-
} else if ( $$.prop( 'tagName' ) === 'TEXTAREA' && $$.hasClass( 'wp-editor-area' ) ) {
|
1041 |
-
// This is a TinyMCE editor, so we'll use the tinyMCE object to get the content
|
1042 |
-
var editor = null;
|
1043 |
-
if ( typeof tinyMCE !== 'undefined' ) {
|
1044 |
-
editor = tinyMCE.get( $$.attr( 'id' ) );
|
1045 |
-
}
|
1046 |
-
|
1047 |
-
if ( editor !== null && typeof( editor.getContent ) === "function" && !editor.isHidden() ) {
|
1048 |
-
fieldValue = editor.getContent();
|
1049 |
-
}
|
1050 |
-
else {
|
1051 |
-
fieldValue = $$.val();
|
1052 |
-
}
|
1053 |
-
} else if ( $$.prop( 'tagName' ) === 'SELECT' ) {
|
1054 |
-
var selected = $$.find( 'option:selected' );
|
1055 |
-
if ( selected.length === 1 ) {
|
1056 |
-
fieldValue = $$.find( 'option:selected' ).val();
|
1057 |
-
}
|
1058 |
-
else if ( selected.length > 1 ) {
|
1059 |
-
// This is a mutli-select field
|
1060 |
-
fieldValue = _.map( $$.find( 'option:selected' ), function ( n, i ) {
|
1061 |
-
return $( n ).val();
|
1062 |
-
} );
|
1063 |
-
}
|
1064 |
-
} else {
|
1065 |
-
fieldValue = $$.val();
|
1066 |
-
}
|
1067 |
-
for ( var i = 0; i < parts.length; i++ ) {
|
1068 |
-
if ( i === parts.length - 1 ) {
|
1069 |
-
if ( parts[i] === '' ) {
|
1070 |
-
// This needs to be an array
|
1071 |
-
sub.push( fieldValue );
|
1072 |
-
} else {
|
1073 |
-
sub[ parts[ i ] ] = fieldValue;
|
1074 |
-
}
|
1075 |
-
}
|
1076 |
-
else {
|
1077 |
-
if ( _.isUndefined( sub[ parts[ i ] ] ) ) {
|
1078 |
-
// We assume that a numeric key means it's an array. (or empty string??)
|
1079 |
-
if ( _.isNumber( parts[ i + 1 ] ) || parts[ i + 1 ] === '' ) {
|
1080 |
-
sub[ parts[ i ] ] = [];
|
1081 |
-
} else {
|
1082 |
-
sub[ parts[ i ] ] = {};
|
1083 |
-
}
|
1084 |
-
}
|
1085 |
-
// Go deeper into the data and continue
|
1086 |
-
sub = sub[ parts[ i ] ];
|
1087 |
-
}
|
1088 |
-
}
|
1089 |
-
} catch ( error ) {
|
1090 |
-
console.error( 'Field [' + $$.attr( 'name' ) + '] could not be processed and was skipped - ' + error.message );
|
1091 |
-
}
|
1092 |
-
});
|
1093 |
-
return data;
|
1094 |
-
};
|
1095 |
-
|
1096 |
-
|
1097 |
-
/**
|
1098 |
-
* Sets all the widget form fields in the given container with the given data values.
|
1099 |
-
*
|
1100 |
-
* @param formContainer The jQuery element containing the widget form fields.
|
1101 |
-
* @param data The data from which to set the widget form field values.
|
1102 |
-
* @param skipMissingValues If `true`, this will skip form fields for which the data values are missing.
|
1103 |
-
* If `false`, the form fields will be cleared. Default is `false`.
|
1104 |
-
* @param triggerChange If `true`, trigger a 'change' event on each element after it's value is set. Default is `true`.
|
1105 |
-
*/
|
1106 |
-
sowbForms.setWidgetFormValues = function (formContainer, data, skipMissingValues, triggerChange) {
|
1107 |
-
skipMissingValues = skipMissingValues || false;
|
1108 |
-
triggerChange = (typeof triggerChange !== 'undefined' && triggerChange) || typeof triggerChange === 'undefined';
|
1109 |
-
// First check if this form has any repeaters.
|
1110 |
-
var depth = 0;
|
1111 |
-
var updateRepeaterChildren = function ( formParent, formData ) {
|
1112 |
-
if ( ++depth === 10 ) {
|
1113 |
-
--depth;
|
1114 |
-
return;
|
1115 |
-
}
|
1116 |
-
// Only direct child fields which are repeaters.
|
1117 |
-
formParent.find( '> .siteorigin-widget-field-type-repeater,> .siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field-type-repeater' )
|
1118 |
-
.each( function ( index, element ) {
|
1119 |
-
var $this = $( this );
|
1120 |
-
var $repeater = $this.find( '> .siteorigin-widget-field-repeater' );
|
1121 |
-
var repeaterName = $repeater.data( 'repeaterName' );
|
1122 |
-
var repeaterData = formData.hasOwnProperty( repeaterName ) ? formData[ repeaterName ] : null;
|
1123 |
-
var isInSection = $this.parent().is( '.siteorigin-widget-section' );
|
1124 |
-
if ( isInSection ) {
|
1125 |
-
var elementName = $repeater.data( 'element-name' );
|
1126 |
-
// Get rid of any index placeholders
|
1127 |
-
elementName = elementName.replace(/\[#.*?#\]/g, '');
|
1128 |
-
var variablePath = /[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(elementName)[1];
|
1129 |
-
var variablePathParts = variablePath.split('][');
|
1130 |
-
var elementVars = variablePathParts.length ? formData : null;
|
1131 |
-
while (variablePathParts.length) {
|
1132 |
-
var key = variablePathParts.shift();
|
1133 |
-
elementVars = elementVars.hasOwnProperty( key ) ? elementVars[ key ] : elementVars;
|
1134 |
-
}
|
1135 |
-
repeaterData = elementVars;
|
1136 |
-
}
|
1137 |
-
|
1138 |
-
if ( ! repeaterData || ! Array.isArray( repeaterData ) ) {
|
1139 |
-
return;
|
1140 |
-
}
|
1141 |
-
// Check that the number of child items matches the number of data items.
|
1142 |
-
var repeaterChildren = $repeater.find( '> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item' );
|
1143 |
-
var numItems = repeaterData.length;
|
1144 |
-
var numChildren = repeaterChildren.length;
|
1145 |
-
if ( numItems > numChildren ) {
|
1146 |
-
// If data items > child items, create extra child items.
|
1147 |
-
for ( var i = 0; i < numItems - numChildren; i++) {
|
1148 |
-
$repeater.find( '> .siteorigin-widget-field-repeater-add' ).click();
|
1149 |
-
}
|
1150 |
-
|
1151 |
-
} else if ( ! skipMissingValues && numItems < numChildren ) {
|
1152 |
-
// If child items > data items, remove extra child items.
|
1153 |
-
for ( var j = numItems; j < numChildren; j++) {
|
1154 |
-
var $child = $( repeaterChildren.eq( j ) );
|
1155 |
-
$child.find( '> .siteorigin-widget-field-repeater-item-top' )
|
1156 |
-
.find( '.siteorigin-widget-field-remove' )
|
1157 |
-
.trigger( 'click', { silent: true } );
|
1158 |
-
}
|
1159 |
-
}
|
1160 |
-
repeaterChildren = $repeater.find( '> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item' );
|
1161 |
-
for ( var k = 0; k < repeaterChildren.length; k++ ) {
|
1162 |
-
repeaterChildren.eq( k ).find( '> .siteorigin-widget-field-repeater-item-form' );
|
1163 |
-
updateRepeaterChildren(
|
1164 |
-
repeaterChildren.eq( k ).find( '> .siteorigin-widget-field-repeater-item-form' ),
|
1165 |
-
repeaterData[ k ]
|
1166 |
-
);
|
1167 |
-
}
|
1168 |
-
} );
|
1169 |
-
--depth;
|
1170 |
-
};
|
1171 |
-
|
1172 |
-
updateRepeaterChildren(formContainer, data);
|
1173 |
-
|
1174 |
-
formContainer.find('*[name]').each(function () {
|
1175 |
-
var $$ = $(this);
|
1176 |
-
var name = /[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec($$.attr('name'));
|
1177 |
-
|
1178 |
-
if ( name === undefined || name === null ) {
|
1179 |
-
return true;
|
1180 |
-
}
|
1181 |
-
|
1182 |
-
name = name[1];
|
1183 |
-
var parts = name.split('][');
|
1184 |
-
|
1185 |
-
// Make sure we either have numbers or strings
|
1186 |
-
parts = parts.map( function ( e ) {
|
1187 |
-
if ( !isNaN( parseFloat( e ) ) && isFinite( e ) ) {
|
1188 |
-
return parseInt( e );
|
1189 |
-
} else {
|
1190 |
-
return e;
|
1191 |
-
}
|
1192 |
-
} );
|
1193 |
-
|
1194 |
-
var sub = data;
|
1195 |
-
var value;
|
1196 |
-
for (var i = 0; i < parts.length; i++) {
|
1197 |
-
// If the field is missing from the data, just leave `value` as `undefined`.
|
1198 |
-
if ( ! sub.hasOwnProperty( parts[ i ] ) ) {
|
1199 |
-
if ( skipMissingValues ) {
|
1200 |
-
return true;
|
1201 |
-
} else {
|
1202 |
-
break;
|
1203 |
-
}
|
1204 |
-
}
|
1205 |
-
if (i === parts.length - 1) {
|
1206 |
-
value = sub[ parts[ i ] ];
|
1207 |
-
} else {
|
1208 |
-
sub = sub[ parts[ i ] ];
|
1209 |
-
}
|
1210 |
-
}
|
1211 |
-
|
1212 |
-
// This is the end, so we need to set the value on the field here.
|
1213 |
-
if ( $$.attr( 'type' ) === 'checkbox' ) {
|
1214 |
-
$$.prop( 'checked', value );
|
1215 |
-
} else if ( $$.attr( 'type' ) === 'radio' ) {
|
1216 |
-
$$.prop( 'checked', value === $$.val() );
|
1217 |
-
} else if ( $$.prop( 'tagName' ) === 'TEXTAREA' && $$.hasClass( 'wp-editor-area' ) ) {
|
1218 |
-
// This is a TinyMCE editor, so we'll use the tinyMCE object to get the content
|
1219 |
-
var editor = null;
|
1220 |
-
if ( typeof tinyMCE !== 'undefined' ) {
|
1221 |
-
editor = tinyMCE.get( $$.attr( 'id' ) );
|
1222 |
-
}
|
1223 |
-
|
1224 |
-
if ( editor !== null && typeof( editor.setContent ) === "function" && ! editor.isHidden() && $$.parent().is( ':visible' ) ) {
|
1225 |
-
if ( editor.initialized ) {
|
1226 |
-
editor.setContent( value );
|
1227 |
-
} else {
|
1228 |
-
editor.on('init', function () {
|
1229 |
-
editor.setContent( value );
|
1230 |
-
});
|
1231 |
-
}
|
1232 |
-
}
|
1233 |
-
else {
|
1234 |
-
$$.val( value );
|
1235 |
-
}
|
1236 |
-
} else if ( $$.is( '.panels-data' ) ) {
|
1237 |
-
$$.val( value );
|
1238 |
-
var builder = $$.data( 'builder' );
|
1239 |
-
if ( builder ) {
|
1240 |
-
builder.setDataField( $$ );
|
1241 |
-
}
|
1242 |
-
} else {
|
1243 |
-
$$.val( value );
|
1244 |
-
}
|
1245 |
-
|
1246 |
-
if ( triggerChange ) {
|
1247 |
-
$$.trigger( 'change' );
|
1248 |
-
}
|
1249 |
-
});
|
1250 |
-
};
|
1251 |
-
|
1252 |
-
|
1253 |
-
/**
|
1254 |
-
* Displays an informational notice either at the top of the supplied container, or above the optionally supplied
|
1255 |
-
* element.
|
1256 |
-
*
|
1257 |
-
* @param $container The jQuery container in which the notice will be prepended.
|
1258 |
-
* @param title The string title for the notice.
|
1259 |
-
* @param message The string detail message for the notice.
|
1260 |
-
* @param buttons An array of buttons which will be display along with the notice.
|
1261 |
-
* @param $element The optional jQuery element before which the notice will be inserted. If this is supplied it
|
1262 |
-
* will take precedence over the $container argument.
|
1263 |
-
*
|
1264 |
-
*/
|
1265 |
-
sowbForms.displayNotice = function ( $container, title, message, buttons, $element ) {
|
1266 |
-
|
1267 |
-
var $notice = $( '<div class="siteorigin-widget-form-notification"></div>' );
|
1268 |
-
if ( title ) {
|
1269 |
-
$notice.append( '<span>' + title + '</span>' );
|
1270 |
-
}
|
1271 |
-
|
1272 |
-
if ( buttons && buttons.length ) {
|
1273 |
-
buttons.forEach( function ( button ) {
|
1274 |
-
var buttonClasses = '';
|
1275 |
-
if ( button.classes && button.classes.length ) {
|
1276 |
-
buttonClasses = ' ' + button.classes.join( ' ' );
|
1277 |
-
}
|
1278 |
-
var $button = $( '<a class="button button-small' + buttonClasses + '">' + button.label + '</a>' );
|
1279 |
-
|
1280 |
-
if ( button.url ) {
|
1281 |
-
$button.attr( 'href', button.url );
|
1282 |
-
}
|
1283 |
-
if ( button.callback ) {
|
1284 |
-
$button.on( 'click', function () {
|
1285 |
-
button.callback( $notice );
|
1286 |
-
});
|
1287 |
-
}
|
1288 |
-
|
1289 |
-
$notice.append( $button );
|
1290 |
-
} );
|
1291 |
-
}
|
1292 |
-
if ( message ) {
|
1293 |
-
$notice.append( '<div><small>' + message + '</small></div>' );
|
1294 |
-
}
|
1295 |
-
|
1296 |
-
if ( $element ) {
|
1297 |
-
$element.before( $notice );
|
1298 |
-
} else {
|
1299 |
-
$container.prepend( $notice );
|
1300 |
-
}
|
1301 |
-
};
|
1302 |
-
|
1303 |
-
// When we click on a widget top
|
1304 |
-
$('.widgets-holder-wrap').on('click', '.widget:has(.siteorigin-widget-form-main) .widget-top', function () {
|
1305 |
-
var $$ = $(this).closest('.widget').find('.siteorigin-widget-form-main');
|
1306 |
-
setTimeout(function () {
|
1307 |
-
$$.sowSetupForm();
|
1308 |
-
}, 200);
|
1309 |
-
});
|
1310 |
-
var $body = $( 'body' );
|
1311 |
-
if ( $body.hasClass('wp-customizer') ) {
|
1312 |
-
// Setup new widgets when they're added in the customizer interface
|
1313 |
-
$(document).on('widget-added', function (e, widget) {
|
1314 |
-
widget.find('.siteorigin-widget-form').sowSetupForm();
|
1315 |
-
});
|
1316 |
-
}
|
1317 |
-
|
1318 |
-
if ( $body.hasClass('block-editor-page') ) {
|
1319 |
-
// Setup new widgets when they're previewed in the block editor.
|
1320 |
-
$(document).on('panels_setup_preview', function () {
|
1321 |
-
$( sowb ).trigger( 'setup_widgets', { preview: true } );
|
1322 |
-
});
|
1323 |
-
}
|
1324 |
-
|
1325 |
-
$( document ).on( 'open_dialog', function ( e, dialog ) {
|
1326 |
-
// When we open a Page Builder edit widget dialog
|
1327 |
-
if ( dialog.$el.find( '.so-panels-dialog' ).is( '.so-panels-dialog-edit-widget' ) ) {
|
1328 |
-
var $fields = dialog.$el.find( '.siteorigin-widget-form-main' ).find( '> .siteorigin-widget-field' );
|
1329 |
-
$fields.trigger( 'sowsetupformfield' );
|
1330 |
-
}
|
1331 |
-
});
|
1332 |
-
|
1333 |
-
$(function () {
|
1334 |
-
$(document).trigger('sowadminloaded');
|
1335 |
-
});
|
1336 |
-
|
1337 |
-
})(jQuery);
|
1338 |
-
|
1339 |
-
var sowEmitters = {
|
1340 |
-
|
1341 |
-
/**
|
1342 |
-
* Find the group/state and an extra match part.
|
1343 |
-
*
|
1344 |
-
* @param arg
|
1345 |
-
* @param matchPart
|
1346 |
-
* @return {*}
|
1347 |
-
*/
|
1348 |
-
'_match': function (arg, matchPart) {
|
1349 |
-
if (typeof matchPart === 'undefined') {
|
1350 |
-
matchPart = '.*';
|
1351 |
-
}
|
1352 |
-
|
1353 |
-
// Create the regular expression to match the group/state and extra match
|
1354 |
-
var exp = new RegExp('^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *(' + matchPart + ') *$');
|
1355 |
-
var m = exp.exec(arg);
|
1356 |
-
|
1357 |
-
if (m === null) {
|
1358 |
-
return false;
|
1359 |
-
}
|
1360 |
-
|
1361 |
-
var state = '';
|
1362 |
-
var group = 'default';
|
1363 |
-
|
1364 |
-
if (m[3] !== undefined) {
|
1365 |
-
group = m[1];
|
1366 |
-
state = m[3];
|
1367 |
-
}
|
1368 |
-
else {
|
1369 |
-
state = m[1];
|
1370 |
-
}
|
1371 |
-
|
1372 |
-
return {
|
1373 |
-
'match': m[4].trim(),
|
1374 |
-
'group': group,
|
1375 |
-
'state': state
|
1376 |
-
};
|
1377 |
-
},
|
1378 |
-
|
1379 |
-
'_checker': function (val, args, matchPart, callback) {
|
1380 |
-
var returnStates = {};
|
1381 |
-
if (typeof args.length === 'undefined') {
|
1382 |
-
args = [args];
|
1383 |
-
}
|
1384 |
-
|
1385 |
-
var m;
|
1386 |
-
for (var i = 0; i < args.length; i++) {
|
1387 |
-
m = sowEmitters._match(args[i], matchPart);
|
1388 |
-
if (m === false) {
|
1389 |
-
continue;
|
1390 |
-
}
|
1391 |
-
|
1392 |
-
if (m.match === '_true' || callback(val, args, m.match)) {
|
1393 |
-
returnStates[m.group] = m.state;
|
1394 |
-
}
|
1395 |
-
}
|
1396 |
-
|
1397 |
-
return returnStates;
|
1398 |
-
},
|
1399 |
-
|
1400 |
-
/**
|
1401 |
-
* A very simple state emitter that simply sets the given group the value
|
1402 |
-
*
|
1403 |
-
*
|
1404 |
-
* @param val
|
1405 |
-
* @param args
|
1406 |
-
* @returns {{}}
|
1407 |
-
*/
|
1408 |
-
'select': function (val, args) {
|
1409 |
-
if (typeof args.length === 'undefined') {
|
1410 |
-
args = [args];
|
1411 |
-
}
|
1412 |
-
|
1413 |
-
var returnGroups = {};
|
1414 |
-
for (var i = 0; i < args.length; i++) {
|
1415 |
-
if (args[i] === '') {
|
1416 |
-
args[i] = 'default';
|
1417 |
-
}
|
1418 |
-
returnGroups[args[i]] = val;
|
1419 |
-
}
|
1420 |
-
|
1421 |
-
return returnGroups;
|
1422 |
-
},
|
1423 |
-
|
1424 |
-
/**
|
1425 |
-
* The conditional state emitter uses eval to check a given conditional argument.
|
1426 |
-
*
|
1427 |
-
* @param val
|
1428 |
-
* @param args
|
1429 |
-
* @return {{}}
|
1430 |
-
*/
|
1431 |
-
'conditional': function (val, args) {
|
1432 |
-
return sowEmitters._checker(val, args, '[^;{}]*', function (val, args, match) {
|
1433 |
-
return eval(match);
|
1434 |
-
});
|
1435 |
-
},
|
1436 |
-
|
1437 |
-
/**
|
1438 |
-
* The in state emitter checks if the value is in an array of functions
|
1439 |
-
*
|
1440 |
-
* @param val
|
1441 |
-
* @param args
|
1442 |
-
* @return {{}}
|
1443 |
-
*/
|
1444 |
-
'in': function (val, args) {
|
1445 |
-
return sowEmitters._checker(val, args, '[^;{}]*', function (val, args, match) {
|
1446 |
-
return match.split(',').map(function (s) {
|
1447 |
-
return s.trim();
|
1448 |
-
}).indexOf(val) !== -1;
|
1449 |
-
});
|
1450 |
-
}
|
1451 |
-
};
|
1452 |
-
|
1453 |
-
window.sowbForms = sowbForms;
|
1 |
+
/* globals wp, jQuery, _, soWidgets, confirm, tinymce, sowbForms */
|
2 |
+
|
3 |
+
var sowbForms = window.sowbForms || {};
|
4 |
+
|
5 |
+
(function ($) {
|
6 |
+
|
7 |
+
$.fn.sowSetupForm = function () {
|
8 |
+
|
9 |
+
return $(this).each(function (i, el) {
|
10 |
+
var $el = $(el),
|
11 |
+
$mainForm,
|
12 |
+
formId,
|
13 |
+
formInitializing = true;
|
14 |
+
|
15 |
+
var $body = $( 'body' );
|
16 |
+
// Skip this if the widget has any fields with an __i__
|
17 |
+
var $inputs = $el.find('input[name]');
|
18 |
+
if ($inputs.length && $inputs.attr('name').indexOf('__i__') !== -1) {
|
19 |
+
return this;
|
20 |
+
}
|
21 |
+
|
22 |
+
// Skip this if we've already set up the form
|
23 |
+
if ( $el.is('.siteorigin-widget-form-main') ) {
|
24 |
+
if ($el.data('sow-form-setup') === true) {
|
25 |
+
return true;
|
26 |
+
}
|
27 |
+
// If we're in the main widgets interface and the form isn't visible and it isn't contained in a
|
28 |
+
// panels dialog (when using the Layout Builder widget), don't worry about setting it up.
|
29 |
+
if ($body.hasClass('widgets-php') && !$el.is(':visible') && $el.closest('.panel-dialog').length === 0) {
|
30 |
+
return true;
|
31 |
+
}
|
32 |
+
|
33 |
+
// Listen for a state change event if this is the main form wrapper
|
34 |
+
$el.on('sowstatechange', function (e, incomingGroup, incomingState) {
|
35 |
+
|
36 |
+
// Find all wrappers that have state handlers on them
|
37 |
+
$el.find('[data-state-handler]').each(function () {
|
38 |
+
var $$ = $(this);
|
39 |
+
// Create a copy of the current state handlers. Add in initial handlers if the form is initializing.
|
40 |
+
var handler = $.extend({}, $$.data('state-handler'), formInitializing ? $$.data('state-handler-initial') : {});
|
41 |
+
if (Object.keys(handler).length === 0) {
|
42 |
+
return true;
|
43 |
+
}
|
44 |
+
|
45 |
+
// We need to figure out what the incoming state is
|
46 |
+
var handlerStateParts, handlerState, thisHandler, $$f, runHandler, handlerStateNames;
|
47 |
+
|
48 |
+
// Indicates if the handler has run
|
49 |
+
var handlerRun = {};
|
50 |
+
|
51 |
+
var repeaterIndex = sowbForms.getContainerFieldId( $$, 'repeater', '.siteorigin-widget-field-repeater-item' );
|
52 |
+
if (repeaterIndex !== false) {
|
53 |
+
var repeaterHandler = {};
|
54 |
+
for ( var rptrState in handler) {
|
55 |
+
repeaterHandler[rptrState.replace('{$repeater}', repeaterIndex)] = handler[rptrState];
|
56 |
+
}
|
57 |
+
handler = repeaterHandler;
|
58 |
+
}
|
59 |
+
|
60 |
+
var widgetFieldId = sowbForms.getContainerFieldId( $$, 'widget', '.siteorigin-widget-widget' );
|
61 |
+
if ( widgetFieldId !== false ) {
|
62 |
+
var widgetFieldHandler = {};
|
63 |
+
for ( var wdgFldState in handler) {
|
64 |
+
var stMatches = wdgFldState.match( /_else\[(.*)\]|(.*)\[(.*)\]/ );
|
65 |
+
var st = '';
|
66 |
+
if ( stMatches && stMatches.length && stMatches[1] === undefined ) {
|
67 |
+
st = stMatches[ 2 ] + '_' + widgetFieldId + '[' + stMatches[ 3 ] + ']';
|
68 |
+
} else {
|
69 |
+
st = '_else[' + stMatches[ 1 ] + '_' + widgetFieldId + ']';
|
70 |
+
}
|
71 |
+
|
72 |
+
widgetFieldHandler[st] = handler[wdgFldState];
|
73 |
+
}
|
74 |
+
handler = widgetFieldHandler;
|
75 |
+
}
|
76 |
+
|
77 |
+
// Go through all the handlers
|
78 |
+
for (var state in handler) {
|
79 |
+
runHandler = false;
|
80 |
+
|
81 |
+
// Parse the handler state parts
|
82 |
+
handlerStateParts = state.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?$/);
|
83 |
+
if (handlerStateParts === null) {
|
84 |
+
// Skip this if there's a problem with the state parts
|
85 |
+
continue;
|
86 |
+
}
|
87 |
+
|
88 |
+
handlerState = {
|
89 |
+
'group': 'default',
|
90 |
+
'name': '',
|
91 |
+
'multi': false
|
92 |
+
};
|
93 |
+
|
94 |
+
// Assign the handlerState attributes based on the parsed state
|
95 |
+
if (handlerStateParts[2] !== undefined) {
|
96 |
+
handlerState.group = handlerStateParts[1];
|
97 |
+
handlerState.name = handlerStateParts[3];
|
98 |
+
}
|
99 |
+
else {
|
100 |
+
handlerState.name = handlerStateParts[0];
|
101 |
+
}
|
102 |
+
handlerState.multi = (handlerStateParts[4] !== undefined);
|
103 |
+
|
104 |
+
if (handlerState.group === '_else') {
|
105 |
+
// This is the special case of an group else handler
|
106 |
+
// Always run if no handlers from the current group have been run yet
|
107 |
+
handlerState.group = handlerState.name;
|
108 |
+
handlerState.name = '';
|
109 |
+
|
110 |
+
// We will run this handler because none have run for it yet
|
111 |
+
runHandler = ( handlerState.group === incomingGroup && typeof handlerRun[handlerState.group] === 'undefined' );
|
112 |
+
}
|
113 |
+
else {
|
114 |
+
// Evaluate if we're in the current state
|
115 |
+
handlerStateNames = handlerState.name.split(',').map(function (a) {
|
116 |
+
return a.trim()
|
117 |
+
});
|
118 |
+
for (var i = 0; i < handlerStateNames.length; i++) {
|
119 |
+
runHandler = (handlerState.group === incomingGroup && handlerStateNames[i] === incomingState);
|
120 |
+
if (runHandler) break;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
// Run the handler if previous checks have determined we should
|
125 |
+
if (runHandler) {
|
126 |
+
thisHandler = handler[state];
|
127 |
+
|
128 |
+
// Now we can handle the the handler
|
129 |
+
if (!handlerState.multi) {
|
130 |
+
thisHandler = [thisHandler];
|
131 |
+
}
|
132 |
+
|
133 |
+
for (var i = 0; i < thisHandler.length; i++) {
|
134 |
+
// Choose the item we'll be acting on here
|
135 |
+
if (typeof thisHandler[i][1] !== 'undefined' && Boolean(thisHandler[i][1])) {
|
136 |
+
// thisHandler[i][1] is the sub selector
|
137 |
+
$$f = $$.find(thisHandler[i][1]);
|
138 |
+
}
|
139 |
+
else {
|
140 |
+
$$f = $$;
|
141 |
+
}
|
142 |
+
|
143 |
+
// Call the function on the wrapper we've selected
|
144 |
+
$$f[thisHandler[i][0]].apply($$f, typeof thisHandler[i][2] !== 'undefined' ? thisHandler[i][2] : []);
|
145 |
+
|
146 |
+
if ( $$f.is( '.siteorigin-widget-field:visible' ) ) {
|
147 |
+
if ( $$f.is( '.siteorigin-widget-field-type-section' ) ) {
|
148 |
+
var $fields = $$f.find( '> .siteorigin-widget-section > .siteorigin-widget-field' );
|
149 |
+
$fields.trigger( 'sowsetupformfield' );
|
150 |
+
} else {
|
151 |
+
$$f.trigger( 'sowsetupformfield' );
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
}
|
156 |
+
|
157 |
+
// Store that we've run a handler
|
158 |
+
handlerRun[handlerState.group] = true;
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
});
|
163 |
+
});
|
164 |
+
|
165 |
+
// Lets set up the preview
|
166 |
+
$el.sowSetupPreview();
|
167 |
+
$mainForm = $el;
|
168 |
+
|
169 |
+
var $teaser = $el.find('.siteorigin-widget-teaser');
|
170 |
+
$teaser.find('.dashicons-dismiss').click(function () {
|
171 |
+
var $$ = $(this);
|
172 |
+
$.get($$.data('dismiss-url'));
|
173 |
+
|
174 |
+
$teaser.slideUp('normal', function () {
|
175 |
+
$teaser.remove();
|
176 |
+
});
|
177 |
+
});
|
178 |
+
|
179 |
+
|
180 |
+
if ( ! $el.data( 'backupDisabled' ) ) {
|
181 |
+
var _sow_form_id = $el.find( '> .siteorigin-widgets-form-id' ).val();
|
182 |
+
var $timestampField = $el.find( '> .siteorigin-widgets-form-timestamp' );
|
183 |
+
var _sow_form_timestamp = parseInt( $timestampField.val() || 0 );
|
184 |
+
var data = JSON.parse( sessionStorage.getItem( _sow_form_id ) );
|
185 |
+
if ( data ) {
|
186 |
+
if ( data['_sow_form_timestamp'] > _sow_form_timestamp ) {
|
187 |
+
sowbForms.displayNotice(
|
188 |
+
$el,
|
189 |
+
soWidgets.backup.newerVersion,
|
190 |
+
soWidgets.backup.replaceWarning,
|
191 |
+
[
|
192 |
+
{
|
193 |
+
label: soWidgets.backup.restore,
|
194 |
+
callback: function ( $notice ) {
|
195 |
+
sowbForms.setWidgetFormValues( $mainForm, data );
|
196 |
+
$notice.slideUp( 'fast', function () {
|
197 |
+
$notice.remove();
|
198 |
+
} );
|
199 |
+
},
|
200 |
+
},
|
201 |
+
{
|
202 |
+
label: soWidgets.backup.dismiss,
|
203 |
+
callback: function ( $notice ) {
|
204 |
+
$notice.slideUp( 'fast', function () {
|
205 |
+
sessionStorage.removeItem( _sow_form_id );
|
206 |
+
$notice.remove();
|
207 |
+
} );
|
208 |
+
},
|
209 |
+
},
|
210 |
+
]
|
211 |
+
);
|
212 |
+
} else {
|
213 |
+
sessionStorage.removeItem( _sow_form_id );
|
214 |
+
}
|
215 |
+
}
|
216 |
+
$el.change( function () {
|
217 |
+
$timestampField.val( new Date().getTime() );
|
218 |
+
var data = sowbForms.getWidgetFormValues( $el );
|
219 |
+
sessionStorage.setItem( _sow_form_id, JSON.stringify( data ) );
|
220 |
+
} );
|
221 |
+
}
|
222 |
+
}
|
223 |
+
else {
|
224 |
+
$mainForm = $el.closest('.siteorigin-widget-form-main');
|
225 |
+
}
|
226 |
+
formId = $mainForm.find('> .siteorigin-widgets-form-id').val();
|
227 |
+
|
228 |
+
// Find any field or sub widget fields.
|
229 |
+
var $fields = $el.find('> .siteorigin-widget-field');
|
230 |
+
|
231 |
+
// Process any sub sections
|
232 |
+
$fields.find('> .siteorigin-widget-section').sowSetupForm();
|
233 |
+
|
234 |
+
var $subwidgetFields = $fields.find('> .siteorigin-widget-widget');
|
235 |
+
$subwidgetFields.find('> .siteorigin-widget-section').sowSetupForm();
|
236 |
+
|
237 |
+
// Process any sub widgets whose fields aren't contained in a section
|
238 |
+
$subwidgetFields.filter(':not(:has(> .siteorigin-widget-section))').sowSetupForm();
|
239 |
+
|
240 |
+
// Store the field names
|
241 |
+
$fields.find('.siteorigin-widget-input').each(function (i, input) {
|
242 |
+
if ($(input).data('original-name') === null) {
|
243 |
+
$(input).data('original-name', $(input).attr('name'));
|
244 |
+
}
|
245 |
+
});
|
246 |
+
|
247 |
+
// Setup all the repeaters
|
248 |
+
$fields.find('> .siteorigin-widget-field-repeater').sowSetupRepeater();
|
249 |
+
|
250 |
+
// For any repeater items currently in existence
|
251 |
+
$el.find('.siteorigin-widget-field-repeater-item').sowSetupRepeaterItems();
|
252 |
+
|
253 |
+
// Set up any color fields
|
254 |
+
$fields.find('> .siteorigin-widget-input-color').each(function () {
|
255 |
+
var colorField = $(this);
|
256 |
+
var colorFieldOptions = {
|
257 |
+
change: function (event, ui) {
|
258 |
+
setTimeout(function () {
|
259 |
+
$(event.target).trigger('change');
|
260 |
+
}, 100);
|
261 |
+
}
|
262 |
+
};
|
263 |
+
if (colorField.data('defaultColor')) {
|
264 |
+
colorFieldOptions.defaultColor = colorField.data('defaultColor');
|
265 |
+
}
|
266 |
+
colorField.wpColorPicker(colorFieldOptions);
|
267 |
+
});
|
268 |
+
|
269 |
+
///////////////////////////////////////
|
270 |
+
// Handle the sections
|
271 |
+
var expandContainer = function () {
|
272 |
+
$(this).toggleClass('siteorigin-widget-section-visible');
|
273 |
+
$(this).parent().find('> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section')
|
274 |
+
.slideToggle('fast', function () {
|
275 |
+
$(window).resize();
|
276 |
+
$(this).find('> .siteorigin-widget-field-container-state').val($(this).is(':visible') ? 'open' : 'closed');
|
277 |
+
|
278 |
+
if ( $( this ).is( ':visible' ) ) {
|
279 |
+
var $fields = $( this ).find( '> .siteorigin-widget-field' );
|
280 |
+
$fields.trigger( 'sowsetupformfield' );
|
281 |
+
}
|
282 |
+
} );
|
283 |
+
};
|
284 |
+
$fields.filter('.siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section').find('> label').click(expandContainer);
|
285 |
+
$fields.filter('.siteorigin-widget-field-type-posts').find('.posts-container-label-wrapper').click(expandContainer);
|
286 |
+
|
287 |
+
///////////////////////////////////////
|
288 |
+
// Handle the slider fields
|
289 |
+
|
290 |
+
$fields.filter('.siteorigin-widget-field-type-slider').each(function () {
|
291 |
+
var $$ = $(this);
|
292 |
+
var $input = $$.find('input[type="number"]');
|
293 |
+
var $c = $$.find('.siteorigin-widget-value-slider');
|
294 |
+
|
295 |
+
$c.slider({
|
296 |
+
max: parseFloat($input.attr('max')),
|
297 |
+
min: parseFloat($input.attr('min')),
|
298 |
+
step: parseFloat($input.attr('step')),
|
299 |
+
value: parseFloat($input.val()),
|
300 |
+
slide: function (event, ui) {
|
301 |
+
$input.val( parseFloat( ui.value ) );
|
302 |
+
$input.trigger( 'change' );
|
303 |
+
$$.find('.siteorigin-widget-slider-value').html(ui.value);
|
304 |
+
},
|
305 |
+
});
|
306 |
+
$input.change(function(event, data) {
|
307 |
+
if ( ! ( data && data.silent ) ) {
|
308 |
+
$c.slider( 'value', parseFloat( $input.val() ) );
|
309 |
+
}
|
310 |
+
});
|
311 |
+
});
|
312 |
+
|
313 |
+
///////////////////////////////////////
|
314 |
+
// Setup the URL fields
|
315 |
+
|
316 |
+
$fields.filter('.siteorigin-widget-field-type-link').each(function () {
|
317 |
+
var $$ = $(this);
|
318 |
+
|
319 |
+
// Function that refreshes the list of
|
320 |
+
var request = null;
|
321 |
+
var refreshList = function () {
|
322 |
+
if (request !== null) {
|
323 |
+
request.abort();
|
324 |
+
}
|
325 |
+
|
326 |
+
var $contentSearchInput = $$.find('.content-text-search');
|
327 |
+
var query = $contentSearchInput.val();
|
328 |
+
var postTypes = $contentSearchInput.data('postTypes');
|
329 |
+
|
330 |
+
var $ul = $$.find('ul.posts').empty().addClass('loading');
|
331 |
+
$.get(
|
332 |
+
soWidgets.ajaxurl,
|
333 |
+
{action: 'so_widgets_search_posts', query: query, postTypes: postTypes},
|
334 |
+
function (data) {
|
335 |
+
for (var i = 0; i < data.length; i++) {
|
336 |
+
if (data[i].label === '') {
|
337 |
+
data[i].label = ' ';
|
338 |
+
}
|
339 |
+
|
340 |
+
// Add all the post items
|
341 |
+
$ul.append(
|
342 |
+
$('<li>')
|
343 |
+
.addClass('post')
|
344 |
+
.html(data[i].label + '<span>(' + data[i].type + ')</span>')
|
345 |
+
.data(data[i])
|
346 |
+
);
|
347 |
+
}
|
348 |
+
$ul.removeClass('loading');
|
349 |
+
}
|
350 |
+
);
|
351 |
+
};
|
352 |
+
|
353 |
+
// Toggle display of the existing content
|
354 |
+
$$.find('.select-content-button, .button-close').click(function (e) {
|
355 |
+
e.preventDefault();
|
356 |
+
|
357 |
+
$(this).blur();
|
358 |
+
var $s = $$.find('.existing-content-selector');
|
359 |
+
$s.toggle();
|
360 |
+
|
361 |
+
if ($s.is(':visible') && $s.find('ul.posts li').length === 0) {
|
362 |
+
refreshList();
|
363 |
+
}
|
364 |
+
|
365 |
+
});
|
366 |
+
|
367 |
+
// Clicking on one of the url items
|
368 |
+
$$.on('click', '.posts li', function (e) {
|
369 |
+
e.preventDefault();
|
370 |
+
var $li = $(this);
|
371 |
+
$$.find('input.siteorigin-widget-input').val('post: ' + $li.data('value'));
|
372 |
+
$$.change();
|
373 |
+
$$.find('.existing-content-selector').toggle();
|
374 |
+
});
|
375 |
+
|
376 |
+
var interval = null;
|
377 |
+
$$.find('.content-text-search').keyup(function () {
|
378 |
+
if (interval !== null) {
|
379 |
+
clearTimeout(interval);
|
380 |
+
}
|
381 |
+
|
382 |
+
interval = setTimeout(function () {
|
383 |
+
refreshList();
|
384 |
+
}, 500);
|
385 |
+
});
|
386 |
+
});
|
387 |
+
|
388 |
+
///////////////////////////////////////
|
389 |
+
// Setup the Builder fields
|
390 |
+
if (typeof jQuery.fn.soPanelsSetupBuilderWidget !== 'undefined') {
|
391 |
+
$fields.filter('.siteorigin-widget-field-type-builder').each(function () {
|
392 |
+
$( this ).find( '> .siteorigin-page-builder-field' ).each( function () {
|
393 |
+
var $$ = $( this );
|
394 |
+
$$.soPanelsSetupBuilderWidget( { builderType: $$.data( 'type' ) } );
|
395 |
+
} );
|
396 |
+
});
|
397 |
+
}
|
398 |
+
|
399 |
+
///////////////////////////////////////
|
400 |
+
// Now lets handle the state emitters
|
401 |
+
|
402 |
+
var stateEmitterChangeHandler = function () {
|
403 |
+
var $$ = $(this);
|
404 |
+
|
405 |
+
// These emitters can either be an array or a
|
406 |
+
var emitters = $$.closest('[data-state-emitter]').data('state-emitter');
|
407 |
+
|
408 |
+
if (typeof emitters !== 'undefined') {
|
409 |
+
var handleStateEmitter = function (emitter, currentStates) {
|
410 |
+
if (typeof sowEmitters[emitter.callback] === 'undefined' || emitter.callback.substr(0, 1) === '_') {
|
411 |
+
// Skip if the function doesn't exist, or it starts with an underscore (internal functions).
|
412 |
+
return currentStates;
|
413 |
+
}
|
414 |
+
|
415 |
+
// Skip if this is an unselected radio input.
|
416 |
+
if ( $$.is( '[type="radio"]' ) && !$$.is( ':checked' ) ) {
|
417 |
+
return currentStates;
|
418 |
+
}
|
419 |
+
|
420 |
+
// Check if this is inside a repeater
|
421 |
+
var repeaterIndex = sowbForms.getContainerFieldId( $$, 'repeater', '.siteorigin-widget-field-repeater-item' );
|
422 |
+
if (repeaterIndex !== false) {
|
423 |
+
emitter.args = emitter.args.map(function (a) {
|
424 |
+
return a.replace('{$repeater}', repeaterIndex);
|
425 |
+
});
|
426 |
+
}
|
427 |
+
|
428 |
+
var widgetFieldId = sowbForms.getContainerFieldId( $$, 'widget', '.siteorigin-widget-widget' );
|
429 |
+
if ( widgetFieldId !== false && ! emitter.hasOwnProperty( 'widgetFieldId' ) ) {
|
430 |
+
emitter.widgetFieldId = widgetFieldId;
|
431 |
+
emitter.args = emitter.args.map(function (arg) {
|
432 |
+
if ( emitter.callback === 'conditional' ) {
|
433 |
+
arg = arg.replace( /(.*)(\[.*)/, '$1_' + widgetFieldId + '$2' );
|
434 |
+
} else {
|
435 |
+
arg = arg + '_' + widgetFieldId;
|
436 |
+
}
|
437 |
+
return arg;
|
438 |
+
});
|
439 |
+
}
|
440 |
+
|
441 |
+
var val = $$.is('[type="checkbox"]') ? $$.is(':checked') : $$.val();
|
442 |
+
// Return an array that has the new states added to the array
|
443 |
+
return $.extend(currentStates, sowEmitters[emitter.callback](val, emitter.args));
|
444 |
+
};
|
445 |
+
|
446 |
+
// Run the states through the state emitters
|
447 |
+
var states = {'default': ''};
|
448 |
+
|
449 |
+
// Go through the array of emitters
|
450 |
+
if (typeof emitters.length === 'undefined') {
|
451 |
+
emitters = [emitters];
|
452 |
+
}
|
453 |
+
|
454 |
+
for (var i = 0; i < emitters.length; i++) {
|
455 |
+
states = handleStateEmitter(emitters[i], states);
|
456 |
+
}
|
457 |
+
|
458 |
+
// Check which states have changed and trigger appropriate sowstatechange
|
459 |
+
var formStates = $mainForm.data('states');
|
460 |
+
if (typeof formStates === 'undefined') {
|
461 |
+
formStates = {'default': ''};
|
462 |
+
}
|
463 |
+
for (var k in states) {
|
464 |
+
if ( typeof formStates[k] === 'undefined' || states[k] !== formStates[k] ) {
|
465 |
+
// If the state is different from the original formStates, then trigger a state change
|
466 |
+
formStates[k] = states[k];
|
467 |
+
$mainForm.trigger('sowstatechange', [k, states[k]]);
|
468 |
+
}
|
469 |
+
}
|
470 |
+
|
471 |
+
// Store the form states back in the form
|
472 |
+
$mainForm.data('states', formStates);
|
473 |
+
}
|
474 |
+
};
|
475 |
+
|
476 |
+
$fields.filter('[data-state-emitter]').each(function () {
|
477 |
+
|
478 |
+
var $input = $( this ).find( '.siteorigin-widget-input' );
|
479 |
+
|
480 |
+
// Listen for any change events on an emitter field
|
481 |
+
$input.on('keyup change', stateEmitterChangeHandler);
|
482 |
+
|
483 |
+
// Trigger initial state emitter changes
|
484 |
+
$input.each(function () {
|
485 |
+
var $$ = $(this);
|
486 |
+
if ($$.is(':radio')) {
|
487 |
+
// Only checked radio inputs must have change events
|
488 |
+
if ($$.is(':checked')) {
|
489 |
+
stateEmitterChangeHandler.call($$[0]);
|
490 |
+
}
|
491 |
+
}
|
492 |
+
else {
|
493 |
+
stateEmitterChangeHandler.call($$[0]);
|
494 |
+
}
|
495 |
+
});
|
496 |
+
|
497 |
+
});
|
498 |
+
|
499 |
+
// Give plugins a chance to influence the form
|
500 |
+
$el.trigger('sowsetupform', $fields).data('sow-form-setup', true);
|
501 |
+
|
502 |
+
$fields.trigger('sowsetupformfield');
|
503 |
+
|
504 |
+
$el.find('.siteorigin-widget-field-repeater-item').trigger('updateFieldPositions');
|
505 |
+
|
506 |
+
if ( $body.hasClass( 'wp-customizer' ) || $body.hasClass( 'widgets-php' ) ) {
|
507 |
+
// Reinitialize widget fields when they're dragged and dropped.
|
508 |
+
$el.closest( '.ui-sortable' ).on( 'sortstop', function (event, ui) {
|
509 |
+
var $fields = ui.item.find( '.siteorigin-widget-form' ).find( '> .siteorigin-widget-field' );
|
510 |
+
$fields.trigger( 'sowsetupformfield' );
|
511 |
+
} );
|
512 |
+
}
|
513 |
+
|
514 |
+
/////////////////////////////
|
515 |
+
// The end of the form setup.
|
516 |
+
/////////////////////////////
|
517 |
+
|
518 |
+
formInitializing = false;
|
519 |
+
});
|
520 |
+
};
|
521 |
+
|
522 |
+
$.fn.sowSetupPreview = function () {
|
523 |
+
var $el = $(this);
|
524 |
+
var previewButton = $el.siblings('.siteorigin-widget-preview');
|
525 |
+
|
526 |
+
previewButton.find('> a').click(function (e) {
|
527 |
+
e.preventDefault();
|
528 |
+
|
529 |
+
var data = sowbForms.getWidgetFormValues($el);
|
530 |
+
|
531 |
+
// Create a new modal window
|
532 |
+
var modal = $($('#so-widgets-bundle-tpl-preview-dialog').html().trim()).appendTo('body');
|
533 |
+
modal.find('input[name="data"]').val(JSON.stringify(data));
|
534 |
+
modal.find('input[name="class"]').val($el.data('class'));
|
535 |
+
modal.find('iframe').on('load', function () {
|
536 |
+
$(this).css('visibility', 'visible');
|
537 |
+
});
|
538 |
+
modal.find('form').submit();
|
539 |
+
|
540 |
+
modal.find('.close').click(function () {
|
541 |
+
modal.remove();
|
542 |
+
});
|
543 |
+
});
|
544 |
+
};
|
545 |
+
|
546 |
+
$.fn.sowSetupRepeater = function () {
|
547 |
+
|
548 |
+
return $(this).each(function (i, el) {
|
549 |
+
var $el = $(el);
|
550 |
+
var $items = $el.find('.siteorigin-widget-field-repeater-items');
|
551 |
+
var name = $el.data('repeater-name');
|
552 |
+
|
553 |
+
$items.bind('updateFieldPositions', function () {
|
554 |
+
var $$ = $(this);
|
555 |
+
var $rptrItems = $$.find('> .siteorigin-widget-field-repeater-item');
|
556 |
+
|
557 |
+
// Set the position for the repeater items
|
558 |
+
$rptrItems.each(function (i, el) {
|
559 |
+
$(el).find('.siteorigin-widget-input').each(function (j, input) {
|
560 |
+
var pos = $(input).data('repeater-positions');
|
561 |
+
if (typeof pos === 'undefined') {
|
562 |
+
pos = {};
|
563 |
+
}
|
564 |
+
|
565 |
+
pos[name] = i;
|
566 |
+
$(input).data('repeater-positions', pos);
|
567 |
+
});
|
568 |
+
});
|
569 |
+
|
570 |
+
// Update the field names for all the input items
|
571 |
+
$$.find('.siteorigin-widget-input').each( function ( i, input ) {
|
572 |
+
var $in = $( input );
|
573 |
+
var pos = $in.data( 'repeater-positions' );
|
574 |
+
|
575 |
+
if ( typeof pos !== 'undefined' ) {
|
576 |
+
var newName = $in.attr( 'data-original-name' );
|
577 |
+
|
578 |
+
if ( !newName ) {
|
579 |
+
$in.attr( 'data-original-name', $in.attr( 'name' ) );
|
580 |
+
newName = $in.attr( 'name' );
|
581 |
+
}
|
582 |
+
if ( !newName ) {
|
583 |
+
return;
|
584 |
+
}
|
585 |
+
|
586 |
+
if ( pos ) {
|
587 |
+
for ( var k in pos ) {
|
588 |
+
newName = newName.replace( '#' + k + '#', pos[ k ] );
|
589 |
+
}
|
590 |
+
}
|
591 |
+
$in.attr( 'name', newName );
|
592 |
+
}
|
593 |
+
} );
|
594 |
+
|
595 |
+
if ( !$$.data( 'initialSetup' ) ) {
|
596 |
+
// Setup default checked values, now that we've updated input names.
|
597 |
+
// Without this radio inputs in repeaters will be rendered as if they all belong to the same group.
|
598 |
+
$$.find('.siteorigin-widget-input').each(function (i, input) {
|
599 |
+
var $in = $(input);
|
600 |
+
$in.prop('checked', $in.prop('defaultChecked'));
|
601 |
+
});
|
602 |
+
$$.data('initialSetup', true);
|
603 |
+
}
|
604 |
+
|
605 |
+
//Setup scrolling.
|
606 |
+
var scrollCount = $el.data('scroll-count') ? parseInt($el.data('scroll-count')) : 0;
|
607 |
+
if (scrollCount > 0 && $rptrItems.length > scrollCount) {
|
608 |
+
var itemHeight = $rptrItems.first().outerHeight();
|
609 |
+
$$.css('max-height', itemHeight * scrollCount).css('overflow', 'auto');
|
610 |
+
}
|
611 |
+
else {
|
612 |
+
//TODO: Check whether there was a value before overriding and set it back to that.
|
613 |
+
$$.css('max-height', '').css('overflow', '');
|
614 |
+
}
|
615 |
+
});
|
616 |
+
|
617 |
+
$items.sortable({
|
618 |
+
handle: '.siteorigin-widget-field-repeater-item-top',
|
619 |
+
items: '> .siteorigin-widget-field-repeater-item',
|
620 |
+
update: function () {
|
621 |
+
// Clear `name` attributes for radio inputs. They'll be reassigned on update.
|
622 |
+
// This prevents some radio inputs values being cleared during the update process.
|
623 |
+
$items.find( 'input[type="radio"].siteorigin-widget-input' ).attr( 'name', '' );
|
624 |
+
$items.trigger('updateFieldPositions');
|
625 |
+
$el.trigger( 'change' );
|
626 |
+
},
|
627 |
+
sortstop: function (event, ui) {
|
628 |
+
if ( ui.item.is( '.siteorigin-widget-field-repeater-item' ) ) {
|
629 |
+
ui.item.find( '> .siteorigin-widget-field-repeater-item-form' ).each( function () {
|
630 |
+
var $fields = $( this ).find( '> .siteorigin-widget-field' );
|
631 |
+
$fields.trigger( 'sowsetupformfield' );
|
632 |
+
} );
|
633 |
+
}
|
634 |
+
else {
|
635 |
+
var $fields = ui.item.find( '.siteorigin-widget-form' ).find( '> .siteorigin-widget-field' );
|
636 |
+
$fields.trigger( 'sowsetupformfield' );
|
637 |
+
}
|
638 |
+
$el.trigger( 'change' );
|
639 |
+
}
|
640 |
+
});
|
641 |
+
$items.trigger('updateFieldPositions');
|
642 |
+
|
643 |
+
$el.find('> .siteorigin-widget-field-repeater-add').disableSelection().click(function (e) {
|
644 |
+
e.preventDefault();
|
645 |
+
$el.closest('.siteorigin-widget-field-repeater')
|
646 |
+
.sowAddRepeaterItem()
|
647 |
+
.find('> .siteorigin-widget-field-repeater-items').slideDown('fast', function () {
|
648 |
+
$(window).resize();
|
649 |
+
});
|
650 |
+
});
|
651 |
+
|
652 |
+
$el.find('> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand').click(function (e) {
|
653 |
+
e.preventDefault();
|
654 |
+
$el.closest('.siteorigin-widget-field-repeater').find('> .siteorigin-widget-field-repeateritems-').slideToggle('fast', function () {
|
655 |
+
$(window).resize();
|
656 |
+
});
|
657 |
+
});
|
658 |
+
});
|
659 |
+
};
|
660 |
+
|
661 |
+
$.fn.sowAddRepeaterItem = function () {
|
662 |
+
return $(this).each(function (i, el) {
|
663 |
+
|
664 |
+
var $el = $(el);
|
665 |
+
var $nextIndex = $el.find('> .siteorigin-widget-field-repeater-items').children().length + 1;
|
666 |
+
|
667 |
+
// Create an object with the repeater html so we can make some changes to it.
|
668 |
+
var repeaterObject = $('<div>' + $el.find('> .siteorigin-widget-field-repeater-item-html').html() + '</div>');
|
669 |
+
repeaterObject.find('.siteorigin-widget-input[data-name]').each(function () {
|
670 |
+
var $$ = $(this);
|
671 |
+
// Skip out items that are themselves inside repeater HTML wrappers
|
672 |
+
if ($$.closest('.siteorigin-widget-field-repeater-item-html').length === 0) {
|
673 |
+
$$.attr('name', $(this).data('name'));
|
674 |
+
}
|
675 |
+
});
|
676 |
+
|
677 |
+
// Replace repeater item id placeholders with the index of the repeater item.
|
678 |
+
var repeaterHtml = '';
|
679 |
+
repeaterObject.find( '> .siteorigin-widget-field' )
|
680 |
+
.each( function ( index, element ) {
|
681 |
+
var html = element.outerHTML;
|
682 |
+
// Skip child repeaters, so they can setup their own id's when necessary.
|
683 |
+
if ( ! $( element ).is( '.siteorigin-widget-field-type-repeater' ) ) {
|
684 |
+
html = html.replace( /_id_/g, $nextIndex );
|
685 |
+
}
|
686 |
+
repeaterHtml += html;
|
687 |
+
} );
|
688 |
+
|
689 |
+
var readonly = typeof $el.attr('readonly') !== 'undefined';
|
690 |
+
var item = $('<div class="siteorigin-widget-field-repeater-item ui-draggable" />')
|
691 |
+
.append(
|
692 |
+
$('<div class="siteorigin-widget-field-repeater-item-top" />')
|
693 |
+
.append(
|
694 |
+
$('<div class="siteorigin-widget-field-expand" />')
|
695 |
+
)
|
696 |
+
.append(
|
697 |
+
readonly ? '' : $('<div class="siteorigin-widget-field-copy" />')
|
698 |
+
)
|
699 |
+
.append(
|
700 |
+
readonly ? '' : $('<div class="siteorigin-widget-field-remove" />')
|
701 |
+
)
|
702 |
+
.append($('<h4 />').html($el.data('item-name')))
|
703 |
+
)
|
704 |
+
.append(
|
705 |
+
$('<div class="siteorigin-widget-field-repeater-item-form" />')
|
706 |
+
.html(repeaterHtml)
|
707 |
+
);
|
708 |
+
|
709 |
+
// Add the item and refresh
|
710 |
+
$el.find('> .siteorigin-widget-field-repeater-items').append(item).sortable("refresh").trigger('updateFieldPositions');
|
711 |
+
item.sowSetupRepeaterItems();
|
712 |
+
item.hide().slideDown('fast', function () {
|
713 |
+
$(window).resize();
|
714 |
+
});
|
715 |
+
$el.trigger( 'change' );
|
716 |
+
});
|
717 |
+
};
|
718 |
+
|
719 |
+
$.fn.sowRemoveRepeaterItem = function () {
|
720 |
+
return $(this).each(function (i, el) {
|
721 |
+
var $itemsContainer = $(this).closest('.siteorigin-widget-field-repeater-items');
|
722 |
+
$(this).remove();
|
723 |
+
$itemsContainer.sortable("refresh").trigger('updateFieldPositions');
|
724 |
+
$( el ).trigger( 'change' );
|
725 |
+
});
|
726 |
+
};
|
727 |
+
|
728 |
+
$.fn.sowSetupRepeaterItems = function () {
|
729 |
+
return $(this).each(function (i, el) {
|
730 |
+
var $el = $(el);
|
731 |
+
|
732 |
+
if (typeof $el.data('sowrepeater-actions-setup') === 'undefined') {
|
733 |
+
var $parentRepeater = $el.closest('.siteorigin-widget-field-repeater');
|
734 |
+
var itemTop = $el.find('> .siteorigin-widget-field-repeater-item-top');
|
735 |
+
var itemLabel = $parentRepeater.data('item-label');
|
736 |
+
if (itemLabel && itemLabel.selector) {
|
737 |
+
var updateLabel = function () {
|
738 |
+
var functionName = ( itemLabel.hasOwnProperty('valueMethod') && itemLabel.valueMethod ) ? itemLabel.valueMethod : 'val';
|
739 |
+
var txt = $el.find(itemLabel.selector)[functionName]();
|
740 |
+
if (txt) {
|
741 |
+
if (txt.length > 80) {
|
742 |
+
txt = txt.substr(0, 79) + '...';
|
743 |
+
}
|
744 |
+
itemTop.find('h4').text(txt);
|
745 |
+
}
|
746 |
+
};
|
747 |
+
updateLabel();
|
748 |
+
var eventName = ( itemLabel.hasOwnProperty('updateEvent') && itemLabel.updateEvent ) ? itemLabel.updateEvent : 'change';
|
749 |
+
$el.bind(eventName, updateLabel);
|
750 |
+
}
|
751 |
+
|
752 |
+
itemTop.click(function (e) {
|
753 |
+
if (e.target.className === "siteorigin-widget-field-remove" || e.target.className === "siteorigin-widget-field-copy") {
|
754 |
+
return;
|
755 |
+
}
|
756 |
+
e.preventDefault();
|
757 |
+
$(this).closest('.siteorigin-widget-field-repeater-item').find('.siteorigin-widget-field-repeater-item-form').eq(0).slideToggle('fast', function () {
|
758 |
+
$(window).resize();
|
759 |
+
if ($(this).is(':visible')) {
|
760 |
+
$(this).trigger('slideToggleOpenComplete');
|
761 |
+
|
762 |
+
$( this ).find( '.siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field,> .siteorigin-widget-field' )
|
763 |
+
.each( function (index, element) {
|
764 |
+
var $field = $( element );
|
765 |
+
if ( $field.is( ':visible' ) ) {
|
766 |
+
$field.trigger( 'sowsetupformfield' );
|
767 |
+
}
|
768 |
+
|
769 |
+
} );
|
770 |
+
}
|
771 |
+
else {
|
772 |
+
$(this).trigger('slideToggleCloseComplete');
|
773 |
+
}
|
774 |
+
});
|
775 |
+
});
|
776 |
+
|
777 |
+
itemTop.find('.siteorigin-widget-field-remove').click(function (e, params) {
|
778 |
+
e.preventDefault();
|
779 |
+
var $s = $( this ).closest( '.siteorigin-widget-field-repeater-items' );
|
780 |
+
var $item = $( this ).closest( '.siteorigin-widget-field-repeater-item' );
|
781 |
+
var removeItem = function () {
|
782 |
+
$item.remove();
|
783 |
+
$s.sortable( "refresh" ).trigger( 'updateFieldPositions' );
|
784 |
+
$( window ).resize();
|
785 |
+
};
|
786 |
+
if ( params && params.silent ) {
|
787 |
+
removeItem();
|
788 |
+
} else if ( confirm( soWidgets.sure ) ) {
|
789 |
+
$item.slideUp('fast', removeItem );
|
790 |
+
}
|
791 |
+
$el.trigger( 'change' );
|
792 |
+
});
|
793 |
+
itemTop.find('.siteorigin-widget-field-copy').click(function (e) {
|
794 |
+
e.preventDefault();
|
795 |
+
var $form = $(this).closest('.siteorigin-widget-form-main');
|
796 |
+
var $item = $(this).closest('.siteorigin-widget-field-repeater-item');
|
797 |
+
var $copyItem = $item.clone();
|
798 |
+
var $items = $item.closest('.siteorigin-widget-field-repeater-items');
|
799 |
+
//var $nextIndex = $item.index()+1;
|
800 |
+
var $nextIndex = $items.children().length;
|
801 |
+
var newIds = {};
|
802 |
+
|
803 |
+
$copyItem.find('*[name]').each(function () {
|
804 |
+
var $inputElement = $(this);
|
805 |
+
var id = $inputElement.attr('id');
|
806 |
+
var nm = $inputElement.attr('name');
|
807 |
+
// TinyMCE field :/
|
808 |
+
if ($inputElement.is('textarea') && $inputElement.parent().is('.wp-editor-container') && typeof tinymce != 'undefined') {
|
809 |
+
$inputElement.parent().empty().append($inputElement);
|
810 |
+
$inputElement.css('display', '');
|
811 |
+
var curEd = tinymce.get(id);
|
812 |
+
if (curEd) {
|
813 |
+
$inputElement.val(curEd.getContent());
|
814 |
+
}
|
815 |
+
}
|
816 |
+
// Color field :/
|
817 |
+
else if ($inputElement.is('.wp-color-picker')) {
|
818 |
+
var $wpPickerContainer = $inputElement.closest('.wp-picker-container');
|
819 |
+
var $soWidgetField = $inputElement.closest('.siteorigin-widget-field');
|
820 |
+
$wpPickerContainer.remove();
|
821 |
+
$soWidgetField.append($inputElement.remove());
|
822 |
+
}
|
823 |
+
else {
|
824 |
+
var $originalInput = id ? $item.find( '#' + id ) : $item.find('[name="' + nm + '"]');
|
825 |
+
if ($originalInput.length && $originalInput.val() != null) {
|
826 |
+
$inputElement.val($originalInput.val());
|
827 |
+
}
|
828 |
+
}
|
829 |
+
if (id) {
|
830 |
+
var idRegExp;
|
831 |
+
var idBase;
|
832 |
+
var newId;
|
833 |
+
|
834 |
+
// Radio inputs are slightly different because there are multiple `input` elements for
|
835 |
+
// a single field, i.e. multiple `inputs` for selecting a single value.
|
836 |
+
if ($inputElement.is('[type="radio"]')) {
|
837 |
+
// Radio inputs have their position appended to the id.
|
838 |
+
idBase = id.replace(/-\d+-\d+$/, '');
|
839 |
+
var radioIdBase = id.replace(/-\d+$/, '');
|
840 |
+
if (!newIds[idBase]) {
|
841 |
+
var radioNames = {};
|
842 |
+
newIds[idBase] = $form
|
843 |
+
// find all inputs containing idBase in their id attribute
|
844 |
+
.find('.siteorigin-widget-input[id^=' + idBase + ']')
|
845 |
+
// exclude inputs from templates
|
846 |
+
.not('[id*=_id_]')
|
847 |
+
// reduce to one element per radio input group.
|
848 |
+
.filter(function (index, element) {
|
849 |
+
var eltName = $(element).attr('name');
|
850 |
+
if (radioNames[eltName]) {
|
851 |
+
return false;
|
852 |
+
} else {
|
853 |
+
radioNames[eltName] = true;
|
854 |
+
return true;
|
855 |
+
}
|
856 |
+
}).length + 1;
|
857 |
+
}
|
858 |
+
var newRadioIdBase = idBase + '-' + newIds[idBase];
|
859 |
+
newId = newRadioIdBase + id.match(/-\d+$/)[0];
|
860 |
+
$copyItem.find('label[for=' + radioIdBase + ']').attr('for', newRadioIdBase);
|
861 |
+
} else {
|
862 |
+
idRegExp = new RegExp('-\\d+$');
|
863 |
+
idBase = id.replace(idRegExp, '');
|
864 |
+
if (!newIds[idBase]) {
|
865 |
+
newIds[idBase] = $form.find('.siteorigin-widget-input[id^=' + idBase + ']').not('[id*=_id_]').length + 1;
|
866 |
+
}
|
867 |
+
newId = idBase + '-' + newIds[idBase]++;
|
868 |
+
}
|
869 |
+
|
870 |
+
$inputElement.attr('id', newId);
|
871 |
+
if ( $inputElement.is( '.wp-editor-area' ) ) {
|
872 |
+
var tmceContainer = $inputElement.closest( '.siteorigin-widget-tinymce-container' );
|
873 |
+
var mediaButtons = tmceContainer.data( 'media-buttons' );
|
874 |
+
if ( mediaButtons && mediaButtons.html ) {
|
875 |
+
var idRegExp = new RegExp( id, 'g');
|
876 |
+
mediaButtons.html = mediaButtons.html.replace( idRegExp, newId );
|
877 |
+
tmceContainer.data( 'media-buttons', mediaButtons );
|
878 |
+
}
|
879 |
+
}
|
880 |
+
$copyItem.find('label[for=' + id + ']').attr('for', newId);
|
881 |
+
$copyItem.find('[id*=' + id + ']').each(function () {
|
882 |
+
var oldIdAttr = $(this).attr('id');
|
883 |
+
var newIdAttr = oldIdAttr.replace(id, newId);
|
884 |
+
$(this).attr('id', newIdAttr);
|
885 |
+
});
|
886 |
+
if (typeof tinymce !== 'undefined' && tinymce.get(newId)) {
|
887 |
+
tinymce.get(newId).remove();
|
888 |
+
}
|
889 |
+
}
|
890 |
+
var nestLevel = $item.parents('.siteorigin-widget-field-repeater').length;
|
891 |
+
var $body = $('body');
|
892 |
+
if (($body.hasClass('wp-customizer') || $body.hasClass('widgets-php')) && $el.closest('.panel-dialog').length === 0) {
|
893 |
+
nestLevel += 1;
|
894 |
+
}
|
895 |
+
var newName = nm.replace(new RegExp('((?:.*?\\[\\d+\\]){' + (nestLevel - 1).toString() + '})?(.*?\\[)\\d+(\\])'), '$1$2' + $nextIndex.toString() + '$3');
|
896 |
+
$inputElement.attr('name', newName);
|
897 |
+
$inputElement.data('original-name', newName);
|
898 |
+
});
|
899 |
+
|
900 |
+
//$item.after($copyItem);
|
901 |
+
//$items.sortable( "refresh").trigger('updateFieldPositions');
|
902 |
+
$items.append($copyItem).sortable("refresh").trigger('updateFieldPositions');
|
903 |
+
$copyItem.sowSetupRepeaterItems();
|
904 |
+
$copyItem.hide().slideDown('fast', function () {
|
905 |
+
$(window).resize();
|
906 |
+
});
|
907 |
+
$el.trigger( 'change' );
|
908 |
+
});
|
909 |
+
|
910 |
+
$el.find('> .siteorigin-widget-field-repeater-item-form').sowSetupForm();
|
911 |
+
|
912 |
+
$el.data('sowrepeater-actions-setup', true);
|
913 |
+
}
|
914 |
+
});
|
915 |
+
};
|
916 |
+
|
917 |
+
// Widgets Bundle utility functions
|
918 |
+
/**
|
919 |
+
* Get the unique index of a repeated item. Could be in a repeater or if multiple widget fields with the same
|
920 |
+
* widget class.
|
921 |
+
*
|
922 |
+
* @param $el
|
923 |
+
* @param containerType
|
924 |
+
* @param containerClass
|
925 |
+
* @return {*}
|
926 |
+
*/
|
927 |
+
sowbForms.getContainerFieldId = function ( $el, containerType, containerClass ) {
|
928 |
+
var fieldIdPropName = containerType + 'FieldId';
|
929 |
+
if ( ! this.hasOwnProperty( fieldIdPropName ) ) {
|
930 |
+
this[ fieldIdPropName ] = 1;
|
931 |
+
}
|
932 |
+
|
933 |
+
var $field = $el.closest( containerClass );
|
934 |
+
if ( $field.length ) {
|
935 |
+
var fieldId = $field.data( 'field-id' );
|
936 |
+
if ( fieldId === undefined ) {
|
937 |
+
fieldId = this[ fieldIdPropName ]++;
|
938 |
+
}
|
939 |
+
$field.data( 'field-id', fieldId );
|
940 |
+
|
941 |
+
return fieldId;
|
942 |
+
}
|
943 |
+
else {
|
944 |
+
return false;
|
945 |
+
}
|
946 |
+
};
|
947 |
+
|
948 |
+
/**
|
949 |
+
* Retrieve a variable for a field with the given identifier, elementName.
|
950 |
+
*
|
951 |
+
* @return {*}
|
952 |
+
* @param widgetClass The class name of the widget for which to retrieve a variable.
|
953 |
+
* @param elementName The name of the field for which to retrieve a variable.
|
954 |
+
* @param key The name of the variable to retrieve.
|
955 |
+
*/
|
956 |
+
sowbForms.getWidgetFieldVariable = function (widgetClass, elementName, key) {
|
957 |
+
var widgetVars = window.sow_field_javascript_variables[widgetClass];
|
958 |
+
// Get rid of any index placeholders
|
959 |
+
elementName = elementName.replace(/\[#.*?#\]/g, '');
|
960 |
+
var variablePath = /[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(elementName)[1];
|
961 |
+
var variablePathParts = variablePath.split('][');
|
962 |
+
var elementVars = variablePathParts.length ? widgetVars : null;
|
963 |
+
while (variablePathParts.length) {
|
964 |
+
elementVars = elementVars[variablePathParts.shift()];
|
965 |
+
}
|
966 |
+
return elementVars[key];
|
967 |
+
};
|
968 |
+
|
969 |
+
sowbForms.fetchWidgetVariable = function (key, widget, callback) {
|
970 |
+
window.sowVars = window.sowVars || {};
|
971 |
+
|
972 |
+
if (typeof window.sowVars[widget] === 'undefined') {
|
973 |
+
$.post(
|
974 |
+
soWidgets.ajaxurl,
|
975 |
+
{'action': 'sow_get_javascript_variables', 'widget': widget, 'key': key},
|
976 |
+
function (result) {
|
977 |
+
window.sowVars[widget] = result;
|
978 |
+
callback(window.sowVars[widget][key]);
|
979 |
+
}
|
980 |
+
);
|
981 |
+
}
|
982 |
+
else {
|
983 |
+
callback(window.sowVars[widget][key]);
|
984 |
+
}
|
985 |
+
};
|
986 |
+
|
987 |
+
sowbForms.getWidgetIdBase = function ( formContainer ) {
|
988 |
+
return formContainer.data( 'id-base' );
|
989 |
+
};
|
990 |
+
|
991 |
+
sowbForms.getWidgetFormValues = function ( formContainer ) {
|
992 |
+
|
993 |
+
if ( _.isUndefined( formContainer ) ) {
|
994 |
+
return null;
|
995 |
+
}
|
996 |
+
|
997 |
+
var data = {};
|
998 |
+
|
999 |
+
formContainer.find('*[name]').each(function () {
|
1000 |
+
var $$ = $(this);
|
1001 |
+
|
1002 |
+
try {
|
1003 |
+
var name = /[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec( $$.attr( 'name' ) );
|
1004 |
+
|
1005 |
+
if ( _.isEmpty( name ) ) {
|
1006 |
+
return true;
|
1007 |
+
}
|
1008 |
+
|
1009 |
+
// Create an array with the parts of the name
|
1010 |
+
name = name[1];
|
1011 |
+
var parts = name.split( '][' );
|
1012 |
+
|
1013 |
+
// Make sure we either have numbers or strings
|
1014 |
+
parts = parts.map( function ( e ) {
|
1015 |
+
if ( ! isNaN( parseFloat( e ) ) && isFinite( e ) ) {
|
1016 |
+
return parseInt( e );
|
1017 |
+
}
|
1018 |
+
else {
|
1019 |
+
return e;
|
1020 |
+
}
|
1021 |
+
} );
|
1022 |
+
|
1023 |
+
var sub = data;
|
1024 |
+
var fieldValue = null;
|
1025 |
+
|
1026 |
+
var fieldType = _.isString( $$.attr( 'type' ) ) ? $$.attr( 'type' ).toLowerCase() : null;
|
1027 |
+
|
1028 |
+
if ( fieldType === 'checkbox' ) {
|
1029 |
+
if ( $$.is( ':checked' ) ) {
|
1030 |
+
fieldValue = $$.val() !== '' ? $$.val() : true;
|
1031 |
+
} else {
|
1032 |
+
fieldValue = false;
|
1033 |
+
}
|
1034 |
+
} else if ( fieldType === 'radio' ) {
|
1035 |
+
if ( $$.is( ':checked' ) ) {
|
1036 |
+
fieldValue = $$.val();
|
1037 |
+
} else {
|
1038 |
+
return;
|
1039 |
+
}
|
1040 |
+
} else if ( $$.prop( 'tagName' ) === 'TEXTAREA' && $$.hasClass( 'wp-editor-area' ) ) {
|
1041 |
+
// This is a TinyMCE editor, so we'll use the tinyMCE object to get the content
|
1042 |
+
var editor = null;
|
1043 |
+
if ( typeof tinyMCE !== 'undefined' ) {
|
1044 |
+
editor = tinyMCE.get( $$.attr( 'id' ) );
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
if ( editor !== null && typeof( editor.getContent ) === "function" && !editor.isHidden() ) {
|
1048 |
+
fieldValue = editor.getContent();
|
1049 |
+
}
|
1050 |
+
else {
|
1051 |
+
fieldValue = $$.val();
|
1052 |
+
}
|
1053 |
+
} else if ( $$.prop( 'tagName' ) === 'SELECT' ) {
|
1054 |
+
var selected = $$.find( 'option:selected' );
|
1055 |
+
if ( selected.length === 1 ) {
|
1056 |
+
fieldValue = $$.find( 'option:selected' ).val();
|
1057 |
+
}
|
1058 |
+
else if ( selected.length > 1 ) {
|
1059 |
+
// This is a mutli-select field
|
1060 |
+
fieldValue = _.map( $$.find( 'option:selected' ), function ( n, i ) {
|
1061 |
+
return $( n ).val();
|
1062 |
+
} );
|
1063 |
+
}
|
1064 |
+
} else {
|
1065 |
+
fieldValue = $$.val();
|
1066 |
+
}
|
1067 |
+
for ( var i = 0; i < parts.length; i++ ) {
|
1068 |
+
if ( i === parts.length - 1 ) {
|
1069 |
+
if ( parts[i] === '' ) {
|
1070 |
+
// This needs to be an array
|
1071 |
+
sub.push( fieldValue );
|
1072 |
+
} else {
|
1073 |
+
sub[ parts[ i ] ] = fieldValue;
|
1074 |
+
}
|
1075 |
+
}
|
1076 |
+
else {
|
1077 |
+
if ( _.isUndefined( sub[ parts[ i ] ] ) ) {
|
1078 |
+
// We assume that a numeric key means it's an array. (or empty string??)
|
1079 |
+
if ( _.isNumber( parts[ i + 1 ] ) || parts[ i + 1 ] === '' ) {
|
1080 |
+
sub[ parts[ i ] ] = [];
|
1081 |
+
} else {
|
1082 |
+
sub[ parts[ i ] ] = {};
|
1083 |
+
}
|
1084 |
+
}
|
1085 |
+
// Go deeper into the data and continue
|
1086 |
+
sub = sub[ parts[ i ] ];
|
1087 |
+
}
|
1088 |
+
}
|
1089 |
+
} catch ( error ) {
|
1090 |
+
console.error( 'Field [' + $$.attr( 'name' ) + '] could not be processed and was skipped - ' + error.message );
|
1091 |
+
}
|
1092 |
+
});
|
1093 |
+
return data;
|
1094 |
+
};
|
1095 |
+
|
1096 |
+
|
1097 |
+
/**
|
1098 |
+
* Sets all the widget form fields in the given container with the given data values.
|
1099 |
+
*
|
1100 |
+
* @param formContainer The jQuery element containing the widget form fields.
|
1101 |
+
* @param data The data from which to set the widget form field values.
|
1102 |
+
* @param skipMissingValues If `true`, this will skip form fields for which the data values are missing.
|
1103 |
+
* If `false`, the form fields will be cleared. Default is `false`.
|
1104 |
+
* @param triggerChange If `true`, trigger a 'change' event on each element after it's value is set. Default is `true`.
|
1105 |
+
*/
|
1106 |
+
sowbForms.setWidgetFormValues = function (formContainer, data, skipMissingValues, triggerChange) {
|
1107 |
+
skipMissingValues = skipMissingValues || false;
|
1108 |
+
triggerChange = (typeof triggerChange !== 'undefined' && triggerChange) || typeof triggerChange === 'undefined';
|
1109 |
+
// First check if this form has any repeaters.
|
1110 |
+
var depth = 0;
|
1111 |
+
var updateRepeaterChildren = function ( formParent, formData ) {
|
1112 |
+
if ( ++depth === 10 ) {
|
1113 |
+
--depth;
|
1114 |
+
return;
|
1115 |
+
}
|
1116 |
+
// Only direct child fields which are repeaters.
|
1117 |
+
formParent.find( '> .siteorigin-widget-field-type-repeater,> .siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field-type-repeater' )
|
1118 |
+
.each( function ( index, element ) {
|
1119 |
+
var $this = $( this );
|
1120 |
+
var $repeater = $this.find( '> .siteorigin-widget-field-repeater' );
|
1121 |
+
var repeaterName = $repeater.data( 'repeaterName' );
|
1122 |
+
var repeaterData = formData.hasOwnProperty( repeaterName ) ? formData[ repeaterName ] : null;
|
1123 |
+
var isInSection = $this.parent().is( '.siteorigin-widget-section' );
|
1124 |
+
if ( isInSection ) {
|
1125 |
+
var elementName = $repeater.data( 'element-name' );
|
1126 |
+
// Get rid of any index placeholders
|
1127 |
+
elementName = elementName.replace(/\[#.*?#\]/g, '');
|
1128 |
+
var variablePath = /[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(elementName)[1];
|
1129 |
+
var variablePathParts = variablePath.split('][');
|
1130 |
+
var elementVars = variablePathParts.length ? formData : null;
|
1131 |
+
while (variablePathParts.length) {
|
1132 |
+
var key = variablePathParts.shift();
|
1133 |
+
elementVars = elementVars.hasOwnProperty( key ) ? elementVars[ key ] : elementVars;
|
1134 |
+
}
|
1135 |
+
repeaterData = elementVars;
|
1136 |
+
}
|
1137 |
+
|
1138 |
+
if ( ! repeaterData || ! Array.isArray( repeaterData ) ) {
|
1139 |
+
return;
|
1140 |
+
}
|
1141 |
+
// Check that the number of child items matches the number of data items.
|
1142 |
+
var repeaterChildren = $repeater.find( '> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item' );
|
1143 |
+
var numItems = repeaterData.length;
|
1144 |
+
var numChildren = repeaterChildren.length;
|
1145 |
+
if ( numItems > numChildren ) {
|
1146 |
+
// If data items > child items, create extra child items.
|
1147 |
+
for ( var i = 0; i < numItems - numChildren; i++) {
|
1148 |
+
$repeater.find( '> .siteorigin-widget-field-repeater-add' ).click();
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
} else if ( ! skipMissingValues && numItems < numChildren ) {
|
1152 |
+
// If child items > data items, remove extra child items.
|
1153 |
+
for ( var j = numItems; j < numChildren; j++) {
|
1154 |
+
var $child = $( repeaterChildren.eq( j ) );
|
1155 |
+
$child.find( '> .siteorigin-widget-field-repeater-item-top' )
|
1156 |
+
.find( '.siteorigin-widget-field-remove' )
|
1157 |
+
.trigger( 'click', { silent: true } );
|
1158 |
+
}
|
1159 |
+
}
|
1160 |
+
repeaterChildren = $repeater.find( '> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item' );
|
1161 |
+
for ( var k = 0; k < repeaterChildren.length; k++ ) {
|
1162 |
+
repeaterChildren.eq( k ).find( '> .siteorigin-widget-field-repeater-item-form' );
|
1163 |
+
updateRepeaterChildren(
|
1164 |
+
repeaterChildren.eq( k ).find( '> .siteorigin-widget-field-repeater-item-form' ),
|
1165 |
+
repeaterData[ k ]
|
1166 |
+
);
|
1167 |
+
}
|
1168 |
+
} );
|
1169 |
+
--depth;
|
1170 |
+
};
|
1171 |
+
|
1172 |
+
updateRepeaterChildren(formContainer, data);
|
1173 |
+
|
1174 |
+
formContainer.find('*[name]').each(function () {
|
1175 |
+
var $$ = $(this);
|
1176 |
+
var name = /[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec($$.attr('name'));
|
1177 |
+
|
1178 |
+
if ( name === undefined || name === null ) {
|
1179 |
+
return true;
|
1180 |
+
}
|
1181 |
+
|
1182 |
+
name = name[1];
|
1183 |
+
var parts = name.split('][');
|
1184 |
+
|
1185 |
+
// Make sure we either have numbers or strings
|
1186 |
+
parts = parts.map( function ( e ) {
|
1187 |
+
if ( !isNaN( parseFloat( e ) ) && isFinite( e ) ) {
|
1188 |
+
return parseInt( e );
|
1189 |
+
} else {
|
1190 |
+
return e;
|
1191 |
+
}
|
1192 |
+
} );
|
1193 |
+
|
1194 |
+
var sub = data;
|
1195 |
+
var value;
|
1196 |
+
for (var i = 0; i < parts.length; i++) {
|
1197 |
+
// If the field is missing from the data, just leave `value` as `undefined`.
|
1198 |
+
if ( ! sub.hasOwnProperty( parts[ i ] ) ) {
|
1199 |
+
if ( skipMissingValues ) {
|
1200 |
+
return true;
|
1201 |
+
} else {
|
1202 |
+
break;
|
1203 |
+
}
|
1204 |
+
}
|
1205 |
+
if (i === parts.length - 1) {
|
1206 |
+
value = sub[ parts[ i ] ];
|
1207 |
+
} else {
|
1208 |
+
sub = sub[ parts[ i ] ];
|
1209 |
+
}
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
// This is the end, so we need to set the value on the field here.
|
1213 |
+
if ( $$.attr( 'type' ) === 'checkbox' ) {
|
1214 |
+
$$.prop( 'checked', value );
|
1215 |
+
} else if ( $$.attr( 'type' ) === 'radio' ) {
|
1216 |
+
$$.prop( 'checked', value === $$.val() );
|
1217 |
+
} else if ( $$.prop( 'tagName' ) === 'TEXTAREA' && $$.hasClass( 'wp-editor-area' ) ) {
|
1218 |
+
// This is a TinyMCE editor, so we'll use the tinyMCE object to get the content
|
1219 |
+
var editor = null;
|
1220 |
+
if ( typeof tinyMCE !== 'undefined' ) {
|
1221 |
+
editor = tinyMCE.get( $$.attr( 'id' ) );
|
1222 |
+
}
|
1223 |
+
|
1224 |
+
if ( editor !== null && typeof( editor.setContent ) === "function" && ! editor.isHidden() && $$.parent().is( ':visible' ) ) {
|
1225 |
+
if ( editor.initialized ) {
|
1226 |
+
editor.setContent( value );
|
1227 |
+
} else {
|
1228 |
+
editor.on('init', function () {
|
1229 |
+
editor.setContent( value );
|
1230 |
+
});
|
1231 |
+
}
|
1232 |
+
}
|
1233 |
+
else {
|
1234 |
+
$$.val( value );
|
1235 |
+
}
|
1236 |
+
} else if ( $$.is( '.panels-data' ) ) {
|
1237 |
+
$$.val( value );
|
1238 |
+
var builder = $$.data( 'builder' );
|
1239 |
+
if ( builder ) {
|
1240 |
+
builder.setDataField( $$ );
|
1241 |
+
}
|
1242 |
+
} else {
|
1243 |
+
$$.val( value );
|
1244 |
+
}
|
1245 |
+
|
1246 |
+
if ( triggerChange ) {
|
1247 |
+
$$.trigger( 'change' );
|
1248 |
+
}
|
1249 |
+
});
|
1250 |
+
};
|
1251 |
+
|
1252 |
+
|
1253 |
+
/**
|
1254 |
+
* Displays an informational notice either at the top of the supplied container, or above the optionally supplied
|
1255 |
+
* element.
|
1256 |
+
*
|
1257 |
+
* @param $container The jQuery container in which the notice will be prepended.
|
1258 |
+
* @param title The string title for the notice.
|
1259 |
+
* @param message The string detail message for the notice.
|
1260 |
+
* @param buttons An array of buttons which will be display along with the notice.
|
1261 |
+
* @param $element The optional jQuery element before which the notice will be inserted. If this is supplied it
|
1262 |
+
* will take precedence over the $container argument.
|
1263 |
+
*
|
1264 |
+
*/
|
1265 |
+
sowbForms.displayNotice = function ( $container, title, message, buttons, $element ) {
|
1266 |
+
|
1267 |
+
var $notice = $( '<div class="siteorigin-widget-form-notification"></div>' );
|
1268 |
+
if ( title ) {
|
1269 |
+
$notice.append( '<span>' + title + '</span>' );
|
1270 |
+
}
|
1271 |
+
|
1272 |
+
if ( buttons && buttons.length ) {
|
1273 |
+
buttons.forEach( function ( button ) {
|
1274 |
+
var buttonClasses = '';
|
1275 |
+
if ( button.classes && button.classes.length ) {
|
1276 |
+
buttonClasses = ' ' + button.classes.join( ' ' );
|
1277 |
+
}
|
1278 |
+
var $button = $( '<a class="button button-small' + buttonClasses + '">' + button.label + '</a>' );
|
1279 |
+
|
1280 |
+
if ( button.url ) {
|
1281 |
+
$button.attr( 'href', button.url );
|
1282 |
+
}
|
1283 |
+
if ( button.callback ) {
|
1284 |
+
$button.on( 'click', function () {
|
1285 |
+
button.callback( $notice );
|
1286 |
+
});
|
1287 |
+
}
|
1288 |
+
|
1289 |
+
$notice.append( $button );
|
1290 |
+
} );
|
1291 |
+
}
|
1292 |
+
if ( message ) {
|
1293 |
+
$notice.append( '<div><small>' + message + '</small></div>' );
|
1294 |
+
}
|
1295 |
+
|
1296 |
+
if ( $element ) {
|
1297 |
+
$element.before( $notice );
|
1298 |
+
} else {
|
1299 |
+
$container.prepend( $notice );
|
1300 |
+
}
|
1301 |
+
};
|
1302 |
+
|
1303 |
+
// When we click on a widget top
|
1304 |
+
$('.widgets-holder-wrap').on('click', '.widget:has(.siteorigin-widget-form-main) .widget-top', function () {
|
1305 |
+
var $$ = $(this).closest('.widget').find('.siteorigin-widget-form-main');
|
1306 |
+
setTimeout(function () {
|
1307 |
+
$$.sowSetupForm();
|
1308 |
+
}, 200);
|
1309 |
+
});
|
1310 |
+
var $body = $( 'body' );
|
1311 |
+
if ( $body.hasClass('wp-customizer') ) {
|
1312 |
+
// Setup new widgets when they're added in the customizer interface
|
1313 |
+
$(document).on('widget-added', function (e, widget) {
|
1314 |
+
widget.find('.siteorigin-widget-form').sowSetupForm();
|
1315 |
+
});
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
if ( $body.hasClass('block-editor-page') ) {
|
1319 |
+
// Setup new widgets when they're previewed in the block editor.
|
1320 |
+
$(document).on('panels_setup_preview', function () {
|
1321 |
+
$( sowb ).trigger( 'setup_widgets', { preview: true } );
|
1322 |
+
});
|
1323 |
+
}
|
1324 |
+
|
1325 |
+
$( document ).on( 'open_dialog', function ( e, dialog ) {
|
1326 |
+
// When we open a Page Builder edit widget dialog
|
1327 |
+
if ( dialog.$el.find( '.so-panels-dialog' ).is( '.so-panels-dialog-edit-widget' ) ) {
|
1328 |
+
var $fields = dialog.$el.find( '.siteorigin-widget-form-main' ).find( '> .siteorigin-widget-field' );
|
1329 |
+
$fields.trigger( 'sowsetupformfield' );
|
1330 |
+
}
|
1331 |
+
});
|
1332 |
+
|
1333 |
+
$(function () {
|
1334 |
+
$(document).trigger('sowadminloaded');
|
1335 |
+
});
|
1336 |
+
|
1337 |
+
})(jQuery);
|
1338 |
+
|
1339 |
+
var sowEmitters = {
|
1340 |
+
|
1341 |
+
/**
|
1342 |
+
* Find the group/state and an extra match part.
|
1343 |
+
*
|
1344 |
+
* @param arg
|
1345 |
+
* @param matchPart
|
1346 |
+
* @return {*}
|
1347 |
+
*/
|
1348 |
+
'_match': function (arg, matchPart) {
|
1349 |
+
if (typeof matchPart === 'undefined') {
|
1350 |
+
matchPart = '.*';
|
1351 |
+
}
|
1352 |
+
|
1353 |
+
// Create the regular expression to match the group/state and extra match
|
1354 |
+
var exp = new RegExp('^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *(' + matchPart + ') *$');
|
1355 |
+
var m = exp.exec(arg);
|
1356 |
+
|
1357 |
+
if (m === null) {
|
1358 |
+
return false;
|
1359 |
+
}
|
1360 |
+
|
1361 |
+
var state = '';
|
1362 |
+
var group = 'default';
|
1363 |
+
|
1364 |
+
if (m[3] !== undefined) {
|
1365 |
+
group = m[1];
|
1366 |
+
state = m[3];
|
1367 |
+
}
|
1368 |
+
else {
|
1369 |
+
state = m[1];
|
1370 |
+
}
|
1371 |
+
|
1372 |
+
return {
|
1373 |
+
'match': m[4].trim(),
|
1374 |
+
'group': group,
|
1375 |
+
'state': state
|
1376 |
+
};
|
1377 |
+
},
|
1378 |
+
|
1379 |
+
'_checker': function (val, args, matchPart, callback) {
|
1380 |
+
var returnStates = {};
|
1381 |
+
if (typeof args.length === 'undefined') {
|
1382 |
+
args = [args];
|
1383 |
+
}
|
1384 |
+
|
1385 |
+
var m;
|
1386 |
+
for (var i = 0; i < args.length; i++) {
|
1387 |
+
m = sowEmitters._match(args[i], matchPart);
|
1388 |
+
if (m === false) {
|
1389 |
+
continue;
|
1390 |
+
}
|
1391 |
+
|
1392 |
+
if (m.match === '_true' || callback(val, args, m.match)) {
|
1393 |
+
returnStates[m.group] = m.state;
|
1394 |
+
}
|
1395 |
+
}
|
1396 |
+
|
1397 |
+
return returnStates;
|
1398 |
+
},
|
1399 |
+
|
1400 |
+
/**
|
1401 |
+
* A very simple state emitter that simply sets the given group the value
|
1402 |
+
*
|
1403 |
+
*
|
1404 |
+
* @param val
|
1405 |
+
* @param args
|
1406 |
+
* @returns {{}}
|
1407 |
+
*/
|
1408 |
+
'select': function (val, args) {
|
1409 |
+
if (typeof args.length === 'undefined') {
|
1410 |
+
args = [args];
|
1411 |
+
}
|
1412 |
+
|
1413 |
+
var returnGroups = {};
|
1414 |
+
for (var i = 0; i < args.length; i++) {
|
1415 |
+
if (args[i] === '') {
|
1416 |
+
args[i] = 'default';
|
1417 |
+
}
|
1418 |
+
returnGroups[args[i]] = val;
|
1419 |
+
}
|
1420 |
+
|
1421 |
+
return returnGroups;
|
1422 |
+
},
|
1423 |
+
|
1424 |
+
/**
|
1425 |
+
* The conditional state emitter uses eval to check a given conditional argument.
|
1426 |
+
*
|
1427 |
+
* @param val
|
1428 |
+
* @param args
|
1429 |
+
* @return {{}}
|
1430 |
+
*/
|
1431 |
+
'conditional': function (val, args) {
|
1432 |
+
return sowEmitters._checker(val, args, '[^;{}]*', function (val, args, match) {
|
1433 |
+
return eval(match);
|
1434 |
+
});
|
1435 |
+
},
|
1436 |
+
|
1437 |
+
/**
|
1438 |
+
* The in state emitter checks if the value is in an array of functions
|
1439 |
+
*
|
1440 |
+
* @param val
|
1441 |
+
* @param args
|
1442 |
+
* @return {{}}
|
1443 |
+
*/
|
1444 |
+
'in': function (val, args) {
|
1445 |
+
return sowEmitters._checker(val, args, '[^;{}]*', function (val, args, match) {
|
1446 |
+
return match.split(',').map(function (s) {
|
1447 |
+
return s.trim();
|
1448 |
+
}).indexOf(val) !== -1;
|
1449 |
+
});
|
1450 |
+
}
|
1451 |
+
};
|
1452 |
+
|
1453 |
+
window.sowbForms = sowbForms;
|
base/js/meta-box-manager.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
/* globals jQuery, sowbForms */
|
2 |
-
|
3 |
-
//Catch Update button click and transform widgets post meta data before event is propagated.
|
4 |
-
(function ($) {
|
5 |
-
$('#post').on( 'submit',
|
6 |
-
function ( event ) {
|
7 |
-
var $el = $( '#siteorigin-widgets-meta-box' );
|
8 |
-
var data = sowbForms.getWidgetFormValues( $el );
|
9 |
-
|
10 |
-
$el.find( 'input[name="widget_post_meta"]' ).val( JSON.stringify( data ) );
|
11 |
-
}
|
12 |
-
);
|
13 |
-
})(jQuery);
|
1 |
+
/* globals jQuery, sowbForms */
|
2 |
+
|
3 |
+
//Catch Update button click and transform widgets post meta data before event is propagated.
|
4 |
+
(function ($) {
|
5 |
+
$('#post').on( 'submit',
|
6 |
+
function ( event ) {
|
7 |
+
var $el = $( '#siteorigin-widgets-meta-box' );
|
8 |
+
var data = sowbForms.getWidgetFormValues( $el );
|
9 |
+
|
10 |
+
$el.find( 'input[name="widget_post_meta"]' ).val( JSON.stringify( data ) );
|
11 |
+
}
|
12 |
+
);
|
13 |
+
})(jQuery);
|
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
@@ -1,1406 +1,1406 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SiteOrigin_Widget
|
5 |
-
*
|
6 |
-
* @author SiteOrigin <support@siteorigin.com>
|
7 |
-
*/
|
8 |
-
abstract class SiteOrigin_Widget extends WP_Widget {
|
9 |
-
protected $form_options;
|
10 |
-
protected $base_folder;
|
11 |
-
protected $field_ids;
|
12 |
-
protected $fields;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* The name of this widget class. Whatever the key for $wp_widgets_factory is.
|
16 |
-
*
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
protected $widget_class;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* @var array The array of registered frontend scripts
|
23 |
-
*/
|
24 |
-
protected $frontend_scripts = array();
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @var array The array of registered frontend styles
|
28 |
-
*/
|
29 |
-
protected $frontend_styles = array();
|
30 |
-
|
31 |
-
protected $generated_css = array();
|
32 |
-
protected $current_instance;
|
33 |
-
protected $instance_storage;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* @var int How many seconds a CSS file is valid for.
|
37 |
-
*/
|
38 |
-
static $css_expire = 604800; // 7 days
|
39 |
-
|
40 |
-
/**
|
41 |
-
* @param string $id
|
42 |
-
* @param string $name
|
43 |
-
* @param array $widget_options Optional Normal WP_Widget widget options and a few extras.
|
44 |
-
* - help: A URL which, if present, causes a help link to be displayed on the Edit Widget modal.
|
45 |
-
* - instance_storage: Whether or not to temporarily store instances of this widget.
|
46 |
-
* - has_preview: Whether or not this widget has a preview to display. If false, the form does not output a
|
47 |
-
* 'Preview' button.
|
48 |
-
* @param array $control_options Optional Normal WP_Widget control options.
|
49 |
-
* @param array $form_options Optional An array describing the form fields used to configure SiteOrigin widgets.
|
50 |
-
* @param mixed $base_folder Optional
|
51 |
-
*
|
52 |
-
*/
|
53 |
-
function __construct($id, $name, $widget_options = array(), $control_options = array(), $form_options = array(), $base_folder = false) {
|
54 |
-
$this->form_options = $form_options;
|
55 |
-
$this->base_folder = $base_folder;
|
56 |
-
$this->field_ids = array();
|
57 |
-
$this->fields = array();
|
58 |
-
|
59 |
-
$widget_options = wp_parse_args( $widget_options, array(
|
60 |
-
'has_preview' => true,
|
61 |
-
) );
|
62 |
-
|
63 |
-
$control_options = wp_parse_args( $control_options, array(
|
64 |
-
'width' => 800,
|
65 |
-
) );
|
66 |
-
|
67 |
-
if( empty( $this->widget_class ) ) {
|
68 |
-
$this->widget_class = get_class( $this );
|
69 |
-
}
|
70 |
-
|
71 |
-
parent::__construct($id, $name, $widget_options, $control_options);
|
72 |
-
$this->initialize();
|
73 |
-
|
74 |
-
// Let other plugins do additional initializing here
|
75 |
-
do_action('siteorigin_widgets_initialize_widget_' . $this->id_base, $this);
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Initialize this widget in whatever way we need to. Run before rendering widget or form.
|
80 |
-
*/
|
81 |
-
function initialize(){
|
82 |
-
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Get the main widget form. This should be overwritten by child widgets.
|
87 |
-
*
|
88 |
-
* @return array
|
89 |
-
*/
|
90 |
-
function get_widget_form(){
|
91 |
-
return method_exists( $this, 'initialize_form' ) ? $this->initialize_form() : array();
|
92 |
-
}
|
93 |
-
|
94 |
-
private function get_cached_widget_form() {
|
95 |
-
$cache_key = $this->id_base . '_form';
|
96 |
-
$form_options = wp_cache_get( $cache_key, 'siteorigin_widgets' );
|
97 |
-
|
98 |
-
if ( empty( $form_options ) ) {
|
99 |
-
$form_options = $this->get_widget_form();
|
100 |
-
wp_cache_set( $cache_key, $form_options, 'siteorigin_widgets' );
|
101 |
-
}
|
102 |
-
|
103 |
-
return $form_options;
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Check if a child widget implements a specific form type.
|
108 |
-
*
|
109 |
-
* @param string $form_type
|
110 |
-
* @return bool
|
111 |
-
*/
|
112 |
-
function has_form( $form_type = 'widget' ){
|
113 |
-
return method_exists( $this, 'get_' . $form_type . '_form' );
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Get a specific type of form.
|
118 |
-
*
|
119 |
-
* @param $form_type
|
120 |
-
* @return array The form array, or an empty array if the form doesn't exist.
|
121 |
-
*/
|
122 |
-
function get_form( $form_type ) {
|
123 |
-
return $this->has_form( $form_type ) ? call_user_func( array( $this, 'get_' . $form_type . '_form' ) ) : array();
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Get the main form options and allow child widgets to modify that form.
|
128 |
-
*
|
129 |
-
* @param bool|SiteOrigin_Widget $parent
|
130 |
-
*
|
131 |
-
* @return mixed
|
132 |
-
*/
|
133 |
-
function form_options( $parent = false ) {
|
134 |
-
if( empty( $this->form_options ) ) {
|
135 |
-
// If the widget doesn't have form_options defined from the constructor, then it might be defining them in the get_widget_form function
|
136 |
-
$this->form_options = $this->get_cached_widget_form();
|
137 |
-
}
|
138 |
-
|
139 |
-
$form_options = $this->modify_form( $this->form_options );
|
140 |
-
if( !empty($parent) ) {
|
141 |
-
$form_options = $parent->modify_child_widget_form( $form_options, $this );
|
142 |
-
}
|
143 |
-
|
144 |
-
// Give other plugins a way to modify this form.
|
145 |
-
$form_options = apply_filters( 'siteorigin_widgets_form_options', $form_options, $this );
|
146 |
-
$form_options = apply_filters( 'siteorigin_widgets_form_options_' . $this->id_base, $form_options, $this );
|
147 |
-
return $form_options;
|
148 |
-
}
|
149 |
-
|
150 |
-
/**
|
151 |
-
* Display the widget.
|
152 |
-
*
|
153 |
-
* @param array $args
|
154 |
-
* @param array $instance
|
155 |
-
*/
|
156 |
-
public function widget( $args, $instance ) {
|
157 |
-
if( empty( $this->form_options ) ) {
|
158 |
-
$form_options = $this->get_cached_widget_form();
|
159 |
-
}
|
160 |
-
else {
|
161 |
-
$form_options = $this->modify_form( $this->form_options );
|
162 |
-
}
|
163 |
-
|
164 |
-
$instance = $this->modify_instance( $instance );
|
165 |
-
|
166 |
-
// Filter the instance
|
167 |
-
$instance = apply_filters( 'siteorigin_widgets_instance', $instance, $this );
|
168 |
-
$instance = apply_filters( 'siteorigin_widgets_instance_' . $this->id_base, $instance, $this );
|
169 |
-
|
170 |
-
$args = wp_parse_args( $args, array(
|
171 |
-
'before_widget' => '',
|
172 |
-
'after_widget' => '',
|
173 |
-
'before_title' => '',
|
174 |
-
'after_title' => '',
|
175 |
-
) );
|
176 |
-
|
177 |
-
// Add any missing default values to the instance
|
178 |
-
$instance = $this->add_defaults( $form_options, $instance );
|
179 |
-
|
180 |
-
$css_name = $this->generate_and_enqueue_instance_styles( $instance );
|
181 |
-
$this->enqueue_frontend_scripts( $instance );
|
182 |
-
|
183 |
-
$template_vars = $this->get_template_variables($instance, $args);
|
184 |
-
$template_vars = apply_filters( 'siteorigin_widgets_template_variables_' . $this->id_base, $template_vars, $instance, $args, $this );
|
185 |
-
|
186 |
-
// Storage hash allows templates to get access to
|
187 |
-
$template_vars[ 'storage_hash' ] = '';
|
188 |
-
if( !empty($this->widget_options['instance_storage']) ) {
|
189 |
-
$stored_instance = $this->modify_stored_instance($instance);
|
190 |
-
// We probably don't want panels_info
|
191 |
-
unset( $stored_instance['panels_info'] );
|
192 |
-
|
193 |
-
$template_vars[ 'storage_hash' ] = substr( md5( serialize( $stored_instance ) ), 0, 8 );
|
194 |
-
if( !empty( $stored_instance ) && !$this->is_preview( $instance ) ) {
|
195 |
-
// Store this if we have a non empty instance and are not previewing
|
196 |
-
set_transient('sow_inst[' . $this->id_base . '][' . $template_vars['storage_hash'] . ']', $stored_instance, 7*86400);
|
197 |
-
}
|
198 |
-
}
|
199 |
-
|
200 |
-
if( ! method_exists( $this, 'get_html_content' ) ) {
|
201 |
-
$template_file = siteorigin_widget_get_plugin_dir_path( $this->id_base ) . $this->get_template_dir( $instance ) . '/' . $this->get_template_name( $instance ) . '.php';
|
202 |
-
$template_file = apply_filters('siteorigin_widgets_template_file_' . $this->id_base, $template_file, $instance, $this );
|
203 |
-
$template_file = realpath($template_file);
|
204 |
-
|
205 |
-
// Don't accept non PHP files
|
206 |
-
if( substr($template_file, -4) != '.php' ) $template_file = false;
|
207 |
-
|
208 |
-
ob_start();
|
209 |
-
if( !empty($template_file) && file_exists($template_file) ) {
|
210 |
-
extract( $template_vars );
|
211 |
-
@ include $template_file;
|
212 |
-
}
|
213 |
-
$template_html = ob_get_clean();
|
214 |
-
|
215 |
-
// This is a legacy, undocumented filter.
|
216 |
-
$template_html = apply_filters( 'siteorigin_widgets_template', $template_html, $this->widget_class, $instance, $this );
|
217 |
-
$template_html = apply_filters( 'siteorigin_widgets_template_html_' . $this->id_base, $template_html, $instance, $this );
|
218 |
-
}
|
219 |
-
else {
|
220 |
-
$template_html = $this->get_html_content( $instance, $args, $template_vars, $css_name );
|
221 |
-
}
|
222 |
-
|
223 |
-
$wrapper_classes = apply_filters(
|
224 |
-
'siteorigin_widgets_wrapper_classes_' . $this->id_base,
|
225 |
-
array( 'so-widget-' . $this->id_base, 'so-widget-'.$css_name ),
|
226 |
-
$instance,
|
227 |
-
$this
|
228 |
-
);
|
229 |
-
$wrapper_classes = array_map( 'sanitize_html_class', $wrapper_classes );
|
230 |
-
|
231 |
-
$wrapper_data_string = $this->get_wrapper_data( $instance );
|
232 |
-
|
233 |
-
do_action( 'siteorigin_widgets_before_widget_' . $this->id_base, $instance, $this );
|
234 |
-
echo $args['before_widget'];
|
235 |
-
echo '<div class="' . esc_attr( implode( ' ', $wrapper_classes ) ) . '"' . $wrapper_data_string . '>';
|
236 |
-
echo $template_html;
|
237 |
-
echo '</div>';
|
238 |
-
echo $args['after_widget'];
|
239 |
-
do_action( 'siteorigin_widgets_after_widget_' . $this->id_base, $instance, $this );
|
240 |
-
|
241 |
-
if ( $this->is_preview( $instance ) ) {
|
242 |
-
// print inline styles if we're preview the widget.
|
243 |
-
siteorigin_widget_print_styles();
|
244 |
-
}
|
245 |
-
}
|
246 |
-
|
247 |
-
private function get_wrapper_data( $instance ) {
|
248 |
-
$data = apply_filters(
|
249 |
-
'siteorigin_widgets_wrapper_data_' . $this->id_base,
|
250 |
-
array(),
|
251 |
-
$instance,
|
252 |
-
$this
|
253 |
-
);
|
254 |
-
$wrapper_attr_string = '';
|
255 |
-
foreach ( $data as $name => $value ) {
|
256 |
-
$wrapper_attr_string .= ' data-' . esc_html( $name ) . '="' . esc_attr( $value ) . '"';
|
257 |
-
}
|
258 |
-
|
259 |
-
return $wrapper_attr_string;
|
260 |
-
}
|
261 |
-
|
262 |
-
/**
|
263 |
-
* Generate the CSS for this widget and display it in the appropriate way
|
264 |
-
*
|
265 |
-
* @param $instance array The instance array
|
266 |
-
*
|
267 |
-
* @return string The CSS name
|
268 |
-
*/
|
269 |
-
function generate_and_enqueue_instance_styles( $instance ) {
|
270 |
-
if( empty( $form_options ) ) {
|
271 |
-
$form_options = $this->get_cached_widget_form();
|
272 |
-
}
|
273 |
-
else {
|
274 |
-
$form_options = $this->modify_form( $this->form_options );
|
275 |
-
}
|
276 |
-
|
277 |
-
// We'll assume empty instances don't have styles
|
278 |
-
if( empty($instance) ) return;
|
279 |
-
|
280 |
-
// Make sure all the default values are in place
|
281 |
-
$instance = $this->add_defaults( $form_options, $instance );
|
282 |
-
|
283 |
-
$this->current_instance = $instance;
|
284 |
-
$style = $this->get_style_name( $instance );
|
285 |
-
|
286 |
-
$upload_dir = wp_upload_dir();
|
287 |
-
$this->clear_file_cache();
|
288 |
-
|
289 |
-
if( !empty($style) ) {
|
290 |
-
$hash = $this->get_style_hash( $instance );
|
291 |
-
$css_name = $this->id_base.'-'.$style.'-'.$hash;
|
292 |
-
|
293 |
-
//Ensure styles aren't generated and enqueued more than once.
|
294 |
-
$in_preview = $this->is_preview( $instance );
|
295 |
-
if ( ! in_array( $css_name, $this->generated_css ) || $in_preview ) {
|
296 |
-
if( $in_preview ) {
|
297 |
-
siteorigin_widget_add_inline_css( $this->get_instance_css( $instance ) );
|
298 |
-
}
|
299 |
-
else {
|
300 |
-
if( !file_exists( $upload_dir['basedir'] . '/siteorigin-widgets/' . $css_name .'.css' ) || ( defined('SITEORIGIN_WIDGETS_DEBUG') && SITEORIGIN_WIDGETS_DEBUG ) ) {
|
301 |
-
// Attempt to recreate the CSS
|
302 |
-
$this->save_css( $instance );
|
303 |
-
}
|
304 |
-
|
305 |
-
if( file_exists( $upload_dir['basedir'] . '/siteorigin-widgets/' . $css_name .'.css' ) ) {
|
306 |
-
if ( ! wp_style_is( $css_name ) ) {
|
307 |
-
wp_enqueue_style(
|
308 |
-
$css_name,
|
309 |
-
set_url_scheme($upload_dir['baseurl'] . '/siteorigin-widgets/' . $css_name .'.css')
|
310 |
-
);
|
311 |
-
}
|
312 |
-
}
|
313 |
-
else {
|
314 |
-
// Fall back to using inline CSS if we can't find the cached CSS file.
|
315 |
-
// Try get the cached value.
|
316 |
-
$css = wp_cache_get( $css_name, 'siteorigin_widgets' );
|
317 |
-
if ( empty( $css ) ) {
|
318 |
-
$css = $this->get_instance_css( $instance );
|
319 |
-
}
|
320 |
-
siteorigin_widget_add_inline_css( $css );
|
321 |
-
}
|
322 |
-
}
|
323 |
-
$this->generated_css[] = $css_name;
|
324 |
-
}
|
325 |
-
}
|
326 |
-
else {
|
327 |
-
$css_name = $this->id_base.'-base';
|
328 |
-
}
|
329 |
-
|
330 |
-
$this->current_instance = false;
|
331 |
-
return $css_name;
|
332 |
-
}
|
333 |
-
|
334 |
-
private function is_customize_preview(){
|
335 |
-
global $wp_customize;
|
336 |
-
return is_a( $wp_customize, 'WP_Customize_Manager' ) && $wp_customize->is_preview();
|
337 |
-
}
|
338 |
-
|
339 |
-
private function is_block_editor_page() {
|
340 |
-
$current_screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null;
|
341 |
-
|
342 |
-
// This is for the Gutenberg plugin.
|
343 |
-
$is_gutenberg_page = $current_screen != null &&
|
344 |
-
function_exists( 'is_gutenberg_page' ) &&
|
345 |
-
is_gutenberg_page();
|
346 |
-
// This is for WP 5 with the integrated block editor.
|
347 |
-
$is_block_editor = false;
|
348 |
-
if ( ! empty( $current_screen ) && method_exists( $current_screen, 'is_block_editor' ) ) {
|
349 |
-
$is_block_editor = $current_screen->is_block_editor();
|
350 |
-
}
|
351 |
-
|
352 |
-
return $is_block_editor || $is_gutenberg_page;
|
353 |
-
}
|
354 |
-
|
355 |
-
/**
|
356 |
-
* Get an array of variables to make available to templates. By default, just return an array. Should be overwritten by child widgets.
|
357 |
-
*
|
358 |
-
* @param $instance
|
359 |
-
* @param $args
|
360 |
-
*
|
361 |
-
* @return array
|
362 |
-
*/
|
363 |
-
public function get_template_variables( $instance, $args ){
|
364 |
-
return array();
|
365 |
-
}
|
366 |
-
|
367 |
-
/**
|
368 |
-
* Render a sub widget. This should be used inside template files.
|
369 |
-
*
|
370 |
-
* @param $class
|
371 |
-
* @param $args
|
372 |
-
* @param $instance
|
373 |
-
*/
|
374 |
-
public function sub_widget($class, $args, $instance){
|
375 |
-
if(!class_exists($class)) return;
|
376 |
-
$widget = new $class;
|
377 |
-
|
378 |
-
$args['before_widget'] = '';
|
379 |
-
$args['after_widget'] = '';
|
380 |
-
|
381 |
-
$widget->widget( $args, $instance );
|
382 |
-
}
|
383 |
-
|
384 |
-
/**
|
385 |
-
* Add default values to the instance.
|
386 |
-
*
|
387 |
-
* @param $form
|
388 |
-
* @param $instance
|
389 |
-
*/
|
390 |
-
function add_defaults( $form, $instance, $level = 0 ){
|
391 |
-
if( $level > 10 ) return $instance;
|
392 |
-
|
393 |
-
foreach($form as $id => $field) {
|
394 |
-
|
395 |
-
if( $field['type'] == 'repeater' ) {
|
396 |
-
if( !empty($instance[$id]) ) {
|
397 |
-
foreach( array_keys($instance[$id]) as $i ){
|
398 |
-
$instance[$id][$i] = $this->add_defaults( $field['fields'], $instance[$id][$i], $level + 1 );
|
399 |
-
}
|
400 |
-
}
|
401 |
-
}
|
402 |
-
else if( $field['type'] == 'section' ) {
|
403 |
-
if( empty($instance[$id]) ) {
|
404 |
-
$instance[$id] = array();
|
405 |
-
}
|
406 |
-
$instance[$id] = $this->add_defaults( $field['fields'], $instance[$id], $level + 1 );
|
407 |
-
}
|
408 |
-
else if( $field['type'] == 'measurement' ) {
|
409 |
-
if( ! isset( $instance[$id] ) ) {
|
410 |
-
$instance[$id] = isset( $field['default'] ) ? $field['default'] : '';
|
411 |
-
}
|
412 |
-
if ( empty( $instance[ $id . '_unit' ] ) ) {
|
413 |
-
$instance[ $id . '_unit' ] = 'px';
|
414 |
-
}
|
415 |
-
}
|
416 |
-
else if ( $field['type'] == 'order') {
|
417 |
-
if ( empty( $instance[$id] ) ) {
|
418 |
-
if( ! empty( $field['default'] ) ) {
|
419 |
-
$instance[$id] = $field['default'];
|
420 |
-
} else {
|
421 |
-
// If no default order is specified, just use the order of the options.
|
422 |
-
$instance[$id] = array_keys( $field['options'] );
|
423 |
-
}
|
424 |
-
}
|
425 |
-
}
|
426 |
-
else {
|
427 |
-
if( !isset( $instance[$id] ) ) {
|
428 |
-
$instance[$id] = isset( $field['default'] ) ? $field['default'] : '';
|
429 |
-
}
|
430 |
-
}
|
431 |
-
}
|
432 |
-
|
433 |
-
return $instance;
|
434 |
-
}
|
435 |
-
|
436 |
-
/**
|
437 |
-
* Display the widget form.
|
438 |
-
*
|
439 |
-
* @param array $instance
|
440 |
-
* @param string $form_type Which type of form we're using
|
441 |
-
*
|
442 |
-
* @return string|void
|
443 |
-
*/
|
444 |
-
public function form( $instance, $form_type = 'widget' ) {
|
445 |
-
if( $form_type == 'widget' ) {
|
446 |
-
if( empty( $this->form_options ) ) {
|
447 |
-
$this->form_options = $this->form_options();
|
448 |
-
}
|
449 |
-
$form_options = $this->form_options;
|
450 |
-
}
|
451 |
-
else {
|
452 |
-
$form_options = $this->get_form( $form_type );
|
453 |
-
}
|
454 |
-
|
455 |
-
$instance = $this->modify_instance($instance);
|
456 |
-
$instance = $this->add_defaults( $form_options, $instance );
|
457 |
-
|
458 |
-
if( empty( $this->number ) ) {
|
459 |
-
// Compatibility with form widgets.
|
460 |
-
$this->number = 1;
|
461 |
-
}
|
462 |
-
|
463 |
-
// Filter the instance specifically for the form
|
464 |
-
$instance = apply_filters('siteorigin_widgets_form_instance_' . $this->id_base, $instance, $this);
|
465 |
-
|
466 |
-
// `more_entropy` adds a period to the id.
|
467 |
-
$id = str_replace( '.', '', uniqid( rand(), true ) );
|
468 |
-
$form_id = 'siteorigin_widget_form_' . md5( $id );
|
469 |
-
$class_name = str_replace( '_', '-', strtolower( $this->widget_class ) );
|
470 |
-
|
471 |
-
if( empty( $instance['_sow_form_id'] ) ) {
|
472 |
-
$instance['_sow_form_id'] = $id;
|
473 |
-
}
|
474 |
-
?>
|
475 |
-
<div class="siteorigin-widget-form siteorigin-widget-form-main siteorigin-widget-form-main-<?php echo esc_attr($class_name) ?>"
|
476 |
-
id="<?php echo $form_id ?>" data-class="<?php echo esc_attr( $this->widget_class ) ?>"
|
477 |
-
data-id-base="<?php echo esc_attr( $this->id_base ) ?>" style="display: none">
|
478 |
-
<?php
|
479 |
-
$this->display_teaser_message();
|
480 |
-
/* @var $field_factory SiteOrigin_Widget_Field_Factory */
|
481 |
-
$field_factory = SiteOrigin_Widget_Field_Factory::single();
|
482 |
-
$fields_javascript_variables = array();
|
483 |
-
foreach( $form_options as $field_name => $field_options ) {
|
484 |
-
/* @var $field SiteOrigin_Widget_Field_Base */
|
485 |
-
$field = $field_factory->create_field( $field_name, $field_options, $this );
|
486 |
-
$field->render( isset( $instance[$field_name] ) ? $instance[$field_name] : null, $instance );
|
487 |
-
$field_js_vars = $field->get_javascript_variables();
|
488 |
-
if( ! empty( $field_js_vars ) ) {
|
489 |
-
$fields_javascript_variables[$field_name] = $field_js_vars;
|
490 |
-
}
|
491 |
-
$field->enqueue_scripts();
|
492 |
-
$this->fields[$field_name] = $field;
|
493 |
-
}
|
494 |
-
?>
|
495 |
-
<input type="hidden" name="<?php echo $this->so_get_field_name('_sow_form_id') ?>" value="<?php echo esc_attr( $instance['_sow_form_id'] ) ?>" class="siteorigin-widgets-form-id" />
|
496 |
-
<input type="hidden" name="<?php echo $this->so_get_field_name('_sow_form_timestamp') ?>" value="<?php echo ! empty( $instance['_sow_form_timestamp'] ) ? esc_attr( $instance['_sow_form_timestamp'] ) : '' ?>" class="siteorigin-widgets-form-timestamp" />
|
497 |
-
</div>
|
498 |
-
<div class="siteorigin-widget-form-no-styles">
|
499 |
-
<?php $this->scripts_loading_message() ?>
|
500 |
-
</div>
|
501 |
-
|
502 |
-
<?php if( $this->show_preview_button() ) : ?>
|
503 |
-
<div class="siteorigin-widget-preview" style="display: none">
|
504 |
-
<a href="#" class="siteorigin-widget-preview-button button-secondary"><?php _e('Preview', 'so-widgets-bundle') ?></a>
|
505 |
-
</div>
|
506 |
-
<?php endif; ?>
|
507 |
-
|
508 |
-
<?php if( !empty( $this->widget_options['help'] ) ) : ?>
|
509 |
-
<a href="<?php echo sow_esc_url($this->widget_options['help']) ?>" class="siteorigin-widget-help-link siteorigin-panels-help-link" target="_blank" rel="noopener noreferrer"><?php _e('Help', 'so-widgets-bundle') ?></a>
|
510 |
-
<?php endif; ?>
|
511 |
-
|
512 |
-
<script type="text/javascript">
|
513 |
-
( function($) {
|
514 |
-
if(typeof window.sow_field_javascript_variables == 'undefined') window.sow_field_javascript_variables = {};
|
515 |
-
window.sow_field_javascript_variables["<?php echo addslashes( $this->widget_class ) ?>"] = <?php echo json_encode( $fields_javascript_variables ) ?>;
|
516 |
-
|
517 |
-
if( typeof $.fn.sowSetupForm != 'undefined' ) {
|
518 |
-
$('#<?php echo $form_id ?>').sowSetupForm();
|
519 |
-
}
|
520 |
-
else {
|
521 |
-
// Init once admin scripts have been loaded
|
522 |
-
$( document).on('sowadminloaded', function(){
|
523 |
-
$('#<?php echo $form_id ?>').sowSetupForm();
|
524 |
-
});
|
525 |
-
}
|
526 |
-
} )( jQuery );
|
527 |
-
</script>
|
528 |
-
<?php
|
529 |
-
|
530 |
-
$this->enqueue_scripts( $form_type );
|
531 |
-
}
|
532 |
-
|
533 |
-
/**
|
534 |
-
* Display the teaser message.
|
535 |
-
*/
|
536 |
-
function display_teaser_message(){
|
537 |
-
if(
|
538 |
-
method_exists( $this, 'get_form_teaser' ) &&
|
539 |
-
( $teaser = $this->get_form_teaser() )
|
540 |
-
) {
|
541 |
-
if ( ! is_admin() ) {
|
542 |
-
wp_enqueue_style( 'dashicons' );
|
543 |
-
}
|
544 |
-
|
545 |
-
$dismissed = get_user_meta( get_current_user_id(), 'teasers_dismissed', true );
|
546 |
-
if( empty( $dismissed[ $this->id_base ] ) ) {
|
547 |
-
$dismiss_url = add_query_arg( array(
|
548 |
-
'action' => 'so_dismiss_widget_teaser',
|
549 |
-
'widget' => $this->id_base,
|
550 |
-
), admin_url( 'admin-ajax.php' ) );
|
551 |
-
$dismiss_url = wp_nonce_url( $dismiss_url, 'dismiss-widget-teaser' );
|
552 |
-
|
553 |
-
?>
|
554 |
-
<div class="siteorigin-widget-teaser">
|
555 |
-
<?php echo wp_kses_post( $teaser ) ?>
|
556 |
-
<span class="dashicons dashicons-dismiss" data-dismiss-url="<?php echo esc_url( $dismiss_url ) ?>"></span>
|
557 |
-
</div>
|
558 |
-
<?php
|
559 |
-
}
|
560 |
-
}
|
561 |
-
}
|
562 |
-
|
563 |
-
/**
|
564 |
-
* Should we display the teaser for SiteOrigin Premium
|
565 |
-
*
|
566 |
-
* @return bool
|
567 |
-
*/
|
568 |
-
function display_siteorigin_premium_teaser(){
|
569 |
-
return apply_filters( 'siteorigin_premium_upgrade_teaser', true ) &&
|
570 |
-
! defined( 'SITEORIGIN_PREMIUM_VERSION' );
|
571 |
-
}
|
572 |
-
|
573 |
-
function scripts_loading_message(){
|
574 |
-
?>
|
575 |
-
<p><strong><?php _e('This widget has scripts and styles that need to be loaded before you can use it. Please save and reload your current page.', 'so-widgets-bundle') ?></strong></p>
|
576 |
-
<p><strong><?php _e('You will only need to do this once.', 'so-widgets-bundle') ?></strong></p>
|
577 |
-
<?php
|
578 |
-
}
|
579 |
-
|
580 |
-
/**
|
581 |
-
* Enqueue the admin scripts for the widget form.
|
582 |
-
*
|
583 |
-
* @param bool|string $form_type Should we enqueue the field scripts too?
|
584 |
-
*/
|
585 |
-
function enqueue_scripts( $form_type = false ) {
|
586 |
-
|
587 |
-
if( ! wp_script_is('siteorigin-widget-admin') ) {
|
588 |
-
wp_enqueue_style( 'wp-color-picker' );
|
589 |
-
wp_enqueue_style( 'siteorigin-widget-admin', plugin_dir_url(SOW_BUNDLE_BASE_FILE).'base/css/admin.css', array( 'media-views' ), SOW_BUNDLE_VERSION );
|
590 |
-
|
591 |
-
wp_enqueue_script( 'wp-color-picker' );
|
592 |
-
wp_enqueue_media();
|
593 |
-
wp_enqueue_script(
|
594 |
-
'siteorigin-widget-admin',
|
595 |
-
plugin_dir_url( SOW_BUNDLE_BASE_FILE ) . 'base/js/admin' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
596 |
-
array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-slider', 'underscore' ),
|
597 |
-
SOW_BUNDLE_VERSION,
|
598 |
-
true
|
599 |
-
);
|
600 |
-
|
601 |
-
wp_localize_script( 'siteorigin-widget-admin', 'soWidgets', array(
|
602 |
-
'ajaxurl' => wp_nonce_url( admin_url('admin-ajax.php'), 'widgets_action', '_widgets_nonce' ),
|
603 |
-
'sure' => __('Are you sure?', 'so-widgets-bundle'),
|
604 |
-
'backup' => array(
|
605 |
-
'newerVersion' => __( "There is a newer version of this widget's content available.", 'so-widgets-bundle' ),
|
606 |
-
'restore' => __( 'Restore', 'so-widgets-bundle' ),
|
607 |
-
'dismiss' => __( 'Dismiss', 'so-widgets-bundle' ),
|
608 |
-
'replaceWarning' => sprintf(
|
609 |
-
__( 'Clicking %s will replace the current widget contents. You can revert by refreshing the page before updating.', 'so-widgets-bundle' ),
|
610 |
-
'<em>' . __( 'Restore', 'so-widgets-bundle' ) . '</em>'
|
611 |
-
),
|
612 |
-
),
|
613 |
-
) );
|
614 |
-
|
615 |
-
global $wp_customize;
|
616 |
-
if ( isset( $wp_customize ) ) {
|
617 |
-
$this->footer_admin_templates();
|
618 |
-
}
|
619 |
-
else {
|
620 |
-
add_action( 'admin_footer', array( $this, 'footer_admin_templates' ) );
|
621 |
-
}
|
622 |
-
}
|
623 |
-
|
624 |
-
if( !empty( $form_type ) && $this->has_form( $form_type ) ) {
|
625 |
-
// Enqueue field scripts for the given form type
|
626 |
-
$form_options = $this->get_form( $form_type );
|
627 |
-
$this->enqueue_field_scripts( $form_options );
|
628 |
-
}
|
629 |
-
|
630 |
-
// This lets the widget enqueue any specific admin scripts
|
631 |
-
$this->enqueue_admin_scripts();
|
632 |
-
do_action( 'siteorigin_widgets_enqueue_admin_scripts_' . $this->id_base, $this );
|
633 |
-
}
|
634 |
-
|
635 |
-
function enqueue_field_scripts( $fields ){
|
636 |
-
/* @var $field_factory SiteOrigin_Widget_Field_Factory */
|
637 |
-
$field_factory = SiteOrigin_Widget_Field_Factory::single();
|
638 |
-
|
639 |
-
foreach( $fields as $field_name => $field_options ) {
|
640 |
-
/* @var $field SiteOrigin_Widget_Field_Base */
|
641 |
-
$field = $field_factory->create_field( $field_name, $field_options, $this );
|
642 |
-
$field->enqueue_scripts();
|
643 |
-
|
644 |
-
if( !empty( $field_options['fields'] ) ) {
|
645 |
-
$this->enqueue_field_scripts( $field_options['fields'] );
|
646 |
-
}
|
647 |
-
}
|
648 |
-
}
|
649 |
-
|
650 |
-
/**
|
651 |
-
* Display all the admin stuff for the footer
|
652 |
-
*/
|
653 |
-
function footer_admin_templates(){
|
654 |
-
?>
|
655 |
-
<script type="text/template" id="so-widgets-bundle-tpl-preview-dialog">
|
656 |
-
<div class="so-widgets-dialog">
|
657 |
-
<div class="so-widgets-dialog-overlay"></div>
|
658 |
-
|
659 |
-
<div class="so-widgets-toolbar">
|
660 |
-
<h3><?php _e( 'Widget Preview', 'so-widgets-bundle' ) ?></h3>
|
661 |
-
<div class="close"><span class="dashicons dashicons-arrow-left-alt2"></span></div>
|
662 |
-
</div>
|
663 |
-
|
664 |
-
<div class="so-widgets-dialog-frame">
|
665 |
-
<iframe name="siteorigin-widgets-preview-iframe" id="siteorigin-widget-preview-iframe" style="visibility: hidden"></iframe>
|
666 |
-
</div>
|
667 |
-
|
668 |
-
<form target="siteorigin-widgets-preview-iframe" action="<?php echo wp_nonce_url( admin_url('admin-ajax.php'), 'widgets_action', '_widgets_nonce' ) ?>" method="post">
|
669 |
-
<input type="hidden" name="action" value="so_widgets_preview" />
|
670 |
-
<input type="hidden" name="data" value="" />
|
671 |
-
<input type="hidden" name="class" value="" />
|
672 |
-
</form>
|
673 |
-
|
674 |
-
</div>
|
675 |
-
</script>
|
676 |
-
<?php
|
677 |
-
|
678 |
-
// Give other plugins a chance to add their own
|
679 |
-
do_action('siteorigin_widgets_footer_admin_templates');
|
680 |
-
}
|
681 |
-
|
682 |
-
/**
|
683 |
-
* Update the widget instance.
|
684 |
-
*
|
685 |
-
* @param array $new_instance
|
686 |
-
* @param array $old_instance
|
687 |
-
* @param string $form_type The type of form we're using.
|
688 |
-
* @return array|void
|
689 |
-
*/
|
690 |
-
public function update( $new_instance, $old_instance, $form_type = 'widget' ) {
|
691 |
-
if( !class_exists('SiteOrigin_Widgets_Color_Object') ) require plugin_dir_path( __FILE__ ).'inc/color.php';
|
692 |
-
|
693 |
-
if( $form_type == 'widget' ) {
|
694 |
-
if( empty( $this->form_options ) ) {
|
695 |
-
$this->form_options = $this->form_options();
|
696 |
-
}
|
697 |
-
$form_options = $this->form_options;
|
698 |
-
}
|
699 |
-
else {
|
700 |
-
$form_options = $this->get_form( $form_type );
|
701 |
-
}
|
702 |
-
|
703 |
-
if( ! empty( $form_options ) ) {
|
704 |
-
/* @var $field_factory SiteOrigin_Widget_Field_Factory */
|
705 |
-
$field_factory = SiteOrigin_Widget_Field_Factory::single();
|
706 |
-
foreach ( $form_options as $field_name => $field_options ) {
|
707 |
-
/* @var $field SiteOrigin_Widget_Field_Base */
|
708 |
-
if ( !empty( $this->fields ) && !empty( $this->fields[$field_name] ) ) {
|
709 |
-
$field = $this->fields[$field_name];
|
710 |
-
}
|
711 |
-
else {
|
712 |
-
$field = $field_factory->create_field( $field_name, $field_options, $this );
|
713 |
-
$this->fields[$field_name] = $field;
|
714 |
-
}
|
715 |
-
$new_instance[$field_name] = $field->sanitize(
|
716 |
-
isset( $new_instance[$field_name] ) ? $new_instance[$field_name] : null,
|
717 |
-
$new_instance,
|
718 |
-
isset( $old_instance[$field_name] ) ? $old_instance[$field_name] : null
|
719 |
-
);
|
720 |
-
$new_instance = $field->sanitize_instance( $new_instance );
|
721 |
-
}
|
722 |
-
|
723 |
-
// Let other plugins also sanitize the instance
|
724 |
-
$new_instance = apply_filters( 'siteorigin_widgets_sanitize_instance', $new_instance, $form_options, $this );
|
725 |
-
$new_instance = apply_filters( 'siteorigin_widgets_sanitize_instance_' . $this->id_base, $new_instance, $form_options, $this );
|
726 |
-
}
|
727 |
-
|
728 |
-
// Remove the old CSS, it'll be regenerated on page load.
|
729 |
-
$this->delete_css( $this->modify_instance( $old_instance ) );
|
730 |
-
return $new_instance;
|
731 |
-
}
|
732 |
-
|
733 |
-
/**
|
734 |
-
* Save the CSS to the filesystem
|
735 |
-
*
|
736 |
-
* @param $instance
|
737 |
-
* @return bool|string
|
738 |
-
*/
|
739 |
-
private function save_css( $instance ){
|
740 |
-
require_once ABSPATH . 'wp-admin/includes/file.php';
|
741 |
-
|
742 |
-
$style = $this->get_style_name($instance);
|
743 |
-
$hash = $this->get_style_hash( $instance );
|
744 |
-
$name = $this->id_base.'-'.$style.'-'.$hash.'.css';
|
745 |
-
|
746 |
-
$css = $this->get_instance_css($instance);
|
747 |
-
|
748 |
-
if ( ! empty( $css ) ) {
|
749 |
-
if ( WP_Filesystem() ) {
|
750 |
-
global $wp_filesystem;
|
751 |
-
$upload_dir = wp_upload_dir();
|
752 |
-
|
753 |
-
$dir_exists = $wp_filesystem->is_dir( $upload_dir['basedir'] . '/siteorigin-widgets/' );
|
754 |
-
|
755 |
-
if ( empty( $dir_exists ) ) {
|
756 |
-
// The 'siteorigin-widgets' directory doesn't exist, so try to create it.
|
757 |
-
$dir_exists = $wp_filesystem->mkdir( $upload_dir['basedir'] . '/siteorigin-widgets/' );
|
758 |
-
}
|
759 |
-
|
760 |
-
if ( ! empty( $dir_exists ) ) {
|
761 |
-
// The 'siteorigin-widgets' directory exists, so we can try to write the CSS to a file.
|
762 |
-
$wp_filesystem->delete( $upload_dir['basedir'] . '/siteorigin-widgets/' . $name );
|
763 |
-
$file_put_success = $wp_filesystem->put_contents(
|
764 |
-
$upload_dir['basedir'] . '/siteorigin-widgets/' . $name,
|
765 |
-
$css
|
766 |
-
);
|
767 |
-
|
768 |
-
// Alert other plugins that we've added a new CSS file
|
769 |
-
do_action( 'siteorigin_widgets_stylesheet_added', $name, $instance );
|
770 |
-
}
|
771 |
-
}
|
772 |
-
|
773 |
-
// We couldn't write to file, so let's use cache instead.
|
774 |
-
if ( empty( $file_put_success ) ) {
|
775 |
-
wp_cache_add( $name, $css, 'siteorigin_widgets' );
|
776 |
-
}
|
777 |
-
|
778 |
-
return $hash;
|
779 |
-
}
|
780 |
-
|
781 |
-
return false;
|
782 |
-
}
|
783 |
-
|
784 |
-
/**
|
785 |
-
* Clears CSS for a specific instance
|
786 |
-
*/
|
787 |
-
private function delete_css( $instance ){
|
788 |
-
require_once ABSPATH . 'wp-admin/includes/file.php';
|
789 |
-
|
790 |
-
if( WP_Filesystem() ) {
|
791 |
-
global $wp_filesystem;
|
792 |
-
$upload_dir = wp_upload_dir();
|
793 |
-
|
794 |
-
$style = $this->get_style_name($instance);
|
795 |
-
$hash = $this->get_style_hash( $instance );
|
796 |
-
$name = $this->id_base.'-'.$style.'-'.$hash;
|
797 |
-
|
798 |
-
$wp_filesystem->delete($upload_dir['basedir'] . '/siteorigin-widgets/' . $name . '.css');
|
799 |
-
if ( in_array( $name, $this->generated_css ) ) {
|
800 |
-
$index = array_search( $name, $this->generated_css );
|
801 |
-
unset( $this->generated_css[$index] );
|
802 |
-
//Reindex array
|
803 |
-
$this->generated_css = array_values( $this->generated_css );
|
804 |
-
}
|
805 |
-
|
806 |
-
// Alert other plugins that we've deleted a CSS file
|
807 |
-
do_action( 'siteorigin_widgets_stylesheet_deleted', $name, $instance );
|
808 |
-
}
|
809 |
-
}
|
810 |
-
|
811 |
-
/**
|
812 |
-
* Clear all old CSS files
|
813 |
-
*
|
814 |
-
* @var bool $force Must we force a cache refresh.
|
815 |
-
*/
|
816 |
-
public static function clear_file_cache( $force_delete = false ){
|
817 |
-
// Use this variable to ensure this only runs once per request
|
818 |
-
static $done = false;
|
819 |
-
if ( $done && !$force_delete ) return;
|
820 |
-
|
821 |
-
if( !get_transient('sow:cleared') || $force_delete ) {
|
822 |
-
|
823 |
-
require_once ABSPATH . 'wp-admin/includes/file.php';
|
824 |
-
if( WP_Filesystem() ) {
|
825 |
-
global $wp_filesystem;
|
826 |
-
$upload_dir = wp_upload_dir();
|
827 |
-
|
828 |
-
$list = $wp_filesystem->dirlist( $upload_dir['basedir'] . '/siteorigin-widgets/' );
|
829 |
-
if ( ! empty( $list ) ) {
|
830 |
-
foreach($list as $file) {
|
831 |
-
if( $file['lastmodunix'] < time() - self::$css_expire || $force_delete ) {
|
832 |
-
// Delete the file
|
833 |
-
$wp_filesystem->delete( $upload_dir['basedir'] . '/siteorigin-widgets/' . $file['name'] );
|
834 |
-
}
|
835 |
-
}
|
836 |
-
}
|
837 |
-
}
|
838 |
-
|
839 |
-
// Set this transient so we know when to clear all the generated CSS.
|
840 |
-
set_transient('sow:cleared', true, self::$css_expire);
|
841 |
-
}
|
842 |
-
|
843 |
-
$done = true;
|
844 |
-
}
|
845 |
-
|
846 |
-
/**
|
847 |
-
* Generate the CSS for the widget.
|
848 |
-
*
|
849 |
-
* @param $instance
|
850 |
-
* @return string
|
851 |
-
*/
|
852 |
-
public function get_instance_css( $instance ){
|
853 |
-
if( !class_exists( 'SiteOrigin_LessC' ) ) require plugin_dir_path( __FILE__ ) . 'inc/lessc.inc.php';
|
854 |
-
if( !class_exists('SiteOrigin_Widgets_Less_Functions') ) require plugin_dir_path( __FILE__ ).'inc/less-functions.php';
|
855 |
-
|
856 |
-
if( !method_exists( $this, 'get_less_content' ) ) {
|
857 |
-
$style_name = $this->get_style_name($instance);
|
858 |
-
if( empty($style_name) ) return '';
|
859 |
-
|
860 |
-
$less_file = siteorigin_widget_get_plugin_dir_path( $this->id_base ).'styles/'.$style_name . '.less';
|
861 |
-
$less_file = apply_filters( 'siteorigin_widgets_less_file_' . $this->id_base, $less_file, $instance, $this );
|
862 |
-
|
863 |
-
$less = ( substr( $less_file, -5 ) == '.less' && file_exists($less_file) ) ? file_get_contents( $less_file ) : '';
|
864 |
-
}
|
865 |
-
else {
|
866 |
-
// The widget is going handle getting the instance LESS
|
867 |
-
$less = $this->get_less_content( $instance );
|
868 |
-
}
|
869 |
-
|
870 |
-
// Substitute the variables
|
871 |
-
if( !class_exists('SiteOrigin_Widgets_Color_Object') ) require plugin_dir_path( __FILE__ ) . 'inc/color.php';
|
872 |
-
|
873 |
-
// Lets widgets insert their own custom generated LESS
|
874 |
-
$less = preg_replace_callback( '/\.widget-function\((.*)\);/', array( $this, 'less_widget_inject' ), $less );
|
875 |
-
|
876 |
-
//handle less @import statements
|
877 |
-
$less = preg_replace_callback( '/^@import\s+".*?\/?([\w\-\.]+)";/m', array( $this, 'get_less_import_contents' ), $less );
|
878 |
-
|
879 |
-
$vars = apply_filters( 'siteorigin_widgets_less_variables_' . $this->id_base, $this->get_less_variables( $instance ), $instance, $this );
|
880 |
-
if( !empty( $vars ) ){
|
881 |
-
foreach($vars as $name => $value) {
|
882 |
-
// Ignore empty string, false and null values (but keep '0')
|
883 |
-
if( $value === '' || $value === false || $value === null ) continue;
|
884 |
-
|
885 |
-
$less = preg_replace('/\@'.preg_quote($name).' *\:.*?;/', '@'.$name.': '.$value.';', $less);
|
886 |
-
}
|
887 |
-
}
|
888 |
-
|
889 |
-
$less = apply_filters( 'siteorigin_widgets_styles', $less, $this->widget_class, $instance );
|
890 |
-
$less = apply_filters( 'siteorigin_widgets_less_' . $this->id_base, $less, $instance, $this );
|
891 |
-
|
892 |
-
$css = '';
|
893 |
-
|
894 |
-
if( ! empty( $less ) ) {
|
895 |
-
$style = $this->get_style_name( $instance );
|
896 |
-
$hash = $this->get_style_hash( $instance );
|
897 |
-
$css_name = $this->id_base . '-' . $style . '-' . $hash;
|
898 |
-
|
899 |
-
//we assume that any remaining @imports are plain css imports and should be kept outside selectors
|
900 |
-
$css_imports = '';
|
901 |
-
if ( preg_match_all( '/^@import.+/m', $less, $imports ) ) {
|
902 |
-
$css_imports = implode( "\n", $imports[0] );
|
903 |
-
$less = preg_replace( '/^@import.+/m', '', $less );
|
904 |
-
}
|
905 |
-
|
906 |
-
$less = $css_imports . "\n\n" . '.so-widget-'.$css_name." { \n".$less."\n } ";
|
907 |
-
|
908 |
-
$compiler = new SiteOrigin_LessC();
|
909 |
-
$lc_functions = new SiteOrigin_Widgets_Less_Functions($this, $instance);
|
910 |
-
$lc_functions->registerFunctions( $compiler );
|
911 |
-
$compiler = apply_filters( 'siteorigin_widgets_less_compiler', $compiler, $instance, $this );
|
912 |
-
|
913 |
-
try {
|
914 |
-
if( method_exists( $compiler, 'compile' ) ) {
|
915 |
-
$css = $compiler->compile( $less );
|
916 |
-
}
|
917 |
-
}
|
918 |
-
catch ( Exception $e ) {
|
919 |
-
if( defined( 'SITEORIGIN_WIDGETS_DEBUG' ) && SITEORIGIN_WIDGETS_DEBUG ) {
|
920 |
-
throw $e;
|
921 |
-
}
|
922 |
-
}
|
923 |
-
|
924 |
-
// Remove any attributes with default as the value
|
925 |
-
$css = preg_replace('/[a-zA-Z\-]+ *: *default *;/', '', $css);
|
926 |
-
|
927 |
-
// Remove any empty CSS
|
928 |
-
$css = preg_replace('/[^{}]*\{\s*\}/m', '', $css);
|
929 |
-
$css = trim($css);
|
930 |
-
}
|
931 |
-
|
932 |
-
return apply_filters( 'siteorigin_widgets_instance_css', $css, $instance, $this );
|
933 |
-
}
|
934 |
-
|
935 |
-
/**
|
936 |
-
* Replaces LESS imports with the content from the actual files. This used as a preg callback.
|
937 |
-
*
|
938 |
-
* @param $matches
|
939 |
-
*
|
940 |
-
* @return string
|
941 |
-
*/
|
942 |
-
private function get_less_import_contents($matches) {
|
943 |
-
$filename = $matches[1];
|
944 |
-
|
945 |
-
// First, we'll deal with a few special cases
|
946 |
-
switch( $filename ) {
|
947 |
-
case 'mixins':
|
948 |
-
return file_get_contents( plugin_dir_path( __FILE__ ) . 'less/mixins.less' );
|
949 |
-
break;
|
950 |
-
|
951 |
-
case 'lesshat':
|
952 |
-
return file_get_contents( plugin_dir_path( __FILE__ ) . 'less/lesshat.less' );
|
953 |
-
break;
|
954 |
-
}
|
955 |
-
|
956 |
-
//get file extension
|
957 |
-
preg_match( '/\.\w+$/', $filename, $ext );
|
958 |
-
//if there is a file extension and it's not .less or .css we ignore
|
959 |
-
if ( ! empty( $ext ) ) {
|
960 |
-
if ( ! ( $ext[0] == '.less' || $ext[0] == '.css' ) ) {
|
961 |
-
return '';
|
962 |
-
}
|
963 |
-
}
|
964 |
-
else {
|
965 |
-
$filename .= '.less';
|
966 |
-
}
|
967 |
-
//first check local widget styles directory and then bundle less directory
|
968 |
-
$search_path = array(
|
969 |
-
siteorigin_widget_get_plugin_dir_path( $this->id_base ) . 'styles/',
|
970 |
-
plugin_dir_path( __FILE__ ) . 'less/'
|
971 |
-
);
|
972 |
-
|
973 |
-
foreach ( $search_path as $dir ) {
|
974 |
-
if ( file_exists( $dir . $filename ) ) {
|
975 |
-
return file_get_contents( $dir . $filename )."\n\n";
|
976 |
-
}
|
977 |
-
}
|
978 |
-
|
979 |
-
//file not found
|
980 |
-
return '';
|
981 |
-
}
|
982 |
-
|
983 |
-
/**
|
984 |
-
* Used as a preg callback to replace .widget-function('some_function', ...) with output from less_some_function($instance, $args).
|
985 |
-
*
|
986 |
-
* @param $matches
|
987 |
-
*
|
988 |
-
* @return mixed|string
|
989 |
-
*/
|
990 |
-
private function less_widget_inject($matches){
|
991 |
-
// We're going to lazily split the arguments by comma
|
992 |
-
$args = explode(',', $matches[1]);
|
993 |
-
if( empty($args[0]) ) return '';
|
994 |
-
|
995 |
-
// Shift the function name from the arguments
|
996 |
-
$func = 'less_' . trim( array_shift($args) , '\'"');
|
997 |
-
if( !method_exists($this, $func) ) return '';
|
998 |
-
|
999 |
-
// Finally call the function and include the
|
1000 |
-
$args = array_map('trim', $args);
|
1001 |
-
return call_user_func( array($this, $func), $this->current_instance, $args );
|
1002 |
-
}
|
1003 |
-
|
1004 |
-
/**
|
1005 |
-
* Less function for importing Google web fonts.
|
1006 |
-
*
|
1007 |
-
* @param $instance
|
1008 |
-
* @param $args
|
1009 |
-
*
|
1010 |
-
* @return string
|
1011 |
-
*/
|
1012 |
-
function less_import_google_font($instance, $args) {
|
1013 |
-
if( empty( $instance ) ) return;
|
1014 |
-
|
1015 |
-
$fonts = $this->get_google_font_fields($instance);
|
1016 |
-
if( empty( $fonts ) || ! is_array( $fonts ) ) return '';
|
1017 |
-
|
1018 |
-
$font_imports = array();
|
1019 |
-
|
1020 |
-
foreach ( $fonts as $font ) {
|
1021 |
-
$font_imports[] = siteorigin_widget_get_font( $font );
|
1022 |
-
}
|
1023 |
-
|
1024 |
-
$import_strings = array();
|
1025 |
-
foreach( $font_imports as $import ) {
|
1026 |
-
$import_strings[] = !empty($import['css_import']) ? $import['css_import'] : '';
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
// Remove empty and duplicate items from the array
|
1030 |
-
$import_strings = array_filter( $import_strings );
|
1031 |
-
$import_strings = array_unique( $import_strings );
|
1032 |
-
|
1033 |
-
return implode( "\n", $import_strings );
|
1034 |
-
}
|
1035 |
-
|
1036 |
-
/**
|
1037 |
-
* Get any font fields which may be used by this widget.
|
1038 |
-
*
|
1039 |
-
* @param $instance
|
1040 |
-
*
|
1041 |
-
* @return array
|
1042 |
-
*/
|
1043 |
-
function get_google_font_fields( $instance ) {
|
1044 |
-
return apply_filters( 'siteorigin_widgets_google_font_fields_' . $this->id_base, array(), $instance, $this );
|
1045 |
-
}
|
1046 |
-
|
1047 |
-
/**
|
1048 |
-
* Utility function to get a field name for a widget field.
|
1049 |
-
*
|
1050 |
-
* @param $field_name
|
1051 |
-
* @param array $container
|
1052 |
-
* @return mixed|string
|
1053 |
-
*/
|
1054 |
-
public function so_get_field_name( $field_name, $container = array() ) {
|
1055 |
-
if( empty($container) ) {
|
1056 |
-
$name = $this->get_field_name( $field_name );
|
1057 |
-
}
|
1058 |
-
else {
|
1059 |
-
// We also need to add the container fields
|
1060 |
-
$container_extras = '';
|
1061 |
-
foreach($container as $r) {
|
1062 |
-
$container_extras .= '[' . $r['name'] . ']';
|
1063 |
-
|
1064 |
-
if( $r['type'] == 'repeater' ) {
|
1065 |
-
$container_extras .= '[#' . $r['name'] . '#]';
|
1066 |
-
}
|
1067 |
-
}
|
1068 |
-
|
1069 |
-
$name = $this->get_field_name( '{{{FIELD_NAME}}}' );
|
1070 |
-
$name = str_replace('[{{{FIELD_NAME}}}]', $container_extras.'[' . esc_attr($field_name) . ']', $name);
|
1071 |
-
}
|
1072 |
-
|
1073 |
-
$name = apply_filters( 'siteorigin_widgets_get_field_name', $name );
|
1074 |
-
$name = apply_filters( 'siteorigin_widgets_get_field_name_' . $this->id_base, $name );
|
1075 |
-
|
1076 |
-
return $name;
|
1077 |
-
}
|
1078 |
-
|
1079 |
-
/**
|
1080 |
-
* Get the ID of this field.
|
1081 |
-
*
|
1082 |
-
* @param $field_name
|
1083 |
-
* @param array $container
|
1084 |
-
* @param boolean $is_template
|
1085 |
-
*
|
1086 |
-
* @return string
|
1087 |
-
*/
|
1088 |
-
public function so_get_field_id( $field_name, $container = array(), $is_template = false ) {
|
1089 |
-
if( empty($container) ) {
|
1090 |
-
return $this->get_field_id($field_name);
|
1091 |
-
}
|
1092 |
-
else {
|
1093 |
-
$name = array();
|
1094 |
-
foreach ( $container as $container_item ) {
|
1095 |
-
$name[] = $container_item['name'];
|
1096 |
-
}
|
1097 |
-
$name[] = $field_name;
|
1098 |
-
$field_id_base = $this->get_field_id(implode('-', $name));
|
1099 |
-
if ( $is_template ) {
|
1100 |
-
return $field_id_base . '-_id_';
|
1101 |
-
}
|
1102 |
-
if ( ! isset( $this->field_ids[ $field_id_base ] ) ) {
|
1103 |
-
$this->field_ids[ $field_id_base ] = 1;
|
1104 |
-
}
|
1105 |
-
$curId = $this->field_ids[ $field_id_base ]++;
|
1106 |
-
return $field_id_base . '-' . $curId;
|
1107 |
-
}
|
1108 |
-
}
|
1109 |
-
|
1110 |
-
/**
|
1111 |
-
* Parse markdown
|
1112 |
-
*
|
1113 |
-
* @param $markdown
|
1114 |
-
* @return string The HTML
|
1115 |
-
*
|
1116 |
-
* @deprecated Will be removed in version 2.0
|
1117 |
-
*/
|
1118 |
-
function parse_markdown( $markdown ){
|
1119 |
-
if( !class_exists('Parsedown') ) include plugin_dir_path(__FILE__).'inc/Parsedown.php';
|
1120 |
-
$parser = new Parsedown();
|
1121 |
-
|
1122 |
-
return $parser->text($markdown);
|
1123 |
-
}
|
1124 |
-
|
1125 |
-
/**
|
1126 |
-
* Get a hash that uniquely identifies this instance.
|
1127 |
-
*
|
1128 |
-
* @param $instance
|
1129 |
-
* @return string
|
1130 |
-
*/
|
1131 |
-
function get_style_hash( $instance ) {
|
1132 |
-
$style_hash = apply_filters('siteorigin_widgets_widget_style_hash', '', $this);
|
1133 |
-
if( empty( $style_hash ) ) {
|
1134 |
-
if( method_exists( $this, 'get_style_hash_variables' ) ) {
|
1135 |
-
$vars = apply_filters( 'siteorigin_widgets_hash_variables_' . $this->id_base, $this->get_style_hash_variables( $instance ), $instance, $this );
|
1136 |
-
} else {
|
1137 |
-
$vars = apply_filters( 'siteorigin_widgets_less_variables_' . $this->id_base, $this->get_less_variables( $instance ), $instance, $this );
|
1138 |
-
}
|
1139 |
-
$version = property_exists( $this, 'version' ) ? $this->version : '';
|
1140 |
-
|
1141 |
-
$style_hash = substr( md5( json_encode( $vars ) . $version ), 0, 12 );
|
1142 |
-
}
|
1143 |
-
|
1144 |
-
return $style_hash;
|
1145 |
-
}
|
1146 |
-
|
1147 |
-
/**
|
1148 |
-
* Get the template name that we'll be using to render this widget.
|
1149 |
-
*
|
1150 |
-
* @param $instance
|
1151 |
-
* @return mixed
|
1152 |
-
*/
|
1153 |
-
function get_template_name( $instance ) {
|
1154 |
-
return 'default';
|
1155 |
-
}
|
1156 |
-
|
1157 |
-
/**
|
1158 |
-
* Get the name of the directory in which we should look for the template. Relative to root of widget folder.
|
1159 |
-
*
|
1160 |
-
* @return mixed
|
1161 |
-
*/
|
1162 |
-
function get_template_dir( $instance ) {
|
1163 |
-
return 'tpl';
|
1164 |
-
}
|
1165 |
-
|
1166 |
-
/**
|
1167 |
-
* Get the LESS style name we'll be using for this widget.
|
1168 |
-
*
|
1169 |
-
* @param $instance
|
1170 |
-
* @return mixed
|
1171 |
-
*/
|
1172 |
-
function get_style_name( $instance ) {
|
1173 |
-
return 'default';
|
1174 |
-
}
|
1175 |
-
|
1176 |
-
/**
|
1177 |
-
* Get any variables that need to be substituted by
|
1178 |
-
*
|
1179 |
-
* @param $instance
|
1180 |
-
* @return array
|
1181 |
-
*/
|
1182 |
-
function get_less_variables( $instance ){
|
1183 |
-
return array();
|
1184 |
-
}
|
1185 |
-
|
1186 |
-
/**
|
1187 |
-
* Filter the variables we'll be storing in temporary storage for this instance if we're using `instance_storage`
|
1188 |
-
*
|
1189 |
-
* @param $instance
|
1190 |
-
*
|
1191 |
-
* @return mixed
|
1192 |
-
*/
|
1193 |
-
function modify_stored_instance( $instance ){
|
1194 |
-
return $instance;
|
1195 |
-
}
|
1196 |
-
|
1197 |
-
/**
|
1198 |
-
* Get the stored instance based on the hash.
|
1199 |
-
*
|
1200 |
-
* @param $hash
|
1201 |
-
*
|
1202 |
-
* @return object The instance
|
1203 |
-
*/
|
1204 |
-
function get_stored_instance( $hash ) {
|
1205 |
-
return get_transient('sow_inst[' . $this->id_base . '][' . $hash . ']');
|
1206 |
-
}
|
1207 |
-
|
1208 |
-
/**
|
1209 |
-
* This function can be overwritten to modify form values in the child widget.
|
1210 |
-
*
|
1211 |
-
* @param $form
|
1212 |
-
* @return mixed
|
1213 |
-
*/
|
1214 |
-
function modify_form( $form ) {
|
1215 |
-
return $form;
|
1216 |
-
}
|
1217 |
-
|
1218 |
-
|
1219 |
-
/**
|
1220 |
-
* This function can be overwritten to modify form values in the child widget.
|
1221 |
-
*
|
1222 |
-
* @param $child_widget_form
|
1223 |
-
* @param $child_widget
|
1224 |
-
* @return mixed
|
1225 |
-
*/
|
1226 |
-
function modify_child_widget_form($child_widget_form, $child_widget) {
|
1227 |
-
return $child_widget_form;
|
1228 |
-
}
|
1229 |
-
|
1230 |
-
/**
|
1231 |
-
* This function should be overwritten by child widgets to filter an instance. Run before rendering the form and widget.
|
1232 |
-
*
|
1233 |
-
* @param $instance
|
1234 |
-
*
|
1235 |
-
* @return mixed
|
1236 |
-
*/
|
1237 |
-
function modify_instance( $instance ){
|
1238 |
-
return $instance;
|
1239 |
-
}
|
1240 |
-
|
1241 |
-
/**
|
1242 |
-
* Can be overwritten by child widgets to make variables available to javascript via ajax calls. These are designed to be used in the admin.
|
1243 |
-
*/
|
1244 |
-
function get_javascript_variables(){
|
1245 |
-
|
1246 |
-
}
|
1247 |
-
|
1248 |
-
/**
|
1249 |
-
* Used by child widgets to register scripts to be enqueued for the frontend.
|
1250 |
-
*
|
1251 |
-
* @param array $scripts an array of scripts. Each element is an array that corresponds to wp_enqueue_script arguments
|
1252 |
-
*/
|
1253 |
-
public function register_frontend_scripts( $scripts ){
|
1254 |
-
foreach ( $scripts as $script ) {
|
1255 |
-
if ( ! isset( $this->frontend_scripts[ $script[0] ] ) ) {
|
1256 |
-
$this->frontend_scripts[$script[0]] = $script;
|
1257 |
-
}
|
1258 |
-
}
|
1259 |
-
}
|
1260 |
-
|
1261 |
-
/**
|
1262 |
-
* Enqueue all the registered scripts
|
1263 |
-
*/
|
1264 |
-
function enqueue_registered_scripts( $instance ) {
|
1265 |
-
$f_scripts = apply_filters(
|
1266 |
-
'siteorigin_widgets_frontend_scripts_' . $this->id_base,
|
1267 |
-
$this->frontend_scripts,
|
1268 |
-
$instance,
|
1269 |
-
$this
|
1270 |
-
);
|
1271 |
-
|
1272 |
-
foreach ( $f_scripts as $f_script ) {
|
1273 |
-
if ( ! wp_script_is( $f_script[0] ) ) {
|
1274 |
-
wp_enqueue_script(
|
1275 |
-
$f_script[0],
|
1276 |
-
isset( $f_script[1] ) ? $f_script[1] : false,
|
1277 |
-
isset( $f_script[2] ) ? $f_script[2] : array(),
|
1278 |
-
!empty( $f_script[3] ) ? $f_script[3] : SOW_BUNDLE_VERSION,
|
1279 |
-
isset( $f_script[4] ) ? $f_script[4] : false
|
1280 |
-
);
|
1281 |
-
}
|
1282 |
-
}
|
1283 |
-
}
|
1284 |
-
|
1285 |
-
/**
|
1286 |
-
* Used by child widgets to register styles to be enqueued for the frontend.
|
1287 |
-
*
|
1288 |
-
* @param array $styles an array of styles. Each element is an array that corresponds to wp_enqueue_style arguments
|
1289 |
-
*/
|
1290 |
-
public function register_frontend_styles( $styles ) {
|
1291 |
-
foreach ( $styles as $style ) {
|
1292 |
-
if ( ! isset( $this->frontend_styles[ $style[0] ] ) ) {
|
1293 |
-
$this->frontend_styles[$style[0]] = $style;
|
1294 |
-
}
|
1295 |
-
}
|
1296 |
-
}
|
1297 |
-
|
1298 |
-
/**
|
1299 |
-
* Enqueue any frontend styles that were registered
|
1300 |
-
*/
|
1301 |
-
function enqueue_registered_styles( $instance ) {
|
1302 |
-
$f_styles = apply_filters(
|
1303 |
-
'siteorigin_widgets_frontend_styles_' . $this->id_base,
|
1304 |
-
$this->frontend_styles,
|
1305 |
-
$instance,
|
1306 |
-
$this
|
1307 |
-
);
|
1308 |
-
|
1309 |
-
foreach ( $f_styles as $f_style ) {
|
1310 |
-
if ( ! wp_style_is( $f_style[0] ) ) {
|
1311 |
-
wp_enqueue_style(
|
1312 |
-
$f_style[0],
|
1313 |
-
isset( $f_style[1] ) ? $f_style[1] : false,
|
1314 |
-
isset( $f_style[2] ) ? $f_style[2] : array(),
|
1315 |
-
!empty( $f_style[3] ) ? $f_style[3] : SOW_BUNDLE_VERSION,
|
1316 |
-
isset( $f_style[4] ) ? $f_style[4] : "all"
|
1317 |
-
);
|
1318 |
-
}
|
1319 |
-
}
|
1320 |
-
}
|
1321 |
-
|
1322 |
-
/**
|
1323 |
-
* Can be overridden by child widgets to enqueue scripts and styles for the frontend, but child widgets should
|
1324 |
-
* rather register scripts and styles using register_frontend_scripts() and register_frontend_styles(). This function
|
1325 |
-
* will then ensure that the scripts are not enqueued more than once.
|
1326 |
-
*/
|
1327 |
-
function enqueue_frontend_scripts( $instance ) {
|
1328 |
-
$this->enqueue_registered_scripts( $instance );
|
1329 |
-
$this->enqueue_registered_styles( $instance );
|
1330 |
-
|
1331 |
-
// Give plugins a chance to enqueue additional frontend scripts
|
1332 |
-
do_action('siteorigin_widgets_enqueue_frontend_scripts_' . $this->id_base, $instance, $this);
|
1333 |
-
}
|
1334 |
-
|
1335 |
-
/**
|
1336 |
-
* Can be overwritten by child widgets to enqueue admin scripts and styles if necessary.
|
1337 |
-
*/
|
1338 |
-
function enqueue_admin_scripts(){ }
|
1339 |
-
|
1340 |
-
/**
|
1341 |
-
* Check if we're currently in a preview
|
1342 |
-
*
|
1343 |
-
* @param array $instance
|
1344 |
-
*
|
1345 |
-
* @return bool
|
1346 |
-
*/
|
1347 |
-
function is_preview( $instance = array() ) {
|
1348 |
-
// Check if the instance is a preview
|
1349 |
-
if( !empty( $instance[ 'is_preview' ] ) ) return true;
|
1350 |
-
|
1351 |
-
// Check if the general request is a preview
|
1352 |
-
$is_preview =
|
1353 |
-
is_preview() || // Is this a standard preview
|
1354 |
-
$this->is_customize_preview() || // Is this a customizer preview
|
1355 |
-
$this->is_block_editor_page() || // Is this a block editor page
|
1356 |
-
!empty( $_GET['siteorigin_panels_live_editor'] ) || // Is this a Page Builder live editor request
|
1357 |
-
( !empty( $_REQUEST['action'] ) && $_REQUEST['action'] == 'so_panels_builder_content' ) || // Is this a Page Builder content ajax request
|
1358 |
-
! empty( $GLOBALS[ 'SITEORIGIN_PANELS_PREVIEW_RENDER' ] ); // Is this a Page Builder preview render.
|
1359 |
-
|
1360 |
-
return apply_filters( 'siteorigin_widgets_is_preview', $is_preview, $this );
|
1361 |
-
}
|
1362 |
-
|
1363 |
-
/**
|
1364 |
-
* Whether or not so show the 'Preview' button
|
1365 |
-
*
|
1366 |
-
* @return bool
|
1367 |
-
*/
|
1368 |
-
function show_preview_button(){
|
1369 |
-
$show_preview = ! empty( $this->widget_options['has_preview'] ) && ! $this->is_customize_preview();
|
1370 |
-
$show_preview = apply_filters( 'siteorigin_widgets_form_show_preview_button', $show_preview, $this );
|
1371 |
-
return $show_preview;
|
1372 |
-
}
|
1373 |
-
|
1374 |
-
/**
|
1375 |
-
* Get the global settings from the options table.
|
1376 |
-
*
|
1377 |
-
* @return mixed
|
1378 |
-
*/
|
1379 |
-
function get_global_settings( ){
|
1380 |
-
$values = get_option( 'so_widget_settings[' . $this->widget_class . ']', array() );
|
1381 |
-
|
1382 |
-
// Add in the defaults
|
1383 |
-
if( $this->has_form( 'settings' ) ) {
|
1384 |
-
$values = $this->add_defaults( $this->get_settings_form(), $values );
|
1385 |
-
}
|
1386 |
-
|
1387 |
-
return $values;
|
1388 |
-
}
|
1389 |
-
|
1390 |
-
/**
|
1391 |
-
* Save the global settings. Handles validation too.
|
1392 |
-
*
|
1393 |
-
* @param array $values The new values
|
1394 |
-
* @return array The sanitized values.
|
1395 |
-
*/
|
1396 |
-
function save_global_settings( $values ){
|
1397 |
-
$current = $this->get_global_settings();
|
1398 |
-
|
1399 |
-
$values = $this->update( $values, $current, 'settings' );
|
1400 |
-
|
1401 |
-
unset( $values['_sow_form_id'] );
|
1402 |
-
update_option( 'so_widget_settings[' . $this->widget_class . ']', $values );
|
1403 |
-
|
1404 |
-
return $values;
|
1405 |
-
}
|
1406 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SiteOrigin_Widget
|
5 |
+
*
|
6 |
+
* @author SiteOrigin <support@siteorigin.com>
|
7 |
+
*/
|
8 |
+
abstract class SiteOrigin_Widget extends WP_Widget {
|
9 |
+
protected $form_options;
|
10 |
+
protected $base_folder;
|
11 |
+
protected $field_ids;
|
12 |
+
protected $fields;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* The name of this widget class. Whatever the key for $wp_widgets_factory is.
|
16 |
+
*
|
17 |
+
* @var string
|
18 |
+
*/
|
19 |
+
protected $widget_class;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var array The array of registered frontend scripts
|
23 |
+
*/
|
24 |
+
protected $frontend_scripts = array();
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @var array The array of registered frontend styles
|
28 |
+
*/
|
29 |
+
protected $frontend_styles = array();
|
30 |
+
|
31 |
+
protected $generated_css = array();
|
32 |
+
protected $current_instance;
|
33 |
+
protected $instance_storage;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var int How many seconds a CSS file is valid for.
|
37 |
+
*/
|
38 |
+
static $css_expire = 604800; // 7 days
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @param string $id
|
42 |
+
* @param string $name
|
43 |
+
* @param array $widget_options Optional Normal WP_Widget widget options and a few extras.
|
44 |
+
* - help: A URL which, if present, causes a help link to be displayed on the Edit Widget modal.
|
45 |
+
* - instance_storage: Whether or not to temporarily store instances of this widget.
|
46 |
+
* - has_preview: Whether or not this widget has a preview to display. If false, the form does not output a
|
47 |
+
* 'Preview' button.
|
48 |
+
* @param array $control_options Optional Normal WP_Widget control options.
|
49 |
+
* @param array $form_options Optional An array describing the form fields used to configure SiteOrigin widgets.
|
50 |
+
* @param mixed $base_folder Optional
|
51 |
+
*
|
52 |
+
*/
|
53 |
+
function __construct($id, $name, $widget_options = array(), $control_options = array(), $form_options = array(), $base_folder = false) {
|
54 |
+
$this->form_options = $form_options;
|
55 |
+
$this->base_folder = $base_folder;
|
56 |
+
$this->field_ids = array();
|
57 |
+
$this->fields = array();
|
58 |
+
|
59 |
+
$widget_options = wp_parse_args( $widget_options, array(
|
60 |
+
'has_preview' => true,
|
61 |
+
) );
|
62 |
+
|
63 |
+
$control_options = wp_parse_args( $control_options, array(
|
64 |
+
'width' => 800,
|
65 |
+
) );
|
66 |
+
|
67 |
+
if( empty( $this->widget_class ) ) {
|
68 |
+
$this->widget_class = get_class( $this );
|
69 |
+
}
|
70 |
+
|
71 |
+
parent::__construct($id, $name, $widget_options, $control_options);
|
72 |
+
$this->initialize();
|
73 |
+
|
74 |
+
// Let other plugins do additional initializing here
|
75 |
+
do_action('siteorigin_widgets_initialize_widget_' . $this->id_base, $this);
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Initialize this widget in whatever way we need to. Run before rendering widget or form.
|
80 |
+
*/
|
81 |
+
function initialize(){
|
82 |
+
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Get the main widget form. This should be overwritten by child widgets.
|
87 |
+
*
|
88 |
+
* @return array
|
89 |
+
*/
|
90 |
+
function get_widget_form(){
|
91 |
+
return method_exists( $this, 'initialize_form' ) ? $this->initialize_form() : array();
|
92 |
+
}
|
93 |
+
|
94 |
+
private function get_cached_widget_form() {
|
95 |
+
$cache_key = $this->id_base . '_form';
|
96 |
+
$form_options = wp_cache_get( $cache_key, 'siteorigin_widgets' );
|
97 |
+
|
98 |
+
if ( empty( $form_options ) ) {
|
99 |
+
$form_options = $this->get_widget_form();
|
100 |
+
wp_cache_set( $cache_key, $form_options, 'siteorigin_widgets' );
|
101 |
+
}
|
102 |
+
|
103 |
+
return $form_options;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Check if a child widget implements a specific form type.
|
108 |
+
*
|
109 |
+
* @param string $form_type
|
110 |
+
* @return bool
|
111 |
+
*/
|
112 |
+
function has_form( $form_type = 'widget' ){
|
113 |
+
return method_exists( $this, 'get_' . $form_type . '_form' );
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Get a specific type of form.
|
118 |
+
*
|
119 |
+
* @param $form_type
|
120 |
+
* @return array The form array, or an empty array if the form doesn't exist.
|
121 |
+
*/
|
122 |
+
function get_form( $form_type ) {
|
123 |
+
return $this->has_form( $form_type ) ? call_user_func( array( $this, 'get_' . $form_type . '_form' ) ) : array();
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Get the main form options and allow child widgets to modify that form.
|
128 |
+
*
|
129 |
+
* @param bool|SiteOrigin_Widget $parent
|
130 |
+
*
|
131 |
+
* @return mixed
|
132 |
+
*/
|
133 |
+
function form_options( $parent = false ) {
|
134 |
+
if( empty( $this->form_options ) ) {
|
135 |
+
// If the widget doesn't have form_options defined from the constructor, then it might be defining them in the get_widget_form function
|
136 |
+
$this->form_options = $this->get_cached_widget_form();
|
137 |
+
}
|
138 |
+
|
139 |
+
$form_options = $this->modify_form( $this->form_options );
|
140 |
+
if( !empty($parent) ) {
|
141 |
+
$form_options = $parent->modify_child_widget_form( $form_options, $this );
|
142 |
+
}
|
143 |
+
|
144 |
+
// Give other plugins a way to modify this form.
|
145 |
+
$form_options = apply_filters( 'siteorigin_widgets_form_options', $form_options, $this );
|
146 |
+
$form_options = apply_filters( 'siteorigin_widgets_form_options_' . $this->id_base, $form_options, $this );
|
147 |
+
return $form_options;
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Display the widget.
|
152 |
+
*
|
153 |
+
* @param array $args
|
154 |
+
* @param array $instance
|
155 |
+
*/
|
156 |
+
public function widget( $args, $instance ) {
|
157 |
+
if( empty( $this->form_options ) ) {
|
158 |
+
$form_options = $this->get_cached_widget_form();
|
159 |
+
}
|
160 |
+
else {
|
161 |
+
$form_options = $this->modify_form( $this->form_options );
|
162 |
+
}
|
163 |
+
|
164 |
+
$instance = $this->modify_instance( $instance );
|
165 |
+
|
166 |
+
// Filter the instance
|
167 |
+
$instance = apply_filters( 'siteorigin_widgets_instance', $instance, $this );
|
168 |
+
$instance = apply_filters( 'siteorigin_widgets_instance_' . $this->id_base, $instance, $this );
|
169 |
+
|
170 |
+
$args = wp_parse_args( $args, array(
|
171 |
+
'before_widget' => '',
|
172 |
+
'after_widget' => '',
|
173 |
+
'before_title' => '',
|
174 |
+
'after_title' => '',
|
175 |
+
) );
|
176 |
+
|
177 |
+
// Add any missing default values to the instance
|
178 |
+
$instance = $this->add_defaults( $form_options, $instance );
|
179 |
+
|
180 |
+
$css_name = $this->generate_and_enqueue_instance_styles( $instance );
|
181 |
+
$this->enqueue_frontend_scripts( $instance );
|
182 |
+
|
183 |
+
$template_vars = $this->get_template_variables($instance, $args);
|
184 |
+
$template_vars = apply_filters( 'siteorigin_widgets_template_variables_' . $this->id_base, $template_vars, $instance, $args, $this );
|
185 |
+
|
186 |
+
// Storage hash allows templates to get access to
|
187 |
+
$template_vars[ 'storage_hash' ] = '';
|
188 |
+
if( !empty($this->widget_options['instance_storage']) ) {
|
189 |
+
$stored_instance = $this->modify_stored_instance($instance);
|
190 |
+
// We probably don't want panels_info
|
191 |
+
unset( $stored_instance['panels_info'] );
|
192 |
+
|
193 |
+
$template_vars[ 'storage_hash' ] = substr( md5( serialize( $stored_instance ) ), 0, 8 );
|
194 |
+
if( !empty( $stored_instance ) && !$this->is_preview( $instance ) ) {
|
195 |
+
// Store this if we have a non empty instance and are not previewing
|
196 |
+
set_transient('sow_inst[' . $this->id_base . '][' . $template_vars['storage_hash'] . ']', $stored_instance, 7*86400);
|
197 |
+
}
|
198 |
+
}
|
199 |
+
|
200 |
+
if( ! method_exists( $this, 'get_html_content' ) ) {
|
201 |
+
$template_file = siteorigin_widget_get_plugin_dir_path( $this->id_base ) . $this->get_template_dir( $instance ) . '/' . $this->get_template_name( $instance ) . '.php';
|
202 |
+
$template_file = apply_filters('siteorigin_widgets_template_file_' . $this->id_base, $template_file, $instance, $this );
|
203 |
+
$template_file = realpath($template_file);
|
204 |
+
|
205 |
+
// Don't accept non PHP files
|
206 |
+
if( substr($template_file, -4) != '.php' ) $template_file = false;
|
207 |
+
|
208 |
+
ob_start();
|
209 |
+
if( !empty($template_file) && file_exists($template_file) ) {
|
210 |
+
extract( $template_vars );
|
211 |
+
@ include $template_file;
|
212 |
+
}
|
213 |
+
$template_html = ob_get_clean();
|
214 |
+
|
215 |
+
// This is a legacy, undocumented filter.
|
216 |
+
$template_html = apply_filters( 'siteorigin_widgets_template', $template_html, $this->widget_class, $instance, $this );
|
217 |
+
$template_html = apply_filters( 'siteorigin_widgets_template_html_' . $this->id_base, $template_html, $instance, $this );
|
218 |
+
}
|
219 |
+
else {
|
220 |
+
$template_html = $this->get_html_content( $instance, $args, $template_vars, $css_name );
|
221 |
+
}
|
222 |
+
|
223 |
+
$wrapper_classes = apply_filters(
|
224 |
+
'siteorigin_widgets_wrapper_classes_' . $this->id_base,
|
225 |
+
array( 'so-widget-' . $this->id_base, 'so-widget-'.$css_name ),
|
226 |
+
$instance,
|
227 |
+
$this
|
228 |
+
);
|
229 |
+
$wrapper_classes = array_map( 'sanitize_html_class', $wrapper_classes );
|
230 |
+
|
231 |
+
$wrapper_data_string = $this->get_wrapper_data( $instance );
|
232 |
+
|
233 |
+
do_action( 'siteorigin_widgets_before_widget_' . $this->id_base, $instance, $this );
|
234 |
+
echo $args['before_widget'];
|
235 |
+
echo '<div class="' . esc_attr( implode( ' ', $wrapper_classes ) ) . '"' . $wrapper_data_string . '>';
|
236 |
+
echo $template_html;
|
237 |
+
echo '</div>';
|
238 |
+
echo $args['after_widget'];
|
239 |
+
do_action( 'siteorigin_widgets_after_widget_' . $this->id_base, $instance, $this );
|
240 |
+
|
241 |
+
if ( $this->is_preview( $instance ) ) {
|
242 |
+
// print inline styles if we're preview the widget.
|
243 |
+
siteorigin_widget_print_styles();
|
244 |
+
}
|
245 |
+
}
|
246 |
+
|
247 |
+
private function get_wrapper_data( $instance ) {
|
248 |
+
$data = apply_filters(
|
249 |
+
'siteorigin_widgets_wrapper_data_' . $this->id_base,
|
250 |
+
array(),
|
251 |
+
$instance,
|
252 |
+
$this
|
253 |
+
);
|
254 |
+
$wrapper_attr_string = '';
|
255 |
+
foreach ( $data as $name => $value ) {
|
256 |
+
$wrapper_attr_string .= ' data-' . esc_html( $name ) . '="' . esc_attr( $value ) . '"';
|
257 |
+
}
|
258 |
+
|
259 |
+
return $wrapper_attr_string;
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Generate the CSS for this widget and display it in the appropriate way
|
264 |
+
*
|
265 |
+
* @param $instance array The instance array
|
266 |
+
*
|
267 |
+
* @return string The CSS name
|
268 |
+
*/
|
269 |
+
function generate_and_enqueue_instance_styles( $instance ) {
|
270 |
+
if( empty( $form_options ) ) {
|
271 |
+
$form_options = $this->get_cached_widget_form();
|
272 |
+
}
|
273 |
+
else {
|
274 |
+
$form_options = $this->modify_form( $this->form_options );
|
275 |
+
}
|
276 |
+
|
277 |
+
// We'll assume empty instances don't have styles
|
278 |
+
if( empty($instance) ) return;
|
279 |
+
|
280 |
+
// Make sure all the default values are in place
|
281 |
+
$instance = $this->add_defaults( $form_options, $instance );
|
282 |
+
|
283 |
+
$this->current_instance = $instance;
|
284 |
+
$style = $this->get_style_name( $instance );
|
285 |
+
|
286 |
+
$upload_dir = wp_upload_dir();
|
287 |
+
$this->clear_file_cache();
|
288 |
+
|
289 |
+
if( !empty($style) ) {
|
290 |
+
$hash = $this->get_style_hash( $instance );
|
291 |
+
$css_name = $this->id_base.'-'.$style.'-'.$hash;
|
292 |
+
|
293 |
+
//Ensure styles aren't generated and enqueued more than once.
|
294 |
+
$in_preview = $this->is_preview( $instance );
|
295 |
+
if ( ! in_array( $css_name, $this->generated_css ) || $in_preview ) {
|
296 |
+
if( $in_preview ) {
|
297 |
+
siteorigin_widget_add_inline_css( $this->get_instance_css( $instance ) );
|
298 |
+
}
|
299 |
+
else {
|
300 |
+
if( !file_exists( $upload_dir['basedir'] . '/siteorigin-widgets/' . $css_name .'.css' ) || ( defined('SITEORIGIN_WIDGETS_DEBUG') && SITEORIGIN_WIDGETS_DEBUG ) ) {
|
301 |
+
// Attempt to recreate the CSS
|
302 |
+
$this->save_css( $instance );
|
303 |
+
}
|
304 |
+
|
305 |
+
if( file_exists( $upload_dir['basedir'] . '/siteorigin-widgets/' . $css_name .'.css' ) ) {
|
306 |
+
if ( ! wp_style_is( $css_name ) ) {
|
307 |
+
wp_enqueue_style(
|
308 |
+
$css_name,
|
309 |
+
set_url_scheme($upload_dir['baseurl'] . '/siteorigin-widgets/' . $css_name .'.css')
|
310 |
+
);
|
311 |
+
}
|
312 |
+
}
|
313 |
+
else {
|
314 |
+
// Fall back to using inline CSS if we can't find the cached CSS file.
|
315 |
+
// Try get the cached value.
|
316 |
+
$css = wp_cache_get( $css_name, 'siteorigin_widgets' );
|
317 |
+
if ( empty( $css ) ) {
|
318 |
+
$css = $this->get_instance_css( $instance );
|
319 |
+
}
|
320 |
+
siteorigin_widget_add_inline_css( $css );
|
321 |
+
}
|
322 |
+
}
|
323 |
+
$this->generated_css[] = $css_name;
|
324 |
+
}
|
325 |
+
}
|
326 |
+
else {
|
327 |
+
$css_name = $this->id_base.'-base';
|
328 |
+
}
|
329 |
+
|
330 |
+
$this->current_instance = false;
|
331 |
+
return $css_name;
|
332 |
+
}
|
333 |
+
|
334 |
+
private function is_customize_preview(){
|
335 |
+
global $wp_customize;
|
336 |
+
return is_a( $wp_customize, 'WP_Customize_Manager' ) && $wp_customize->is_preview();
|
337 |
+
}
|
338 |
+
|
339 |
+
private function is_block_editor_page() {
|
340 |
+
$current_screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null;
|
341 |
+
|
342 |
+
// This is for the Gutenberg plugin.
|
343 |
+
$is_gutenberg_page = $current_screen != null &&
|
344 |
+
function_exists( 'is_gutenberg_page' ) &&
|
345 |
+
is_gutenberg_page();
|
346 |
+
// This is for WP 5 with the integrated block editor.
|
347 |
+
$is_block_editor = false;
|
348 |
+
if ( ! empty( $current_screen ) && method_exists( $current_screen, 'is_block_editor' ) ) {
|
349 |
+
$is_block_editor = $current_screen->is_block_editor();
|
350 |
+
}
|
351 |
+
|
352 |
+
return $is_block_editor || $is_gutenberg_page;
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Get an array of variables to make available to templates. By default, just return an array. Should be overwritten by child widgets.
|
357 |
+
*
|
358 |
+
* @param $instance
|
359 |
+
* @param $args
|
360 |
+
*
|
361 |
+
* @return array
|
362 |
+
*/
|
363 |
+
public function get_template_variables( $instance, $args ){
|
364 |
+
return array();
|
365 |
+
}
|
366 |
+
|
367 |
+
/**
|
368 |
+
* Render a sub widget. This should be used inside template files.
|
369 |
+
*
|
370 |
+
* @param $class
|
371 |
+
* @param $args
|
372 |
+
* @param $instance
|
373 |
+
*/
|
374 |
+
public function sub_widget($class, $args, $instance){
|
375 |
+
if(!class_exists($class)) return;
|
376 |
+
$widget = new $class;
|
377 |
+
|
378 |
+
$args['before_widget'] = '';
|
379 |
+
$args['after_widget'] = '';
|
380 |
+
|
381 |
+
$widget->widget( $args, $instance );
|
382 |
+
}
|
383 |
+
|
384 |
+
/**
|
385 |
+
* Add default values to the instance.
|
386 |
+
*
|
387 |
+
* @param $form
|
388 |
+
* @param $instance
|
389 |
+
*/
|
390 |
+
function add_defaults( $form, $instance, $level = 0 ){
|
391 |
+
if( $level > 10 ) return $instance;
|
392 |
+
|
393 |
+
foreach($form as $id => $field) {
|
394 |
+
|
395 |
+
if( $field['type'] == 'repeater' ) {
|
396 |
+
if( !empty($instance[$id]) ) {
|
397 |
+
foreach( array_keys($instance[$id]) as $i ){
|
398 |
+
$instance[$id][$i] = $this->add_defaults( $field['fields'], $instance[$id][$i], $level + 1 );
|
399 |
+
}
|
400 |
+
}
|
401 |
+
}
|
402 |
+
else if( $field['type'] == 'section' ) {
|
403 |
+
if( empty($instance[$id]) ) {
|
404 |
+
$instance[$id] = array();
|
405 |
+
}
|
406 |
+
$instance[$id] = $this->add_defaults( $field['fields'], $instance[$id], $level + 1 );
|
407 |
+
}
|
408 |
+
else if( $field['type'] == 'measurement' ) {
|
409 |
+
if( ! isset( $instance[$id] ) ) {
|
410 |
+
$instance[$id] = isset( $field['default'] ) ? $field['default'] : '';
|
411 |
+
}
|
412 |
+
if ( empty( $instance[ $id . '_unit' ] ) ) {
|
413 |
+
$instance[ $id . '_unit' ] = 'px';
|
414 |
+
}
|
415 |
+
}
|
416 |
+
else if ( $field['type'] == 'order') {
|
417 |
+
if ( empty( $instance[$id] ) ) {
|
418 |
+
if( ! empty( $field['default'] ) ) {
|
419 |
+
$instance[$id] = $field['default'];
|
420 |
+
} else {
|
421 |
+
// If no default order is specified, just use the order of the options.
|
422 |
+
$instance[$id] = array_keys( $field['options'] );
|
423 |
+
}
|
424 |
+
}
|
425 |
+
}
|
426 |
+
else {
|
427 |
+
if( !isset( $instance[$id] ) ) {
|
428 |
+
$instance[$id] = isset( $field['default'] ) ? $field['default'] : '';
|
429 |
+
}
|
430 |
+
}
|
431 |
+
}
|
432 |
+
|
433 |
+
return $instance;
|
434 |
+
}
|
435 |
+
|
436 |
+
/**
|
437 |
+
* Display the widget form.
|
438 |
+
*
|
439 |
+
* @param array $instance
|
440 |
+
* @param string $form_type Which type of form we're using
|
441 |
+
*
|
442 |
+
* @return string|void
|
443 |
+
*/
|
444 |
+
public function form( $instance, $form_type = 'widget' ) {
|
445 |
+
if( $form_type == 'widget' ) {
|
446 |
+
if( empty( $this->form_options ) ) {
|
447 |
+
$this->form_options = $this->form_options();
|
448 |
+
}
|
449 |
+
$form_options = $this->form_options;
|
450 |
+
}
|
451 |
+
else {
|
452 |
+
$form_options = $this->get_form( $form_type );
|
453 |
+
}
|
454 |
+
|
455 |
+
$instance = $this->modify_instance($instance);
|
456 |
+
$instance = $this->add_defaults( $form_options, $instance );
|
457 |
+
|
458 |
+
if( empty( $this->number ) ) {
|
459 |
+
// Compatibility with form widgets.
|
460 |
+
$this->number = 1;
|
461 |
+
}
|
462 |
+
|
463 |
+
// Filter the instance specifically for the form
|
464 |
+
$instance = apply_filters('siteorigin_widgets_form_instance_' . $this->id_base, $instance, $this);
|
465 |
+
|
466 |
+
// `more_entropy` adds a period to the id.
|
467 |
+
$id = str_replace( '.', '', uniqid( rand(), true ) );
|
468 |
+
$form_id = 'siteorigin_widget_form_' . md5( $id );
|
469 |
+
$class_name = str_replace( '_', '-', strtolower( $this->widget_class ) );
|
470 |
+
|
471 |
+
if( empty( $instance['_sow_form_id'] ) ) {
|
472 |
+
$instance['_sow_form_id'] = $id;
|
473 |
+
}
|
474 |
+
?>
|
475 |
+
<div class="siteorigin-widget-form siteorigin-widget-form-main siteorigin-widget-form-main-<?php echo esc_attr($class_name) ?>"
|
476 |
+
id="<?php echo $form_id ?>" data-class="<?php echo esc_attr( $this->widget_class ) ?>"
|
477 |
+
data-id-base="<?php echo esc_attr( $this->id_base ) ?>" style="display: none">
|
478 |
+
<?php
|
479 |
+
$this->display_teaser_message();
|
480 |
+
/* @var $field_factory SiteOrigin_Widget_Field_Factory */
|
481 |
+
$field_factory = SiteOrigin_Widget_Field_Factory::single();
|
482 |
+
$fields_javascript_variables = array();
|
483 |
+
foreach( $form_options as $field_name => $field_options ) {
|
484 |
+
/* @var $field SiteOrigin_Widget_Field_Base */
|
485 |
+
$field = $field_factory->create_field( $field_name, $field_options, $this );
|
486 |
+
$field->render( isset( $instance[$field_name] ) ? $instance[$field_name] : null, $instance );
|
487 |
+
$field_js_vars = $field->get_javascript_variables();
|
488 |
+
if( ! empty( $field_js_vars ) ) {
|
489 |
+
$fields_javascript_variables[$field_name] = $field_js_vars;
|
490 |
+
}
|
491 |
+
$field->enqueue_scripts();
|
492 |
+
$this->fields[$field_name] = $field;
|
493 |
+
}
|
494 |
+
?>
|
495 |
+
<input type="hidden" name="<?php echo $this->so_get_field_name('_sow_form_id') ?>" value="<?php echo esc_attr( $instance['_sow_form_id'] ) ?>" class="siteorigin-widgets-form-id" />
|
496 |
+
<input type="hidden" name="<?php echo $this->so_get_field_name('_sow_form_timestamp') ?>" value="<?php echo ! empty( $instance['_sow_form_timestamp'] ) ? esc_attr( $instance['_sow_form_timestamp'] ) : '' ?>" class="siteorigin-widgets-form-timestamp" />
|
497 |
+
</div>
|
498 |
+
<div class="siteorigin-widget-form-no-styles">
|
499 |
+
<?php $this->scripts_loading_message() ?>
|
500 |
+
</div>
|
501 |
+
|
502 |
+
<?php if( $this->show_preview_button() ) : ?>
|
503 |
+
<div class="siteorigin-widget-preview" style="display: none">
|
504 |
+
<a href="#" class="siteorigin-widget-preview-button button-secondary"><?php _e('Preview', 'so-widgets-bundle') ?></a>
|
505 |
+
</div>
|
506 |
+
<?php endif; ?>
|
507 |
+
|
508 |
+
<?php if( !empty( $this->widget_options['help'] ) ) : ?>
|
509 |
+
<a href="<?php echo sow_esc_url($this->widget_options['help']) ?>" class="siteorigin-widget-help-link siteorigin-panels-help-link" target="_blank" rel="noopener noreferrer"><?php _e('Help', 'so-widgets-bundle') ?></a>
|
510 |
+
<?php endif; ?>
|
511 |
+
|
512 |
+
<script type="text/javascript">
|
513 |
+
( function($) {
|
514 |
+
if(typeof window.sow_field_javascript_variables == 'undefined') window.sow_field_javascript_variables = {};
|
515 |
+
window.sow_field_javascript_variables["<?php echo addslashes( $this->widget_class ) ?>"] = <?php echo json_encode( $fields_javascript_variables ) ?>;
|
516 |
+
|
517 |
+
if( typeof $.fn.sowSetupForm != 'undefined' ) {
|
518 |
+
$('#<?php echo $form_id ?>').sowSetupForm();
|
519 |
+
}
|
520 |
+
else {
|
521 |
+
// Init once admin scripts have been loaded
|
522 |
+
$( document).on('sowadminloaded', function(){
|
523 |
+
$('#<?php echo $form_id ?>').sowSetupForm();
|
524 |
+
});
|
525 |
+
}
|
526 |
+
} )( jQuery );
|
527 |
+
</script>
|
528 |
+
<?php
|
529 |
+
|
530 |
+
$this->enqueue_scripts( $form_type );
|
531 |
+
}
|
532 |
+
|
533 |
+
/**
|
534 |
+
* Display the teaser message.
|
535 |
+
*/
|
536 |
+
function display_teaser_message(){
|
537 |
+
if(
|
538 |
+
method_exists( $this, 'get_form_teaser' ) &&
|
539 |
+
( $teaser = $this->get_form_teaser() )
|
540 |
+
) {
|
541 |
+
if ( ! is_admin() ) {
|
542 |
+
wp_enqueue_style( 'dashicons' );
|
543 |
+
}
|
544 |
+
|
545 |
+
$dismissed = get_user_meta( get_current_user_id(), 'teasers_dismissed', true );
|
546 |
+
if( empty( $dismissed[ $this->id_base ] ) ) {
|
547 |
+
$dismiss_url = add_query_arg( array(
|
548 |
+
'action' => 'so_dismiss_widget_teaser',
|
549 |
+
'widget' => $this->id_base,
|
550 |
+
), admin_url( 'admin-ajax.php' ) );
|
551 |
+
$dismiss_url = wp_nonce_url( $dismiss_url, 'dismiss-widget-teaser' );
|
552 |
+
|
553 |
+
?>
|
554 |
+
<div class="siteorigin-widget-teaser">
|
555 |
+
<?php echo wp_kses_post( $teaser ) ?>
|
556 |
+
<span class="dashicons dashicons-dismiss" data-dismiss-url="<?php echo esc_url( $dismiss_url ) ?>"></span>
|
557 |
+
</div>
|
558 |
+
<?php
|
559 |
+
}
|
560 |
+
}
|
561 |
+
}
|
562 |
+
|
563 |
+
/**
|
564 |
+
* Should we display the teaser for SiteOrigin Premium
|
565 |
+
*
|
566 |
+
* @return bool
|
567 |
+
*/
|
568 |
+
function display_siteorigin_premium_teaser(){
|
569 |
+
return apply_filters( 'siteorigin_premium_upgrade_teaser', true ) &&
|
570 |
+
! defined( 'SITEORIGIN_PREMIUM_VERSION' );
|
571 |
+
}
|
572 |
+
|
573 |
+
function scripts_loading_message(){
|
574 |
+
?>
|
575 |
+
<p><strong><?php _e('This widget has scripts and styles that need to be loaded before you can use it. Please save and reload your current page.', 'so-widgets-bundle') ?></strong></p>
|
576 |
+
<p><strong><?php _e('You will only need to do this once.', 'so-widgets-bundle') ?></strong></p>
|
577 |
+
<?php
|
578 |
+
}
|
579 |
+
|
580 |
+
/**
|
581 |
+
* Enqueue the admin scripts for the widget form.
|
582 |
+
*
|
583 |
+
* @param bool|string $form_type Should we enqueue the field scripts too?
|
584 |
+
*/
|
585 |
+
function enqueue_scripts( $form_type = false ) {
|
586 |
+
|
587 |
+
if( ! wp_script_is('siteorigin-widget-admin') ) {
|
588 |
+
wp_enqueue_style( 'wp-color-picker' );
|
589 |
+
wp_enqueue_style( 'siteorigin-widget-admin', plugin_dir_url(SOW_BUNDLE_BASE_FILE).'base/css/admin.css', array( 'media-views' ), SOW_BUNDLE_VERSION );
|
590 |
+
|
591 |
+
wp_enqueue_script( 'wp-color-picker' );
|
592 |
+
wp_enqueue_media();
|
593 |
+
wp_enqueue_script(
|
594 |
+
'siteorigin-widget-admin',
|
595 |
+
plugin_dir_url( SOW_BUNDLE_BASE_FILE ) . 'base/js/admin' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
596 |
+
array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-slider', 'underscore' ),
|
597 |
+
SOW_BUNDLE_VERSION,
|
598 |
+
true
|
599 |
+
);
|
600 |
+
|
601 |
+
wp_localize_script( 'siteorigin-widget-admin', 'soWidgets', array(
|
602 |
+
'ajaxurl' => wp_nonce_url( admin_url('admin-ajax.php'), 'widgets_action', '_widgets_nonce' ),
|
603 |
+
'sure' => __('Are you sure?', 'so-widgets-bundle'),
|
604 |
+
'backup' => array(
|
605 |
+
'newerVersion' => __( "There is a newer version of this widget's content available.", 'so-widgets-bundle' ),
|
606 |
+
'restore' => __( 'Restore', 'so-widgets-bundle' ),
|
607 |
+
'dismiss' => __( 'Dismiss', 'so-widgets-bundle' ),
|
608 |
+
'replaceWarning' => sprintf(
|
609 |
+
__( 'Clicking %s will replace the current widget contents. You can revert by refreshing the page before updating.', 'so-widgets-bundle' ),
|
610 |
+
'<em>' . __( 'Restore', 'so-widgets-bundle' ) . '</em>'
|
611 |
+
),
|
612 |
+
),
|
613 |
+
) );
|
614 |
+
|
615 |
+
global $wp_customize;
|
616 |
+
if ( isset( $wp_customize ) ) {
|
617 |
+
$this->footer_admin_templates();
|
618 |
+
}
|
619 |
+
else {
|
620 |
+
add_action( 'admin_footer', array( $this, 'footer_admin_templates' ) );
|
621 |
+
}
|
622 |
+
}
|
623 |
+
|
624 |
+
if( !empty( $form_type ) && $this->has_form( $form_type ) ) {
|
625 |
+
// Enqueue field scripts for the given form type
|
626 |
+
$form_options = $this->get_form( $form_type );
|
627 |
+
$this->enqueue_field_scripts( $form_options );
|
628 |
+
}
|
629 |
+
|
630 |
+
// This lets the widget enqueue any specific admin scripts
|
631 |
+
$this->enqueue_admin_scripts();
|
632 |
+
do_action( 'siteorigin_widgets_enqueue_admin_scripts_' . $this->id_base, $this );
|
633 |
+
}
|
634 |
+
|
635 |
+
function enqueue_field_scripts( $fields ){
|
636 |
+
/* @var $field_factory SiteOrigin_Widget_Field_Factory */
|
637 |
+
$field_factory = SiteOrigin_Widget_Field_Factory::single();
|
638 |
+
|
639 |
+
foreach( $fields as $field_name => $field_options ) {
|
640 |
+
/* @var $field SiteOrigin_Widget_Field_Base */
|
641 |
+
$field = $field_factory->create_field( $field_name, $field_options, $this );
|
642 |
+
$field->enqueue_scripts();
|
643 |
+
|
644 |
+
if( !empty( $field_options['fields'] ) ) {
|
645 |
+
$this->enqueue_field_scripts( $field_options['fields'] );
|
646 |
+
}
|
647 |
+
}
|
648 |
+
}
|
649 |
+
|
650 |
+
/**
|
651 |
+
* Display all the admin stuff for the footer
|
652 |
+
*/
|
653 |
+
function footer_admin_templates(){
|
654 |
+
?>
|
655 |
+
<script type="text/template" id="so-widgets-bundle-tpl-preview-dialog">
|
656 |
+
<div class="so-widgets-dialog">
|
657 |
+
<div class="so-widgets-dialog-overlay"></div>
|
658 |
+
|
659 |
+
<div class="so-widgets-toolbar">
|
660 |
+
<h3><?php _e( 'Widget Preview', 'so-widgets-bundle' ) ?></h3>
|
661 |
+
<div class="close"><span class="dashicons dashicons-arrow-left-alt2"></span></div>
|
662 |
+
</div>
|
663 |
+
|
664 |
+
<div class="so-widgets-dialog-frame">
|
665 |
+
<iframe name="siteorigin-widgets-preview-iframe" id="siteorigin-widget-preview-iframe" style="visibility: hidden"></iframe>
|
666 |
+
</div>
|
667 |
+
|
668 |
+
<form target="siteorigin-widgets-preview-iframe" action="<?php echo wp_nonce_url( admin_url('admin-ajax.php'), 'widgets_action', '_widgets_nonce' ) ?>" method="post">
|
669 |
+
<input type="hidden" name="action" value="so_widgets_preview" />
|
670 |
+
<input type="hidden" name="data" value="" />
|
671 |
+
<input type="hidden" name="class" value="" />
|
672 |
+
</form>
|
673 |
+
|
674 |
+
</div>
|
675 |
+
</script>
|
676 |
+
<?php
|
677 |
+
|
678 |
+
// Give other plugins a chance to add their own
|
679 |
+
do_action('siteorigin_widgets_footer_admin_templates');
|
680 |
+
}
|
681 |
+
|
682 |
+
/**
|
683 |
+
* Update the widget instance.
|
684 |
+
*
|
685 |
+
* @param array $new_instance
|
686 |
+
* @param array $old_instance
|
687 |
+
* @param string $form_type The type of form we're using.
|
688 |
+
* @return array|void
|
689 |
+
*/
|
690 |
+
public function update( $new_instance, $old_instance, $form_type = 'widget' ) {
|
691 |
+
if( !class_exists('SiteOrigin_Widgets_Color_Object') ) require plugin_dir_path( __FILE__ ).'inc/color.php';
|
692 |
+
|
693 |
+
if( $form_type == 'widget' ) {
|
694 |
+
if( empty( $this->form_options ) ) {
|
695 |
+
$this->form_options = $this->form_options();
|
696 |
+
}
|
697 |
+
$form_options = $this->form_options;
|
698 |
+
}
|
699 |
+
else {
|
700 |
+
$form_options = $this->get_form( $form_type );
|
701 |
+
}
|
702 |
+
|
703 |
+
if( ! empty( $form_options ) ) {
|
704 |
+
/* @var $field_factory SiteOrigin_Widget_Field_Factory */
|
705 |
+
$field_factory = SiteOrigin_Widget_Field_Factory::single();
|
706 |
+
foreach ( $form_options as $field_name => $field_options ) {
|
707 |
+
/* @var $field SiteOrigin_Widget_Field_Base */
|
708 |
+
if ( !empty( $this->fields ) && !empty( $this->fields[$field_name] ) ) {
|
709 |
+
$field = $this->fields[$field_name];
|
710 |
+
}
|
711 |
+
else {
|
712 |
+
$field = $field_factory->create_field( $field_name, $field_options, $this );
|
713 |
+
$this->fields[$field_name] = $field;
|
714 |
+
}
|
715 |
+
$new_instance[$field_name] = $field->sanitize(
|
716 |
+
isset( $new_instance[$field_name] ) ? $new_instance[$field_name] : null,
|
717 |
+
$new_instance,
|
718 |
+
isset( $old_instance[$field_name] ) ? $old_instance[$field_name] : null
|
719 |
+
);
|
720 |
+
$new_instance = $field->sanitize_instance( $new_instance );
|
721 |
+
}
|
722 |
+
|
723 |
+
// Let other plugins also sanitize the instance
|
724 |
+
$new_instance = apply_filters( 'siteorigin_widgets_sanitize_instance', $new_instance, $form_options, $this );
|
725 |
+
$new_instance = apply_filters( 'siteorigin_widgets_sanitize_instance_' . $this->id_base, $new_instance, $form_options, $this );
|
726 |
+
}
|
727 |
+
|
728 |
+
// Remove the old CSS, it'll be regenerated on page load.
|
729 |
+
$this->delete_css( $this->modify_instance( $old_instance ) );
|
730 |
+
return $new_instance;
|
731 |
+
}
|
732 |
+
|
733 |
+
/**
|
734 |
+
* Save the CSS to the filesystem
|
735 |
+
*
|
736 |
+
* @param $instance
|
737 |
+
* @return bool|string
|
738 |
+
*/
|
739 |
+
private function save_css( $instance ){
|
740 |
+
require_once ABSPATH . 'wp-admin/includes/file.php';
|
741 |
+
|
742 |
+
$style = $this->get_style_name($instance);
|
743 |
+
$hash = $this->get_style_hash( $instance );
|
744 |
+
$name = $this->id_base.'-'.$style.'-'.$hash.'.css';
|
745 |
+
|
746 |
+
$css = $this->get_instance_css($instance);
|
747 |
+
|
748 |
+
if ( ! empty( $css ) ) {
|
749 |
+
if ( WP_Filesystem() ) {
|
750 |
+
global $wp_filesystem;
|
751 |
+
$upload_dir = wp_upload_dir();
|
752 |
+
|
753 |
+
$dir_exists = $wp_filesystem->is_dir( $upload_dir['basedir'] . '/siteorigin-widgets/' );
|
754 |
+
|
755 |
+
if ( empty( $dir_exists ) ) {
|
756 |
+
// The 'siteorigin-widgets' directory doesn't exist, so try to create it.
|
757 |
+
$dir_exists = $wp_filesystem->mkdir( $upload_dir['basedir'] . '/siteorigin-widgets/' );
|
758 |
+
}
|
759 |
+
|
760 |
+
if ( ! empty( $dir_exists ) ) {
|
761 |
+
// The 'siteorigin-widgets' directory exists, so we can try to write the CSS to a file.
|
762 |
+
$wp_filesystem->delete( $upload_dir['basedir'] . '/siteorigin-widgets/' . $name );
|
763 |
+
$file_put_success = $wp_filesystem->put_contents(
|
764 |
+
$upload_dir['basedir'] . '/siteorigin-widgets/' . $name,
|
765 |
+
$css
|
766 |
+
);
|
767 |
+
|
768 |
+
// Alert other plugins that we've added a new CSS file
|
769 |
+
do_action( 'siteorigin_widgets_stylesheet_added', $name, $instance );
|
770 |
+
}
|
771 |
+
}
|
772 |
+
|
773 |
+
// We couldn't write to file, so let's use cache instead.
|
774 |
+
if ( empty( $file_put_success ) ) {
|
775 |
+
wp_cache_add( $name, $css, 'siteorigin_widgets' );
|
776 |
+
}
|
777 |
+
|
778 |
+
return $hash;
|
779 |
+
}
|
780 |
+
|
781 |
+
return false;
|
782 |
+
}
|
783 |
+
|
784 |
+
/**
|
785 |
+
* Clears CSS for a specific instance
|
786 |
+
*/
|
787 |
+
private function delete_css( $instance ){
|
788 |
+
require_once ABSPATH . 'wp-admin/includes/file.php';
|
789 |
+
|
790 |
+
if( WP_Filesystem() ) {
|
791 |
+
global $wp_filesystem;
|
792 |
+
$upload_dir = wp_upload_dir();
|
793 |
+
|
794 |
+
$style = $this->get_style_name($instance);
|
795 |
+
$hash = $this->get_style_hash( $instance );
|
796 |
+
$name = $this->id_base.'-'.$style.'-'.$hash;
|
797 |
+
|
798 |
+
$wp_filesystem->delete($upload_dir['basedir'] . '/siteorigin-widgets/' . $name . '.css');
|
799 |
+
if ( in_array( $name, $this->generated_css ) ) {
|
800 |
+
$index = array_search( $name, $this->generated_css );
|
801 |
+
unset( $this->generated_css[$index] );
|
802 |
+
//Reindex array
|
803 |
+
$this->generated_css = array_values( $this->generated_css );
|
804 |
+
}
|
805 |
+
|
806 |
+
// Alert other plugins that we've deleted a CSS file
|
807 |
+
do_action( 'siteorigin_widgets_stylesheet_deleted', $name, $instance );
|
808 |
+
}
|
809 |
+
}
|
810 |
+
|
811 |
+
/**
|
812 |
+
* Clear all old CSS files
|
813 |
+
*
|
814 |
+
* @var bool $force Must we force a cache refresh.
|
815 |
+
*/
|
816 |
+
public static function clear_file_cache( $force_delete = false ){
|
817 |
+
// Use this variable to ensure this only runs once per request
|
818 |
+
static $done = false;
|
819 |
+
if ( $done && !$force_delete ) return;
|
820 |
+
|
821 |
+
if( !get_transient('sow:cleared') || $force_delete ) {
|
822 |
+
|
823 |
+
require_once ABSPATH . 'wp-admin/includes/file.php';
|
824 |
+
if( WP_Filesystem() ) {
|
825 |
+
global $wp_filesystem;
|
826 |
+
$upload_dir = wp_upload_dir();
|
827 |
+
|
828 |
+
$list = $wp_filesystem->dirlist( $upload_dir['basedir'] . '/siteorigin-widgets/' );
|
829 |
+
if ( ! empty( $list ) ) {
|
830 |
+
foreach($list as $file) {
|
831 |
+
if( $file['lastmodunix'] < time() - self::$css_expire || $force_delete ) {
|
832 |
+
// Delete the file
|
833 |
+
$wp_filesystem->delete( $upload_dir['basedir'] . '/siteorigin-widgets/' . $file['name'] );
|
834 |
+
}
|
835 |
+
}
|
836 |
+
}
|
837 |
+
}
|
838 |
+
|
839 |
+
// Set this transient so we know when to clear all the generated CSS.
|
840 |
+
set_transient('sow:cleared', true, self::$css_expire);
|
841 |
+
}
|
842 |
+
|
843 |
+
$done = true;
|
844 |
+
}
|
845 |
+
|
846 |
+
/**
|
847 |
+
* Generate the CSS for the widget.
|
848 |
+
*
|
849 |
+
* @param $instance
|
850 |
+
* @return string
|
851 |
+
*/
|
852 |
+
public function get_instance_css( $instance ){
|
853 |
+
if( !class_exists( 'SiteOrigin_LessC' ) ) require plugin_dir_path( __FILE__ ) . 'inc/lessc.inc.php';
|
854 |
+
if( !class_exists('SiteOrigin_Widgets_Less_Functions') ) require plugin_dir_path( __FILE__ ).'inc/less-functions.php';
|
855 |
+
|
856 |
+
if( !method_exists( $this, 'get_less_content' ) ) {
|
857 |
+
$style_name = $this->get_style_name($instance);
|
858 |
+
if( empty($style_name) ) return '';
|
859 |
+
|
860 |
+
$less_file = siteorigin_widget_get_plugin_dir_path( $this->id_base ).'styles/'.$style_name . '.less';
|
861 |
+
$less_file = apply_filters( 'siteorigin_widgets_less_file_' . $this->id_base, $less_file, $instance, $this );
|
862 |
+
|
863 |
+
$less = ( substr( $less_file, -5 ) == '.less' && file_exists($less_file) ) ? file_get_contents( $less_file ) : '';
|
864 |
+
}
|
865 |
+
else {
|
866 |
+
// The widget is going handle getting the instance LESS
|
867 |
+
$less = $this->get_less_content( $instance );
|
868 |
+
}
|
869 |
+
|
870 |
+
// Substitute the variables
|
871 |
+
if( !class_exists('SiteOrigin_Widgets_Color_Object') ) require plugin_dir_path( __FILE__ ) . 'inc/color.php';
|
872 |
+
|
873 |
+
// Lets widgets insert their own custom generated LESS
|
874 |
+
$less = preg_replace_callback( '/\.widget-function\((.*)\);/', array( $this, 'less_widget_inject' ), $less );
|
875 |
+
|
876 |
+
//handle less @import statements
|
877 |
+
$less = preg_replace_callback( '/^@import\s+".*?\/?([\w\-\.]+)";/m', array( $this, 'get_less_import_contents' ), $less );
|
878 |
+
|
879 |
+
$vars = apply_filters( 'siteorigin_widgets_less_variables_' . $this->id_base, $this->get_less_variables( $instance ), $instance, $this );
|
880 |
+
if( !empty( $vars ) ){
|
881 |
+
foreach($vars as $name => $value) {
|
882 |
+
// Ignore empty string, false and null values (but keep '0')
|
883 |
+
if( $value === '' || $value === false || $value === null ) continue;
|
884 |
+
|
885 |
+
$less = preg_replace('/\@'.preg_quote($name).' *\:.*?;/', '@'.$name.': '.$value.';', $less);
|
886 |
+
}
|
887 |
+
}
|
888 |
+
|
889 |
+
$less = apply_filters( 'siteorigin_widgets_styles', $less, $this->widget_class, $instance );
|
890 |
+
$less = apply_filters( 'siteorigin_widgets_less_' . $this->id_base, $less, $instance, $this );
|
891 |
+
|
892 |
+
$css = '';
|
893 |
+
|
894 |
+
if( ! empty( $less ) ) {
|
895 |
+
$style = $this->get_style_name( $instance );
|
896 |
+
$hash = $this->get_style_hash( $instance );
|
897 |
+
$css_name = $this->id_base . '-' . $style . '-' . $hash;
|
898 |
+
|
899 |
+
//we assume that any remaining @imports are plain css imports and should be kept outside selectors
|
900 |
+
$css_imports = '';
|
901 |
+
if ( preg_match_all( '/^@import.+/m', $less, $imports ) ) {
|
902 |
+
$css_imports = implode( "\n", $imports[0] );
|
903 |
+
$less = preg_replace( '/^@import.+/m', '', $less );
|
904 |
+
}
|
905 |
+
|
906 |
+
$less = $css_imports . "\n\n" . '.so-widget-'.$css_name." { \n".$less."\n } ";
|
907 |
+
|
908 |
+
$compiler = new SiteOrigin_LessC();
|
909 |
+
$lc_functions = new SiteOrigin_Widgets_Less_Functions($this, $instance);
|
910 |
+
$lc_functions->registerFunctions( $compiler );
|
911 |
+
$compiler = apply_filters( 'siteorigin_widgets_less_compiler', $compiler, $instance, $this );
|
912 |
+
|
913 |
+
try {
|
914 |
+
if( method_exists( $compiler, 'compile' ) ) {
|
915 |
+
$css = $compiler->compile( $less );
|
916 |
+
}
|
917 |
+
}
|
918 |
+
catch ( Exception $e ) {
|
919 |
+
if( defined( 'SITEORIGIN_WIDGETS_DEBUG' ) && SITEORIGIN_WIDGETS_DEBUG ) {
|
920 |
+
throw $e;
|
921 |
+
}
|
922 |
+
}
|
923 |
+
|
924 |
+
// Remove any attributes with default as the value
|
925 |
+
$css = preg_replace('/[a-zA-Z\-]+ *: *default *;/', '', $css);
|
926 |
+
|
927 |
+
// Remove any empty CSS
|
928 |
+
$css = preg_replace('/[^{}]*\{\s*\}/m', '', $css);
|
929 |
+
$css = trim($css);
|
930 |
+
}
|
931 |
+
|
932 |
+
return apply_filters( 'siteorigin_widgets_instance_css', $css, $instance, $this );
|
933 |
+
}
|
934 |
+
|
935 |
+
/**
|
936 |
+
* Replaces LESS imports with the content from the actual files. This used as a preg callback.
|
937 |
+
*
|
938 |
+
* @param $matches
|
939 |
+
*
|
940 |
+
* @return string
|
941 |
+
*/
|
942 |
+
private function get_less_import_contents($matches) {
|
943 |
+
$filename = $matches[1];
|
944 |
+
|
945 |
+
// First, we'll deal with a few special cases
|
946 |
+
switch( $filename ) {
|
947 |
+
case 'mixins':
|
948 |
+
return file_get_contents( plugin_dir_path( __FILE__ ) . 'less/mixins.less' );
|
949 |
+
break;
|
950 |
+
|
951 |
+
case 'lesshat':
|
952 |
+
return file_get_contents( plugin_dir_path( __FILE__ ) . 'less/lesshat.less' );
|
953 |
+
break;
|
954 |
+
}
|
955 |
+
|
956 |
+
//get file extension
|
957 |
+
preg_match( '/\.\w+$/', $filename, $ext );
|
958 |
+
//if there is a file extension and it's not .less or .css we ignore
|
959 |
+
if ( ! empty( $ext ) ) {
|
960 |
+
if ( ! ( $ext[0] == '.less' || $ext[0] == '.css' ) ) {
|
961 |
+
return '';
|
962 |
+
}
|
963 |
+
}
|
964 |
+
else {
|
965 |
+
$filename .= '.less';
|
966 |
+
}
|
967 |
+
//first check local widget styles directory and then bundle less directory
|
968 |
+
$search_path = array(
|
969 |
+
siteorigin_widget_get_plugin_dir_path( $this->id_base ) . 'styles/',
|
970 |
+
plugin_dir_path( __FILE__ ) . 'less/'
|
971 |
+
);
|
972 |
+
|
973 |
+
foreach ( $search_path as $dir ) {
|
974 |
+
if ( file_exists( $dir . $filename ) ) {
|
975 |
+
return file_get_contents( $dir . $filename )."\n\n";
|
976 |
+
}
|
977 |
+
}
|
978 |
+
|
979 |
+
//file not found
|
980 |
+
return '';
|
981 |
+
}
|
982 |
+
|
983 |
+
/**
|
984 |
+
* Used as a preg callback to replace .widget-function('some_function', ...) with output from less_some_function($instance, $args).
|
985 |
+
*
|
986 |
+
* @param $matches
|
987 |
+
*
|
988 |
+
* @return mixed|string
|
989 |
+
*/
|
990 |
+
private function less_widget_inject($matches){
|
991 |
+
// We're going to lazily split the arguments by comma
|
992 |
+
$args = explode(',', $matches[1]);
|
993 |
+
if( empty($args[0]) ) return '';
|
994 |
+
|
995 |
+
// Shift the function name from the arguments
|
996 |
+
$func = 'less_' . trim( array_shift($args) , '\'"');
|
997 |
+
if( !method_exists($this, $func) ) return '';
|
998 |
+
|
999 |
+
// Finally call the function and include the
|
1000 |
+
$args = array_map('trim', $args);
|
1001 |
+
return call_user_func( array($this, $func), $this->current_instance, $args );
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
/**
|
1005 |
+
* Less function for importing Google web fonts.
|
1006 |
+
*
|
1007 |
+
* @param $instance
|
1008 |
+
* @param $args
|
1009 |
+
*
|
1010 |
+
* @return string
|
1011 |
+
*/
|
1012 |
+
function less_import_google_font($instance, $args) {
|
1013 |
+
if( empty( $instance ) ) return;
|
1014 |
+
|
1015 |
+
$fonts = $this->get_google_font_fields($instance);
|
1016 |
+
if( empty( $fonts ) || ! is_array( $fonts ) ) return '';
|
1017 |
+
|
1018 |
+
$font_imports = array();
|
1019 |
+
|
1020 |
+
foreach ( $fonts as $font ) {
|
1021 |
+
$font_imports[] = siteorigin_widget_get_font( $font );
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
$import_strings = array();
|
1025 |
+
foreach( $font_imports as $import ) {
|
1026 |
+
$import_strings[] = !empty($import['css_import']) ? $import['css_import'] : '';
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
// Remove empty and duplicate items from the array
|
1030 |
+
$import_strings = array_filter( $import_strings );
|
1031 |
+
$import_strings = array_unique( $import_strings );
|
1032 |
+
|
1033 |
+
return implode( "\n", $import_strings );
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
/**
|
1037 |
+
* Get any font fields which may be used by this widget.
|
1038 |
+
*
|
1039 |
+
* @param $instance
|
1040 |
+
*
|
1041 |
+
* @return array
|
1042 |
+
*/
|
1043 |
+
function get_google_font_fields( $instance ) {
|
1044 |
+
return apply_filters( 'siteorigin_widgets_google_font_fields_' . $this->id_base, array(), $instance, $this );
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
/**
|
1048 |
+
* Utility function to get a field name for a widget field.
|
1049 |
+
*
|
1050 |
+
* @param $field_name
|
1051 |
+
* @param array $container
|
1052 |
+
* @return mixed|string
|
1053 |
+
*/
|
1054 |
+
public function so_get_field_name( $field_name, $container = array() ) {
|
1055 |
+
if( empty($container) ) {
|
1056 |
+
$name = $this->get_field_name( $field_name );
|
1057 |
+
}
|
1058 |
+
else {
|
1059 |
+
// We also need to add the container fields
|
1060 |
+
$container_extras = '';
|
1061 |
+
foreach($container as $r) {
|
1062 |
+
$container_extras .= '[' . $r['name'] . ']';
|
1063 |
+
|
1064 |
+
if( $r['type'] == 'repeater' ) {
|
1065 |
+
$container_extras .= '[#' . $r['name'] . '#]';
|
1066 |
+
}
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
$name = $this->get_field_name( '{{{FIELD_NAME}}}' );
|
1070 |
+
$name = str_replace('[{{{FIELD_NAME}}}]', $container_extras.'[' . esc_attr($field_name) . ']', $name);
|
1071 |
+
}
|
1072 |
+
|
1073 |
+
$name = apply_filters( 'siteorigin_widgets_get_field_name', $name );
|
1074 |
+
$name = apply_filters( 'siteorigin_widgets_get_field_name_' . $this->id_base, $name );
|
1075 |
+
|
1076 |
+
return $name;
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
/**
|
1080 |
+
* Get the ID of this field.
|
1081 |
+
*
|
1082 |
+
* @param $field_name
|
1083 |
+
* @param array $container
|
1084 |
+
* @param boolean $is_template
|
1085 |
+
*
|
1086 |
+
* @return string
|
1087 |
+
*/
|
1088 |
+
public function so_get_field_id( $field_name, $container = array(), $is_template = false ) {
|
1089 |
+
if( empty($container) ) {
|
1090 |
+
return $this->get_field_id($field_name);
|
1091 |
+
}
|
1092 |
+
else {
|
1093 |
+
$name = array();
|
1094 |
+
foreach ( $container as $container_item ) {
|
1095 |
+
$name[] = $container_item['name'];
|
1096 |
+
}
|
1097 |
+
$name[] = $field_name;
|
1098 |
+
$field_id_base = $this->get_field_id(implode('-', $name));
|
1099 |
+
if ( $is_template ) {
|
1100 |
+
return $field_id_base . '-_id_';
|
1101 |
+
}
|
1102 |
+
if ( ! isset( $this->field_ids[ $field_id_base ] ) ) {
|
1103 |
+
$this->field_ids[ $field_id_base ] = 1;
|
1104 |
+
}
|
1105 |
+
$curId = $this->field_ids[ $field_id_base ]++;
|
1106 |
+
return $field_id_base . '-' . $curId;
|
1107 |
+
}
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
/**
|
1111 |
+
* Parse markdown
|
1112 |
+
*
|
1113 |
+
* @param $markdown
|
1114 |
+
* @return string The HTML
|
1115 |
+
*
|
1116 |
+
* @deprecated Will be removed in version 2.0
|
1117 |
+
*/
|
1118 |
+
function parse_markdown( $markdown ){
|
1119 |
+
if( !class_exists('Parsedown') ) include plugin_dir_path(__FILE__).'inc/Parsedown.php';
|
1120 |
+
$parser = new Parsedown();
|
1121 |
+
|
1122 |
+
return $parser->text($markdown);
|
1123 |
+
}
|
1124 |
+
|
1125 |
+
/**
|
1126 |
+
* Get a hash that uniquely identifies this instance.
|
1127 |
+
*
|
1128 |
+
* @param $instance
|
1129 |
+
* @return string
|
1130 |
+
*/
|
1131 |
+
function get_style_hash( $instance ) {
|
1132 |
+
$style_hash = apply_filters('siteorigin_widgets_widget_style_hash', '', $this);
|
1133 |
+
if( empty( $style_hash ) ) {
|
1134 |
+
if( method_exists( $this, 'get_style_hash_variables' ) ) {
|
1135 |
+
$vars = apply_filters( 'siteorigin_widgets_hash_variables_' . $this->id_base, $this->get_style_hash_variables( $instance ), $instance, $this );
|
1136 |
+
} else {
|
1137 |
+
$vars = apply_filters( 'siteorigin_widgets_less_variables_' . $this->id_base, $this->get_less_variables( $instance ), $instance, $this );
|
1138 |
+
}
|
1139 |
+
$version = property_exists( $this, 'version' ) ? $this->version : '';
|
1140 |
+
|
1141 |
+
$style_hash = substr( md5( json_encode( $vars ) . $version ), 0, 12 );
|
1142 |
+
}
|
1143 |
+
|
1144 |
+
return $style_hash;
|
1145 |
+
}
|
1146 |
+
|
1147 |
+
/**
|
1148 |
+
* Get the template name that we'll be using to render this widget.
|
1149 |
+
*
|
1150 |
+
* @param $instance
|
1151 |
+
* @return mixed
|
1152 |
+
*/
|
1153 |
+
function get_template_name( $instance ) {
|
1154 |
+
return 'default';
|
1155 |
+
}
|
1156 |
+
|
1157 |
+
/**
|
1158 |
+
* Get the name of the directory in which we should look for the template. Relative to root of widget folder.
|
1159 |
+
*
|
1160 |
+
* @return mixed
|
1161 |
+
*/
|
1162 |
+
function get_template_dir( $instance ) {
|
1163 |
+
return 'tpl';
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
/**
|
1167 |
+
* Get the LESS style name we'll be using for this widget.
|
1168 |
+
*
|
1169 |
+
* @param $instance
|
1170 |
+
* @return mixed
|
1171 |
+
*/
|
1172 |
+
function get_style_name( $instance ) {
|
1173 |
+
return 'default';
|
1174 |
+
}
|
1175 |
+
|
1176 |
+
/**
|
1177 |
+
* Get any variables that need to be substituted by
|
1178 |
+
*
|
1179 |
+
* @param $instance
|
1180 |
+
* @return array
|
1181 |
+
*/
|
1182 |
+
function get_less_variables( $instance ){
|
1183 |
+
return array();
|
1184 |
+
}
|
1185 |
+
|
1186 |
+
/**
|
1187 |
+
* Filter the variables we'll be storing in temporary storage for this instance if we're using `instance_storage`
|
1188 |
+
*
|
1189 |
+
* @param $instance
|
1190 |
+
*
|
1191 |
+
* @return mixed
|
1192 |
+
*/
|
1193 |
+
function modify_stored_instance( $instance ){
|
1194 |
+
return $instance;
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
/**
|
1198 |
+
* Get the stored instance based on the hash.
|
1199 |
+
*
|
1200 |
+
* @param $hash
|
1201 |
+
*
|
1202 |
+
* @return object The instance
|
1203 |
+
*/
|
1204 |
+
function get_stored_instance( $hash ) {
|
1205 |
+
return get_transient('sow_inst[' . $this->id_base . '][' . $hash . ']');
|
1206 |
+
}
|
1207 |
+
|
1208 |
+
/**
|
1209 |
+
* This function can be overwritten to modify form values in the child widget.
|
1210 |
+
*
|
1211 |
+
* @param $form
|
1212 |
+
* @return mixed
|
1213 |
+
*/
|
1214 |
+
function modify_form( $form ) {
|
1215 |
+
return $form;
|
1216 |
+
}
|
1217 |
+
|
1218 |
+
|
1219 |
+
/**
|
1220 |
+
* This function can be overwritten to modify form values in the child widget.
|
1221 |
+
*
|
1222 |
+
* @param $child_widget_form
|
1223 |
+
* @param $child_widget
|
1224 |
+
* @return mixed
|
1225 |
+
*/
|
1226 |
+
function modify_child_widget_form($child_widget_form, $child_widget) {
|
1227 |
+
return $child_widget_form;
|
1228 |
+
}
|
1229 |
+
|
1230 |
+
/**
|
1231 |
+
* This function should be overwritten by child widgets to filter an instance. Run before rendering the form and widget.
|
1232 |
+
*
|
1233 |
+
* @param $instance
|
1234 |
+
*
|
1235 |
+
* @return mixed
|
1236 |
+
*/
|
1237 |
+
function modify_instance( $instance ){
|
1238 |
+
return $instance;
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
/**
|
1242 |
+
* Can be overwritten by child widgets to make variables available to javascript via ajax calls. These are designed to be used in the admin.
|
1243 |
+
*/
|
1244 |
+
function get_javascript_variables(){
|
1245 |
+
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
/**
|
1249 |
+
* Used by child widgets to register scripts to be enqueued for the frontend.
|
1250 |
+
*
|
1251 |
+
* @param array $scripts an array of scripts. Each element is an array that corresponds to wp_enqueue_script arguments
|
1252 |
+
*/
|
1253 |
+
public function register_frontend_scripts( $scripts ){
|
1254 |
+
foreach ( $scripts as $script ) {
|
1255 |
+
if ( ! isset( $this->frontend_scripts[ $script[0] ] ) ) {
|
1256 |
+
$this->frontend_scripts[$script[0]] = $script;
|
1257 |
+
}
|
1258 |
+
}
|
1259 |
+
}
|
1260 |
+
|
1261 |
+
/**
|
1262 |
+
* Enqueue all the registered scripts
|
1263 |
+
*/
|
1264 |
+
function enqueue_registered_scripts( $instance ) {
|
1265 |
+
$f_scripts = apply_filters(
|
1266 |
+
'siteorigin_widgets_frontend_scripts_' . $this->id_base,
|
1267 |
+
$this->frontend_scripts,
|
1268 |
+
$instance,
|
1269 |
+
$this
|
1270 |
+
);
|
1271 |
+
|
1272 |
+
foreach ( $f_scripts as $f_script ) {
|
1273 |
+
if ( ! wp_script_is( $f_script[0] ) ) {
|
1274 |
+
wp_enqueue_script(
|
1275 |
+
$f_script[0],
|
1276 |
+
isset( $f_script[1] ) ? $f_script[1] : false,
|
1277 |
+
isset( $f_script[2] ) ? $f_script[2] : array(),
|
1278 |
+
!empty( $f_script[3] ) ? $f_script[3] : SOW_BUNDLE_VERSION,
|
1279 |
+
isset( $f_script[4] ) ? $f_script[4] : false
|
1280 |
+
);
|
1281 |
+
}
|
1282 |
+
}
|
1283 |
+
}
|
1284 |
+
|
1285 |
+
/**
|
1286 |
+
* Used by child widgets to register styles to be enqueued for the frontend.
|
1287 |
+
*
|
1288 |
+
* @param array $styles an array of styles. Each element is an array that corresponds to wp_enqueue_style arguments
|
1289 |
+
*/
|
1290 |
+
public function register_frontend_styles( $styles ) {
|
1291 |
+
foreach ( $styles as $style ) {
|
1292 |
+
if ( ! isset( $this->frontend_styles[ $style[0] ] ) ) {
|
1293 |
+
$this->frontend_styles[$style[0]] = $style;
|
1294 |
+
}
|
1295 |
+
}
|
1296 |
+
}
|
1297 |
+
|
1298 |
+
/**
|
1299 |
+
* Enqueue any frontend styles that were registered
|
1300 |
+
*/
|
1301 |
+
function enqueue_registered_styles( $instance ) {
|
1302 |
+
$f_styles = apply_filters(
|
1303 |
+
'siteorigin_widgets_frontend_styles_' . $this->id_base,
|
1304 |
+
$this->frontend_styles,
|
1305 |
+
$instance,
|
1306 |
+
$this
|
1307 |
+
);
|
1308 |
+
|
1309 |
+
foreach ( $f_styles as $f_style ) {
|
1310 |
+
if ( ! wp_style_is( $f_style[0] ) ) {
|
1311 |
+
wp_enqueue_style(
|
1312 |
+
$f_style[0],
|
1313 |
+
isset( $f_style[1] ) ? $f_style[1] : false,
|
1314 |
+
isset( $f_style[2] ) ? $f_style[2] : array(),
|
1315 |
+
!empty( $f_style[3] ) ? $f_style[3] : SOW_BUNDLE_VERSION,
|
1316 |
+
isset( $f_style[4] ) ? $f_style[4] : "all"
|
1317 |
+
);
|
1318 |
+
}
|
1319 |
+
}
|
1320 |
+
}
|
1321 |
+
|
1322 |
+
/**
|
1323 |
+
* Can be overridden by child widgets to enqueue scripts and styles for the frontend, but child widgets should
|
1324 |
+
* rather register scripts and styles using register_frontend_scripts() and register_frontend_styles(). This function
|
1325 |
+
* will then ensure that the scripts are not enqueued more than once.
|
1326 |
+
*/
|
1327 |
+
function enqueue_frontend_scripts( $instance ) {
|
1328 |
+
$this->enqueue_registered_scripts( $instance );
|
1329 |
+
$this->enqueue_registered_styles( $instance );
|
1330 |
+
|
1331 |
+
// Give plugins a chance to enqueue additional frontend scripts
|
1332 |
+
do_action('siteorigin_widgets_enqueue_frontend_scripts_' . $this->id_base, $instance, $this);
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
/**
|
1336 |
+
* Can be overwritten by child widgets to enqueue admin scripts and styles if necessary.
|
1337 |
+
*/
|
1338 |
+
function enqueue_admin_scripts(){ }
|
1339 |
+
|
1340 |
+
/**
|
1341 |
+
* Check if we're currently in a preview
|
1342 |
+
*
|
1343 |
+
* @param array $instance
|
1344 |
+
*
|
1345 |
+
* @return bool
|
1346 |
+
*/
|
1347 |
+
function is_preview( $instance = array() ) {
|
1348 |
+
// Check if the instance is a preview
|
1349 |
+
if( !empty( $instance[ 'is_preview' ] ) ) return true;
|
1350 |
+
|
1351 |
+
// Check if the general request is a preview
|
1352 |
+
$is_preview =
|
1353 |
+
is_preview() || // Is this a standard preview
|
1354 |
+
$this->is_customize_preview() || // Is this a customizer preview
|
1355 |
+
$this->is_block_editor_page() || // Is this a block editor page
|
1356 |
+
!empty( $_GET['siteorigin_panels_live_editor'] ) || // Is this a Page Builder live editor request
|
1357 |
+
( !empty( $_REQUEST['action'] ) && $_REQUEST['action'] == 'so_panels_builder_content' ) || // Is this a Page Builder content ajax request
|
1358 |
+
! empty( $GLOBALS[ 'SITEORIGIN_PANELS_PREVIEW_RENDER' ] ); // Is this a Page Builder preview render.
|
1359 |
+
|
1360 |
+
return apply_filters( 'siteorigin_widgets_is_preview', $is_preview, $this );
|
1361 |
+
}
|
1362 |
+
|
1363 |
+
/**
|
1364 |
+
* Whether or not so show the 'Preview' button
|
1365 |
+
*
|
1366 |
+
* @return bool
|
1367 |
+
*/
|
1368 |
+
function show_preview_button(){
|
1369 |
+
$show_preview = ! empty( $this->widget_options['has_preview'] ) && ! $this->is_customize_preview();
|
1370 |
+
$show_preview = apply_filters( 'siteorigin_widgets_form_show_preview_button', $show_preview, $this );
|
1371 |
+
return $show_preview;
|
1372 |
+
}
|
1373 |
+
|
1374 |
+
/**
|
1375 |
+
* Get the global settings from the options table.
|
1376 |
+
*
|
1377 |
+
* @return mixed
|
1378 |
+
*/
|
1379 |
+
function get_global_settings( ){
|
1380 |
+
$values = get_option( 'so_widget_settings[' . $this->widget_class . ']', array() );
|
1381 |
+
|
1382 |
+
// Add in the defaults
|
1383 |
+
if( $this->has_form( 'settings' ) ) {
|
1384 |
+
$values = $this->add_defaults( $this->get_settings_form(), $values );
|
1385 |
+
}
|
1386 |
+
|
1387 |
+
return $values;
|
1388 |
+
}
|
1389 |
+
|
1390 |
+
/**
|
1391 |
+
* Save the global settings. Handles validation too.
|
1392 |
+
*
|
1393 |
+
* @param array $values The new values
|
1394 |
+
* @return array The sanitized values.
|
1395 |
+
*/
|
1396 |
+
function save_global_settings( $values ){
|
1397 |
+
$current = $this->get_global_settings();
|
1398 |
+
|
1399 |
+
$values = $this->update( $values, $current, 'settings' );
|
1400 |
+
|
1401 |
+
unset( $values['_sow_form_id'] );
|
1402 |
+
update_option( 'so_widget_settings[' . $this->widget_class . ']', $values );
|
1403 |
+
|
1404 |
+
return $values;
|
1405 |
+
}
|
1406 |
+
}
|
compat/beaver-builder/beaver-builder.php
CHANGED
@@ -1,98 +1,98 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class SiteOrigin_Widgets_Bundle_Beaver_Builder {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Get the singleton instance
|
7 |
-
*
|
8 |
-
* @return SiteOrigin_Widgets_Bundle_Beaver_Builder
|
9 |
-
*/
|
10 |
-
public static function single() {
|
11 |
-
static $single;
|
12 |
-
return empty( $single ) ? $single = new self() : $single;
|
13 |
-
}
|
14 |
-
|
15 |
-
function __construct() {
|
16 |
-
add_action('wp', array( $this, 'init' ), 9 );
|
17 |
-
}
|
18 |
-
|
19 |
-
function init() {
|
20 |
-
if ( ! FLBuilderModel::is_builder_active() ) {
|
21 |
-
return;
|
22 |
-
}
|
23 |
-
|
24 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_active_widgets_scripts' ) );
|
25 |
-
add_action( 'wp_print_footer_scripts', array( $this, 'print_footer_templates' ) );
|
26 |
-
|
27 |
-
// Don't want to show the form preview button when using Beaver Builder
|
28 |
-
add_filter( 'siteorigin_widgets_form_show_preview_button', '__return_false' );
|
29 |
-
}
|
30 |
-
|
31 |
-
function enqueue_active_widgets_scripts() {
|
32 |
-
global $wp_widget_factory;
|
33 |
-
|
34 |
-
// Beaver Builder does it's editing in the front end so enqueue required form scripts for active widgets.
|
35 |
-
$so_widgets_bundle = SiteOrigin_Widgets_Bundle::single();
|
36 |
-
$so_widgets_bundle->enqueue_registered_widgets_scripts( false, true );
|
37 |
-
|
38 |
-
$any_widgets_active = false;
|
39 |
-
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
|
40 |
-
if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
|
41 |
-
$any_widgets_active = true;
|
42 |
-
break;
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
// No widgets active. :/ Let's get outta here.
|
47 |
-
if ( ! $any_widgets_active ) {
|
48 |
-
return;
|
49 |
-
}
|
50 |
-
|
51 |
-
if ( ! wp_script_is( 'wp-color-picker' ) ) {
|
52 |
-
// wp-color-picker hasn't been registered because we're in the front end, so enqueue with full args.
|
53 |
-
wp_enqueue_script( 'iris', '/wp-admin/js/iris.min.js', array(
|
54 |
-
'jquery-ui-draggable',
|
55 |
-
'jquery-ui-slider',
|
56 |
-
'jquery-touch-punch'
|
57 |
-
), '1.0.7', 1 );
|
58 |
-
|
59 |
-
wp_enqueue_script( 'wp-color-picker', '/wp-admin/js/color-picker' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'iris' ), false, 1 );
|
60 |
-
|
61 |
-
wp_enqueue_style( 'wp-color-picker' );
|
62 |
-
|
63 |
-
// Localization args for when wp-color-picker script hasn't been registered.
|
64 |
-
wp_localize_script( 'wp-color-picker', 'wpColorPickerL10n', array(
|
65 |
-
'clear' => __( 'Clear', 'so-widgets-bundle' ),
|
66 |
-
'defaultString' => __( 'Default', 'so-widgets-bundle' ),
|
67 |
-
'pick' => __( 'Select Color', 'so-widgets-bundle' ),
|
68 |
-
'current' => __( 'Current Color', 'so-widgets-bundle' ),
|
69 |
-
) );
|
70 |
-
}
|
71 |
-
|
72 |
-
wp_enqueue_style( 'sowb-styles-for-beaver', plugin_dir_url( __FILE__ ) . 'styles.css' );
|
73 |
-
|
74 |
-
$deps = ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? array( 'jquery', 'fl-builder' ) : array( 'fl-builder-min' );
|
75 |
-
wp_enqueue_script(
|
76 |
-
'sowb-js-for-beaver',
|
77 |
-
plugin_dir_url( __FILE__ ) . 'sowb-beaver-builder' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
78 |
-
$deps
|
79 |
-
);
|
80 |
-
|
81 |
-
wp_enqueue_style( 'siteorigin-widget-admin', plugin_dir_url(SOW_BUNDLE_BASE_FILE).'base/css/admin.css', array( 'media-views' ), SOW_BUNDLE_VERSION );
|
82 |
-
|
83 |
-
}
|
84 |
-
|
85 |
-
function print_footer_templates() {
|
86 |
-
global $wp_widget_factory;
|
87 |
-
|
88 |
-
// Beaver Builder does it's editing in the front end so print required footer templates for active widgets.
|
89 |
-
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
|
90 |
-
if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
|
91 |
-
$widget_obj->footer_admin_templates();
|
92 |
-
}
|
93 |
-
}
|
94 |
-
}
|
95 |
-
|
96 |
-
}
|
97 |
-
|
98 |
-
SiteOrigin_Widgets_Bundle_Beaver_Builder::single();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class SiteOrigin_Widgets_Bundle_Beaver_Builder {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Get the singleton instance
|
7 |
+
*
|
8 |
+
* @return SiteOrigin_Widgets_Bundle_Beaver_Builder
|
9 |
+
*/
|
10 |
+
public static function single() {
|
11 |
+
static $single;
|
12 |
+
return empty( $single ) ? $single = new self() : $single;
|
13 |
+
}
|
14 |
+
|
15 |
+
function __construct() {
|
16 |
+
add_action('wp', array( $this, 'init' ), 9 );
|
17 |
+
}
|
18 |
+
|
19 |
+
function init() {
|
20 |
+
if ( ! FLBuilderModel::is_builder_active() ) {
|
21 |
+
return;
|
22 |
+
}
|
23 |
+
|
24 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_active_widgets_scripts' ) );
|
25 |
+
add_action( 'wp_print_footer_scripts', array( $this, 'print_footer_templates' ) );
|
26 |
+
|
27 |
+
// Don't want to show the form preview button when using Beaver Builder
|
28 |
+
add_filter( 'siteorigin_widgets_form_show_preview_button', '__return_false' );
|
29 |
+
}
|
30 |
+
|
31 |
+
function enqueue_active_widgets_scripts() {
|
32 |
+
global $wp_widget_factory;
|
33 |
+
|
34 |
+
// Beaver Builder does it's editing in the front end so enqueue required form scripts for active widgets.
|
35 |
+
$so_widgets_bundle = SiteOrigin_Widgets_Bundle::single();
|
36 |
+
$so_widgets_bundle->enqueue_registered_widgets_scripts( false, true );
|
37 |
+
|
38 |
+
$any_widgets_active = false;
|
39 |
+
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
|
40 |
+
if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
|
41 |
+
$any_widgets_active = true;
|
42 |
+
break;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
// No widgets active. :/ Let's get outta here.
|
47 |
+
if ( ! $any_widgets_active ) {
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
|
51 |
+
if ( ! wp_script_is( 'wp-color-picker' ) ) {
|
52 |
+
// wp-color-picker hasn't been registered because we're in the front end, so enqueue with full args.
|
53 |
+
wp_enqueue_script( 'iris', '/wp-admin/js/iris.min.js', array(
|
54 |
+
'jquery-ui-draggable',
|
55 |
+
'jquery-ui-slider',
|
56 |
+
'jquery-touch-punch'
|
57 |
+
), '1.0.7', 1 );
|
58 |
+
|
59 |
+
wp_enqueue_script( 'wp-color-picker', '/wp-admin/js/color-picker' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'iris' ), false, 1 );
|
60 |
+
|
61 |
+
wp_enqueue_style( 'wp-color-picker' );
|
62 |
+
|
63 |
+
// Localization args for when wp-color-picker script hasn't been registered.
|
64 |
+
wp_localize_script( 'wp-color-picker', 'wpColorPickerL10n', array(
|
65 |
+
'clear' => __( 'Clear', 'so-widgets-bundle' ),
|
66 |
+
'defaultString' => __( 'Default', 'so-widgets-bundle' ),
|
67 |
+
'pick' => __( 'Select Color', 'so-widgets-bundle' ),
|
68 |
+
'current' => __( 'Current Color', 'so-widgets-bundle' ),
|
69 |
+
) );
|
70 |
+
}
|
71 |
+
|
72 |
+
wp_enqueue_style( 'sowb-styles-for-beaver', plugin_dir_url( __FILE__ ) . 'styles.css' );
|
73 |
+
|
74 |
+
$deps = ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? array( 'jquery', 'fl-builder' ) : array( 'fl-builder-min' );
|
75 |
+
wp_enqueue_script(
|
76 |
+
'sowb-js-for-beaver',
|
77 |
+
plugin_dir_url( __FILE__ ) . 'sowb-beaver-builder' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
78 |
+
$deps
|
79 |
+
);
|
80 |
+
|
81 |
+
wp_enqueue_style( 'siteorigin-widget-admin', plugin_dir_url(SOW_BUNDLE_BASE_FILE).'base/css/admin.css', array( 'media-views' ), SOW_BUNDLE_VERSION );
|
82 |
+
|
83 |
+
}
|
84 |
+
|
85 |
+
function print_footer_templates() {
|
86 |
+
global $wp_widget_factory;
|
87 |
+
|
88 |
+
// Beaver Builder does it's editing in the front end so print required footer templates for active widgets.
|
89 |
+
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
|
90 |
+
if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
|
91 |
+
$widget_obj->footer_admin_templates();
|
92 |
+
}
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
SiteOrigin_Widgets_Bundle_Beaver_Builder::single();
|
compat/beaver-builder/sowb-beaver-builder.js
CHANGED
@@ -1,142 +1,142 @@
|
|
1 |
-
/* globals jQuery, FLBuilder, sowb, sowbForms */
|
2 |
-
|
3 |
-
var sowb = window.sowb || {};
|
4 |
-
|
5 |
-
( function($){
|
6 |
-
if( typeof FLBuilder !== 'undefined') {
|
7 |
-
// If you're going to override jQuery's `ready` function, at least make sure it still works. :/
|
8 |
-
sowb.orig_FLBuilder_initJQueryReadyFix = FLBuilder._initJQueryReadyFix;
|
9 |
-
FLBuilder._initJQueryReadyFix = function() {
|
10 |
-
return;
|
11 |
-
};
|
12 |
-
|
13 |
-
sowb.orig_FLBuilder_getSettings = FLBuilder._getSettings;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Replace Beaver Builder's form data collection function with our modified version.
|
17 |
-
*/
|
18 |
-
FLBuilder._getSettings = function(form) {
|
19 |
-
FLBuilder._updateEditorFields();
|
20 |
-
|
21 |
-
var data = form.serializeArray(),
|
22 |
-
i = 0,
|
23 |
-
k = 0,
|
24 |
-
value = '',
|
25 |
-
name = '',
|
26 |
-
key = '',
|
27 |
-
keys = [],
|
28 |
-
matches = [],
|
29 |
-
settings = {};
|
30 |
-
|
31 |
-
// Loop through the form data.
|
32 |
-
for ( i = 0; i < data.length; i++ ) {
|
33 |
-
|
34 |
-
value = data[ i ].value.replace( /\r/gm, '' ).replace( /'/g, "'" );
|
35 |
-
|
36 |
-
// Don't save text editor textareas.
|
37 |
-
if ( data[ i ].name.indexOf( 'flrich' ) > -1 ) {
|
38 |
-
continue;
|
39 |
-
}
|
40 |
-
// Support foo[]... setting keys.
|
41 |
-
else if ( data[ i ].name.indexOf( '[' ) > -1 ) {
|
42 |
-
|
43 |
-
name = data[ i ].name.replace( /\[(.*)\]/, '' );
|
44 |
-
key = data[ i ].name.replace( name, '' );
|
45 |
-
keys = [];
|
46 |
-
matches = key.match( /\[[^\]]*\]/g );
|
47 |
-
|
48 |
-
// Remove [] from the keys.
|
49 |
-
for ( k = 0; k < matches.length; k++ ) {
|
50 |
-
|
51 |
-
if ( '[]' === matches[ k ] ) {
|
52 |
-
continue;
|
53 |
-
}
|
54 |
-
|
55 |
-
keys.push( matches[ k ].replace( /[\[\]]/g, '' ) );
|
56 |
-
}
|
57 |
-
|
58 |
-
|
59 |
-
var f = function(object, val, head, tail) {
|
60 |
-
if( tail.length === 0) {
|
61 |
-
object[ head ] = val;
|
62 |
-
} else {
|
63 |
-
if( 'undefined' === typeof object [ head ] ) {
|
64 |
-
object [ head ] = {};
|
65 |
-
}
|
66 |
-
f(object[ head ], val, tail.shift(), tail);
|
67 |
-
}
|
68 |
-
};
|
69 |
-
|
70 |
-
if(keys.length > 0) {
|
71 |
-
|
72 |
-
var keysCopy = keys.slice();
|
73 |
-
if ( 'undefined' === typeof settings[ name ] ) {
|
74 |
-
settings[ name ] = {};
|
75 |
-
}
|
76 |
-
f(settings[ name ], value, keysCopy.shift(), keysCopy);
|
77 |
-
} else {
|
78 |
-
|
79 |
-
if ( 'undefined' === typeof settings[ name ] ) {
|
80 |
-
settings[ name ] = [];
|
81 |
-
}
|
82 |
-
|
83 |
-
settings[ name ].push( value );
|
84 |
-
}
|
85 |
-
}
|
86 |
-
// Standard name/value pair.
|
87 |
-
else {
|
88 |
-
settings[ data[ i ].name ] = value;
|
89 |
-
}
|
90 |
-
}
|
91 |
-
|
92 |
-
// Update auto suggest values.
|
93 |
-
for ( key in settings ) {
|
94 |
-
|
95 |
-
if ( 'undefined' !== typeof settings[ 'as_values_' + key ] ) {
|
96 |
-
|
97 |
-
settings[ key ] = $.grep(
|
98 |
-
settings[ 'as_values_' + key ].split( ',' ),
|
99 |
-
function( n ) {
|
100 |
-
return n !== '';
|
101 |
-
}
|
102 |
-
).join( ',' );
|
103 |
-
|
104 |
-
try {
|
105 |
-
delete settings[ 'as_values_' + key ];
|
106 |
-
}
|
107 |
-
catch( e ) {}
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
// In the case of multi-select or checkboxes we need to put the blank setting back in.
|
112 |
-
$.each( form.find( '[name]' ), function( key, input ) {
|
113 |
-
var name = $( input ).attr( 'name' ).replace( /\[(.*)\]/, '' );
|
114 |
-
if ( ! ( name in settings ) ) {
|
115 |
-
settings[ name ] = '';
|
116 |
-
}
|
117 |
-
});
|
118 |
-
|
119 |
-
if ( typeof FLBuilder._getOriginalSettings === 'function' ) {
|
120 |
-
// Merge in the original settings in case legacy fields haven't rendered yet.
|
121 |
-
settings = $.extend( {}, FLBuilder._getOriginalSettings( form ), settings );
|
122 |
-
}
|
123 |
-
|
124 |
-
var widgetForm = form.find( '.siteorigin-widget-form' );
|
125 |
-
if ( widgetForm.length ) {
|
126 |
-
var widgetSettingKey = 'widget-' + sowbForms.getWidgetIdBase( widgetForm );
|
127 |
-
settings[ widgetSettingKey ] = sowbForms.getWidgetFormValues( widgetForm );
|
128 |
-
}
|
129 |
-
// Return the settings.
|
130 |
-
return settings;
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
// To ensure necessary scripts are executed again when settings are changed
|
135 |
-
$( document ).on( 'fl-builder.preview-rendered fl-builder.layout-rendered', '.fl-builder-content', function() {
|
136 |
-
// Trigger Widgets Bundle widgets to setup
|
137 |
-
$( sowb ).trigger( 'setup_widgets', { preview: true } );
|
138 |
-
} );
|
139 |
-
|
140 |
-
})(jQuery);
|
141 |
-
|
142 |
-
window.sowb = sowb;
|
1 |
+
/* globals jQuery, FLBuilder, sowb, sowbForms */
|
2 |
+
|
3 |
+
var sowb = window.sowb || {};
|
4 |
+
|
5 |
+
( function($){
|
6 |
+
if( typeof FLBuilder !== 'undefined') {
|
7 |
+
// If you're going to override jQuery's `ready` function, at least make sure it still works. :/
|
8 |
+
sowb.orig_FLBuilder_initJQueryReadyFix = FLBuilder._initJQueryReadyFix;
|
9 |
+
FLBuilder._initJQueryReadyFix = function() {
|
10 |
+
return;
|
11 |
+
};
|
12 |
+
|
13 |
+
sowb.orig_FLBuilder_getSettings = FLBuilder._getSettings;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Replace Beaver Builder's form data collection function with our modified version.
|
17 |
+
*/
|
18 |
+
FLBuilder._getSettings = function(form) {
|
19 |
+
FLBuilder._updateEditorFields();
|
20 |
+
|
21 |
+
var data = form.serializeArray(),
|
22 |
+
i = 0,
|
23 |
+
k = 0,
|
24 |
+
value = '',
|
25 |
+
name = '',
|
26 |
+
key = '',
|
27 |
+
keys = [],
|
28 |
+
matches = [],
|
29 |
+
settings = {};
|
30 |
+
|
31 |
+
// Loop through the form data.
|
32 |
+
for ( i = 0; i < data.length; i++ ) {
|
33 |
+
|
34 |
+
value = data[ i ].value.replace( /\r/gm, '' ).replace( /'/g, "'" );
|
35 |
+
|
36 |
+
// Don't save text editor textareas.
|
37 |
+
if ( data[ i ].name.indexOf( 'flrich' ) > -1 ) {
|
38 |
+
continue;
|
39 |
+
}
|
40 |
+
// Support foo[]... setting keys.
|
41 |
+
else if ( data[ i ].name.indexOf( '[' ) > -1 ) {
|
42 |
+
|
43 |
+
name = data[ i ].name.replace( /\[(.*)\]/, '' );
|
44 |
+
key = data[ i ].name.replace( name, '' );
|
45 |
+
keys = [];
|
46 |
+
matches = key.match( /\[[^\]]*\]/g );
|
47 |
+
|
48 |
+
// Remove [] from the keys.
|
49 |
+
for ( k = 0; k < matches.length; k++ ) {
|
50 |
+
|
51 |
+
if ( '[]' === matches[ k ] ) {
|
52 |
+
continue;
|
53 |
+
}
|
54 |
+
|
55 |
+
keys.push( matches[ k ].replace( /[\[\]]/g, '' ) );
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
var f = function(object, val, head, tail) {
|
60 |
+
if( tail.length === 0) {
|
61 |
+
object[ head ] = val;
|
62 |
+
} else {
|
63 |
+
if( 'undefined' === typeof object [ head ] ) {
|
64 |
+
object [ head ] = {};
|
65 |
+
}
|
66 |
+
f(object[ head ], val, tail.shift(), tail);
|
67 |
+
}
|
68 |
+
};
|
69 |
+
|
70 |
+
if(keys.length > 0) {
|
71 |
+
|
72 |
+
var keysCopy = keys.slice();
|
73 |
+
if ( 'undefined' === typeof settings[ name ] ) {
|
74 |
+
settings[ name ] = {};
|
75 |
+
}
|
76 |
+
f(settings[ name ], value, keysCopy.shift(), keysCopy);
|
77 |
+
} else {
|
78 |
+
|
79 |
+
if ( 'undefined' === typeof settings[ name ] ) {
|
80 |
+
settings[ name ] = [];
|
81 |
+
}
|
82 |
+
|
83 |
+
settings[ name ].push( value );
|
84 |
+
}
|
85 |
+
}
|
86 |
+
// Standard name/value pair.
|
87 |
+
else {
|
88 |
+
settings[ data[ i ].name ] = value;
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
// Update auto suggest values.
|
93 |
+
for ( key in settings ) {
|
94 |
+
|
95 |
+
if ( 'undefined' !== typeof settings[ 'as_values_' + key ] ) {
|
96 |
+
|
97 |
+
settings[ key ] = $.grep(
|
98 |
+
settings[ 'as_values_' + key ].split( ',' ),
|
99 |
+
function( n ) {
|
100 |
+
return n !== '';
|
101 |
+
}
|
102 |
+
).join( ',' );
|
103 |
+
|
104 |
+
try {
|
105 |
+
delete settings[ 'as_values_' + key ];
|
106 |
+
}
|
107 |
+
catch( e ) {}
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
// In the case of multi-select or checkboxes we need to put the blank setting back in.
|
112 |
+
$.each( form.find( '[name]' ), function( key, input ) {
|
113 |
+
var name = $( input ).attr( 'name' ).replace( /\[(.*)\]/, '' );
|
114 |
+
if ( ! ( name in settings ) ) {
|
115 |
+
settings[ name ] = '';
|
116 |
+
}
|
117 |
+
});
|
118 |
+
|
119 |
+
if ( typeof FLBuilder._getOriginalSettings === 'function' ) {
|
120 |
+
// Merge in the original settings in case legacy fields haven't rendered yet.
|
121 |
+
settings = $.extend( {}, FLBuilder._getOriginalSettings( form ), settings );
|
122 |
+
}
|
123 |
+
|
124 |
+
var widgetForm = form.find( '.siteorigin-widget-form' );
|
125 |
+
if ( widgetForm.length ) {
|
126 |
+
var widgetSettingKey = 'widget-' + sowbForms.getWidgetIdBase( widgetForm );
|
127 |
+
settings[ widgetSettingKey ] = sowbForms.getWidgetFormValues( widgetForm );
|
128 |
+
}
|
129 |
+
// Return the settings.
|
130 |
+
return settings;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
// To ensure necessary scripts are executed again when settings are changed
|
135 |
+
$( document ).on( 'fl-builder.preview-rendered fl-builder.layout-rendered', '.fl-builder-content', function() {
|
136 |
+
// Trigger Widgets Bundle widgets to setup
|
137 |
+
$( sowb ).trigger( 'setup_widgets', { preview: true } );
|
138 |
+
} );
|
139 |
+
|
140 |
+
})(jQuery);
|
141 |
+
|
142 |
+
window.sowb = sowb;
|
compat/block-editor/widget-block.js
CHANGED
@@ -1,299 +1,299 @@
|
|
1 |
-
( function ( editor, blocks, i18n, element, components, compose ) {
|
2 |
-
|
3 |
-
var el = element.createElement;
|
4 |
-
var registerBlockType = blocks.registerBlockType;
|
5 |
-
var BlockControls = editor.BlockControls;
|
6 |
-
var SelectControl = components.SelectControl;
|
7 |
-
var withState = compose.withState;
|
8 |
-
var Toolbar = components.Toolbar;
|
9 |
-
var IconButton = components.IconButton;
|
10 |
-
var Placeholder = components.Placeholder;
|
11 |
-
var Spinner = components.Spinner;
|
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 |
-
|
19 |
-
icon: function() {
|
20 |
-
return el(
|
21 |
-
'span',
|
22 |
-
{
|
23 |
-
className: 'widget-icon so-widget-icon so-block-editor-icon'
|
24 |
-
}
|
25 |
-
)
|
26 |
-
},
|
27 |
-
|
28 |
-
category: 'widgets',
|
29 |
-
|
30 |
-
keywords: [sowbBlockEditorAdmin.widgets.reduce( function ( keywords, widgetObj ) {
|
31 |
-
if ( keywords.length > 0 ) {
|
32 |
-
keywords += ',';
|
33 |
-
}
|
34 |
-
return keywords + widgetObj.name;
|
35 |
-
}, '' )],
|
36 |
-
|
37 |
-
supports: {
|
38 |
-
html: false,
|
39 |
-
},
|
40 |
-
|
41 |
-
attributes: {
|
42 |
-
widgetClass: {
|
43 |
-
type: 'string',
|
44 |
-
},
|
45 |
-
widgetData: {
|
46 |
-
type: 'object',
|
47 |
-
}
|
48 |
-
},
|
49 |
-
|
50 |
-
edit: withState( {
|
51 |
-
editing: false,
|
52 |
-
formInitialized: false,
|
53 |
-
previewInitialized: false,
|
54 |
-
widgetFormHtml: '',
|
55 |
-
widgetSettingsChanged: false,
|
56 |
-
widgetPreviewHtml: '',
|
57 |
-
} )( function ( props ) {
|
58 |
-
|
59 |
-
function onWidgetClassChange( newWidgetClass ) {
|
60 |
-
if ( newWidgetClass !== '' ) {
|
61 |
-
if ( props.widgetSettingsChanged && ! confirm( sowbBlockEditorAdmin.confirmChangeWidget ) ) {
|
62 |
-
return false;
|
63 |
-
}
|
64 |
-
props.setAttributes( { widgetClass: newWidgetClass, widgetData: null } );
|
65 |
-
props.setState( {
|
66 |
-
editing: true,
|
67 |
-
widgetFormHtml: null,
|
68 |
-
formInitialized: false,
|
69 |
-
widgetSettingsChanged: false,
|
70 |
-
widgetPreviewHtml: null,
|
71 |
-
previewInitialized: false
|
72 |
-
} );
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
function switchToEditing() {
|
77 |
-
props.setState( { editing: true, formInitialized: false } );
|
78 |
-
}
|
79 |
-
|
80 |
-
function switchToPreview() {
|
81 |
-
props.setState( { editing: false, previewInitialized: false } );
|
82 |
-
}
|
83 |
-
|
84 |
-
function setupWidgetForm( formContainer ) {
|
85 |
-
var $mainForm = $( formContainer ).find( '.siteorigin-widget-form-main' );
|
86 |
-
if ( $mainForm.length > 0 && ! props.formInitialized ) {
|
87 |
-
var $previewContainer = $mainForm.siblings('.siteorigin-widget-preview');
|
88 |
-
$previewContainer.find( '> a' ).on( 'click', function ( event ) {
|
89 |
-
event.stopImmediatePropagation();
|
90 |
-
switchToPreview();
|
91 |
-
} );
|
92 |
-
$mainForm.data( 'backupDisabled', true );
|
93 |
-
$mainForm.sowSetupForm();
|
94 |
-
if ( ! props.attributes.widgetData ) {
|
95 |
-
props.setAttributes( { widgetData: sowbForms.getWidgetFormValues( $mainForm ) } );
|
96 |
-
}
|
97 |
-
$mainForm.on( 'change', function () {
|
98 |
-
props.setAttributes( { widgetData: sowbForms.getWidgetFormValues( $mainForm ) } );
|
99 |
-
props.setState( {
|
100 |
-
widgetSettingsChanged: true,
|
101 |
-
widgetPreviewHtml: null,
|
102 |
-
previewInitialized: false
|
103 |
-
} );
|
104 |
-
} );
|
105 |
-
props.setState( { formInitialized: true } );
|
106 |
-
}
|
107 |
-
}
|
108 |
-
|
109 |
-
function setupWidgetPreview() {
|
110 |
-
if ( ! props.previewInitialized ) {
|
111 |
-
$( window.sowb ).trigger( 'setup_widgets', { preview: true } );
|
112 |
-
props.setState( { previewInitialized: true } );
|
113 |
-
}
|
114 |
-
}
|
115 |
-
|
116 |
-
if ( props.editing || ! props.attributes.widgetClass || ! props.attributes.widgetData ) {
|
117 |
-
var widgetsOptions = [];
|
118 |
-
if ( sowbBlockEditorAdmin.widgets ) {
|
119 |
-
sowbBlockEditorAdmin.widgets.sort( function ( a, b ) {
|
120 |
-
if ( a.name < b.name ) {
|
121 |
-
return -1;
|
122 |
-
} else if ( a.name > b.name ) {
|
123 |
-
return 1;
|
124 |
-
}
|
125 |
-
return 0;
|
126 |
-
} );
|
127 |
-
widgetsOptions = sowbBlockEditorAdmin.widgets.map( function ( widget ) {
|
128 |
-
return { value: widget.class, label: widget.name };
|
129 |
-
} );
|
130 |
-
widgetsOptions.unshift( { value: '', label: __( 'Select widget type', 'so-widgets-bundle' ) } );
|
131 |
-
}
|
132 |
-
|
133 |
-
var loadWidgetForm = props.attributes.widgetClass && ! props.widgetFormHtml;
|
134 |
-
if ( loadWidgetForm ) {
|
135 |
-
$.post( {
|
136 |
-
url: sowbBlockEditorAdmin.restUrl + 'sowb/v1/widgets/forms',
|
137 |
-
beforeSend: function ( xhr ) {
|
138 |
-
xhr.setRequestHeader( 'X-WP-Nonce', sowbBlockEditorAdmin.nonce );
|
139 |
-
},
|
140 |
-
data: {
|
141 |
-
widgetClass: props.attributes.widgetClass,
|
142 |
-
widgetData: props.attributes.widgetData,
|
143 |
-
}
|
144 |
-
} )
|
145 |
-
.done( function( widgetForm ) {
|
146 |
-
props.setState( { widgetFormHtml: widgetForm } );
|
147 |
-
} )
|
148 |
-
.fail( function ( response ) {
|
149 |
-
|
150 |
-
var errorMessage = '';
|
151 |
-
if ( response.hasOwnProperty( 'responseJSON' ) ) {
|
152 |
-
errorMessage = response.responseJSON.message;
|
153 |
-
} else if ( response.hasOwnProperty( 'responseText' ) ) {
|
154 |
-
errorMessage = response.responseText;
|
155 |
-
}
|
156 |
-
|
157 |
-
props.setState( { widgetFormHtml: '<div>' + errorMessage + '</div>', } );
|
158 |
-
});
|
159 |
-
}
|
160 |
-
|
161 |
-
var widgetForm = props.widgetFormHtml ? props.widgetFormHtml : '';
|
162 |
-
|
163 |
-
return [
|
164 |
-
!! widgetForm && el(
|
165 |
-
BlockControls,
|
166 |
-
{ key: 'controls' },
|
167 |
-
el(
|
168 |
-
Toolbar,
|
169 |
-
null,
|
170 |
-
el(
|
171 |
-
IconButton,
|
172 |
-
{
|
173 |
-
className: 'components-icon-button components-toolbar__control',
|
174 |
-
label: __( 'Preview widget.', 'so-widgets-bundle' ),
|
175 |
-
onClick: switchToPreview,
|
176 |
-
icon: 'visibility'
|
177 |
-
}
|
178 |
-
)
|
179 |
-
)
|
180 |
-
),
|
181 |
-
el(
|
182 |
-
Placeholder,
|
183 |
-
{
|
184 |
-
key: 'placeholder',
|
185 |
-
className: 'so-widget-placeholder',
|
186 |
-
label: __( 'SiteOrigin Widget', 'so-widgets-bundle' ),
|
187 |
-
instructions: __( 'Select the type of widget you want to use:', 'so-widgets-bundle' )
|
188 |
-
},
|
189 |
-
( props.loadingWidgets || loadWidgetForm ?
|
190 |
-
el( Spinner ) :
|
191 |
-
el(
|
192 |
-
'div',
|
193 |
-
{ className: 'so-widget-block-container' },
|
194 |
-
el(
|
195 |
-
SelectControl,
|
196 |
-
{
|
197 |
-
options: widgetsOptions,
|
198 |
-
value: props.attributes.widgetClass,
|
199 |
-
onChange: onWidgetClassChange,
|
200 |
-
}
|
201 |
-
),
|
202 |
-
el( 'div', {
|
203 |
-
className: 'so-widget-block-form-container',
|
204 |
-
dangerouslySetInnerHTML: { __html: widgetForm },
|
205 |
-
ref: setupWidgetForm,
|
206 |
-
} )
|
207 |
-
)
|
208 |
-
)
|
209 |
-
)
|
210 |
-
];
|
211 |
-
} else {
|
212 |
-
|
213 |
-
var loadWidgetPreview = ! props.loadingWidgets &&
|
214 |
-
! props.editing &&
|
215 |
-
! props.widgetPreviewHtml &&
|
216 |
-
props.attributes.widgetClass &&
|
217 |
-
props.attributes.widgetData;
|
218 |
-
if ( loadWidgetPreview ) {
|
219 |
-
$.post( {
|
220 |
-
url: sowbBlockEditorAdmin.restUrl + 'sowb/v1/widgets/previews',
|
221 |
-
beforeSend: function ( xhr ) {
|
222 |
-
xhr.setRequestHeader( 'X-WP-Nonce', sowbBlockEditorAdmin.nonce );
|
223 |
-
},
|
224 |
-
data: {
|
225 |
-
widgetClass: props.attributes.widgetClass,
|
226 |
-
widgetData: props.attributes.widgetData || {}
|
227 |
-
}
|
228 |
-
} )
|
229 |
-
.done( function( widgetPreview ) {
|
230 |
-
props.setState( {
|
231 |
-
widgetPreviewHtml: widgetPreview,
|
232 |
-
previewInitialized: false,
|
233 |
-
} );
|
234 |
-
} )
|
235 |
-
.fail( function ( response ) {
|
236 |
-
|
237 |
-
var errorMessage = '';
|
238 |
-
if ( response.hasOwnProperty( 'responseJSON' ) ) {
|
239 |
-
errorMessage = response.responseJSON.message;
|
240 |
-
} else if ( response.hasOwnProperty( 'responseText' ) ) {
|
241 |
-
errorMessage = response.responseText;
|
242 |
-
}
|
243 |
-
|
244 |
-
props.setState( {
|
245 |
-
widgetPreviewHtml: '<div>' + errorMessage + '</div>',
|
246 |
-
} );
|
247 |
-
});
|
248 |
-
}
|
249 |
-
var widgetPreview = props.widgetPreviewHtml ? props.widgetPreviewHtml : '';
|
250 |
-
return [
|
251 |
-
el(
|
252 |
-
BlockControls,
|
253 |
-
{ key: 'controls' },
|
254 |
-
el(
|
255 |
-
Toolbar,
|
256 |
-
null,
|
257 |
-
el(
|
258 |
-
IconButton,
|
259 |
-
{
|
260 |
-
className: 'components-icon-button components-toolbar__control',
|
261 |
-
label: __( 'Edit widget.', 'so-widgets-bundle' ),
|
262 |
-
onClick: switchToEditing,
|
263 |
-
icon: 'edit'
|
264 |
-
}
|
265 |
-
)
|
266 |
-
)
|
267 |
-
),
|
268 |
-
el(
|
269 |
-
'div',
|
270 |
-
{
|
271 |
-
key: 'preview',
|
272 |
-
className: 'so-widget-preview-container'
|
273 |
-
},
|
274 |
-
( loadWidgetPreview ?
|
275 |
-
el( 'div', {
|
276 |
-
className: 'so-widgets-spinner-container'
|
277 |
-
},
|
278 |
-
el(
|
279 |
-
'span',
|
280 |
-
null,
|
281 |
-
el( Spinner )
|
282 |
-
)
|
283 |
-
) :
|
284 |
-
el( 'div', {
|
285 |
-
dangerouslySetInnerHTML: { __html: widgetPreview },
|
286 |
-
ref: setupWidgetPreview,
|
287 |
-
} )
|
288 |
-
)
|
289 |
-
)
|
290 |
-
];
|
291 |
-
}
|
292 |
-
} ),
|
293 |
-
|
294 |
-
save: function () {
|
295 |
-
// Render in PHP
|
296 |
-
return null;
|
297 |
-
}
|
298 |
-
} );
|
299 |
-
} )( window.wp.editor, window.wp.blocks, window.wp.i18n, window.wp.element, window.wp.components, window.wp.compose );
|
1 |
+
( function ( editor, blocks, i18n, element, components, compose ) {
|
2 |
+
|
3 |
+
var el = element.createElement;
|
4 |
+
var registerBlockType = blocks.registerBlockType;
|
5 |
+
var BlockControls = editor.BlockControls;
|
6 |
+
var SelectControl = components.SelectControl;
|
7 |
+
var withState = compose.withState;
|
8 |
+
var Toolbar = components.Toolbar;
|
9 |
+
var IconButton = components.IconButton;
|
10 |
+
var Placeholder = components.Placeholder;
|
11 |
+
var Spinner = components.Spinner;
|
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 |
+
|
19 |
+
icon: function() {
|
20 |
+
return el(
|
21 |
+
'span',
|
22 |
+
{
|
23 |
+
className: 'widget-icon so-widget-icon so-block-editor-icon'
|
24 |
+
}
|
25 |
+
)
|
26 |
+
},
|
27 |
+
|
28 |
+
category: 'widgets',
|
29 |
+
|
30 |
+
keywords: [sowbBlockEditorAdmin.widgets.reduce( function ( keywords, widgetObj ) {
|
31 |
+
if ( keywords.length > 0 ) {
|
32 |
+
keywords += ',';
|
33 |
+
}
|
34 |
+
return keywords + widgetObj.name;
|
35 |
+
}, '' )],
|
36 |
+
|
37 |
+
supports: {
|
38 |
+
html: false,
|
39 |
+
},
|
40 |
+
|
41 |
+
attributes: {
|
42 |
+
widgetClass: {
|
43 |
+
type: 'string',
|
44 |
+
},
|
45 |
+
widgetData: {
|
46 |
+
type: 'object',
|
47 |
+
}
|
48 |
+
},
|
49 |
+
|
50 |
+
edit: withState( {
|
51 |
+
editing: false,
|
52 |
+
formInitialized: false,
|
53 |
+
previewInitialized: false,
|
54 |
+
widgetFormHtml: '',
|
55 |
+
widgetSettingsChanged: false,
|
56 |
+
widgetPreviewHtml: '',
|
57 |
+
} )( function ( props ) {
|
58 |
+
|
59 |
+
function onWidgetClassChange( newWidgetClass ) {
|
60 |
+
if ( newWidgetClass !== '' ) {
|
61 |
+
if ( props.widgetSettingsChanged && ! confirm( sowbBlockEditorAdmin.confirmChangeWidget ) ) {
|
62 |
+
return false;
|
63 |
+
}
|
64 |
+
props.setAttributes( { widgetClass: newWidgetClass, widgetData: null } );
|
65 |
+
props.setState( {
|
66 |
+
editing: true,
|
67 |
+
widgetFormHtml: null,
|
68 |
+
formInitialized: false,
|
69 |
+
widgetSettingsChanged: false,
|
70 |
+
widgetPreviewHtml: null,
|
71 |
+
previewInitialized: false
|
72 |
+
} );
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
function switchToEditing() {
|
77 |
+
props.setState( { editing: true, formInitialized: false } );
|
78 |
+
}
|
79 |
+
|
80 |
+
function switchToPreview() {
|
81 |
+
props.setState( { editing: false, previewInitialized: false } );
|
82 |
+
}
|
83 |
+
|
84 |
+
function setupWidgetForm( formContainer ) {
|
85 |
+
var $mainForm = $( formContainer ).find( '.siteorigin-widget-form-main' );
|
86 |
+
if ( $mainForm.length > 0 && ! props.formInitialized ) {
|
87 |
+
var $previewContainer = $mainForm.siblings('.siteorigin-widget-preview');
|
88 |
+
$previewContainer.find( '> a' ).on( 'click', function ( event ) {
|
89 |
+
event.stopImmediatePropagation();
|
90 |
+
switchToPreview();
|
91 |
+
} );
|
92 |
+
$mainForm.data( 'backupDisabled', true );
|
93 |
+
$mainForm.sowSetupForm();
|
94 |
+
if ( ! props.attributes.widgetData ) {
|
95 |
+
props.setAttributes( { widgetData: sowbForms.getWidgetFormValues( $mainForm ) } );
|
96 |
+
}
|
97 |
+
$mainForm.on( 'change', function () {
|
98 |
+
props.setAttributes( { widgetData: sowbForms.getWidgetFormValues( $mainForm ) } );
|
99 |
+
props.setState( {
|
100 |
+
widgetSettingsChanged: true,
|
101 |
+
widgetPreviewHtml: null,
|
102 |
+
previewInitialized: false
|
103 |
+
} );
|
104 |
+
} );
|
105 |
+
props.setState( { formInitialized: true } );
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
function setupWidgetPreview() {
|
110 |
+
if ( ! props.previewInitialized ) {
|
111 |
+
$( window.sowb ).trigger( 'setup_widgets', { preview: true } );
|
112 |
+
props.setState( { previewInitialized: true } );
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
if ( props.editing || ! props.attributes.widgetClass || ! props.attributes.widgetData ) {
|
117 |
+
var widgetsOptions = [];
|
118 |
+
if ( sowbBlockEditorAdmin.widgets ) {
|
119 |
+
sowbBlockEditorAdmin.widgets.sort( function ( a, b ) {
|
120 |
+
if ( a.name < b.name ) {
|
121 |
+
return -1;
|
122 |
+
} else if ( a.name > b.name ) {
|
123 |
+
return 1;
|
124 |
+
}
|
125 |
+
return 0;
|
126 |
+
} );
|
127 |
+
widgetsOptions = sowbBlockEditorAdmin.widgets.map( function ( widget ) {
|
128 |
+
return { value: widget.class, label: widget.name };
|
129 |
+
} );
|
130 |
+
widgetsOptions.unshift( { value: '', label: __( 'Select widget type', 'so-widgets-bundle' ) } );
|
131 |
+
}
|
132 |
+
|
133 |
+
var loadWidgetForm = props.attributes.widgetClass && ! props.widgetFormHtml;
|
134 |
+
if ( loadWidgetForm ) {
|
135 |
+
$.post( {
|
136 |
+
url: sowbBlockEditorAdmin.restUrl + 'sowb/v1/widgets/forms',
|
137 |
+
beforeSend: function ( xhr ) {
|
138 |
+
xhr.setRequestHeader( 'X-WP-Nonce', sowbBlockEditorAdmin.nonce );
|
139 |
+
},
|
140 |
+
data: {
|
141 |
+
widgetClass: props.attributes.widgetClass,
|
142 |
+
widgetData: props.attributes.widgetData,
|
143 |
+
}
|
144 |
+
} )
|
145 |
+
.done( function( widgetForm ) {
|
146 |
+
props.setState( { widgetFormHtml: widgetForm } );
|
147 |
+
} )
|
148 |
+
.fail( function ( response ) {
|
149 |
+
|
150 |
+
var errorMessage = '';
|
151 |
+
if ( response.hasOwnProperty( 'responseJSON' ) ) {
|
152 |
+
errorMessage = response.responseJSON.message;
|
153 |
+
} else if ( response.hasOwnProperty( 'responseText' ) ) {
|
154 |
+
errorMessage = response.responseText;
|
155 |
+
}
|
156 |
+
|
157 |
+
props.setState( { widgetFormHtml: '<div>' + errorMessage + '</div>', } );
|
158 |
+
});
|
159 |
+
}
|
160 |
+
|
161 |
+
var widgetForm = props.widgetFormHtml ? props.widgetFormHtml : '';
|
162 |
+
|
163 |
+
return [
|
164 |
+
!! widgetForm && el(
|
165 |
+
BlockControls,
|
166 |
+
{ key: 'controls' },
|
167 |
+
el(
|
168 |
+
Toolbar,
|
169 |
+
null,
|
170 |
+
el(
|
171 |
+
IconButton,
|
172 |
+
{
|
173 |
+
className: 'components-icon-button components-toolbar__control',
|
174 |
+
label: __( 'Preview widget.', 'so-widgets-bundle' ),
|
175 |
+
onClick: switchToPreview,
|
176 |
+
icon: 'visibility'
|
177 |
+
}
|
178 |
+
)
|
179 |
+
)
|
180 |
+
),
|
181 |
+
el(
|
182 |
+
Placeholder,
|
183 |
+
{
|
184 |
+
key: 'placeholder',
|
185 |
+
className: 'so-widget-placeholder',
|
186 |
+
label: __( 'SiteOrigin Widget', 'so-widgets-bundle' ),
|
187 |
+
instructions: __( 'Select the type of widget you want to use:', 'so-widgets-bundle' )
|
188 |
+
},
|
189 |
+
( props.loadingWidgets || loadWidgetForm ?
|
190 |
+
el( Spinner ) :
|
191 |
+
el(
|
192 |
+
'div',
|
193 |
+
{ className: 'so-widget-block-container' },
|
194 |
+
el(
|
195 |
+
SelectControl,
|
196 |
+
{
|
197 |
+
options: widgetsOptions,
|
198 |
+
value: props.attributes.widgetClass,
|
199 |
+
onChange: onWidgetClassChange,
|
200 |
+
}
|
201 |
+
),
|
202 |
+
el( 'div', {
|
203 |
+
className: 'so-widget-block-form-container',
|
204 |
+
dangerouslySetInnerHTML: { __html: widgetForm },
|
205 |
+
ref: setupWidgetForm,
|
206 |
+
} )
|
207 |
+
)
|
208 |
+
)
|
209 |
+
)
|
210 |
+
];
|
211 |
+
} else {
|
212 |
+
|
213 |
+
var loadWidgetPreview = ! props.loadingWidgets &&
|
214 |
+
! props.editing &&
|
215 |
+
! props.widgetPreviewHtml &&
|
216 |
+
props.attributes.widgetClass &&
|
217 |
+
props.attributes.widgetData;
|
218 |
+
if ( loadWidgetPreview ) {
|
219 |
+
$.post( {
|
220 |
+
url: sowbBlockEditorAdmin.restUrl + 'sowb/v1/widgets/previews',
|
221 |
+
beforeSend: function ( xhr ) {
|
222 |
+
xhr.setRequestHeader( 'X-WP-Nonce', sowbBlockEditorAdmin.nonce );
|
223 |
+
},
|
224 |
+
data: {
|
225 |
+
widgetClass: props.attributes.widgetClass,
|
226 |
+
widgetData: props.attributes.widgetData || {}
|
227 |
+
}
|
228 |
+
} )
|
229 |
+
.done( function( widgetPreview ) {
|
230 |
+
props.setState( {
|
231 |
+
widgetPreviewHtml: widgetPreview,
|
232 |
+
previewInitialized: false,
|
233 |
+
} );
|
234 |
+
} )
|
235 |
+
.fail( function ( response ) {
|
236 |
+
|
237 |
+
var errorMessage = '';
|
238 |
+
if ( response.hasOwnProperty( 'responseJSON' ) ) {
|
239 |
+
errorMessage = response.responseJSON.message;
|
240 |
+
} else if ( response.hasOwnProperty( 'responseText' ) ) {
|
241 |
+
errorMessage = response.responseText;
|
242 |
+
}
|
243 |
+
|
244 |
+
props.setState( {
|
245 |
+
widgetPreviewHtml: '<div>' + errorMessage + '</div>',
|
246 |
+
} );
|
247 |
+
});
|
248 |
+
}
|
249 |
+
var widgetPreview = props.widgetPreviewHtml ? props.widgetPreviewHtml : '';
|
250 |
+
return [
|
251 |
+
el(
|
252 |
+
BlockControls,
|
253 |
+
{ key: 'controls' },
|
254 |
+
el(
|
255 |
+
Toolbar,
|
256 |
+
null,
|
257 |
+
el(
|
258 |
+
IconButton,
|
259 |
+
{
|
260 |
+
className: 'components-icon-button components-toolbar__control',
|
261 |
+
label: __( 'Edit widget.', 'so-widgets-bundle' ),
|
262 |
+
onClick: switchToEditing,
|
263 |
+
icon: 'edit'
|
264 |
+
}
|
265 |
+
)
|
266 |
+
)
|
267 |
+
),
|
268 |
+
el(
|
269 |
+
'div',
|
270 |
+
{
|
271 |
+
key: 'preview',
|
272 |
+
className: 'so-widget-preview-container'
|
273 |
+
},
|
274 |
+
( loadWidgetPreview ?
|
275 |
+
el( 'div', {
|
276 |
+
className: 'so-widgets-spinner-container'
|
277 |
+
},
|
278 |
+
el(
|
279 |
+
'span',
|
280 |
+
null,
|
281 |
+
el( Spinner )
|
282 |
+
)
|
283 |
+
) :
|
284 |
+
el( 'div', {
|
285 |
+
dangerouslySetInnerHTML: { __html: widgetPreview },
|
286 |
+
ref: setupWidgetPreview,
|
287 |
+
} )
|
288 |
+
)
|
289 |
+
)
|
290 |
+
];
|
291 |
+
}
|
292 |
+
} ),
|
293 |
+
|
294 |
+
save: function () {
|
295 |
+
// Render in PHP
|
296 |
+
return null;
|
297 |
+
}
|
298 |
+
} );
|
299 |
+
} )( window.wp.editor, window.wp.blocks, window.wp.i18n, window.wp.element, window.wp.components, window.wp.compose );
|
compat/block-editor/widget-block.php
CHANGED
@@ -1,102 +1,102 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class SiteOrigin_Widgets_Bundle_Widget_Block {
|
4 |
-
/**
|
5 |
-
* Get the singleton instance
|
6 |
-
*
|
7 |
-
* @return SiteOrigin_Widgets_Bundle_Widget_Block
|
8 |
-
*/
|
9 |
-
public static function single() {
|
10 |
-
static $single;
|
11 |
-
|
12 |
-
return empty( $single ) ? $single = new self() : $single;
|
13 |
-
}
|
14 |
-
|
15 |
-
public function __construct() {
|
16 |
-
add_action( 'init', array( $this, 'register_widget_block' ) );
|
17 |
-
add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_widget_block_editor_assets' ) );
|
18 |
-
}
|
19 |
-
|
20 |
-
public function register_widget_block() {
|
21 |
-
register_block_type( 'sowb/widget-block', array(
|
22 |
-
'render_callback' => array( $this, 'render_widget_block' ),
|
23 |
-
) );
|
24 |
-
}
|
25 |
-
|
26 |
-
public function enqueue_widget_block_editor_assets() {
|
27 |
-
wp_enqueue_script(
|
28 |
-
'sowb-widget-block',
|
29 |
-
plugins_url( 'widget-block' . SOW_BUNDLE_JS_SUFFIX . '.js', __FILE__ ),
|
30 |
-
array( 'wp-editor', 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-compose' ),
|
31 |
-
SOW_BUNDLE_VERSION
|
32 |
-
);
|
33 |
-
|
34 |
-
global $wp_widget_factory;
|
35 |
-
$so_widgets = array();
|
36 |
-
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
|
37 |
-
if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
|
38 |
-
$so_widgets[] = array(
|
39 |
-
'name' => preg_replace( '/^SiteOrigin /', '', $widget_obj->name ),
|
40 |
-
'class' => $class,
|
41 |
-
);
|
42 |
-
}
|
43 |
-
}
|
44 |
-
|
45 |
-
wp_localize_script(
|
46 |
-
'sowb-widget-block',
|
47 |
-
'sowbBlockEditorAdmin',
|
48 |
-
array(
|
49 |
-
'widgets' => $so_widgets,
|
50 |
-
'restUrl' => esc_url_raw( rest_url() ),
|
51 |
-
'nonce' => wp_create_nonce( 'wp_rest' ),
|
52 |
-
'confirmChangeWidget' => __( 'Selecting a different widget will revert any changes. Continue?', 'so-widgets-bundle' ),
|
53 |
-
)
|
54 |
-
);
|
55 |
-
if ( function_exists( 'wp_set_script_translations' ) ) {
|
56 |
-
wp_set_script_translations( 'sowb-widget-block', 'so-widgets-bundle' );
|
57 |
-
}
|
58 |
-
|
59 |
-
$so_widgets_bundle = SiteOrigin_Widgets_Bundle::single();
|
60 |
-
// This is to ensure necessary scripts can be enqueued for previews.
|
61 |
-
$so_widgets_bundle->register_general_scripts();
|
62 |
-
$so_widgets_bundle->enqueue_registered_widgets_scripts();
|
63 |
-
}
|
64 |
-
|
65 |
-
public function render_widget_block( $attributes ) {
|
66 |
-
if ( empty( $attributes['widgetClass'] ) ) {
|
67 |
-
return '<div>'.
|
68 |
-
__( 'You need to select a widget type before you\'ll see anything here. :)', 'so-widgets-bundle' ) .
|
69 |
-
'</div>';
|
70 |
-
}
|
71 |
-
|
72 |
-
$widget_class = $attributes['widgetClass'];
|
73 |
-
|
74 |
-
global $wp_widget_factory;
|
75 |
-
|
76 |
-
$widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
|
77 |
-
|
78 |
-
$instance = $attributes['widgetData'];
|
79 |
-
|
80 |
-
if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
|
81 |
-
$GLOBALS['SITEORIGIN_WIDGET_BLOCK_RENDER'] = true;
|
82 |
-
ob_start();
|
83 |
-
/* @var $widget SiteOrigin_Widget */
|
84 |
-
$instance = $widget->update( $instance, $instance );
|
85 |
-
$widget->widget( array(), $instance );
|
86 |
-
$rendered_widget = ob_get_clean();
|
87 |
-
unset( $GLOBALS['SITEORIGIN_WIDGET_BLOCK_RENDER'] );
|
88 |
-
} else {
|
89 |
-
return '<div>'.
|
90 |
-
sprintf(
|
91 |
-
__( 'Invalid widget class %s. Please make sure the widget has been activated in %sSiteOrigin Widgets%s.', 'so-widgets-bundle' ),
|
92 |
-
$widget_class,
|
93 |
-
'<a href="' . admin_url( 'plugins.php?page=so-widgets-plugins' ) . '">',
|
94 |
-
'</a>'
|
95 |
-
) .
|
96 |
-
'</div>';
|
97 |
-
}
|
98 |
-
return $rendered_widget;
|
99 |
-
}
|
100 |
-
}
|
101 |
-
|
102 |
-
SiteOrigin_Widgets_Bundle_Widget_Block::single();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class SiteOrigin_Widgets_Bundle_Widget_Block {
|
4 |
+
/**
|
5 |
+
* Get the singleton instance
|
6 |
+
*
|
7 |
+
* @return SiteOrigin_Widgets_Bundle_Widget_Block
|
8 |
+
*/
|
9 |
+
public static function single() {
|
10 |
+
static $single;
|
11 |
+
|
12 |
+
return empty( $single ) ? $single = new self() : $single;
|
13 |
+
}
|
14 |
+
|
15 |
+
public function __construct() {
|
16 |
+
add_action( 'init', array( $this, 'register_widget_block' ) );
|
17 |
+
add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_widget_block_editor_assets' ) );
|
18 |
+
}
|
19 |
+
|
20 |
+
public function register_widget_block() {
|
21 |
+
register_block_type( 'sowb/widget-block', array(
|
22 |
+
'render_callback' => array( $this, 'render_widget_block' ),
|
23 |
+
) );
|
24 |
+
}
|
25 |
+
|
26 |
+
public function enqueue_widget_block_editor_assets() {
|
27 |
+
wp_enqueue_script(
|
28 |
+
'sowb-widget-block',
|
29 |
+
plugins_url( 'widget-block' . SOW_BUNDLE_JS_SUFFIX . '.js', __FILE__ ),
|
30 |
+
array( 'wp-editor', 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-compose' ),
|
31 |
+
SOW_BUNDLE_VERSION
|
32 |
+
);
|
33 |
+
|
34 |
+
global $wp_widget_factory;
|
35 |
+
$so_widgets = array();
|
36 |
+
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
|
37 |
+
if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
|
38 |
+
$so_widgets[] = array(
|
39 |
+
'name' => preg_replace( '/^SiteOrigin /', '', $widget_obj->name ),
|
40 |
+
'class' => $class,
|
41 |
+
);
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
wp_localize_script(
|
46 |
+
'sowb-widget-block',
|
47 |
+
'sowbBlockEditorAdmin',
|
48 |
+
array(
|
49 |
+
'widgets' => $so_widgets,
|
50 |
+
'restUrl' => esc_url_raw( rest_url() ),
|
51 |
+
'nonce' => wp_create_nonce( 'wp_rest' ),
|
52 |
+
'confirmChangeWidget' => __( 'Selecting a different widget will revert any changes. Continue?', 'so-widgets-bundle' ),
|
53 |
+
)
|
54 |
+
);
|
55 |
+
if ( function_exists( 'wp_set_script_translations' ) ) {
|
56 |
+
wp_set_script_translations( 'sowb-widget-block', 'so-widgets-bundle' );
|
57 |
+
}
|
58 |
+
|
59 |
+
$so_widgets_bundle = SiteOrigin_Widgets_Bundle::single();
|
60 |
+
// This is to ensure necessary scripts can be enqueued for previews.
|
61 |
+
$so_widgets_bundle->register_general_scripts();
|
62 |
+
$so_widgets_bundle->enqueue_registered_widgets_scripts();
|
63 |
+
}
|
64 |
+
|
65 |
+
public function render_widget_block( $attributes ) {
|
66 |
+
if ( empty( $attributes['widgetClass'] ) ) {
|
67 |
+
return '<div>'.
|
68 |
+
__( 'You need to select a widget type before you\'ll see anything here. :)', 'so-widgets-bundle' ) .
|
69 |
+
'</div>';
|
70 |
+
}
|
71 |
+
|
72 |
+
$widget_class = $attributes['widgetClass'];
|
73 |
+
|
74 |
+
global $wp_widget_factory;
|
75 |
+
|
76 |
+
$widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
|
77 |
+
|
78 |
+
$instance = $attributes['widgetData'];
|
79 |
+
|
80 |
+
if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
|
81 |
+
$GLOBALS['SITEORIGIN_WIDGET_BLOCK_RENDER'] = true;
|
82 |
+
ob_start();
|
83 |
+
/* @var $widget SiteOrigin_Widget */
|
84 |
+
$instance = $widget->update( $instance, $instance );
|
85 |
+
$widget->widget( array(), $instance );
|
86 |
+
$rendered_widget = ob_get_clean();
|
87 |
+
unset( $GLOBALS['SITEORIGIN_WIDGET_BLOCK_RENDER'] );
|
88 |
+
} else {
|
89 |
+
return '<div>'.
|
90 |
+
sprintf(
|
91 |
+
__( 'Invalid widget class %s. Please make sure the widget has been activated in %sSiteOrigin Widgets%s.', 'so-widgets-bundle' ),
|
92 |
+
$widget_class,
|
93 |
+
'<a href="' . admin_url( 'plugins.php?page=so-widgets-plugins' ) . '">',
|
94 |
+
'</a>'
|
95 |
+
) .
|
96 |
+
'</div>';
|
97 |
+
}
|
98 |
+
return $rendered_widget;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
SiteOrigin_Widgets_Bundle_Widget_Block::single();
|
compat/compat.php
CHANGED
@@ -1,59 +1,59 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class SiteOrigin_Widgets_Bundle_Compatibility {
|
4 |
-
|
5 |
-
const BEAVER_BUILDER = 'Beaver Builder';
|
6 |
-
const ELEMENTOR = 'Elementor';
|
7 |
-
const VISUAL_COMPOSER = 'Visual Composer';
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Get the singleton instance
|
11 |
-
*
|
12 |
-
* @return SiteOrigin_Widgets_Bundle_Compatibility
|
13 |
-
*/
|
14 |
-
public static function single() {
|
15 |
-
static $single;
|
16 |
-
return empty( $single ) ? $single = new self() : $single;
|
17 |
-
}
|
18 |
-
|
19 |
-
function __construct() {
|
20 |
-
$builder = $this->get_active_builder();
|
21 |
-
if ( ! empty( $builder ) ) {
|
22 |
-
require_once $builder['file_path'];
|
23 |
-
}
|
24 |
-
|
25 |
-
if ( function_exists( 'register_block_type' ) ) {
|
26 |
-
require_once plugin_dir_path( __FILE__ ) . 'block-editor/widget-block.php';
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
function get_active_builder() {
|
31 |
-
|
32 |
-
$builders = include_once 'builders.php';
|
33 |
-
|
34 |
-
foreach ( $builders as $builder ) {
|
35 |
-
if ( $this->is_active( $builder ) ) {
|
36 |
-
return $builder;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
return null;
|
41 |
-
}
|
42 |
-
|
43 |
-
function is_active( $builder ) {
|
44 |
-
switch ( $builder[ 'name' ] ) {
|
45 |
-
case self::BEAVER_BUILDER:
|
46 |
-
return class_exists( 'FLBuilderModel', false );
|
47 |
-
break;
|
48 |
-
case self::ELEMENTOR:
|
49 |
-
return class_exists( 'Elementor\\Plugin', false );
|
50 |
-
break;
|
51 |
-
case self::VISUAL_COMPOSER:
|
52 |
-
return class_exists( 'Vc_Manager' );
|
53 |
-
break;
|
54 |
-
}
|
55 |
-
}
|
56 |
-
|
57 |
-
}
|
58 |
-
|
59 |
-
SiteOrigin_Widgets_Bundle_Compatibility::single();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class SiteOrigin_Widgets_Bundle_Compatibility {
|
4 |
+
|
5 |
+
const BEAVER_BUILDER = 'Beaver Builder';
|
6 |
+
const ELEMENTOR = 'Elementor';
|
7 |
+
const VISUAL_COMPOSER = 'Visual Composer';
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Get the singleton instance
|
11 |
+
*
|
12 |
+
* @return SiteOrigin_Widgets_Bundle_Compatibility
|
13 |
+
*/
|
14 |
+
public static function single() {
|
15 |
+
static $single;
|
16 |
+
return empty( $single ) ? $single = new self() : $single;
|
17 |
+
}
|
18 |
+
|
19 |
+
function __construct() {
|
20 |
+
$builder = $this->get_active_builder();
|
21 |
+
if ( ! empty( $builder ) ) {
|
22 |
+
require_once $builder['file_path'];
|
23 |
+
}
|
24 |
+
|
25 |
+
if ( function_exists( 'register_block_type' ) ) {
|
26 |
+
require_once plugin_dir_path( __FILE__ ) . 'block-editor/widget-block.php';
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
function get_active_builder() {
|
31 |
+
|
32 |
+
$builders = include_once 'builders.php';
|
33 |
+
|
34 |
+
foreach ( $builders as $builder ) {
|
35 |
+
if ( $this->is_active( $builder ) ) {
|
36 |
+
return $builder;
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
return null;
|
41 |
+
}
|
42 |
+
|
43 |
+
function is_active( $builder ) {
|
44 |
+
switch ( $builder[ 'name' ] ) {
|
45 |
+
case self::BEAVER_BUILDER:
|
46 |
+
return class_exists( 'FLBuilderModel', false );
|
47 |
+
break;
|
48 |
+
case self::ELEMENTOR:
|
49 |
+
return class_exists( 'Elementor\\Plugin', false );
|
50 |
+
break;
|
51 |
+
case self::VISUAL_COMPOSER:
|
52 |
+
return class_exists( 'Vc_Manager' );
|
53 |
+
break;
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
SiteOrigin_Widgets_Bundle_Compatibility::single();
|
compat/elementor/elementor.php
CHANGED
@@ -1,88 +1,88 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class SiteOrigin_Widgets_Bundle_Elementor {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Get the singleton instance
|
7 |
-
*
|
8 |
-
* @return SiteOrigin_Widgets_Bundle_Elementor
|
9 |
-
*/
|
10 |
-
public static function single() {
|
11 |
-
static $single;
|
12 |
-
|
13 |
-
return empty( $single ) ? $single = new self() : $single;
|
14 |
-
}
|
15 |
-
|
16 |
-
private $plugin;
|
17 |
-
|
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 |
-
|
26 |
-
function init_editor() {
|
27 |
-
add_action( 'elementor/editor/before_enqueue_scripts', array( $this, 'enqueue_active_widgets_scripts' ) );
|
28 |
-
}
|
29 |
-
|
30 |
-
function init_preview() {
|
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 |
-
|
54 |
-
wp_enqueue_script(
|
55 |
-
'sowb-js-for-elementor',
|
56 |
-
plugin_dir_url( __FILE__ ) . 'sowb-elementor' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
57 |
-
array( 'jquery' )
|
58 |
-
);
|
59 |
-
|
60 |
-
}
|
61 |
-
|
62 |
-
function print_footer_templates() {
|
63 |
-
global $wp_widget_factory;
|
64 |
-
|
65 |
-
// Elementor does it's editing in the front end so print required footer templates for active widgets.
|
66 |
-
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
|
67 |
-
if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
|
68 |
-
/* @var $widget_obj SiteOrigin_Widget */
|
69 |
-
$widget_obj->footer_admin_templates();
|
70 |
-
}
|
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() {
|
83 |
-
// Don't want to show the form preview button when using Elementor
|
84 |
-
add_filter( 'siteorigin_widgets_form_show_preview_button', array( $this, '__return_false' ) );
|
85 |
-
}
|
86 |
-
}
|
87 |
-
|
88 |
-
SiteOrigin_Widgets_Bundle_Elementor::single();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class SiteOrigin_Widgets_Bundle_Elementor {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Get the singleton instance
|
7 |
+
*
|
8 |
+
* @return SiteOrigin_Widgets_Bundle_Elementor
|
9 |
+
*/
|
10 |
+
public static function single() {
|
11 |
+
static $single;
|
12 |
+
|
13 |
+
return empty( $single ) ? $single = new self() : $single;
|
14 |
+
}
|
15 |
+
|
16 |
+
private $plugin;
|
17 |
+
|
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 |
+
|
26 |
+
function init_editor() {
|
27 |
+
add_action( 'elementor/editor/before_enqueue_scripts', array( $this, 'enqueue_active_widgets_scripts' ) );
|
28 |
+
}
|
29 |
+
|
30 |
+
function init_preview() {
|
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 |
+
|
54 |
+
wp_enqueue_script(
|
55 |
+
'sowb-js-for-elementor',
|
56 |
+
plugin_dir_url( __FILE__ ) . 'sowb-elementor' . SOW_BUNDLE_JS_SUFFIX . '.js',
|
57 |
+
array( 'jquery' )
|
58 |
+
);
|
59 |
+
|
60 |
+
}
|
61 |
+
|
62 |
+
function print_footer_templates() {
|
63 |
+
global $wp_widget_factory;
|
64 |
+
|
65 |
+
// Elementor does it's editing in the front end so print required footer templates for active widgets.
|
66 |
+
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
|
67 |
+
if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
|
68 |
+
/* @var $widget_obj SiteOrigin_Widget */
|
69 |
+
$widget_obj->footer_admin_templates();
|
70 |
+
}
|
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() {
|
83 |
+
// Don't want to show the form preview button when using Elementor
|
84 |
+
add_filter( 'siteorigin_widgets_form_show_preview_button', array( $this, '__return_false' ) );
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
SiteOrigin_Widgets_Bundle_Elementor::single();
|
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', { preview: true } );
|
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/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, '[' ).replace( /\]/g, ']' ) );
|
56 |
-
},
|
57 |
-
render: function ( param, value ) {
|
58 |
-
return _.unescape( _.unescape( value ) ).replace( /[/g, '[' ).replace( /]/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;
|
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, '[' ).replace( /\]/g, ']' ) );
|
56 |
+
},
|
57 |
+
render: function ( param, value ) {
|
58 |
+
return _.unescape( _.unescape( value ) ).replace( /[/g, '[' ).replace( /]/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/visual-composer.php
CHANGED
@@ -1,296 +1,296 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class SiteOrigin_Widgets_Bundle_Visual_Composer {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Get the singleton instance
|
7 |
-
*
|
8 |
-
* @return SiteOrigin_Widgets_Bundle_Visual_Composer
|
9 |
-
*/
|
10 |
-
public static function single() {
|
11 |
-
static $single;
|
12 |
-
|
13 |
-
return empty( $single ) ? $single = new self() : $single;
|
14 |
-
}
|
15 |
-
|
16 |
-
function __construct() {
|
17 |
-
add_action( 'vc_after_init', array( $this, 'init' ) );
|
18 |
-
|
19 |
-
add_action( 'admin_print_scripts-post-new.php', array( $this, 'enqueue_active_widgets_scripts' ) );
|
20 |
-
add_action( 'admin_print_scripts-post.php', array( $this, 'enqueue_active_widgets_scripts' ) );
|
21 |
-
|
22 |
-
add_action( 'wp_ajax_sowb_vc_widget_render_form', array( $this, 'sowb_vc_widget_render_form' ) );
|
23 |
-
|
24 |
-
add_filter( 'siteorigin_widgets_form_show_preview_button', '__return_false' );
|
25 |
-
|
26 |
-
add_filter( 'content_save_pre', array( $this, 'update_widget_data' ) );
|
27 |
-
}
|
28 |
-
|
29 |
-
function init() {
|
30 |
-
|
31 |
-
vc_add_shortcode_param(
|
32 |
-
'sowb_json_escaped',
|
33 |
-
array( $this, 'siteorigin_widget_form' ),
|
34 |
-
plugin_dir_url( __FILE__ ) . 'sowb-vc-widget' . SOW_BUNDLE_JS_SUFFIX . '.js'
|
35 |
-
);
|
36 |
-
|
37 |
-
$settings = array(
|
38 |
-
'name' => __( 'SiteOrigin Widget', 'so-widgets-bundle' ),
|
39 |
-
'base' => 'siteorigin_widget_vc',
|
40 |
-
'category' => __( 'SiteOrigin Widgets', 'so-widgets-bundle' ),
|
41 |
-
'icon' => 'so-widget-icon',
|
42 |
-
'description' => __( 'Allows you to add any active SiteOrigin Widgets Bundle widgets.', 'so-widgets-bundle' ),
|
43 |
-
// element description in add elements view
|
44 |
-
'show_settings_on_create' => true,
|
45 |
-
'weight' => - 5,
|
46 |
-
// Depends on ordering in list, Higher weight first
|
47 |
-
'html_template' => dirname( __FILE__ ) . '/siteorigin_widget_vc_template.php',
|
48 |
-
'admin_enqueue_css' => preg_replace( '/\s/', '%20', plugins_url( 'styles.css', __FILE__ ) ),
|
49 |
-
'front_enqueue_css' => preg_replace( '/\s/', '%20', plugins_url( 'styles.css', __FILE__ ) ),
|
50 |
-
'front_enqueue_js' => preg_replace( '/\s/', '%20', plugins_url( 'front_enqueue_js.js', __FILE__ ) ),
|
51 |
-
'params' => array(
|
52 |
-
array(
|
53 |
-
'type' => 'sowb_json_escaped',
|
54 |
-
'heading' => __( 'SiteOrigin Widget', 'so-widgets-bundle' ),
|
55 |
-
'param_name' => 'so_widget_data',
|
56 |
-
),
|
57 |
-
)
|
58 |
-
);
|
59 |
-
vc_map( $settings );
|
60 |
-
}
|
61 |
-
|
62 |
-
function enqueue_active_widgets_scripts() {
|
63 |
-
|
64 |
-
global $wp_widget_factory;
|
65 |
-
|
66 |
-
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
|
67 |
-
if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
|
68 |
-
/* @var $widget_obj SiteOrigin_Widget */
|
69 |
-
ob_start();
|
70 |
-
$widget_obj->form( array() );
|
71 |
-
ob_clean();
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
wp_localize_script( 'siteorigin-widget-admin', 'soWidgetsVC', array(
|
76 |
-
'ajaxUrl' => wp_nonce_url( admin_url( 'admin-ajax.php' ), 'sowb_vc_widget_render_form', '_sowbnonce' ),
|
77 |
-
'confirmChangeWidget' => __( 'Selecting a different widget will revert any changes. Continue?', 'so-widgets-bundle' ),
|
78 |
-
) );
|
79 |
-
}
|
80 |
-
|
81 |
-
function siteorigin_widget_form( $settings, $value ) {
|
82 |
-
$so_widget_names = array();
|
83 |
-
|
84 |
-
global $wp_widget_factory;
|
85 |
-
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
|
86 |
-
if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
|
87 |
-
$so_widget_names[ $class ] = preg_replace( '/^SiteOrigin /', '', $widget_obj->name );
|
88 |
-
}
|
89 |
-
}
|
90 |
-
asort( $so_widget_names );
|
91 |
-
|
92 |
-
/* @var $select SiteOrigin_Widget_Field_Select */
|
93 |
-
$select = new SiteOrigin_Widget_Field_Select(
|
94 |
-
'so_widget_class',
|
95 |
-
'so_widget_class',
|
96 |
-
'so_widget_class',
|
97 |
-
array(
|
98 |
-
'type' => 'select',
|
99 |
-
'options' => $so_widget_names,
|
100 |
-
)
|
101 |
-
);
|
102 |
-
|
103 |
-
global $wp_widget_factory;
|
104 |
-
|
105 |
-
$parsed_value = json_decode( html_entity_decode( stripslashes( $value ) ), true );
|
106 |
-
if ( empty( $parsed_value ) ) {
|
107 |
-
//Get the first value as the default.
|
108 |
-
reset( $so_widget_names );
|
109 |
-
$widget_class = key( $so_widget_names );
|
110 |
-
} else {
|
111 |
-
$widget_class = $parsed_value['widget_class'];
|
112 |
-
}
|
113 |
-
|
114 |
-
$widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
|
115 |
-
|
116 |
-
ob_start();
|
117 |
-
$select->render( $widget_class ); ?>
|
118 |
-
<input type="hidden" name="so_widget_data" class="wpb_vc_param_value" value="<?php echo esc_attr( $value ); ?>">
|
119 |
-
<div class="siteorigin_widget_form_container">
|
120 |
-
<?php
|
121 |
-
if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
|
122 |
-
/* @var $widget SiteOrigin_Widget */
|
123 |
-
$widget->form( $parsed_value['widget_data'] );
|
124 |
-
}
|
125 |
-
?>
|
126 |
-
</div>
|
127 |
-
<?php
|
128 |
-
return ob_get_clean();
|
129 |
-
}
|
130 |
-
|
131 |
-
function sowb_vc_widget_render_form() {
|
132 |
-
if ( empty( $_REQUEST['widget'] ) ) {
|
133 |
-
wp_die();
|
134 |
-
}
|
135 |
-
if ( empty( $_REQUEST['_sowbnonce'] ) || ! wp_verify_nonce( $_REQUEST['_sowbnonce'], 'sowb_vc_widget_render_form' ) ) {
|
136 |
-
wp_die();
|
137 |
-
}
|
138 |
-
|
139 |
-
$request = array_map( 'stripslashes_deep', $_REQUEST );
|
140 |
-
$widget_class = $request['widget'];
|
141 |
-
|
142 |
-
global $wp_widget_factory;
|
143 |
-
|
144 |
-
$widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
|
145 |
-
|
146 |
-
if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
|
147 |
-
/* @var $widget SiteOrigin_Widget */
|
148 |
-
$widget->form( array() );
|
149 |
-
}
|
150 |
-
|
151 |
-
wp_die();
|
152 |
-
}
|
153 |
-
|
154 |
-
function update_widget_data( $content ) {
|
155 |
-
|
156 |
-
$content = preg_replace_callback(
|
157 |
-
'/\[siteorigin_widget_vc [^\]]*\]/',
|
158 |
-
array( $this, 'update_shortcode' ),
|
159 |
-
$content
|
160 |
-
);
|
161 |
-
|
162 |
-
return $content;
|
163 |
-
}
|
164 |
-
|
165 |
-
function update_shortcode( $shortcode ) {
|
166 |
-
|
167 |
-
preg_match(
|
168 |
-
'/so_widget_data="([^"]*)"/',
|
169 |
-
stripslashes( stripslashes( $shortcode[0] ) ),
|
170 |
-
$widget_json
|
171 |
-
);
|
172 |
-
|
173 |
-
// We double encode in the front end to prevent accidental decoding when the content is set on the
|
174 |
-
// WP visual editor.
|
175 |
-
$widget_json = html_entity_decode( html_entity_decode( $widget_json[1] ) );
|
176 |
-
|
177 |
-
$widget_atts = json_decode( $widget_json, true );
|
178 |
-
|
179 |
-
global $wp_widget_factory;
|
180 |
-
|
181 |
-
$widget = ! empty( $wp_widget_factory->widgets[ $widget_atts['widget_class'] ] ) ? $wp_widget_factory->widgets[ $widget_atts['widget_class'] ] : false;
|
182 |
-
|
183 |
-
if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
|
184 |
-
/* @var $widget SiteOrigin_Widget */
|
185 |
-
$widget_atts['widget_data'] = $widget->update( $widget_atts['widget_data'], $widget_atts['widget_data'] );
|
186 |
-
}
|
187 |
-
|
188 |
-
$widget_json = json_encode( $widget_atts );
|
189 |
-
|
190 |
-
$widget_json = htmlentities( htmlentities( $widget_json ) );
|
191 |
-
|
192 |
-
$widget_json = str_replace(
|
193 |
-
array( '[', ']' ),
|
194 |
-
array( '[', ']' ),
|
195 |
-
$widget_json
|
196 |
-
);
|
197 |
-
|
198 |
-
$slashed = addslashes( 'so_widget_data="' . addslashes( $widget_json ) . '"' );
|
199 |
-
|
200 |
-
preg_replace( '/so_widget_data="([^"]*)"/', $slashed, $shortcode );
|
201 |
-
|
202 |
-
return '[siteorigin_widget_vc ' . $slashed . ']';
|
203 |
-
}
|
204 |
-
}
|
205 |
-
|
206 |
-
SiteOrigin_Widgets_Bundle_Visual_Composer::single();
|
207 |
-
|
208 |
-
if ( class_exists( 'WPBakeryShortCode' ) ) {
|
209 |
-
class WPBakeryShortCode_SiteOrigin_Widget_VC extends WPBakeryShortCode {
|
210 |
-
public function __construct( $settings ) {
|
211 |
-
parent::__construct( $settings );
|
212 |
-
}
|
213 |
-
|
214 |
-
public function contentInline( $atts, $content ) {
|
215 |
-
if ( empty( $atts ) ) {
|
216 |
-
return '';
|
217 |
-
}
|
218 |
-
$widget_settings = $this->get_widget_settings( $atts );
|
219 |
-
ob_start();
|
220 |
-
$instance = $this->update_widget( $widget_settings['widget_class'], $widget_settings['widget_data'] );
|
221 |
-
$this->render_widget( $widget_settings['widget_class'], $instance );
|
222 |
-
|
223 |
-
return ob_get_clean();
|
224 |
-
}
|
225 |
-
|
226 |
-
public function get_widget_settings( $atts ) {
|
227 |
-
if ( empty( $atts ) || empty( $atts['so_widget_data'] ) ) {
|
228 |
-
return array();
|
229 |
-
}
|
230 |
-
$unesc = $atts['so_widget_data'];
|
231 |
-
return json_decode( $unesc, true );
|
232 |
-
}
|
233 |
-
|
234 |
-
private function get_so_widget( $widget_class ) {
|
235 |
-
global $wp_widget_factory;
|
236 |
-
|
237 |
-
$widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
|
238 |
-
|
239 |
-
if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
|
240 |
-
/* @var $widget SiteOrigin_Widget */
|
241 |
-
return $widget;
|
242 |
-
} else {
|
243 |
-
return null;
|
244 |
-
}
|
245 |
-
}
|
246 |
-
|
247 |
-
public function render_widget( $widget_class, $widget_instance ) {
|
248 |
-
|
249 |
-
if ( empty( $widget_instance ) ) {
|
250 |
-
return;
|
251 |
-
}
|
252 |
-
|
253 |
-
/* @var $widget SiteOrigin_Widget */
|
254 |
-
$widget = $this->get_so_widget( $widget_class );
|
255 |
-
|
256 |
-
if ( ! empty( $widget ) ) {
|
257 |
-
$widget->widget( array(), $widget_instance );
|
258 |
-
}
|
259 |
-
}
|
260 |
-
|
261 |
-
public function update_widget( $widget_class, $widget_instance ) {
|
262 |
-
|
263 |
-
if ( empty( $widget_instance ) ) {
|
264 |
-
return;
|
265 |
-
}
|
266 |
-
|
267 |
-
/* @var $widget SiteOrigin_Widget */
|
268 |
-
$widget = $this->get_so_widget( $widget_class );
|
269 |
-
|
270 |
-
if ( ! empty( $widget ) ) {
|
271 |
-
return $widget->update( $widget_instance, $widget_instance );
|
272 |
-
} else {
|
273 |
-
return $widget_instance;
|
274 |
-
}
|
275 |
-
}
|
276 |
-
|
277 |
-
/**
|
278 |
-
* @param $atts
|
279 |
-
*
|
280 |
-
* @return array
|
281 |
-
*/
|
282 |
-
protected function prepareAtts( $atts ) {
|
283 |
-
$return = array();
|
284 |
-
if ( is_array( $atts ) ) {
|
285 |
-
foreach ( $atts as $key => $val ) {
|
286 |
-
// We double encode in the front end to prevent accidental decoding when the content is set on the
|
287 |
-
// WP visual editor.
|
288 |
-
$return[ $key ] = html_entity_decode( html_entity_decode( $val ) );
|
289 |
-
}
|
290 |
-
}
|
291 |
-
|
292 |
-
return $return;
|
293 |
-
}
|
294 |
-
}
|
295 |
-
} // End Class
|
296 |
-
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class SiteOrigin_Widgets_Bundle_Visual_Composer {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Get the singleton instance
|
7 |
+
*
|
8 |
+
* @return SiteOrigin_Widgets_Bundle_Visual_Composer
|
9 |
+
*/
|
10 |
+
public static function single() {
|
11 |
+
static $single;
|
12 |
+
|
13 |
+
return empty( $single ) ? $single = new self() : $single;
|
14 |
+
}
|
15 |
+
|
16 |
+
function __construct() {
|
17 |
+
add_action( 'vc_after_init', array( $this, 'init' ) );
|
18 |
+
|
19 |
+
add_action( 'admin_print_scripts-post-new.php', array( $this, 'enqueue_active_widgets_scripts' ) );
|
20 |
+
add_action( 'admin_print_scripts-post.php', array( $this, 'enqueue_active_widgets_scripts' ) );
|
21 |
+
|
22 |
+
add_action( 'wp_ajax_sowb_vc_widget_render_form', array( $this, 'sowb_vc_widget_render_form' ) );
|
23 |
+
|
24 |
+
add_filter( 'siteorigin_widgets_form_show_preview_button', '__return_false' );
|
25 |
+
|
26 |
+
add_filter( 'content_save_pre', array( $this, 'update_widget_data' ) );
|
27 |
+
}
|
28 |
+
|
29 |
+
function init() {
|
30 |
+
|
31 |
+
vc_add_shortcode_param(
|
32 |
+
'sowb_json_escaped',
|
33 |
+
array( $this, 'siteorigin_widget_form' ),
|
34 |
+
plugin_dir_url( __FILE__ ) . 'sowb-vc-widget' . SOW_BUNDLE_JS_SUFFIX . '.js'
|
35 |
+
);
|
36 |
+
|
37 |
+
$settings = array(
|
38 |
+
'name' => __( 'SiteOrigin Widget', 'so-widgets-bundle' ),
|
39 |
+
'base' => 'siteorigin_widget_vc',
|
40 |
+
'category' => __( 'SiteOrigin Widgets', 'so-widgets-bundle' ),
|
41 |
+
'icon' => 'so-widget-icon',
|
42 |
+
'description' => __( 'Allows you to add any active SiteOrigin Widgets Bundle widgets.', 'so-widgets-bundle' ),
|
43 |
+
// element description in add elements view
|
44 |
+
'show_settings_on_create' => true,
|
45 |
+
'weight' => - 5,
|
46 |
+
// Depends on ordering in list, Higher weight first
|
47 |
+
'html_template' => dirname( __FILE__ ) . '/siteorigin_widget_vc_template.php',
|
48 |
+
'admin_enqueue_css' => preg_replace( '/\s/', '%20', plugins_url( 'styles.css', __FILE__ ) ),
|
49 |
+
'front_enqueue_css' => preg_replace( '/\s/', '%20', plugins_url( 'styles.css', __FILE__ ) ),
|
50 |
+
'front_enqueue_js' => preg_replace( '/\s/', '%20', plugins_url( 'front_enqueue_js.js', __FILE__ ) ),
|
51 |
+
'params' => array(
|
52 |
+
array(
|
53 |
+
'type' => 'sowb_json_escaped',
|
54 |
+
'heading' => __( 'SiteOrigin Widget', 'so-widgets-bundle' ),
|
55 |
+
'param_name' => 'so_widget_data',
|
56 |
+
),
|
57 |
+
)
|
58 |
+
);
|
59 |
+
vc_map( $settings );
|
60 |
+
}
|
61 |
+
|
62 |
+
function enqueue_active_widgets_scripts() {
|
63 |
+
|
64 |
+
global $wp_widget_factory;
|
65 |
+
|
66 |
+
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
|
67 |
+
if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
|
68 |
+
/* @var $widget_obj SiteOrigin_Widget */
|
69 |
+
ob_start();
|
70 |
+
$widget_obj->form( array() );
|
71 |
+
ob_clean();
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
wp_localize_script( 'siteorigin-widget-admin', 'soWidgetsVC', array(
|
76 |
+
'ajaxUrl' => wp_nonce_url( admin_url( 'admin-ajax.php' ), 'sowb_vc_widget_render_form', '_sowbnonce' ),
|
77 |
+
'confirmChangeWidget' => __( 'Selecting a different widget will revert any changes. Continue?', 'so-widgets-bundle' ),
|
78 |
+
) );
|
79 |
+
}
|
80 |
+
|
81 |
+
function siteorigin_widget_form( $settings, $value ) {
|
82 |
+
$so_widget_names = array();
|
83 |
+
|
84 |
+
global $wp_widget_factory;
|
85 |
+
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
|
86 |
+
if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
|
87 |
+
$so_widget_names[ $class ] = preg_replace( '/^SiteOrigin /', '', $widget_obj->name );
|
88 |
+
}
|
89 |
+
}
|
90 |
+
asort( $so_widget_names );
|
91 |
+
|
92 |
+
/* @var $select SiteOrigin_Widget_Field_Select */
|
93 |
+
$select = new SiteOrigin_Widget_Field_Select(
|
94 |
+
'so_widget_class',
|
95 |
+
'so_widget_class',
|
96 |
+
'so_widget_class',
|
97 |
+
array(
|
98 |
+
'type' => 'select',
|
99 |
+
'options' => $so_widget_names,
|
100 |
+
)
|
101 |
+
);
|
102 |
+
|
103 |
+
global $wp_widget_factory;
|
104 |
+
|
105 |
+
$parsed_value = json_decode( html_entity_decode( stripslashes( $value ) ), true );
|
106 |
+
if ( empty( $parsed_value ) ) {
|
107 |
+
//Get the first value as the default.
|
108 |
+
reset( $so_widget_names );
|
109 |
+
$widget_class = key( $so_widget_names );
|
110 |
+
} else {
|
111 |
+
$widget_class = $parsed_value['widget_class'];
|
112 |
+
}
|
113 |
+
|
114 |
+
$widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
|
115 |
+
|
116 |
+
ob_start();
|
117 |
+
$select->render( $widget_class ); ?>
|
118 |
+
<input type="hidden" name="so_widget_data" class="wpb_vc_param_value" value="<?php echo esc_attr( $value ); ?>">
|
119 |
+
<div class="siteorigin_widget_form_container">
|
120 |
+
<?php
|
121 |
+
if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
|
122 |
+
/* @var $widget SiteOrigin_Widget */
|
123 |
+
$widget->form( $parsed_value['widget_data'] );
|
124 |
+
}
|
125 |
+
?>
|
126 |
+
</div>
|
127 |
+
<?php
|
128 |
+
return ob_get_clean();
|
129 |
+
}
|
130 |
+
|
131 |
+
function sowb_vc_widget_render_form() {
|
132 |
+
if ( empty( $_REQUEST['widget'] ) ) {
|
133 |
+
wp_die();
|
134 |
+
}
|
135 |
+
if ( empty( $_REQUEST['_sowbnonce'] ) || ! wp_verify_nonce( $_REQUEST['_sowbnonce'], 'sowb_vc_widget_render_form' ) ) {
|
136 |
+
wp_die();
|
137 |
+
}
|
138 |
+
|
139 |
+
$request = array_map( 'stripslashes_deep', $_REQUEST );
|
140 |
+
$widget_class = $request['widget'];
|
141 |
+
|
142 |
+
global $wp_widget_factory;
|
143 |
+
|
144 |
+
$widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
|
145 |
+
|
146 |
+
if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
|
147 |
+
/* @var $widget SiteOrigin_Widget */
|
148 |
+
$widget->form( array() );
|
149 |
+
}
|
150 |
+
|
151 |
+
wp_die();
|
152 |
+
}
|
153 |
+
|
154 |
+
function update_widget_data( $content ) {
|
155 |
+
|
156 |
+
$content = preg_replace_callback(
|
157 |
+
'/\[siteorigin_widget_vc [^\]]*\]/',
|
158 |
+
array( $this, 'update_shortcode' ),
|
159 |
+
$content
|
160 |
+
);
|
161 |
+
|
162 |
+
return $content;
|
163 |
+
}
|
164 |
+
|
165 |
+
function update_shortcode( $shortcode ) {
|
166 |
+
|
167 |
+
preg_match(
|
168 |
+
'/so_widget_data="([^"]*)"/',
|
169 |
+
stripslashes( stripslashes( $shortcode[0] ) ),
|
170 |
+
$widget_json
|
171 |
+
);
|
172 |
+
|
173 |
+
// We double encode in the front end to prevent accidental decoding when the content is set on the
|
174 |
+
// WP visual editor.
|
175 |
+
$widget_json = html_entity_decode( html_entity_decode( $widget_json[1] ) );
|
176 |
+
|
177 |
+
$widget_atts = json_decode( $widget_json, true );
|
178 |
+
|
179 |
+
global $wp_widget_factory;
|
180 |
+
|
181 |
+
$widget = ! empty( $wp_widget_factory->widgets[ $widget_atts['widget_class'] ] ) ? $wp_widget_factory->widgets[ $widget_atts['widget_class'] ] : false;
|
182 |
+
|
183 |
+
if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
|
184 |
+
/* @var $widget SiteOrigin_Widget */
|
185 |
+
$widget_atts['widget_data'] = $widget->update( $widget_atts['widget_data'], $widget_atts['widget_data'] );
|
186 |
+
}
|
187 |
+
|
188 |
+
$widget_json = json_encode( $widget_atts );
|
189 |
+
|
190 |
+
$widget_json = htmlentities( htmlentities( $widget_json ) );
|
191 |
+
|
192 |
+
$widget_json = str_replace(
|
193 |
+
array( '[', ']' ),
|
194 |
+
array( '[', ']' ),
|
195 |
+
$widget_json
|
196 |
+
);
|
197 |
+
|
198 |
+
$slashed = addslashes( 'so_widget_data="' . addslashes( $widget_json ) . '"' );
|
199 |
+
|
200 |
+
preg_replace( '/so_widget_data="([^"]*)"/', $slashed, $shortcode );
|
201 |
+
|
202 |
+
return '[siteorigin_widget_vc ' . $slashed . ']';
|
203 |
+
}
|
204 |
+
}
|
205 |
+
|
206 |
+
SiteOrigin_Widgets_Bundle_Visual_Composer::single();
|
207 |
+
|
208 |
+
if ( class_exists( 'WPBakeryShortCode' ) ) {
|
209 |
+
class WPBakeryShortCode_SiteOrigin_Widget_VC extends WPBakeryShortCode {
|
210 |
+
public function __construct( $settings ) {
|
211 |
+
parent::__construct( $settings );
|
212 |
+
}
|
213 |
+
|
214 |
+
public function contentInline( $atts, $content ) {
|
215 |
+
if ( empty( $atts ) ) {
|
216 |
+
return '';
|
217 |
+
}
|
218 |
+
$widget_settings = $this->get_widget_settings( $atts );
|
219 |
+
ob_start();
|
220 |
+
$instance = $this->update_widget( $widget_settings['widget_class'], $widget_settings['widget_data'] );
|
221 |
+
$this->render_widget( $widget_settings['widget_class'], $instance );
|
222 |
+
|
223 |
+
return ob_get_clean();
|
224 |
+
}
|
225 |
+
|
226 |
+
public function get_widget_settings( $atts ) {
|
227 |
+
if ( empty( $atts ) || empty( $atts['so_widget_data'] ) ) {
|
228 |
+
return array();
|
229 |
+
}
|
230 |
+
$unesc = $atts['so_widget_data'];
|
231 |
+
return json_decode( $unesc, true );
|
232 |
+
}
|
233 |
+
|
234 |
+
private function get_so_widget( $widget_class ) {
|
235 |
+
global $wp_widget_factory;
|
236 |
+
|
237 |
+
$widget = ! empty( $wp_widget_factory->widgets[ $widget_class ] ) ? $wp_widget_factory->widgets[ $widget_class ] : false;
|
238 |
+
|
239 |
+
if ( ! empty( $widget ) && is_object( $widget ) && is_subclass_of( $widget, 'SiteOrigin_Widget' ) ) {
|
240 |
+
/* @var $widget SiteOrigin_Widget */
|
241 |
+
return $widget;
|
242 |
+
} else {
|
243 |
+
return null;
|
244 |
+
}
|
245 |
+
}
|
246 |
+
|
247 |
+
public function render_widget( $widget_class, $widget_instance ) {
|
248 |
+
|
249 |
+
if ( empty( $widget_instance ) ) {
|
250 |
+
return;
|
251 |
+
}
|
252 |
+
|
253 |
+
/* @var $widget SiteOrigin_Widget */
|
254 |
+
$widget = $this->get_so_widget( $widget_class );
|
255 |
+
|
256 |
+
if ( ! empty( $widget ) ) {
|
257 |
+
$widget->widget( array(), $widget_instance );
|
258 |
+
}
|
259 |
+
}
|
260 |
+
|
261 |
+
public function update_widget( $widget_class, $widget_instance ) {
|
262 |
+
|
263 |
+
if ( empty( $widget_instance ) ) {
|
264 |
+
return;
|
265 |
+
}
|
266 |
+
|
267 |
+
/* @var $widget SiteOrigin_Widget */
|
268 |
+
$widget = $this->get_so_widget( $widget_class );
|
269 |
+
|
270 |
+
if ( ! empty( $widget ) ) {
|
271 |
+
return $widget->update( $widget_instance, $widget_instance );
|
272 |
+
} else {
|
273 |
+
return $widget_instance;
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* @param $atts
|
279 |
+
*
|
280 |
+
* @return array
|
281 |
+
*/
|
282 |
+
protected function prepareAtts( $atts ) {
|
283 |
+
$return = array();
|
284 |
+
if ( is_array( $atts ) ) {
|
285 |
+
foreach ( $atts as $key => $val ) {
|
286 |
+
// We double encode in the front end to prevent accidental decoding when the content is set on the
|
287 |
+
// WP visual editor.
|
288 |
+
$return[ $key ] = html_entity_decode( html_entity_decode( $val ) );
|
289 |
+
}
|
290 |
+
}
|
291 |
+
|
292 |
+
return $return;
|
293 |
+
}
|
294 |
+
}
|
295 |
+
} // End Class
|
296 |
+
|
icons/fontawesome/filter.php
CHANGED
@@ -1,1660 +1,1660 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function siteorigin_widgets_icons_fontawesome_filter( $icons ){
|
4 |
-
return array_merge($icons, array(
|
5 |
-
'500px' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
6 |
-
'accessible-icon' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
7 |
-
'accusoft' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
8 |
-
'acquisitions-incorporated' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
9 |
-
'ad' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
10 |
-
'address-book' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
11 |
-
'address-card' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
12 |
-
'adjust' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
13 |
-
'adn' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
14 |
-
'adobe' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
15 |
-
'adversal' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
16 |
-
'affiliatetheme' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
17 |
-
'air-freshener' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
18 |
-
'algolia' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
19 |
-
'align-center' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
20 |
-
'align-justify' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
21 |
-
'align-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
22 |
-
'align-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
23 |
-
'alipay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
24 |
-
'allergies' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
25 |
-
'amazon' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
26 |
-
'amazon-pay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
27 |
-
'ambulance' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
28 |
-
'american-sign-language-interpreting' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
29 |
-
'amilia' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
30 |
-
'anchor' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
31 |
-
'android' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
32 |
-
'angellist' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
33 |
-
'angle-double-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
34 |
-
'angle-double-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
35 |
-
'angle-double-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
36 |
-
'angle-double-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
37 |
-
'angle-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
38 |
-
'angle-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
39 |
-
'angle-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
40 |
-
'angle-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
41 |
-
'angry' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
42 |
-
'angrycreative' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
43 |
-
'angular' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
44 |
-
'ankh' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
45 |
-
'app-store' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
46 |
-
'app-store-ios' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
47 |
-
'apper' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
48 |
-
'apple' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
49 |
-
'apple-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
50 |
-
'apple-pay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
51 |
-
'archive' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
52 |
-
'archway' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
53 |
-
'arrow-alt-circle-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
54 |
-
'arrow-alt-circle-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
55 |
-
'arrow-alt-circle-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
56 |
-
'arrow-alt-circle-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
57 |
-
'arrow-circle-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
58 |
-
'arrow-circle-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
59 |
-
'arrow-circle-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
60 |
-
'arrow-circle-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
61 |
-
'arrow-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
62 |
-
'arrow-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
63 |
-
'arrow-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
64 |
-
'arrow-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
65 |
-
'arrows-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
66 |
-
'arrows-alt-h' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
67 |
-
'arrows-alt-v' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
68 |
-
'artstation' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
69 |
-
'assistive-listening-systems' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
70 |
-
'asterisk' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
71 |
-
'asymmetrik' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
72 |
-
'at' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
73 |
-
'atlas' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
74 |
-
'atlassian' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
75 |
-
'atom' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
76 |
-
'audible' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
77 |
-
'audio-description' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
78 |
-
'autoprefixer' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
79 |
-
'avianex' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
80 |
-
'aviato' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
81 |
-
'award' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
82 |
-
'aws' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
83 |
-
'baby' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
84 |
-
'baby-carriage' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
85 |
-
'backspace' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
86 |
-
'backward' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
87 |
-
'balance-scale' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
88 |
-
'ban' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
89 |
-
'band-aid' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
90 |
-
'bandcamp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
91 |
-
'barcode' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
92 |
-
'bars' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
93 |
-
'baseball-ball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
94 |
-
'basketball-ball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
95 |
-
'bath' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
96 |
-
'battery-empty' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
97 |
-
'battery-full' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
98 |
-
'battery-half' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
99 |
-
'battery-quarter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
100 |
-
'battery-three-quarters' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
101 |
-
'bed' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
102 |
-
'beer' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
103 |
-
'behance' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
104 |
-
'behance-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
105 |
-
'bell' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
106 |
-
'bell-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
107 |
-
'bezier-curve' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
108 |
-
'bible' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
109 |
-
'bicycle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
110 |
-
'bimobject' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
111 |
-
'binoculars' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
112 |
-
'biohazard' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
113 |
-
'birthday-cake' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
114 |
-
'bitbucket' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
115 |
-
'bitcoin' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
116 |
-
'bity' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
117 |
-
'black-tie' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
118 |
-
'blackberry' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
119 |
-
'blender' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
120 |
-
'blender-phone' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
121 |
-
'blind' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
122 |
-
'blog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
123 |
-
'blogger' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
124 |
-
'blogger-b' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
125 |
-
'bluetooth' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
126 |
-
'bluetooth-b' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
127 |
-
'bold' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
128 |
-
'bolt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
129 |
-
'bomb' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
130 |
-
'bone' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
131 |
-
'bong' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
132 |
-
'book' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
133 |
-
'book-dead' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
134 |
-
'book-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
135 |
-
'book-reader' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
136 |
-
'bookmark' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
137 |
-
'bowling-ball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
138 |
-
'box' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
139 |
-
'box-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
140 |
-
'boxes' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
141 |
-
'braille' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
142 |
-
'brain' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
143 |
-
'briefcase' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
144 |
-
'briefcase-medical' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
145 |
-
'broadcast-tower' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
146 |
-
'broom' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
147 |
-
'brush' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
148 |
-
'btc' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
149 |
-
'bug' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
150 |
-
'building' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
151 |
-
'bullhorn' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
152 |
-
'bullseye' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
153 |
-
'burn' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
154 |
-
'buromobelexperte' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
155 |
-
'bus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
156 |
-
'bus-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
157 |
-
'business-time' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
158 |
-
'buysellads' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
159 |
-
'calculator' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
160 |
-
'calendar' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
161 |
-
'calendar-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
162 |
-
'calendar-check' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
163 |
-
'calendar-day' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
164 |
-
'calendar-minus' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
165 |
-
'calendar-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
166 |
-
'calendar-times' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
167 |
-
'calendar-week' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
168 |
-
'camera' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
169 |
-
'camera-retro' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
170 |
-
'campground' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
171 |
-
'canadian-maple-leaf' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
172 |
-
'candy-cane' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
173 |
-
'cannabis' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
174 |
-
'capsules' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
175 |
-
'car' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
176 |
-
'car-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
177 |
-
'car-battery' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
178 |
-
'car-crash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
179 |
-
'car-side' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
180 |
-
'caret-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
181 |
-
'caret-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
182 |
-
'caret-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
183 |
-
'caret-square-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
184 |
-
'caret-square-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
185 |
-
'caret-square-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
186 |
-
'caret-square-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
187 |
-
'caret-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
188 |
-
'carrot' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
189 |
-
'cart-arrow-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
190 |
-
'cart-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
191 |
-
'cash-register' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
192 |
-
'cat' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
193 |
-
'cc-amazon-pay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
194 |
-
'cc-amex' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
195 |
-
'cc-apple-pay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
196 |
-
'cc-diners-club' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
197 |
-
'cc-discover' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
198 |
-
'cc-jcb' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
199 |
-
'cc-mastercard' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
200 |
-
'cc-paypal' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
201 |
-
'cc-stripe' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
202 |
-
'cc-visa' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
203 |
-
'centercode' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
204 |
-
'centos' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
205 |
-
'certificate' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
206 |
-
'chair' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
207 |
-
'chalkboard' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
208 |
-
'chalkboard-teacher' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
209 |
-
'charging-station' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
210 |
-
'chart-area' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
211 |
-
'chart-bar' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
212 |
-
'chart-line' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
213 |
-
'chart-pie' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
214 |
-
'check' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
215 |
-
'check-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
216 |
-
'check-double' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
217 |
-
'check-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
218 |
-
'chess' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
219 |
-
'chess-bishop' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
220 |
-
'chess-board' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
221 |
-
'chess-king' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
222 |
-
'chess-knight' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
223 |
-
'chess-pawn' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
224 |
-
'chess-queen' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
225 |
-
'chess-rook' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
226 |
-
'chevron-circle-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
227 |
-
'chevron-circle-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
228 |
-
'chevron-circle-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
229 |
-
'chevron-circle-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
230 |
-
'chevron-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
231 |
-
'chevron-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
232 |
-
'chevron-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
233 |
-
'chevron-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
234 |
-
'child' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
235 |
-
'chrome' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
236 |
-
'church' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
237 |
-
'circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
238 |
-
'circle-notch' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
239 |
-
'city' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
240 |
-
'clipboard' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
241 |
-
'clipboard-check' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
242 |
-
'clipboard-list' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
243 |
-
'clock' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
244 |
-
'clone' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
245 |
-
'closed-captioning' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
246 |
-
'cloud' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
247 |
-
'cloud-download-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
248 |
-
'cloud-meatball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
249 |
-
'cloud-moon' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
250 |
-
'cloud-moon-rain' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
251 |
-
'cloud-rain' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
252 |
-
'cloud-showers-heavy' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
253 |
-
'cloud-sun' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
254 |
-
'cloud-sun-rain' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
255 |
-
'cloud-upload-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
256 |
-
'cloudscale' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
257 |
-
'cloudsmith' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
258 |
-
'cloudversify' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
259 |
-
'cocktail' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
260 |
-
'code' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
261 |
-
'code-branch' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
262 |
-
'codepen' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
263 |
-
'codiepie' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
264 |
-
'coffee' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
265 |
-
'cog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
266 |
-
'cogs' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
267 |
-
'coins' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
268 |
-
'columns' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
269 |
-
'comment' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
270 |
-
'comment-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
271 |
-
'comment-dollar' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
272 |
-
'comment-dots' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
273 |
-
'comment-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
274 |
-
'comments' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
275 |
-
'comments-dollar' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
276 |
-
'compact-disc' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
277 |
-
'compass' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
278 |
-
'compress' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
279 |
-
'compress-arrows-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
280 |
-
'concierge-bell' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
281 |
-
'confluence' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
282 |
-
'connectdevelop' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
283 |
-
'contao' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
284 |
-
'cookie' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
285 |
-
'cookie-bite' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
286 |
-
'copy' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
287 |
-
'copyright' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
288 |
-
'couch' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
289 |
-
'cpanel' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
290 |
-
'creative-commons' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
291 |
-
'creative-commons-by' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
292 |
-
'creative-commons-nc' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
293 |
-
'creative-commons-nc-eu' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
294 |
-
'creative-commons-nc-jp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
295 |
-
'creative-commons-nd' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
296 |
-
'creative-commons-pd' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
297 |
-
'creative-commons-pd-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
298 |
-
'creative-commons-remix' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
299 |
-
'creative-commons-sa' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
300 |
-
'creative-commons-sampling' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
301 |
-
'creative-commons-sampling-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
302 |
-
'creative-commons-share' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
303 |
-
'creative-commons-zero' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
304 |
-
'credit-card' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
305 |
-
'critical-role' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
306 |
-
'crop' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
307 |
-
'crop-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
308 |
-
'cross' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
309 |
-
'crosshairs' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
310 |
-
'crow' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
311 |
-
'crown' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
312 |
-
'css3' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
313 |
-
'css3-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
314 |
-
'cube' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
315 |
-
'cubes' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
316 |
-
'cut' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
317 |
-
'cuttlefish' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
318 |
-
'd-and-d' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
319 |
-
'd-and-d-beyond' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
320 |
-
'dashcube' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
321 |
-
'database' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
322 |
-
'deaf' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
323 |
-
'delicious' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
324 |
-
'democrat' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
325 |
-
'deploydog' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
326 |
-
'deskpro' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
327 |
-
'desktop' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
328 |
-
'dev' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
329 |
-
'deviantart' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
330 |
-
'dharmachakra' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
331 |
-
'dhl' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
332 |
-
'diagnoses' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
333 |
-
'diaspora' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
334 |
-
'dice' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
335 |
-
'dice-d20' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
336 |
-
'dice-d6' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
337 |
-
'dice-five' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
338 |
-
'dice-four' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
339 |
-
'dice-one' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
340 |
-
'dice-six' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
341 |
-
'dice-three' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
342 |
-
'dice-two' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
343 |
-
'digg' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
344 |
-
'digital-ocean' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
345 |
-
'digital-tachograph' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
346 |
-
'directions' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
347 |
-
'discord' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
348 |
-
'discourse' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
349 |
-
'divide' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
350 |
-
'dizzy' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
351 |
-
'dna' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
352 |
-
'dochub' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
353 |
-
'docker' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
354 |
-
'dog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
355 |
-
'dollar-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
356 |
-
'dolly' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
357 |
-
'dolly-flatbed' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
358 |
-
'donate' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
359 |
-
'door-closed' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
360 |
-
'door-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
361 |
-
'dot-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
362 |
-
'dove' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
363 |
-
'download' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
364 |
-
'draft2digital' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
365 |
-
'drafting-compass' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
366 |
-
'dragon' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
367 |
-
'draw-polygon' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
368 |
-
'dribbble' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
369 |
-
'dribbble-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
370 |
-
'dropbox' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
371 |
-
'drum' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
372 |
-
'drum-steelpan' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
373 |
-
'drumstick-bite' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
374 |
-
'drupal' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
375 |
-
'dumbbell' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
376 |
-
'dumpster' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
377 |
-
'dumpster-fire' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
378 |
-
'dungeon' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
379 |
-
'dyalog' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
380 |
-
'earlybirds' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
381 |
-
'ebay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
382 |
-
'edge' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
383 |
-
'edit' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
384 |
-
'eject' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
385 |
-
'elementor' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
386 |
-
'ellipsis-h' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
387 |
-
'ellipsis-v' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
388 |
-
'ello' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
389 |
-
'ember' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
390 |
-
'empire' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
391 |
-
'envelope' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
392 |
-
'envelope-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
393 |
-
'envelope-open-text' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
394 |
-
'envelope-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
395 |
-
'envira' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
396 |
-
'equals' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
397 |
-
'eraser' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
398 |
-
'erlang' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
399 |
-
'ethereum' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
400 |
-
'ethernet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
401 |
-
'etsy' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
402 |
-
'euro-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
403 |
-
'exchange-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
404 |
-
'exclamation' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
405 |
-
'exclamation-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
406 |
-
'exclamation-triangle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
407 |
-
'expand' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
408 |
-
'expand-arrows-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
409 |
-
'expeditedssl' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
410 |
-
'external-link-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
411 |
-
'external-link-square-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
412 |
-
'eye' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
413 |
-
'eye-dropper' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
414 |
-
'eye-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
415 |
-
'facebook' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
416 |
-
'facebook-f' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
417 |
-
'facebook-messenger' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
418 |
-
'facebook-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
419 |
-
'fantasy-flight-games' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
420 |
-
'fast-backward' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
421 |
-
'fast-forward' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
422 |
-
'fax' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
423 |
-
'feather' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
424 |
-
'feather-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
425 |
-
'fedex' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
426 |
-
'fedora' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
427 |
-
'female' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
428 |
-
'fighter-jet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
429 |
-
'figma' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
430 |
-
'file' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
431 |
-
'file-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
432 |
-
'file-archive' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
433 |
-
'file-audio' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
434 |
-
'file-code' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
435 |
-
'file-contract' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
436 |
-
'file-csv' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
437 |
-
'file-download' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
438 |
-
'file-excel' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
439 |
-
'file-export' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
440 |
-
'file-image' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
441 |
-
'file-import' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
442 |
-
'file-invoice' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
443 |
-
'file-invoice-dollar' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
444 |
-
'file-medical' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
445 |
-
'file-medical-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
446 |
-
'file-pdf' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
447 |
-
'file-powerpoint' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
448 |
-
'file-prescription' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
449 |
-
'file-signature' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
450 |
-
'file-upload' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
451 |
-
'file-video' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
452 |
-
'file-word' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
453 |
-
'fill' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
454 |
-
'fill-drip' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
455 |
-
'film' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
456 |
-
'filter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
457 |
-
'fingerprint' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
458 |
-
'fire' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
459 |
-
'fire-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
460 |
-
'fire-extinguisher' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
461 |
-
'firefox' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
462 |
-
'first-aid' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
463 |
-
'first-order' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
464 |
-
'first-order-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
465 |
-
'firstdraft' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
466 |
-
'fish' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
467 |
-
'fist-raised' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
468 |
-
'flag' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
469 |
-
'flag-checkered' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
470 |
-
'flag-usa' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
471 |
-
'flask' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
472 |
-
'flickr' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
473 |
-
'flipboard' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
474 |
-
'flushed' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
475 |
-
'fly' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
476 |
-
'folder' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
477 |
-
'folder-minus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
478 |
-
'folder-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
479 |
-
'folder-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
480 |
-
'font' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
481 |
-
'font-awesome' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
482 |
-
'font-awesome-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
483 |
-
'font-awesome-flag' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
484 |
-
'font-awesome-logo-full' => array( 'unicode' => '', 'styles' => array( 'sow-fab', 'sow-fas', 'sow-far' ), ),
|
485 |
-
'fonticons' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
486 |
-
'fonticons-fi' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
487 |
-
'football-ball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
488 |
-
'fort-awesome' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
489 |
-
'fort-awesome-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
490 |
-
'forumbee' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
491 |
-
'forward' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
492 |
-
'foursquare' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
493 |
-
'free-code-camp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
494 |
-
'freebsd' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
495 |
-
'frog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
496 |
-
'frown' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
497 |
-
'frown-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
498 |
-
'fulcrum' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
499 |
-
'funnel-dollar' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
500 |
-
'futbol' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
501 |
-
'galactic-republic' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
502 |
-
'galactic-senate' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
503 |
-
'gamepad' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
504 |
-
'gas-pump' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
505 |
-
'gavel' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
506 |
-
'gem' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
507 |
-
'genderless' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
508 |
-
'get-pocket' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
509 |
-
'gg' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
510 |
-
'gg-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
511 |
-
'ghost' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
512 |
-
'gift' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
513 |
-
'gifts' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
514 |
-
'git' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
515 |
-
'git-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
516 |
-
'github' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
517 |
-
'github-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
518 |
-
'github-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
519 |
-
'gitkraken' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
520 |
-
'gitlab' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
521 |
-
'gitter' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
522 |
-
'glass-cheers' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
523 |
-
'glass-martini' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
524 |
-
'glass-martini-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
525 |
-
'glass-whiskey' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
526 |
-
'glasses' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
527 |
-
'glide' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
528 |
-
'glide-g' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
529 |
-
'globe' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
530 |
-
'globe-africa' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
531 |
-
'globe-americas' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
532 |
-
'globe-asia' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
533 |
-
'globe-europe' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
534 |
-
'gofore' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
535 |
-
'golf-ball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
536 |
-
'goodreads' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
537 |
-
'goodreads-g' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
538 |
-
'google' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
539 |
-
'google-drive' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
540 |
-
'google-play' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
541 |
-
'google-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
542 |
-
'google-plus-g' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
543 |
-
'google-plus-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
544 |
-
'google-wallet' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
545 |
-
'gopuram' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
546 |
-
'graduation-cap' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
547 |
-
'gratipay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
548 |
-
'grav' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
549 |
-
'greater-than' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
550 |
-
'greater-than-equal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
551 |
-
'grimace' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
552 |
-
'grin' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
553 |
-
'grin-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
554 |
-
'grin-beam' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
555 |
-
'grin-beam-sweat' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
556 |
-
'grin-hearts' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
557 |
-
'grin-squint' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
558 |
-
'grin-squint-tears' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
559 |
-
'grin-stars' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
560 |
-
'grin-tears' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
561 |
-
'grin-tongue' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
562 |
-
'grin-tongue-squint' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
563 |
-
'grin-tongue-wink' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
564 |
-
'grin-wink' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
565 |
-
'grip-horizontal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
566 |
-
'grip-lines' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
567 |
-
'grip-lines-vertical' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
568 |
-
'grip-vertical' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
569 |
-
'gripfire' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
570 |
-
'grunt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
571 |
-
'guitar' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
572 |
-
'gulp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
573 |
-
'h-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
574 |
-
'hacker-news' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
575 |
-
'hacker-news-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
576 |
-
'hackerrank' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
577 |
-
'hammer' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
578 |
-
'hamsa' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
579 |
-
'hand-holding' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
580 |
-
'hand-holding-heart' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
581 |
-
'hand-holding-usd' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
582 |
-
'hand-lizard' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
583 |
-
'hand-paper' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
584 |
-
'hand-peace' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
585 |
-
'hand-point-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
586 |
-
'hand-point-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
587 |
-
'hand-point-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
588 |
-
'hand-point-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
589 |
-
'hand-pointer' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
590 |
-
'hand-rock' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
591 |
-
'hand-scissors' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
592 |
-
'hand-spock' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
593 |
-
'hands' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
594 |
-
'hands-helping' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
595 |
-
'handshake' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
596 |
-
'hanukiah' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
597 |
-
'hashtag' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
598 |
-
'hat-wizard' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
599 |
-
'haykal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
600 |
-
'hdd' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
601 |
-
'heading' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
602 |
-
'headphones' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
603 |
-
'headphones-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
604 |
-
'headset' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
605 |
-
'heart' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
606 |
-
'heart-broken' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
607 |
-
'heartbeat' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
608 |
-
'helicopter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
609 |
-
'highlighter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
610 |
-
'hiking' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
611 |
-
'hippo' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
612 |
-
'hips' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
613 |
-
'hire-a-helper' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
614 |
-
'history' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
615 |
-
'hockey-puck' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
616 |
-
'holly-berry' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
617 |
-
'home' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
618 |
-
'hooli' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
619 |
-
'hornbill' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
620 |
-
'horse' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
621 |
-
'horse-head' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
622 |
-
'hospital' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
623 |
-
'hospital-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
624 |
-
'hospital-symbol' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
625 |
-
'hot-tub' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
626 |
-
'hotel' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
627 |
-
'hotjar' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
628 |
-
'hourglass' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
629 |
-
'hourglass-end' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
630 |
-
'hourglass-half' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
631 |
-
'hourglass-start' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
632 |
-
'house-damage' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
633 |
-
'houzz' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
634 |
-
'hryvnia' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
635 |
-
'html5' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
636 |
-
'hubspot' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
637 |
-
'i-cursor' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
638 |
-
'icicles' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
639 |
-
'id-badge' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
640 |
-
'id-card' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
641 |
-
'id-card-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
642 |
-
'igloo' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
643 |
-
'image' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
644 |
-
'images' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
645 |
-
'imdb' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
646 |
-
'inbox' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
647 |
-
'indent' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
648 |
-
'industry' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
649 |
-
'infinity' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
650 |
-
'info' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
651 |
-
'info-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
652 |
-
'instagram' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
653 |
-
'intercom' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
654 |
-
'internet-explorer' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
655 |
-
'invision' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
656 |
-
'ioxhost' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
657 |
-
'italic' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
658 |
-
'itunes' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
659 |
-
'itunes-note' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
660 |
-
'java' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
661 |
-
'jedi' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
662 |
-
'jedi-order' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
663 |
-
'jenkins' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
664 |
-
'jira' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
665 |
-
'joget' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
666 |
-
'joint' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
667 |
-
'joomla' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
668 |
-
'journal-whills' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
669 |
-
'js' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
670 |
-
'js-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
671 |
-
'jsfiddle' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
672 |
-
'kaaba' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
673 |
-
'kaggle' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
674 |
-
'key' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
675 |
-
'keybase' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
676 |
-
'keyboard' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
677 |
-
'keycdn' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
678 |
-
'khanda' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
679 |
-
'kickstarter' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
680 |
-
'kickstarter-k' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
681 |
-
'kiss' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
682 |
-
'kiss-beam' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
683 |
-
'kiss-wink-heart' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
684 |
-
'kiwi-bird' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
685 |
-
'korvue' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
686 |
-
'landmark' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
687 |
-
'language' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
688 |
-
'laptop' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
689 |
-
'laptop-code' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
690 |
-
'laravel' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
691 |
-
'lastfm' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
692 |
-
'lastfm-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
693 |
-
'laugh' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
694 |
-
'laugh-beam' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
695 |
-
'laugh-squint' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
696 |
-
'laugh-wink' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
697 |
-
'layer-group' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
698 |
-
'leaf' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
699 |
-
'leanpub' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
700 |
-
'lemon' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
701 |
-
'less' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
702 |
-
'less-than' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
703 |
-
'less-than-equal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
704 |
-
'level-down-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
705 |
-
'level-up-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
706 |
-
'life-ring' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
707 |
-
'lightbulb' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
708 |
-
'line' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
709 |
-
'link' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
710 |
-
'linkedin' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
711 |
-
'linkedin-in' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
712 |
-
'linode' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
713 |
-
'linux' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
714 |
-
'lira-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
715 |
-
'list' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
716 |
-
'list-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
717 |
-
'list-ol' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
718 |
-
'list-ul' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
719 |
-
'location-arrow' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
720 |
-
'lock' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
721 |
-
'lock-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
722 |
-
'long-arrow-alt-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
723 |
-
'long-arrow-alt-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
724 |
-
'long-arrow-alt-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
725 |
-
'long-arrow-alt-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
726 |
-
'low-vision' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
727 |
-
'luggage-cart' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
728 |
-
'lyft' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
729 |
-
'magento' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
730 |
-
'magic' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
731 |
-
'magnet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
732 |
-
'mail-bulk' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
733 |
-
'mailchimp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
734 |
-
'male' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
735 |
-
'mandalorian' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
736 |
-
'map' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
737 |
-
'map-marked' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
738 |
-
'map-marked-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
739 |
-
'map-marker' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
740 |
-
'map-marker-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
741 |
-
'map-pin' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
742 |
-
'map-signs' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
743 |
-
'markdown' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
744 |
-
'marker' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
745 |
-
'mars' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
746 |
-
'mars-double' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
747 |
-
'mars-stroke' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
748 |
-
'mars-stroke-h' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
749 |
-
'mars-stroke-v' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
750 |
-
'mask' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
751 |
-
'mastodon' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
752 |
-
'maxcdn' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
753 |
-
'medal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
754 |
-
'medapps' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
755 |
-
'medium' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
756 |
-
'medium-m' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
757 |
-
'medkit' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
758 |
-
'medrt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
759 |
-
'meetup' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
760 |
-
'megaport' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
761 |
-
'meh' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
762 |
-
'meh-blank' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
763 |
-
'meh-rolling-eyes' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
764 |
-
'memory' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
765 |
-
'mendeley' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
766 |
-
'menorah' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
767 |
-
'mercury' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
768 |
-
'meteor' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
769 |
-
'microchip' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
770 |
-
'microphone' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
771 |
-
'microphone-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
772 |
-
'microphone-alt-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
773 |
-
'microphone-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
774 |
-
'microscope' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
775 |
-
'microsoft' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
776 |
-
'minus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
777 |
-
'minus-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
778 |
-
'minus-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
779 |
-
'mitten' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
780 |
-
'mix' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
781 |
-
'mixcloud' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
782 |
-
'mizuni' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
783 |
-
'mobile' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
784 |
-
'mobile-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
785 |
-
'modx' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
786 |
-
'monero' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
787 |
-
'money-bill' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
788 |
-
'money-bill-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
789 |
-
'money-bill-wave' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
790 |
-
'money-bill-wave-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
791 |
-
'money-check' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
792 |
-
'money-check-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
793 |
-
'monument' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
794 |
-
'moon' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
795 |
-
'mortar-pestle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
796 |
-
'mosque' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
797 |
-
'motorcycle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
798 |
-
'mountain' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
799 |
-
'mouse-pointer' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
800 |
-
'mug-hot' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
801 |
-
'music' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
802 |
-
'napster' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
803 |
-
'neos' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
804 |
-
'network-wired' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
805 |
-
'neuter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
806 |
-
'newspaper' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
807 |
-
'nimblr' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
808 |
-
'nintendo-switch' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
809 |
-
'node' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
810 |
-
'node-js' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
811 |
-
'not-equal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
812 |
-
'notes-medical' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
813 |
-
'npm' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
814 |
-
'ns8' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
815 |
-
'nutritionix' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
816 |
-
'object-group' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
817 |
-
'object-ungroup' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
818 |
-
'odnoklassniki' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
819 |
-
'odnoklassniki-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
820 |
-
'oil-can' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
821 |
-
'old-republic' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
822 |
-
'om' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
823 |
-
'opencart' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
824 |
-
'openid' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
825 |
-
'opera' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
826 |
-
'optin-monster' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
827 |
-
'osi' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
828 |
-
'otter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
829 |
-
'outdent' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
830 |
-
'page4' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
831 |
-
'pagelines' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
832 |
-
'paint-brush' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
833 |
-
'paint-roller' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
834 |
-
'palette' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
835 |
-
'palfed' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
836 |
-
'pallet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
837 |
-
'paper-plane' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
838 |
-
'paperclip' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
839 |
-
'parachute-box' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
840 |
-
'paragraph' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
841 |
-
'parking' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
842 |
-
'passport' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
843 |
-
'pastafarianism' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
844 |
-
'paste' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
845 |
-
'patreon' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
846 |
-
'pause' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
847 |
-
'pause-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
848 |
-
'paw' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
849 |
-
'paypal' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
850 |
-
'peace' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
851 |
-
'pen' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
852 |
-
'pen-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
853 |
-
'pen-fancy' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
854 |
-
'pen-nib' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
855 |
-
'pen-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
856 |
-
'pencil-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
857 |
-
'pencil-ruler' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
858 |
-
'penny-arcade' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
859 |
-
'people-carry' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
860 |
-
'percent' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
861 |
-
'percentage' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
862 |
-
'periscope' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
863 |
-
'person-booth' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
864 |
-
'phabricator' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
865 |
-
'phoenix-framework' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
866 |
-
'phoenix-squadron' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
867 |
-
'phone' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
868 |
-
'phone-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
869 |
-
'phone-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
870 |
-
'phone-volume' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
871 |
-
'php' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
872 |
-
'pied-piper' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
873 |
-
'pied-piper-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
874 |
-
'pied-piper-hat' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
875 |
-
'pied-piper-pp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
876 |
-
'piggy-bank' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
877 |
-
'pills' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
878 |
-
'pinterest' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
879 |
-
'pinterest-p' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
880 |
-
'pinterest-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
881 |
-
'place-of-worship' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
882 |
-
'plane' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
883 |
-
'plane-arrival' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
884 |
-
'plane-departure' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
885 |
-
'play' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
886 |
-
'play-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
887 |
-
'playstation' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
888 |
-
'plug' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
889 |
-
'plus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
890 |
-
'plus-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
891 |
-
'plus-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
892 |
-
'podcast' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
893 |
-
'poll' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
894 |
-
'poll-h' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
895 |
-
'poo' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
896 |
-
'poo-storm' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
897 |
-
'poop' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
898 |
-
'portrait' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
899 |
-
'pound-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
900 |
-
'power-off' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
901 |
-
'pray' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
902 |
-
'praying-hands' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
903 |
-
'prescription' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
904 |
-
'prescription-bottle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
905 |
-
'prescription-bottle-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
906 |
-
'print' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
907 |
-
'procedures' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
908 |
-
'product-hunt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
909 |
-
'project-diagram' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
910 |
-
'pushed' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
911 |
-
'puzzle-piece' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
912 |
-
'python' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
913 |
-
'qq' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
914 |
-
'qrcode' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
915 |
-
'question' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
916 |
-
'question-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
917 |
-
'quidditch' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
918 |
-
'quinscape' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
919 |
-
'quora' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
920 |
-
'quote-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
921 |
-
'quote-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
922 |
-
'quran' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
923 |
-
'r-project' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
924 |
-
'radiation' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
925 |
-
'radiation-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
926 |
-
'rainbow' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
927 |
-
'random' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
928 |
-
'raspberry-pi' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
929 |
-
'ravelry' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
930 |
-
'react' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
931 |
-
'reacteurope' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
932 |
-
'readme' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
933 |
-
'rebel' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
934 |
-
'receipt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
935 |
-
'recycle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
936 |
-
'red-river' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
937 |
-
'reddit' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
938 |
-
'reddit-alien' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
939 |
-
'reddit-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
940 |
-
'redhat' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
941 |
-
'redo' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
942 |
-
'redo-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
943 |
-
'registered' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
944 |
-
'renren' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
945 |
-
'reply' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
946 |
-
'reply-all' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
947 |
-
'replyd' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
948 |
-
'republican' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
949 |
-
'researchgate' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
950 |
-
'resolving' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
951 |
-
'restroom' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
952 |
-
'retweet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
953 |
-
'rev' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
954 |
-
'ribbon' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
955 |
-
'ring' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
956 |
-
'road' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
957 |
-
'robot' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
958 |
-
'rocket' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
959 |
-
'rocketchat' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
960 |
-
'rockrms' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
961 |
-
'route' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
962 |
-
'rss' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
963 |
-
'rss-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
964 |
-
'ruble-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
965 |
-
'ruler' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
966 |
-
'ruler-combined' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
967 |
-
'ruler-horizontal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
968 |
-
'ruler-vertical' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
969 |
-
'running' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
970 |
-
'rupee-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
971 |
-
'sad-cry' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
972 |
-
'sad-tear' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
973 |
-
'safari' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
974 |
-
'sass' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
975 |
-
'satellite' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
976 |
-
'satellite-dish' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
977 |
-
'save' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
978 |
-
'schlix' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
979 |
-
'school' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
980 |
-
'screwdriver' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
981 |
-
'scribd' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
982 |
-
'scroll' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
983 |
-
'sd-card' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
984 |
-
'search' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
985 |
-
'search-dollar' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
986 |
-
'search-location' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
987 |
-
'search-minus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
988 |
-
'search-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
989 |
-
'searchengin' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
990 |
-
'seedling' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
991 |
-
'sellcast' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
992 |
-
'sellsy' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
993 |
-
'server' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
994 |
-
'servicestack' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
995 |
-
'shapes' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
996 |
-
'share' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
997 |
-
'share-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
998 |
-
'share-alt-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
999 |
-
'share-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1000 |
-
'shekel-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1001 |
-
'shield-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1002 |
-
'ship' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1003 |
-
'shipping-fast' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1004 |
-
'shirtsinbulk' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1005 |
-
'shoe-prints' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1006 |
-
'shopping-bag' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1007 |
-
'shopping-basket' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1008 |
-
'shopping-cart' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1009 |
-
'shopware' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1010 |
-
'shower' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1011 |
-
'shuttle-van' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1012 |
-
'sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1013 |
-
'sign-in-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1014 |
-
'sign-language' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1015 |
-
'sign-out-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1016 |
-
'signal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1017 |
-
'signature' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1018 |
-
'sim-card' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1019 |
-
'simplybuilt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1020 |
-
'sistrix' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1021 |
-
'sitemap' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1022 |
-
'sith' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1023 |
-
'skating' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1024 |
-
'sketch' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1025 |
-
'skiing' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1026 |
-
'skiing-nordic' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1027 |
-
'skull' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1028 |
-
'skull-crossbones' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1029 |
-
'skyatlas' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1030 |
-
'skype' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1031 |
-
'slack' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1032 |
-
'slack-hash' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1033 |
-
'slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1034 |
-
'sleigh' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1035 |
-
'sliders-h' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1036 |
-
'slideshare' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1037 |
-
'smile' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1038 |
-
'smile-beam' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1039 |
-
'smile-wink' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1040 |
-
'smog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1041 |
-
'smoking' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1042 |
-
'smoking-ban' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1043 |
-
'sms' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1044 |
-
'snapchat' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1045 |
-
'snapchat-ghost' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1046 |
-
'snapchat-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1047 |
-
'snowboarding' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1048 |
-
'snowflake' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1049 |
-
'snowman' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1050 |
-
'snowplow' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1051 |
-
'socks' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1052 |
-
'solar-panel' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1053 |
-
'sort' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1054 |
-
'sort-alpha-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1055 |
-
'sort-alpha-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1056 |
-
'sort-amount-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1057 |
-
'sort-amount-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1058 |
-
'sort-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1059 |
-
'sort-numeric-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1060 |
-
'sort-numeric-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1061 |
-
'sort-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1062 |
-
'soundcloud' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1063 |
-
'sourcetree' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1064 |
-
'spa' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1065 |
-
'space-shuttle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1066 |
-
'speakap' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1067 |
-
'spider' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1068 |
-
'spinner' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1069 |
-
'splotch' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1070 |
-
'spotify' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1071 |
-
'spray-can' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1072 |
-
'square' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1073 |
-
'square-full' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1074 |
-
'square-root-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1075 |
-
'squarespace' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1076 |
-
'stack-exchange' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1077 |
-
'stack-overflow' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1078 |
-
'stamp' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1079 |
-
'star' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1080 |
-
'star-and-crescent' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1081 |
-
'star-half' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1082 |
-
'star-half-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1083 |
-
'star-of-david' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1084 |
-
'star-of-life' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1085 |
-
'staylinked' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1086 |
-
'steam' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1087 |
-
'steam-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1088 |
-
'steam-symbol' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1089 |
-
'step-backward' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1090 |
-
'step-forward' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1091 |
-
'stethoscope' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1092 |
-
'sticker-mule' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1093 |
-
'sticky-note' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1094 |
-
'stop' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1095 |
-
'stop-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1096 |
-
'stopwatch' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1097 |
-
'store' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1098 |
-
'store-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1099 |
-
'strava' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1100 |
-
'stream' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1101 |
-
'street-view' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1102 |
-
'strikethrough' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1103 |
-
'stripe' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1104 |
-
'stripe-s' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1105 |
-
'stroopwafel' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1106 |
-
'studiovinari' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1107 |
-
'stumbleupon' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1108 |
-
'stumbleupon-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1109 |
-
'subscript' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1110 |
-
'subway' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1111 |
-
'suitcase' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1112 |
-
'suitcase-rolling' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1113 |
-
'sun' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1114 |
-
'superpowers' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1115 |
-
'superscript' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1116 |
-
'supple' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1117 |
-
'surprise' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1118 |
-
'suse' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1119 |
-
'swatchbook' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1120 |
-
'swimmer' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1121 |
-
'swimming-pool' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1122 |
-
'synagogue' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1123 |
-
'sync' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1124 |
-
'sync-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1125 |
-
'syringe' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1126 |
-
'table' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1127 |
-
'table-tennis' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1128 |
-
'tablet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1129 |
-
'tablet-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1130 |
-
'tablets' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1131 |
-
'tachometer-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1132 |
-
'tag' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1133 |
-
'tags' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1134 |
-
'tape' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1135 |
-
'tasks' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1136 |
-
'taxi' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1137 |
-
'teamspeak' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1138 |
-
'teeth' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1139 |
-
'teeth-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1140 |
-
'telegram' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1141 |
-
'telegram-plane' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1142 |
-
'temperature-high' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1143 |
-
'temperature-low' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1144 |
-
'tencent-weibo' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1145 |
-
'tenge' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1146 |
-
'terminal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1147 |
-
'text-height' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1148 |
-
'text-width' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1149 |
-
'th' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1150 |
-
'th-large' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1151 |
-
'th-list' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1152 |
-
'the-red-yeti' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1153 |
-
'theater-masks' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1154 |
-
'themeco' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1155 |
-
'themeisle' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1156 |
-
'thermometer' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1157 |
-
'thermometer-empty' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1158 |
-
'thermometer-full' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1159 |
-
'thermometer-half' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1160 |
-
'thermometer-quarter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1161 |
-
'thermometer-three-quarters' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1162 |
-
'think-peaks' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1163 |
-
'thumbs-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1164 |
-
'thumbs-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1165 |
-
'thumbtack' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1166 |
-
'ticket-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1167 |
-
'times' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1168 |
-
'times-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1169 |
-
'tint' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1170 |
-
'tint-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1171 |
-
'tired' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1172 |
-
'toggle-off' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1173 |
-
'toggle-on' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1174 |
-
'toilet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1175 |
-
'toilet-paper' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1176 |
-
'toolbox' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1177 |
-
'tools' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1178 |
-
'tooth' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1179 |
-
'torah' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1180 |
-
'torii-gate' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1181 |
-
'tractor' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1182 |
-
'trade-federation' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1183 |
-
'trademark' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1184 |
-
'traffic-light' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1185 |
-
'train' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1186 |
-
'tram' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1187 |
-
'transgender' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1188 |
-
'transgender-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1189 |
-
'trash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1190 |
-
'trash-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1191 |
-
'tree' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1192 |
-
'trello' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1193 |
-
'tripadvisor' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1194 |
-
'trophy' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1195 |
-
'truck' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1196 |
-
'truck-loading' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1197 |
-
'truck-monster' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1198 |
-
'truck-moving' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1199 |
-
'truck-pickup' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1200 |
-
'tshirt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1201 |
-
'tty' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1202 |
-
'tumblr' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1203 |
-
'tumblr-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1204 |
-
'tv' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1205 |
-
'twitch' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1206 |
-
'twitter' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1207 |
-
'twitter-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1208 |
-
'typo3' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1209 |
-
'uber' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1210 |
-
'ubuntu' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1211 |
-
'uikit' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1212 |
-
'umbrella' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1213 |
-
'umbrella-beach' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1214 |
-
'underline' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1215 |
-
'undo' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1216 |
-
'undo-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1217 |
-
'uniregistry' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1218 |
-
'universal-access' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1219 |
-
'university' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1220 |
-
'unlink' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1221 |
-
'unlock' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1222 |
-
'unlock-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1223 |
-
'untappd' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1224 |
-
'upload' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1225 |
-
'ups' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1226 |
-
'usb' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1227 |
-
'user' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1228 |
-
'user-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1229 |
-
'user-alt-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1230 |
-
'user-astronaut' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1231 |
-
'user-check' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1232 |
-
'user-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1233 |
-
'user-clock' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1234 |
-
'user-cog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1235 |
-
'user-edit' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1236 |
-
'user-friends' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1237 |
-
'user-graduate' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1238 |
-
'user-injured' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1239 |
-
'user-lock' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1240 |
-
'user-md' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1241 |
-
'user-minus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1242 |
-
'user-ninja' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1243 |
-
'user-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1244 |
-
'user-secret' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1245 |
-
'user-shield' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1246 |
-
'user-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1247 |
-
'user-tag' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1248 |
-
'user-tie' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1249 |
-
'user-times' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1250 |
-
'users' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1251 |
-
'users-cog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1252 |
-
'usps' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1253 |
-
'ussunnah' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1254 |
-
'utensil-spoon' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1255 |
-
'utensils' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1256 |
-
'vaadin' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1257 |
-
'vector-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1258 |
-
'venus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1259 |
-
'venus-double' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1260 |
-
'venus-mars' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1261 |
-
'viacoin' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1262 |
-
'viadeo' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1263 |
-
'viadeo-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1264 |
-
'vial' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1265 |
-
'vials' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1266 |
-
'viber' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1267 |
-
'video' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1268 |
-
'video-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1269 |
-
'vihara' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1270 |
-
'vimeo' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1271 |
-
'vimeo-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1272 |
-
'vimeo-v' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1273 |
-
'vine' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1274 |
-
'vk' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1275 |
-
'vnv' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1276 |
-
'volleyball-ball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1277 |
-
'volume-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1278 |
-
'volume-mute' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1279 |
-
'volume-off' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1280 |
-
'volume-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1281 |
-
'vote-yea' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1282 |
-
'vr-cardboard' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1283 |
-
'vuejs' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1284 |
-
'walking' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1285 |
-
'wallet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1286 |
-
'warehouse' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1287 |
-
'water' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1288 |
-
'weebly' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1289 |
-
'weibo' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1290 |
-
'weight' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1291 |
-
'weight-hanging' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1292 |
-
'weixin' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1293 |
-
'whatsapp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1294 |
-
'whatsapp-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1295 |
-
'wheelchair' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1296 |
-
'whmcs' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1297 |
-
'wifi' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1298 |
-
'wikipedia-w' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1299 |
-
'wind' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1300 |
-
'window-close' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1301 |
-
'window-maximize' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1302 |
-
'window-minimize' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1303 |
-
'window-restore' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1304 |
-
'windows' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1305 |
-
'wine-bottle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1306 |
-
'wine-glass' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1307 |
-
'wine-glass-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1308 |
-
'wix' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1309 |
-
'wizards-of-the-coast' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1310 |
-
'wolf-pack-battalion' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1311 |
-
'won-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1312 |
-
'wordpress' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1313 |
-
'wordpress-simple' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1314 |
-
'wpbeginner' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1315 |
-
'wpexplorer' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1316 |
-
'wpforms' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1317 |
-
'wpressr' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1318 |
-
'wrench' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1319 |
-
'x-ray' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1320 |
-
'xbox' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1321 |
-
'xing' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1322 |
-
'xing-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1323 |
-
'y-combinator' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1324 |
-
'yahoo' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1325 |
-
'yandex' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1326 |
-
'yandex-international' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1327 |
-
'yarn' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1328 |
-
'yelp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1329 |
-
'yen-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1330 |
-
'yin-yang' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1331 |
-
'yoast' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1332 |
-
'youtube' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1333 |
-
'youtube-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1334 |
-
'zhihu' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1335 |
-
));
|
1336 |
-
}
|
1337 |
-
add_filter('siteorigin_widgets_icons_fontawesome', 'siteorigin_widgets_icons_fontawesome_filter');
|
1338 |
-
|
1339 |
-
function siteorigin_widgets_icon_styles_fontawesome_filter( $styles ) {
|
1340 |
-
return array_merge( $styles, array(
|
1341 |
-
'sow-fab' => __( 'Brands', 'so-widgets-bundle' ),
|
1342 |
-
'sow-far' => __( 'Regular', 'so-widgets-bundle' ),
|
1343 |
-
'sow-fas' => __( 'Solid', 'so-widgets-bundle' ),
|
1344 |
-
) );
|
1345 |
-
}
|
1346 |
-
|
1347 |
-
add_filter('siteorigin_widgets_icon_styles_fontawesome', 'siteorigin_widgets_icon_styles_fontawesome_filter');
|
1348 |
-
|
1349 |
-
function siteorigin_widgets_icon_migrate_fontawesome( $icon_data ) {
|
1350 |
-
|
1351 |
-
// Previous versions of FontAwesome didn't use 'style'.
|
1352 |
-
if ( ! empty( $icon_data ) && ! isset( $icon_data['style'] ) ) {
|
1353 |
-
|
1354 |
-
$name_map = siteorigin_widgets_icon_migrate_fontawesome_name_map();
|
1355 |
-
|
1356 |
-
if ( isset( $name_map[ $icon_data['icon'] ] ) ) {
|
1357 |
-
if ( preg_match( '/\-o\b/', $icon_data['icon'] ) ) {
|
1358 |
-
$icon_data['style'] = 'sow-far';
|
1359 |
-
}
|
1360 |
-
$icon_data['icon'] = $name_map[ $icon_data['icon'] ];
|
1361 |
-
}
|
1362 |
-
if ( empty( $icon_data['style'] ) ) {
|
1363 |
-
$icons = apply_filters( 'siteorigin_widgets_icons_fontawesome', array() );
|
1364 |
-
if ( ! empty( $icons[ $icon_data['icon'] ] ) && ! empty( $icons[ $icon_data['icon'] ]['styles'] ) ) {
|
1365 |
-
$icon_data['style'] = $icons[ $icon_data['icon'] ]['styles'][0];
|
1366 |
-
} else {
|
1367 |
-
$icon_data['style'] = 'sow-fas';
|
1368 |
-
}
|
1369 |
-
}
|
1370 |
-
}
|
1371 |
-
return $icon_data;
|
1372 |
-
}
|
1373 |
-
|
1374 |
-
add_filter( 'siteorigin_widgets_icon_migrate_fontawesome', 'siteorigin_widgets_icon_migrate_fontawesome' );
|
1375 |
-
|
1376 |
-
function siteorigin_widgets_icon_migrate_fontawesome_name_map() {
|
1377 |
-
return array(
|
1378 |
-
'address-book-o' => 'address-book',
|
1379 |
-
'address-card-o' => 'address-card',
|
1380 |
-
'area-chart' => 'chart-area',
|
1381 |
-
'arrow-circle-o-down' => 'arrow-alt-circle-down',
|
1382 |
-
'arrow-circle-o-left' => 'arrow-alt-circle-left',
|
1383 |
-
'arrow-circle-o-right' => 'arrow-alt-circle-right',
|
1384 |
-
'arrow-circle-o-up' => 'arrow-alt-circle-up',
|
1385 |
-
'arrows' => 'arrows-alt',
|
1386 |
-
'arrows-alt' => 'expand-arrows-alt',
|
1387 |
-
'arrows-h' => 'arrows-alt-h',
|
1388 |
-
'arrows-v' => 'arrows-alt-v',
|
1389 |
-
'asl-interpreting' => 'american-sign-language-interpreting',
|
1390 |
-
'automobile' => 'car',
|
1391 |
-
'bank' => 'university',
|
1392 |
-
'bar-chart' => 'chart-bar',
|
1393 |
-
'bar-chart-o' => 'chart-bar',
|
1394 |
-
'bathtub' => 'bath',
|
1395 |
-
'battery' => 'battery-full',
|
1396 |
-
'battery-0' => 'battery-empty',
|
1397 |
-
'battery-1' => 'battery-quarter',
|
1398 |
-
'battery-2' => 'battery-half',
|
1399 |
-
'battery-3' => 'battery-three-quarters',
|
1400 |
-
'battery-4' => 'battery-full',
|
1401 |
-
'bell-o' => 'bell',
|
1402 |
-
'bell-slash-o' => 'bell-slash',
|
1403 |
-
'bitbucket-square' => 'bitbucket',
|
1404 |
-
'bitcoin' => 'btc',
|
1405 |
-
'bookmark-o' => 'bookmark',
|
1406 |
-
'building-o' => 'building',
|
1407 |
-
'cab' => 'taxi',
|
1408 |
-
'calendar' => 'calendar-alt',
|
1409 |
-
'calendar-check-o' => 'calendar-check',
|
1410 |
-
'calendar-minus-o' => 'calendar-minus',
|
1411 |
-
'calendar-o' => 'calendar',
|
1412 |
-
'calendar-plus-o' => 'calendar-plus',
|
1413 |
-
'calendar-times-o' => 'calendar-times',
|
1414 |
-
'caret-square-o-down' => 'caret-square-down',
|
1415 |
-
'caret-square-o-left' => 'caret-square-left',
|
1416 |
-
'caret-square-o-right' => 'caret-square-right',
|
1417 |
-
'caret-square-o-up' => 'caret-square-up',
|
1418 |
-
'cc' => 'closed-captioning',
|
1419 |
-
'chain' => 'link',
|
1420 |
-
'chain-broken' => 'unlink',
|
1421 |
-
'check-circle-o' => 'check-circle',
|
1422 |
-
'check-square-o' => 'check-square',
|
1423 |
-
'circle-o' => 'circle',
|
1424 |
-
'circle-o-notch' => 'circle-notch',
|
1425 |
-
'circle-thin' => 'circle',
|
1426 |
-
'clock-o' => 'clock',
|
1427 |
-
'close' => 'times',
|
1428 |
-
'cloud-download' => 'cloud-download-alt',
|
1429 |
-
'cloud-upload' => 'cloud-upload-alt',
|
1430 |
-
'cny' => 'yen-sign',
|
1431 |
-
'code-fork' => 'code-branch',
|
1432 |
-
'comment-o' => 'comment',
|
1433 |
-
'commenting' => 'comment-dots',
|
1434 |
-
'commenting-o' => 'comment-dots',
|
1435 |
-
'comments-o' => 'comments',
|
1436 |
-
'credit-card-alt' => 'credit-card',
|
1437 |
-
'cutlery' => 'utensils',
|
1438 |
-
'dashboard' => 'tachometer-alt',
|
1439 |
-
'deafness' => 'deaf',
|
1440 |
-
'dedent' => 'outdent',
|
1441 |
-
'diamond' => 'gem',
|
1442 |
-
'dollar' => 'dollar-sign',
|
1443 |
-
'dot-circle-o' => 'dot-circle',
|
1444 |
-
'drivers-license' => 'id-card',
|
1445 |
-
'drivers-license-o' => 'id-card',
|
1446 |
-
'eercast' => 'sellcast',
|
1447 |
-
'envelope-o' => 'envelope',
|
1448 |
-
'envelope-open-o' => 'envelope-open',
|
1449 |
-
'eur' => 'euro-sign',
|
1450 |
-
'euro' => 'euro-sign',
|
1451 |
-
'exchange' => 'exchange-alt',
|
1452 |
-
'external-link' => 'external-link-alt',
|
1453 |
-
'external-link-square' => 'external-link-square-alt',
|
1454 |
-
'eyedropper' => 'eye-dropper',
|
1455 |
-
'fa' => 'font-awesome',
|
1456 |
-
'facebook' => 'facebook-f',
|
1457 |
-
'facebook-official' => 'facebook',
|
1458 |
-
'feed' => 'rss',
|
1459 |
-
'file-archive-o' => 'file-archive',
|
1460 |
-
'file-audio-o' => 'file-audio',
|
1461 |
-
'file-code-o' => 'file-code',
|
1462 |
-
'file-excel-o' => 'file-excel',
|
1463 |
-
'file-image-o' => 'file-image',
|
1464 |
-
'file-movie-o' => 'file-video',
|
1465 |
-
'file-o' => 'file',
|
1466 |
-
'file-pdf-o' => 'file-pdf',
|
1467 |
-
'file-photo-o' => 'file-image',
|
1468 |
-
'file-picture-o' => 'file-image',
|
1469 |
-
'file-powerpoint-o' => 'file-powerpoint',
|
1470 |
-
'file-sound-o' => 'file-audio',
|
1471 |
-
'file-text' => 'file-alt',
|
1472 |
-
'file-text-o' => 'file-alt',
|
1473 |
-
'file-video-o' => 'file-video',
|
1474 |
-
'file-word-o' => 'file-word',
|
1475 |
-
'file-zip-o' => 'file-archive',
|
1476 |
-
'files-o' => 'copy',
|
1477 |
-
'flag-o' => 'flag',
|
1478 |
-
'flash' => 'bolt',
|
1479 |
-
'floppy-o' => 'save',
|
1480 |
-
'folder-o' => 'folder',
|
1481 |
-
'folder-open-o' => 'folder-open',
|
1482 |
-
'frown-o' => 'frown',
|
1483 |
-
'futbol-o' => 'futbol',
|
1484 |
-
'gbp' => 'pound-sign',
|
1485 |
-
'ge' => 'empire',
|
1486 |
-
'gear' => 'cog',
|
1487 |
-
'gears' => 'cogs',
|
1488 |
-
'gittip' => 'gratipay',
|
1489 |
-
'glass' => 'glass-martini',
|
1490 |
-
'google-plus' => 'google-plus-g',
|
1491 |
-
'google-plus-circle' => 'google-plus',
|
1492 |
-
'google-plus-official' => 'google-plus',
|
1493 |
-
'google-plus-square' => 'google-plus-square',
|
1494 |
-
'group' => 'users',
|
1495 |
-
'hand-grab-o' => 'hand-rock',
|
1496 |
-
'hand-lizard-o' => 'hand-lizard',
|
1497 |
-
'hand-o-down' => 'hand-point-down',
|
1498 |
-
'hand-o-left' => 'hand-point-left',
|
1499 |
-
'hand-o-right' => 'hand-point-right',
|
1500 |
-
'hand-o-up' => 'hand-point-up',
|
1501 |
-
'hand-paper-o' => 'hand-paper',
|
1502 |
-
'hand-peace-o' => 'hand-peace',
|
1503 |
-
'hand-pointer-o' => 'hand-pointer',
|
1504 |
-
'hand-rock-o' => 'hand-rock',
|
1505 |
-
'hand-scissors-o' => 'hand-scissors',
|
1506 |
-
'hand-spock-o' => 'hand-spock',
|
1507 |
-
'hand-stop-o' => 'hand-paper',
|
1508 |
-
'handshake-o' => 'handshake',
|
1509 |
-
'hard-of-hearing' => 'deaf',
|
1510 |
-
'hdd-o' => 'hdd',
|
1511 |
-
'header' => 'heading',
|
1512 |
-
'heart-o' => 'heart',
|
1513 |
-
'hospital-o' => 'hospital',
|
1514 |
-
'hotel' => 'bed',
|
1515 |
-
'hourglass-1' => 'hourglass-start',
|
1516 |
-
'hourglass-2' => 'hourglass-half',
|
1517 |
-
'hourglass-3' => 'hourglass-end',
|
1518 |
-
'hourglass-o' => 'hourglass',
|
1519 |
-
'id-card-o' => 'id-card',
|
1520 |
-
'ils' => 'shekel-sign',
|
1521 |
-
'inr' => 'rupee-sign',
|
1522 |
-
'institution' => 'university',
|
1523 |
-
'intersex' => 'transgender',
|
1524 |
-
'jpy' => 'yen-sign',
|
1525 |
-
'keyboard-o' => 'keyboard',
|
1526 |
-
'krw' => 'won-sign',
|
1527 |
-
'legal' => 'gavel',
|
1528 |
-
'lemon-o' => 'lemon',
|
1529 |
-
'level-down' => 'level-down-alt',
|
1530 |
-
'level-up' => 'level-up-alt',
|
1531 |
-
'life-bouy' => 'life-ring',
|
1532 |
-
'life-buoy' => 'life-ring',
|
1533 |
-
'life-saver' => 'life-ring',
|
1534 |
-
'lightbulb-o' => 'lightbulb',
|
1535 |
-
'line-chart' => 'chart-line',
|
1536 |
-
'linkedin' => 'linkedin-in',
|
1537 |
-
'linkedin-square' => 'linkedin',
|
1538 |
-
'long-arrow-down' => 'long-arrow-alt-down',
|
1539 |
-
'long-arrow-left' => 'long-arrow-alt-left',
|
1540 |
-
'long-arrow-right' => 'long-arrow-alt-right',
|
1541 |
-
'long-arrow-up' => 'long-arrow-alt-up',
|
1542 |
-
'mail-forward' => 'share',
|
1543 |
-
'mail-reply' => 'reply',
|
1544 |
-
'mail-reply-all' => 'reply-all',
|
1545 |
-
'map-marker' => 'map-marker-alt',
|
1546 |
-
'map-o' => 'map',
|
1547 |
-
'meanpath' => 'font-awesome',
|
1548 |
-
'meh-o' => 'meh',
|
1549 |
-
'minus-square-o' => 'minus-square',
|
1550 |
-
'mobile' => 'mobile-alt',
|
1551 |
-
'mobile-phone' => 'mobile-alt',
|
1552 |
-
'money' => 'money-bill-alt',
|
1553 |
-
'moon-o' => 'moon',
|
1554 |
-
'mortar-board' => 'graduation-cap',
|
1555 |
-
'navicon' => 'bars',
|
1556 |
-
'newspaper-o' => 'newspaper',
|
1557 |
-
'paper-plane-o' => 'paper-plane',
|
1558 |
-
'paste' => 'clipboard',
|
1559 |
-
'pause-circle-o' => 'pause-circle',
|
1560 |
-
'pencil' => 'pencil-alt',
|
1561 |
-
'pencil-square' => 'pen-square',
|
1562 |
-
'pencil-square-o' => 'edit',
|
1563 |
-
'photo' => 'image',
|
1564 |
-
'picture-o' => 'image',
|
1565 |
-
'pie-chart' => 'chart-pie',
|
1566 |
-
'play-circle-o' => 'play-circle',
|
1567 |
-
'plus-square-o' => 'plus-square',
|
1568 |
-
'question-circle-o' => 'question-circle',
|
1569 |
-
'ra' => 'rebel',
|
1570 |
-
'refresh' => 'sync',
|
1571 |
-
'remove' => 'times',
|
1572 |
-
'reorder' => 'bars',
|
1573 |
-
'repeat' => 'redo',
|
1574 |
-
'resistance' => 'rebel',
|
1575 |
-
'rmb' => 'yen-sign',
|
1576 |
-
'rotate-left' => 'undo',
|
1577 |
-
'rotate-right' => 'redo',
|
1578 |
-
'rouble' => 'ruble-sign',
|
1579 |
-
'rub' => 'ruble-sign',
|
1580 |
-
'ruble' => 'ruble-sign',
|
1581 |
-
'rupee' => 'rupee-sign',
|
1582 |
-
's15' => 'bath',
|
1583 |
-
'scissors' => 'cut',
|
1584 |
-
'send' => 'paper-plane',
|
1585 |
-
'send-o' => 'paper-plane',
|
1586 |
-
'share-square-o' => 'share-square',
|
1587 |
-
'shekel' => 'shekel-sign',
|
1588 |
-
'sheqel' => 'shekel-sign',
|
1589 |
-
'shield' => 'shield-alt',
|
1590 |
-
'sign-in' => 'sign-in-alt',
|
1591 |
-
'sign-out' => 'sign-out-alt',
|
1592 |
-
'signing' => 'sign-language',
|
1593 |
-
'sliders' => 'sliders-h',
|
1594 |
-
'smile-o' => 'smile',
|
1595 |
-
'snowflake-o' => 'snowflake',
|
1596 |
-
'soccer-ball-o' => 'futbol',
|
1597 |
-
'sort-alpha-asc' => 'sort-alpha-down',
|
1598 |
-
'sort-alpha-desc' => 'sort-alpha-up',
|
1599 |
-
'sort-amount-asc' => 'sort-amount-down',
|
1600 |
-
'sort-amount-desc' => 'sort-amount-up',
|
1601 |
-
'sort-asc' => 'sort-up',
|
1602 |
-
'sort-desc' => 'sort-down',
|
1603 |
-
'sort-numeric-asc' => 'sort-numeric-down',
|
1604 |
-
'sort-numeric-desc' => 'sort-numeric-up',
|
1605 |
-
'spoon' => 'utensil-spoon',
|
1606 |
-
'square-o' => 'square',
|
1607 |
-
'star-half-empty' => 'star-half',
|
1608 |
-
'star-half-full' => 'star-half',
|
1609 |
-
'star-half-o' => 'star-half',
|
1610 |
-
'star-o' => 'star',
|
1611 |
-
'sticky-note-o' => 'sticky-note',
|
1612 |
-
'stop-circle-o' => 'stop-circle',
|
1613 |
-
'sun-o' => 'sun',
|
1614 |
-
'support' => 'life-ring',
|
1615 |
-
'tablet' => 'tablet-alt',
|
1616 |
-
'tachometer' => 'tachometer-alt',
|
1617 |
-
'television' => 'tv',
|
1618 |
-
'thermometer' => 'thermometer-full',
|
1619 |
-
'thermometer-0' => 'thermometer-empty',
|
1620 |
-
'thermometer-1' => 'thermometer-quarter',
|
1621 |
-
'thermometer-2' => 'thermometer-half',
|
1622 |
-
'thermometer-3' => 'thermometer-three-quarters',
|
1623 |
-
'thermometer-4' => 'thermometer-full',
|
1624 |
-
'thumb-tack' => 'thumbtack',
|
1625 |
-
'thumbs-o-down' => 'thumbs-down',
|
1626 |
-
'thumbs-o-up' => 'thumbs-up',
|
1627 |
-
'ticket' => 'ticket-alt',
|
1628 |
-
'times-circle-o' => 'times-circle',
|
1629 |
-
'times-rectangle' => 'window-close',
|
1630 |
-
'times-rectangle-o' => 'window-close',
|
1631 |
-
'toggle-down' => 'caret-square-down',
|
1632 |
-
'toggle-left' => 'caret-square-left',
|
1633 |
-
'toggle-right' => 'caret-square-right',
|
1634 |
-
'toggle-up' => 'caret-square-up',
|
1635 |
-
'trash' => 'trash-alt',
|
1636 |
-
'trash-o' => 'trash-alt',
|
1637 |
-
'try' => 'lira-sign',
|
1638 |
-
'turkish-lira' => 'lira-sign',
|
1639 |
-
'unsorted' => 'sort',
|
1640 |
-
'usd' => 'dollar-sign',
|
1641 |
-
'user-circle-o' => 'user-circle',
|
1642 |
-
'user-o' => 'user',
|
1643 |
-
'vcard' => 'address-card',
|
1644 |
-
'vcard-o' => 'address-card',
|
1645 |
-
'video-camera' => 'video',
|
1646 |
-
'vimeo' => 'vimeo-v',
|
1647 |
-
'volume-control-phone' => 'phone-volume',
|
1648 |
-
'warning' => 'exclamation-triangle',
|
1649 |
-
'wechat' => 'weixin',
|
1650 |
-
'wheelchair-alt' => 'accessible-icon',
|
1651 |
-
'window-close-o' => 'window-close',
|
1652 |
-
'won' => 'won-sign',
|
1653 |
-
'y-combinator-square' => 'hacker-news',
|
1654 |
-
'yc' => 'y-combinator',
|
1655 |
-
'yc-square' => 'hacker-news',
|
1656 |
-
'yen' => 'yen-sign',
|
1657 |
-
'youtube-play' => 'youtube',
|
1658 |
-
'youtube-square' => 'youtube-square',
|
1659 |
-
);
|
1660 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function siteorigin_widgets_icons_fontawesome_filter( $icons ){
|
4 |
+
return array_merge($icons, array(
|
5 |
+
'500px' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
6 |
+
'accessible-icon' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
7 |
+
'accusoft' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
8 |
+
'acquisitions-incorporated' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
9 |
+
'ad' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
10 |
+
'address-book' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
11 |
+
'address-card' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
12 |
+
'adjust' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
13 |
+
'adn' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
14 |
+
'adobe' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
15 |
+
'adversal' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
16 |
+
'affiliatetheme' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
17 |
+
'air-freshener' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
18 |
+
'algolia' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
19 |
+
'align-center' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
20 |
+
'align-justify' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
21 |
+
'align-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
22 |
+
'align-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
23 |
+
'alipay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
24 |
+
'allergies' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
25 |
+
'amazon' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
26 |
+
'amazon-pay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
27 |
+
'ambulance' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
28 |
+
'american-sign-language-interpreting' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
29 |
+
'amilia' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
30 |
+
'anchor' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
31 |
+
'android' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
32 |
+
'angellist' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
33 |
+
'angle-double-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
34 |
+
'angle-double-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
35 |
+
'angle-double-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
36 |
+
'angle-double-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
37 |
+
'angle-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
38 |
+
'angle-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
39 |
+
'angle-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
40 |
+
'angle-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
41 |
+
'angry' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
42 |
+
'angrycreative' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
43 |
+
'angular' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
44 |
+
'ankh' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
45 |
+
'app-store' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
46 |
+
'app-store-ios' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
47 |
+
'apper' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
48 |
+
'apple' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
49 |
+
'apple-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
50 |
+
'apple-pay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
51 |
+
'archive' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
52 |
+
'archway' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
53 |
+
'arrow-alt-circle-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
54 |
+
'arrow-alt-circle-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
55 |
+
'arrow-alt-circle-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
56 |
+
'arrow-alt-circle-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
57 |
+
'arrow-circle-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
58 |
+
'arrow-circle-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
59 |
+
'arrow-circle-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
60 |
+
'arrow-circle-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
61 |
+
'arrow-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
62 |
+
'arrow-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
63 |
+
'arrow-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
64 |
+
'arrow-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
65 |
+
'arrows-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
66 |
+
'arrows-alt-h' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
67 |
+
'arrows-alt-v' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
68 |
+
'artstation' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
69 |
+
'assistive-listening-systems' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
70 |
+
'asterisk' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
71 |
+
'asymmetrik' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
72 |
+
'at' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
73 |
+
'atlas' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
74 |
+
'atlassian' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
75 |
+
'atom' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
76 |
+
'audible' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
77 |
+
'audio-description' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
78 |
+
'autoprefixer' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
79 |
+
'avianex' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
80 |
+
'aviato' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
81 |
+
'award' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
82 |
+
'aws' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
83 |
+
'baby' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
84 |
+
'baby-carriage' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
85 |
+
'backspace' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
86 |
+
'backward' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
87 |
+
'balance-scale' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
88 |
+
'ban' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
89 |
+
'band-aid' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
90 |
+
'bandcamp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
91 |
+
'barcode' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
92 |
+
'bars' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
93 |
+
'baseball-ball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
94 |
+
'basketball-ball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
95 |
+
'bath' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
96 |
+
'battery-empty' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
97 |
+
'battery-full' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
98 |
+
'battery-half' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
99 |
+
'battery-quarter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
100 |
+
'battery-three-quarters' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
101 |
+
'bed' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
102 |
+
'beer' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
103 |
+
'behance' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
104 |
+
'behance-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
105 |
+
'bell' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
106 |
+
'bell-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
107 |
+
'bezier-curve' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
108 |
+
'bible' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
109 |
+
'bicycle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
110 |
+
'bimobject' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
111 |
+
'binoculars' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
112 |
+
'biohazard' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
113 |
+
'birthday-cake' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
114 |
+
'bitbucket' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
115 |
+
'bitcoin' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
116 |
+
'bity' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
117 |
+
'black-tie' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
118 |
+
'blackberry' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
119 |
+
'blender' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
120 |
+
'blender-phone' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
121 |
+
'blind' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
122 |
+
'blog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
123 |
+
'blogger' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
124 |
+
'blogger-b' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
125 |
+
'bluetooth' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
126 |
+
'bluetooth-b' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
127 |
+
'bold' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
128 |
+
'bolt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
129 |
+
'bomb' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
130 |
+
'bone' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
131 |
+
'bong' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
132 |
+
'book' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
133 |
+
'book-dead' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
134 |
+
'book-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
135 |
+
'book-reader' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
136 |
+
'bookmark' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
137 |
+
'bowling-ball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
138 |
+
'box' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
139 |
+
'box-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
140 |
+
'boxes' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
141 |
+
'braille' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
142 |
+
'brain' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
143 |
+
'briefcase' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
144 |
+
'briefcase-medical' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
145 |
+
'broadcast-tower' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
146 |
+
'broom' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
147 |
+
'brush' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
148 |
+
'btc' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
149 |
+
'bug' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
150 |
+
'building' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
151 |
+
'bullhorn' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
152 |
+
'bullseye' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
153 |
+
'burn' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
154 |
+
'buromobelexperte' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
155 |
+
'bus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
156 |
+
'bus-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
157 |
+
'business-time' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
158 |
+
'buysellads' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
159 |
+
'calculator' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
160 |
+
'calendar' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
161 |
+
'calendar-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
162 |
+
'calendar-check' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
163 |
+
'calendar-day' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
164 |
+
'calendar-minus' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
165 |
+
'calendar-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
166 |
+
'calendar-times' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
167 |
+
'calendar-week' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
168 |
+
'camera' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
169 |
+
'camera-retro' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
170 |
+
'campground' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
171 |
+
'canadian-maple-leaf' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
172 |
+
'candy-cane' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
173 |
+
'cannabis' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
174 |
+
'capsules' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
175 |
+
'car' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
176 |
+
'car-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
177 |
+
'car-battery' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
178 |
+
'car-crash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
179 |
+
'car-side' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
180 |
+
'caret-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
181 |
+
'caret-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
182 |
+
'caret-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
183 |
+
'caret-square-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
184 |
+
'caret-square-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
185 |
+
'caret-square-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
186 |
+
'caret-square-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
187 |
+
'caret-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
188 |
+
'carrot' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
189 |
+
'cart-arrow-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
190 |
+
'cart-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
191 |
+
'cash-register' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
192 |
+
'cat' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
193 |
+
'cc-amazon-pay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
194 |
+
'cc-amex' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
195 |
+
'cc-apple-pay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
196 |
+
'cc-diners-club' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
197 |
+
'cc-discover' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
198 |
+
'cc-jcb' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
199 |
+
'cc-mastercard' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
200 |
+
'cc-paypal' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
201 |
+
'cc-stripe' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
202 |
+
'cc-visa' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
203 |
+
'centercode' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
204 |
+
'centos' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
205 |
+
'certificate' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
206 |
+
'chair' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
207 |
+
'chalkboard' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
208 |
+
'chalkboard-teacher' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
209 |
+
'charging-station' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
210 |
+
'chart-area' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
211 |
+
'chart-bar' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
212 |
+
'chart-line' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
213 |
+
'chart-pie' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
214 |
+
'check' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
215 |
+
'check-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
216 |
+
'check-double' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
217 |
+
'check-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
218 |
+
'chess' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
219 |
+
'chess-bishop' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
220 |
+
'chess-board' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
221 |
+
'chess-king' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
222 |
+
'chess-knight' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
223 |
+
'chess-pawn' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
224 |
+
'chess-queen' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
225 |
+
'chess-rook' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
226 |
+
'chevron-circle-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
227 |
+
'chevron-circle-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
228 |
+
'chevron-circle-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
229 |
+
'chevron-circle-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
230 |
+
'chevron-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
231 |
+
'chevron-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
232 |
+
'chevron-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
233 |
+
'chevron-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
234 |
+
'child' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
235 |
+
'chrome' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
236 |
+
'church' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
237 |
+
'circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
238 |
+
'circle-notch' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
239 |
+
'city' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
240 |
+
'clipboard' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
241 |
+
'clipboard-check' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
242 |
+
'clipboard-list' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
243 |
+
'clock' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
244 |
+
'clone' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
245 |
+
'closed-captioning' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
246 |
+
'cloud' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
247 |
+
'cloud-download-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
248 |
+
'cloud-meatball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
249 |
+
'cloud-moon' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
250 |
+
'cloud-moon-rain' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
251 |
+
'cloud-rain' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
252 |
+
'cloud-showers-heavy' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
253 |
+
'cloud-sun' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
254 |
+
'cloud-sun-rain' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
255 |
+
'cloud-upload-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
256 |
+
'cloudscale' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
257 |
+
'cloudsmith' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
258 |
+
'cloudversify' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
259 |
+
'cocktail' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
260 |
+
'code' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
261 |
+
'code-branch' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
262 |
+
'codepen' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
263 |
+
'codiepie' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
264 |
+
'coffee' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
265 |
+
'cog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
266 |
+
'cogs' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
267 |
+
'coins' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
268 |
+
'columns' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
269 |
+
'comment' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
270 |
+
'comment-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
271 |
+
'comment-dollar' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
272 |
+
'comment-dots' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
273 |
+
'comment-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
274 |
+
'comments' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
275 |
+
'comments-dollar' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
276 |
+
'compact-disc' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
277 |
+
'compass' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
278 |
+
'compress' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
279 |
+
'compress-arrows-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
280 |
+
'concierge-bell' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
281 |
+
'confluence' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
282 |
+
'connectdevelop' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
283 |
+
'contao' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
284 |
+
'cookie' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
285 |
+
'cookie-bite' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
286 |
+
'copy' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
287 |
+
'copyright' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
288 |
+
'couch' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
289 |
+
'cpanel' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
290 |
+
'creative-commons' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
291 |
+
'creative-commons-by' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
292 |
+
'creative-commons-nc' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
293 |
+
'creative-commons-nc-eu' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
294 |
+
'creative-commons-nc-jp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
295 |
+
'creative-commons-nd' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
296 |
+
'creative-commons-pd' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
297 |
+
'creative-commons-pd-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
298 |
+
'creative-commons-remix' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
299 |
+
'creative-commons-sa' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
300 |
+
'creative-commons-sampling' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
301 |
+
'creative-commons-sampling-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
302 |
+
'creative-commons-share' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
303 |
+
'creative-commons-zero' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
304 |
+
'credit-card' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
305 |
+
'critical-role' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
306 |
+
'crop' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
307 |
+
'crop-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
308 |
+
'cross' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
309 |
+
'crosshairs' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
310 |
+
'crow' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
311 |
+
'crown' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
312 |
+
'css3' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
313 |
+
'css3-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
314 |
+
'cube' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
315 |
+
'cubes' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
316 |
+
'cut' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
317 |
+
'cuttlefish' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
318 |
+
'd-and-d' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
319 |
+
'd-and-d-beyond' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
320 |
+
'dashcube' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
321 |
+
'database' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
322 |
+
'deaf' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
323 |
+
'delicious' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
324 |
+
'democrat' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
325 |
+
'deploydog' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
326 |
+
'deskpro' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
327 |
+
'desktop' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
328 |
+
'dev' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
329 |
+
'deviantart' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
330 |
+
'dharmachakra' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
331 |
+
'dhl' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
332 |
+
'diagnoses' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
333 |
+
'diaspora' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
334 |
+
'dice' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
335 |
+
'dice-d20' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
336 |
+
'dice-d6' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
337 |
+
'dice-five' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
338 |
+
'dice-four' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
339 |
+
'dice-one' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
340 |
+
'dice-six' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
341 |
+
'dice-three' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
342 |
+
'dice-two' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
343 |
+
'digg' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
344 |
+
'digital-ocean' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
345 |
+
'digital-tachograph' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
346 |
+
'directions' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
347 |
+
'discord' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
348 |
+
'discourse' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
349 |
+
'divide' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
350 |
+
'dizzy' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
351 |
+
'dna' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
352 |
+
'dochub' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
353 |
+
'docker' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
354 |
+
'dog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
355 |
+
'dollar-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
356 |
+
'dolly' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
357 |
+
'dolly-flatbed' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
358 |
+
'donate' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
359 |
+
'door-closed' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
360 |
+
'door-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
361 |
+
'dot-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
362 |
+
'dove' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
363 |
+
'download' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
364 |
+
'draft2digital' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
365 |
+
'drafting-compass' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
366 |
+
'dragon' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
367 |
+
'draw-polygon' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
368 |
+
'dribbble' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
369 |
+
'dribbble-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
370 |
+
'dropbox' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
371 |
+
'drum' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
372 |
+
'drum-steelpan' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
373 |
+
'drumstick-bite' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
374 |
+
'drupal' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
375 |
+
'dumbbell' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
376 |
+
'dumpster' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
377 |
+
'dumpster-fire' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
378 |
+
'dungeon' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
379 |
+
'dyalog' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
380 |
+
'earlybirds' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
381 |
+
'ebay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
382 |
+
'edge' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
383 |
+
'edit' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
384 |
+
'eject' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
385 |
+
'elementor' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
386 |
+
'ellipsis-h' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
387 |
+
'ellipsis-v' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
388 |
+
'ello' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
389 |
+
'ember' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
390 |
+
'empire' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
391 |
+
'envelope' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
392 |
+
'envelope-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
393 |
+
'envelope-open-text' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
394 |
+
'envelope-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
395 |
+
'envira' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
396 |
+
'equals' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
397 |
+
'eraser' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
398 |
+
'erlang' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
399 |
+
'ethereum' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
400 |
+
'ethernet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
401 |
+
'etsy' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
402 |
+
'euro-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
403 |
+
'exchange-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
404 |
+
'exclamation' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
405 |
+
'exclamation-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
406 |
+
'exclamation-triangle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
407 |
+
'expand' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
408 |
+
'expand-arrows-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
409 |
+
'expeditedssl' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
410 |
+
'external-link-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
411 |
+
'external-link-square-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
412 |
+
'eye' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
413 |
+
'eye-dropper' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
414 |
+
'eye-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
415 |
+
'facebook' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
416 |
+
'facebook-f' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
417 |
+
'facebook-messenger' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
418 |
+
'facebook-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
419 |
+
'fantasy-flight-games' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
420 |
+
'fast-backward' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
421 |
+
'fast-forward' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
422 |
+
'fax' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
423 |
+
'feather' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
424 |
+
'feather-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
425 |
+
'fedex' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
426 |
+
'fedora' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
427 |
+
'female' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
428 |
+
'fighter-jet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
429 |
+
'figma' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
430 |
+
'file' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
431 |
+
'file-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
432 |
+
'file-archive' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
433 |
+
'file-audio' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
434 |
+
'file-code' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
435 |
+
'file-contract' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
436 |
+
'file-csv' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
437 |
+
'file-download' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
438 |
+
'file-excel' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
439 |
+
'file-export' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
440 |
+
'file-image' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
441 |
+
'file-import' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
442 |
+
'file-invoice' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
443 |
+
'file-invoice-dollar' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
444 |
+
'file-medical' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
445 |
+
'file-medical-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
446 |
+
'file-pdf' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
447 |
+
'file-powerpoint' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
448 |
+
'file-prescription' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
449 |
+
'file-signature' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
450 |
+
'file-upload' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
451 |
+
'file-video' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
452 |
+
'file-word' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
453 |
+
'fill' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
454 |
+
'fill-drip' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
455 |
+
'film' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
456 |
+
'filter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
457 |
+
'fingerprint' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
458 |
+
'fire' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
459 |
+
'fire-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
460 |
+
'fire-extinguisher' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
461 |
+
'firefox' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
462 |
+
'first-aid' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
463 |
+
'first-order' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
464 |
+
'first-order-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
465 |
+
'firstdraft' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
466 |
+
'fish' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
467 |
+
'fist-raised' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
468 |
+
'flag' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
469 |
+
'flag-checkered' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
470 |
+
'flag-usa' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
471 |
+
'flask' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
472 |
+
'flickr' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
473 |
+
'flipboard' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
474 |
+
'flushed' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
475 |
+
'fly' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
476 |
+
'folder' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
477 |
+
'folder-minus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
478 |
+
'folder-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
479 |
+
'folder-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
480 |
+
'font' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
481 |
+
'font-awesome' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
482 |
+
'font-awesome-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
483 |
+
'font-awesome-flag' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
484 |
+
'font-awesome-logo-full' => array( 'unicode' => '', 'styles' => array( 'sow-fab', 'sow-fas', 'sow-far' ), ),
|
485 |
+
'fonticons' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
486 |
+
'fonticons-fi' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
487 |
+
'football-ball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
488 |
+
'fort-awesome' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
489 |
+
'fort-awesome-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
490 |
+
'forumbee' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
491 |
+
'forward' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
492 |
+
'foursquare' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
493 |
+
'free-code-camp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
494 |
+
'freebsd' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
495 |
+
'frog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
496 |
+
'frown' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
497 |
+
'frown-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
498 |
+
'fulcrum' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
499 |
+
'funnel-dollar' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
500 |
+
'futbol' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
501 |
+
'galactic-republic' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
502 |
+
'galactic-senate' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
503 |
+
'gamepad' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
504 |
+
'gas-pump' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
505 |
+
'gavel' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
506 |
+
'gem' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
507 |
+
'genderless' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
508 |
+
'get-pocket' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
509 |
+
'gg' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
510 |
+
'gg-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
511 |
+
'ghost' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
512 |
+
'gift' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
513 |
+
'gifts' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
514 |
+
'git' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
515 |
+
'git-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
516 |
+
'github' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
517 |
+
'github-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
518 |
+
'github-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
519 |
+
'gitkraken' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
520 |
+
'gitlab' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
521 |
+
'gitter' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
522 |
+
'glass-cheers' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
523 |
+
'glass-martini' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
524 |
+
'glass-martini-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
525 |
+
'glass-whiskey' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
526 |
+
'glasses' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
527 |
+
'glide' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
528 |
+
'glide-g' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
529 |
+
'globe' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
530 |
+
'globe-africa' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
531 |
+
'globe-americas' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
532 |
+
'globe-asia' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
533 |
+
'globe-europe' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
534 |
+
'gofore' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
535 |
+
'golf-ball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
536 |
+
'goodreads' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
537 |
+
'goodreads-g' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
538 |
+
'google' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
539 |
+
'google-drive' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
540 |
+
'google-play' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
541 |
+
'google-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
542 |
+
'google-plus-g' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
543 |
+
'google-plus-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
544 |
+
'google-wallet' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
545 |
+
'gopuram' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
546 |
+
'graduation-cap' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
547 |
+
'gratipay' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
548 |
+
'grav' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
549 |
+
'greater-than' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
550 |
+
'greater-than-equal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
551 |
+
'grimace' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
552 |
+
'grin' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
553 |
+
'grin-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
554 |
+
'grin-beam' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
555 |
+
'grin-beam-sweat' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
556 |
+
'grin-hearts' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
557 |
+
'grin-squint' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
558 |
+
'grin-squint-tears' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
559 |
+
'grin-stars' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
560 |
+
'grin-tears' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
561 |
+
'grin-tongue' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
562 |
+
'grin-tongue-squint' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
563 |
+
'grin-tongue-wink' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
564 |
+
'grin-wink' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
565 |
+
'grip-horizontal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
566 |
+
'grip-lines' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
567 |
+
'grip-lines-vertical' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
568 |
+
'grip-vertical' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
569 |
+
'gripfire' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
570 |
+
'grunt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
571 |
+
'guitar' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
572 |
+
'gulp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
573 |
+
'h-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
574 |
+
'hacker-news' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
575 |
+
'hacker-news-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
576 |
+
'hackerrank' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
577 |
+
'hammer' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
578 |
+
'hamsa' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
579 |
+
'hand-holding' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
580 |
+
'hand-holding-heart' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
581 |
+
'hand-holding-usd' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
582 |
+
'hand-lizard' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
583 |
+
'hand-paper' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
584 |
+
'hand-peace' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
585 |
+
'hand-point-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
586 |
+
'hand-point-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
587 |
+
'hand-point-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
588 |
+
'hand-point-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
589 |
+
'hand-pointer' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
590 |
+
'hand-rock' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
591 |
+
'hand-scissors' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
592 |
+
'hand-spock' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
593 |
+
'hands' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
594 |
+
'hands-helping' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
595 |
+
'handshake' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
596 |
+
'hanukiah' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
597 |
+
'hashtag' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
598 |
+
'hat-wizard' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
599 |
+
'haykal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
600 |
+
'hdd' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
601 |
+
'heading' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
602 |
+
'headphones' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
603 |
+
'headphones-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
604 |
+
'headset' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
605 |
+
'heart' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
606 |
+
'heart-broken' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
607 |
+
'heartbeat' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
608 |
+
'helicopter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
609 |
+
'highlighter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
610 |
+
'hiking' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
611 |
+
'hippo' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
612 |
+
'hips' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
613 |
+
'hire-a-helper' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
614 |
+
'history' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
615 |
+
'hockey-puck' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
616 |
+
'holly-berry' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
617 |
+
'home' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
618 |
+
'hooli' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
619 |
+
'hornbill' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
620 |
+
'horse' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
621 |
+
'horse-head' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
622 |
+
'hospital' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
623 |
+
'hospital-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
624 |
+
'hospital-symbol' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
625 |
+
'hot-tub' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
626 |
+
'hotel' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
627 |
+
'hotjar' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
628 |
+
'hourglass' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
629 |
+
'hourglass-end' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
630 |
+
'hourglass-half' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
631 |
+
'hourglass-start' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
632 |
+
'house-damage' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
633 |
+
'houzz' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
634 |
+
'hryvnia' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
635 |
+
'html5' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
636 |
+
'hubspot' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
637 |
+
'i-cursor' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
638 |
+
'icicles' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
639 |
+
'id-badge' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
640 |
+
'id-card' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
641 |
+
'id-card-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
642 |
+
'igloo' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
643 |
+
'image' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
644 |
+
'images' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
645 |
+
'imdb' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
646 |
+
'inbox' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
647 |
+
'indent' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
648 |
+
'industry' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
649 |
+
'infinity' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
650 |
+
'info' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
651 |
+
'info-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
652 |
+
'instagram' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
653 |
+
'intercom' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
654 |
+
'internet-explorer' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
655 |
+
'invision' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
656 |
+
'ioxhost' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
657 |
+
'italic' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
658 |
+
'itunes' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
659 |
+
'itunes-note' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
660 |
+
'java' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
661 |
+
'jedi' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
662 |
+
'jedi-order' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
663 |
+
'jenkins' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
664 |
+
'jira' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
665 |
+
'joget' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
666 |
+
'joint' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
667 |
+
'joomla' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
668 |
+
'journal-whills' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
669 |
+
'js' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
670 |
+
'js-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
671 |
+
'jsfiddle' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
672 |
+
'kaaba' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
673 |
+
'kaggle' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
674 |
+
'key' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
675 |
+
'keybase' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
676 |
+
'keyboard' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
677 |
+
'keycdn' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
678 |
+
'khanda' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
679 |
+
'kickstarter' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
680 |
+
'kickstarter-k' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
681 |
+
'kiss' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
682 |
+
'kiss-beam' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
683 |
+
'kiss-wink-heart' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
684 |
+
'kiwi-bird' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
685 |
+
'korvue' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
686 |
+
'landmark' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
687 |
+
'language' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
688 |
+
'laptop' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
689 |
+
'laptop-code' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
690 |
+
'laravel' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
691 |
+
'lastfm' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
692 |
+
'lastfm-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
693 |
+
'laugh' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
694 |
+
'laugh-beam' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
695 |
+
'laugh-squint' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
696 |
+
'laugh-wink' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
697 |
+
'layer-group' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
698 |
+
'leaf' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
699 |
+
'leanpub' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
700 |
+
'lemon' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
701 |
+
'less' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
702 |
+
'less-than' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
703 |
+
'less-than-equal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
704 |
+
'level-down-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
705 |
+
'level-up-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
706 |
+
'life-ring' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
707 |
+
'lightbulb' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
708 |
+
'line' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
709 |
+
'link' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
710 |
+
'linkedin' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
711 |
+
'linkedin-in' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
712 |
+
'linode' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
713 |
+
'linux' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
714 |
+
'lira-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
715 |
+
'list' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
716 |
+
'list-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
717 |
+
'list-ol' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
718 |
+
'list-ul' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
719 |
+
'location-arrow' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
720 |
+
'lock' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
721 |
+
'lock-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
722 |
+
'long-arrow-alt-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
723 |
+
'long-arrow-alt-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
724 |
+
'long-arrow-alt-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
725 |
+
'long-arrow-alt-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
726 |
+
'low-vision' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
727 |
+
'luggage-cart' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
728 |
+
'lyft' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
729 |
+
'magento' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
730 |
+
'magic' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
731 |
+
'magnet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
732 |
+
'mail-bulk' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
733 |
+
'mailchimp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
734 |
+
'male' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
735 |
+
'mandalorian' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
736 |
+
'map' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
737 |
+
'map-marked' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
738 |
+
'map-marked-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
739 |
+
'map-marker' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
740 |
+
'map-marker-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
741 |
+
'map-pin' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
742 |
+
'map-signs' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
743 |
+
'markdown' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
744 |
+
'marker' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
745 |
+
'mars' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
746 |
+
'mars-double' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
747 |
+
'mars-stroke' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
748 |
+
'mars-stroke-h' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
749 |
+
'mars-stroke-v' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
750 |
+
'mask' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
751 |
+
'mastodon' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
752 |
+
'maxcdn' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
753 |
+
'medal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
754 |
+
'medapps' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
755 |
+
'medium' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
756 |
+
'medium-m' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
757 |
+
'medkit' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
758 |
+
'medrt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
759 |
+
'meetup' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
760 |
+
'megaport' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
761 |
+
'meh' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
762 |
+
'meh-blank' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
763 |
+
'meh-rolling-eyes' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
764 |
+
'memory' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
765 |
+
'mendeley' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
766 |
+
'menorah' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
767 |
+
'mercury' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
768 |
+
'meteor' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
769 |
+
'microchip' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
770 |
+
'microphone' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
771 |
+
'microphone-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
772 |
+
'microphone-alt-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
773 |
+
'microphone-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
774 |
+
'microscope' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
775 |
+
'microsoft' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
776 |
+
'minus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
777 |
+
'minus-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
778 |
+
'minus-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
779 |
+
'mitten' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
780 |
+
'mix' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
781 |
+
'mixcloud' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
782 |
+
'mizuni' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
783 |
+
'mobile' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
784 |
+
'mobile-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
785 |
+
'modx' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
786 |
+
'monero' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
787 |
+
'money-bill' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
788 |
+
'money-bill-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
789 |
+
'money-bill-wave' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
790 |
+
'money-bill-wave-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
791 |
+
'money-check' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
792 |
+
'money-check-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
793 |
+
'monument' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
794 |
+
'moon' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
795 |
+
'mortar-pestle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
796 |
+
'mosque' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
797 |
+
'motorcycle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
798 |
+
'mountain' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
799 |
+
'mouse-pointer' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
800 |
+
'mug-hot' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
801 |
+
'music' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
802 |
+
'napster' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
803 |
+
'neos' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
804 |
+
'network-wired' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
805 |
+
'neuter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
806 |
+
'newspaper' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
807 |
+
'nimblr' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
808 |
+
'nintendo-switch' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
809 |
+
'node' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
810 |
+
'node-js' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
811 |
+
'not-equal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
812 |
+
'notes-medical' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
813 |
+
'npm' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
814 |
+
'ns8' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
815 |
+
'nutritionix' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
816 |
+
'object-group' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
817 |
+
'object-ungroup' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
818 |
+
'odnoklassniki' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
819 |
+
'odnoklassniki-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
820 |
+
'oil-can' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
821 |
+
'old-republic' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
822 |
+
'om' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
823 |
+
'opencart' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
824 |
+
'openid' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
825 |
+
'opera' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
826 |
+
'optin-monster' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
827 |
+
'osi' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
828 |
+
'otter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
829 |
+
'outdent' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
830 |
+
'page4' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
831 |
+
'pagelines' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
832 |
+
'paint-brush' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
833 |
+
'paint-roller' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
834 |
+
'palette' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
835 |
+
'palfed' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
836 |
+
'pallet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
837 |
+
'paper-plane' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
838 |
+
'paperclip' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
839 |
+
'parachute-box' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
840 |
+
'paragraph' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
841 |
+
'parking' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
842 |
+
'passport' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
843 |
+
'pastafarianism' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
844 |
+
'paste' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
845 |
+
'patreon' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
846 |
+
'pause' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
847 |
+
'pause-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
848 |
+
'paw' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
849 |
+
'paypal' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
850 |
+
'peace' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
851 |
+
'pen' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
852 |
+
'pen-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
853 |
+
'pen-fancy' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
854 |
+
'pen-nib' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
855 |
+
'pen-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
856 |
+
'pencil-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
857 |
+
'pencil-ruler' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
858 |
+
'penny-arcade' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
859 |
+
'people-carry' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
860 |
+
'percent' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
861 |
+
'percentage' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
862 |
+
'periscope' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
863 |
+
'person-booth' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
864 |
+
'phabricator' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
865 |
+
'phoenix-framework' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
866 |
+
'phoenix-squadron' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
867 |
+
'phone' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
868 |
+
'phone-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
869 |
+
'phone-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
870 |
+
'phone-volume' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
871 |
+
'php' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
872 |
+
'pied-piper' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
873 |
+
'pied-piper-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
874 |
+
'pied-piper-hat' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
875 |
+
'pied-piper-pp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
876 |
+
'piggy-bank' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
877 |
+
'pills' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
878 |
+
'pinterest' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
879 |
+
'pinterest-p' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
880 |
+
'pinterest-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
881 |
+
'place-of-worship' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
882 |
+
'plane' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
883 |
+
'plane-arrival' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
884 |
+
'plane-departure' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
885 |
+
'play' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
886 |
+
'play-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
887 |
+
'playstation' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
888 |
+
'plug' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
889 |
+
'plus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
890 |
+
'plus-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
891 |
+
'plus-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
892 |
+
'podcast' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
893 |
+
'poll' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
894 |
+
'poll-h' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
895 |
+
'poo' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
896 |
+
'poo-storm' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
897 |
+
'poop' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
898 |
+
'portrait' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
899 |
+
'pound-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
900 |
+
'power-off' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
901 |
+
'pray' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
902 |
+
'praying-hands' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
903 |
+
'prescription' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
904 |
+
'prescription-bottle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
905 |
+
'prescription-bottle-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
906 |
+
'print' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
907 |
+
'procedures' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
908 |
+
'product-hunt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
909 |
+
'project-diagram' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
910 |
+
'pushed' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
911 |
+
'puzzle-piece' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
912 |
+
'python' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
913 |
+
'qq' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
914 |
+
'qrcode' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
915 |
+
'question' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
916 |
+
'question-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
917 |
+
'quidditch' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
918 |
+
'quinscape' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
919 |
+
'quora' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
920 |
+
'quote-left' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
921 |
+
'quote-right' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
922 |
+
'quran' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
923 |
+
'r-project' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
924 |
+
'radiation' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
925 |
+
'radiation-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
926 |
+
'rainbow' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
927 |
+
'random' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
928 |
+
'raspberry-pi' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
929 |
+
'ravelry' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
930 |
+
'react' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
931 |
+
'reacteurope' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
932 |
+
'readme' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
933 |
+
'rebel' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
934 |
+
'receipt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
935 |
+
'recycle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
936 |
+
'red-river' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
937 |
+
'reddit' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
938 |
+
'reddit-alien' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
939 |
+
'reddit-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
940 |
+
'redhat' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
941 |
+
'redo' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
942 |
+
'redo-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
943 |
+
'registered' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
944 |
+
'renren' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
945 |
+
'reply' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
946 |
+
'reply-all' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
947 |
+
'replyd' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
948 |
+
'republican' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
949 |
+
'researchgate' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
950 |
+
'resolving' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
951 |
+
'restroom' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
952 |
+
'retweet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
953 |
+
'rev' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
954 |
+
'ribbon' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
955 |
+
'ring' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
956 |
+
'road' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
957 |
+
'robot' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
958 |
+
'rocket' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
959 |
+
'rocketchat' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
960 |
+
'rockrms' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
961 |
+
'route' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
962 |
+
'rss' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
963 |
+
'rss-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
964 |
+
'ruble-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
965 |
+
'ruler' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
966 |
+
'ruler-combined' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
967 |
+
'ruler-horizontal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
968 |
+
'ruler-vertical' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
969 |
+
'running' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
970 |
+
'rupee-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
971 |
+
'sad-cry' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
972 |
+
'sad-tear' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
973 |
+
'safari' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
974 |
+
'sass' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
975 |
+
'satellite' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
976 |
+
'satellite-dish' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
977 |
+
'save' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
978 |
+
'schlix' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
979 |
+
'school' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
980 |
+
'screwdriver' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
981 |
+
'scribd' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
982 |
+
'scroll' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
983 |
+
'sd-card' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
984 |
+
'search' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
985 |
+
'search-dollar' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
986 |
+
'search-location' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
987 |
+
'search-minus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
988 |
+
'search-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
989 |
+
'searchengin' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
990 |
+
'seedling' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
991 |
+
'sellcast' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
992 |
+
'sellsy' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
993 |
+
'server' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
994 |
+
'servicestack' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
995 |
+
'shapes' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
996 |
+
'share' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
997 |
+
'share-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
998 |
+
'share-alt-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
999 |
+
'share-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1000 |
+
'shekel-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1001 |
+
'shield-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1002 |
+
'ship' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1003 |
+
'shipping-fast' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1004 |
+
'shirtsinbulk' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1005 |
+
'shoe-prints' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1006 |
+
'shopping-bag' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1007 |
+
'shopping-basket' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1008 |
+
'shopping-cart' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1009 |
+
'shopware' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1010 |
+
'shower' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1011 |
+
'shuttle-van' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1012 |
+
'sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1013 |
+
'sign-in-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1014 |
+
'sign-language' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1015 |
+
'sign-out-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1016 |
+
'signal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1017 |
+
'signature' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1018 |
+
'sim-card' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1019 |
+
'simplybuilt' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1020 |
+
'sistrix' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1021 |
+
'sitemap' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1022 |
+
'sith' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1023 |
+
'skating' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1024 |
+
'sketch' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1025 |
+
'skiing' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1026 |
+
'skiing-nordic' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1027 |
+
'skull' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1028 |
+
'skull-crossbones' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1029 |
+
'skyatlas' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1030 |
+
'skype' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1031 |
+
'slack' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1032 |
+
'slack-hash' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1033 |
+
'slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1034 |
+
'sleigh' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1035 |
+
'sliders-h' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1036 |
+
'slideshare' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1037 |
+
'smile' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1038 |
+
'smile-beam' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1039 |
+
'smile-wink' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1040 |
+
'smog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1041 |
+
'smoking' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1042 |
+
'smoking-ban' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1043 |
+
'sms' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1044 |
+
'snapchat' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1045 |
+
'snapchat-ghost' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1046 |
+
'snapchat-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1047 |
+
'snowboarding' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1048 |
+
'snowflake' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1049 |
+
'snowman' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1050 |
+
'snowplow' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1051 |
+
'socks' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1052 |
+
'solar-panel' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1053 |
+
'sort' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1054 |
+
'sort-alpha-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1055 |
+
'sort-alpha-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1056 |
+
'sort-amount-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1057 |
+
'sort-amount-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1058 |
+
'sort-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1059 |
+
'sort-numeric-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1060 |
+
'sort-numeric-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1061 |
+
'sort-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1062 |
+
'soundcloud' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1063 |
+
'sourcetree' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1064 |
+
'spa' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1065 |
+
'space-shuttle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1066 |
+
'speakap' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1067 |
+
'spider' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1068 |
+
'spinner' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1069 |
+
'splotch' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1070 |
+
'spotify' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1071 |
+
'spray-can' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1072 |
+
'square' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1073 |
+
'square-full' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1074 |
+
'square-root-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1075 |
+
'squarespace' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1076 |
+
'stack-exchange' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1077 |
+
'stack-overflow' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1078 |
+
'stamp' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1079 |
+
'star' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1080 |
+
'star-and-crescent' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1081 |
+
'star-half' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1082 |
+
'star-half-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1083 |
+
'star-of-david' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1084 |
+
'star-of-life' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1085 |
+
'staylinked' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1086 |
+
'steam' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1087 |
+
'steam-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1088 |
+
'steam-symbol' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1089 |
+
'step-backward' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1090 |
+
'step-forward' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1091 |
+
'stethoscope' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1092 |
+
'sticker-mule' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1093 |
+
'sticky-note' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1094 |
+
'stop' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1095 |
+
'stop-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1096 |
+
'stopwatch' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1097 |
+
'store' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1098 |
+
'store-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1099 |
+
'strava' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1100 |
+
'stream' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1101 |
+
'street-view' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1102 |
+
'strikethrough' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1103 |
+
'stripe' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1104 |
+
'stripe-s' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1105 |
+
'stroopwafel' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1106 |
+
'studiovinari' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1107 |
+
'stumbleupon' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1108 |
+
'stumbleupon-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1109 |
+
'subscript' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1110 |
+
'subway' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1111 |
+
'suitcase' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1112 |
+
'suitcase-rolling' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1113 |
+
'sun' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1114 |
+
'superpowers' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1115 |
+
'superscript' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1116 |
+
'supple' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1117 |
+
'surprise' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1118 |
+
'suse' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1119 |
+
'swatchbook' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1120 |
+
'swimmer' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1121 |
+
'swimming-pool' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1122 |
+
'synagogue' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1123 |
+
'sync' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1124 |
+
'sync-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1125 |
+
'syringe' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1126 |
+
'table' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1127 |
+
'table-tennis' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1128 |
+
'tablet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1129 |
+
'tablet-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1130 |
+
'tablets' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1131 |
+
'tachometer-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1132 |
+
'tag' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1133 |
+
'tags' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1134 |
+
'tape' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1135 |
+
'tasks' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1136 |
+
'taxi' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1137 |
+
'teamspeak' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1138 |
+
'teeth' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1139 |
+
'teeth-open' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1140 |
+
'telegram' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1141 |
+
'telegram-plane' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1142 |
+
'temperature-high' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1143 |
+
'temperature-low' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1144 |
+
'tencent-weibo' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1145 |
+
'tenge' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1146 |
+
'terminal' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1147 |
+
'text-height' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1148 |
+
'text-width' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1149 |
+
'th' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1150 |
+
'th-large' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1151 |
+
'th-list' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1152 |
+
'the-red-yeti' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1153 |
+
'theater-masks' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1154 |
+
'themeco' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1155 |
+
'themeisle' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1156 |
+
'thermometer' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1157 |
+
'thermometer-empty' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1158 |
+
'thermometer-full' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1159 |
+
'thermometer-half' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1160 |
+
'thermometer-quarter' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1161 |
+
'thermometer-three-quarters' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1162 |
+
'think-peaks' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1163 |
+
'thumbs-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1164 |
+
'thumbs-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1165 |
+
'thumbtack' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1166 |
+
'ticket-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1167 |
+
'times' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1168 |
+
'times-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1169 |
+
'tint' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1170 |
+
'tint-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1171 |
+
'tired' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1172 |
+
'toggle-off' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1173 |
+
'toggle-on' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1174 |
+
'toilet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1175 |
+
'toilet-paper' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1176 |
+
'toolbox' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1177 |
+
'tools' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1178 |
+
'tooth' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1179 |
+
'torah' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1180 |
+
'torii-gate' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1181 |
+
'tractor' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1182 |
+
'trade-federation' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1183 |
+
'trademark' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1184 |
+
'traffic-light' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1185 |
+
'train' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1186 |
+
'tram' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1187 |
+
'transgender' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1188 |
+
'transgender-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1189 |
+
'trash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1190 |
+
'trash-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1191 |
+
'tree' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1192 |
+
'trello' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1193 |
+
'tripadvisor' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1194 |
+
'trophy' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1195 |
+
'truck' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1196 |
+
'truck-loading' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1197 |
+
'truck-monster' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1198 |
+
'truck-moving' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1199 |
+
'truck-pickup' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1200 |
+
'tshirt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1201 |
+
'tty' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1202 |
+
'tumblr' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1203 |
+
'tumblr-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1204 |
+
'tv' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1205 |
+
'twitch' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1206 |
+
'twitter' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1207 |
+
'twitter-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1208 |
+
'typo3' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1209 |
+
'uber' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1210 |
+
'ubuntu' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1211 |
+
'uikit' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1212 |
+
'umbrella' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1213 |
+
'umbrella-beach' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1214 |
+
'underline' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1215 |
+
'undo' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1216 |
+
'undo-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1217 |
+
'uniregistry' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1218 |
+
'universal-access' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1219 |
+
'university' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1220 |
+
'unlink' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1221 |
+
'unlock' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1222 |
+
'unlock-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1223 |
+
'untappd' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1224 |
+
'upload' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1225 |
+
'ups' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1226 |
+
'usb' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1227 |
+
'user' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1228 |
+
'user-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1229 |
+
'user-alt-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1230 |
+
'user-astronaut' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1231 |
+
'user-check' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1232 |
+
'user-circle' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1233 |
+
'user-clock' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1234 |
+
'user-cog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1235 |
+
'user-edit' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1236 |
+
'user-friends' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1237 |
+
'user-graduate' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1238 |
+
'user-injured' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1239 |
+
'user-lock' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1240 |
+
'user-md' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1241 |
+
'user-minus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1242 |
+
'user-ninja' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1243 |
+
'user-plus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1244 |
+
'user-secret' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1245 |
+
'user-shield' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1246 |
+
'user-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1247 |
+
'user-tag' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1248 |
+
'user-tie' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1249 |
+
'user-times' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1250 |
+
'users' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1251 |
+
'users-cog' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1252 |
+
'usps' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1253 |
+
'ussunnah' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1254 |
+
'utensil-spoon' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1255 |
+
'utensils' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1256 |
+
'vaadin' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1257 |
+
'vector-square' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1258 |
+
'venus' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1259 |
+
'venus-double' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1260 |
+
'venus-mars' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1261 |
+
'viacoin' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1262 |
+
'viadeo' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1263 |
+
'viadeo-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1264 |
+
'vial' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1265 |
+
'vials' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1266 |
+
'viber' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1267 |
+
'video' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1268 |
+
'video-slash' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1269 |
+
'vihara' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1270 |
+
'vimeo' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1271 |
+
'vimeo-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1272 |
+
'vimeo-v' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1273 |
+
'vine' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1274 |
+
'vk' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1275 |
+
'vnv' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1276 |
+
'volleyball-ball' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1277 |
+
'volume-down' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1278 |
+
'volume-mute' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1279 |
+
'volume-off' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1280 |
+
'volume-up' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1281 |
+
'vote-yea' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1282 |
+
'vr-cardboard' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1283 |
+
'vuejs' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1284 |
+
'walking' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1285 |
+
'wallet' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1286 |
+
'warehouse' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1287 |
+
'water' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1288 |
+
'weebly' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1289 |
+
'weibo' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1290 |
+
'weight' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1291 |
+
'weight-hanging' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1292 |
+
'weixin' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1293 |
+
'whatsapp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1294 |
+
'whatsapp-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1295 |
+
'wheelchair' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1296 |
+
'whmcs' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1297 |
+
'wifi' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1298 |
+
'wikipedia-w' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1299 |
+
'wind' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1300 |
+
'window-close' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1301 |
+
'window-maximize' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1302 |
+
'window-minimize' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1303 |
+
'window-restore' => array( 'unicode' => '', 'styles' => array( 'sow-fas', 'sow-far' ), ),
|
1304 |
+
'windows' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1305 |
+
'wine-bottle' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1306 |
+
'wine-glass' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1307 |
+
'wine-glass-alt' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1308 |
+
'wix' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1309 |
+
'wizards-of-the-coast' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1310 |
+
'wolf-pack-battalion' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1311 |
+
'won-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1312 |
+
'wordpress' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1313 |
+
'wordpress-simple' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1314 |
+
'wpbeginner' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1315 |
+
'wpexplorer' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1316 |
+
'wpforms' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1317 |
+
'wpressr' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1318 |
+
'wrench' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1319 |
+
'x-ray' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1320 |
+
'xbox' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1321 |
+
'xing' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1322 |
+
'xing-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1323 |
+
'y-combinator' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1324 |
+
'yahoo' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1325 |
+
'yandex' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1326 |
+
'yandex-international' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1327 |
+
'yarn' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1328 |
+
'yelp' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1329 |
+
'yen-sign' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1330 |
+
'yin-yang' => array( 'unicode' => '', 'styles' => array( 'sow-fas' ), ),
|
1331 |
+
'yoast' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1332 |
+
'youtube' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1333 |
+
'youtube-square' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1334 |
+
'zhihu' => array( 'unicode' => '', 'styles' => array( 'sow-fab' ), ),
|
1335 |
+
));
|
1336 |
+
}
|
1337 |
+
add_filter('siteorigin_widgets_icons_fontawesome', 'siteorigin_widgets_icons_fontawesome_filter');
|
1338 |
+
|
1339 |
+
function siteorigin_widgets_icon_styles_fontawesome_filter( $styles ) {
|
1340 |
+
return array_merge( $styles, array(
|
1341 |
+
'sow-fab' => __( 'Brands', 'so-widgets-bundle' ),
|
1342 |
+
'sow-far' => __( 'Regular', 'so-widgets-bundle' ),
|
1343 |
+
'sow-fas' => __( 'Solid', 'so-widgets-bundle' ),
|
1344 |
+
) );
|
1345 |
+
}
|
1346 |
+
|
1347 |
+
add_filter('siteorigin_widgets_icon_styles_fontawesome', 'siteorigin_widgets_icon_styles_fontawesome_filter');
|
1348 |
+
|
1349 |
+
function siteorigin_widgets_icon_migrate_fontawesome( $icon_data ) {
|
1350 |
+
|
1351 |
+
// Previous versions of FontAwesome didn't use 'style'.
|
1352 |
+
if ( ! empty( $icon_data ) && ! isset( $icon_data['style'] ) ) {
|
1353 |
+
|
1354 |
+
$name_map = siteorigin_widgets_icon_migrate_fontawesome_name_map();
|
1355 |
+
|
1356 |
+
if ( isset( $name_map[ $icon_data['icon'] ] ) ) {
|
1357 |
+
if ( preg_match( '/\-o\b/', $icon_data['icon'] ) ) {
|
1358 |
+
$icon_data['style'] = 'sow-far';
|
1359 |
+
}
|
1360 |
+
$icon_data['icon'] = $name_map[ $icon_data['icon'] ];
|
1361 |
+
}
|
1362 |
+
if ( empty( $icon_data['style'] ) ) {
|
1363 |
+
$icons = apply_filters( 'siteorigin_widgets_icons_fontawesome', array() );
|
1364 |
+
if ( ! empty( $icons[ $icon_data['icon'] ] ) && ! empty( $icons[ $icon_data['icon'] ]['styles'] ) ) {
|
1365 |
+
$icon_data['style'] = $icons[ $icon_data['icon'] ]['styles'][0];
|
1366 |
+
} else {
|
1367 |
+
$icon_data['style'] = 'sow-fas';
|
1368 |
+
}
|
1369 |
+
}
|
1370 |
+
}
|
1371 |
+
return $icon_data;
|
1372 |
+
}
|
1373 |
+
|
1374 |
+
add_filter( 'siteorigin_widgets_icon_migrate_fontawesome', 'siteorigin_widgets_icon_migrate_fontawesome' );
|
1375 |
+
|
1376 |
+
function siteorigin_widgets_icon_migrate_fontawesome_name_map() {
|
1377 |
+
return array(
|
1378 |
+
'address-book-o' => 'address-book',
|
1379 |
+
'address-card-o' => 'address-card',
|
1380 |
+
'area-chart' => 'chart-area',
|
1381 |
+
'arrow-circle-o-down' => 'arrow-alt-circle-down',
|
1382 |
+
'arrow-circle-o-left' => 'arrow-alt-circle-left',
|
1383 |
+
'arrow-circle-o-right' => 'arrow-alt-circle-right',
|
1384 |
+
'arrow-circle-o-up' => 'arrow-alt-circle-up',
|
1385 |
+
'arrows' => 'arrows-alt',
|
1386 |
+
'arrows-alt' => 'expand-arrows-alt',
|
1387 |
+
'arrows-h' => 'arrows-alt-h',
|
1388 |
+
'arrows-v' => 'arrows-alt-v',
|
1389 |
+
'asl-interpreting' => 'american-sign-language-interpreting',
|
1390 |
+
'automobile' => 'car',
|
1391 |
+
'bank' => 'university',
|
1392 |
+
'bar-chart' => 'chart-bar',
|
1393 |
+
'bar-chart-o' => 'chart-bar',
|
1394 |
+
'bathtub' => 'bath',
|
1395 |
+
'battery' => 'battery-full',
|
1396 |
+
'battery-0' => 'battery-empty',
|
1397 |
+
'battery-1' => 'battery-quarter',
|
1398 |
+
'battery-2' => 'battery-half',
|
1399 |
+
'battery-3' => 'battery-three-quarters',
|
1400 |
+
'battery-4' => 'battery-full',
|
1401 |
+
'bell-o' => 'bell',
|
1402 |
+
'bell-slash-o' => 'bell-slash',
|
1403 |
+
'bitbucket-square' => 'bitbucket',
|
1404 |
+
'bitcoin' => 'btc',
|
1405 |
+
'bookmark-o' => 'bookmark',
|
1406 |
+
'building-o' => 'building',
|
1407 |
+
'cab' => 'taxi',
|
1408 |
+
'calendar' => 'calendar-alt',
|
1409 |
+
'calendar-check-o' => 'calendar-check',
|
1410 |
+
'calendar-minus-o' => 'calendar-minus',
|
1411 |
+
'calendar-o' => 'calendar',
|
1412 |
+
'calendar-plus-o' => 'calendar-plus',
|
1413 |
+
'calendar-times-o' => 'calendar-times',
|
1414 |
+
'caret-square-o-down' => 'caret-square-down',
|
1415 |
+
'caret-square-o-left' => 'caret-square-left',
|
1416 |
+
'caret-square-o-right' => 'caret-square-right',
|
1417 |
+
'caret-square-o-up' => 'caret-square-up',
|
1418 |
+
'cc' => 'closed-captioning',
|
1419 |
+
'chain' => 'link',
|
1420 |
+
'chain-broken' => 'unlink',
|
1421 |
+
'check-circle-o' => 'check-circle',
|
1422 |
+
'check-square-o' => 'check-square',
|
1423 |
+
'circle-o' => 'circle',
|
1424 |
+
'circle-o-notch' => 'circle-notch',
|
1425 |
+
'circle-thin' => 'circle',
|
1426 |
+
'clock-o' => 'clock',
|
1427 |
+
'close' => 'times',
|
1428 |
+
'cloud-download' => 'cloud-download-alt',
|
1429 |
+
'cloud-upload' => 'cloud-upload-alt',
|
1430 |
+
'cny' => 'yen-sign',
|
1431 |
+
'code-fork' => 'code-branch',
|
1432 |
+
'comment-o' => 'comment',
|
1433 |
+
'commenting' => 'comment-dots',
|
1434 |
+
'commenting-o' => 'comment-dots',
|
1435 |
+
'comments-o' => 'comments',
|
1436 |
+
'credit-card-alt' => 'credit-card',
|
1437 |
+
'cutlery' => 'utensils',
|
1438 |
+
'dashboard' => 'tachometer-alt',
|
1439 |
+
'deafness' => 'deaf',
|
1440 |
+
'dedent' => 'outdent',
|
1441 |
+
'diamond' => 'gem',
|
1442 |
+
'dollar' => 'dollar-sign',
|
1443 |
+
'dot-circle-o' => 'dot-circle',
|
1444 |
+
'drivers-license' => 'id-card',
|
1445 |
+
'drivers-license-o' => 'id-card',
|
1446 |
+
'eercast' => 'sellcast',
|
1447 |
+
'envelope-o' => 'envelope',
|
1448 |
+
'envelope-open-o' => 'envelope-open',
|
1449 |
+
'eur' => 'euro-sign',
|
1450 |
+
'euro' => 'euro-sign',
|
1451 |
+
'exchange' => 'exchange-alt',
|
1452 |
+
'external-link' => 'external-link-alt',
|
1453 |
+
'external-link-square' => 'external-link-square-alt',
|
1454 |
+
'eyedropper' => 'eye-dropper',
|
1455 |
+
'fa' => 'font-awesome',
|
1456 |
+
'facebook' => 'facebook-f',
|
1457 |
+
'facebook-official' => 'facebook',
|
1458 |
+
'feed' => 'rss',
|
1459 |
+
'file-archive-o' => 'file-archive',
|
1460 |
+
'file-audio-o' => 'file-audio',
|
1461 |
+
'file-code-o' => 'file-code',
|
1462 |
+
'file-excel-o' => 'file-excel',
|
1463 |
+
'file-image-o' => 'file-image',
|
1464 |
+
'file-movie-o' => 'file-video',
|
1465 |
+
'file-o' => 'file',
|
1466 |
+
'file-pdf-o' => 'file-pdf',
|
1467 |
+
'file-photo-o' => 'file-image',
|
1468 |
+
'file-picture-o' => 'file-image',
|
1469 |
+
'file-powerpoint-o' => 'file-powerpoint',
|
1470 |
+
'file-sound-o' => 'file-audio',
|
1471 |
+
'file-text' => 'file-alt',
|
1472 |
+
'file-text-o' => 'file-alt',
|
1473 |
+
'file-video-o' => 'file-video',
|
1474 |
+
'file-word-o' => 'file-word',
|
1475 |
+
'file-zip-o' => 'file-archive',
|
1476 |
+
'files-o' => 'copy',
|
1477 |
+
'flag-o' => 'flag',
|
1478 |
+
'flash' => 'bolt',
|
1479 |
+
'floppy-o' => 'save',
|
1480 |
+
'folder-o' => 'folder',
|
1481 |
+
'folder-open-o' => 'folder-open',
|
1482 |
+
'frown-o' => 'frown',
|
1483 |
+
'futbol-o' => 'futbol',
|
1484 |
+
'gbp' => 'pound-sign',
|
1485 |
+
'ge' => 'empire',
|
1486 |
+
'gear' => 'cog',
|
1487 |
+
'gears' => 'cogs',
|
1488 |
+
'gittip' => 'gratipay',
|
1489 |
+
'glass' => 'glass-martini',
|
1490 |
+
'google-plus' => 'google-plus-g',
|
1491 |
+
'google-plus-circle' => 'google-plus',
|
1492 |
+
'google-plus-official' => 'google-plus',
|
1493 |
+
'google-plus-square' => 'google-plus-square',
|
1494 |
+
'group' => 'users',
|
1495 |
+
'hand-grab-o' => 'hand-rock',
|
1496 |
+
'hand-lizard-o' => 'hand-lizard',
|
1497 |
+
'hand-o-down' => 'hand-point-down',
|
1498 |
+
'hand-o-left' => 'hand-point-left',
|
1499 |
+
'hand-o-right' => 'hand-point-right',
|
1500 |
+
'hand-o-up' => 'hand-point-up',
|
1501 |
+
'hand-paper-o' => 'hand-paper',
|
1502 |
+
'hand-peace-o' => 'hand-peace',
|
1503 |
+
'hand-pointer-o' => 'hand-pointer',
|
1504 |
+
'hand-rock-o' => 'hand-rock',
|
1505 |
+
'hand-scissors-o' => 'hand-scissors',
|
1506 |
+
'hand-spock-o' => 'hand-spock',
|
1507 |
+
'hand-stop-o' => 'hand-paper',
|
1508 |
+
'handshake-o' => 'handshake',
|
1509 |
+
'hard-of-hearing' => 'deaf',
|
1510 |
+
'hdd-o' => 'hdd',
|
1511 |
+
'header' => 'heading',
|
1512 |
+
'heart-o' => 'heart',
|
1513 |
+
'hospital-o' => 'hospital',
|
1514 |
+
'hotel' => 'bed',
|
1515 |
+
'hourglass-1' => 'hourglass-start',
|
1516 |
+
'hourglass-2' => 'hourglass-half',
|
1517 |
+
'hourglass-3' => 'hourglass-end',
|
1518 |
+
'hourglass-o' => 'hourglass',
|
1519 |
+
'id-card-o' => 'id-card',
|
1520 |
+
'ils' => 'shekel-sign',
|
1521 |
+
'inr' => 'rupee-sign',
|
1522 |
+
'institution' => 'university',
|
1523 |
+
'intersex' => 'transgender',
|
1524 |
+
'jpy' => 'yen-sign',
|
1525 |
+
'keyboard-o' => 'keyboard',
|
1526 |
+
'krw' => 'won-sign',
|
1527 |
+
'legal' => 'gavel',
|
1528 |
+
'lemon-o' => 'lemon',
|
1529 |
+
'level-down' => 'level-down-alt',
|
1530 |
+
'level-up' => 'level-up-alt',
|
1531 |
+
'life-bouy' => 'life-ring',
|
1532 |
+
'life-buoy' => 'life-ring',
|
1533 |
+
'life-saver' => 'life-ring',
|
1534 |
+
'lightbulb-o' => 'lightbulb',
|
1535 |
+
'line-chart' => 'chart-line',
|
1536 |
+
'linkedin' => 'linkedin-in',
|
1537 |
+
'linkedin-square' => 'linkedin',
|
1538 |
+
'long-arrow-down' => 'long-arrow-alt-down',
|
1539 |
+
'long-arrow-left' => 'long-arrow-alt-left',
|
1540 |
+
'long-arrow-right' => 'long-arrow-alt-right',
|
1541 |
+
'long-arrow-up' => 'long-arrow-alt-up',
|
1542 |
+
'mail-forward' => 'share',
|
1543 |
+
'mail-reply' => 'reply',
|
1544 |
+
'mail-reply-all' => 'reply-all',
|
1545 |
+
'map-marker' => 'map-marker-alt',
|
1546 |
+
'map-o' => 'map',
|
1547 |
+
'meanpath' => 'font-awesome',
|
1548 |
+
'meh-o' => 'meh',
|
1549 |
+
'minus-square-o' => 'minus-square',
|
1550 |
+
'mobile' => 'mobile-alt',
|
1551 |
+
'mobile-phone' => 'mobile-alt',
|
1552 |
+
'money' => 'money-bill-alt',
|
1553 |
+
'moon-o' => 'moon',
|
1554 |
+
'mortar-board' => 'graduation-cap',
|
1555 |
+
'navicon' => 'bars',
|
1556 |
+
'newspaper-o' => 'newspaper',
|
1557 |
+
'paper-plane-o' => 'paper-plane',
|
1558 |
+
'paste' => 'clipboard',
|
1559 |
+
'pause-circle-o' => 'pause-circle',
|
1560 |
+
'pencil' => 'pencil-alt',
|
1561 |
+
'pencil-square' => 'pen-square',
|
1562 |
+
'pencil-square-o' => 'edit',
|
1563 |
+
'photo' => 'image',
|
1564 |
+
'picture-o' => 'image',
|
1565 |
+
'pie-chart' => 'chart-pie',
|
1566 |
+
'play-circle-o' => 'play-circle',
|
1567 |
+
'plus-square-o' => 'plus-square',
|
1568 |
+
'question-circle-o' => 'question-circle',
|
1569 |
+
'ra' => 'rebel',
|
1570 |
+
'refresh' => 'sync',
|
1571 |
+
'remove' => 'times',
|
1572 |
+
'reorder' => 'bars',
|
1573 |
+
'repeat' => 'redo',
|
1574 |
+
'resistance' => 'rebel',
|
1575 |
+
'rmb' => 'yen-sign',
|
1576 |
+
'rotate-left' => 'undo',
|
1577 |
+
'rotate-right' => 'redo',
|
1578 |
+
'rouble' => 'ruble-sign',
|
1579 |
+
'rub' => 'ruble-sign',
|
1580 |
+
'ruble' => 'ruble-sign',
|
1581 |
+
'rupee' => 'rupee-sign',
|
1582 |
+
's15' => 'bath',
|
1583 |
+
'scissors' => 'cut',
|
1584 |
+
'send' => 'paper-plane',
|
1585 |
+
'send-o' => 'paper-plane',
|
1586 |
+
'share-square-o' => 'share-square',
|
1587 |
+
'shekel' => 'shekel-sign',
|
1588 |
+
'sheqel' => 'shekel-sign',
|
1589 |
+
'shield' => 'shield-alt',
|
1590 |
+
'sign-in' => 'sign-in-alt',
|
1591 |
+
'sign-out' => 'sign-out-alt',
|
1592 |
+
'signing' => 'sign-language',
|
1593 |
+
'sliders' => 'sliders-h',
|
1594 |
+
'smile-o' => 'smile',
|
1595 |
+
'snowflake-o' => 'snowflake',
|
1596 |
+
'soccer-ball-o' => 'futbol',
|
1597 |
+
'sort-alpha-asc' => 'sort-alpha-down',
|
1598 |
+
'sort-alpha-desc' => 'sort-alpha-up',
|
1599 |
+
'sort-amount-asc' => 'sort-amount-down',
|
1600 |
+
'sort-amount-desc' => 'sort-amount-up',
|
1601 |
+
'sort-asc' => 'sort-up',
|
1602 |
+
'sort-desc' => 'sort-down',
|
1603 |
+
'sort-numeric-asc' => 'sort-numeric-down',
|
1604 |
+
'sort-numeric-desc' => 'sort-numeric-up',
|
1605 |
+
'spoon' => 'utensil-spoon',
|
1606 |
+
'square-o' => 'square',
|
1607 |
+
'star-half-empty' => 'star-half',
|
1608 |
+
'star-half-full' => 'star-half',
|
1609 |
+
'star-half-o' => 'star-half',
|
1610 |
+
'star-o' => 'star',
|
1611 |
+
'sticky-note-o' => 'sticky-note',
|
1612 |
+
'stop-circle-o' => 'stop-circle',
|
1613 |
+
'sun-o' => 'sun',
|
1614 |
+
'support' => 'life-ring',
|
1615 |
+
'tablet' => 'tablet-alt',
|
1616 |
+
'tachometer' => 'tachometer-alt',
|
1617 |
+
'television' => 'tv',
|
1618 |
+
'thermometer' => 'thermometer-full',
|
1619 |
+
'thermometer-0' => 'thermometer-empty',
|
1620 |
+
'thermometer-1' => 'thermometer-quarter',
|
1621 |
+
'thermometer-2' => 'thermometer-half',
|
1622 |
+
'thermometer-3' => 'thermometer-three-quarters',
|
1623 |
+
'thermometer-4' => 'thermometer-full',
|
1624 |
+
'thumb-tack' => 'thumbtack',
|
1625 |
+
'thumbs-o-down' => 'thumbs-down',
|
1626 |
+
'thumbs-o-up' => 'thumbs-up',
|
1627 |
+
'ticket' => 'ticket-alt',
|
1628 |
+
'times-circle-o' => 'times-circle',
|
1629 |
+
'times-rectangle' => 'window-close',
|
1630 |
+
'times-rectangle-o' => 'window-close',
|
1631 |
+
'toggle-down' => 'caret-square-down',
|
1632 |
+
'toggle-left' => 'caret-square-left',
|
1633 |
+
'toggle-right' => 'caret-square-right',
|
1634 |
+
'toggle-up' => 'caret-square-up',
|
1635 |
+
'trash' => 'trash-alt',
|
1636 |
+
'trash-o' => 'trash-alt',
|
1637 |
+
'try' => 'lira-sign',
|
1638 |
+
'turkish-lira' => 'lira-sign',
|
1639 |
+
'unsorted' => 'sort',
|
1640 |
+
'usd' => 'dollar-sign',
|
1641 |
+
'user-circle-o' => 'user-circle',
|
1642 |
+
'user-o' => 'user',
|
1643 |
+
'vcard' => 'address-card',
|
1644 |
+
'vcard-o' => 'address-card',
|
1645 |
+
'video-camera' => 'video',
|
1646 |
+
'vimeo' => 'vimeo-v',
|
1647 |
+
'volume-control-phone' => 'phone-volume',
|
1648 |
+
'warning' => 'exclamation-triangle',
|
1649 |
+
'wechat' => 'weixin',
|
1650 |
+
'wheelchair-alt' => 'accessible-icon',
|
1651 |
+
'window-close-o' => 'window-close',
|
1652 |
+
'won' => 'won-sign',
|
1653 |
+
'y-combinator-square' => 'hacker-news',
|
1654 |
+
'yc' => 'y-combinator',
|
1655 |
+
'yc-square' => 'hacker-news',
|
1656 |
+
'yen' => 'yen-sign',
|
1657 |
+
'youtube-play' => 'youtube',
|
1658 |
+
'youtube-square' => 'youtube-square',
|
1659 |
+
);
|
1660 |
+
}
|
icons/fontawesome/style.css
CHANGED
@@ -1,316 +1,316 @@
|
|
1 |
-
.fa,
|
2 |
-
.fas,
|
3 |
-
.far,
|
4 |
-
.fal,
|
5 |
-
.fab {
|
6 |
-
-moz-osx-font-smoothing: grayscale;
|
7 |
-
-webkit-font-smoothing: antialiased;
|
8 |
-
display: inline-block;
|
9 |
-
font-style: normal;
|
10 |
-
font-variant: normal;
|
11 |
-
text-rendering: auto;
|
12 |
-
line-height: 1;
|
13 |
-
}
|
14 |
-
|
15 |
-
.fa-lg {
|
16 |
-
font-size: 1.33333em;
|
17 |
-
line-height: 0.75em;
|
18 |
-
vertical-align: -.0667em;
|
19 |
-
}
|
20 |
-
|
21 |
-
.fa-xs {
|
22 |
-
font-size: .75em;
|
23 |
-
}
|
24 |
-
|
25 |
-
.fa-sm {
|
26 |
-
font-size: .875em;
|
27 |
-
}
|
28 |
-
|
29 |
-
.fa-1x {
|
30 |
-
font-size: 1em;
|
31 |
-
}
|
32 |
-
|
33 |
-
.fa-2x {
|
34 |
-
font-size: 2em;
|
35 |
-
}
|
36 |
-
|
37 |
-
.fa-3x {
|
38 |
-
font-size: 3em;
|
39 |
-
}
|
40 |
-
|
41 |
-
.fa-4x {
|
42 |
-
font-size: 4em;
|
43 |
-
}
|
44 |
-
|
45 |
-
.fa-5x {
|
46 |
-
font-size: 5em;
|
47 |
-
}
|
48 |
-
|
49 |
-
.fa-6x {
|
50 |
-
font-size: 6em;
|
51 |
-
}
|
52 |
-
|
53 |
-
.fa-7x {
|
54 |
-
font-size: 7em;
|
55 |
-
}
|
56 |
-
|
57 |
-
.fa-8x {
|
58 |
-
font-size: 8em;
|
59 |
-
}
|
60 |
-
|
61 |
-
.fa-9x {
|
62 |
-
font-size: 9em;
|
63 |
-
}
|
64 |
-
|
65 |
-
.fa-10x {
|
66 |
-
font-size: 10em;
|
67 |
-
}
|
68 |
-
|
69 |
-
.fa-fw {
|
70 |
-
text-align: center;
|
71 |
-
width: 1.25em;
|
72 |
-
}
|
73 |
-
|
74 |
-
.fa-ul {
|
75 |
-
list-style-type: none;
|
76 |
-
margin-left: 2.5em;
|
77 |
-
padding-left: 0;
|
78 |
-
}
|
79 |
-
|
80 |
-
.fa-ul > li {
|
81 |
-
position: relative;
|
82 |
-
}
|
83 |
-
|
84 |
-
.fa-li {
|
85 |
-
left: -2em;
|
86 |
-
position: absolute;
|
87 |
-
text-align: center;
|
88 |
-
width: 2em;
|
89 |
-
line-height: inherit;
|
90 |
-
}
|
91 |
-
|
92 |
-
.fa-border {
|
93 |
-
border: solid 0.08em #eee;
|
94 |
-
border-radius: .1em;
|
95 |
-
padding: .2em .25em .15em;
|
96 |
-
}
|
97 |
-
|
98 |
-
.fa-pull-left {
|
99 |
-
float: left;
|
100 |
-
}
|
101 |
-
|
102 |
-
.fa-pull-right {
|
103 |
-
float: right;
|
104 |
-
}
|
105 |
-
|
106 |
-
.fa.fa-pull-left,
|
107 |
-
.fas.fa-pull-left,
|
108 |
-
.far.fa-pull-left,
|
109 |
-
.fal.fa-pull-left,
|
110 |
-
.fab.fa-pull-left {
|
111 |
-
margin-right: .3em;
|
112 |
-
}
|
113 |
-
|
114 |
-
.fa.fa-pull-right,
|
115 |
-
.fas.fa-pull-right,
|
116 |
-
.far.fa-pull-right,
|
117 |
-
.fal.fa-pull-right,
|
118 |
-
.fab.fa-pull-right {
|
119 |
-
margin-left: .3em;
|
120 |
-
}
|
121 |
-
|
122 |
-
.fa-spin {
|
123 |
-
-webkit-animation: fa-spin 2s infinite linear;
|
124 |
-
animation: fa-spin 2s infinite linear;
|
125 |
-
}
|
126 |
-
|
127 |
-
.fa-pulse {
|
128 |
-
-webkit-animation: fa-spin 1s infinite steps(8);
|
129 |
-
animation: fa-spin 1s infinite steps(8);
|
130 |
-
}
|
131 |
-
|
132 |
-
@-webkit-keyframes fa-spin {
|
133 |
-
0% {
|
134 |
-
-webkit-transform: rotate(0deg);
|
135 |
-
transform: rotate(0deg);
|
136 |
-
}
|
137 |
-
100% {
|
138 |
-
-webkit-transform: rotate(360deg);
|
139 |
-
transform: rotate(360deg);
|
140 |
-
}
|
141 |
-
}
|
142 |
-
|
143 |
-
@keyframes fa-spin {
|
144 |
-
0% {
|
145 |
-
-webkit-transform: rotate(0deg);
|
146 |
-
transform: rotate(0deg);
|
147 |
-
}
|
148 |
-
100% {
|
149 |
-
-webkit-transform: rotate(360deg);
|
150 |
-
transform: rotate(360deg);
|
151 |
-
}
|
152 |
-
}
|
153 |
-
|
154 |
-
.fa-rotate-90 {
|
155 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
|
156 |
-
-webkit-transform: rotate(90deg);
|
157 |
-
transform: rotate(90deg);
|
158 |
-
}
|
159 |
-
|
160 |
-
.fa-rotate-180 {
|
161 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
|
162 |
-
-webkit-transform: rotate(180deg);
|
163 |
-
transform: rotate(180deg);
|
164 |
-
}
|
165 |
-
|
166 |
-
.fa-rotate-270 {
|
167 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
|
168 |
-
-webkit-transform: rotate(270deg);
|
169 |
-
transform: rotate(270deg);
|
170 |
-
}
|
171 |
-
|
172 |
-
.fa-flip-horizontal {
|
173 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";
|
174 |
-
-webkit-transform: scale(-1, 1);
|
175 |
-
transform: scale(-1, 1);
|
176 |
-
}
|
177 |
-
|
178 |
-
.fa-flip-vertical {
|
179 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
|
180 |
-
-webkit-transform: scale(1, -1);
|
181 |
-
transform: scale(1, -1);
|
182 |
-
}
|
183 |
-
|
184 |
-
.fa-flip-horizontal.fa-flip-vertical {
|
185 |
-
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
|
186 |
-
-webkit-transform: scale(-1, -1);
|
187 |
-
transform: scale(-1, -1);
|
188 |
-
}
|
189 |
-
|
190 |
-
:root .fa-rotate-90,
|
191 |
-
:root .fa-rotate-180,
|
192 |
-
:root .fa-rotate-270,
|
193 |
-
:root .fa-flip-horizontal,
|
194 |
-
:root .fa-flip-vertical {
|
195 |
-
-webkit-filter: none;
|
196 |
-
filter: none;
|
197 |
-
}
|
198 |
-
|
199 |
-
.fa-stack {
|
200 |
-
display: inline-block;
|
201 |
-
height: 2em;
|
202 |
-
line-height: 2em;
|
203 |
-
position: relative;
|
204 |
-
vertical-align: middle;
|
205 |
-
width: 2.5em;
|
206 |
-
}
|
207 |
-
|
208 |
-
.fa-stack-1x,
|
209 |
-
.fa-stack-2x {
|
210 |
-
left: 0;
|
211 |
-
position: absolute;
|
212 |
-
text-align: center;
|
213 |
-
width: 100%;
|
214 |
-
}
|
215 |
-
|
216 |
-
.fa-stack-1x {
|
217 |
-
line-height: inherit;
|
218 |
-
}
|
219 |
-
|
220 |
-
.fa-stack-2x {
|
221 |
-
font-size: 2em;
|
222 |
-
}
|
223 |
-
|
224 |
-
.fa-inverse {
|
225 |
-
color: #fff;
|
226 |
-
}
|
227 |
-
|
228 |
-
.sr-only {
|
229 |
-
border: 0;
|
230 |
-
clip: rect(0, 0, 0, 0);
|
231 |
-
height: 1px;
|
232 |
-
margin: -1px;
|
233 |
-
overflow: hidden;
|
234 |
-
padding: 0;
|
235 |
-
position: absolute;
|
236 |
-
width: 1px;
|
237 |
-
}
|
238 |
-
|
239 |
-
.sr-only-focusable:active, .sr-only-focusable:focus {
|
240 |
-
clip: auto;
|
241 |
-
height: auto;
|
242 |
-
margin: 0;
|
243 |
-
overflow: visible;
|
244 |
-
position: static;
|
245 |
-
width: auto;
|
246 |
-
}
|
247 |
-
|
248 |
-
@font-face {
|
249 |
-
font-family: 'sow-fontawesome-brands';
|
250 |
-
font-style: normal;
|
251 |
-
font-weight: normal;
|
252 |
-
src: url("webfonts/fa-brands-400.eot");
|
253 |
-
src: url("webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"),
|
254 |
-
url("webfonts/fa-brands-400.woff2") format("woff2"),
|
255 |
-
url("webfonts/fa-brands-400.woff") format("woff"),
|
256 |
-
url("webfonts/fa-brands-400.ttf") format("truetype"),
|
257 |
-
url("webfonts/fa-brands-400.svg#fontawesome") format("svg");
|
258 |
-
}
|
259 |
-
|
260 |
-
.sow-fab {
|
261 |
-
font-family: 'sow-fontawesome-brands';
|
262 |
-
font-style: normal !important;
|
263 |
-
font-weight: normal !important;
|
264 |
-
}
|
265 |
-
|
266 |
-
@font-face {
|
267 |
-
font-family: 'sow-fontawesome-free';
|
268 |
-
font-style: normal;
|
269 |
-
font-weight: 400;
|
270 |
-
src: url("webfonts/fa-regular-400.eot");
|
271 |
-
src: url("webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"),
|
272 |
-
url("webfonts/fa-regular-400.woff2") format("woff2"),
|
273 |
-
url("webfonts/fa-regular-400.woff") format("woff"),
|
274 |
-
url("webfonts/fa-regular-400.ttf") format("truetype"),
|
275 |
-
url("webfonts/fa-regular-400.svg#fontawesome") format("svg");
|
276 |
-
}
|
277 |
-
|
278 |
-
.sow-far {
|
279 |
-
font-family: 'sow-fontawesome-free';
|
280 |
-
font-style: normal !important;
|
281 |
-
font-weight: 400 !important;
|
282 |
-
}
|
283 |
-
|
284 |
-
@font-face {
|
285 |
-
font-family: 'sow-fontawesome-free';
|
286 |
-
font-style: normal;
|
287 |
-
font-weight: 900;
|
288 |
-
src: url("webfonts/fa-solid-900.eot");
|
289 |
-
src: url("webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"),
|
290 |
-
url("webfonts/fa-solid-900.woff2") format("woff2"),
|
291 |
-
url("webfonts/fa-solid-900.woff") format("woff"),
|
292 |
-
url("webfonts/fa-solid-900.ttf") format("truetype"),
|
293 |
-
url("webfonts/fa-solid-900.svg#fontawesome") format("svg");
|
294 |
-
}
|
295 |
-
|
296 |
-
.sow-fa,
|
297 |
-
.sow-fas {
|
298 |
-
font-family: 'sow-fontawesome-free';
|
299 |
-
font-weight: 900 !important;
|
300 |
-
font-style: normal !important;
|
301 |
-
}
|
302 |
-
|
303 |
-
.sow-icon-fontawesome {
|
304 |
-
display: inline-block;
|
305 |
-
speak: none;
|
306 |
-
font-variant: normal;
|
307 |
-
text-transform: none;
|
308 |
-
line-height: 1;
|
309 |
-
|
310 |
-
-webkit-font-smoothing: antialiased;
|
311 |
-
-moz-osx-font-smoothing: grayscale;
|
312 |
-
}
|
313 |
-
|
314 |
-
.sow-icon-fontawesome[data-sow-icon]:before {
|
315 |
-
content: attr(data-sow-icon);
|
316 |
-
}
|
1 |
+
.fa,
|
2 |
+
.fas,
|
3 |
+
.far,
|
4 |
+
.fal,
|
5 |
+
.fab {
|
6 |
+
-moz-osx-font-smoothing: grayscale;
|
7 |
+
-webkit-font-smoothing: antialiased;
|
8 |
+
display: inline-block;
|
9 |
+
font-style: normal;
|
10 |
+
font-variant: normal;
|
11 |
+
text-rendering: auto;
|
12 |
+
line-height: 1;
|
13 |
+
}
|
14 |
+
|
15 |
+
.fa-lg {
|
16 |
+
font-size: 1.33333em;
|
17 |
+
line-height: 0.75em;
|
18 |
+
vertical-align: -.0667em;
|
19 |
+
}
|
20 |
+
|
21 |
+
.fa-xs {
|
22 |
+
font-size: .75em;
|
23 |
+
}
|
24 |
+
|
25 |
+
.fa-sm {
|
26 |
+
font-size: .875em;
|
27 |
+
}
|
28 |
+
|
29 |
+
.fa-1x {
|
30 |
+
font-size: 1em;
|
31 |
+
}
|
32 |
+
|
33 |
+
.fa-2x {
|
34 |
+
font-size: 2em;
|
35 |
+
}
|
36 |
+
|
37 |
+
.fa-3x {
|
38 |
+
font-size: 3em;
|
39 |
+
}
|
40 |
+
|
41 |
+
.fa-4x {
|
42 |
+
font-size: 4em;
|
43 |
+
}
|
44 |
+
|
45 |
+
.fa-5x {
|
46 |
+
font-size: 5em;
|
47 |
+
}
|
48 |
+
|
49 |
+
.fa-6x {
|
50 |
+
font-size: 6em;
|
51 |
+
}
|
52 |
+
|
53 |
+
.fa-7x {
|
54 |
+
font-size: 7em;
|
55 |
+
}
|
56 |
+
|
57 |
+
.fa-8x {
|
58 |
+
font-size: 8em;
|
59 |
+
}
|
60 |
+
|
61 |
+
.fa-9x {
|
62 |
+
font-size: 9em;
|
63 |
+
}
|
64 |
+
|
65 |
+
.fa-10x {
|
66 |
+
font-size: 10em;
|
67 |
+
}
|
68 |
+
|
69 |
+
.fa-fw {
|
70 |
+
text-align: center;
|
71 |
+
width: 1.25em;
|
72 |
+
}
|
73 |
+
|
74 |
+
.fa-ul {
|
75 |
+
list-style-type: none;
|
76 |
+
margin-left: 2.5em;
|
77 |
+
padding-left: 0;
|
78 |
+
}
|
79 |
+
|
80 |
+
.fa-ul > li {
|
81 |
+
position: relative;
|
82 |
+
}
|
83 |
+
|
84 |
+
.fa-li {
|
85 |
+
left: -2em;
|
86 |
+
position: absolute;
|
87 |
+
text-align: center;
|
88 |
+
width: 2em;
|
89 |
+
line-height: inherit;
|
90 |
+
}
|
91 |
+
|
92 |
+
.fa-border {
|
93 |
+
border: solid 0.08em #eee;
|
94 |
+
border-radius: .1em;
|
95 |
+
padding: .2em .25em .15em;
|
96 |
+
}
|
97 |
+
|
98 |
+
.fa-pull-left {
|
99 |
+
float: left;
|
100 |
+
}
|
101 |
+
|
102 |
+
.fa-pull-right {
|
103 |
+
float: right;
|
104 |
+
}
|
105 |
+
|
106 |
+
.fa.fa-pull-left,
|
107 |
+
.fas.fa-pull-left,
|
108 |
+
.far.fa-pull-left,
|
109 |
+
.fal.fa-pull-left,
|
110 |
+
.fab.fa-pull-left {
|
111 |
+
margin-right: .3em;
|
112 |
+
}
|
113 |
+
|
114 |
+
.fa.fa-pull-right,
|
115 |
+
.fas.fa-pull-right,
|
116 |
+
.far.fa-pull-right,
|
117 |
+
.fal.fa-pull-right,
|
118 |
+
.fab.fa-pull-right {
|
119 |
+
margin-left: .3em;
|
120 |
+
}
|
121 |
+
|
122 |
+
.fa-spin {
|
123 |
+
-webkit-animation: fa-spin 2s infinite linear;
|
124 |
+
animation: fa-spin 2s infinite linear;
|
125 |
+
}
|
126 |
+
|
127 |
+
.fa-pulse {
|
128 |
+
-webkit-animation: fa-spin 1s infinite steps(8);
|
129 |
+
animation: fa-spin 1s infinite steps(8);
|
130 |
+
}
|
131 |
+
|
132 |
+
@-webkit-keyframes fa-spin {
|
133 |
+
0% {
|
134 |
+
-webkit-transform: rotate(0deg);
|
135 |
+
transform: rotate(0deg);
|
136 |
+
}
|
137 |
+
100% {
|
138 |
+
-webkit-transform: rotate(360deg);
|
139 |
+
transform: rotate(360deg);
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
@keyframes fa-spin {
|
144 |
+
0% {
|
145 |
+
-webkit-transform: rotate(0deg);
|
146 |
+
transform: rotate(0deg);
|
147 |
+
}
|
148 |
+
100% {
|
149 |
+
-webkit-transform: rotate(360deg);
|
150 |
+
transform: rotate(360deg);
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
.fa-rotate-90 {
|
155 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
|
156 |
+
-webkit-transform: rotate(90deg);
|
157 |
+
transform: rotate(90deg);
|
158 |
+
}
|
159 |
+
|
160 |
+
.fa-rotate-180 {
|
161 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
|
162 |
+
-webkit-transform: rotate(180deg);
|
163 |
+
transform: rotate(180deg);
|
164 |
+
}
|
165 |
+
|
166 |
+
.fa-rotate-270 {
|
167 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
|
168 |
+
-webkit-transform: rotate(270deg);
|
169 |
+
transform: rotate(270deg);
|
170 |
+
}
|
171 |
+
|
172 |
+
.fa-flip-horizontal {
|
173 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";
|
174 |
+
-webkit-transform: scale(-1, 1);
|
175 |
+
transform: scale(-1, 1);
|
176 |
+
}
|
177 |
+
|
178 |
+
.fa-flip-vertical {
|
179 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
|
180 |
+
-webkit-transform: scale(1, -1);
|
181 |
+
transform: scale(1, -1);
|
182 |
+
}
|
183 |
+
|
184 |
+
.fa-flip-horizontal.fa-flip-vertical {
|
185 |
+
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
|
186 |
+
-webkit-transform: scale(-1, -1);
|
187 |
+
transform: scale(-1, -1);
|
188 |
+
}
|
189 |
+
|
190 |
+
:root .fa-rotate-90,
|
191 |
+
:root .fa-rotate-180,
|
192 |
+
:root .fa-rotate-270,
|
193 |
+
:root .fa-flip-horizontal,
|
194 |
+
:root .fa-flip-vertical {
|
195 |
+
-webkit-filter: none;
|
196 |
+
filter: none;
|
197 |
+
}
|
198 |
+
|
199 |
+
.fa-stack {
|
200 |
+
display: inline-block;
|
201 |
+
height: 2em;
|
202 |
+
line-height: 2em;
|
203 |
+
position: relative;
|
204 |
+
vertical-align: middle;
|
205 |
+
width: 2.5em;
|
206 |
+
}
|
207 |
+
|
208 |
+
.fa-stack-1x,
|
209 |
+
.fa-stack-2x {
|
210 |
+
left: 0;
|
211 |
+
position: absolute;
|
212 |
+
text-align: center;
|
213 |
+
width: 100%;
|
214 |
+
}
|
215 |
+
|
216 |
+
.fa-stack-1x {
|
217 |
+
line-height: inherit;
|
218 |
+
}
|
219 |
+
|
220 |
+
.fa-stack-2x {
|
221 |
+
font-size: 2em;
|
222 |
+
}
|
223 |
+
|
224 |
+
.fa-inverse {
|
225 |
+
color: #fff;
|
226 |
+
}
|
227 |
+
|
228 |
+
.sr-only {
|
229 |
+
border: 0;
|
230 |
+
clip: rect(0, 0, 0, 0);
|
231 |
+
height: 1px;
|
232 |
+
margin: -1px;
|
233 |
+
overflow: hidden;
|
234 |
+
padding: 0;
|
235 |
+
position: absolute;
|
236 |
+
width: 1px;
|
237 |
+
}
|
238 |
+
|
239 |
+
.sr-only-focusable:active, .sr-only-focusable:focus {
|
240 |
+
clip: auto;
|
241 |
+
height: auto;
|
242 |
+
margin: 0;
|
243 |
+
overflow: visible;
|
244 |
+
position: static;
|
245 |
+
width: auto;
|
246 |
+
}
|
247 |
+
|
248 |
+
@font-face {
|
249 |
+
font-family: 'sow-fontawesome-brands';
|
250 |
+
font-style: normal;
|
251 |
+
font-weight: normal;
|
252 |
+
src: url("webfonts/fa-brands-400.eot");
|
253 |
+
src: url("webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"),
|
254 |
+
url("webfonts/fa-brands-400.woff2") format("woff2"),
|
255 |
+
url("webfonts/fa-brands-400.woff") format("woff"),
|
256 |
+
url("webfonts/fa-brands-400.ttf") format("truetype"),
|
257 |
+
url("webfonts/fa-brands-400.svg#fontawesome") format("svg");
|
258 |
+
}
|
259 |
+
|
260 |
+
.sow-fab {
|
261 |
+
font-family: 'sow-fontawesome-brands';
|
262 |
+
font-style: normal !important;
|
263 |
+
font-weight: normal !important;
|
264 |
+
}
|
265 |
+
|
266 |
+
@font-face {
|
267 |
+
font-family: 'sow-fontawesome-free';
|
268 |
+
font-style: normal;
|
269 |
+
font-weight: 400;
|
270 |
+
src: url("webfonts/fa-regular-400.eot");
|
271 |
+
src: url("webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"),
|
272 |
+
url("webfonts/fa-regular-400.woff2") format("woff2"),
|
273 |
+
url("webfonts/fa-regular-400.woff") format("woff"),
|
274 |
+
url("webfonts/fa-regular-400.ttf") format("truetype"),
|
275 |
+
url("webfonts/fa-regular-400.svg#fontawesome") format("svg");
|
276 |
+
}
|
277 |
+
|
278 |
+
.sow-far {
|
279 |
+
font-family: 'sow-fontawesome-free';
|
280 |
+
font-style: normal !important;
|
281 |
+
font-weight: 400 !important;
|
282 |
+
}
|
283 |
+
|
284 |
+
@font-face {
|
285 |
+
font-family: 'sow-fontawesome-free';
|
286 |
+
font-style: normal;
|
287 |
+
font-weight: 900;
|
288 |
+
src: url("webfonts/fa-solid-900.eot");
|
289 |
+
src: url("webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"),
|
290 |
+
url("webfonts/fa-solid-900.woff2") format("woff2"),
|
291 |
+
url("webfonts/fa-solid-900.woff") format("woff"),
|
292 |
+
url("webfonts/fa-solid-900.ttf") format("truetype"),
|
293 |
+
url("webfonts/fa-solid-900.svg#fontawesome") format("svg");
|
294 |
+
}
|
295 |
+
|
296 |
+
.sow-fa,
|
297 |
+
.sow-fas {
|
298 |
+
font-family: 'sow-fontawesome-free';
|
299 |
+
font-weight: 900 !important;
|
300 |
+
font-style: normal !important;
|
301 |
+
}
|
302 |
+
|
303 |
+
.sow-icon-fontawesome {
|
304 |
+
display: inline-block;
|
305 |
+
speak: none;
|
306 |
+
font-variant: normal;
|
307 |
+
text-transform: none;
|
308 |
+
line-height: 1;
|
309 |
+
|
310 |
+
-webkit-font-smoothing: antialiased;
|
311 |
+
-moz-osx-font-smoothing: grayscale;
|
312 |
+
}
|
313 |
+
|
314 |
+
.sow-icon-fontawesome[data-sow-icon]:before {
|
315 |
+
content: attr(data-sow-icon);
|
316 |
+
}
|
icons/fontawesome/webfonts/fa-brands-400.svg
CHANGED
@@ -1,1260 +1,1260 @@
|
|
1 |
-
<?xml version="1.0" standalone="no"?>
|
2 |
-
<!--
|
3 |
-
Font Awesome Free 5.6.3 by @fontawesome - https://fontawesome.com
|
4 |
-
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
5 |
-
-->
|
6 |
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
7 |
-
<svg xmlns="http://www.w3.org/2000/svg">
|
8 |
-
<defs>
|
9 |
-
<font id="fontawesome-free" horiz-adv-x="640.4">
|
10 |
-
<font-face font-family="Font Awesome 5 Brands"
|
11 |
-
units-per-em="512" ascent="448"
|
12 |
-
descent="64"
|
13 |
-
font-weight="400"
|
14 |
-
font-style="Regular" />
|
15 |
-
<missing-glyph horiz-adv-x="0" />
|
16 |
-
<glyph glyph-name="500px"
|
17 |
-
unicode=""
|
18 |
-
horiz-adv-x="448" d=" M103.3 103.7C96.8 117.9 96.4 122 110.7 126.8C136.3 134.8 118.7 117.6 153.9 77.6H154.2V171.5C155.4 221.7 198.2 263.7 251.9000000000001 263.7C305.8 263.7 349.6 220.2 349.6 166.9C349.6 103.5 288.8 53.7 221.1 73.6C210.6 77.8 219 105.3 229.6 102.2C282.6 102.2 319 112.3 319 166.6C319 227.6 241.9 256.2000000000001 202.1 211.2C178.6 184.8 184.5 169.1 184.5 53.6C235.2 22.6 302.8 31.6 344.9 73.7000000000001C369.7 98.5000000000001 383.4 131.7000000000001 383.4 166.7000000000001C383.4 201.9 369.6 234.9000000000001 344.6 260.0000000000001C319.8 284.8000000000001 286.8 298.5000000000001 251.3 298.5000000000001S182.5 284.7000000000001 157.8 260.0000000000001C157.5 259.7000000000001 141.8 243.5000000000001 136.6 236.1000000000001L136.1 235.5000000000001C132.8 230.8000000000001 129.8 226.4000000000001 116 229.4000000000001C109.1 231.1000000000001 101.7 235.2000000000001 101.7 241.2000000000001V428C101.7 433 105.6 438.5 112.2 438.5H353.5C361.8 438.5 361.8 426.9 361.8 423.4C361.8 419.5 361.8 408.3 353.5 408.3H130.3V275.4H130.6C234.8 385.2 413.4000000000001 311.4 413.4000000000001 166.5C413.4000000000001 -11.6 168.6 -53.8 103.3 103.7zM166.6 364.5C166.1 360.3 171.2 340 181.2 343.9C306 391.4 384 303.5 390.6 303.5C395.4000000000001 303.5 413.4000000000001 318.8 404.9000000000001 326.3C311.7000000000001 415.3 170.4 383.3 166.6 364.5zM393 33.3C283 -76.6 94 -27.5 61 137.5C61 149.7 30.6 144.9 32.1 134.2C56.1 -39.2 278.1 -122.7 413.7000000000001 12.9C420.6 20.7 401.1 41.3 393.0000000000001 33.3zM213.6 141.4C213.6 137.4 217.9 134.1 219.1 132.9C222.1 129.9 225.2 128.5 227.6 128.5C231.4 128.5 230.2 128.3 249.9 148C269.5 128.7 269 128.5 272.2 128.5C277.6 128.5 290.7 138.9 282.9 146.7L265.6 164L283.8 182.2C290.1 189 273.7 204 267.6 197.9L249.7 180C231.1 198.8 231.3 199.5 228.2 199.5C223.2 199.5 210.2 187.8 215.8 182.2L234 164C215.9 146.1 213.6 144.8 213.6 141.4z" />
|
19 |
-
<glyph glyph-name="accessible-icon"
|
20 |
-
unicode=""
|
21 |
-
horiz-adv-x="448" d=" M423.9 192.2L411 34.9C407.7 -5.8 347.1 -0.2 350.4 39.8L360.4 162.3L319.3 160C329.4 139.3 335.1 116.1 335.1 91.4999999999999C335.1 50.3 319 12.8 292.8 -15.0000000000001L253.5 24.3C311.3999999999999 87.9999999999999 266.6 191.5 179.5 191.5C153.5999999999999 191.5 130 181.6 112.2999999999999 165.5L73 204.8C95 225.5 123.1 239.9 154.4 245L229.7 330.7L187.1 355.5L135.5 309.5C105.5 282.7 64.9 328 95 354.9L163 415.6C172.8 424.4000000000001 187.1 425.8 198.5 419.2C198.5 419.2 337.8 338.3 338 338.1C354.2 328 358.7 302.1 344.1 285.5L285.7 219L391.8 224.9C410.3 226 425.4 210.5 423.9 192.2zM359 346.2C387.1 346.2 409.9 369 409.9 397.1C409.9 425.2 387.1 448 359 448C330.9 448 308.1 425.2 308.1 397.1C308.1 369 330.9000000000001 346.2 359 346.2zM179.6 -8.5C99 -8.5 52.2 82.1 96.9 147.6L57.2 187.3C36.4 161 24 127.7 24 91.6C24 -39.1 174.7 -109.7999999999999 275.4 -30.9L235.7 8.8C219.7 -2.1 200.4 -8.5 179.6 -8.5z" />
|
22 |
-
<glyph glyph-name="accusoft"
|
23 |
-
unicode=""
|
24 |
-
horiz-adv-x="640" d=" M482.2 75.9C476.5 82.8 250 373 242.3 382.5C228.6 399.7 242.3 399.3 261.5 399.4C271.2 399.5 367.8 400 378 400C402.1 400.1 406.7 399.4 416.4 387.2C418.5 384.5 621.5 141.4 623.5999999999999 138.9C629.0999999999999 132.2 638.8 119.8 630.8 115.5C628.4 114.2 516.1999999999999 67.8 513 66.6C502.9 62.6 495.5 59.8 482.2 75.9M596.9 81.5000000000001S481.9 31.1000000000001 479.4 29.9C463.4 22.6 452.5 33.1 442.7 44.5000000000001L385.6 118.5000000000001C380.2 119.4 325.2 128.1000000000001 320.3 127.8000000000001C317.2 127.6000000000001 310.7 127.0000000000001 305.9 124.9000000000001C301 122.8000000000001 160.7 72.1000000000001 155.7 70.2000000000001C150.6 68.2000000000001 144.3 66.6000000000001 144.6 62.6000000000001C144.8 60.1000000000001 146.6 60.0000000000001 149.2 59.1000000000001C151.9 58.3000000000001 450.1 -8.4999999999999 457.2 -9.9999999999999C472.8 -13.2999999999999 495.7 -20.4999999999999 510.8 -11.6999999999999C512.9 -10.4999999999999 634.6 64.7000000000002 636.6 66.1000000000001C642 70.1000000000001 640.9 72.9000000000002 634.9 74.3000000000001C632.6 74.6000000000001 610.3 79.0000000000001 596.9 81.5000000000001M270.9 262.8000000000002S258.9 261.2000000000002 245.9 247.7000000000002C236.9 238.4000000000001 3.8 8.6000000000001 2.5 6.8000000000001C-4.5 -3.1999999999999 4.1 1e-13 18.2 5.1000000000001C19 5.1000000000001 132.7 41.7000000000002 132.7 41.7000000000002C133.2 42.3000000000002 132.6 41.8000000000002 133.3 42.3000000000002C132.9 47.4000000000002 132.5 68.5000000000002 132.3 70.0000000000002C131.7 75.2000000000002 134.5 76.9000000000002 139.3 78.9000000000002L231.9 112.7000000000002C232.5 113.5000000000002 320.4 194.4000000000002 322.1 196.0000000000002V197.0000000000002L270.9 262.8000000000002" />
|
25 |
-
<glyph glyph-name="acquisitions-incorporated"
|
26 |
-
unicode=""
|
27 |
-
horiz-adv-x="344.76" d=" M344 448C343.19 442.53 342.37 437.21 341.61 431.88C340.2200000000001 422.14 338.7100000000001 412.4 337.56 402.63C337.21 399.67 336.35 398.31 333.26 398.3C312.65 398.19 292.05 398.16 271.44 397.77C252.68 397.42 233.86 397.49 215.21 395.77C201.79 394.53 191.93 383.1 196.33 369.13C204.88 342.02 223.98 300.03 232.7 279.68C298.42 125.54 294.13 122.69 316.7000000000001 121.12C323.3700000000001 120.66 330.1 121.05 337.1300000000001 121.05C338.5200000000001 111.65 339.7900000000001 103.01 341.1800000000001 93.54H225.17V120.54C235.5 120.54 245.53 120.66 255.55 120.48C259.07 120.42 260.6 121.11 258.99 124.85C254.55 135.1400000000001 250.22 145.48 245.74 155.75C244.12 159.47 241.68 160.53 237.34 159.27C225.02 155.68 212.55 152.58 200.08 149.58C195.83 148.56 194.15 146.81 194.22 142.12C195.07 84.65 195.17 14.59 195.22 13C195.62 0.46 203.97 -8.41 216.25 -10.07C217.14 -10.19 229.14 -12.79 328.93 -12.63C337.18 -12.62 337.3400000000001 -12.46 338.5 -20.19C340.65 -34.53 342.64 -48.89 344.76 -63.72C-22.99 -63.72 190.83 -64.33 7.67 -63.72C3.72 -63.71 1.59 -63.03 2.39 -57.98C4.43 -45.12 5.89 -32.16 7.36 -19.22C7.91 -14.41 9.65 -12.41 14.99 -12.45C133.08 -13.4400000000001 129.92 -12.8000000000001 136.42 -10.0600000000001C145.84 -6.08 151.4 2.79 151.37 13.0099999999999C151.25 55.9399999999999 151.04 98.87 151.12 141.8C151.13 145.67 149.96 147.79 146.56 148.6399999999999C130.92 152.56 115.25 156.3499999999999 98.98 160.3399999999999C93.75 148.0699999999999 88.59 135.9699999999999 83.32 123.6399999999999C85.15 120.2899999999999 111.7 120.7099999999999 118.6 120.7099999999999V93.0699999999999H4.34C5.37 101.68 6.11 109.8799999999999 7.57 117.9499999999999C7.82 119.36 11.1 121.0899999999999 13.04 121.17C21.5 121.52 29.99 121.46 38.47 121.2599999999999C42.46 121.17 44.39 122.3 46.08 126.42C62.71 167.12 59.59 157.59 113.39 287.39C144.92 363.48 146.45 363.41 146.03 374.82C145.34 393.38 120.66 397.08 108.38 396.93C78.34 396.55 69.93 397.4 6.54 397.4C-0.62 441.89 2.37 429.46 0.16 442.68C-0.55 446.92 1.19 447.9700000000001 4.8 447.98M117.88 200.79C120.18 199.64 121.85 198.5 123.7 197.92C136.99 193.71 150.34 189.68 163.63 185.46C169.77 183.51 175.61 183.34 181.93 185.41C194.95 189.69 208.22 193.22 221.36 197.14C222.82 197.58 224.1 198.58 225.29 199.23C218.58 216.6 212.17 233.38 205.62 250.11C196.74 272.78 187.99 310.43 178.64 332.92C177.11 333.7 176.73 330.56 169.21 332.92C152.1 288.87 135.07 245.04 117.88 200.79z" />
|
28 |
-
<glyph glyph-name="adn"
|
29 |
-
unicode=""
|
30 |
-
horiz-adv-x="496" d=" M248 280.5L312.9 181.7H183.1L248 280.5zM496 192C496 55.1 384.9 -56 248 -56S0 55.1 0 192S111.1 440 248 440S496 328.9 496 192zM396.2 109.3L248 332.5L99.8 109.3H130.2L163.8 161H332.4L366 109.3H396.2z" />
|
31 |
-
<glyph glyph-name="adobe"
|
32 |
-
unicode=""
|
33 |
-
horiz-adv-x="460.8" d=" M289.9 383.7H460.8V-0.3L289.9 383.7zM170.9 383.7H0V-0.3L170.9 383.7zM230.4 241.6L337.9 -0.3H264.9L234.2 76.5000000000001H155.5L230.4 241.6000000000001z" />
|
34 |
-
<glyph glyph-name="adversal"
|
35 |
-
unicode=""
|
36 |
-
horiz-adv-x="512"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|