function _taxonomy_title_update in Taxonomy Title 6
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 in ./
taxonomy_title.module - Implementation of hook_taxonomy().
File
- ./
taxonomy_title.module, line 166 - Enhanced control over the heading tag for the taxonomy term list pages.
Code
function _taxonomy_title_update($tid, $title) {
if (db_result(db_query("SELECT title FROM {taxonomy_title} WHERE tid = %d", $tid))) {
db_query("UPDATE {taxonomy_title} SET title = '%s' WHERE tid = %d", $title, $tid);
}
else {
db_query("INSERT INTO {taxonomy_title} (tid, title) VALUES (%d, '%s')", $tid, $title);
}
// Add Suppot for i18nstrings.
if (function_exists('i18nstrings_update')) {
i18nstrings_update("taxonomy_title:term:{$tid}:title", $title);
}
}