Uploader: Fire 'wp_handle_upload' in `wp_upload_bits()`. Thusly, the filter in `wp_xmlrpc_server::mw_newMediaObject()` is redundant.
Props dllh. Fixes #33539. Built from https://develop.svn.wordpress.org/trunk@34257 git-svn-id: http://core.svn.wordpress.org/trunk@34221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
58ac764859
commit
c871986819
|
@ -5737,11 +5737,10 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||
'id' => strval( $id ),
|
||||
'file' => $name,
|
||||
'url' => $upload[ 'url' ],
|
||||
'type' => $type
|
||||
'type' => $upload[ 'type' ]
|
||||
);
|
||||
|
||||
/** This filter is documented in wp-admin/includes/file.php */
|
||||
return apply_filters( 'wp_handle_upload', $struct, 'upload' );
|
||||
return $struct;
|
||||
}
|
||||
|
||||
/* MovableType API functions
|
||||
|
|
|
@ -1993,7 +1993,8 @@ function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
|
|||
// Compute the URL
|
||||
$url = $upload['url'] . "/$filename";
|
||||
|
||||
return array( 'file' => $new_file, 'url' => $url, 'error' => false );
|
||||
/** This filter is documented in wp-admin/includes/file.php */
|
||||
return apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $wp_filetype['type'], 'error' => false ), 'sideload' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34256';
|
||||
$wp_version = '4.4-alpha-34257';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue