Filters the override parameters for a file before it is uploaded to WordPress.
Description
The dynamic portion of the hook name, $action
, refers to the post action.
Possible hook names include:
wp_handle_sideload_overrides
wp_handle_upload_overrides
Parameters
$overrides
array|false- An array of override parameters for this file. Boolean false if none are provided. See _wp_handle_upload().
$file
array- Reference to a single element from
$_FILES
.
name
stringThe original name of the file on the client machine.type
stringThe mime type of the file, if the browser provided this information.tmp_name
stringThe temporary filename of the file in which the uploaded file was stored on the server.size
intThe size, in bytes, of the uploaded file.error
intThe error code associated with this file upload.
Source
$overrides = apply_filters( "{$action}_overrides", $overrides, $file );
Changelog
Version | Description |
---|---|
5.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.