WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about pre_move_uploaded_file

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-admin/includes/file.php apply_filters 980 /**
* Filters whether to short-circuit moving the uploaded file after passing all checks.
*
* If a non-null value is returned from the filter, moving the file and any related
* error reporting will be completely skipped.
*
* @since 4.9.0
*
* @param mixed $move_new_file If null (default) move the file after the upload.
* @param array $file {
* 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.
* }
* @param string $new_file Filename of the newly-uploaded file.
* @param string $type Mime type of the newly-uploaded file.
*/

Hook Parameters

Parameter Type Name Description
mixed $move_new_file If null (default) move the file after the upload.
array $fil e {
string $new_file Filename of the newly-uploaded file.
string $type Mime type of the newly-uploaded file.