Changeset 56225 for trunk/src/wp-includes/class-wp-duotone.php
- Timestamp:
- 07/13/2023 04:14:27 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-duotone.php
r56101 r56225 1181 1181 } 1182 1182 1183 // This is for classic themes - in block themes, the CSS is added in the head via wp_add_inline_style in the wp_enqueue_scripts action. 1184 if ( ! wp_is_block_theme() && ! empty( self::$used_global_styles_presets ) ) { 1185 wp_add_inline_style( 'core-block-supports', self::get_global_styles_presets( self::$used_global_styles_presets ) ); 1183 // In block themes, the CSS is added in the head via wp_add_inline_style in the wp_enqueue_scripts action. 1184 if ( ! wp_is_block_theme() ) { 1185 $style_tag_id = 'core-block-supports-duotone'; 1186 wp_register_style( $style_tag_id, false ); 1187 if ( ! empty( self::$used_global_styles_presets ) ) { 1188 wp_add_inline_style( $style_tag_id, self::get_global_styles_presets( self::$used_global_styles_presets ) ); 1189 } 1190 if ( ! empty( self::$block_css_declarations ) ) { 1191 wp_add_inline_style( $style_tag_id, wp_style_engine_get_stylesheet_from_css_rules( self::$block_css_declarations ) ); 1192 } 1193 wp_enqueue_style( $style_tag_id ); 1186 1194 } 1187 1195 }
Note: See TracChangeset
for help on using the changeset viewer.