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 324
echo apply_filters( 'the_post_thumbnail_caption', get_the_post_thumbnail_caption( $post ) );

Где используется хук в 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' );