mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Fix notice in wp_read_image_metadata() when EXIF ISOSpeedRatings is array, props nacin, fixes #20807
git-svn-id: http://core.svn.wordpress.org/trunk@20978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f3526bbbdd
commit
cb71d2fe62
@ -319,8 +319,10 @@ function wp_read_image_metadata( $file ) {
|
||||
$meta['created_timestamp'] = wp_exif_date2ts($exif['DateTimeDigitized'] );
|
||||
if ( ! empty($exif['FocalLength'] ) )
|
||||
$meta['focal_length'] = wp_exif_frac2dec( $exif['FocalLength'] );
|
||||
if ( ! empty($exif['ISOSpeedRatings'] ) )
|
||||
$meta['iso'] = utf8_encode( trim( $exif['ISOSpeedRatings'] ) );
|
||||
if ( ! empty($exif['ISOSpeedRatings'] ) ) {
|
||||
$meta['iso'] = is_array( $exif['ISOSpeedRatings'] ) ? reset( $exif['ISOSpeedRatings'] ) : $exif['ISOSpeedRatings'];
|
||||
$meta['iso'] = utf8_encode( trim( $meta['iso'] ) );
|
||||
}
|
||||
if ( ! empty($exif['ExposureTime'] ) )
|
||||
$meta['shutter_speed'] = wp_exif_frac2dec( $exif['ExposureTime'] );
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ jQuery(document).ready(function($){
|
||||
|
||||
setResize( getUserSetting('upload_resize', false) );
|
||||
|
||||
if ( up.features.dragdrop ) {
|
||||
if ( up.features.dragdrop && ! $(document.body).hasClass('mobile') ) {
|
||||
uploaddiv.addClass('drag-drop');
|
||||
$('#drag-drop-area').bind('dragover.wp-uploader', function(){ // dragenter doesn't fire right :(
|
||||
uploaddiv.addClass('drag-over');
|
||||
|
Loading…
Reference in New Issue
Block a user