Filters whether to short-circuit moving the uploaded file after passing all checks.
Description
If a non-null value is returned from the filter, moving the file and any related error reporting will be completely skipped.
Parameters
$move_new_filemixed
If null (default) move the file after the upload.
$filearray
{ Reference to a single element from $_FILES. @type string $name The original name of the file on the client machine. @type string $type The mime type of the file, if the browser provided this information. @type string $tmp_name The temporary filename of the file in which the uploaded file was stored on the server. @type int $size The size, in bytes, of the uploaded file. @type int $error The error code associated with this file upload.}
$namestring
The original name of the file on the client machine.
$typestring
The mime type of the file, if the browser provided this information.
$tmp_namestring
The temporary filename of the file in which the uploaded file was stored on the server.
1004* @type int$size The size, in bytes, of the uploaded file.1005* @type int$error The error code associated with this file upload.1006*}1007* @param string$new_file Filename of the newly-uploaded file.1008* @param string$type Mime type of the newly-uploaded file.1009*/1010$move_new_file=apply_filters('pre_move_uploaded_file',null,$file,$new_file,$type);10111012if(null===$move_new_file){1013if('wp_handle_upload'===$action){1014$move_new_file= @move_uploaded_file($file['tmp_name'],$new_file);1015}else{1016// Use copy and unlink because rename breaks streams.
History
Introduced in 4.9.0. Unchanged from 6.7.7 through 7.1.0.