Make WordPress Core


Ignore:
Timestamp:
08/18/2023 05:54:41 PM (3 years ago)
Author:
johnbillion
Message:

Media: Standardise documentation of the $crop parameter for various media functions and methods.

See #58833

File:
1 edited

Legend:

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

    r56204 r56416  
    166166         * @param int|null   $max_w Image width.
    167167         * @param int|null   $max_h Image height.
    168          * @param bool|array $crop
     168         * @param bool|array $crop   {
     169         *     Optional. Image cropping behavior. If false, the image will be scaled (default),
     170         *     If true, image will be cropped to the specified dimensions using center positions.
     171         *     If an array, the image will be cropped using the array to specify the crop location:
     172         *
     173         *     @type string $0 The x crop position. Accepts 'left' 'center', or 'right'.
     174         *     @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'.
     175         * }
    169176         * @return true|WP_Error
    170177         */
    … …  
    191198         * @param int        $max_w
    192199         * @param int        $max_h
    193          * @param bool|array $crop
     200         * @param bool|array $crop   {
     201         *     Optional. Image cropping behavior. If false, the image will be scaled (default),
     202         *     If true, image will be cropped to the specified dimensions using center positions.
     203         *     If an array, the image will be cropped using the array to specify the crop location:
     204         *
     205         *     @type string $0 The x crop position. Accepts 'left' 'center', or 'right'.
     206         *     @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'.
     207         * }
    194208         * @return resource|GdImage|WP_Error
    195209         */
Note: See TracChangeset for help on using the changeset viewer.