wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_handle_upload › WordPress Function

Since2.0.0
已弃用n/a
wp_handle_upload ( $file, $overrides = false, $time = null )
参数: (3)
  • (array) $file Reference to a single element of `$_FILES`. Call the function once for each uploaded file. See _wp_handle_upload() for accepted values.
    Required: Yes
  • (array|false) $overrides Optional. An associative array of names => values to override default variables. Default false. See _wp_handle_upload() for accepted values.
    Required: No
    默认: false
  • (string|null) $time Optional. Time formatted in 'yyyy/mm'. Default null.
    Required: No
    默认: null
查看:
返回:
  • (array) See _wp_handle_upload() for return value.
定义在:
文档:

Wrapper for _wp_handle_upload().

Passes the {@see 'wp_handle_upload'} action.


源码

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 );
}