/**
* 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)));
}

相关文章:

  • 2021-09-19
  • 2021-06-25
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-24
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2021-09-05
  • 2021-11-01
相关资源
相似解决方案