[wp-trac] [WordPress Trac] #52183: get_the_post_thumbnail_url function returns original url if the size didnt exist
WordPress Trac
noreply at wordpress.org
Sun Feb 7 13:36:42 UTC 2021
#52183: get_the_post_thumbnail_url function returns original url if the size didnt
exist
-----------------------------+------------------------------
Reporter: naveen17797 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Thumbnails | Version: 5.6
Severity: normal | Resolution:
Keywords: | Focuses: docs
-----------------------------+------------------------------
Comment (by GeekPress):
@naveen17797 Your are confused because the `@return` description contains
a mistake. It should be `no image` instead of `no URL`.
@SergeyBiryukov I attached a patch to update the `@return` description
based on the `wp_get_attachment_image_url` description.
I don't know if we should be more specific in case the `$size` doesn't
match a registered image.
e.g:
{{{
@return string|false Post thumbnail URL or false if no image is available.
If `$size` doesn't match a registerd image size, the
original thumbnail URL
will be returned.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52183#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list