Ticket #6430: 6430.diff
File 6430.diff, 1.1 KB (added by , 11 years ago) |
---|
-
wp-includes/class-wp-xmlrpc-server.php
742 742 'caption' => $media_item->post_excerpt, 743 743 'description' => $media_item->post_content, 744 744 'metadata' => wp_get_attachment_metadata( $media_item->ID ), 745 'type' => $media_item->post_mime_type 745 746 ); 746 747 747 748 $thumbnail_src = image_downsize( $media_item->ID, $thumbnail_size ); … … 4579 4580 4580 4581 do_action( 'xmlrpc_call_success_mw_newMediaObject', $id, $args ); 4581 4582 4582 $struct = array( 4583 'id' => strval( $id ), 4584 'file' => $name, 4585 'url' => $upload[ 'url' ], 4586 'type' => $type 4587 ); 4583 4584 $struct = $this->_prepare_media_item( get_post( $id ) ); 4585 4586 // Deprecated values 4587 $struct['id'] = $struct['attachment_id']; 4588 $struct['file'] = $struct['title']; 4589 $struct['url'] = $struct['link']; 4590 4588 4591 return apply_filters( 'wp_handle_upload', $struct, 'upload' ); 4589 4592 } 4590 4593