Title: wp_add_editor_classic_theme_styles
Published: November 2, 2022
Last modified: August 20, 2026

---

# wp_add_editor_classic_theme_styles( array $editor_settings ): array

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#wp--skip-link--target)

This function has been deprecated since 6.8.0. Styles are enqueued, not printed 
in the body element instead.

Loads classic theme styles on classic themes in the editor.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#description)󠁿

This is used for backwards compatibility for Button and File blocks specifically.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#parameters)󠁿

 `$editor_settings`arrayrequired

The array of editor settings.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#return)󠁿

 array A filtered array of editor settings.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#source)󠁿

    ```php
    function wp_add_editor_classic_theme_styles( $editor_settings ) {
    	_deprecated_function( __FUNCTION__, '6.8.0', 'wp_enqueue_classic_theme_styles' );

    	if ( wp_theme_has_theme_json() ) {
    		return $editor_settings;
    	}

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

    	/*
    	 * This follows the pattern of get_block_editor_theme_styles,
    	 * but we can't use get_block_editor_theme_styles directly as it
    	 * only handles external files or theme files.
    	 */
    	$classic_theme_styles_settings = array(
    		'css'            => file_get_contents( $classic_theme_styles ),
    		'__unstableType' => 'core',
    		'isGlobalStyles' => false,
    	);

    	// Add these settings to the start of the array so that themes can override them.
    	array_unshift( $editor_settings['styles'], $classic_theme_styles_settings );

    	return $editor_settings;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/deprecated.php#L6435)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/deprecated.php#L6435-L6460)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_theme_has_theme_json()](https://developer.wordpress.org/reference/functions/wp_theme_has_theme_json/)`wp-includes/global-styles-and-settings.php` |

Checks whether a theme or its parent has a theme.json file.

  | 
| [wp_scripts_get_suffix()](https://developer.wordpress.org/reference/functions/wp_scripts_get_suffix/)`wp-includes/script-loader.php` |

Returns the suffix that can be used for the scripts.

  | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_add_editor_classic_theme_styles/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.8.0](https://developer.wordpress.org/reference/since/6.8.0/) | Deprecated. Styles are enqueued, not printed in the body element. | 
| [6.2.0](https://developer.wordpress.org/reference/since/6.2.0/) | Added File block styles. | 
| [6.1.0](https://developer.wordpress.org/reference/since/6.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_add_editor_classic_theme_styles%2F)
before being able to contribute a note or feedback.