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

WordPress Trac noreply at wordpress.org
Thu Feb 21 15:39:43 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:  5.2
Component:  Media                                |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests 2nd-        |     Focuses:
  opinion                                        |  accessibility
-------------------------------------------------+-------------------------

Comment (by ryanshoover):

 In terms of deprecating `wp_get_attachment_image_src`, agreed that's
 definitely outside the scope of this ticket. It's a valid conversation to
 have. From a purist, philosophical standpoint, simply because a function
 is heavily used doesn't mean it shouldn't be deprecated in favor of a
 better method. We just need to provide plenty of leeway, flexibility, and
 communication to the community about the change.

 I personally would be in favor of deprecating it — at some point — in
 large part because its behavior is anomalous to most other templating
 functions.

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


More information about the wp-trac mailing list