You are here

function devel_generate_delete_vocabulary_terms in Devel 7

Deletes all terms of a vocabulary.

Parameters

$vid: int a vocabulary vid.

2 calls to devel_generate_delete_vocabulary_terms()
devel_generate_term_form_submit in devel_generate/devel_generate.module
FormAPI submission to generate taxonomy terms.
drush_devel_generate_terms in devel_generate/devel_generate.drush.inc
Command callback. Generate a number of terms in given vocabs.

File

devel_generate/devel_generate.inc, line 317

Code

function devel_generate_delete_vocabulary_terms($vid) {
  foreach (taxonomy_get_tree($vid) as $term) {
    taxonomy_term_delete($term->tid);
  }
}