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

See #40439.
Built from https://develop.svn.wordpress.org/trunk@45892


git-svn-id: http://core.svn.wordpress.org/trunk@45703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2019-08-25 22:21:58 +00:00
parent b1847ef3e2
commit c5fed47367
3 changed files with 22 additions and 6 deletions

View File

@ -197,16 +197,24 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
}
/**
* Resize multiple images from a single source.
* Create multiple smaller images from a single source.
*
* Attempts to create all sub-sizes and returns the meta data at the end. This
* may result in the server running out of resources. When it fails there may be few
* "orphaned" images left over as the meta data is never returned and saved.
*
* As of 5.3.0 the preferred way to do this is with `make_subsize()`. It creates
* the new images one at a time and allows for the meta data to be saved after
* each new image is created.
*
* @since 3.5.0
*
* @param array $sizes {
* An array of image size arrays. Default sizes are 'small', 'medium', 'medium_large', 'large'.
* An array of image size data arrays.
*
* Either a height or width must be provided.
* If one of the two is set to null, the resize will
* maintain aspect ratio according to the provided dimension.
* maintain aspect ratio according to the source image.
*
* @type array $size {
* Array of height, width values, and whether to crop.

View File

@ -410,12 +410,20 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
}
/**
* Resize multiple images from a single source.
* Create multiple smaller images from a single source.
*
* Attempts to create all sub-sizes and returns the meta data at the end. This
* may result in the server running out of resources. When it fails there may be few
* "orphaned" images left over as the meta data is never returned and saved.
*
* As of 5.3.0 the preferred way to do this is with `make_subsize()`. It creates
* the new images one at a time and allows for the meta data to be saved after
* each new image is created.
*
* @since 3.5.0
*
* @param array $sizes {
* An array of image size arrays. Default sizes are 'thumbnail', 'medium', 'medium_large', 'large'.
* An array of image size data arrays.
*
* Either a height or width must be provided.
* If one of the two is set to null, the resize will

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45891';
$wp_version = '5.3-alpha-45892';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.