Skip to content

Commit

Permalink
Group duotone outputs and refactor rendering (#49705)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Lende authored Apr 18, 2023
1 parent 39b866e commit eb71952
Show file tree
Hide file tree
Showing 2 changed files with 231 additions and 136 deletions.
2 changes: 2 additions & 0 deletions lib/block-supports/duotone.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
add_filter( 'render_block', array( 'WP_Duotone_Gutenberg', 'render_duotone_support' ), 10, 2 );

// Enqueue styles.
// Block styles (core-block-supports-inline-css) before the style engine (gutenberg_enqueue_stored_styles).
// Global styles (global-styles-inline-css) after the other global styles (gutenberg_enqueue_global_styles).
add_action( 'wp_enqueue_scripts', array( 'WP_Duotone_Gutenberg', 'output_block_styles' ), 9 );
add_action( 'wp_enqueue_scripts', array( 'WP_Duotone_Gutenberg', 'output_global_styles' ), 11 );

// Add SVG filters to the footer. Also, for classic themes, output block styles (core-block-supports-inline-css).
Expand Down
Loading

0 comments on commit eb71952

Please sign in to comment.