[wp-trac] [WordPress Trac] #12235: Display caption with the_post_thumbnail

WordPress Trac noreply at wordpress.org
Tue Jun 14 23:35:37 UTC 2016


#12235: Display caption with the_post_thumbnail
----------------------------------------+------------------
 Reporter:  hd-J                        |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  4.6
Component:  Post Thumbnails             |     Version:  2.9
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------
Changes (by flixos90):

 * keywords:  needs-patch => has-patch needs-unit-tests
 * type:  feature request => enhancement
 * milestone:  Future Release => 4.6


Comment:

 [attachment:12235.diff] adds an easy-to-use function to get the caption
 for a specific attachment, `wp_get_attachment_caption()`. It furthermore
 adds functions to get the caption for the featured image of a post, using
 the new attachment caption function.

 This makes it easy to display the caption of the featured image in a theme
 if desired. While the caption shouldn't be part of the featured image
 function itself as it would be too specific, the functions added by this
 patch make it easy for a theme developer to include it.

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


More information about the wp-trac mailing list