edit_term

ACTION wp-includes\taxonomy.php (ligne 3428) github
Fires after a term has been updated, but before the term cache has been cleaned. The {@see 'edit_$taxonomy'} hook is also available for targeting a specific taxonomy.
traduction française
Se déclenche après la mise à jour d'un terme, mais avant que le cache des termes n'ait été nettoyé. Le crochet {@see 'edit_$taxonomy'} est également disponible pour cibler une taxonomie spécifique.

Paramètres

Entrée :
$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_update_term().

Utilisation

Exécuter une action lors de la modification d'un terme

Action à la modification du terme.

content database
add_action('edit_term', 'on_term_updated', 10, 3);
function on_term_updated($term_id, $tt_id, $taxonomy) {
    clean_term_cache($term_id, $taxonomy);
}

Actualités

Chargement des actualités...