Changeset 28808 for trunk/src/wp-admin/includes/image.php
- Timestamp:
- 06/23/2014 10:20:23 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image.php
r28806 r28808 290 290 $caption = trim( $iptc['2#120'][0] ); 291 291 if ( empty( $meta['title'] ) ) { 292 mbstring_binary_safe_encoding(); 293 $caption_length = strlen( $caption ); 294 reset_mbstring_encoding(); 295 292 296 // Assume the title is stored in 2:120 if it's short. 293 if ( mbstring_binary_safe_strlen( $caption ) < 80 )297 if ( $caption_length < 80 ) { 294 298 $meta['title'] = $caption; 295 else299 } else { 296 300 $meta['caption'] = $caption; 301 } 297 302 } elseif ( $caption != $meta['title'] ) { 298 303 $meta['caption'] = $caption; … … 328 333 329 334 if ( ! empty( $exif['ImageDescription'] ) ) { 330 if ( empty( $meta['title'] ) && mbstring_binary_safe_strlen( $exif['ImageDescription'] ) < 80 ) { 335 mbstring_binary_safe_encoding(); 336 $description_length = strlen( $exif['ImageDescription'] ); 337 reset_mbstring_encoding(); 338 339 if ( empty( $meta['title'] ) && $description_length < 80 ) { 331 340 // Assume the title is stored in ImageDescription 332 341 $meta['title'] = trim( $exif['ImageDescription'] );
Note: See TracChangeset
for help on using the changeset viewer.