[wp-trac] [WordPress Trac] #27399: Filter the HTML output of wp_get_attachment_image
WordPress Trac
noreply at wordpress.org
Thu Mar 13 17:13:57 UTC 2014
#27399: Filter the HTML output of wp_get_attachment_image
-------------------------+------------------------------
Reporter: fgirardey | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.8.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+------------------------------
Changes (by fgirardey):
* keywords: reporter-feedback => has-patch
Comment:
Yeah i've consider it, the fact is there is an existing HTML filter
"post_thumbnail_html" for the get_the_post_thumbnail function, so it could
be logic to have a similar filter for attachments image.
In my case, the plugin use a regex to replace the src attribute and move
it to a data-* attribute, this is maybe not the better choice but it works
on "get_avatar", "post_thumbnail_html", "the_content" and "widget_text".
So it can be useful for other features in my opinion =)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27399#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list