diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 1f810939ba..9d87cb2e2c 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -344,7 +344,7 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) { if ( is_multisite() ) delete_transient( 'dirsize_cache' ); - return apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) ); + return apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ), 'upload' ); } /** @@ -484,7 +484,7 @@ function wp_handle_sideload( &$file, $overrides = false ) { // Compute the URL $url = $uploads['url'] . "/$filename"; - $return = apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) ); + $return = apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ), 'sideload' ); return $return; } diff --git a/xmlrpc.php b/xmlrpc.php index 7f346b9ac6..fd471f26ee 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -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