Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#18456 closed defect (bug) (fixed)

calling add_editor_style() twice results in the css being added multiple times

Reported by: dd32's profile dd32 Owned by: dd32's profile dd32
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.2
Component: Editor Keywords: has-patch
Focuses: Cc:


In the event a Theme, and a Child theme, both call add_editor_style() the TinyMCE css list will double up:


(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)

18456.patch (543 bytes) - added by SergeyBiryukov 13 years ago.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
13 years ago

  • Keywords has-patch added; needs-patch removed

#2 @dd32
13 years ago

  • Milestone changed from Awaiting Review to 3.3

#3 @dd32
13 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In [18571]:

Only include extra TinyMCE stylesheets once. props SergeyBiryukov. Fixes #18456

Note: See TracTickets for help on using tickets.