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

WordPress Trac noreply at wordpress.org
Fri Jan 25 20:07:49 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 joedolson):

 It's not inconceivable to add a wrapper function to improve the name, but
 this function can't be changed just to return a URL. Right now, the
 function returns three of the four most critical img attributes, but is
 missing the alt attribute. The motivation behind this change is so that a
 single function can return all the necessary attributes for displaying the
 image, rather than requiring a second call to get the alt attribute.

 Is the patch provided good to go? It looks reasonably solid to me.

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


More information about the wp-trac mailing list