path_taxonomy_term_insert
- Versions
- 7
path_taxonomy_term_insert($term)
Implements hook_taxonomy_term_insert().
Code
modules/path/path.module, line 265
<?php
function path_taxonomy_term_insert($term) {
if (isset($term->path)) {
$path = $term->path;
$path['alias'] = trim($path['alias']);
// Only save a non-empty alias.
if (!empty($path['alias'])) {
// Ensure fields for programmatic executions.
$path['source'] = 'taxonomy/term/' . $term->tid;
$path['language'] = LANGUAGE_NONE;
path_save($path);
}
}
}
?>Login or register to post comments 