This adds three new functions for getting/displaying attachment captions: * `wp_get_attachment_caption` - Retrieves a caption for a specific attachment. * `get_the_post_thumbnail_caption()` - Returns the post thumbnail caption. * `the_post_thumbnail_caption()` - Displays the post thumbnail caption. These are helpful for displaying a caption associated with an image directly in a template, rather than using the caption shortcode. This also introduces two new filters: * `wp_get_attachment_caption` - Filters the value of `wp_get_attachment_caption()`. * `the_post_thumbnail_caption` - Filters the display of the post thumbnail caption. `the_post_thumbnail_caption()` is automatically filtered by `wptexturize()`, `convert_smilies()`, and `convert_chars()` in `wp-includes/default-filters.php`. Props flixos90, joemcgill. Fixes #12235. Built from https://develop.svn.wordpress.org/trunk@37915 git-svn-id: http://core.svn.wordpress.org/trunk@37856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
199 KiB
199 KiB