WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Image_Editor_Imagick::maybe_exif_rotate() public WP 5.3.0

Check if a JPEG image has EXIF Orientation tag and rotate it if needed.

As ImageMagick copies the EXIF data to the flipped/rotated image, proceed only if EXIF Orientation can be reset afterwards.

Это метод класса: WP_Image_Editor_Imagick{}

Хуков нет.

Возвращает

true/false/WP_Error. True if the image was rotated. False if no EXIF data or if the image doesn't need rotation. WP_Error if error while rotating.

Использование

$WP_Image_Editor_Imagick = new WP_Image_Editor_Imagick();
$WP_Image_Editor_Imagick->maybe_exif_rotate();

Список изменений

С версии 5.3.0 Введена.

Код WP Image Editor Imagick::maybe exif rotate: wp-includes/class-wp-image-editor-imagick.php WP 5.5.1

<?php
public function maybe_exif_rotate() {
	if ( is_callable( array( $this->image, 'setImageOrientation' ) ) && defined( 'Imagick::ORIENTATION_TOPLEFT' ) ) {
		return parent::maybe_exif_rotate();
	} else {
		return new WP_Error( 'write_exif_error', __( 'The image cannot be rotated because the embedded meta data cannot be updated.' ) );
	}
}