hook_taxonomy_term_presave

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 hook_taxonomy_term_presave($term)

Act on taxonomy terms before they are saved.

Modules implementing this hook can act on the term object before it is inserted or updated.

Parameters

$term A term object.

Related topics

Code

modules/taxonomy/taxonomy.api.php, line 119

<?php
function hook_taxonomy_term_presave($term) {
  $term->foo = 'bar';
}
?>