function taxonomy_test_taxonomy_term_insert in Drupal 7
Implements hook_taxonomy_term_insert().
File
- modules/
simpletest/ tests/ taxonomy_test.module, line 25 - Test module for Taxonomy hooks and functions not used in core.
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();
}
}