async_upload_{$type}

FILTER wp-admin\async-upload.php (ligne 175) github
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_audio`  - `async_upload_file`  - `async_upload_image`  - `async_upload_video`

Paramètres

Entrée :
$id
Sortie :
@param int $id Uploaded attachment ID.

Utilisation

// Modifier la valeur avec le filtre 'async_upload_{$type}'
add_filter('async_upload_{$type}', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($id) {
    // Modifier la valeur
    return $id;
}

Actualités

Chargement des actualités...