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



{$action}_prefilter › Hooks de Filtros WordPress

Desde4.0.0
Obsoleton/a
› apply_filters( "{$action}_prefilter", $file )
Parâmetros:
  • () 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. }
    Required: Yes
Definido em:
Codex:

Filters the data for a file before it is uploaded to WordPress.

The dynamic portion of the hook name, `$action`, refers to the post action. Possible hook names include: - `wp_handle_sideload_prefilter` - `wp_handle_upload_prefilter`




Fonte

$file = apply_filters( "{$action}_prefilter", $file );