Opened 22 months ago
Closed 22 months ago
#18456 closed defect (bug) (fixed)
calling add_editor_style() twice results in the css being added multiple times
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.3 |
| Component: | Editor | Version: | 3.2 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
In the event a Theme, and a Child theme, both call add_editor_style() the TinyMCE css list will double up:
content_css:" http://localhost/branch/3.2/wp-content/themes/twentyeleven/editor-style.css, http://localhost/branch/3.2/wp-content/themes/twentyeleven-child/editor-style.css, http://localhost/branch/3.2/wp-content/themes/twentyeleven/editor-style.css, http://localhost/branch/3.2/wp-content/themes/twentyeleven-child/editor-style.css"
(New lines added for readability)
Affects both trunk and 3.2, This does point out it's a "doing it wrong" to call the add_editor_style() in the child theme, but we should also array_unique() the $editor_styles array before searching for the files to enqueue IMO.
Attachments (1)
Change History (4)
comment:1
SergeyBiryukov — 22 months ago
- Keywords has-patch added; needs-patch removed
SergeyBiryukov — 22 months ago
Note: See
TracTickets for help on using
tickets.

In [18571]: