WordPress at a glance
filter is not described

image_add_caption_text filter-hook . WP 4.1.0

Filters the caption text.

Note: If the caption text is empty, the caption shortcode will not be appended to the image HTML when inserted into the editor.

Passing an empty value also prevents the 'image_add_caption_shortcode' Filters from being evaluated at the end of image_add_caption().


add_filter( 'image_add_caption_text', 'filter_function_name_8889', 10, 2 );
function filter_function_name_8889( $caption, $id ){
	// filter...

	return $caption;
The original caption text.
The attachment ID.

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

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

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

wp-admin/includes/media.php 202
$caption = apply_filters( 'image_add_caption_text', $caption, $id );

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

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