mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user