/**
* Implements hook_taxonomy_term_insert
*/
function example_taxonomy_term_insert($term)
{
example_taxonomy_term_update($term);
}
/**
* Implements hook_taxonomy_term_update
*/
function example_taxonomy_term_update($term)
{
$path = array(
'source' => sprintf('term/%d', $term->tid),
'alias' => sprintf('category/%s',
pathauto_cleanstring($term->name),
)
);
path_save($path);
}
/**
* Implements hook_taxonomy_term_delete
*/
function example_taxonomy_term_delete($term)
{
path_delete(array('source' => sprintf('term/%d', $term->tid)));
}
* Implements hook_taxonomy_term_insert
*/
function example_taxonomy_term_insert($term)
{
example_taxonomy_term_update($term);
}
/**
* Implements hook_taxonomy_term_update
*/
function example_taxonomy_term_update($term)
{
$path = array(
'source' => sprintf('term/%d', $term->tid),
'alias' => sprintf('category/%s',
pathauto_cleanstring($term->name),
)
);
path_save($path);
}
/**
* Implements hook_taxonomy_term_delete
*/
function example_taxonomy_term_delete($term)
{
path_delete(array('source' => sprintf('term/%d', $term->tid)));
}