image_add_caption_shortcode filter-hookWP 2.6.0

Filters the image HTML markup including the caption shortcode.

Usage

add_filter( 'image_add_caption_shortcode', 'wp_kama_image_add_caption_shortcode_filter', 10, 2 );

/**
 * Function for `image_add_caption_shortcode` filter-hook.
 * 
 * @param string $shcode The image HTML markup with caption shortcode.
 * @param string $html   The image HTML markup.
 *
 * @return string
 */
function wp_kama_image_add_caption_shortcode_filter( $shcode, $html ){

	// filter...
	return $shcode;
}
$shcode(string)
The image HTML markup with caption shortcode.
$html(string)
The image HTML markup.

Changelog

Since 2.6.0 Introduced.

Where the hook is called

image_add_caption()
image_add_caption_shortcode
wp-admin/includes/media.php 249
return apply_filters( 'image_add_caption_shortcode', $shcode, $html );

Where the hook is used in WordPress

Usage not found.