Uma área de pesquisa sobre o WordPress para devs e autores do tema



pre_move_uploaded_file ›

Desde4.9.0
Obsoleton/a
apply_filters( 'pre_move_uploaded_file', null, $file, $new_file, $type )
Parâmetros: (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 File type.
    Required: Yes
Definido em:
Codex:

Filters whether to short-circuit moving the uploaded file after passing all checks.

If a non-null value is passed to the filter, moving the file and any related error reporting will be completely skipped.





Fonte

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