[wp-trac] [WordPress Trac] #22075: Allow custom attributes to be set in `wp_get_attachment_link`

WordPress Trac noreply at wordpress.org
Sat May 24 12:51:42 UTC 2014


#22075: Allow custom attributes to be set in `wp_get_attachment_link`
--------------------------+-----------------------------
 Reporter:  webord        |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Media         |     Version:  3.4
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |     Focuses:
--------------------------+-----------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:7 ericlewis]:
 > To the topic at hand, if you want to add custom attributes to the anchor
 tag in `wp_get_attachment_link()`, you should probably use the
 `wp_get_attachment_link` filter and instead of regexing just rebuild the
 string however you see fit.

 I tend to agree. It's a short function, there's not much to rebuild.

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


More information about the wp-trac mailing list