apply_filters( "{$action}_overrides", array|false $overrides , array $file )
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
-
An array of override parameters for this file. Boolean false if none are provided. @see _wp_handle_upload().
- $file
-
Reference to a single element from
$_FILES
.<br>- 'name'
(string) The original name of the file on the client machine.<br> - 'type'
(string) The mime type of the file, if the browser provided this information.<br> - 'tmp_name'
(string) The temporary filename of the file in which the uploaded file was stored on the server.<br> - 'size'
(int) The size, in bytes, of the uploaded file.<br> - 'error'
(int) The error code associated with this file upload.<br>
- 'name'
Source
Changelog
Version | Description |
---|---|
5.7.0 | Introduced. |