W3cubDocs

/WordPress

apply_filters( 'wp_handle_upload', array $upload, string $context )

Filters the data array for the uploaded file.

Parameters

$upload

(array) Array of upload data.

  • 'file'
    (string) Filename of the newly-uploaded file.
  • 'url'
    (string) URL of the newly-uploaded file.
  • 'type'
    (string) Mime type of the newly-uploaded file.

$context

(string) The type of upload action. Values include 'upload' or 'sideload'.

Source

File: wp-admin/includes/file.php

View on Trac

Changelog

Version Description
2.1.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_handle_upload