From 1e82651504ae46775b2518f215e82c2f4819758b Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 13 Apr 2016 16:18:28 +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. Built from https://develop.svn.wordpress.org/trunk@37196 git-svn-id: http://core.svn.wordpress.org/trunk@37162 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 9 ++++++--- wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 8be61474bc..2f1f17830a 100644 --- a/wp-admin/includes/post.php +++ b/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 ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index fff2d8196c..b7dc740ed9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37195'; +$wp_version = '4.6-alpha-37196'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.