WordPress Page Builder – Beaver Builder - Version 1.7.1

Version Description

Download this release

Release Info

Developer justinbusa
Plugin Icon 128x128 WordPress Page Builder – Beaver Builder
Version 1.7.1
Comparing to
See all releases

Code changes from version 1.6.4.7 to 1.7.1

changelog.txt CHANGED
@@ -1,3 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <h4>1.6.4.7 - 1/10/2016</h4>
2
  <p><strong>Enhancements</strong></p>
3
  <ul>
1
+ <h4>1.7.1 - 01/24/2016</h4>
2
+ <p><strong>Security</strong></p>
3
+ <ul>
4
+ <li>Fixed a security issue that could allow a logged in user that doesn't have permission to edit a page to make calls to the builder's editing functions by spoofing an AJAX request. While this issue mainly affects sites that allow anyone to register, it is still recommended that everyone update immediately.</li>
5
+ <li>Now using nonces in AJAX requests for additional security.</li>
6
+ </ul>
7
+ <p><strong>Enhancements</strong></p>
8
+ <ul>
9
+ <li>The Number Counter module now uses thousands separators.</li>
10
+ <li>Updated multiple translations.</li>
11
+ <li>The parent node id is now passed when nested forms are rendered so the parent settings can be accessed by the nested form's controls.</li>
12
+ </ul>
13
+ <p><strong>Bug Fixes</strong></p>
14
+ <ul>
15
+ <li>Fixed multiple translation issues.</li>
16
+ <li>Fixed a bug causing an error on the post list admin screen.</li>
17
+ <li>Fixed a bug with the read more link not showing in the Posts module when the content is hidden.</li>
18
+ <li>Fixed a bug with the default value in font fields.</li>
19
+ <li>Fixed a bug with button style settings showing when no background color is selected.</li>
20
+ <li>Fixed a bug with nested form preview text on PHP 7.</li>
21
+ </ul>
22
+
23
+ <h4>1.7 - 01/18/2016</h4>
24
+ <p>This update adds a number of new features. Be sure to check out <a href="https://www.wpbeaverbuilder.com/beaver-builder-1-7-now-with-partial-refresh-per-page-code-settings-and-our-first-shortcode/">the blog post</a> for detailed info on what was added.</p>
25
+ <p><strong>Enhancements</strong></p>
26
+ <ul>
27
+ <li>Added partial refresh for all rows, columns, and modules. Developers will need to read the custom module docs for info on making their modules compatible with partial refresh.</li>
28
+ <li>Added the Layout Settings panel with per-page CSS and JavaScript settings.</li>
29
+ <li>Added CSS and JavaScript settings to the Global Settings panel.</li>
30
+ <li>Added the Audio module.</li>
31
+ <li>Added the Countdown module.</li>
32
+ <li>Added new style settings to the Pricing Table module for achieving a variety of different looks.</li>
33
+ <li>Added the fl_builder_insert_layout shortcode for inserting builder saved templates, rows, modules anywhere in your posts.</li>
34
+ <li>Added the FLBuilder::render_query method for rendering layouts anywhere within a theme's PHP files.</li>
35
+ <li>Refactored frontend AJAX actions and rendering to support partial refresh. Developers tapping into those actions may need to update their code.</li>
36
+ <li>Optimized loading of the builder UI by concatenating and minifying all core CSS and JavaScript files.</li>
37
+ <li>Builder caching is now disabled when WP_DEBUG is set to true.</li>
38
+ <li>The editing capability setting now supports multiple comma seperated values.</li>
39
+ <li>Updated Google fonts.</li>
40
+ </ul>
41
+ <p><strong>Bug Fixes</strong></p>
42
+ <ul>
43
+ <li>Fixed a bug with the Subscribe Form module.</li>
44
+ <li>Fixed CSS specificity issues with the new builder shortcode.</li>
45
+ <li>Fixed a CSS bug with custom column widths on small devices.</li>
46
+ </ul>
47
+
48
+ <h4>1.7-beta.2 - 1/10/2016</h4>
49
+ <p><strong>Enhancements</strong></p>
50
+ <ul>
51
+ <li>Builder caching is now disabled when WP_DEBUG is set to true.</li>
52
+ </ul>
53
+ <p><strong>Bug Fixes</strong></p>
54
+ <ul>
55
+ <li>Fixed a bug with the Subscribe Form module.</li>
56
+ <li>Fixed CSS specificity issues with the new builder shortcode.</li>
57
+ </ul>
58
+
59
+ <h4>1.7-beta.1 - 12/16/2015</h4>
60
+ <p><strong>Enhancements</strong></p>
61
+ <ul>
62
+ <li>Added partial refresh for all rows, columns, and modules. Developers will need to read the custom module docs for info on making their modules compatible with partial refresh.</li>
63
+ <li>Added the Layout Settings panel with per-page CSS and JavaScript settings.</li>
64
+ <li>Added CSS and JavaScript settings to the Global Settings panel.</li>
65
+ <li>Added the Audio module.</li>
66
+ <li>Added the Countdown module.</li>
67
+ <li>Added new style settings to the Pricing Table module for achieving a variety of different looks.</li>
68
+ <li>Added the fl_builder_insert_layout shortcode for inserting builder saved templates, rows, modules anywhere in your posts.</li>
69
+ <li>Added the FLBuilder::render_query method for rendering layouts anywhere within a theme's PHP files.</li>
70
+ <li>Refactored frontend AJAX actions and rendering to support partial refresh. Developers tapping into those actions may need to update their code.</li>
71
+ <li>Optimized loading of the builder UI by concatenating and minifying all core CSS and JavaScript files.</li>
72
+ </ul>
73
+
74
  <h4>1.6.4.7 - 1/10/2016</h4>
75
  <p><strong>Enhancements</strong></p>
76
  <ul>
