XMLRPC: Add the object ID to the return data of wp.uploadFile/metaWeblog.newMediaObject so that it can be used in other api calls e.g. setting featured image see #15098 props maxcutler
git-svn-id: http://svn.automattic.com/wordpress/trunk@20305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1aa96ed7c0
commit
d744ca66f0
|
@ -4459,7 +4459,13 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||
|
||||
do_action( 'xmlrpc_call_success_mw_newMediaObject', $id, $args );
|
||||
|
||||
return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ), 'upload' );
|
||||
$struct = array(
|
||||
'id' => strval( $id ),
|
||||
'file' => $name,
|
||||
'url' => $upload[ 'url' ],
|
||||
'type' => $type
|
||||
);
|
||||
return apply_filters( 'wp_handle_upload', $struct, 'upload' );
|
||||
}
|
||||
|
||||
/* MovableType API functions
|
||||
|
|
Loading…
Reference in New Issue