Add exif `orientation` to data extracted in `wp_read_image_metadata()`.

Props shanebp.
Fixes 28916.

Built from https://develop.svn.wordpress.org/trunk@29291


git-svn-id: http://core.svn.wordpress.org/trunk@29073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-07-24 22:14:16 +00:00
parent a14f5b97d5
commit 2ed316e16d
1 changed files with 4 additions and 0 deletions

View File

@ -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 ) {