apply_filters( 'admin_post_thumbnail_html', string $content, int $post_id, int|null $thumbnail_id )
- Since
- 2.9.0, 3.5.0, 4.6.0
Filters the admin post thumbnail HTML markup to return.
Compatibility
- WordPress
- since 4.6.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$contentstring- Admin post thumbnail HTML markup.
$post_idint- Post ID.
$thumbnail_idint|null- Thumbnail attachment ID, or null if there isn't one.
Where this hook fires · 1
wp-admin/includes/post.php:1700_wp_post_thumbnail_html()
Source code
<?php * @since 4.6.0 Added the `$thumbnail_id` parameter. * * @param string $content Admin post thumbnail HTML markup. * @param int $post_id Post ID. * @param int|null $thumbnail_id Thumbnail attachment ID, or null if there isn't one. */ return apply_filters( 'admin_post_thumbnail_html', $content, $post->ID, $thumbnail_id );} /** * Determines whether the post is currently being edited by another user. * * @since 2.5.0Changelog
Introduced in 2.9.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
4.6.0
Added the
$thumbnail_id parameter.from the docblock3.5.0
Added the
$post_id parameter.from the docblock2.9.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.