Make WordPress Core

Changeset 45892


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.

Location:
trunk/src/wp-includes
Files:
2 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 {
  • trunk/src/wp-includes/class-wp-image-editor-imagick.php

    r45611 r45892  
    411411
    412412    /**
    413      * Resize multiple images from a single source.
     413     * Create multiple smaller images from a single source.
     414     *
     415     * Attempts to create all sub-sizes and returns the meta data at the end. This
     416     * may result in the server running out of resources. When it fails there may be few
     417     * "orphaned" images left over as the meta data is never returned and saved.
     418     *
     419     * As of 5.3.0 the preferred way to do this is with `make_subsize()`. It creates
     420     * the new images one at a time and allows for the meta data to be saved after
     421     * each new image is created.
    414422     *
    415423     * @since 3.5.0
    416424     *
    417425     * @param array $sizes {
    418      *     An array of image size arrays. Default sizes are 'thumbnail', 'medium', 'medium_large', 'large'.
     426     *     An array of image size data arrays.
    419427     *
    420428     *     Either a height or width must be provided.
Note: See TracChangeset for help on using the changeset viewer.