Delete all terms in a taxonomy

Public

Get raw version
php
  1. $vocab_id = 1;
  2. $tids = array();
  3. foreach (taxonomy_get_tree($vocab_id) as $term) {
  4. taxonomy_term_delete($term->tid);
  5. }