Add exif `orientation` to data extracted in `wp_read_image_metadata()`.
Props shanebp. Fixes 28916. git-svn-id: https://develop.svn.wordpress.org/trunk@29291 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1cbe1cec12
commit
66c8ad501f
|
@ -273,6 +273,7 @@ function wp_read_image_metadata( $file ) {
|
|||
'iso' => 0,
|
||||
'shutter_speed' => 0,
|
||||
'title' => '',
|
||||
'orientation' => 0,
|
||||
);
|
||||
|
||||
/*
|
||||
|
@ -389,6 +390,9 @@ function wp_read_image_metadata( $file ) {
|
|||
if ( ! empty( $exif['ExposureTime'] ) ) {
|
||||
$meta['shutter_speed'] = (string) wp_exif_frac2dec( $exif['ExposureTime'] );
|
||||
}
|
||||
if ( ! empty( $exif['Orientation'] ) ) {
|
||||
$meta['orientation'] = $exif['Orientation'];
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( array( 'title', 'caption', 'credit', 'copyright', 'camera', 'iso' ) as $key ) {
|
||||
|
|
Loading…
Reference in New Issue