mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 18:24:31 +00:00
Provide a context to wp_handle_upload to differentiate between upload and sideload. props technosailor, fixes #12740.
git-svn-id: https://develop.svn.wordpress.org/trunk@14418 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2823,7 +2823,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$id = wp_insert_attachment( $attachment, $upload[ 'file' ], $post_id );
|
||||
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $upload['file'] ) );
|
||||
|
||||
return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ) );
|
||||
return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ), 'upload' );
|
||||
}
|
||||
|
||||
/* MovableType API functions
|
||||
|
||||
Reference in New Issue
Block a user