WordPress at a glance
action is not described

media_upload_(type) action-hook . WP 2.5.0

Fires inside specific upload-type views in the legacy (pre-3.5.0) media popup based on the current tab.

The dynamic portion of the hook name, $type, refers to the specific media upload type. Possible values include 'image', 'audio', 'video', 'file', etc.

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.


add_action( 'media_upload_(type)', 'action_function_name_748' );
function action_function_name_748(){
	// action...


Since 2.5.0 Introduced.

Where the hook is called

In file: /wp-admin/media-upload.php
wp-admin/media-upload.php 99
do_action( "media_upload_{$type}" );

Where in WP core the hook is used WordPress

wp-admin/media-upload.php 20
add_action( 'media_upload_image', 'wp_media_upload_handler' );
wp-admin/media-upload.php 21
add_action( 'media_upload_audio', 'wp_media_upload_handler' );
wp-admin/media-upload.php 22
add_action( 'media_upload_video', 'wp_media_upload_handler' );
wp-admin/media-upload.php 23
add_action( 'media_upload_file', 'wp_media_upload_handler' );
wp-admin/media-upload.php 36
add_filter( 'media_upload_gallery', 'media_upload_gallery' );
wp-admin/media-upload.php 37
add_filter( 'media_upload_library', 'media_upload_library' );
wp-admin/media-upload.php 39
add_filter( 'media_upload_tabs', 'update_gallery_tab' );