Created
September 19, 2012 18:02
-
-
Save anonymous/3751146 to your computer and use it in GitHub Desktop.
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
<?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