Created
November 6, 2015 01:52
-
-
Save kporras07/fc4c748a2c487797a53c to your computer and use it in GitHub Desktop.
Crear taxonomy term.
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
$vocabulary = taxonomy_vocabulary_machine_name_load($name); | |
$vid = $vocabulary->vid; | |
$term = new stdClass(); | |
$term->vid = $vid; | |
$term->name = 'foo'; | |
$term->description = 'bar'; | |
taxonomy_term_save($term); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment