Docs: Clarify the @return value for wp_get_attachment_image_url() and get_the_post_thumbnail_url().

Props GeekPress, audrasjb, naveen17797.
Fixes #52183.

git-svn-id: https://develop.svn.wordpress.org/trunk@50236 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-02-08 14:12:21 +00:00
parent a8179897a2
commit c3dd52264d
2 changed files with 6 additions and 4 deletions

View File

@@ -1124,7 +1124,8 @@ function wp_get_attachment_image( $attachment_id, $size = 'thumbnail', $icon = f
* @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of
* width and height values in pixels (in that order). Default 'thumbnail'.
* @param bool $icon Optional. Whether the image should be treated as an icon. Default false.
* @return string|false Attachment URL or false if no image is available.
* @return string|false Attachment URL or false if no image is available. If `$size` does not match
* any registered image size, the original image URL will be returned.
*/
function wp_get_attachment_image_url( $attachment_id, $size = 'thumbnail', $icon = false ) {
$image = wp_get_attachment_image_src( $attachment_id, $size, $icon );