diff --git a/includes/admin/core/class-admin-settings.php b/includes/admin/core/class-admin-settings.php index b46b2010..548b2524 100644 --- a/includes/admin/core/class-admin-settings.php +++ b/includes/admin/core/class-admin-settings.php @@ -776,10 +776,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) { ), array( - 'id' => 'image_fix_orientation', + 'id' => 'image_orientation_by_exif', 'type' => 'checkbox', - 'label' => __( 'Fix image orientation','ultimate-member' ), - 'tooltip' => __( 'Rotate image to fix orientation by the camera Exif data.','ultimate-member'), + 'label' => __( 'Change image orientation', 'ultimate-member' ), + 'tooltip' => __( 'Rotate image to and use orientation by the camera EXIF data.', 'ultimate-member' ), ), array( 'id' => 'image_compression', diff --git a/includes/class-config.php b/includes/class-config.php index ab68b21c..1fa9b2cb 100644 --- a/includes/class-config.php +++ b/includes/class-config.php @@ -565,7 +565,7 @@ if ( ! class_exists( 'um\Config' ) ) { 'mail_from' => get_bloginfo('name'), 'mail_from_addr' => get_bloginfo('admin_email'), 'email_html' => 1, - 'image_fix_orientation' => 1, + 'image_orientation_by_exif' => 0, 'image_compression' => 60, 'image_max_width' => 1000, 'cover_min_width' => 1000, diff --git a/includes/core/class-files.php b/includes/core/class-files.php index 9bb0bb91..ee5eb8c4 100644 --- a/includes/core/class-files.php +++ b/includes/core/class-files.php @@ -745,21 +745,21 @@ if ( ! class_exists( 'um\core\Files' ) ) { * @return resource */ function fix_image_orientation( $rotate, $source ) { - if ( extension_loaded('exif') ){ + if ( extension_loaded('exif') ) { $exif = @exif_read_data( $source ); - if (isset($exif['Orientation'])) { - switch ($exif['Orientation']) { + if ( isset( $exif['Orientation'] ) ) { + switch ( $exif['Orientation'] ) { case 3: - $rotate = imagerotate($rotate, 180, 0); + $rotate = imagerotate( $rotate, 180, 0 ); break; case 6: - $rotate = imagerotate($rotate, -90, 0); + $rotate = imagerotate( $rotate, -90, 0 ); break; case 8: - $rotate = imagerotate($rotate, 90, 0); + $rotate = imagerotate( $rotate, 90, 0 ); break; } } diff --git a/includes/core/class-uploader.php b/includes/core/class-uploader.php index 05cfdff5..7867dda4 100644 --- a/includes/core/class-uploader.php +++ b/includes/core/class-uploader.php @@ -1201,7 +1201,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) { * @return array */ public function rotate_uploaded_image( $movefile ) { - $image_fix_orientation = UM()->options()->get( 'image_fix_orientation' ); + $image_fix_orientation = UM()->options()->get( 'image_orientation_by_exif' ); if ( $image_fix_orientation && $movefile['type'] == 'image/jpeg' ) { $image = imagecreatefromjpeg( $movefile['file'] ); if ( $image ) {