Changeset 11543
- Timestamp:
- 04/27/2017 05:31:10 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-attachment.php
r11542 r11543 544 544 // Now try to get image's meta data. 545 545 $meta = wp_read_image_metadata( $file ); 546 547 546 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.561 547 $image_data['meta'] = $meta; 562 548 }
Note: See TracChangeset
for help on using the changeset viewer.