edited_term

ACTION wp-includes\taxonomy.php (ligne 3469) github
Fires after a term has been updated, and the term cache has been cleaned. The {@see 'edited_$taxonomy'} hook is also available for targeting a specific taxonomy.
traduction française
Se déclenche après qu'un terme ait été mis à jour et que le cache du terme ait été nettoyé. Le crochet {@see 'edited_$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 après modification d'un terme

Action après modification du terme.

content
add_action('edited_term', 'after_term_edit', 10, 3);
function after_term_edit($term_id, $tt_id, $taxonomy) {
    wp_cache_delete('terms_' . $taxonomy);
}

Actualités

Chargement des actualités...