Make WordPress Core

Opened 14 months ago

#51755 new defect (bug)

editor-styles theme feature naming with or without trailing s

Reported by: mmems Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.5.2
Component: Themes Keywords:
Focuses: Cc:


I tried in vain to follow the documentation about editor styles:

There is no need to explicitly add theme support for this feature since support is added automatically when calling:


But I can't make it work.

The only way to do it is to use both functions:

// in after_setup_theme action:
add_theme_support( 'editor-styles' ); // without that call, the editor-style.css

After tried all combinations, I found that the function add_editor_style, remove_editor_styles and remove_theme_support use the theme feature name editor-style (without the trailing s) where the feature is called editor-styles in wp-includes/theme.php.
Note the default file name used in add_editor_style is editor-style.css (filename without s)

Note also that, this name also used (without s) in wp-admin/includes/theme.php.

Also it exist an other theme feature called dark-editor-style (without s) which is related to editor-styles theme feature.

There is a ways to simplify that, like using the name editor-style, and editor-styles as an alias (or vice versa)?
To be consistant, use (with or) without the trailing s everywhere?

Change History (0)

Note: See TracTickets for help on using tickets.