You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/webp-uploads/helper.php
+22-9Lines changed: 22 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -82,11 +82,11 @@ function webp_uploads_get_upload_image_mime_transforms(): array {
82
82
* @since 1.0.0
83
83
* @access private
84
84
*
85
-
* @param int $attachment_id The ID of the attachment from where this image would be created.
86
-
* @param string $image_size The size name that would be used to create the image source, out of the registered subsizes.
87
-
* @param array{ width: int, height: int, crop: bool} $size_data An array with the dimensions of the image: height, width and crop.
88
-
* @param string $mime The target mime in which the image should be created.
89
-
* @param string|null $destination_file_name The path where the file would be stored, including the extension. If null, `generate_filename` is used to create the destination file name.
85
+
* @param int $attachment_id The ID of the attachment from where this image would be created.
86
+
* @param string $image_size The size name that would be used to create the image source, out of the registered subsizes.
87
+
* @param array{ width: int, height: int, crop: bool|array{0: string, 1: string}} $size_data An array with the dimensions of the image: height, width and crop.
88
+
* @param string $mime The target mime in which the image should be created.
89
+
* @param string|null $destination_file_name The path where the file would be stored, including the extension. If null, `generate_filename` is used to create the destination file name.
90
90
*
91
91
* @return array{ file: string, filesize: int }|WP_Error An array with the file and filesize if the image was created correctly, otherwise a WP_Error.
92
92
*/
@@ -109,7 +109,7 @@ function webp_uploads_generate_additional_image_source( int $attachment_id, stri
109
109
* @param array{
110
110
* width: int,
111
111
* height: int,
112
-
* crop: bool
112
+
* crop: bool|array{0: string, 1: string}
113
113
* } $size_data An array with the dimensions of the image.
114
114
* @param string $mime The target mime in which the image should be created.
115
115
*/
@@ -156,7 +156,7 @@ function webp_uploads_generate_additional_image_source( int $attachment_id, stri
0 commit comments