Commit 9b54c79c authored by webchick's avatar webchick

#764726 by catch: Fixed hook_taxonomy_term_presave() is missing.

parent 8aa44b55
......@@ -94,6 +94,19 @@ function hook_taxonomy_term_load($terms) {
}
}
/**
* Act on taxonomy terms before they are saved.
*
* Modules implementing this hook can act on the term object before it is
* inserted or updated.
*
* @param $term
* A term object.
*/
function hook_taxonomy_term_presave($term) {
$term->foo = 'bar';
}
/**
* Act on taxonomy terms when inserted.
*
......
......@@ -469,6 +469,7 @@ function taxonomy_term_save($term) {
}
field_attach_presave('taxonomy_term', $term);
module_invoke_all('taxonomy_term_presave', $term);
if (empty($term->tid)) {
$status = drupal_write_record('taxonomy_term_data', $term);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment