Last active
August 29, 2015 14:14
-
-
Save jonathanfranks/e842209c89677a1b28e1 to your computer and use it in GitHub Desktop.
Delete all terms from a vocabulary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$vocab_name = ''; | |
$vocab_id = taxonomy_vocabulary_machine_name_load($vocab_name)->vid; | |
dpm($vocab_id); | |
$tids = array(); | |
foreach (taxonomy_get_tree($vocab_id) as $term) { | |
taxonomy_term_delete($term->tid); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment