Editor: Fix enqueueing additional styles in wp_enqueue_block_style() to print only when blocks render.

In a block theme, additional block styles registered using the `wp_enqueue_block_style` function should only get printed when the block exists on a page. However, they currently always get rendered.

This commit is a backport from Gutenberg that fixes the issue by printing the styles when a block renders.

Follow-up to [52069].

Props poena, aristath, Mamaduka.
Fixes #54787.
Built from https://develop.svn.wordpress.org/trunk@52556


git-svn-id: http://core.svn.wordpress.org/trunk@52146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
hellofromTonya
2022-01-11 16:00:01 +00:00
parent fcdf1ce242
commit 2a686addf0
2 changed files with 26 additions and 2 deletions

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.0-alpha-52555';
$wp_version = '6.0-alpha-52556';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.