Pass the attachment ID to the 'image_add_caption_text' filter.
fixes #29607. Built from https://develop.svn.wordpress.org/trunk@29754 git-svn-id: http://core.svn.wordpress.org/trunk@29526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
79d017a024
commit
26124b9aad
|
@ -170,8 +170,9 @@ function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $
|
|||
* @since 4.1.0
|
||||
*
|
||||
* @param string $caption The original caption text.
|
||||
* @param int $id The attachment ID.
|
||||
*/
|
||||
$caption = apply_filters( 'image_add_caption_text', $caption );
|
||||
$caption = apply_filters( 'image_add_caption_text', $caption, $id );
|
||||
|
||||
/**
|
||||
* Filter whether to disable captions.
|
||||
|
|
Loading…
Reference in New Issue