Changeset 31694 for trunk/src/wp-admin/includes/media.php
- Timestamp:
- 03/10/2015 05:06:39 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/media.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/media.php
r31645 r31694 281 281 $title = $name; 282 282 $content = ''; 283 $excerpt = ''; 283 284 284 285 if ( preg_match( '#^audio#', $type ) ) { 285 286 $meta = wp_read_audio_metadata( $file ); 286 287 287 if ( ! empty( $meta['title'] ) ) 288 if ( ! empty( $meta['title'] ) ) { 288 289 $title = $meta['title']; 289 290 $content = ''; 290 } 291 291 292 292 if ( ! empty( $title ) ) { … … 336 336 // Use image exif/iptc data for title and caption defaults if possible. 337 337 } elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = @wp_read_image_metadata( $file ) ) { 338 if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) 338 if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) { 339 339 $title = $image_meta['title']; 340 if ( trim( $image_meta['caption'] ) ) 341 $content = $image_meta['caption']; 340 } 341 342 if ( trim( $image_meta['caption'] ) ) { 343 $excerpt = $image_meta['caption']; 344 } 342 345 } 343 346 … … 349 352 'post_title' => $title, 350 353 'post_content' => $content, 354 'post_excerpt' => $excerpt, 351 355 ), $post_data ); 352 356
Note: See TracChangeset
for help on using the changeset viewer.