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.
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.
$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().
add_action('edited_term', 'after_term_edit', 10, 3);
function after_term_edit($term_id, $tt_id, $taxonomy) {
wp_cache_delete('terms_' . $taxonomy);
}
Chargement des actualités...