wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



pre_move_uploaded_file › Filtr WordPress Hooks

Od4.9.0
Przestarzałyn/a
apply_filters( 'pre_move_uploaded_file', null, $file, $new_file, $type )
Parametry: (4)
  • (mixed) $move_new_file If null (default) move the file after the upload.
    Wymagane: Tak
  • (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. }
    Wymagane: Tak
  • (string) $new_file Filename of the newly-uploaded file.
    Wymagane: Tak
  • (string) $type Mime type of the newly-uploaded file.
    Wymagane: Tak
Zdefiniowane na:
Codex:

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.





Źródło

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