[wp-trac] [WordPress Trac] #30180: wp_get_attachment_image_src does not return alt or meta

WordPress Trac noreply at wordpress.org
Sat Jan 19 08:05:12 UTC 2019


#30180: wp_get_attachment_image_src does not return alt or meta
--------------------------------------+-----------------------------
 Reporter:  joedolson                 |       Owner:  joedolson
     Type:  enhancement               |      Status:  accepted
 Priority:  normal                    |   Milestone:  Future Release
Component:  Media                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  accessibility
--------------------------------------+-----------------------------

Comment (by wingo5315):

 The function name {{{wp_get_attachment_image_src}}} suggests that it's
 going to get the URL of the attachment image, not any alt text. If they
 wanted alt text as well, they would have used a different function.

 Although if you wanted the alt text, you could make it so if it said
 {{{wp_get_attachment_image_src('alt', true);}}} or something along the
 lines of that.

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


More information about the wp-trac mailing list