has_post_thumbnail

最后更新于:2021-11-27 00:39:04

apply_filters( ‘has_post_thumbnail’, bool $has_thumbnail, int|GC_Post|null $post, int|false $thumbnail_id )

Filters whether a post has a post thumbnail.

参数

$has_thumbnail

(bool)
true if the post has a post thumbnail, otherwise false.

$post

(int|GC_Post|null)
Post ID or GC_Post object. Default is global $post.

$thumbnail_id

(int|false)
Post thumbnail ID or false if the post does not exist.

源文件

文件: gc-includes/post-thumbnail-template.php

View on Trac