[wp-trac] [WordPress Trac] #29607: image_add_caption() returns immediately if caption empty, preventing filter from firing

WordPress Trac noreply at wordpress.org
Thu Oct 30 01:10:46 UTC 2014


#29607: image_add_caption() returns immediately if caption empty, preventing filter
from firing
--------------------------------------------+------------------------------
 Reporter:  paulschreiber                   |       Owner:  SergeyBiryukov
     Type:  enhancement                     |      Status:  reopened
 Priority:  normal                          |   Milestone:  4.1
Component:  Media                           |     Version:  trunk
 Severity:  normal                          |  Resolution:
 Keywords:  needs-testing has-patch commit  |     Focuses:  docs,
                                            |  administration
--------------------------------------------+------------------------------

Comment (by paulschreiber):

 We have some images that do not (and should not) have captions. But they
 should have photo credits, which are added by our caption filter. However,
 the caption filter does not get a chance to run when `$caption` is
 `empty()`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29607#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list