[wp-trac] [WordPress Trac] #51755: editor-styles theme feature naming with or without trailing s
WordPress Trac
noreply at wordpress.org
Tue May 30 22:29:32 UTC 2023
#51755: editor-styles theme feature naming with or without trailing s
--------------------------+------------------------------
Reporter: mmems | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 5.5.2
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by mattheu):
I've also run into this issue, and figured it was worth a note on this
ticket as the issue is still very much present. @mmems's description is
correct and this can be easily reproduced by trying to use
`add_editor_style` in a classic theme on WordPress 6.2.
Note that for block themes, this is not an issue as `add_theme_support(
'editor-styles' );` is called automatically as part of
`_add_default_theme_supports`.
I'm not sure whether this difference is intentional to distinguish block
theme behavior from classic themes, or just a small accident when this was
introduced. However the current state is pretty confusing. Some
suggestions:
* Update the function `add_editor_style` to add theme support for both
`editor-style` and `editor-styles`?
* Standardize on one behaviour. It doesn't seem that the older `editor-
style` is used by core, although it's been around a long time
([https://core.trac.wordpress.org/ticket/11512 14 years]).
* If it is preferred that no change is made, the documentation could be
updated to note this behaviour.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51755#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list