wpseek.com
A WordPress-centric search engine for devs and theme authors



has_post_thumbnail › WordPress Filter Hooks

Since5.1.0
Deprecatedn/a
apply_filters( 'has_post_thumbnail', $has_thumbnail, $post, $thumbnail_id )
Parameters: (3)
  • (bool) $has_thumbnail true if the post has a post thumbnail, otherwise false.
    Required: Yes
  • (int|WP_Post|null) $post Post ID or WP_Post object. Default is global `$post`.
    Required: Yes
  • (int|false) $thumbnail_id Post thumbnail ID or false if the post does not exist.
    Required: Yes
Defined at:
Codex:

Filters whether a post has a post thumbnail.





Source

return (bool) apply_filters( 'has_post_thumbnail', $has_thumbnail, $post, $thumbnail_id );