WordPress at Your Fingertips
filter is not described

img_caption_shortcode_width filter-hook . WP 3.7.0

Filters the width of an image's caption.

By default, the caption is 10 pixels greater than the width of the image, to prevent post content from running up against a floated image.


add_filter( 'img_caption_shortcode_width', 'filter_function_name_3914', 10, 3 );
function filter_function_name_3914( $width, $atts, $content ){
	// filter...

	return $width;
Width of the caption in pixels. To remove this inline style, return zero.
Attributes of the caption shortcode.
The image element, possibly wrapped in a hyperlink.

Where the hook is called

wp-includes/media.php 2194
$caption_width = apply_filters( 'img_caption_shortcode_width', $width, $atts, $content );

Where in WP core the hook is used WordPress

Usage not found.