[wp-trac] [WordPress Trac] #27399: Filter the HTML output of wp_get_attachment_image

WordPress Trac noreply at wordpress.org
Sun Jul 12 22:35:48 UTC 2015


#27399: Filter the HTML output of wp_get_attachment_image
-----------------------------+----------------------
 Reporter:  fgirardey        |       Owner:
     Type:  enhancement      |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Media            |     Version:  3.8.1
 Severity:  normal           |  Resolution:  wontfix
 Keywords:  has-patch close  |     Focuses:
-----------------------------+----------------------

Comment (by joemcgill):

 FWIW, even though there are valid use cases for filtering the HTML output
 of some functions, I agree with not filtering the HTML output of this
 particular function. The purpose of this function is to output an `img`
 element based on an attachment id and size and that's how it's used
 throughout core. As it stands now, every attribute of the element can be
 filtered, just not the element itself. Seems to me that this is by design
 and allowing this to modified through the introduction of an output filter
 would introduce more problems than it solves.

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


More information about the wp-trac mailing list