WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about image_add_caption_text

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-admin/includes/media.php apply_filters 204 /**
* Filters the caption text.
*
* 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 {@see 'image_add_caption_shortcode'}
* Filters from being evaluated at the end of image_add_caption().
*
* @since 4.1.0
*
* @param string $caption The original caption text.
* @param int $id The attachment ID.
*/

Hook Parameters

Parameter Type Name Description
string $caption The original caption text.
int $id The attachment ID.