image_add_caption_text

Advertisement

Summery Summery

Filters the caption text.

Syntax Syntax

apply_filters( 'image_add_caption_text', string $caption, int $id )

Description Description

Note: If the caption text is empty, the caption shortcode will not be appended to the image HTML when inserted into the editor.

Passing an empty value also prevents the ‘image_add_caption_shortcode’ Filters from being evaluated at the end of image_add_caption().

Parameters Parameters

$caption

The original caption text.

$id

The attachment ID.

Source Source

File: wp-admin/includes/media.php

Advertisement

Changelog Changelog

Changelog
Version Description
4.1.0 Introduced.

Advertisement

Leave a Reply