Make WordPress Core


Ignore:
Timestamp:
08/25/2019 10:20:57 PM (5 years ago)
Author:
azaozz
Message:

Docs: Improve and update the description of multi_resize() to explain changes and expected use.

See #40439.

File:
1 edited

Legend:

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

    r45611 r45892  
    198198
    199199    /**
    200      * Resize multiple images from a single source.
     200     * Create multiple smaller images from a single source.
     201     *
     202     * Attempts to create all sub-sizes and returns the meta data at the end. This
     203     * may result in the server running out of resources. When it fails there may be few
     204     * "orphaned" images left over as the meta data is never returned and saved.
     205     *
     206     * As of 5.3.0 the preferred way to do this is with `make_subsize()`. It creates
     207     * the new images one at a time and allows for the meta data to be saved after
     208     * each new image is created.
    201209     *
    202210     * @since 3.5.0
    203211     *
    204212     * @param array $sizes {
    205      *     An array of image size arrays. Default sizes are 'small', 'medium', 'medium_large', 'large'.
     213     *     An array of image size data arrays.
    206214     *
    207215     *     Either a height or width must be provided.
    208216     *     If one of the two is set to null, the resize will
    209      *     maintain aspect ratio according to the provided dimension.
     217     *     maintain aspect ratio according to the source image.
    210218     *
    211219     *     @type array $size {
Note: See TracChangeset for help on using the changeset viewer.