diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index cd49de564e..14668cdc47 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -906,6 +906,7 @@ class wp_xmlrpc_server extends IXR_Server { 'caption' => $media_item->post_excerpt, 'description' => $media_item->post_content, 'metadata' => wp_get_attachment_metadata( $media_item->ID ), + 'type' => $media_item->post_mime_type ); $thumbnail_src = image_downsize( $media_item->ID, $thumbnail_size ); @@ -5770,12 +5771,12 @@ class wp_xmlrpc_server extends IXR_Server { */ do_action( 'xmlrpc_call_success_mw_newMediaObject', $id, $args ); - $struct = array( - 'id' => strval( $id ), - 'file' => $name, - 'url' => $upload[ 'url' ], - 'type' => $upload[ 'type' ] - ); + $struct = $this->_prepare_media_item( get_post( $id ) ); + + // Deprecated values + $struct['id'] = $struct['attachment_id']; + $struct['file'] = $struct['title']; + $struct['url'] = $struct['link']; return $struct; } diff --git a/wp-includes/version.php b/wp-includes/version.php index aa2a5565d5..2ffba30c74 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34578'; +$wp_version = '4.4-alpha-34579'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.