classes/class-fl-builder-ajax-layout.php ADDED
@@ -0,0 +1,519 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Handles the rendering of the layout for AJAX refreshes.
5
+ *
6
+ * @since 1.7
7
+ */
8
+ final class FLBuilderAJAXLayout {
9
+
10
+ /**
11
+ * An array with data for partial refreshes.
12
+ *
13
+ * @since 1.7
14
+ * @access private
15
+ * @var array $partial_refresh_data
16
+ */
17
+ static private $partial_refresh_data = null;
18
+
19
+ /**
20
+ * Renders the layout data to be passed back to the builder.
21
+ *
22
+ * @since 1.7
23
+ * @param string $node_id The ID of a node to try and render instead of the entire layout.
24
+ * @param string $old_node_id The ID of a node that has been replaced in the layout.
25
+ * @return array
26
+ */
27
+ static public function render( $node_id = null, $old_node_id = null )
28
+ {
29
+ // Update the node ID in the post data?
30
+ if ( $node_id ) {
31
+ FLBuilderModel::update_post_data( 'node_id', $node_id );
32
+ }
33
+
34
+ // Render CSS and JS assets.
35
+ FLBuilder::render_assets();
36
+
37
+ // Register scripts needed for shortcodes and widgets.
38
+ self::register_scripts();
39
+
40
+ // Dequeue scripts and styles to only capture those that are needed.
41
+ self::dequeue_scripts_and_styles();
42
+
43
+ // Get the partial refresh data.
44
+ $partial_refresh_data = self::get_partial_refresh_data();
45
+
46
+ // Render the markup.
47
+ $html = self::render_html();
48
+
49
+ // Render scripts and styles.
50
+ $scripts_styles = self::render_scripts_and_styles();
51
+
52
+ // Render the assets.
53
+ $assets = self::render_assets();
54
+
55
+ // Return the response.
56
+ return array(
57
+ 'partial' => $partial_refresh_data['is_partial_refresh'],
58
+ 'nodeId' => $partial_refresh_data['node_id'],
59
+ 'nodeType' => $partial_refresh_data['node_type'],
60
+ 'oldNodeId' => $old_node_id,
61
+ 'html' => $html,
62
+ 'scriptsStyles' => $scripts_styles,
63
+ 'css' => $assets['css'],
64
+ 'js' => $assets['js']
65
+ );
66
+ }
67
+
68
+ /**
69
+ * Renders the layout data for a new row.
70
+ *
71
+ * @since 1.7
72
+ * @param string $cols The type of column layout to use.
73
+ * @param int $position The position of the new row in the layout.
74
+ * @param string $template_id The ID of a row template to render.
75
+ * @return array
76
+ */
77
+ static public function render_new_row( $cols = '1-col', $position = false, $template_id = null )
78
+ {
79
+ // Add a row template?
80
+ if ( $template_id ) {
81
+
82
+ // Add the row template.
83
+ $row = FLBuilderModel::apply_node_template( $template_id, null, $position );
84
+
85
+ // Return the response.
86
+ return self::render( $row->node );
87
+ }
88
+ // Add a standard row.
89
+ else {
90
+
91
+ // Add the row.
92
+ $row = FLBuilderModel::add_row( $cols, $position );
93
+
94
+ // Render the row.
95
+ ob_start();
96
+ FLBuilder::render_row( $row );
97
+ $html = ob_get_clean();
98
+
99
+ // Return the response.
100
+ return array(
101
+ 'partial' => true,
102
+ 'nodeType' => $row->type,
103
+ 'html' => $html,
104
+ 'js' => 'FLBuilder._renderLayoutComplete();'
105
+ );
106
+ }
107
+ }
108
+
109
+ /**
110
+ * Renders the layout data for a copied row.
111
+ *
112
+ * @since 1.7
113
+ * @param string $node_id The ID of a row to copy.
114
+ * @return array
115
+ */
116
+ static public function copy_row( $node_id )
117
+ {
118
+ $row = FLBuilderModel::copy_row( $node_id );
119
+
120
+ return self::render( $row->node );
121
+ }
122
+
123
+ /**
124
+ * Renders the layout data for a new column group.
125
+ *
126
+ * @since 1.7
127
+ * @param string $node_id The node ID of a row to add the new group to.
128
+ * @param string $cols The type of column layout to use.
129
+ * @param int $position The position of the new column group in the row.
130
+ * @return array
131
+ */
132
+ static public function render_new_column_group( $node_id, $cols = '1-col', $position = false )
133
+ {
134
+ // Add the group.
135
+ $group = FLBuilderModel::add_col_group( $node_id, $cols, $position );
136
+
137
+ // Render the group.
138
+ ob_start();
139
+ FLBuilder::render_column_group( $group );
140
+ $html = ob_get_clean();
141
+
142
+ // Return the response.
143
+ return array(
144
+ 'partial' => true,
145
+ 'nodeType' => $group->type,
146
+ 'html' => $html,
147
+ 'js' => 'FLBuilder._renderLayoutComplete();'
148
+ );
149
+ }
150
+
151
+ /**
152
+ * Renders the layout data for a new column.
153
+ *
154
+ * @since 1.7
155
+ * @param string $node_id Node ID of the column to insert before or after.
156
+ * @param string $insert Either before or after.
157
+ * @return array
158
+ */
159
+ static public function render_new_column( $node_id, $insert )
160
+ {
161
+ // Add the column.
162
+ $col = FLBuilderModel::add_col( $node_id, $insert );
163
+
164
+ // Return the response.
165
+ return self::render( $col->parent );
166
+ }
167
+
168
+ /**
169
+ * Renders the layout data for a new module.
170
+ *
171
+ * @since 1.7
172
+ * @param string $parent_id A column node ID.
173
+ * @param int $position The new module position.
174
+ * @param string $type The type of module.
175
+ * @param string $template_id The ID of a module template to render.
176
+ * @return array
177
+ */
178
+ static public function render_new_module( $parent_id, $position = false, $type = null, $template_id = null )
179
+ {
180
+ // Add a module template?
181
+ if ( $template_id ) {
182
+ $module = FLBuilderModel::apply_node_template( $template_id, $parent_id, $position );
183
+ }
184
+ // Add a standard module.
185
+ else {
186
+ $module = FLBuilderModel::add_default_module( $parent_id, $type, $position );
187
+ }
188
+
189
+ // Render the new module's settings.
190
+ $settings = FLBuilder::render_module_settings( $module->node, $module->settings->type, $module->parent, false );
191
+
192
+ // Maybe render the module's parent for a partial refresh?
193
+ if ( $module->partial_refresh ) {
194
+
195
+ // Get the new module parent.
196
+ $parent = ! $parent_id ? null : FLBuilderModel::get_node( $parent_id );
197
+
198
+ // Get the node to render.
199
+ if ( ! $parent ) {
200
+ $row = FLBuilderModel::get_module_parent( 'row', $module );
201
+ $render_id = $row->node;
202
+ }
203
+ else if ( $parent->type == 'row' ) {
204
+ $col = FLBuilderModel::get_module_parent( 'column-group', $module );
205
+ $render_id = $col->node;
206
+ }
207
+ else {
208
+ $render_id = $module->node;
209
+ }
210
+ }
211
+ else {
212
+ $render_id = null;
213
+ }
214
+
215
+ // Return the response.
216
+ return array(
217
+ 'layout' => self::render( $render_id ),
218
+ 'settings' => $settings['settings']
219
+ );
220
+ }
221
+
222
+ /**
223
+ * Renders the layout data for a copied module.
224
+ *
225
+ * @since 1.7
226
+ * @param string $node_id The ID of a module to copy.
227
+ * @return array
228
+ */
229
+ static public function copy_module( $node_id )
230
+ {
231
+ $module = FLBuilderModel::copy_module( $node_id );
232
+
233
+ return self::render( $module->node );
234
+ }
235
+
236
+ /**
237
+ * Returns an array of partial refresh data.
238
+ *
239
+ * @since 1.7
240
+ * @access private
241
+ * @return array
242
+ */
243
+ static private function get_partial_refresh_data()
244
+ {
245
+ // Get the data if it's not cached.
246
+ if ( ! self::$partial_refresh_data ) {
247
+
248
+ $post_data = FLBuilderModel::get_post_data();
249
+ $partial_refresh = false;
250
+
251
+ // Check for partial refresh if we have a node ID.
252
+ if ( isset( $post_data['node_id'] ) ) {
253
+
254
+ // Get the node.
255
+ $node_id = $post_data['node_id'];
256
+ $node = FLBuilderModel::get_node( $post_data['node_id'] );
257
+
258
+ // Check a module for partial refresh.
259
+ if ( $node && 'module' == $node->type ) {
260
+ $node = FLBuilderModel::get_module( $node_id );
261
+ $node_type = 'module';
262
+ $partial_refresh = $node->partial_refresh;
263
+ }
264
+ // Always partial refresh rows and columns.
265
+ else if ( $node ) {
266
+ $node_type = $node->type;
267
+ $partial_refresh = self::node_modules_support_partial_refresh( $node );
268
+ }
269
+ }
270
+
271
+ // Clear the node data if we're not doing a partial refresh.
272
+ if ( ! $partial_refresh ) {
273
+ $node_id = null;
274
+ $node = null;
275
+ $node_type = null;
276
+ }
277
+
278
+ // Cache the partial refresh data.
279
+ self::$partial_refresh_data = array(
280
+ 'is_partial_refresh' => $partial_refresh,
281
+ 'node_id' => $node_id,
282
+ 'node' => $node,
283
+ 'node_type' => $node_type
284
+ );
285
+ }
286
+
287
+ // Return the data.
288
+ return self::$partial_refresh_data;
289
+ }
290
+
291
+ /**
292
+ * Checks to see if all modules in a node support partial refresh.
293
+ *
294
+ * @since 1.7
295
+ * @access private
296
+ * @param object $node The node to check.
297
+ * @return bool
298
+ */
299
+ static private function node_modules_support_partial_refresh( $node )
300
+ {
301
+ $nodes = FLBuilderModel::get_categorized_nodes();
302
+
303
+ if ( 'row' == $node->type ) {
304
+
305
+ $template_post_id = FLBuilderModel::is_node_global( $node );
306
+
307
+ foreach( $nodes['groups'] as $group ) {
308
+ if ( $node->node == $group->parent || ( $template_post_id && $node->template_node_id == $group->parent ) ) {
309
+ foreach( $nodes['columns'] as $column ) {
310
+ if ( $group->node == $column->parent ) {
311
+ foreach( $nodes['modules'] as $module ) {
312
+ if ( $column->node == $module->parent ) {
313
+ if ( ! $module->partial_refresh ) {
314
+ return false;
315
+ }
316
+ }
317
+ }
318
+ }
319
+ }
320
+ }
321
+ }
322
+ }
323
+ else if ( 'column-group' == $node->type ) {
324
+ foreach( $nodes['columns'] as $column ) {
325
+ if ( $node->node == $column->parent ) {
326
+ foreach( $nodes['modules'] as $module ) {
327
+ if ( $column->node == $module->parent ) {
328
+ if ( ! $module->partial_refresh ) {
329
+ return false;
330
+ }
331
+ }
332
+ }
333
+ }
334
+ }
335
+ }
336
+ else if ( 'column' == $node->type ) {
337
+ foreach( $nodes['modules'] as $module ) {
338
+ if ( $node->node == $module->parent ) {
339
+ if ( ! $module->partial_refresh ) {
340
+ return false;
341
+ }
342
+ }
343
+ }
344
+ }
345
+
346
+ return true;
347
+ }
348
+
349
+ /**
350
+ * Renders the html for the layout or node.
351
+ *
352
+ * @since 1.7
353
+ * @access private
354
+ * @return string
355
+ */
356
+ static private function render_html()
357
+ {
358
+ // Get the partial refresh data.
359
+ $partial_refresh_data = self::get_partial_refresh_data();
360
+
361
+ // Start the output buffer.
362
+ ob_start();
363
+
364
+ // Render a node?
365
+ if ( $partial_refresh_data['is_partial_refresh'] ) {
366
+
367
+ switch ( $partial_refresh_data[ 'node' ]->type ) {
368
+
369
+ case 'row':
370
+ FLBuilder::render_row( $partial_refresh_data['node'] );
371
+ break;
372
+
373
+ case 'column-group':
374
+ FLBuilder::render_column_group( $partial_refresh_data['node'] );
375
+ break;
376
+
377
+ case 'column':
378
+ FLBuilder::render_column( $partial_refresh_data['node'] );
379
+ break;
380
+
381
+ case 'module':
382
+ FLBuilder::render_module( $partial_refresh_data['node'] );
383
+ break;
384
+ }
385
+ }
386
+ // Render the layout.
387
+ else {
388
+ FLBuilder::render_nodes();
389
+ }
390
+
391
+ // Get the rendered HTML.
392
+ $html = ob_get_clean();
393
+
394
+ // Process shortcodes and return the HTML.
395
+ ob_start();
396
+ echo do_shortcode( $html );
397
+ return ob_get_clean();
398
+ }
399
+
400
+ /**
401
+ * Renders the assets for the layout or a node.
402
+ *
403
+ * @since 1.7
404
+ * @access private
405
+ * @return array
406
+ */
407
+ static private function render_assets()
408
+ {
409
+ $partial_refresh_data = self::get_partial_refresh_data();
410
+ $asset_info = FLBuilderModel::get_asset_info();
411
+ $asset_ver = FLBuilderModel::get_asset_version();
412
+ $assets = array( 'js' => '', 'css' => '' );
413
+
414
+ // Render the JS.
415
+ if ( $partial_refresh_data['is_partial_refresh'] ) {
416
+
417
+ if ( ! class_exists( 'FLJSMin' ) ) {
418
+ include FL_BUILDER_DIR . 'classes/class-fl-jsmin.php';
419
+ }
420
+
421
+ switch ( $partial_refresh_data['node']->type ) {
422
+
423
+ case 'row':
424
+ $assets['js'] = FLBuilder::render_row_js( $partial_refresh_data['node'] );
425
+ $assets['js'] .= FLBuilder::render_row_modules_js( $partial_refresh_data['node'] );
426
+ break;
427
+
428
+ case 'column':
429
+ $assets['js'] = FLBuilder::render_column_modules_js( $partial_refresh_data['node'] );
430
+ break;
431
+
432
+ case 'module':
433
+ $assets['js'] = FLBuilder::render_module_js( $partial_refresh_data['node'] );
434
+ break;
435
+ }
436
+
437
+ $assets['js'] .= 'FLBuilder._renderLayoutComplete();';
438
+ $assets['js'] = FLJSMin::minify( $assets['js'] );
439
+ }
440
+ else {
441
+ $assets['js'] = $asset_info['js_url'] . '?ver=' . $asset_ver;
442
+ }
443
+
444
+ // Render the CSS.
445
+ $assets['css'] = $asset_info['css_url'] . '?ver=' . $asset_ver;
446
+
447
+ // Return the assets.
448
+ return $assets;
449
+ }
450
+
451
+ /**
452
+ * Do the wp_enqueue_scripts action to register any scripts or
453
+ * styles that might need to be registered for shortcodes or widgets.
454
+ *
455
+ * @since 1.7
456
+ * @access private
457
+ * @return void
458
+ */
459
+ static private function register_scripts()
460
+ {
461
+ ob_start();
462
+ do_action( 'wp_enqueue_scripts' );
463
+ ob_end_clean();
464
+ }
465
+
466
+ /**
467
+ * Dequeue scripts and styles so we can capture only those
468
+ * enqueued by shortcodes or widgets.
469
+ *
470
+ * @since 1.7
471
+ * @access private
472
+ * @return void
473
+ */
474
+ static private function dequeue_scripts_and_styles()
475
+ {
476
+ global $wp_scripts;
477
+ global $wp_styles;
478
+
479
+ if ( isset( $wp_scripts ) ) {
480
+ $wp_scripts->queue = array();
481
+ }
482
+ if ( isset( $wp_styles ) ) {
483
+ $wp_styles->queue = array();
484
+ }
485
+
486
+ remove_action( 'wp_print_styles', 'print_emoji_styles' );
487
+ }
488
+
489
+ /**
490
+ * Renders scripts and styles enqueued by shortcodes or widgets.
491
+ *
492
+ * @since 1.7
493
+ * @access private
494
+ * @return string
495
+ */
496
+ static private function render_scripts_and_styles()
497
+ {
498
+ global $wp_scripts;
499
+ global $wp_styles;
500
+
501
+ $partial_refresh_data = self::get_partial_refresh_data();
502
+ $scripts_styles = '';
503
+
504
+ // Start the output buffer.
505
+ ob_start();
506
+
507
+ // Print scripts and styles.
508
+ if ( isset( $wp_scripts ) ) {
509
+ $wp_scripts->done[] = 'jquery';
510
+ wp_print_scripts( $wp_scripts->queue );
511
+ }
512
+ if ( isset( $wp_styles ) ) {
513
+ wp_print_styles( $wp_styles->queue );
514
+ }
515
+
516
+ // Return the scripts and styles markup.
517
+ return ob_get_clean();
518
+ }
519
+ }
classes/class-fl-builder-ajax.php ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Front-end AJAX handler for the builder interface. We use this
5
+ * instead of wp_ajax because that only works in the admin and
6
+ * certain things like some shortcodes won't render there. AJAX
7
+ * requests handled through this method only run for logged in users
8
+ * for extra security. Developers creating custom modules that need
9
+ * AJAX should use wp_ajax instead.
10
+ *
11
+ * @since 1.7
12
+ */
13
+ final class FLBuilderAJAX {
14
+
15
+ /**
16
+ * An array of registered action data.
17
+ *
18
+ * @since 1.7
19
+ * @access private
20
+ * @var array $actions
21
+ */
22
+ static private $actions = array();
23
+
24
+ /**
25
+ * Initializes builder AJAX.
26
+ *
27
+ * @since 1.7
28
+ * @return void
29
+ */
30
+ static public function init()
31
+ {
32
+ self::add_actions();
33
+ self::call_action();
34
+ }
35
+
36
+ /**
37
+ * Adds a callable AJAX action.
38
+ *
39
+ * @since 1.7
40
+ * @param string $action The action name.
41
+ * @param string $method The method to call.
42
+ * @param array $args An array of method arg names that are present in the post data.
43
+ * @return void
44
+ */
45
+ static public function add_action( $action, $method, $args = array() )
46
+ {
47
+ self::$actions[ $action ] = array(
48
+ 'method' => $method,
49
+ 'args' => $args
50
+ );
51
+ }
52
+
53
+ /**
54
+ * Adds all callable AJAX actions.
55
+ *
56
+ * @since 1.7
57
+ * @access private
58
+ * @return void
59
+ */
60
+ static private function add_actions()
61
+ {
62
+ // FLBuilder
63
+ self::add_action( 'render_settings_form', 'FLBuilder::render_settings_form', array( 'type', 'settings' ) );
64
+ self::add_action( 'render_node_template_settings', 'FLBuilder::render_node_template_settings', array( 'node_id' ) );
65
+ self::add_action( 'render_row_settings', 'FLBuilder::render_row_settings', array( 'node_id' ) );
66
+ self::add_action( 'render_column_settings', 'FLBuilder::render_column_settings', array( 'node_id' ) );
67
+ self::add_action( 'render_module_settings', 'FLBuilder::render_module_settings', array( 'node_id', 'type', 'parent_id' ) );
68
+ self::add_action( 'render_layout_settings', 'FLBuilder::render_layout_settings' );
69
+ self::add_action( 'render_global_settings', 'FLBuilder::render_global_settings' );
70
+ self::add_action( 'render_template_selector', 'FLBuilder::render_template_selector' );
71
+ self::add_action( 'render_user_template_settings', 'FLBuilder::render_user_template_settings' );
72
+ self::add_action( 'render_icon_selector', 'FLBuilder::render_icon_selector' );
73
+
74
+ // FLBuilderModel
75
+ self::add_action( 'delete_node', 'FLBuilderModel::delete_node', array( 'node_id' ) );
76
+ self::add_action( 'delete_col', 'FLBuilderModel::delete_col', array( 'node_id', 'new_width' ) );
77
+ self::add_action( 'reorder_node', 'FLBuilderModel::reorder_node', array( 'node_id', 'position' ) );
78
+ self::add_action( 'move_node', 'FLBuilderModel::move_node', array( 'node_id', 'new_parent', 'position' ) );
79
+ self::add_action( 'resize_cols', 'FLBuilderModel::resize_cols', array( 'col_id', 'col_width', 'sibling_id', 'sibling_width' ) );
80
+ self::add_action( 'reset_col_widths', 'FLBuilderModel::reset_col_widths', array( 'group_id' ) );
81
+ self::add_action( 'save_settings', 'FLBuilderModel::save_settings', array( 'node_id', 'settings' ) );
82
+ self::add_action( 'save_layout_settings', 'FLBuilderModel::save_layout_settings', array( 'settings' ) );
83
+ self::add_action( 'save_global_settings', 'FLBuilderModel::save_global_settings', array( 'settings' ) );
84
+ self::add_action( 'save_color_presets', 'FLBuilderModel::save_color_presets', array( 'presets' ) );
85
+ self::add_action( 'duplicate_post', 'FLBuilderModel::duplicate_post' );
86
+ self::add_action( 'duplicate_wpml_layout', 'FLBuilderModel::duplicate_wpml_layout', array( 'original_post_id', 'post_id' ) );
87
+ self::add_action( 'save_user_template', 'FLBuilderModel::save_user_template', array( 'settings' ) );
88
+ self::add_action( 'delete_user_template', 'FLBuilderModel::delete_user_template', array( 'template_id' ) );
89
+ self::add_action( 'apply_user_template', 'FLBuilderModel::apply_user_template', array( 'template_id', 'append' ) );
90
+ self::add_action( 'save_node_template', 'FLBuilderModel::save_node_template', array( 'node_id', 'settings' ) );
91
+ self::add_action( 'delete_node_template', 'FLBuilderModel::delete_node_template', array( 'template_id' ) );
92
+ self::add_action( 'apply_template', 'FLBuilderModel::apply_template', array( 'template_id', 'append' ) );
93
+ self::add_action( 'save_layout', 'FLBuilderModel::save_layout' );
94
+ self::add_action( 'save_draft', 'FLBuilderModel::save_draft' );
95
+ self::add_action( 'clear_draft_layout', 'FLBuilderModel::clear_draft_layout' );
96
+ self::add_action( 'disable_builder', 'FLBuilderModel::disable' );
97
+
98
+ // FLBuilderAJAXLayout
99
+ self::add_action( 'render_layout', 'FLBuilderAJAXLayout::render' );
100
+ self::add_action( 'render_new_row', 'FLBuilderAJAXLayout::render_new_row', array( 'cols', 'position', 'template_id' ) );
101
+ self::add_action( 'copy_row', 'FLBuilderAJAXLayout::copy_row', array( 'node_id' ) );
102
+ self::add_action( 'render_new_column_group', 'FLBuilderAJAXLayout::render_new_column_group', array( 'node_id', 'cols', 'position' ) );
103
+ self::add_action( 'render_new_column', 'FLBuilderAJAXLayout::render_new_column', array( 'node_id', 'insert' ) );
104
+ self::add_action( 'render_new_module', 'FLBuilderAJAXLayout::render_new_module', array( 'parent_id', 'position', 'type', 'template_id' ) );
105
+ self::add_action( 'copy_module', 'FLBuilderAJAXLayout::copy_module', array( 'node_id' ) );
106
+
107
+ // FLBuilderServices
108
+ self::add_action( 'render_service_settings', 'FLBuilderServices::render_settings' );
109
+ self::add_action( 'render_service_fields', 'FLBuilderServices::render_fields' );
110
+ self::add_action( 'connect_service', 'FLBuilderServices::connect_service' );
111
+ self::add_action( 'delete_service_account', 'FLBuilderServices::delete_account' );
112
+ self::add_action( 'delete_service_account', 'FLBuilderServices::delete_account' );
113
+
114
+ // FLBuilderAutoSuggest
115
+ self::add_action( 'fl_builder_autosuggest', 'FLBuilderAutoSuggest::init' );
116
+ }
117
+
118
+ /**
119
+ * Runs the current AJAX action.
120
+ *
121
+ * @since 1.7
122
+ * @access private
123
+ * @return void
124
+ */
125
+ static private function call_action()
126
+ {
127
+ // Only run for logged in users.
128
+ if ( ! is_user_logged_in() ) {
129
+ return;
130
+ }
131
+
132
+ // Get the $_POST data.
133
+ $post_data = FLBuilderModel::get_post_data();
134
+
135
+ // Verify the AJAX nonce.
136
+ if ( ! isset( $post_data['_wpnonce'] ) || ! wp_verify_nonce( $post_data['_wpnonce'], 'fl_ajax_update' ) ) {
137
+ return;
138
+ }
139
+
140
+ // Get the post ID.
141
+ $post_id = FLBuilderModel::get_post_id();
142
+
143
+ // Make sure we have a post ID.
144
+ if ( ! $post_id ) {
145
+ return;
146
+ }
147
+
148
+ // Make sure the user can edit this post.
149
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
150
+ return;
151
+ }
152
+
153
+ // Get the action.
154
+ if ( ! empty( $_REQUEST['fl_action'] ) ) {
155
+ $action = $_REQUEST['fl_action'];
156
+ }
157
+ else if( ! empty( $post_data['fl_action'] ) ) {
158
+ $action = $post_data['fl_action'];
159
+ }
160
+ else {
161
+ return;
162
+ }
163
+
164
+ // Make sure the action exists.
165
+ if ( ! isset( self::$actions[ $action ] ) ) {
166
+ return;
167
+ }
168
+
169
+ // Get the action data.
170
+ $action = self::$actions[ $action ];
171
+ $args = array();
172
+
173
+ // Build the args array.
174
+ foreach ( $action['args'] as $arg ) {
175
+ $args[] = isset( $post_data[ $arg ] ) ? $post_data[ $arg ] : null;
176
+ }
177
+
178
+ // Tell WordPress this is an AJAX request.
179
+ define( 'DOING_AJAX', true );
180
+
181
+ // Call the method.
182
+ $result = call_user_func_array( $action['method'], $args );
183
+
184
+ // JSON encode the result.
185
+ echo json_encode( $result );
186
+
187
+ // Complete the request.
188
+ die();
189
+ }
190
+ }
classes/class-fl-builder-auto-suggest.php CHANGED
@@ -12,7 +12,7 @@ final class FLBuilderAutoSuggest {
12
  * the data will be echoed as a JSON response.
13
  *
14
  * @since 1.2.3
15
- * @return void
16
  */
17
  static public function init()
18
  {
@@ -38,8 +38,7 @@ final class FLBuilderAutoSuggest {
38
  }
39
 
40
  if(isset($data)) {
41
- echo json_encode($data);
42
- die();
43
  }
44
  }
45
  }
