WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
событие не описано

media_upload_(type) хук-событие . 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_9876' );
function action_function_name_9876(){
	// action...

Список изменений

С версии 2.5.0 Введена.

Где вызывается хук

В файле: /wp-admin/media-upload.php
wp-admin/media-upload.php 99
do_action( "media_upload_{$type}" );

Где используется хук в ядре 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' );