mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
Attachment data abstraction from mdawaffe. fixes #3440
git-svn-id: https://develop.svn.wordpress.org/trunk@4612 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -871,8 +871,8 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
'guid' => $upload[ 'url' ]
|
||||
);
|
||||
// Save the data
|
||||
$id = wp_insert_attachment($attachment, $upload[ 'file' ], $post_id);
|
||||
add_post_meta($id, '_wp_attachment_metadata', array());
|
||||
$id = wp_insert_attachment( $attachment, $upload[ 'file' ], $post_id );
|
||||
wp_update_attachment_metadata( $id, array() );
|
||||
|
||||
return apply_filters( 'wp_handle_upload', array( 'file' => $upload[ 'file' ], 'url' => $upload[ 'url' ], 'type' => $type ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user