diff --git src/wp-includes/default-filters.php src/wp-includes/default-filters.php
index e9ca31f5f7..93a25bf8e1 100644
|
|
|
add_action( 'wp_default_scripts', 'wp_default_packages' ); |
| 557 | 557 | |
| 558 | 558 | add_action( 'wp_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 ); |
| 559 | 559 | add_action( 'wp_enqueue_scripts', 'wp_common_block_scripts_and_styles' ); |
| 560 | | add_action( 'wp_enqueue_scripts', 'wp_enqueue_classic_theme_styles' ); |
| 561 | 560 | add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 ); |
| 562 | 561 | add_action( 'admin_enqueue_scripts', 'wp_common_block_scripts_and_styles' ); |
| 563 | 562 | add_action( 'enqueue_block_assets', 'wp_enqueue_registered_block_scripts_and_styles' ); |
diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
index fd1bf4b6fa..53b083c790 100644
|
|
|
function _wp_theme_json_webfonts_handler() { |
| 3657 | 3657 | add_action( 'admin_init', $fn_generate_and_enqueue_editor_styles ); |
| 3658 | 3658 | } |
| 3659 | 3659 | |
| 3660 | | /** |
| 3661 | | * Loads classic theme styles on classic themes in the frontend. |
| 3662 | | * |
| 3663 | | * This is needed for backwards compatibility for button blocks specifically. |
| 3664 | | * |
| 3665 | | * @since 6.1.0 |
| 3666 | | */ |
| 3667 | | function wp_enqueue_classic_theme_styles() { |
| 3668 | | if ( ! WP_Theme_JSON_Resolver::theme_has_support() ) { |
| 3669 | | $suffix = wp_scripts_get_suffix(); |
| 3670 | | wp_register_style( 'classic-theme-styles', '/' . WPINC . "/css/classic-themes$suffix.css", array(), true ); |
| 3671 | | wp_enqueue_style( 'classic-theme-styles' ); |
| 3672 | | } |
| 3673 | | } |
| 3674 | | |
| 3675 | 3660 | /** |
| 3676 | 3661 | * Loads classic theme styles on classic themes in the editor. |
| 3677 | 3662 | * |
| … |
… |
function wp_enqueue_classic_theme_styles() { |
| 3683 | 3668 | * @return array A filtered array of editor settings. |
| 3684 | 3669 | */ |
| 3685 | 3670 | function wp_add_editor_classic_theme_styles( $editor_settings ) { |
| | 3671 | return $editor_settings; |
| 3686 | 3672 | if ( WP_Theme_JSON_Resolver::theme_has_support() ) { |
| 3687 | 3673 | return $editor_settings; |
| 3688 | 3674 | } |