Make WordPress Core


Ignore:
Timestamp:
01/11/2020 06:30:58 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: In various @return tags, list the expected type first, instead of false.

Follow-up to [46696].

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r47010 r47060  
    186186 *                           or an array of width and height values in pixels (in that order).
    187187 *                           Default 'medium'.
    188  * @return false|array Array containing the image URL, width, height, and boolean for whether
     188 * @return array|false Array containing the image URL, width, height, and boolean for whether
    189189 *                     the image is an intermediate size. False on failure.
    190190 */
     
    522522 * @param bool|array $crop   Optional. Whether to crop image to specified width and height or resize.
    523523 *                           An array can specify positioning of the crop area. Default false.
    524  * @return false|array False on failure. Returned array matches parameters for `imagecopyresampled()`.
     524 * @return array|false Returned array matches parameters for `imagecopyresampled()`. False on failure.
    525525 */
    526526function image_resize_dimensions( $orig_w, $orig_h, $dest_w, $dest_h, $crop = false ) {
     
    666666 * @param bool   $crop   Optional. Whether to crop image to specified width and height or resize.
    667667 *                       Default false.
    668  * @return false|array False, if no image was created. Metadata array on success.
     668 * @return array|false Metadata array on success. False if no image was created.
    669669 */
    670670function image_make_intermediate_size( $file, $width, $height, $crop = false ) {
     
    741741 *                              of width and height values in pixels (in that order).
    742742 *                              Default 'thumbnail'.
    743  * @return false|array $data {
     743 * @return array|false $data {
    744744 *     Array of file relative path, width, and height on success. Additionally includes absolute
    745745 *     path and URL if registered size is passed to $size parameter. False on failure.
     
    942942 *                                    and height values in pixels (in that order). Default 'thumbnail'.
    943943 * @param bool         $icon          Optional. Whether the image should be treated as an icon. Default false.
    944  * @return false|array Returns an array (url, width, height, is_intermediate), or false, if no image is available.
     944 * @return array|false Returns an array (url, width, height, is_intermediate), or false if no image is available.
    945945 */
    946946function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon = false ) {
Note: See TracChangeset for help on using the changeset viewer.