the_post_thumbnail_caption хук-фильтрWP 4.6.0

Filters the displayed post thumbnail caption.

Использование

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(строка)
Caption for the given attachment.

Список изменений

С версии 4.6.0 Введена.

Где вызывается хук

the_post_thumbnail_caption()
the_post_thumbnail_caption
wp-includes/post-thumbnail-template.php 311
echo apply_filters( 'the_post_thumbnail_caption', get_the_post_thumbnail_caption( $post ) );

Где используется хук в WordPress

wp-includes/default-filters.php 211
add_filter( 'the_post_thumbnail_caption', 'wptexturize' );
wp-includes/default-filters.php 212
add_filter( 'the_post_thumbnail_caption', 'convert_smilies' );
wp-includes/default-filters.php 213
add_filter( 'the_post_thumbnail_caption', 'convert_chars' );