function taxonomy_test_taxonomy_term_insert
Implements hook_taxonomy_term_insert().
File
-
modules/
simpletest/ tests/ taxonomy_test.module, line 25
Code
function taxonomy_test_taxonomy_term_insert($term) {
if (!empty($term->antonym)) {
db_insert('taxonomy_term_antonym')->fields(array(
'tid' => $term->tid,
'name' => trim($term->antonym),
))
->execute();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.