Filters whether a post has a post thumbnail.
$has_thumbnailbool$postint|WP_Post|null$thumbnail_idint|falsewp-includes/post-thumbnail-template.php:38has_post_thumbnail() * @since 5.1.0 * * @param bool $has_thumbnail true if the post has a post thumbnail, otherwise false. * @param int|WP_Post|null $post Post ID or WP_Post object. Default is global `$post`. * @param int|false $thumbnail_id Post thumbnail ID or false if the post does not exist. */ return (bool) apply_filters( 'has_post_thumbnail', $has_thumbnail, $post, $thumbnail_id );} /** * Retrieves the post thumbnail ID. * * @since 2.9.0Introduced in 5.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.