Media: Standardise documentation of the $crop parameter for various media functions and methods.

See #58833


git-svn-id: https://develop.svn.wordpress.org/trunk@56416 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2023-08-18 17:54:41 +00:00
parent 9bb4369bc1
commit dde16aab1c
4 changed files with 67 additions and 27 deletions
+8 -1
View File
@@ -106,7 +106,14 @@ abstract class WP_Image_Editor {
*
* @param int|null $max_w Image width.
* @param int|null $max_h Image height.
* @param bool|array $crop
* @param bool|array $crop {
* Optional. Image cropping behavior. If false, the image will be scaled (default),
* If true, image will be cropped to the specified dimensions using center positions.
* If an array, the image will be cropped using the array to specify the crop location:
*
* @type string $0 The x crop position. Accepts 'left' 'center', or 'right'.
* @type string $1 The y crop position. Accepts 'top', 'center', or 'bottom'.
* }
* @return true|WP_Error
*/
abstract public function resize( $max_w, $max_h, $crop = false );