A WordPress-centric search engine for devs and theme authors

pre_move_uploaded_file ›

apply_filters( 'pre_move_uploaded_file', null, $file, $new_file, $type )
Parameters: (4)
  • (mixed) $move_new_file If null (default) move the file after the upload.
    Required: Yes
  • (string[]) $file An array of data for a single file.
    Required: Yes
  • (string) $new_file Filename of the newly-uploaded file.
    Required: Yes
  • (string) $type Mime type of the newly-uploaded file.
    Required: Yes
Defined at:

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.


$move_new_file = apply_filters( 'pre_move_uploaded_file', null, $file, $new_file, $type );