has_post_thumbnail WordPress Filter Hook
The has_post_thumbnail hook is used to check if a post has a thumbnail. If a post has a thumbnail, the hook returns true. If a post does not have a thumbnail, the hook returns false.
apply_filters( 'has_post_thumbnail', bool $has_thumbnail , int|WP_Post|null $post , int|false $thumbnail_id ) #
Filters whether a post has a post thumbnail.
Parameters
Source
Changelog
Version | Description |
---|---|
5.1.0 | Introduced. |