A WordPress-centric search engine for devs and theme authors



{$action}_prefilter ›

Since4.0.0
Deprecatedn/a
apply_filters( "{$action}_prefilter", $file )
Parameters:
  • (string[]) $file An array of data for the file. Reference to a single element of `$_FILES`.
    Required: Yes
Defined at:
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




Source

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