hook_taxonomy($op, $type, $array = NULL)
contributions/docs/developer/hooks/core.php, line 1508
Act on taxonomy changes.
This hook allows modules to take action when the terms and vocabularies in the taxonomy are modified.
$op What is being done to $array. Possible values:
None.
| Name | Description |
|---|---|
| Hooks | Allow modules to interact with the Drupal core. |
function hook_taxonomy($op, $type, $array = NULL) {
if ($type == 'vocabulary' && ($op == 'insert' || $op == 'update')) {
if (variable_get('forum_nav_vocabulary', '') == ''
&& in_array('forum', $array['nodes'])) {
// since none is already set, silently set this vocabulary as the
// navigation vocabulary
variable_set('forum_nav_vocabulary', $array['vid']);
}
}
}