Uses
Uses | Description |
---|---|
wp-admin/includes/file.php: _wp_handle_upload() | Handles PHP uploads in WordPress. |
Wrapper for _wp_handle_upload().
Passes the ‘wp_handle_upload’ action.
(array) (Required) Reference to a single element of $_FILES
. Call the function once for each uploaded file.
(array|bool) (Optional) An associative array of names => values to override default variables.
Default value: false
(string) (Optional) Time formatted in 'yyyy/mm'.
Default value: null
(array) On success, returns an associative array of file attributes. On failure, returns $overrides['upload_error_handler']( &$file, $message )
or array( 'error' => $message )
.
File: wp-admin/includes/file.php
function wp_handle_upload( &$file, $overrides = false, $time = null ) { /* * $_POST['action'] must be set and its value must equal $overrides['action'] * or this: */ $action = 'wp_handle_upload'; if ( isset( $overrides['action'] ) ) { $action = $overrides['action']; } return _wp_handle_upload( $file, $overrides, $time, $action ); }
Version | Description |
---|---|
2.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_handle_upload