Bring in wp_handle_upload_prefilter from MU
git-svn-id: http://svn.automattic.com/wordpress/trunk@12142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cf7279320b
commit
2498bb6cae
|
@ -223,9 +223,15 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) {
|
|||
}
|
||||
}
|
||||
|
||||
$file = apply_filters( 'wp_handle_upload_prefilter', $file );
|
||||
|
||||
// You may define your own function and pass the name in $overrides['upload_error_handler']
|
||||
$upload_error_handler = 'wp_handle_upload_error';
|
||||
|
||||
// You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully.
|
||||
if ( isset( $file['error'] ) && !ctype_digit( $file['error'] ) && $file['error'] )
|
||||
return $upload_error_handler( $file, $file['error'] );
|
||||
|
||||
// You may define your own function and pass the name in $overrides['unique_filename_callback']
|
||||
$unique_filename_callback = null;
|
||||
|
||||
|
|
Loading…
Reference in New Issue