apply_filters( 'has_post_thumbnail', bool $has_thumbnail, int|WP_Post|null $post, int|string $thumbnail_id )

Filters whether a post has a post thumbnail.

Description Description

Parameters Parameters


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


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


(int|string) Post thumbnail ID or empty string.

Top ↑

Source Source

File: wp-includes/post-thumbnail-template.php

View on Trac

Top ↑

Changelog Changelog

Version Description
5.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.