WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #36778, comment 9


Ignore:
Timestamp:
02/27/2017 12:10:21 AM (3 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36778, comment 9

    v1 v2  
    22> ...since the `mce_css` filter feels hacky.
    33
    4 No, it's the opposite :) `mce_css` is the best way to add or remove any style for the editor. This is the best way for both themes and plugins. `add_editor_style()` was added later as "dumbed down hand-holding" for theme authors as apparently it is too hard for many of them to use filters... I didn't like the idea then, I dislike it even more now. As you mention lots and lots of themes use that to add all kinds of sub-standard CSS to the editor often breaking some functionality or making it behave unexpectedly.
     4No, it's the opposite :) `mce_css` is the best way to add or remove any style for the editor. This is the proper way for both themes and plugins. `add_editor_style()` was added later as "dumbed down hand-holding" for theme authors as apparently it is too hard for many of them to use filters... I didn't like the idea then, I dislike it even more now. As you mention lots and lots of themes use that to add all kinds of sub-standard CSS to the editor often breaking some functionality or making it behave unexpectedly.
    55
    66There are several ways to remove theme added stylesheets from the editor. The most straight-forward is: