apply_filters( ‘post_thumbnail_id’, int|false $thumbnail_id, int|WP_Post|null $post )

In this article

Filters the post thumbnail ID.

Parameters

$thumbnail_idint|false
Post thumbnail ID or false if the post does not exist.
$postint|WP_Post|null
Post ID or WP_Post object. Default is global $post.

Source

return (int) apply_filters( 'post_thumbnail_id', $thumbnail_id, $post );

Changelog

VersionDescription
5.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.