Ticket #22768: 22768.diff
File 22768.diff, 1.1 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/media.php
223 223 $file = $file['file']; 224 224 $title = $name; 225 225 $content = ''; 226 $excerpt = ''; 226 227 227 228 if ( preg_match( '#^audio#', $type ) ) { 228 229 $meta = wp_read_audio_metadata( $file ); … … 230 231 if ( ! empty( $meta['title'] ) ) 231 232 $title = $meta['title']; 232 233 233 $content = '';234 235 234 if ( ! empty( $title ) ) { 236 235 237 236 if ( ! empty( $meta['album'] ) && ! empty( $meta['artist'] ) ) { … … 281 280 if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) 282 281 $title = $image_meta['title']; 283 282 if ( trim( $image_meta['caption'] ) ) 284 $ content = $image_meta['caption'];283 $excerpt = $image_meta['caption']; 285 284 } 286 285 287 286 // Construct the attachment array … … 291 290 'post_parent' => $post_id, 292 291 'post_title' => $title, 293 292 'post_content' => $content, 293 'post_excerpt' => $excerpt, 294 294 ), $post_data ); 295 295 296 296 // This should never be set as it would then overwrite an existing attachment.