[wp-trac] [WordPress Trac] #29607: image_add_caption() returns immediately if caption empty, preventing filter from firing
WordPress Trac
noreply at wordpress.org
Sun Sep 21 08:42:35 UTC 2014
#29607: image_add_caption() returns immediately if caption empty, preventing filter
from firing
--------------------------------------------+------------------------------
Reporter: paulschreiber | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.1
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: needs-testing has-patch commit | Focuses: docs,
| administration
--------------------------------------------+------------------------------
Changes (by DrewAPicture):
* keywords: needs-testing has-patch => needs-testing has-patch commit
Comment:
At first I was concerned about effectively running two filters in a row
here, but after further consideration, the new filter really does provide
something not currently available -- the ability to directly filter the
pre-parse caption text before output to the editor.
In [attachment:29607.3.patch], I've reworded the long description a bit to
clarify expected behavior in passing an empty value. I also changed the
hook name to 'image_add_caption_text'.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29607#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list