Make WordPress Core


Ignore:
Timestamp:
07/11/2023 06:29:11 AM (22 months ago)
Author:
audrasjb
Message:

Docs: Fix incorrect type for $crop param is various WP_Image_Editor classes and methods.

This changeset updates the $crop docblock type in various WP_Image_Editor, WP_Image_Editor_GD and WP_Image_Editor_Imagick functions, to match the
type documented in image_resize_dimensions().

Props thunderdw.
Fixes #58271.
See #57840.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-image-editor.php

    r56178 r56204  
    105105     * @abstract
    106106     *
    107      * @param int|null $max_w Image width.
    108      * @param int|null $max_h Image height.
    109      * @param bool    $crop
     107     * @param int|null   $max_w Image width.
     108     * @param int|null   $max_h Image height.
     109     * @param bool|array $crop
    110110     * @return true|WP_Error
    111111     */
     
    122122     *
    123123     *     @type array ...$0 {
    124      *         @type int  $width  Image width.
    125      *         @type int  $height Image height.
    126      *         @type bool $crop   Optional. Whether to crop the image. Default false.
     124     *         @type int        $width  Image width.
     125     *         @type int        $height Image height.
     126     *         @type bool|array $crop   Optional. Whether to crop the image. Default false.
    127127     *     }
    128128     * }
Note: See TracChangeset for help on using the changeset viewer.