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_audioasync_upload_fileasync_upload_imageasync_upload_video
Parameters
- $id
(int)Uploaded attachment ID.
Source
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |