Docs: Fix incorrect type for `$crop` param is various `WP_Image_Editor` classes and methods.
This changeset updates the `$crop` docblock type in various `WP_Image_Editor`, `WP_Image_Editor_GD` and `WP_Image_Editor_Imagick` functions, to match the type documented in `image_resize_dimensions()`. Props thunderdw. Fixes #58271. See #57840. Built from https://develop.svn.wordpress.org/trunk@56204 git-svn-id: http://core.svn.wordpress.org/trunk@55716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
36669b4f85
commit
e30391f2bd
|
@ -163,9 +163,9 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
|||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param int|null $max_w Image width.
|
||||
* @param int|null $max_h Image height.
|
||||
* @param bool $crop
|
||||
* @param int|null $max_w Image width.
|
||||
* @param int|null $max_h Image height.
|
||||
* @param bool|array $crop
|
||||
* @return true|WP_Error
|
||||
*/
|
||||
public function resize( $max_w, $max_h, $crop = false ) {
|
||||
|
@ -236,9 +236,9 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
|||
* @type array ...$0 {
|
||||
* Array of height, width values, and whether to crop.
|
||||
*
|
||||
* @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.
|
||||
* @type int $width Image width. Optional if `$height` is specified.
|
||||
* @type int $height Image height. Optional if `$width` is specified.
|
||||
* @type bool|array $crop Optional. Whether to crop the image. Default false.
|
||||
* }
|
||||
* }
|
||||
* @return array An array of resized images' metadata by size.
|
||||
|
@ -265,9 +265,9 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
|||
* @param array $size_data {
|
||||
* Array of size data.
|
||||
*
|
||||
* @type int $width The maximum width in pixels.
|
||||
* @type int $height The maximum height in pixels.
|
||||
* @type bool $crop Whether to crop the image to exact dimensions.
|
||||
* @type int $width The maximum width in pixels.
|
||||
* @type int $height The maximum height in pixels.
|
||||
* @type bool|array $crop Whether to crop the image to exact dimensions.
|
||||
* }
|
||||
* @return array|WP_Error The image data array for inclusion in the `sizes` array in the image meta,
|
||||
* WP_Error object on error.
|
||||
|
|
|
@ -308,9 +308,9 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
|||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param int|null $max_w Image width.
|
||||
* @param int|null $max_h Image height.
|
||||
* @param bool $crop
|
||||
* @param int|null $max_w Image width.
|
||||
* @param int|null $max_h Image height.
|
||||
* @param bool|array $crop
|
||||
* @return true|WP_Error
|
||||
*/
|
||||
public function resize( $max_w, $max_h, $crop = false ) {
|
||||
|
@ -495,9 +495,9 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
|||
* @type array ...$0 {
|
||||
* Array of height, width values, and whether to crop.
|
||||
*
|
||||
* @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.
|
||||
* @type int $width Image width. Optional if `$height` is specified.
|
||||
* @type int $height Image height. Optional if `$width` is specified.
|
||||
* @type bool|array $crop Optional. Whether to crop the image. Default false.
|
||||
* }
|
||||
* }
|
||||
* @return array An array of resized images' metadata by size.
|
||||
|
@ -524,9 +524,9 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
|||
* @param array $size_data {
|
||||
* Array of size data.
|
||||
*
|
||||
* @type int $width The maximum width in pixels.
|
||||
* @type int $height The maximum height in pixels.
|
||||
* @type bool $crop Whether to crop the image to exact dimensions.
|
||||
* @type int $width The maximum width in pixels.
|
||||
* @type int $height The maximum height in pixels.
|
||||
* @type bool|array $crop Whether to crop the image to exact dimensions.
|
||||
* }
|
||||
* @return array|WP_Error The image data array for inclusion in the `sizes` array in the image meta,
|
||||
* WP_Error object on error.
|
||||
|
|
|
@ -104,9 +104,9 @@ abstract class WP_Image_Editor {
|
|||
* @since 3.5.0
|
||||
* @abstract
|
||||
*
|
||||
* @param int|null $max_w Image width.
|
||||
* @param int|null $max_h Image height.
|
||||
* @param bool $crop
|
||||
* @param int|null $max_w Image width.
|
||||
* @param int|null $max_h Image height.
|
||||
* @param bool|array $crop
|
||||
* @return true|WP_Error
|
||||
*/
|
||||
abstract public function resize( $max_w, $max_h, $crop = false );
|
||||
|
@ -121,9 +121,9 @@ abstract class WP_Image_Editor {
|
|||
* An array of image size arrays. Default sizes are 'small', 'medium', 'large'.
|
||||
*
|
||||
* @type array ...$0 {
|
||||
* @type int $width Image width.
|
||||
* @type int $height Image height.
|
||||
* @type bool $crop Optional. Whether to crop the image. Default false.
|
||||
* @type int $width Image width.
|
||||
* @type int $height Image height.
|
||||
* @type bool|array $crop Optional. Whether to crop the image. Default false.
|
||||
* }
|
||||
* }
|
||||
* @return array An array of resized images metadata by size.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.3-beta3-56203';
|
||||
$wp_version = '6.3-beta3-56204';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue