Make WordPress Core


Ignore:
Timestamp:
02/08/2021 02:12:21 PM (5 years ago)
Author:
SergeyBiryukov
Message:

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

Props GeekPress, audrasjb, naveen17797.
Fixes #52183.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-thumbnail-template.php

    r49693 r50236  
    216216 *
    217217 * @param int|WP_Post  $post Optional. Post ID or WP_Post object.  Default is global `$post`.
    218  * @param string|int[] $size Optional. Registered image size to retrieve the source for or a flat
    219  *                           array of height and width dimensions. Default 'post-thumbnail'.
    220  * @return string|false Post thumbnail URL or false if no URL is available.
     218 * @param string|int[] $size Optional. Registered image size to retrieve the source for or a flat array
     219 *                           of height and width dimensions. Default 'post-thumbnail'.
     220 * @return string|false Post thumbnail URL or false if no image is available. If `$size` does not match
     221 *                      any registered image size, the original image URL will be returned.
    221222 */
    222223function get_the_post_thumbnail_url( $post = null, $size = 'post-thumbnail' ) {
Note: See TracChangeset for help on using the changeset viewer.