Summery Summery

Filters the width of an image’s caption.

Syntax Syntax

apply_filters( 'img_caption_shortcode_width', int $width, array $atts, string $content )

Description Description

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.

Parameters Parameters


(int) Width of the caption in pixels. To remove this inline style, return zero.


(array) Attributes of the caption shortcode.


(string) The image element, possibly wrapped in a hyperlink.

Source Source

File: wp-includes/media.php


Changelog Changelog

Version Description
3.7.0 Introduced.

See also See also


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.