admin_post_thumbnail_html WordPress Filter Hook

The admin_post_thumbnail_html hook is triggered when a post thumbnail is generated for a post in the admin interface. It allows for customization of the post thumbnail HTML.

apply_filters( 'admin_post_thumbnail_html', string $content, int $post_id, int|null $thumbnail_id ) #

Filters the admin post thumbnail HTML markup to return.


Parameters

$content

(string)Admin post thumbnail HTML markup.

$post_id

(int)Post ID.

$thumbnail_id

(int|null)Thumbnail attachment ID, or null if there isn't one.


Top ↑

Source

File: wp-admin/includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.6.0Added the $thumbnail_id parameter.
3.5.0Added the $post_id parameter.
2.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More