A WordPress-centric search engine for devs and theme authors



has_post_thumbnail ›

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|string) $thumbnail_id Post thumbnail ID or empty string.
    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 );