function hook_taxonomy_term_insert
hook_taxonomy_term_insert($term)
Act on taxonomy terms when inserted.
Modules implementing this hook can act on the term object when saved to the database.
Parameters
$term: A taxonomy term object.
Related topics
File
- modules/taxonomy/taxonomy.api.php, line 138
- Hooks provided by the Taxonomy module.
Code
function hook_taxonomy_term_insert($term) { db_insert('mytable') ->fields(array( 'tid' => $term->tid, 'foo' => $term->foo, )) ->execute(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!taxonomy!taxonomy.api.php/function/hook_taxonomy_term_insert/7.x