Opened 12 years ago
Closed 12 years ago
#18456 closed defect (bug) (fixed)
calling add_editor_style() twice results in the css being added multiple times
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | 3.2 |
Component: | Editor | Keywords: | has-patch |
Focuses: | 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)
Note: See
TracTickets for help on using
tickets.
In [18571]: