delete_{$taxonomy}

ACTION wp-includes\taxonomy.php (ligne 2233) github
Fires after a term in a specific taxonomy is deleted. The dynamic portion of the hook name, `$taxonomy`, refers to the specific taxonomy the term belonged to. Possible hook names include:  - `delete_category`  - `delete_post_tag`

Paramètres

Entrée :
$term, $tt_id, $deleted_term, $object_ids
Sortie :
@param int     $term         Term ID.
@param int     $tt_id        Term taxonomy ID.
@param WP_Term $deleted_term Copy of the already-deleted term.
@param array   $object_ids   List of term object IDs.

Utilisation

// Ajouter une fonction au hook action 'delete_{$taxonomy}'
add_action('delete_{$taxonomy}', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($term, $tt_id, $deleted_term, $object_ids) {
    // Votre code ici
    error_log('Hook delete_{$taxonomy} déclenché');
}

Actualités

Chargement des actualités...