Opened 15 months ago
Last modified 11 months ago
#20076 reopened enhancement
add_editor_style() should support plugins as well
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | TinyMCE | Version: | |
| Severity: | normal | Keywords: | close |
| Cc: | mikeschinkel@… |
Description
Although plugins can use the "mce_css" filter to add stylesheets for TinyMCE, from an API standpoint this function is a bit misleading / counterintuitive. Why shouldn't plugins be allowed to use one and the same function call to load stylesheets? I know this was probably implemented for use in twentyten, but maybe it's time to expand it.
Change History (6)
comment:2
in reply to:
↑ 1
mikeschinkel — 15 months ago
- Cc mikeschinkel@… added
Replying to azaozz:
Frankly I still don't see a point in having add_editor_style() at all. The whole functionality (wouldn't call it API) of add_editor_style(), the $editor_styles global and the code block in wp_editor that parses it was added with the assumption that theme authors don't know how to use filters.
However plugin authors know how to use filters, so using 'mce_css' is far better.
-1 to that.
Developers may know how to use filters, but developers are really no better at finding filters that are named obscurely. 'mce_css' is probably one of the worst named hooks in WordPress in you care anything about making hook discovery easier.
comment:4
SergeyBiryukov — 11 months ago
- Component changed from General to TinyMCE
- Milestone Awaiting Review deleted
comment:6
SergeyBiryukov — 11 months ago
- Milestone set to Awaiting Review

Frankly I still don't see a point in having add_editor_style() at all. The whole functionality (wouldn't call it API) of add_editor_style(), the $editor_styles global and the code block in wp_editor that parses it was added with the assumption that theme authors don't know how to use filters.
However plugin authors know how to use filters, so using 'mce_css' is far better.