Skip to content

Instantly share code, notes, and snippets.

@kporras07
Created November 6, 2015 01:52
Show Gist options
  • Save kporras07/fc4c748a2c487797a53c to your computer and use it in GitHub Desktop.
Save kporras07/fc4c748a2c487797a53c to your computer and use it in GitHub Desktop.
Crear taxonomy term.
$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