Skip to content

Instantly share code, notes, and snippets.

Created September 19, 2012 18:02
Show Gist options
  • Save anonymous/3751146 to your computer and use it in GitHub Desktop.
Save anonymous/3751146 to your computer and use it in GitHub Desktop.
<?php
$market_vocab = taxonomy_vocabulary_machine_name_load('markets');
$terms = array(
'Housing',
'Affordable',
'Apartments',
'Condos',
'Student',
'Senior',
);
foreach ($terms as $term_name) {
$term = new stdClass;
$term->vid = $market_vocab->vid;
$term->name = $term_name;
$term->description = _get_term_lipsum();
$term->parent = $tid;
// $term->parent = $term_name->tid;
taxonomy_term_save($term);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment