img_caption_shortcode WordPress Filter Hook

The img_caption_shortcode hook is used to filter the image caption shortcode output. This hook is used to filter the content of the image caption shortcode to add custom functionality.

apply_filters( 'img_caption_shortcode', string $output, array $attr, string $content ) #

Filters the default caption shortcode output.


Description

If the filtered output isn’t empty, it will be used instead of generating the default caption template.

Top ↑

See also


Top ↑

Parameters

$output

(string)The caption output. Default empty.

$attr

(array)Attributes of the caption shortcode.

$content

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


Top ↑

Source

File: wp-includes/media.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More