function BlogAPITestCase::addTerm in Blog API 7
Add a taxonomy term to vocabulary.
Parameters
integer $vid: Vocabulary ID.
string $term: Term name.
Return value
integer The Term ID.
1 call to BlogAPITestCase::addTerm()
- BlogAPITestCase::testBlogAPI in ./
blogapi.test - Create, edit, and delete post; upload file; set/get categories.
File
- ./
blogapi.test, line 182
Class
Code
function addTerm($vid, $term_name) {
$term = new stdClass();
$term->name = $term_name;
$term->vid = $vid;
taxonomy_term_save($term);
return $term->tid;
}