wp_handle_upload WordPress Filter Hook

The wp_handle_upload hook is used to process uploaded files. It is called once for each file uploaded.

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'.


Top ↑

Source

File: wp-admin/includes/file.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.