#20076 closed enhancement (wontfix)
add_editor_style() should support plugins as well
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
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 (10)
#2
in reply to:
↑ 1
@
12 years 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.
#8
@
10 years ago
- Keywords needs-patch removed
- Resolution set to wontfix
- Status changed from reopened to closed
This is pedantic, and will probably be a non-issue with the documentation of hooks and eventual publishing on developer.wp.org. Closing out.
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.