the_post_thumbnail_caption filter-hookWP 4.6.0

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()
the_post_thumbnail_caption
wp-includes/post-thumbnail-template.php 324
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 202
add_filter( 'the_post_thumbnail_caption', 'wptexturize' );
wp-includes/default-filters.php 203
add_filter( 'the_post_thumbnail_caption', 'convert_smilies' );
wp-includes/default-filters.php 204
add_filter( 'the_post_thumbnail_caption', 'convert_chars' );