async_upload_audio
Filters the returned ID of an uploaded attachment.
This is one of the variants of the dynamic hook async_upload_(type)
Usage
add_filter( 'async_upload_audio', 'wp_kama_async_upload_audio_filter' );
/**
* Function for `async_upload_audio` filter-hook.
*
* @param int $id Uploaded attachment ID.
*
* @return int
*/
function wp_kama_async_upload_audio_filter( $id ){
// filter...
return $id;
}
- $id(int)
- Uploaded attachment ID.
Changelog
| Since 2.5.0 | Introduced. |
Where the hook is called
In file: /wp-admin/async-upload.php
wp-admin/async-upload.php 175
echo apply_filters( "async_upload_{$type}", $id );
Where the hook is used in WordPress
wp-admin/includes/admin-filters.php 31
add_filter( 'async_upload_audio', 'get_media_item', 10, 2 );