Search code examples
phpdrupaldrupal-7drupal-modulesdrupal-taxonomy

how to get machine name of taxonomy term in code?


How to get machine name of taxonomy term in code having taxonomy term ID in Drupal 7?

I tried taxonomy_term_load() , but it doesn't return machine name.

Thanks.


Solution

  • Use pathauto's pathauto_cleanstring() function to clean up the string of your taxonomy term.