Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/wp-admin/includes/update-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,9 @@
// 7.2
'wp-includes/js/dist/sync.js',
'wp-includes/js/dist/sync.min.js',
// 7.3
'wp-includes/css/classic-themes.css',
'wp-includes/css/classic-themes.min.css',
);

/**
Expand Down
24 changes: 0 additions & 24 deletions src/wp-includes/css/classic-themes.css

This file was deleted.

2 changes: 1 addition & 1 deletion src/wp-includes/deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -6488,7 +6488,7 @@ function wp_add_editor_classic_theme_styles( $editor_settings ) {
}

$suffix = wp_scripts_get_suffix();
$classic_theme_styles = ABSPATH . WPINC . "/css/classic-themes$suffix.css";
$classic_theme_styles = ABSPATH . WPINC . "/css/dist/block-library/classic$suffix.css";

/*
* This follows the pattern of get_block_editor_theme_styles,
Expand Down
6 changes: 4 additions & 2 deletions src/wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,7 @@ function wp_default_styles( $styles ) {
$styles->add( 'wp-block-library-theme', "/$block_library_theme_path" );
$styles->add_data( 'wp-block-library-theme', 'path', ABSPATH . $block_library_theme_path );

$classic_theme_styles_path = WPINC . "/css/classic-themes$suffix.css";
$classic_theme_styles_path = WPINC . "/css/dist/block-library/classic$suffix.css";
$styles->add( 'classic-theme-styles', "/$classic_theme_styles_path" );
$styles->add_data( 'classic-theme-styles', 'path', ABSPATH . $classic_theme_styles_path );

Expand Down Expand Up @@ -1850,6 +1850,7 @@ function wp_default_styles( $styles ) {
'wp-reset-editor-styles',
'wp-editor-classic-layout-styles',
'wp-block-library-theme',
'classic-theme-styles',
'wp-theme',
'wp-edit-blocks',
'wp-block-editor',
Expand Down Expand Up @@ -3814,11 +3815,12 @@ function wp_enqueue_block_style( $block_name, $args ) {
/**
* Loads classic theme styles when the current theme lacks a theme.json file.
*
* This is used for backwards compatibility for Button and File blocks specifically.
* This is used for backwards compatibility for some core blocks, such as the Button and File blocks.
*
* @since 6.1.0
* @since 6.2.0 Added File block styles.
* @since 6.8.0 Moved stylesheet registration outside of this function.
* @since 7.3.0 Added Accordion Heading and Tab block styles.
*/
function wp_enqueue_classic_theme_styles() {
if ( ! wp_theme_has_theme_json() ) {
Expand Down
16 changes: 8 additions & 8 deletions tests/phpunit/tests/dependencies/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ public function test_wp_edit_blocks_depends_on_wp_theme_first() {
* @dataProvider data_provider_test_wp_maybe_inline_styles
*/
public function test_wp_maybe_inline_styles( ?string $additional_inline_style, ?int $styles_inline_size_limit ) {
$rel_path = 'css/classic-themes.css';
$rel_path = 'css/wp-block-template-skip-link.css';

@t-hamano t-hamano Oct 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

classic-themes.css is removed in this PR, so these tests need another stylesheet. They only need a real CSS file and don't test the classic theme styles themselves.

wp-block-template-skip-link.css was chosen because it's committed to the repository and is small enough to stay within the default styles_inline_size_limit.

The other wp_maybe_inline_styles() tests below are updated the same way.

$src_url = includes_url( $rel_path );
$src_path = ABSPATH . WPINC . '/' . $rel_path;
$css = file_get_contents( $src_path );
Expand Down Expand Up @@ -767,8 +767,8 @@ public static function data_provider_test_wp_maybe_inline_styles(): array {
public function test_wp_maybe_inline_styles_dequeue_styles() {
$filter = new MockAction();
add_filter( 'pre_wp_filesize', array( $filter, 'filter' ) );
wp_register_style( 'test-handle', '/' . WPINC . '/css/classic-themes.css' );
wp_style_add_data( 'test-handle', 'path', ABSPATH . WPINC . '/css/classic-themes.css' );
wp_register_style( 'test-handle', '/' . WPINC . '/css/wp-block-template-skip-link.css' );
wp_style_add_data( 'test-handle', 'path', ABSPATH . WPINC . '/css/wp-block-template-skip-link.css' );

wp_enqueue_style( 'test-handle' );

Expand All @@ -792,8 +792,8 @@ public function test_wp_maybe_inline_styles_dequeue_styles() {
public function test_wp_maybe_inline_styles_multiple_runs() {
$filter = new MockAction();
add_filter( 'pre_wp_filesize', array( $filter, 'filter' ) );
wp_register_style( 'test-handle', '/' . WPINC . '/css/classic-themes.css' );
wp_style_add_data( 'test-handle', 'path', ABSPATH . WPINC . '/css/classic-themes.css' );
wp_register_style( 'test-handle', '/' . WPINC . '/css/wp-block-template-skip-link.css' );
wp_style_add_data( 'test-handle', 'path', ABSPATH . WPINC . '/css/wp-block-template-skip-link.css' );

wp_enqueue_style( 'test-handle' );

Expand Down Expand Up @@ -833,7 +833,7 @@ public function test_wp_maybe_inline_styles_missing_file() {
*/
public function test_wp_maybe_inline_styles_no_src() {
wp_register_style( 'test-handle', false );
wp_style_add_data( 'test-handle', 'path', ABSPATH . WPINC . '/css/classic-themes.css' );
wp_style_add_data( 'test-handle', 'path', ABSPATH . WPINC . '/css/wp-block-template-skip-link.css' );

wp_enqueue_style( 'test-handle' );

Expand All @@ -849,7 +849,7 @@ public function test_wp_maybe_inline_styles_no_src() {
* @covers ::wp_maybe_inline_styles
*/
public function test_wp_maybe_inline_styles_no_path() {
$url = '/' . WPINC . '/css/classic-themes.css';
$url = '/' . WPINC . '/css/wp-block-template-skip-link.css';
wp_register_style( 'test-handle', $url );

wp_enqueue_style( 'test-handle' );
Expand Down Expand Up @@ -900,7 +900,7 @@ static function ( $size, $path ) use ( $style_path ) {
* @covers ::wp_maybe_inline_styles
*/
public function test_wp_maybe_inline_styles_good_path_with_zero_file_size_provided() {
$style_path = '/css/classic-themes.css';
$style_path = '/css/wp-block-template-skip-link.css';

// This simulates the file having a zero size.
add_filter(
Expand Down
Loading