You are here

function taxonomy_title_update in Taxonomy Title 7

Updates the term title.

Parameters

$tid: The taxonomy term id of the term.

$title: The taxonomy term title to use for this term.

1 call to taxonomy_title_update()
taxonomy_title_taxonomy_term_update in ./taxonomy_title.module
Implements hook_taxonomy_term_update().

File

./taxonomy_title.module, line 196
Enhanced control over the heading tag for the taxonomy term list pages.

Code

function taxonomy_title_update($tid, $title) {
  db_merge('taxonomy_title')
    ->key(array(
    'tid' => $tid,
  ))
    ->fields(array(
    'title' => $title,
  ))
    ->execute();

  // Add Suppot for i18nstrings.
  if (function_exists('i18n_string_update')) {
    i18n_string_update(array(
      'taxonomy_title',
      'term',
      $tid,
      'title',
    ), $title);
  }
}