apply_filters( ‘post_thumbnail_url’, string|false $thumbnail_url, int|WP_Post|null $post, string|int[] $size )

In this article

Filters the post thumbnail URL.

Parameters

$thumbnail_urlstring|false
Post thumbnail URL or false if the post does not exist.
$postint|WP_Post|null
Post ID or WP_Post object. Default is global $post.
$sizestring|int[]
Registered image size to retrieve the source for or a flat array of height and width dimensions. Default 'post-thumbnail'.

Source

return apply_filters( 'post_thumbnail_url', $thumbnail_url, $post, $size );

Changelog

VersionDescription
5.9.0Introduced.

User Contributed Notes

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