media_upload_video хук-событие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 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.

Это один из вариантов динамического хука media_upload_(type)


add_action( 'media_upload_video', 'wp_kama_media_upload_video_action' );

 * Function for `media_upload_video` action-hook.
 * @return void
function wp_kama_media_upload_video_action(){

	// action...

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

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

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

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

Где используется хук в WordPress

wp-admin/includes/admin-filters.php 23
add_action( 'media_upload_video', 'wp_media_upload_handler' );