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

Filters the post thumbnail URL.


Parameters

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

Top ↑

Source

File: wp-includes/post-thumbnail-template.php. View all references

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


Top ↑

Changelog

Changelog
Version Description
5.9.0 Introduced.

Top ↑

User Contributed Notes

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