wpseek.com
WordPress开发者和主题制作者的搜索引擎



has_post_thumbnail › WordPress过滤钩子

Since5.1.0
已弃用n/a
apply_filters( 'has_post_thumbnail', $has_thumbnail, $post, $thumbnail_id )
参数: (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
定义在:
文档:

Filters whether a post has a post thumbnail.





源码

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