wp_handle_upload() – Wrapper for _wp_handle_upload().

You appear to be a bot. Output may be restricted

Description

Wrapper for _wp_handle_upload().

Passes the wp_handle_upload action.

Usage

$array = wp_handle_upload( $file, $overrides, $time );

Parameters

$file
( array ) required – Reference to a single element of `$_FILES`. Call the function once for each uploaded file. See _wp_handle_upload() for accepted values.
$overrides
( array|false ) optional – Optional. An associative array of names => values to override default variables. Default false. See _wp_handle_upload() for accepted values.
$time
( string ) optional – Optional. Time formatted in 'yyyy/mm'. Default null.

Returns

array See _wp_handle_upload() for return value.

Source

File name: wordpress/wp-admin/includes/file.php
Lines:

1 to 12 of 12
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 );
}
 

 View on GitHub View on Trac