async_upload_{$type} WordPress Filter Hook

The async_upload_{$type} hook is used to asynchronously upload a file to WordPress. This hook is called after a user has chosen a file to upload, but before the file is actually uploaded to the server.

apply_filters( "async_upload_{$type}", int $id ) #

Filters the returned ID of an uploaded attachment.


Description

The dynamic portion of the hook name, $type, refers to the attachment type.

Possible hook names include:

  • async_upload_audio
  • async_upload_file
  • async_upload_image
  • async_upload_video

Top ↑

Parameters

$id

(int)Uploaded attachment ID.


Top ↑

Source

File: wp-admin/async-upload.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
2.5.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.