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: https://develop.svn.wordpress.org/trunk@20305 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8f575763ab
commit
abd47c9ff9
@ -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
Block a user