WordPress at Your Fingertips
filter is not described

has_post_thumbnail filter-hook . WP 5.1.0

Filters whether a post has a post thumbnail.


add_filter( 'has_post_thumbnail', 'filter_function_name_3248', 10, 3 );
function filter_function_name_3248( $has_thumbnail, $post, $thumbnail_id ){
	// filter...

	return $has_thumbnail;
true if the post has a post thumbnail, otherwise false.
Post ID or WP_Post object.
Default: global $post
Post thumbnail ID or false if the post does not exist.

Where the hook is called

wp-includes/post-thumbnail-template.php 38
return (bool) apply_filters( 'has_post_thumbnail', $has_thumbnail, $post, $thumbnail_id );

Where in WP core the hook is used WordPress

Usage not found.