/**
* Returns HTML for the post thumbnail meta box.
*
* @since 2.9.0
*
* @param int|null $thumbnail_id Optional. Thumbnail attachment ID. Default null.
* @param int|WP_Post|null $post Optional. The post ID or object associated
* with the thumbnail. Defaults to global $post.
* @return string The post thumbnail HTML.
*/
function _wp_post_thumbnail_html( $thumbnail_id = null,
$post = null
) { $_wp_additional_image_sizes =
wp_get_additional_image_sizes();
$post =
get_post( $post );
$post_type_object =
get_post_type_object( $post->post_type
);
$set_thumbnail_link = '<p class="hide-if-no-js"><a href="%s" id="set-post-thumbnail"%s class="thickbox">%s</a></p>';
$upload_iframe_src =
get_upload_iframe_src( 'image',
$post->ID
);
$content =
sprintf( $set_thumbnail_link,
esc_url( $upload_iframe_src ),
'', // Empty when there's no featured image set, `aria-describedby` attribute otherwise.
esc_html( $post_type_object->labels->set_featured_image
) );