12
  * the data will be echoed as a JSON response.
13
  *
14
  * @since 1.2.3
15
+ * @return array
16
  */
17
  static public function init()
18
  {
38
  }
39
 
40
  if(isset($data)) {
41
+ return $data;
 
42
  }
43
  }
44
  }
classes/class-fl-builder-fonts.php CHANGED
@@ -95,6 +95,7 @@ final class FLBuilderFonts {
95
 
96
  $weight_string = array(
97
  'default' => __( 'Default', 'fl-builder' ),
 
98
  '100' => 'Thin 100',
99
  '200' => 'Extra-Light 200',
100
  '300' => 'Light 300',
@@ -280,2382 +281,2642 @@ final class FLBuilderFontFamilies {
280
  * @var array
281
  */
282
  static public $google = array(
283
- "ABeeZee" => array(
284
- "400",
285
- ),
286
- "Abel" => array(
287
- "400",
288
- ),
289
- "Abril Fatface" => array(
290
- "400",
291
- ),
292
- "Aclonica" => array(
293
- "400",
294
- ),
295
- "Acme" => array(
296
- "400",
297
- ),
298
- "Actor" => array(
299
- "400",
300
- ),
301
- "Adamina" => array(
302
- "400",
303
- ),
304
- "Advent Pro" => array(
305
- "100",
306
- "200",
307
- "300",
308
- "400",
309
- "500",
310
- "600",
311
- "700",
312
- ),
313
- "Aguafina Script" => array(
314
- "400",
315
- ),
316
- "Akronim" => array(
317
- "400",
318
- ),
319
- "Aladin" => array(
320
- "400",
321
- ),
322
- "Aldrich" => array(
323
- "400",
324
- ),
325
- "Alef" => array(
326
- "400",
327
- "700",
328
- ),
329
- "Alegreya" => array(
330
- "400",
331
- "700",
332
- "900",
333
- ),
334
- "Alegreya SC" => array(
335
- "400",
336
- "700",
337
- "900",
338
- ),
339
- "Alegreya Sans" => array(
340
- "100",
341
- "300",
342
- "400",
343
- "500",
344
- "700",
345
- "800",
346
- "900",
347
- ),
348
- "Alegreya Sans SC" => array(
349
- "100",
350
- "300",
351
- "400",
352
- "500",
353
- "700",
354
- "800",
355
- "900",
356
- ),
357
- "Alex Brush" => array(
358
- "400",
359
- ),
360
- "Alfa Slab One" => array(
361
- "400",
362
- ),
363
- "Alice" => array(
364
- "400",
365
- ),
366
- "Alike" => array(
367
- "400",
368
- ),
369
- "Alike Angular" => array(
370
- "400",
371
- ),
372
- "Allan" => array(
373
- "400",
374
- "700",
375
- ),
376
- "Allerta" => array(
377
- "400",
378
- ),
379
- "Allerta Stencil" => array(
380
- "400",
381
- ),
382
- "Allura" => array(
383
- "400",
384
- ),
385
- "Almendra" => array(
386
- "400",
387
- "700",
388
- ),
389
- "Almendra Display" => array(
390
- "400",
391
- ),
392
- "Almendra SC" => array(
393
- "400",
394
- ),
395
- "Amarante" => array(
396
- "400",
397
- ),
398
- "Amaranth" => array(
399
- "400",
400
- "700",
401
- ),
402
- "Amatic SC" => array(
403
- "400",
404
- "700",
405
- ),
406
- "Amethysta" => array(
407
- "400",
408
- ),
409
- "Anaheim" => array(
410
- "400",
411
- ),
412
- "Andada" => array(
413
- "400",
414
- ),
415
- "Andika" => array(
416
- "400",
417
- ),
418
- "Angkor" => array(
419
- "400",
420
- ),
421
- "Annie Use Your Telescope" => array(
422
- "400",
423
- ),
424
- "Anonymous Pro" => array(
425
- "400",
426
- "700",
427
- ),
428
- "Antic" => array(
429
- "400",
430
- ),
431
- "Antic Didone" => array(
432
- "400",
433
- ),
434
- "Antic Slab" => array(
435
- "400",
436
- ),
437
- "Anton" => array(
438
- "400",
439
- ),
440
- "Arapey" => array(
441
- "400",
442
- ),
443
- "Arbutus" => array(
444
- "400",
445
- ),
446
- "Arbutus Slab" => array(
447
- "400",
448
- ),
449
- "Architects Daughter" => array(
450
- "400",
451
- ),
452
- "Archivo Black" => array(
453
- "400",
454
- ),
455
- "Archivo Narrow" => array(
456
- "400",
457
- "700",
458
- ),
459
- "Arimo" => array(
460
- "400",
461
- "700",
462
- ),
463
- "Arizonia" => array(
464
- "400",
465
- ),
466
- "Armata" => array(
467
- "400",
468
- ),
469
- "Artifika" => array(
470
- "400",
471
- ),
472
- "Arvo" => array(
473
- "400",
474
- "700",
475
- ),
476
- "Asap" => array(
477
- "400",
478
- "700",
479
- ),
480
- "Asset" => array(
481
- "400",
482
- ),
483
- "Astloch" => array(
484
- "400",
485
- "700",
486
- ),
487
- "Asul" => array(
488
- "400",
489
- "700",
490
- ),
491
- "Atomic Age" => array(
492
- "400",
493
- ),
494
- "Aubrey" => array(
495
- "400",
496
- ),
497
- "Audiowide" => array(
498
- "400",
499
- ),
500
- "Autour One" => array(
501
- "400",
502
- ),
503
- "Average" => array(
504
- "400",
505
- ),
506
- "Average Sans" => array(
507
- "400",
508
- ),
509
- "Averia Gruesa Libre" => array(
510
- "400",
511
- ),
512
- "Averia Libre" => array(
513
- "300",
514
- "400",
515
- "700",
516
- ),
517
- "Averia Sans Libre" => array(
518
- "300",
519
- "400",
520
- "700",
521
- ),
522
- "Averia Serif Libre" => array(
523
- "300",
524
- "400",
525
- "700",
526
- ),
527
- "Bad Script" => array(
528
- "400",
529
- ),
530
- "Balthazar" => array(
531
- "400",
532
- ),
533
- "Bangers" => array(
534
- "400",
535
- ),
536
- "Basic" => array(
537
- "400",
538
- ),
539
- "Battambang" => array(
540
- "400",
541
- "700",
542
- ),
543
- "Baumans" => array(
544
- "400",
545
- ),
546
- "Bayon" => array(
547
- "400",
548
- ),
549
- "Belgrano" => array(
550
- "400",
551
- ),
552
- "Belleza" => array(
553
- "400",
554
- ),
555
- "BenchNine" => array(
556
- "300",
557
- "400",
558
- "700",
559
- ),
560
- "Bentham" => array(
561
- "400",
562
- ),
563
- "Berkshire Swash" => array(
564
- "400",
565
- ),
566
- "Bevan" => array(
567
- "400",
568
- ),
569
- "Bigelow Rules" => array(
570
- "400",
571
- ),
572
- "Bigshot One" => array(
573
- "400",
574
- ),
575
- "Bilbo" => array(
576
- "400",
577
- ),
578
- "Bilbo Swash Caps" => array(
579
- "400",
580
- ),
581
- "Bitter" => array(
582
- "400",
583
- "700",
584
- ),
585
- "Black Ops One" => array(
586
- "400",
587
- ),
588
- "Bokor" => array(
589
- "400",
590
- ),
591
- "Bonbon" => array(
592
- "400",
593
- ),
594
- "Boogaloo" => array(
595
- "400",
596
- ),
597
- "Bowlby One" => array(
598
- "400",
599
- ),
600
- "Bowlby One SC" => array(
601
- "400",
602
- ),
603
- "Brawler" => array(
604
- "400",
605
- ),
606
- "Bree Serif" => array(
607
- "400",
608
- ),
609
- "Bubblegum Sans" => array(
610
- "400",
611
- ),
612
- "Bubbler One" => array(
613
- "400",
614
- ),
615
- "Buda" => array(
616
- "300",
617
- ),
618
- "Buenard" => array(
619
- "400",
620
- "700",
621
- ),
622
- "Butcherman" => array(
623
- "400",
624
- ),
625
- "Butterfly Kids" => array(
626
- "400",
627
- ),
628
- "Cabin" => array(
629
- "400",
630
- "500",
631
- "600",
632
- "700",
633
- ),
634
- "Cabin Condensed" => array(
635
- "400",
636
- "500",
637
- "600",
638
- "700",
639
- ),
640
- "Cabin Sketch" => array(
641
- "400",
642
- "700",
643
- ),
644
- "Caesar Dressing" => array(
645
- "400",
646
- ),
647
- "Cagliostro" => array(
648
- "400",
649
- ),
650
- "Calligraffitti" => array(
651
- "400",
652
- ),
653
- "Cambo" => array(
654
- "400",
655
- ),
656
- "Candal" => array(
657
- "400",
658
- ),
659
- "Cantarell" => array(
660
- "400",
661
- "700",
662
- ),
663
- "Cantata One" => array(
664
- "400",
665
- ),
666
- "Cantora One" => array(
667
- "400",
668
- ),
669
- "Capriola" => array(
670
- "400",
671
- ),
672
- "Cardo" => array(
673
- "400",
674
- "700",
675
- ),
676
- "Carme" => array(
677
- "400",
678
- ),
679
- "Carrois Gothic" => array(
680
- "400",
681
- ),
682
- "Carrois Gothic SC" => array(
683
- "400",
684
- ),
685
- "Carter One" => array(
686
- "400",
687
- ),
688
- "Caudex" => array(
689
- "400",
690
- "700",
691
- ),
692
- "Cedarville Cursive" => array(
693
- "400",
694
- ),
695
- "Ceviche One" => array(
696
- "400",
697
- ),
698
- "Changa One" => array(
699
- "400",
700
- ),
701
- "Chango" => array(
702
- "400",
703
- ),
704
- "Chau Philomene One" => array(
705
- "400",
706
- ),
707
- "Chela One" => array(
708
- "400",
709
- ),
710
- "Chelsea Market" => array(
711
- "400",
712
- ),
713
- "Chenla" => array(
714
- "400",
715
- ),
716
- "Cherry Cream Soda" => array(
717
- "400",
718
- ),
719
- "Cherry Swash" => array(
720
- "400",
721
- "700",
722
- ),
723
- "Chewy" => array(
724
- "400",
725
- ),
726
- "Chicle" => array(
727
- "400",
728
- ),
729
- "Chivo" => array(
730
- "400",
731
- "900",
732
- ),
733
- "Cinzel" => array(
734
- "400",
735
- "700",
736
- "900",
737
- ),
738
- "Cinzel Decorative" => array(
739
- "400",
740
- "700",
741
- "900",
742
- ),
743
- "Clicker Script" => array(
744
- "400",
745
- ),
746
- "Coda" => array(
747
- "400",
748
- "800",
749
- ),
750
- "Coda Caption" => array(
751
- "800",
752
- ),
753
- "Codystar" => array(
754
- "300",
755
- "400",
756
- ),
757
- "Combo" => array(
758
- "400",
759
- ),
760
- "Comfortaa" => array(
761
- "300",
762
- "400",
763
- "700",
764
- ),
765
- "Coming Soon" => array(
766
- "400",
767
- ),
768
- "Concert One" => array(
769
- "400",
770
- ),
771
- "Condiment" => array(
772
- "400",
773
- ),
774
- "Content" => array(
775
- "400",
776
- "700",
777
- ),
778
- "Contrail One" => array(
779
- "400",
780
- ),
781
- "Convergence" => array(
782
- "400",
783
- ),
784
- "Cookie" => array(
785
- "400",
786
- ),
787
- "Copse" => array(
788
- "400",
789
- ),
790
- "Corben" => array(
791
- "400",
792
- "700",
793
- ),
794
- "Courgette" => array(
795
- "400",
796
- ),
797
- "Cousine" => array(
798
- "400",
799
- "700",
800
- ),
801
- "Coustard" => array(
802
- "400",
803
- "900",
804
- ),
805
- "Covered By Your Grace" => array(
806
- "400",
807
- ),
808
- "Crafty Girls" => array(
809
- "400",
810
- ),
811
- "Creepster" => array(
812
- "400",
813
- ),
814
- "Crete Round" => array(
815
- "400",
816
- ),
817
- "Crimson Text" => array(
818
- "400",
819
- "600",
820
- "700",
821
- ),
822
- "Croissant One" => array(
823
- "400",
824
- ),
825
- "Crushed" => array(
826
- "400",
827
- ),
828
- "Cuprum" => array(
829
- "400",
830
- "700",
831
- ),
832
- "Cutive" => array(
833
- "400",
834
- ),
835
- "Cutive Mono" => array(
836
- "400",
837
- ),
838
- "Damion" => array(
839
- "400",
840
- ),
841
- "Dancing Script" => array(
842
- "400",
843
- "700",
844
- ),
845
- "Dangrek" => array(
846
- "400",
847
- ),
848
- "Dawning of a New Day" => array(
849
- "400",
850
- ),
851
- "Days One" => array(
852
- "400",
853
- ),
854
- "Delius" => array(
855
- "400",
856
- ),
857
- "Delius Swash Caps" => array(
858
- "400",
859
- ),
860
- "Delius Unicase" => array(
861
- "400",
862
- "700",
863
- ),
864
- "Della Respira" => array(
865
- "400",
866
- ),
867
- "Denk One" => array(
868
- "400",
869
- ),
870
- "Devonshire" => array(
871
- "400",
872
- ),
873
- "Dhurjati" => array(
874
- "400",
875
- ),
876
- "Didact Gothic" => array(
877
- "400",
878
- ),
879
- "Diplomata" => array(
880
- "400",
881
- ),
882
- "Diplomata SC" => array(
883
- "400",
884
- ),
885
- "Domine" => array(
886
- "400",
887
- "700",
888
- ),
889
- "Donegal One" => array(
890
- "400",
891
- ),
892
- "Doppio One" => array(
893
- "400",
894
- ),
895
- "Dorsa" => array(
896
- "400",
897
- ),
898
- "Dosis" => array(
899
- "200",
900
- "300",
901
- "400",
902
- "500",
903
- "600",
904
- "700",
905
- "800",
906
- ),
907
- "Dr Sugiyama" => array(
908
- "400",
909
- ),
910
- "Droid Sans" => array(
911
- "400",
912
- "700",
913
- ),
914
- "Droid Sans Mono" => array(
915
- "400",
916
- ),
917
- "Droid Serif" => array(
918
- "400",
919
- "700",
920
- ),
921
- "Duru Sans" => array(
922
- "400",
923
- ),
924
- "Dynalight" => array(
925
- "400",
926
- ),
927
- "EB Garamond" => array(
928
- "400",
929
- ),
930
- "Eagle Lake" => array(
931
- "400",
932
- ),
933
- "Eater" => array(
934
- "400",
935
- ),
936
- "Economica" => array(
937
- "400",
938
- "700",
939
- ),
940
- "Ek Mukta" => array(
941
- "200",
942
- "300",
943
- "400",
944
- "500",
945
- "600",
946
- "700",
947
- "800",
948
- ),
949
- "Electrolize" => array(
950
- "400",
951
- ),
952
- "Elsie" => array(
953
- "400",
954
- "900",
955
- ),
956
- "Elsie Swash Caps" => array(
957
- "400",
958
- "900",
959
- ),
960
- "Emblema One" => array(
961
- "400",
962
- ),
963
- "Emilys Candy" => array(
964
- "400",
965
- ),
966
- "Engagement" => array(
967
- "400",
968
- ),
969
- "Englebert" => array(
970
- "400",
971
- ),
972
- "Enriqueta" => array(
973
- "400",
974
- "700",
975
- ),
976
- "Erica One" => array(
977
- "400",
978
- ),
979
- "Esteban" => array(
980
- "400",
981
- ),
982
- "Euphoria Script" => array(
983
- "400",
984
- ),
985
- "Ewert" => array(
986
- "400",
987
- ),
988
- "Exo" => array(
989
- "100",
990
- "200",
991
- "300",
992
- "400",
993
- "500",
994
- "600",
995
- "700",
996
- "800",
997
- "900",
998
- ),
999
- "Exo 2" => array(
1000
- "100",
1001
- "200",
1002
- "300",
1003
- "400",
1004
- "500",
1005
- "600",
1006
- "700",
1007
- "800",
1008
- "900",
1009
- ),
1010
- "Expletus Sans" => array(
1011
- "400",
1012
- "500",
1013
- "600",
1014
- "700",
1015
- ),
1016
- "Fanwood Text" => array(
1017
- "400",
1018
- ),
1019
- "Fascinate" => array(
1020
- "400",
1021
- ),
1022
- "Fascinate Inline" => array(
1023
- "400",
1024
- ),
1025
- "Faster One" => array(
1026
- "400",
1027
- ),
1028
- "Fasthand" => array(
1029
- "400",
1030
- ),
1031
- "Fauna One" => array(
1032
- "400",
1033
- ),
1034
- "Federant" => array(
1035
- "400",
1036
- ),
1037
- "Federo" => array(
1038
- "400",
1039
- ),
1040
- "Felipa" => array(
1041
- "400",
1042
- ),
1043
- "Fenix" => array(
1044
- "400",
1045
- ),
1046
- "Finger Paint" => array(
1047
- "400",
1048
- ),
1049
- "Fira Mono" => array(
1050
- "400",
1051
- "700",
1052
- ),
1053
- "Fira Sans" => array(
1054
- "300",
1055
- "400",
1056
- "500",
1057
- "700",
1058
- ),
1059
- "Fjalla One" => array(
1060
- "400",
1061
- ),
1062
- "Fjord One" => array(
1063
- "400",
1064
- ),
1065
- "Flamenco" => array(
1066
- "300",
1067
- "400",
1068
- ),
1069
- "Flavors" => array(
1070
- "400",
1071
- ),
1072
- "Fondamento" => array(
1073
- "400",
1074
- ),
1075
- "Fontdiner Swanky" => array(
1076
- "400",
1077
- ),
1078
- "Forum" => array(
1079
- "400",
1080
- ),
1081
- "Francois One" => array(
1082
- "400",
1083
- ),
1084
- "Freckle Face" => array(
1085
- "400",
1086
- ),
1087
- "Fredericka the Great" => array(
1088
- "400",
1089
- ),
1090
- "Fredoka One" => array(
1091
- "400",
1092
- ),
1093
- "Freehand" => array(
1094
- "400",
1095
- ),
1096
- "Fresca" => array(
1097
- "400",
1098
- ),
1099
- "Frijole" => array(
1100
- "400",
1101
- ),
1102
- "Fruktur" => array(
1103
- "400",
1104
- ),
1105
- "Fugaz One" => array(
1106
- "400",
1107
- ),
1108
- "GFS Didot" => array(
1109
- "400",
1110
- ),
1111
- "GFS Neohellenic" => array(
1112
- "400",
1113
- "700",
1114
- ),
1115
- "Gabriela" => array(
1116
- "400",
1117
- ),
1118
- "Gafata" => array(
1119
- "400",
1120
- ),
1121
- "Galdeano" => array(
1122
- "400",
1123
- ),
1124
- "Galindo" => array(
1125
- "400",
1126
- ),
1127
- "Gentium Basic" => array(
1128
- "400",
1129
- "700",
1130
- ),
1131
- "Gentium Book Basic" => array(
1132
- "400",
1133
- "700",
1134
- ),
1135
- "Geo" => array(
1136
- "400",
1137
- ),
1138
- "Geostar" => array(
1139
- "400",
1140
- ),
1141
- "Geostar Fill" => array(
1142
- "400",
1143
- ),
1144
- "Germania One" => array(
1145
- "400",
1146
- ),
1147
- "Gidugu" => array(
1148
- "400",
1149
- ),
1150
- "Gilda Display" => array(
1151
- "400",
1152
- ),
1153
- "Give You Glory" => array(
1154
- "400",
1155
- ),
1156
- "Glass Antiqua" => array(
1157
- "400",
1158
- ),
1159
- "Glegoo" => array(
1160
- "400",
1161
- "700",
1162
- ),
1163
- "Gloria Hallelujah" => array(
1164
- "400",
1165
- ),
1166
- "Goblin One" => array(
1167
- "400",
1168
- ),
1169
- "Gochi Hand" => array(
1170
- "400",
1171
- ),
1172
- "Gorditas" => array(
1173
- "400",
1174
- "700",
1175
- ),
1176
- "Goudy Bookletter 1911" => array(
1177
- "400",
1178
- ),
1179
- "Graduate" => array(
1180
- "400",
1181
- ),
1182
- "Grand Hotel" => array(
1183
- "400",
1184
- ),
1185
- "Gravitas One" => array(
1186
- "400",
1187
- ),
1188
- "Great Vibes" => array(
1189
- "400",
1190
- ),
1191
- "Griffy" => array(
1192
- "400",
1193
- ),
1194
- "Gruppo" => array(
1195
- "400",
1196
- ),
1197
- "Gudea" => array(
1198
- "400",
1199
- "700",
1200
- ),
1201
- "Habibi" => array(
1202
- "400",
1203
- ),
1204
- "Halant" => array(
1205
- "300",
1206
- "400",
1207
- "500",
1208
- "600",
1209
- "700",
1210
- ),
1211
- "Hammersmith One" => array(
1212
- "400",
1213
- ),
1214
- "Hanalei" => array(
1215
- "400",
1216
- ),
1217
- "Hanalei Fill" => array(
1218
- "400",
1219
- ),
1220
- "Handlee" => array(
1221
- "400",
1222
- ),
1223
- "Hanuman" => array(
1224
- "400",
1225
- "700",
1226
- ),
1227
- "Happy Monkey" => array(
1228
- "400",
1229
- ),
1230
- "Headland One" => array(
1231
- "400",
1232
- ),
1233
- "Henny Penny" => array(
1234
- "400",
1235
- ),
1236
- "Herr Von Muellerhoff" => array(
1237
- "400",
1238
- ),
1239
- "Hind" => array(
1240
- "300",
1241
- "400",
1242
- "500",
1243
- "600",
1244
- "700",
1245
- ),
1246
- "Holtwood One SC" => array(
1247
- "400",
1248
- ),
1249
- "Homemade Apple" => array(
1250
- "400",
1251
- ),
1252
- "Homenaje" => array(
1253
- "400",
1254
- ),
1255
- "IM Fell DW Pica" => array(
1256
- "400",
1257
- ),
1258
- "IM Fell DW Pica SC" => array(
1259
- "400",
1260
- ),
1261
- "IM Fell Double Pica" => array(
1262
- "400",
1263
- ),
1264
- "IM Fell Double Pica SC" => array(
1265
- "400",
1266
- ),
1267
- "IM Fell English" => array(
1268
- "400",
1269
- ),
1270
- "IM Fell English SC" => array(
1271
- "400",
1272
- ),
1273
- "IM Fell French Canon" => array(
1274
- "400",
1275
- ),
1276
- "IM Fell French Canon SC" => array(
1277
- "400",
1278
- ),
1279
- "IM Fell Great Primer" => array(
1280
- "400",
1281
- ),
1282
- "IM Fell Great Primer SC" => array(
1283
- "400",
1284
- ),
1285
- "Iceberg" => array(
1286
- "400",
1287
- ),
1288
- "Iceland" => array(
1289
- "400",
1290
- ),
1291
- "Imprima" => array(
1292
- "400",
1293
- ),
1294
- "Inconsolata" => array(
1295
- "400",
1296
- "700",
1297
- ),
1298
- "Inder" => array(
1299
- "400",
1300
- ),
1301
- "Indie Flower" => array(
1302
- "400",
1303
- ),
1304
- "Inika" => array(
1305
- "400",
1306
- "700",
1307
- ),
1308
- "Irish Grover" => array(
1309
- "400",
1310
- ),
1311
- "Istok Web" => array(
1312
- "400",
1313
- "700",
1314
- ),
1315
- "Italiana" => array(
1316
- "400",
1317
- ),
1318
- "Italianno" => array(
1319
- "400",
1320
- ),
1321
- "Jacques Francois" => array(
1322
- "400",
1323
- ),
1324
- "Jacques Francois Shadow" => array(
1325
- "400",
1326
- ),
1327
- "Jim Nightshade" => array(
1328
- "400",
1329
- ),
1330
- "Jockey One" => array(
1331
- "400",
1332
- ),
1333
- "Jolly Lodger" => array(
1334
- "400",
1335
- ),
1336
- "Josefin Sans" => array(
1337
- "100",
1338
- "300",
1339
- "400",
1340
- "600",
1341
- "700",
1342
- ),
1343
- "Josefin Slab" => array(
1344
- "100",
1345
- "300",
1346
- "400",
1347
- "600",
1348
- "700",
1349
- ),
1350
- "Joti One" => array(
1351
- "400",
1352
- ),
1353
- "Judson" => array(
1354
- "400",
1355
- "700",
1356
- ),
1357
- "Julee" => array(
1358
- "400",
1359
- ),
1360
- "Julius Sans One" => array(
1361
- "400",
1362
- ),
1363
- "Junge" => array(
1364
- "400",
1365
- ),
1366
- "Jura" => array(
1367
- "300",
1368
- "400",
1369
- "500",
1370
- "600",
1371
- ),
1372
- "Just Another Hand" => array(
1373
- "400",
1374
- ),
1375
- "Just Me Again Down Here" => array(
1376
- "400",
1377
- ),
1378
- "Kalam" => array(
1379
- "300",
1380
- "400",
1381
- "700",
1382
- ),
1383
- "Kameron" => array(
1384
- "400",
1385
- "700",
1386
- ),
1387
- "Kantumruy" => array(
1388
- "300",
1389
- "400",
1390
- "700",
1391
- ),
1392
- "Karla" => array(
1393
- "400",
1394
- "700",
1395
- ),
1396
- "Karma" => array(
1397
- "300",
1398
- "400",
1399
- "500",
1400
- "600",
1401
- "700",
1402
- ),
1403
- "Kaushan Script" => array(
1404
- "400",
1405
- ),
1406
- "Kavoon" => array(
1407
- "400",
1408
- ),
1409
- "Kdam Thmor" => array(
1410
- "400",
1411
- ),
1412
- "Keania One" => array(
1413
- "400",
1414
- ),
1415
- "Kelly Slab" => array(
1416
- "400",
1417
- ),
1418
- "Kenia" => array(
1419
- "400",
1420
- ),
1421
- "Khand" => array(
1422
- "300",