Summery Summery
Return the post thumbnail URL.
Syntax Syntax
Parameters Parameters
- $post
-
(Optional) Post ID or WP_Post object. Default is global
$post
.Default value: null
- $size
-
(Optional) Registered image size to retrieve the source for or a flat array of height and width dimensions. Default 'post-thumbnail'.
Default value: 'post-thumbnail'
Return Return
(string|false) Post thumbnail URL or false if no URL is available.
Source Source
File: wp-includes/post-thumbnail-template.php
/** * Return the post thumbnail URL. * * @since 4.4.0 * * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |