From dbf17abf5c14c8f2fc4842901a528043c081cf28 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 13 Apr 2016 16:17:10 +0000 Subject: [PATCH] Pass thumbnail ID to the `admin_post_thumbnail_html` filter. Also updates changelog to reflect that `$post->ID` was added in 3.5 Props johnjamesjacoby. Fixes #36443. git-svn-id: https://develop.svn.wordpress.org/trunk@37196 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/post.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index 8be61474bc..2f1f17830a 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -1429,11 +1429,14 @@ function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) { * Filter the admin post thumbnail HTML markup to return. * * @since 2.9.0 + * @since 3.5.0 Added $post->ID + * @since 4.6.0 Added $thumbnail_id * - * @param string $content Admin post thumbnail HTML markup. - * @param int $post_id Post ID. + * @param string $content Admin post thumbnail HTML markup. + * @param int $post_id Post ID. + * @param int $thumbnail_id Thumbnail ID. */ - return apply_filters( 'admin_post_thumbnail_html', $content, $post->ID ); + return apply_filters( 'admin_post_thumbnail_html', $content, $post->ID, $thumbnail_id ); } /**