On this page
post_thumbnail_meta_box( WP_Post $post )
Displays post thumbnail meta box.
Parameters
$postWP_Post Required-
Current post object.
Source
File: wp-admin/includes/meta-boxes.php. View all references
function post_thumbnail_meta_box( $post ) {
$thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true );
echo _wp_post_thumbnail_html( $thumbnail_id, $post->ID );
}
Related
Uses
| Uses | Description |
|---|---|
| _wp_post_thumbnail_html() wp-admin/includes/post.php | Returns HTML for the post thumbnail meta box. |
| get_post_meta() wp-includes/post.php | Retrieves a post meta field for the given post ID. |
Changelog
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/post_thumbnail_meta_box