the_post_thumbnail_caption
Filters the displayed post thumbnail caption.
Usage
add_filter( 'the_post_thumbnail_caption', 'wp_kama_the_post_thumbnail_caption_filter' );
/**
* Function for `the_post_thumbnail_caption` filter-hook.
*
* @param string $caption Caption for the given attachment.
*
* @return string
*/
function wp_kama_the_post_thumbnail_caption_filter( $caption ){
// filter...
return $caption;
}
- $caption(string)
- Caption for the given attachment.
Changelog
| Since 4.6.0 | Introduced. |
Where the hook is called
the_post_thumbnail_caption
wp-includes/post-thumbnail-template.php 328
echo apply_filters( 'the_post_thumbnail_caption', get_the_post_thumbnail_caption( $post ) );
Where the hook is used in WordPress
wp-includes/default-filters.php 221
add_filter( 'the_post_thumbnail_caption', 'wptexturize' );
wp-includes/default-filters.php 222
add_filter( 'the_post_thumbnail_caption', 'convert_smilies' );
wp-includes/default-filters.php 223
add_filter( 'the_post_thumbnail_caption', 'convert_chars' );