From 994566bb172cbf08c3ad6273e5c7b5f43f1c0b26 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 21 Sep 2014 10:10:19 +0000 Subject: [PATCH] Pass the attachment ID to the 'image_add_caption_text' filter. fixes #29607. git-svn-id: https://develop.svn.wordpress.org/trunk@29754 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/media.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index 8294a526a9..3cde141024 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -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.