wp_handle_upload


wp_handle_upload ( $file, $overrides = false, $time = null )

Parameters:
  • (array) $file Reference to a single element of `$_FILES`. Call the function once for each uploaded file.
  • (array|bool) $overrides Optional. An associative array of names=>values to override default variables. Default false.
  • (string) $time Optional. Time formatted in 'yyyy/mm'. Default null.
See:
Returns:
  • (array) On success, returns an associative array of file attributes. On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ).
Defined at:

Description

Wrapper for _wp_handle_upload().

Passes the {@see 'wp_handle_upload'} action.

Related Functions

_wp_handle_upload, wp_handle_sideload, wp_import_handle_upload, media_handle_upload, wp_get_upload_dir

Top Google Results

User discussions

wpseek mobile