wp_handle_upload Wordpress function


Handle PHP uploads in WordPress, sanitizing file names, checking extensions for mime type,
and moving the file to the appropriate directory within the uploads directory.



(array) $file Reference to a single element of $_FILES. Call the function once for each uploaded file.
(array) $overrides Optional. An associative array of names=>values to override default variables with extract( $overrides, EXTR_OVERWRITE ).
(string) $time Optional. Time formatted in 'yyyy/mm'.

Return Type:

(array) On success, returns an associative array of file attributes. On failure, returns $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ).

Define At:


Wordpress Reference URL:


0 Flares Facebook 0 Google+ 0 0 Flares ×
Posted in: Wordpress functions
0 Flares Facebook 0 Pin It Share 0 Google+ 0 0 Flares ×