Skip to:
Content

BuddyPress.org

Changeset 11543


Ignore:
Timestamp:
04/27/2017 05:31:10 PM (7 years ago)
Author:
r-a-y
Message:

Attachments: Remove older support to fetch image orientation.

WordPress 4.0 supports this natively.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-attachment.php

    r11542 r11543  
    544544        // Now try to get image's meta data.
    545545        $meta = wp_read_image_metadata( $file );
    546 
    547546        if ( ! empty( $meta ) ) {
    548             // Before 4.0 the Orientation wasn't included.
    549             if ( ! isset( $meta['orientation'] ) &&
    550                 is_callable( 'exif_read_data' ) &&
    551                 in_array( $sourceImageType, apply_filters( 'wp_read_image_metadata_types', array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) ) )
    552             ) {
    553                 $exif = exif_read_data( $file );
    554 
    555                 if ( ! empty( $exif['Orientation'] ) ) {
    556                     $meta['orientation'] = $exif['Orientation'];
    557                 }
    558             }
    559 
    560             // Now add the metas to image data.
    561547            $image_data['meta'] = $meta;
    562548        }
Note: See TracChangeset for help on using the changeset viewer.