apply_filters( 'wp_handle_upload', array $upload , string $context )
Filters the data array for the uploaded file.
Parameters
-
$upload
array -
Array of upload data.
file
stringFilename of the newly-uploaded file.url
stringURL of the newly-uploaded file.type
stringMime type of the newly-uploaded file.
-
$context
string -
The type of upload action. Values include
'upload'
or'sideload'
.
Source
File: wp-admin/includes/file.php
.
View all references
return apply_filters(
'wp_handle_upload',
array(
'file' => $new_file,
'url' => $url,
'type' => $type,
),
'wp_handle_sideload' === $action ? 'sideload' : 'upload'
);
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |