--- a/wp/wp-includes/class-wp-image-editor-imagick.php Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-includes/class-wp-image-editor-imagick.php Tue Sep 27 16:37:53 2022 +0200
@@ -129,7 +129,7 @@
}
if ( ! is_file( $this->file ) && ! wp_is_stream( $this->file ) ) {
- return new WP_Error( 'error_loading_image', __( 'File doesn’t exist?' ), $this->file );
+ return new WP_Error( 'error_loading_image', __( 'File does not exist?' ), $this->file );
}
/*
@@ -444,7 +444,7 @@
* If one of the two is set to null, the resize will
* maintain aspect ratio according to the provided dimension.
*
- * @type array $size {
+ * @type array ...$0 {
* Array of height, width values, and whether to crop.
*
* @type int $width Image width. Optional if `$height` is specified.
@@ -589,7 +589,7 @@
try {
$this->image->rotateImage( new ImagickPixel( 'none' ), 360 - $angle );
- // Normalise EXIF orientation data so that display is consistent across devices.
+ // Normalize EXIF orientation data so that display is consistent across devices.
if ( is_callable( array( $this->image, 'setImageOrientation' ) ) && defined( 'Imagick::ORIENTATION_TOPLEFT' ) ) {
$this->image->setImageOrientation( Imagick::ORIENTATION_TOPLEFT );
}
@@ -627,7 +627,7 @@
$this->image->flopImage();
}
- // Normalise EXIF orientation data so that display is consistent across devices.
+ // Normalize EXIF orientation data so that display is consistent across devices.
if ( is_callable( array( $this->image, 'setImageOrientation' ) ) && defined( 'Imagick::ORIENTATION_TOPLEFT' ) ) {
$this->image->setImageOrientation( Imagick::ORIENTATION_TOPLEFT );
}
@@ -662,8 +662,8 @@
*
* @since 3.5.0
*
- * @param string $destfilename
- * @param string $mime_type
+ * @param string $destfilename Optional. Destination filename. Default null.
+ * @param string $mime_type Optional. The mime-type. Default null.
* @return array|WP_Error {'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string}
*/
public function save( $destfilename = null, $mime_type = null ) {
@@ -729,6 +729,7 @@
'width' => $this->size['width'],
'height' => $this->size['height'],
'mime-type' => $mime_type,
+ 'filesize' => wp_filesize( $filename ),
);
}
@@ -901,7 +902,7 @@
*
* @since 5.6.0
*
- * @return true|WP_error
+ * @return true|WP_Error
*/
protected function pdf_load_source() {
$filename = $this->pdf_setup();