PluginProbe
Gutenify – Visual Site Builder Blocks & Starter Templates / 1.0.7
Gutenify – Visual Site Builder Blocks & Starter Templates v1.0.7
1.9.0 1.8.0 1.7.0 1.6.6 1.6.5 1.6.4 trunk 0.0.1 0.0.2 0.0.3 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 All 74 releases
gutenify / inc / class-block-assets.php

class-block-assets.php in Gutenify – Visual Site Builder Blocks & Starter Templates 1.0.7, at inc/class-block-assets.php

617 lines 19.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Load assets for our blocks.
4 *
5 * @package Gutenify
6 */
7
8 // Exit if accessed directly.
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 /**
14 * Load general assets for our blocks.
15 *
16 * @since 1.0.0
17 */
18 class Gutenify_Block_Assets {
19 /**
20 * This plugin's instance.
21 *
22 * @var Gutenify_Block_Assets
23 */
24 private static $instance;
25
26 /**
27 * Registers the plugin.
28 *
29 * @return Gutenify_Block_Assets
30 */
31 public static function register() {
32 if ( null === self::$instance ) {
33 self::$instance = new Gutenify_Block_Assets();
34 }
35
36 return self::$instance;
37 }
38
39 /**
40 * The Constructor.
41 */
42 public function __construct() {
43 add_action( 'enqueue_block_assets', array( $this, 'block_assets' ) );
44 add_action( 'init', array( $this, 'editor_assets' ) );
45 add_action( 'wp_enqueue_scripts', array( $this, 'add_block_inline_css' ), 200 );
46 add_action( 'admin_footer', array( $this, 'add_admin_global_inline_css' ), 200 );
47 add_action( 'wp_enqueue_scripts', array( $this, 'frontend_scripts' ), 9 );
48 add_action( 'enqueue_block_editor_assets', array( $this, 'editor_scripts' ) );
49 add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
50 }
51
52 /**
53 * Loads the asset file for the given script or style.
54 * Returns a default if the asset file is not found.
55 *
56 * @param string $filepath The name of the file without the extension.
57 *
58 * @return array The asset file contents.
59 */
60 public function get_asset_file( $filepath ) {
61 $asset_path = GUTENIFY_PLUGIN_DIR . $filepath . '.asset.php';
62
63 return file_exists( $asset_path )
64 ? include $asset_path
65 : array(
66 'dependencies' => array(),
67 'version' => GUTENIFY_VERSION,
68 );
69 }
70
71 /**
72 * Enqueue block assets for use within Gutenberg.
73 *
74 * @access public
75 */
76 public function block_assets() {
77 if ( is_admin() ) {
78 return false;
79 }
80 global $post;
81
82 // Only load the front end CSS if a Gutenify is in use.
83 $has_gutenify = ! is_singular();
84
85 if ( ! is_admin() && is_singular() ) {
86 $wp_post = get_post( $post );
87
88 // This is similar to has_block() in core, but will match anything
89 // in the gutenify/* namespace.
90 if ( $wp_post instanceof WP_Post ) {
91 $has_gutenify = ! empty(
92 array_filter(
93 array(
94 false !== strpos( $wp_post->post_content, '<!-- wp:gutenify/' ),
95 has_block( 'core/block', $wp_post ),
96 has_block( 'core/button', $wp_post ),
97 has_block( 'core/cover', $wp_post ),
98 has_block( 'core/heading', $wp_post ),
99 has_block( 'core/image', $wp_post ),
100 has_block( 'core/gallery', $wp_post ),
101 has_block( 'core/list', $wp_post ),
102 has_block( 'core/paragraph', $wp_post ),
103 has_block( 'core/pullquote', $wp_post ),
104 has_block( 'core/quote', $wp_post ),
105 )
106 )
107 );
108 }
109 }
110
111 // if ( ! $has_gutenify && ! $this->is_page_gutenberg() ) {
112 // return;
113 // }
114
115 $fonts_url = gutenify_fonts_url();
116 wp_enqueue_style( 'gutenify-fonts', $fonts_url, array(), null );
117
118 // Styles.
119 $name = 'gutenify-style';
120 $filepath = 'dist/' . $name;
121 $asset_file = $this->get_asset_file( $filepath );
122 $rtl = ! is_rtl() ? '' : '-rtl';
123
124 $deps = array( 'gutenify-fontawesome-style' );
125
126 if ( $fonts_url ) {
127 $deps[] = 'gutenify-fonts';
128 }
129
130 global $wp_styles;
131 if ( in_array( 'global-styles', $wp_styles->queue ) ) {
132 $deps[] = 'global-styles';
133 }
134 if ( in_array( 'woocommerce-layout', $wp_styles->queue ) ) {
135 $deps[] = 'woocommerce-layout';
136 }
137
138 wp_enqueue_style( 'gutenify-frontend', GUTENIFY_PLUGIN_URL . $filepath . $rtl . '.css', $deps, $asset_file['version'] );
139
140 // Styles.
141 $name = 'gutenify-theme-style';
142 $filepath = 'dist/' . $name;
143 $asset_file = $this->get_asset_file( $filepath );
144 $rtl = ! is_rtl() ? '' : '-rtl';
145
146 $deps = array( 'gutenify-frontend' );
147
148 // wp_enqueue_style( $name, GUTENIFY_PLUGIN_URL . $filepath . $rtl . '.css', $deps, $asset_file['version'] );
149 }
150
151 /**
152 * Enqueue block assets for use within Gutenberg.
153 *
154 * @access public
155 */
156 public function editor_assets() {
157
158 // Styles.
159 $name = 'gutenify-editor';
160 $filepath = 'dist/' . $name;
161 $asset_file = $this->get_asset_file( $filepath );
162 $rtl = ! is_rtl() ? '' : '-rtl';
163
164 wp_register_style( 'gutenify-fontawesome-style', GUTENIFY_PLUGIN_URL . '/assets/fontawesome/css/all.css', array(), 'v4' );
165
166 $fonts_url = gutenify_fonts_url();
167 wp_enqueue_style( 'gutenify-fonts', $fonts_url, array(), null );
168
169 $deps = array( 'gutenify-fontawesome-style' );
170
171 if ( $fonts_url ) {
172 $deps[] = 'gutenify-fonts';
173 }
174
175 if ( class_exists( 'woocommerce' ) ) {
176 $deps[] = 'wc-blocks-editor-style';
177 }
178
179 wp_register_style(
180 'gutenify-editor',
181 GUTENIFY_PLUGIN_URL . $filepath . $rtl . '.css',
182 $deps,
183 $asset_file['version']
184 );
185
186 // Scripts.
187 $name = 'gutenify'; // gutenify.js.
188 $filepath = 'dist/' . $name;
189 $asset_file = $this->get_asset_file( $filepath );
190
191 wp_register_script(
192 'gutenify-editor',
193 GUTENIFY_PLUGIN_URL . $filepath . '.js',
194 array_merge( $asset_file['dependencies'], array( 'wp-api', 'gutenify-global' ) ),
195 $asset_file['version'],
196 true
197 );
198
199 $post_id = filter_input( INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT );
200
201 wp_localize_script(
202 'gutenify-editor',
203 'gutenify_block_data',
204 array(
205 'plugin_directory_url' => esc_url( GUTENIFY_PLUGIN_URL ),
206 'site_url' => esc_url( site_url() ),
207 'settings_url' => esc_url( admin_url( 'edit.php?post_type=gutenify_template&page=gutenify-settings' ) ),
208 'add_template_url' => esc_url( admin_url( 'post-new.php?post_type=gutenify_template' ) ),
209 'is_woocommerce_activated' => class_exists( 'woocommerce' ),
210 )
211 );
212
213 $localized_values = array(
214 'font_families' => gutenify_font_families(),
215 'plugin_directory_url' => esc_url( GUTENIFY_PLUGIN_URL ),
216 'site_url' => esc_url( site_url() ),
217 );
218 wp_localize_script(
219 'gutenify-editor',
220 '_gutenify',
221 apply_filters( 'gutenify-admin-localized-values', $localized_values ),
222 );
223
224 wp_localize_script(
225 'gutenify-editor',
226 '_gutenify_vars',
227 array(
228 'site_url' => esc_url( site_url() ),
229 'plugin_directory_url' => esc_url( GUTENIFY_PLUGIN_URL ),
230 'gutenify_version' => GUTENIFY_VERSION,
231 'pro_license_status' => apply_filters( 'gutenify_pro_license_status', false ),
232 'is_pro_activated' => apply_filters( 'gutenify_pro_activation_status', false ),
233 )
234 );
235 }
236
237 /**
238 * Enqueue front-end assets for blocks.
239 *
240 * @access public
241 * @since 1.9.5
242 */
243 public function frontend_scripts() {
244
245 // Scripts.
246 $name = 'swiper-bundle'; // swiper.js.
247 $filepath = 'assets/js/lib/' . $name;
248
249 wp_register_script(
250 'gutenify-swiper',
251 GUTENIFY_PLUGIN_URL . $filepath . '.js',
252 array( 'jquery' ),
253 '6.8.2',
254 false
255 );
256
257 // Scripts.
258 $name = 'gutenify-frontend'; // gutenify.js.
259 $filepath = 'dist/js/' . $name;
260 $asset_file = $this->get_asset_file( $filepath );
261
262 $deps = array( 'jquery', 'gutenify-swiper' );
263
264 // Enqueue for gutenify animations.
265 wp_enqueue_script(
266 'gutenify-frontend',
267 GUTENIFY_PLUGIN_URL . $filepath . '.js',
268 $deps,
269 GUTENIFY_VERSION,
270 false
271 );
272
273 // Styles.
274 $name = 'swiper-bundle.min'; // swiper.js.
275 $filepath = 'assets/css/lib/' . $name;
276 $asset_file = $this->get_asset_file( $filepath );
277 wp_enqueue_style(
278 'gutenify-swiper-style',
279 GUTENIFY_PLUGIN_URL . $filepath . '.css',
280 array(),
281 '6.8.2'
282 );
283
284 }
285
286 /**
287 * Enqueue editor scripts for blocks.
288 *
289 * @access public
290 * @since 1.9.5
291 */
292 public function editor_scripts() {
293 }
294
295 /**
296 * Return whether a post type should display the Block Editor.
297 *
298 * @param string $post_type The post_type slug to check.
299 */
300 protected function is_post_type_gutenberg( $post_type ) {
301 return use_block_editor_for_post_type( $post_type );
302 }
303
304 /**
305 * Return whether the page we are on is loading the Block Editor.
306 */
307 protected function is_page_gutenberg() {
308 if ( ! is_admin() ) {
309 return false;
310 }
311
312 $admin_page = wp_basename( esc_url( $_SERVER['REQUEST_URI'] ) );
313
314 if ( false !== strpos( $admin_page, 'post-new.php' ) && empty( $_GET['post_type'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
315 return true;
316 }
317
318 if ( false !== strpos( $admin_page, 'post-new.php' ) && isset( $_GET['post_type'] ) && $this->is_post_type_gutenberg( $_GET['post_type'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
319 return true;
320 }
321
322 if ( false !== strpos( $admin_page, 'post.php' ) ) {
323 $wp_post = get_post( $_GET['post'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
324 if ( isset( $wp_post ) && isset( $wp_post->post_type ) && $this->is_post_type_gutenberg( $wp_post->post_type ) ) {
325 return true;
326 }
327 }
328
329 if ( false !== strpos( $admin_page, 'revision.php' ) ) {
330 $wp_post = get_post( $_GET['revision'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
331 $post_parent = get_post( $wp_post->post_parent );
332 if ( isset( $post_parent ) && isset( $post_parent->post_type ) && $this->is_post_type_gutenberg( $post_parent->post_type ) ) {
333 return true;
334 }
335 }
336 return false;
337 }
338
339 /**
340 * Add inline css
341 *
342 * @return void
343 */
344 public static function add_block_inline_css() {
345 if ( is_singular() ) {
346 global $post;
347 // $style_file = trailingslashit( wp_upload_dir()['basedir'] ) . 'gutenify/styles/style-' . 'post-' . $post->ID . '.css';
348
349 // if ( file_exists( $style_file ) ) {
350 // $style_file_url = trailingslashit( wp_upload_dir()['baseurl'] ) . 'gutenify/styles/style-' . 'post-' . $post->ID . '.css';
351
352 // wp_enqueue_style( 'gutenify-frontend-post', $style_file_url, array( 'gutenify-frontend' ), GUTENIFY_VERSION );
353 // } else {
354 // }
355 $post_meta = get_post_meta( $post->ID );
356 $gutenify_custom_css = ! empty( $post_meta['gutenify_custom_css'][0] ) ? $post_meta['gutenify_custom_css'][0] : '';
357 wp_add_inline_style( 'gutenify-frontend', $gutenify_custom_css );
358 }
359 $gutenify_global_style = get_option( 'gutenify_global_style' );
360
361 $deps = array();
362 wp_register_style( 'gutenify-global-inline-handle', false, $deps );
363 wp_enqueue_style( 'gutenify-global-inline-handle' );
364
365 if ( $gutenify_global_style ) {
366 $handle = 'gutenify-global-inline-handle';
367 wp_add_inline_style( $handle, $gutenify_global_style );
368 }
369 }
370
371 /**
372 * Add Global inline css
373 *
374 * @return void
375 */
376 public static function add_admin_global_inline_css() {
377
378 $gutenify_admin_global_style = get_option( 'gutenify_admin_global_style' );
379 $deps = array();
380 wp_register_style( 'gutenify-global-inline-handle', false, $deps );
381 wp_enqueue_style( 'gutenify-global-inline-handle' );
382
383 if ( $gutenify_admin_global_style ) {
384 wp_add_inline_style( 'gutenify-global-inline-handle', $gutenify_admin_global_style );
385 }
386 }
387
388 /**
389 * Admin scripts.
390 *
391 * @return mixed
392 */
393 public function admin_scripts() {
394 // Scripts.
395 $name = 'gutenify-global'; // gutenify.js.
396 $filepath = 'dist/' . $name;
397 $asset_file = $this->get_asset_file( $filepath );
398
399 // Enqueue for gutenify animations.
400 wp_register_script(
401 $name,
402 GUTENIFY_PLUGIN_URL . $filepath . '.js',
403 $asset_file['dependencies'],
404 $asset_file['version'],
405 true
406 );
407
408 // Getting Started.
409 if ( ( ! empty( $_GET['page'] ) && 'gutenify' === $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
410 // Scripts.
411 $name = 'gutenify-getting-started-admin'; // gutenify.js.
412 $filepath = 'dist/' . $name;
413 $asset_file = $this->get_asset_file( $filepath );
414
415 // Enqueue for gutenify animations.
416 wp_enqueue_script(
417 'gutenify-getting-started-admin',
418 GUTENIFY_PLUGIN_URL . $filepath . '.js',
419 $asset_file['dependencies'],
420 $asset_file['version'],
421 true
422 );
423
424 // Styles.
425 $name = 'gutenify-getting-started-admin-style';
426 $filepath = 'dist/' . $name;
427 $asset_file = $this->get_asset_file( $filepath );
428 $rtl = ! is_rtl() ? '' : '-rtl';
429
430 wp_enqueue_style(
431 $name,
432 GUTENIFY_PLUGIN_URL . $filepath . $rtl . '.css',
433 array( 'gutenify-fontawesome-style', 'wp-components' ),
434 $asset_file['version']
435 );
436
437 wp_localize_script(
438 'gutenify-getting-started-admin',
439 '_gutenify_vars',
440 array(
441 'site_url' => esc_url( site_url() ),
442 'plugin_directory_url' => esc_url( GUTENIFY_PLUGIN_URL ),
443 'gutenify_version' => GUTENIFY_VERSION,
444 // 'gutenify_com_server_url' => defined( 'GUTENIFY_COM_SERVER_URL' ) ? trailingslashit( GUTENIFY_COM_SERVER_URL ) : trailingslashit( 'https://api.gutenify.com/' ),
445 // 'is_block_theme' => function_exists( 'wp_get_theme' ) && ! empty( wp_get_theme()->is_block_theme() ),
446 // 'is_woocommerce_activated' => class_exists( 'woocommerce' ),
447 'pro_license_status' => apply_filters( 'gutenify_pro_license_status', false ),
448 'is_pro_activated' => apply_filters( 'gutenify_pro_activation_status', false ),
449 )
450 );
451 }
452
453 // Site options
454 if ( ( ! empty( $_GET['page'] ) && 'gutenify-site-options' === $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
455 // Scripts.
456 $name = 'gutenify-site-options-admin'; // gutenify.js.
457 $filepath = 'dist/' . $name;
458 $asset_file = $this->get_asset_file( $filepath );
459
460 // Enqueue for gutenify animations.
461 wp_enqueue_script(
462 'gutenify-site-options-admin',
463 GUTENIFY_PLUGIN_URL . $filepath . '.js',
464 $asset_file['dependencies'],
465 $asset_file['version'],
466 true
467 );
468
469 // Styles.
470 $name = 'gutenify-site-options-admin-style';
471 $filepath = 'dist/' . $name;
472 $asset_file = $this->get_asset_file( $filepath );
473 $rtl = ! is_rtl() ? '' : '-rtl';
474
475 wp_enqueue_style(
476 $name,
477 GUTENIFY_PLUGIN_URL . $filepath . $rtl . '.css',
478 array( 'gutenify-fontawesome-style', 'wp-components' ),
479 $asset_file['version']
480 );
481
482 wp_localize_script(
483 'gutenify-site-options-admin',
484 '_gutenify_site_options',
485 array(
486 'site_url' => esc_url( site_url() ),
487 'gutenify_com_server_url' => defined( 'GUTENIFY_COM_SERVER_URL' ) ? trailingslashit( GUTENIFY_COM_SERVER_URL ) : trailingslashit( 'https://api.gutenify.com/' ),
488 'is_block_theme' => function_exists( 'wp_get_theme' ) && ! empty( wp_get_theme()->is_block_theme() ),
489 'is_woocommerce_activated' => class_exists( 'woocommerce' ),
490 'pro_license_status' => apply_filters( 'gutenify_pro_license_status', false ),
491 )
492 );
493 }
494
495 // if ( ! empty( $_GET['post_type'] ) && 'gutenify_kit' === $_GET['post_type'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
496 if ( ( ! empty( $_GET['page'] ) && 'gutenify-template-kits' === $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
497 // Scripts.
498 $name = 'gutenify-kit-admin'; // gutenify.js.
499 $filepath = 'dist/' . $name;
500 $asset_file = $this->get_asset_file( $filepath );
501
502 // Enqueue for gutenify animations.
503 wp_enqueue_script(
504 'gutenify-kit-admin',
505 GUTENIFY_PLUGIN_URL . $filepath . '.js',
506 $asset_file['dependencies'],
507 $asset_file['version'],
508 true
509 );
510
511 // Styles.
512 $name = 'gutenify-kit-admin-style';
513 $filepath = 'dist/' . $name;
514 $asset_file = $this->get_asset_file( $filepath );
515 $rtl = ! is_rtl() ? '' : '-rtl';
516
517 wp_enqueue_style(
518 $name,
519 GUTENIFY_PLUGIN_URL . $filepath . $rtl . '.css',
520 array( 'gutenify-fontawesome-style', 'wp-components' ),
521 $asset_file['version']
522 );
523
524 wp_localize_script(
525 'gutenify-kit-admin',
526 '_gutenify_kit',
527 array(
528 'plugin_directory_url' => esc_url( GUTENIFY_PLUGIN_URL ),
529 'site_url' => esc_url( site_url() ),
530 'gutenify_com_server_url' => defined( 'GUTENIFY_COM_SERVER_URL' ) ? trailingslashit( GUTENIFY_COM_SERVER_URL ) : trailingslashit( 'https://api.gutenify.com/' ),
531 'is_block_theme' => wp_is_block_theme(), // function_exists( 'wp_get_theme' ) && ! empty( wp_get_theme()->is_block_theme() ),
532 'is_woocommerce_activated' => class_exists( 'woocommerce' ),
533 'pro_license_status' => apply_filters( 'gutenify_pro_license_status', false ),
534 )
535 );
536
537 wp_localize_script(
538 'gutenify-kit-admin',
539 '_gutenify_vars',
540 array(
541 'plugin_directory_url' => esc_url( GUTENIFY_PLUGIN_URL ),
542 'site_url' => esc_url( site_url() ),
543 'gutenify_com_server_url' => defined( 'GUTENIFY_COM_SERVER_URL' ) ? trailingslashit( GUTENIFY_COM_SERVER_URL ) : trailingslashit( 'https://api.gutenify.com/' ),
544 'is_block_theme' => wp_is_block_theme(), // function_exists( 'wp_get_theme' ) && ! empty( wp_get_theme()->is_block_theme() ),
545 'is_woocommerce_activated' => class_exists( 'woocommerce' ),
546 'pro_license_status' => apply_filters( 'gutenify_pro_license_status', false ),
547 'font_families' => gutenify_font_families(),
548 'is_pro_activated' => apply_filters( 'gutenify_pro_activation_status', false ),
549 )
550 );
551 }
552
553 if ( ( ! empty( $_GET['page'] ) && 'gutenify-settings' !== $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
554 return false;
555 }
556 // Scripts.
557 $name = 'gutenify-admin-settings'; // gutenify.js.
558 $filepath = 'dist/' . $name;
559 $asset_file = $this->get_asset_file( $filepath );
560
561 $asset_file['dependencies'][] = 'gutenify-global';
562
563 // Enqueue for gutenify animations.
564 wp_enqueue_script(
565 'gutenify-admin-settings',
566 GUTENIFY_PLUGIN_URL . $filepath . '.js',
567 $asset_file['dependencies'],
568 $asset_file['version'],
569 true
570 );
571
572 wp_localize_script(
573 'gutenify-admin-settings',
574 '_gutenify',
575 array(
576 'site_url' => esc_url( site_url() ),
577 'pro_account_url' => esc_url( admin_url( 'admin.php?page=gutenify-pro-license' ) ),
578 'gutenify_com_server_url' => defined( 'GUTENIFY_COM_SERVER_URL' ) ? trailingslashit( GUTENIFY_COM_SERVER_URL ) : trailingslashit( 'https://api.gutenify.com/' ),
579 'gutenify_hub_server_url' => defined( 'GUTENIFY_HUB_SERVER_URL' ) ? trailingslashit( GUTENIFY_COM_SERVER_URL ) : trailingslashit( 'https://hub.gutenify.com/' ),
580 'pro_license_status' => apply_filters( 'gutenify_pro_license_status', false ),
581 'font_families' => gutenify_font_families(),
582 'global_settings' => wp_get_global_settings(),
583 )
584 );
585
586 wp_localize_script(
587 'gutenify-admin-settings',
588 '_gutenify_vars',
589 array(
590 'plugin_directory_url' => esc_url( GUTENIFY_PLUGIN_URL ),
591 'site_url' => esc_url( site_url() ),
592 'gutenify_com_server_url' => defined( 'GUTENIFY_COM_SERVER_URL' ) ? trailingslashit( GUTENIFY_COM_SERVER_URL ) : trailingslashit( 'https://api.gutenify.com/' ),
593 'is_block_theme' => wp_is_block_theme(), // function_exists( 'wp_get_theme' ) && ! empty( wp_get_theme()->is_block_theme() ),
594 'is_woocommerce_activated' => class_exists( 'woocommerce' ),
595 'pro_license_status' => apply_filters( 'gutenify_pro_license_status', false ),
596 'font_families' => gutenify_font_families(),
597 'is_pro_activated' => apply_filters( 'gutenify_pro_activation_status', false ),
598 )
599 );
600
601 // Styles.
602 $name = 'gutenify-admin-settings-style';
603 $filepath = 'dist/' . $name;
604 $asset_file = $this->get_asset_file( $filepath );
605 $rtl = ! is_rtl() ? '' : '-rtl';
606
607 wp_enqueue_style(
608 $name,
609 GUTENIFY_PLUGIN_URL . $filepath . $rtl . '.css',
610 array( 'gutenify-fontawesome-style', 'wp-components' ),
611 $asset_file['version']
612 );
613 }
614 }
615
616 Gutenify_Block_Assets::register();
617