On this page
apply_filters( 'post_thumbnail_url', string|false $thumbnail_url, int|WP_Post|null $post, string|int[] $size )
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
File: wp-includes/post-thumbnail-template.php. View all references
return apply_filters( 'post_thumbnail_url', $thumbnail_url, $post, $size );
Related
Used By
| Used By | Description |
|---|---|
| get_the_post_thumbnail_url() wp-includes/post-thumbnail-template.php | Returns the post thumbnail URL. |
Changelog
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/post_thumbnail_url