admin_post_thumbnail_html
Filter HookDescription
Filters the admin post thumbnail HTML markup to return.Hook Information
File Location |
wp-admin/includes/post.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1700 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$content
|
Admin post thumbnail HTML markup. |
int
|
$post_id
|
Post ID. |
int|null
|
$thumbnail_id
|
Thumbnail attachment ID, or null if there isn't one. |
Usage Examples
Basic Usage
<?php
// Hook into admin_post_thumbnail_html
add_filter('admin_post_thumbnail_html', 'my_custom_filter', 10, 3);
function my_custom_filter($content, $post_id, $thumbnail_id) {
// Your custom filtering logic here
return $content;
}
Source Code Context
wp-admin/includes/post.php:1700
- How this hook is used in WordPress core
<?php
1695 *
1696 * @param string $content Admin post thumbnail HTML markup.
1697 * @param int $post_id Post ID.
1698 * @param int|null $thumbnail_id Thumbnail attachment ID, or null if there isn't one.
1699 */
1700 return apply_filters( 'admin_post_thumbnail_html', $content, $post->ID, $thumbnail_id );
1701 }
1702
1703 /**
1704 * Determines whether the post is currently being edited by another user.
1705 *
PHP Documentation
<?php
/**
* Filters the admin post thumbnail HTML markup to return.
*
* @since 2.9.0
* @since 3.5.0 Added the `$post_id` parameter.
* @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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-admin/includes/post.php
Related Hooks
Related hooks will be displayed here in future updates.