From 6cfda71af734c557dfb31b7c1b38cfee0494d211 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Mon, 12 Oct 2015 16:33:30 +0000 Subject: [PATCH] Docs: Re-clarify the `$sizes[ $size ]` section of the hash notations for `WP_Image_Editor_GD::multi_resize()` and `WP_Image_Editor_Imagick::multi_resize()` as not fully-optional. The `$width` value is optional if `$height` is specified, and vice versa. The `$crop` value is always optional and defaults to false. Props dh-shredder. See #32246. See [35061] and [35062]. git-svn-id: https://develop.svn.wordpress.org/trunk@35063 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-image-editor-gd.php | 8 ++++---- src/wp-includes/class-wp-image-editor-imagick.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/class-wp-image-editor-gd.php b/src/wp-includes/class-wp-image-editor-gd.php index 3d4e89b72a..9951dba0a5 100644 --- a/src/wp-includes/class-wp-image-editor-gd.php +++ b/src/wp-includes/class-wp-image-editor-gd.php @@ -219,11 +219,11 @@ class WP_Image_Editor_GD extends WP_Image_Editor { * maintain aspect ratio according to the provided dimension. * * @type array $size { - * Optional. Array of height, width values, and whether to crop. + * Array of height, width values, and whether to crop. * - * @type int $width Image width. - * @type int $height Image height. - * @type bool $crop Whether to crop the image. Default false. + * @type int $width Image width. Optional if `$height` is specified. + * @type int $height Image height. Optional if `$width` is specified. + * @type bool $crop Optional. Whether to crop the image. Default false. * } * } * @return array An array of resized images' metadata by size. diff --git a/src/wp-includes/class-wp-image-editor-imagick.php b/src/wp-includes/class-wp-image-editor-imagick.php index 4479afc7ab..58338055e2 100644 --- a/src/wp-includes/class-wp-image-editor-imagick.php +++ b/src/wp-includes/class-wp-image-editor-imagick.php @@ -277,11 +277,11 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor { * maintain aspect ratio according to the provided dimension. * * @type array $size { - * Optional. Array of height, width values, and whether to crop. + * Array of height, width values, and whether to crop. * - * @type int $width Image width. - * @type int $height Image height. - * @type bool $crop Whether to crop the image. Default false. + * @type int $width Image width. Optional if `$height` is specified. + * @type int $height Image height. Optional if `$width` is specified. + * @type bool $crop Optional. Whether to crop the image. Default false. * } * } * @return array An array of resized images' metadata by size.