apply_filters( "{$action}_prefilter", string[] $file )
Filters the data 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_prefilter
wp_handle_upload_prefilter
Parameters
- $file
-
(string[]) An array of data for the file. Reference to a single element of
$_FILES
.
Source
Changelog
Version | Description |
---|---|
4.0.0 | Converted to a dynamic hook with $action . |
2.9.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/action_prefilter