[wp-trac] [WordPress Trac] #45150: Account for improper use of the TinyMCE init array filters
WordPress Trac
noreply at wordpress.org
Tue Oct 23 10:09:55 UTC 2018
#45150: Account for improper use of the TinyMCE init array filters
--------------------------+---------------------
Reporter: azaozz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.0
Component: TinyMCE | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+---------------------
Comment (by azaozz):
This seems a classic case of "doing it wrong" :) There is already a much
more suitable filter, `'the_editor'`, for outputting HTML that has to
appear together with the editor HTML.
IMHO the proper thing to do here it to capture the output when the init
array filters run, and if anything was outputted throw a "Doing it wrong"
warning. That will fix unwanted HTML appearing at random places.
In some cases it may be possible to try to "redirect" such output to the
proper filter, but that may bring other bugs/edge cases.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45150#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list