W3cubDocs

/WordPress

apply_filters( 'pre_move_uploaded_file', mixed $move_new_file, string[] $file, string $new_file, string $type )

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_file

(mixed) If null (default) move the file after the upload.

$file

(string[]) An array of data for a single file.

$new_file

(string) Filename of the newly-uploaded file.

$type

(string) Mime type of the newly-uploaded file.

Source

File: wp-admin/includes/file.php

View on Trac

Changelog

Version Description
4.9.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_move_uploaded_file