Filters the width of an image’s caption.
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.
See also
Parameters
$width
int- Width of the caption in pixels. To remove this inline style, return zero.
$atts
array- Attributes of the caption shortcode.
$content
string- The image element, possibly wrapped in a hyperlink.
Source
* @see img_caption_shortcode()
Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |
If you want to remove the extra 10 pixels of width, add the following to your child theme’s functions.php: