diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
index 27defd0659..f3c3a00848 100644
|
|
function _wp_theme_json_webfonts_handler() { |
3666 | 3666 | */ |
3667 | 3667 | function wp_enqueue_classic_theme_styles() { |
3668 | 3668 | if ( ! WP_Theme_JSON_Resolver::theme_has_support() ) { |
| 3669 | // Only enqueue classic-themes CSS when the content includes a button. |
| 3670 | if ( ! has_block( 'button' ) ) { |
| 3671 | return; |
| 3672 | } |
3669 | 3673 | $suffix = wp_scripts_get_suffix(); |
3670 | 3674 | wp_register_style( 'classic-theme-styles', '/' . WPINC . "/css/classic-themes$suffix.css", array(), true ); |
3671 | 3675 | wp_enqueue_style( 'classic-theme-styles' ); |