img_caption_shortcode ( $attr, $content = null )

  • (array) $attr { Attributes of the caption shortcode.
  • (string) $content Shortcode content.
  • (string) HTML content to display the caption.
Defined at:
Change Log:
  • 3: .
  • 5: .


Builds the Caption shortcode output.

Allows a plugin to replace the content that would otherwise be returned. The filter is {@see 'img_caption_shortcode'} and passes an empty string, the attr parameter and the content parameter values.

The supported attributes for the shortcode are 'id', 'caption_id', 'align', 'width', 'caption', and 'class'.

Related Functions

do_shortcode, wp_audio_shortcode, wp_video_shortcode, add_shortcode, strip_shortcodes

Top Google Results

User discussions

wpseek mobile