Editor: Fix 'wp-block-library-theme' style enqueue conditions.
Fixes the conditions for when to enqueue the opinionated block styles (i.e. `'wp-block-library-theme'` stylesheet): * the theme adds `'wp-block-styles'` theme support; * and no editor styles are declared. This resolves an issue with themes that do not add the `'wp-block-styles'` theme support while not impacting themes that do. Follow-up to [53419], [52069], [50761], [44157]. Props mikachan, costdev, glendaviesnz, hellofromTonya, jffng, mamaduka, ndiego, poena, sannevndrmeulen, scruffian. Fixes #57561. Built from https://develop.svn.wordpress.org/trunk@55368 git-svn-id: http://core.svn.wordpress.org/trunk@54901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -120,7 +120,7 @@ wp_enqueue_style( 'wp-format-library' );
|
||||
wp_enqueue_media();
|
||||
|
||||
if (
|
||||
current_theme_supports( 'wp-block-styles' ) ||
|
||||
current_theme_supports( 'wp-block-styles' ) &&
|
||||
( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 )
|
||||
) {
|
||||
wp_enqueue_style( 'wp-block-library-theme' );
|
||||
|
||||
Reference in New Issue
Block a user