filtrdynamicznyod 2.5.0
async_upload_{$type}
Args 1Plik wp-admin/async-upload.php
Opis — z kodu źródłowego
Filters the returned ID of an uploaded attachment.
The dynamic portion of the hook name, $type, refers to the attachment type.
Possible hook names include:
async_upload_audioasync_upload_fileasync_upload_imageasync_upload_video
Hook dynamiczny — możliwe nazwy
async_upload_audioasync_upload_fileasync_upload_imageasync_upload_videoParametry
| Parametr | Typ | Opis |
|---|---|---|
$id | int | Uploaded attachment ID. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'async_upload_{$type}', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'async_upload_{$type}', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii