media_upload_audio
Fires inside specific upload-type views in the legacy (pre-3.5.0) media popup based on the current tab.
The hook only fires if the current $tab is 'type' (From Computer), 'type_url' (From URL), or, if the tab does not exist (i.e., has not been registered via the media_upload_tabs filter.
This is one of the variants of the dynamic hook media_upload_(type)
Usage
add_action( 'media_upload_audio', 'wp_kama_media_upload_audio_action' ); /** * Function for `media_upload_audio` action-hook. * * @return void */ function wp_kama_media_upload_audio_action(){ // action... }
Changelog
Since 2.5.0 | Introduced. |
Where the hook is called
In file: /wp-admin/media-upload.php
media_upload_audio
wp-admin/media-upload.php 105
do_action( "media_upload_{$type}" );
Where the hook is used in WordPress
wp-admin/includes/admin-filters.php 22
add_action( 'media_upload_audio', 'wp_media_upload_handler' );