akcjadynamicznyod 2.5.0
media_upload_{$type}
Args 0Plik wp-admin/media-upload.php
Opis — z kodu źródłowego
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.
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 {@see 'media_upload_tabs'} filter.
Possible hook names include:
media_upload_audiomedia_upload_filemedia_upload_imagemedia_upload_video
Hook dynamiczny — możliwe nazwy
media_upload_audiomedia_upload_filemedia_upload_imagemedia_upload_videoWywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_action( 'media_upload_{$type}', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_action( 'media_upload_{$type}', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii