Fires immediately after a new term is created, before the term cache is cleaned. The {@see 'create_$taxonomy'} hook is also available for targeting a specific taxonomy.
$term_id, $tt_id, $taxonomy, $args
Sortie :
@param int $term_id Term ID. @param int $tt_id Term taxonomy ID. @param string $taxonomy Taxonomy slug. @param array $args Arguments passed to wp_insert_term().
// Ajouter une fonction au hook action 'create_term'
add_action('create_term', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($term_id, $tt_id, $taxonomy, $args) {
// Votre code ici
error_log('Hook create_term déclenché');
}
Chargement des actualités...